html_url
stringlengths 48
51
| title
stringlengths 5
268
| comments
stringlengths 70
51.8k
| body
stringlengths 0
29.8k
| comment_length
int64 16
1.52k
| text
stringlengths 164
54.1k
| embeddings
sequence |
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/2644 | Batched `map` not allowed to return 0 items | Sorry to ping you, @lhoestq, did you have a chance to take a look at the proposed PR? Thank you! | ## Describe the bug
I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`.
However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case.
For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs.
## Steps to reproduce the bug
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
# The following line simulates no matches found, so we return an empty batch
result = {'key': []}
return result
filtered_dataset = dataset.map(
select_rows,
remove_columns = dataset.column_names,
batched = True,
num_proc = 1,
desc = "Selecting rows with images that exist"
)
```
The code above immediately triggers the exception. If we use the following instead:
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
result = {'key': []} # or defaultdict or whatever
# code to check for condition and append elements to result
# some_items_found will be set to True if there were any matching elements in the batch
return result if some_items_found else {}
```
Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it.
In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items.
## Expected results
The dataset would be filtered and only the matching fields would be returned.
## Actual results
An exception is encountered, as described. Using a workaround makes it fail further along the line.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 20 | Batched `map` not allowed to return 0 items
## Describe the bug
I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`.
However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case.
For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs.
## Steps to reproduce the bug
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
# The following line simulates no matches found, so we return an empty batch
result = {'key': []}
return result
filtered_dataset = dataset.map(
select_rows,
remove_columns = dataset.column_names,
batched = True,
num_proc = 1,
desc = "Selecting rows with images that exist"
)
```
The code above immediately triggers the exception. If we use the following instead:
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
result = {'key': []} # or defaultdict or whatever
# code to check for condition and append elements to result
# some_items_found will be set to True if there were any matching elements in the batch
return result if some_items_found else {}
```
Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it.
In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items.
## Expected results
The dataset would be filtered and only the matching fields would be returned.
## Actual results
An exception is encountered, as described. Using a workaround makes it fail further along the line.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
Sorry to ping you, @lhoestq, did you have a chance to take a look at the proposed PR? Thank you! | [
-0.23283571004867554,
-0.3903885781764984,
-0.04445696994662285,
0.16449064016342163,
-0.10854555666446686,
-0.06876929104328156,
0.11633878946304321,
0.4056321978569031,
0.6400423049926758,
0.11788129061460495,
-0.05657234787940979,
0.24608545005321503,
-0.39544111490249634,
0.10435456782579422,
-0.16292166709899902,
0.16080279648303986,
-0.044933222234249115,
0.14057955145835876,
-0.16911719739437103,
-0.19149257242679596,
-0.3362928330898285,
0.16319964826107025,
-0.39792609214782715,
-0.050104111433029175,
-0.14877139031887054,
-0.29197537899017334,
0.2864794433116913,
-0.03620988875627518,
-0.16281409561634064,
-0.2454041987657547,
0.20609132945537567,
-0.23282960057258606,
-0.20913605391979218,
0.5783204436302185,
-0.00012992756091989577,
-0.023137491196393967,
0.15059375762939453,
-0.18518859148025513,
-0.08976078033447266,
-0.30296117067337036,
-0.1908179223537445,
-0.17153027653694153,
-0.11571899056434631,
-0.28246554732322693,
0.1819458305835724,
-0.2716505825519562,
-0.19563539326190948,
-0.4482395052909851,
0.10719674080610275,
0.2587006390094757,
0.04332170635461807,
0.41881802678108215,
0.0030669011175632477,
0.1764482855796814,
0.3312491774559021,
0.2664015591144562,
-0.0753515362739563,
0.12881143391132355,
0.7205767631530762,
-0.2881000339984894,
0.022628337144851685,
0.33858999609947205,
-0.39218443632125854,
0.07090604305267334,
0.13675549626350403,
-0.030903343111276627,
0.23016825318336487,
-0.5515580177307129,
0.2697512209415436,
0.3675670623779297,
-0.0900002047419548,
0.06078575924038887,
-0.4333362579345703,
-0.6687809228897095,
-0.04030340164899826,
-0.09549891948699951,
-0.03889739513397217,
0.2810015380382538,
-0.42103928327560425,
-0.056459683924913406,
-0.48461854457855225,
0.12179434299468994,
0.007894709706306458,
0.1618545651435852,
0.030676499009132385,
0.45895466208457947,
-0.09304071217775345,
0.2003244161605835,
0.3451099097728729,
-0.16183258593082428,
-0.09940237551927567,
-0.16727103292942047,
-0.2236279845237732,
0.5847228765487671,
-0.036699797958135605,
-0.14598754048347473,
0.3893197476863861,
0.21976801753044128,
0.22303572297096252,
-0.3132421374320984,
-0.05030704289674759,
-0.07427571713924408,
0.2646808922290802,
-0.023431487381458282,
0.41594502329826355,
0.0793757289648056,
0.2686937749385834,
0.34931978583335876,
-0.005051732063293457,
-0.05909411981701851,
0.06769010424613953,
0.11316955834627151,
0.11344167590141296,
-0.08908388763666153,
-0.009650817140936852,
-0.07640804350376129,
0.25678545236587524,
-0.07875248044729233,
-0.12189842760562897,
0.23410125076770782,
-0.4100172519683838,
0.13690681755542755,
0.06204803287982941,
0.12508299946784973,
0.17005744576454163,
-0.17767232656478882,
0.1202130913734436,
0.11262907832860947,
-0.15702861547470093,
0.1897115707397461,
-0.07724695652723312,
-0.1316169649362564,
-0.19250144064426422,
-0.32082515954971313,
0.19647885859012604,
-0.33428630232810974,
0.24181696772575378,
-0.1585833579301834,
0.019827812910079956,
-0.06153399869799614,
0.09574074298143387,
-0.26456236839294434,
0.7512259483337402,
0.49378809332847595,
-0.11951078474521637,
0.2913576364517212,
0.3966234624385834,
-0.2185577154159546,
-0.17528337240219116,
0.4062905013561249,
-0.3826132118701935,
-0.2777351438999176,
0.21004116535186768,
-0.040186598896980286,
-0.23807570338249207,
0.3465711772441864,
-0.5073066353797913,
0.2185843586921692,
0.17824572324752808,
0.08225111663341522,
0.2914721667766571,
-0.2697463631629944,
-0.10539513826370239,
-0.23601150512695312,
0.04256308823823929,
0.6938400864601135,
-0.6387714743614197,
-0.049924351274967194,
0.11019014567136765,
0.10137894749641418,
-0.061366014182567596,
0.34788036346435547,
-0.04546039178967476,
0.34811022877693176,
-0.4107355773448944,
0.30598658323287964,
0.08731269836425781,
-0.12647072970867157,
-0.32756295800209045,
0.313419908285141,
-0.035814493894577026,
0.23563890159130096,
-0.021055027842521667,
-0.0642477422952652,
0.5519369840621948,
-0.18738888204097748,
0.3676513135433197,
-0.17005832493305206,
-0.279957115650177,
0.10416298359632492,
-0.05038165673613548,
-0.03984452039003372,
0.06037992984056473,
-0.24208195507526398,
0.19492442905902863,
0.01658736914396286,
0.03907826170325279,
-0.5488616228103638,
0.1286391019821167,
-0.15087857842445374,
0.33836275339126587,
0.2401699721813202,
0.26210886240005493,
0.1233314499258995,
0.0182515736669302,
-0.25635242462158203,
-0.47136205434799194,
0.30017632246017456,
-0.48803383111953735,
0.021247990429401398,
-0.433834433555603,
-0.10330353677272797,
0.03096431866288185,
0.18347382545471191,
-0.03501986339688301,
0.03309561684727669,
-0.07492087781429291,
-0.49758055806159973,
0.1765720695257187,
-0.021343614906072617,
-0.2262362688779831,
-0.23706969618797302,
-0.13586565852165222,
-0.008439034223556519,
-0.35672318935394287,
0.07136140018701553,
0.2501074969768524,
-0.2921583354473114,
-0.2542048990726471,
0.24662992358207703,
0.1149318516254425,
-0.11761096864938736,
0.11735381931066513,
0.17585280537605286,
-0.03481536731123924,
-0.1673574596643448,
-0.14001286029815674,
0.13125267624855042,
0.011728176847100258,
-0.045801110565662384,
0.10183678567409515,
0.14501364529132843,
0.3444770574569702,
-0.23784318566322327,
-0.06940644234418869,
0.5054202675819397,
-0.18761567771434784,
0.5359300971031189,
-0.17968614399433136,
0.05123795568943024,
-0.19963207840919495,
0.04260646924376488,
-0.20592130720615387,
-0.38505059480667114,
0.07628369331359863,
-0.15773656964302063,
0.05133714899420738,
0.031914614140987396,
0.001256503164768219,
-0.19892141222953796,
0.08561684191226959,
-0.046961963176727295,
0.16477924585342407,
0.014488227665424347,
-0.06305212527513504,
0.22669023275375366,
0.044692281633615494,
-0.014278262853622437,
0.3432701528072357,
0.21914228796958923,
-0.0887264758348465,
-0.15218167006969452,
0.250440388917923,
0.00012227147817611694,
0.4139186143875122,
0.18166814744472504,
0.026053600013256073,
0.15500998497009277,
-0.003640607465058565,
-0.06572043895721436,
-0.2528342604637146,
-0.18143008649349213,
0.005715254694223404,
0.14953403174877167,
-0.3952977955341339,
-0.03541942685842514,
0.11011520028114319,
-0.1585041582584381,
0.06897593289613724,
-0.0765034481883049,
-0.29085609316825867,
-0.30322790145874023,
-0.04533405601978302,
0.2601591646671295,
-0.27227088809013367,
-0.02400803379714489,
-0.4013134241104126,
0.01165229082107544,
0.19750960171222687,
-0.27471962571144104,
-0.2812996208667755,
-0.1685466170310974,
-0.07561104744672775,
-0.07415927201509476,
0.073114313185215,
-0.13398690521717072,
0.36156314611434937,
0.25213682651519775,
-0.2612817585468292,
-0.24377208948135376,
-0.09511401504278183,
0.006513349711894989,
-0.5370392203330994,
0.2054038941860199,
0.41009241342544556,
0.3981708884239197,
-0.2923850417137146,
0.14706027507781982,
0.279386430978775,
-0.10714296996593475,
-0.24806860089302063,
-0.00790521502494812,
0.022333761677145958,
0.15326252579689026,
-0.17921561002731323,
0.14743101596832275,
0.0644615963101387,
-0.3209299147129059,
0.17818498611450195,
-0.18915896117687225,
0.2615518569946289,
0.21945302188396454,
0.27800777554512024,
0.15385715663433075,
-0.36937758326530457,
-0.4285490810871124,
0.12235129624605179,
-0.14167726039886475,
0.4460204839706421,
0.03902313485741615,
-0.14693112671375275,
0.1844056248664856,
0.026218421757221222,
-0.18531988561153412,
0.2405562698841095,
-0.09668606519699097,
0.09396382421255112,
-0.056274451315402985,
0.12348286807537079,
0.1900063157081604,
0.3668002188205719,
0.4985276460647583,
0.0864880159497261,
0.04604547470808029,
-0.28467217087745667,
-0.1089552789926529,
0.08126379549503326,
0.022276651114225388,
-0.06451382488012314,
0.42252981662750244,
0.3217892050743103,
0.0287003256380558,
0.7504054307937622,
0.3654770255088806,
0.12721385061740875,
0.09464582800865173,
0.07253674417734146,
0.38223594427108765,
-0.11400652676820755,
-0.37969261407852173,
-0.2082245796918869,
0.1538848727941513,
-0.08407792448997498,
0.03251326084136963,
0.05505496263504028,
-0.062034204602241516,
-0.0012856274843215942,
0.061899978667497635,
-0.4879451096057892,
-0.18903684616088867,
0.42400965094566345,
-0.3093627989292145,
0.07615570724010468,
-0.07491466403007507,
0.09561606496572495,
-0.27880963683128357,
-0.18202704191207886,
-0.163715198636055,
-0.30362361669540405,
0.6426759958267212,
-0.0823243111371994,
-0.07537972182035446,
-0.11549800634384155,
-0.6797433495521545,
0.332533597946167,
0.22118018567562103,
-0.08481132984161377,
0.10671699047088623,
-0.18529391288757324,
0.06875752657651901,
0.3100571930408478,
0.9494884610176086,
-0.19327138364315033,
0.15665507316589355,
0.08142608404159546,
-0.0248432457447052,
-0.44353413581848145,
0.09980598092079163,
-0.3279417157173157,
0.25508660078048706,
0.2495431900024414,
0.5071650147438049,
-0.35752564668655396,
-0.07234398275613785,
-0.04205328971147537,
-0.02773205190896988,
0.034722428768873215,
-0.026487112045288086,
-0.17338134348392487,
-0.14954152703285217,
-0.13803279399871826,
0.36458098888397217,
0.446945458650589,
0.07268578559160233,
0.13567019999027252,
-0.20947128534317017,
-0.0988864153623581,
0.048170074820518494,
0.017598874866962433,
-0.13403019309043884,
0.4707481265068054,
0.015833018347620964,
0.05059869959950447,
0.27013641595840454,
0.11173439025878906,
0.22062979638576508,
0.49006325006484985,
-0.1534297615289688,
0.20740744471549988,
-0.1815868616104126,
0.03059045970439911,
0.3123362064361572,
0.4398152828216553,
0.009965001605451107,
0.05791475996375084,
0.3812752068042755,
0.35221797227859497,
-0.051504071801900864,
-0.2942022383213043,
0.12623605132102966,
0.04640406742691994,
-0.5417690277099609,
0.003657648339867592,
0.11587845534086227,
-0.09958258271217346,
0.08497054874897003,
0.6082310676574707,
0.5790848731994629,
-0.36380505561828613,
0.36096566915512085,
0.043292149901390076,
0.8923065066337585,
-0.014892376959323883,
0.10762687027454376,
0.14868056774139404,
0.0709487721323967,
0.24982993304729462,
0.5552586317062378,
0.0943637266755104,
0.008421968668699265,
0.09743781387805939,
-0.040766000747680664,
-0.008215676993131638,
0.16687512397766113,
0.34003758430480957,
0.10278630256652832,
0.27085989713668823,
0.08195677399635315,
0.12089425325393677,
-0.15034636855125427,
-0.2895890474319458,
0.28774580359458923,
-0.33018115162849426,
-0.3449309170246124,
-0.07553870975971222,
0.07857071608304977,
0.26576754450798035,
-0.05793020501732826,
-0.1058482974767685,
-0.030923735350370407,
-0.40376752614974976,
-0.1928453892469406,
-0.18520227074623108,
-0.44498950242996216,
0.021174756810069084,
0.26389288902282715,
-0.2862427532672882,
-0.03285883367061615,
0.05158493295311928,
-0.48061710596084595,
0.14473272860050201,
-0.11111164093017578,
-0.13308390974998474,
0.38927921652793884,
0.17192384600639343,
0.021821947768330574,
-0.15219280123710632,
0.17261749505996704,
0.1998167335987091,
-0.1803189516067505,
0.057553526014089584,
-0.45185956358909607,
-0.17299476265907288,
0.06446637213230133,
0.40836602449417114,
-0.20234115421772003,
-0.22289937734603882,
-0.3968207836151123,
-0.19215920567512512,
0.10154229402542114,
0.03948751464486122,
-0.08833837509155273,
0.2670641541481018,
-0.07576633989810944,
0.3907504677772522,
-0.19200892746448517,
-0.45341914892196655,
-0.04374212399125099,
0.5255666971206665,
0.03463037312030792,
-0.19231882691383362,
0.4125709533691406,
0.15918570756912231,
-0.1644415259361267,
-0.06954294443130493,
0.13838890194892883,
0.34264320135116577,
-0.6278494000434875,
0.5433263778686523,
0.24986962974071503,
0.03699062764644623,
0.13783232867717743,
0.41851022839546204,
0.13686391711235046,
0.27986475825309753,
-0.3155876100063324,
-0.1867188811302185,
-0.2580825090408325,
0.40863823890686035,
0.10354239493608475,
0.035981014370918274,
-0.1420457661151886,
-0.23673973977565765,
0.3288373351097107,
-0.19563071429729462,
-0.15207552909851074,
0.06600530445575714,
-0.08657748997211456,
0.3288321793079376,
0.21843375265598297,
0.26404255628585815,
0.35698312520980835,
-0.08181209862232208,
-0.10281717777252197,
0.13153085112571716,
-0.27935099601745605,
-0.073605477809906,
-0.0467090979218483,
0.17635464668273926,
0.10426033288240433,
-0.22039881348609924,
0.16272330284118652,
-0.40742015838623047,
-0.04600652679800987,
-0.40626609325408936,
0.26194947957992554,
0.490959107875824,
-0.004013814032077789,
-0.23783327639102936,
0.3719468116760254,
0.06007802486419678,
-0.029746809974312782,
0.20644636452198029,
-0.1776881217956543,
-0.0705975592136383,
-0.06777909398078918,
0.30435365438461304,
0.16345958411693573,
0.03375082463026047,
0.0829736590385437,
0.07204768061637878,
0.014261744916439056,
0.0030940547585487366,
0.42278701066970825,
-0.20461107790470123,
-0.21244584023952484,
0.3322131633758545,
0.2543899118900299,
0.018418680876493454,
-0.02085989899933338,
-0.15182942152023315,
0.2098129391670227,
0.006031926721334457,
-0.15236224234104156,
0.028843248263001442,
0.15505151450634003,
0.3418107032775879,
0.2605256140232086,
0.3646138310432434,
-0.16854192316532135,
-0.2591923177242279,
0.017467960715293884,
0.1886158585548401,
0.021103855222463608,
0.03094010427594185,
0.1880583018064499,
0.3906852602958679,
0.33342796564102173,
-0.09894318878650665,
0.3222149908542633,
0.07886938750743866,
0.2825942635536194,
0.29012855887413025,
0.23771032691001892,
0.2660050094127655,
0.013971326872706413,
0.08644550293684006,
-0.20485392212867737,
-0.5083085894584656,
0.03778529912233353,
0.08903393149375916,
-0.0027340054512023926,
0.3360837399959564,
0.12346324324607849,
0.15381187200546265,
-0.19242210686206818,
-0.2750571668148041,
0.04185990244150162,
0.002172861248254776,
-0.34546133875846863,
-0.06183424964547157,
-0.31367623805999756,
-0.25614210963249207,
0.41509339213371277,
-0.16091686487197876,
0.06273752450942993,
-0.34548628330230713,
0.3650219738483429,
-0.07760721445083618,
-0.09537062048912048,
-0.14416520297527313,
-0.3677254915237427,
0.024003352969884872,
0.22925874590873718,
-0.11037912219762802,
0.13786345720291138,
-0.0913228839635849,
-0.04632865637540817,
0.05049194395542145,
0.5798308849334717,
0.511163592338562,
0.3985682725906372,
-0.02461089938879013,
0.4008246660232544,
0.13015742599964142,
-0.24362587928771973,
-0.28619271516799927,
0.36318954825401306,
-0.05952902138233185,
-0.025095298886299133,
0.2001095712184906,
-0.010452114045619965,
-0.04692602902650833,
-0.06305484473705292,
-0.0026355870068073273,
0.10762634873390198,
0.16351468861103058,
-0.19085565209388733,
-0.1974218636751175,
-0.23625344038009644,
-0.26874762773513794,
-0.049194447696208954,
-0.08179516345262527,
0.01605377346277237,
0.2938632369041443,
-0.09964151680469513,
0.046356067061424255,
0.07786117494106293,
-0.001332659274339676,
-0.041519973427057266,
0.25831183791160583,
0.45365941524505615,
0.0035885386168956757,
-0.48415112495422363,
0.17722325026988983,
-0.3718906342983246,
-0.03017307072877884,
-0.4928686022758484,
0.2783651351928711,
0.03891878202557564,
0.1972583681344986,
0.11981698125600815,
-0.12264202535152435,
0.3183072805404663,
-0.05017324537038803,
-0.043834444135427475,
0.3545491695404053,
0.06481362879276276,
-0.27906352281570435,
-0.1928185671567917,
-0.013535479083657265,
0.010153859853744507,
-0.384270578622818,
0.10624651610851288,
-0.11351165175437927,
-0.0753600001335144,
-0.10560978949069977,
0.1699267327785492,
-0.15767164528369904,
0.027592303231358528,
0.17741377651691437,
0.3360167443752289,
-0.041894957423210144,
0.029431849718093872,
-0.017705241218209267,
-0.35040315985679626,
0.14641951024532318,
-0.12648987770080566,
0.13943663239479065,
0.3596007227897644,
0.4612451493740082,
-0.3284626305103302,
-0.20270629227161407,
-0.02407522313296795,
0.042347151786088943,
0.00464441254734993,
0.036161426454782486,
-0.18189294636249542,
0.14358468353748322,
-0.3938451409339905,
-0.03583987429738045,
-0.12207382917404175,
0.022270910441875458,
0.08602289855480194,
0.02708565630018711,
-0.25258761644363403,
-0.3549431264400482,
0.38276439905166626,
-0.6531062126159668,
-0.2620072662830353,
-0.06931997090578079,
0.3420597016811371,
0.2115110158920288,
-0.2256404012441635,
-0.3928539752960205,
-0.17191985249519348,
0.26260146498680115,
-0.06935829669237137,
-0.06165467947721481,
-0.18479059636592865,
-0.5037381052970886,
-0.03442905470728874,
-0.1576237976551056,
0.11528265476226807,
0.03572014719247818,
0.006658462807536125,
0.2311963438987732,
-0.3098658323287964
] |
https://github.com/huggingface/datasets/issues/2644 | Batched `map` not allowed to return 0 items | Yes and it's all good, thank you :)
Feel free to close this issue if it's good for you | ## Describe the bug
I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`.
However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case.
For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs.
## Steps to reproduce the bug
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
# The following line simulates no matches found, so we return an empty batch
result = {'key': []}
return result
filtered_dataset = dataset.map(
select_rows,
remove_columns = dataset.column_names,
batched = True,
num_proc = 1,
desc = "Selecting rows with images that exist"
)
```
The code above immediately triggers the exception. If we use the following instead:
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
result = {'key': []} # or defaultdict or whatever
# code to check for condition and append elements to result
# some_items_found will be set to True if there were any matching elements in the batch
return result if some_items_found else {}
```
Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it.
In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items.
## Expected results
The dataset would be filtered and only the matching fields would be returned.
## Actual results
An exception is encountered, as described. Using a workaround makes it fail further along the line.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 19 | Batched `map` not allowed to return 0 items
## Describe the bug
I'm trying to use `map` to filter a large dataset by selecting rows that match an expensive condition (files referenced by one of the columns need to exist in the filesystem, so we have to `stat` them). According to [the documentation](https://huggingface.co/docs/datasets/processing.html#augmenting-the-dataset), `a batch mapped function can take as input a batch of size N and return a batch of size M where M can be greater or less than N and can even be zero`.
However, when the returned batch has a size of zero (neither item in the batch fulfilled the condition), we get an `index out of bounds` error. I think that `arrow_writer.py` is [trying to infer the returned types using the first element returned](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L100), but no elements were returned in this case.
For this error to happen, I'm returning a dictionary that contains empty lists for the keys I want to keep, see below. If I return an empty dictionary instead (no keys), then a different error eventually occurs.
## Steps to reproduce the bug
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
# The following line simulates no matches found, so we return an empty batch
result = {'key': []}
return result
filtered_dataset = dataset.map(
select_rows,
remove_columns = dataset.column_names,
batched = True,
num_proc = 1,
desc = "Selecting rows with images that exist"
)
```
The code above immediately triggers the exception. If we use the following instead:
```python
def select_rows(examples):
# `key` is a column name that exists in the original dataset
result = {'key': []} # or defaultdict or whatever
# code to check for condition and append elements to result
# some_items_found will be set to True if there were any matching elements in the batch
return result if some_items_found else {}
```
Then it _seems_ to work, but it eventually fails with some sort of schema error. I believe it may happen when an empty batch is followed by a non-empty one, but haven't set up a test to verify it.
In my opinion, returning a dictionary with empty lists and valid column names should be accepted as a valid result with zero items.
## Expected results
The dataset would be filtered and only the matching fields would be returned.
## Actual results
An exception is encountered, as described. Using a workaround makes it fail further along the line.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-53-generic-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
Yes and it's all good, thank you :)
Feel free to close this issue if it's good for you | [
-0.23283571004867554,
-0.3903885781764984,
-0.04445696994662285,
0.16449064016342163,
-0.10854555666446686,
-0.06876929104328156,
0.11633878946304321,
0.4056321978569031,
0.6400423049926758,
0.11788129061460495,
-0.05657234787940979,
0.24608545005321503,
-0.39544111490249634,
0.10435456782579422,
-0.16292166709899902,
0.16080279648303986,
-0.044933222234249115,
0.14057955145835876,
-0.16911719739437103,
-0.19149257242679596,
-0.3362928330898285,
0.16319964826107025,
-0.39792609214782715,
-0.050104111433029175,
-0.14877139031887054,
-0.29197537899017334,
0.2864794433116913,
-0.03620988875627518,
-0.16281409561634064,
-0.2454041987657547,
0.20609132945537567,
-0.23282960057258606,
-0.20913605391979218,
0.5783204436302185,
-0.00012992756091989577,
-0.023137491196393967,
0.15059375762939453,
-0.18518859148025513,
-0.08976078033447266,
-0.30296117067337036,
-0.1908179223537445,
-0.17153027653694153,
-0.11571899056434631,
-0.28246554732322693,
0.1819458305835724,
-0.2716505825519562,
-0.19563539326190948,
-0.4482395052909851,
0.10719674080610275,
0.2587006390094757,
0.04332170635461807,
0.41881802678108215,
0.0030669011175632477,
0.1764482855796814,
0.3312491774559021,
0.2664015591144562,
-0.0753515362739563,
0.12881143391132355,
0.7205767631530762,
-0.2881000339984894,
0.022628337144851685,
0.33858999609947205,
-0.39218443632125854,
0.07090604305267334,
0.13675549626350403,
-0.030903343111276627,
0.23016825318336487,
-0.5515580177307129,
0.2697512209415436,
0.3675670623779297,
-0.0900002047419548,
0.06078575924038887,
-0.4333362579345703,
-0.6687809228897095,
-0.04030340164899826,
-0.09549891948699951,
-0.03889739513397217,
0.2810015380382538,
-0.42103928327560425,
-0.056459683924913406,
-0.48461854457855225,
0.12179434299468994,
0.007894709706306458,
0.1618545651435852,
0.030676499009132385,
0.45895466208457947,
-0.09304071217775345,
0.2003244161605835,
0.3451099097728729,
-0.16183258593082428,
-0.09940237551927567,
-0.16727103292942047,
-0.2236279845237732,
0.5847228765487671,
-0.036699797958135605,
-0.14598754048347473,
0.3893197476863861,
0.21976801753044128,
0.22303572297096252,
-0.3132421374320984,
-0.05030704289674759,
-0.07427571713924408,
0.2646808922290802,
-0.023431487381458282,
0.41594502329826355,
0.0793757289648056,
0.2686937749385834,
0.34931978583335876,
-0.005051732063293457,
-0.05909411981701851,
0.06769010424613953,
0.11316955834627151,
0.11344167590141296,
-0.08908388763666153,
-0.009650817140936852,
-0.07640804350376129,
0.25678545236587524,
-0.07875248044729233,
-0.12189842760562897,
0.23410125076770782,
-0.4100172519683838,
0.13690681755542755,
0.06204803287982941,
0.12508299946784973,
0.17005744576454163,
-0.17767232656478882,
0.1202130913734436,
0.11262907832860947,
-0.15702861547470093,
0.1897115707397461,
-0.07724695652723312,
-0.1316169649362564,
-0.19250144064426422,
-0.32082515954971313,
0.19647885859012604,
-0.33428630232810974,
0.24181696772575378,
-0.1585833579301834,
0.019827812910079956,
-0.06153399869799614,
0.09574074298143387,
-0.26456236839294434,
0.7512259483337402,
0.49378809332847595,
-0.11951078474521637,
0.2913576364517212,
0.3966234624385834,
-0.2185577154159546,
-0.17528337240219116,
0.4062905013561249,
-0.3826132118701935,
-0.2777351438999176,
0.21004116535186768,
-0.040186598896980286,
-0.23807570338249207,
0.3465711772441864,
-0.5073066353797913,
0.2185843586921692,
0.17824572324752808,
0.08225111663341522,
0.2914721667766571,
-0.2697463631629944,
-0.10539513826370239,
-0.23601150512695312,
0.04256308823823929,
0.6938400864601135,
-0.6387714743614197,
-0.049924351274967194,
0.11019014567136765,
0.10137894749641418,
-0.061366014182567596,
0.34788036346435547,
-0.04546039178967476,
0.34811022877693176,
-0.4107355773448944,
0.30598658323287964,
0.08731269836425781,
-0.12647072970867157,
-0.32756295800209045,
0.313419908285141,
-0.035814493894577026,
0.23563890159130096,
-0.021055027842521667,
-0.0642477422952652,
0.5519369840621948,
-0.18738888204097748,
0.3676513135433197,
-0.17005832493305206,
-0.279957115650177,
0.10416298359632492,
-0.05038165673613548,
-0.03984452039003372,
0.06037992984056473,
-0.24208195507526398,
0.19492442905902863,
0.01658736914396286,
0.03907826170325279,
-0.5488616228103638,
0.1286391019821167,
-0.15087857842445374,
0.33836275339126587,
0.2401699721813202,
0.26210886240005493,
0.1233314499258995,
0.0182515736669302,
-0.25635242462158203,
-0.47136205434799194,
0.30017632246017456,
-0.48803383111953735,
0.021247990429401398,
-0.433834433555603,
-0.10330353677272797,
0.03096431866288185,
0.18347382545471191,
-0.03501986339688301,
0.03309561684727669,
-0.07492087781429291,
-0.49758055806159973,
0.1765720695257187,
-0.021343614906072617,
-0.2262362688779831,
-0.23706969618797302,
-0.13586565852165222,
-0.008439034223556519,
-0.35672318935394287,
0.07136140018701553,
0.2501074969768524,
-0.2921583354473114,
-0.2542048990726471,
0.24662992358207703,
0.1149318516254425,
-0.11761096864938736,
0.11735381931066513,
0.17585280537605286,
-0.03481536731123924,
-0.1673574596643448,
-0.14001286029815674,
0.13125267624855042,
0.011728176847100258,
-0.045801110565662384,
0.10183678567409515,
0.14501364529132843,
0.3444770574569702,
-0.23784318566322327,
-0.06940644234418869,
0.5054202675819397,
-0.18761567771434784,
0.5359300971031189,
-0.17968614399433136,
0.05123795568943024,
-0.19963207840919495,
0.04260646924376488,
-0.20592130720615387,
-0.38505059480667114,
0.07628369331359863,
-0.15773656964302063,
0.05133714899420738,
0.031914614140987396,
0.001256503164768219,
-0.19892141222953796,
0.08561684191226959,
-0.046961963176727295,
0.16477924585342407,
0.014488227665424347,
-0.06305212527513504,
0.22669023275375366,
0.044692281633615494,
-0.014278262853622437,
0.3432701528072357,
0.21914228796958923,
-0.0887264758348465,
-0.15218167006969452,
0.250440388917923,
0.00012227147817611694,
0.4139186143875122,
0.18166814744472504,
0.026053600013256073,
0.15500998497009277,
-0.003640607465058565,
-0.06572043895721436,
-0.2528342604637146,
-0.18143008649349213,
0.005715254694223404,
0.14953403174877167,
-0.3952977955341339,
-0.03541942685842514,
0.11011520028114319,
-0.1585041582584381,
0.06897593289613724,
-0.0765034481883049,
-0.29085609316825867,
-0.30322790145874023,
-0.04533405601978302,
0.2601591646671295,
-0.27227088809013367,
-0.02400803379714489,
-0.4013134241104126,
0.01165229082107544,
0.19750960171222687,
-0.27471962571144104,
-0.2812996208667755,
-0.1685466170310974,
-0.07561104744672775,
-0.07415927201509476,
0.073114313185215,
-0.13398690521717072,
0.36156314611434937,
0.25213682651519775,
-0.2612817585468292,
-0.24377208948135376,
-0.09511401504278183,
0.006513349711894989,
-0.5370392203330994,
0.2054038941860199,
0.41009241342544556,
0.3981708884239197,
-0.2923850417137146,
0.14706027507781982,
0.279386430978775,
-0.10714296996593475,
-0.24806860089302063,
-0.00790521502494812,
0.022333761677145958,
0.15326252579689026,
-0.17921561002731323,
0.14743101596832275,
0.0644615963101387,
-0.3209299147129059,
0.17818498611450195,
-0.18915896117687225,
0.2615518569946289,
0.21945302188396454,
0.27800777554512024,
0.15385715663433075,
-0.36937758326530457,
-0.4285490810871124,
0.12235129624605179,
-0.14167726039886475,
0.4460204839706421,
0.03902313485741615,
-0.14693112671375275,
0.1844056248664856,
0.026218421757221222,
-0.18531988561153412,
0.2405562698841095,
-0.09668606519699097,
0.09396382421255112,
-0.056274451315402985,
0.12348286807537079,
0.1900063157081604,
0.3668002188205719,
0.4985276460647583,
0.0864880159497261,
0.04604547470808029,
-0.28467217087745667,
-0.1089552789926529,
0.08126379549503326,
0.022276651114225388,
-0.06451382488012314,
0.42252981662750244,
0.3217892050743103,
0.0287003256380558,
0.7504054307937622,
0.3654770255088806,
0.12721385061740875,
0.09464582800865173,
0.07253674417734146,
0.38223594427108765,
-0.11400652676820755,
-0.37969261407852173,
-0.2082245796918869,
0.1538848727941513,
-0.08407792448997498,
0.03251326084136963,
0.05505496263504028,
-0.062034204602241516,
-0.0012856274843215942,
0.061899978667497635,
-0.4879451096057892,
-0.18903684616088867,
0.42400965094566345,
-0.3093627989292145,
0.07615570724010468,
-0.07491466403007507,
0.09561606496572495,
-0.27880963683128357,
-0.18202704191207886,
-0.163715198636055,
-0.30362361669540405,
0.6426759958267212,
-0.0823243111371994,
-0.07537972182035446,
-0.11549800634384155,
-0.6797433495521545,
0.332533597946167,
0.22118018567562103,
-0.08481132984161377,
0.10671699047088623,
-0.18529391288757324,
0.06875752657651901,
0.3100571930408478,
0.9494884610176086,
-0.19327138364315033,
0.15665507316589355,
0.08142608404159546,
-0.0248432457447052,
-0.44353413581848145,
0.09980598092079163,
-0.3279417157173157,
0.25508660078048706,
0.2495431900024414,
0.5071650147438049,
-0.35752564668655396,
-0.07234398275613785,
-0.04205328971147537,
-0.02773205190896988,
0.034722428768873215,
-0.026487112045288086,
-0.17338134348392487,
-0.14954152703285217,
-0.13803279399871826,
0.36458098888397217,
0.446945458650589,
0.07268578559160233,
0.13567019999027252,
-0.20947128534317017,
-0.0988864153623581,
0.048170074820518494,
0.017598874866962433,
-0.13403019309043884,
0.4707481265068054,
0.015833018347620964,
0.05059869959950447,
0.27013641595840454,
0.11173439025878906,
0.22062979638576508,
0.49006325006484985,
-0.1534297615289688,
0.20740744471549988,
-0.1815868616104126,
0.03059045970439911,
0.3123362064361572,
0.4398152828216553,
0.009965001605451107,
0.05791475996375084,
0.3812752068042755,
0.35221797227859497,
-0.051504071801900864,
-0.2942022383213043,
0.12623605132102966,
0.04640406742691994,
-0.5417690277099609,
0.003657648339867592,
0.11587845534086227,
-0.09958258271217346,
0.08497054874897003,
0.6082310676574707,
0.5790848731994629,
-0.36380505561828613,
0.36096566915512085,
0.043292149901390076,
0.8923065066337585,
-0.014892376959323883,
0.10762687027454376,
0.14868056774139404,
0.0709487721323967,
0.24982993304729462,
0.5552586317062378,
0.0943637266755104,
0.008421968668699265,
0.09743781387805939,
-0.040766000747680664,
-0.008215676993131638,
0.16687512397766113,
0.34003758430480957,
0.10278630256652832,
0.27085989713668823,
0.08195677399635315,
0.12089425325393677,
-0.15034636855125427,
-0.2895890474319458,
0.28774580359458923,
-0.33018115162849426,
-0.3449309170246124,
-0.07553870975971222,
0.07857071608304977,
0.26576754450798035,
-0.05793020501732826,
-0.1058482974767685,
-0.030923735350370407,
-0.40376752614974976,
-0.1928453892469406,
-0.18520227074623108,
-0.44498950242996216,
0.021174756810069084,
0.26389288902282715,
-0.2862427532672882,
-0.03285883367061615,
0.05158493295311928,
-0.48061710596084595,
0.14473272860050201,
-0.11111164093017578,
-0.13308390974998474,
0.38927921652793884,
0.17192384600639343,
0.021821947768330574,
-0.15219280123710632,
0.17261749505996704,
0.1998167335987091,
-0.1803189516067505,
0.057553526014089584,
-0.45185956358909607,
-0.17299476265907288,
0.06446637213230133,
0.40836602449417114,
-0.20234115421772003,
-0.22289937734603882,
-0.3968207836151123,
-0.19215920567512512,
0.10154229402542114,
0.03948751464486122,
-0.08833837509155273,
0.2670641541481018,
-0.07576633989810944,
0.3907504677772522,
-0.19200892746448517,
-0.45341914892196655,
-0.04374212399125099,
0.5255666971206665,
0.03463037312030792,
-0.19231882691383362,
0.4125709533691406,
0.15918570756912231,
-0.1644415259361267,
-0.06954294443130493,
0.13838890194892883,
0.34264320135116577,
-0.6278494000434875,
0.5433263778686523,
0.24986962974071503,
0.03699062764644623,
0.13783232867717743,
0.41851022839546204,
0.13686391711235046,
0.27986475825309753,
-0.3155876100063324,
-0.1867188811302185,
-0.2580825090408325,
0.40863823890686035,
0.10354239493608475,
0.035981014370918274,
-0.1420457661151886,
-0.23673973977565765,
0.3288373351097107,
-0.19563071429729462,
-0.15207552909851074,
0.06600530445575714,
-0.08657748997211456,
0.3288321793079376,
0.21843375265598297,
0.26404255628585815,
0.35698312520980835,
-0.08181209862232208,
-0.10281717777252197,
0.13153085112571716,
-0.27935099601745605,
-0.073605477809906,
-0.0467090979218483,
0.17635464668273926,
0.10426033288240433,
-0.22039881348609924,
0.16272330284118652,
-0.40742015838623047,
-0.04600652679800987,
-0.40626609325408936,
0.26194947957992554,
0.490959107875824,
-0.004013814032077789,
-0.23783327639102936,
0.3719468116760254,
0.06007802486419678,
-0.029746809974312782,
0.20644636452198029,
-0.1776881217956543,
-0.0705975592136383,
-0.06777909398078918,
0.30435365438461304,
0.16345958411693573,
0.03375082463026047,
0.0829736590385437,
0.07204768061637878,
0.014261744916439056,
0.0030940547585487366,
0.42278701066970825,
-0.20461107790470123,
-0.21244584023952484,
0.3322131633758545,
0.2543899118900299,
0.018418680876493454,
-0.02085989899933338,
-0.15182942152023315,
0.2098129391670227,
0.006031926721334457,
-0.15236224234104156,
0.028843248263001442,
0.15505151450634003,
0.3418107032775879,
0.2605256140232086,
0.3646138310432434,
-0.16854192316532135,
-0.2591923177242279,
0.017467960715293884,
0.1886158585548401,
0.021103855222463608,
0.03094010427594185,
0.1880583018064499,
0.3906852602958679,
0.33342796564102173,
-0.09894318878650665,
0.3222149908542633,
0.07886938750743866,
0.2825942635536194,
0.29012855887413025,
0.23771032691001892,
0.2660050094127655,
0.013971326872706413,
0.08644550293684006,
-0.20485392212867737,
-0.5083085894584656,
0.03778529912233353,
0.08903393149375916,
-0.0027340054512023926,
0.3360837399959564,
0.12346324324607849,
0.15381187200546265,
-0.19242210686206818,
-0.2750571668148041,
0.04185990244150162,
0.002172861248254776,
-0.34546133875846863,
-0.06183424964547157,
-0.31367623805999756,
-0.25614210963249207,
0.41509339213371277,
-0.16091686487197876,
0.06273752450942993,
-0.34548628330230713,
0.3650219738483429,
-0.07760721445083618,
-0.09537062048912048,
-0.14416520297527313,
-0.3677254915237427,
0.024003352969884872,
0.22925874590873718,
-0.11037912219762802,
0.13786345720291138,
-0.0913228839635849,
-0.04632865637540817,
0.05049194395542145,
0.5798308849334717,
0.511163592338562,
0.3985682725906372,
-0.02461089938879013,
0.4008246660232544,
0.13015742599964142,
-0.24362587928771973,
-0.28619271516799927,
0.36318954825401306,
-0.05952902138233185,
-0.025095298886299133,
0.2001095712184906,
-0.010452114045619965,
-0.04692602902650833,
-0.06305484473705292,
-0.0026355870068073273,
0.10762634873390198,
0.16351468861103058,
-0.19085565209388733,
-0.1974218636751175,
-0.23625344038009644,
-0.26874762773513794,
-0.049194447696208954,
-0.08179516345262527,
0.01605377346277237,
0.2938632369041443,
-0.09964151680469513,
0.046356067061424255,
0.07786117494106293,
-0.001332659274339676,
-0.041519973427057266,
0.25831183791160583,
0.45365941524505615,
0.0035885386168956757,
-0.48415112495422363,
0.17722325026988983,
-0.3718906342983246,
-0.03017307072877884,
-0.4928686022758484,
0.2783651351928711,
0.03891878202557564,
0.1972583681344986,
0.11981698125600815,
-0.12264202535152435,
0.3183072805404663,
-0.05017324537038803,
-0.043834444135427475,
0.3545491695404053,
0.06481362879276276,
-0.27906352281570435,
-0.1928185671567917,
-0.013535479083657265,
0.010153859853744507,
-0.384270578622818,
0.10624651610851288,
-0.11351165175437927,
-0.0753600001335144,
-0.10560978949069977,
0.1699267327785492,
-0.15767164528369904,
0.027592303231358528,
0.17741377651691437,
0.3360167443752289,
-0.041894957423210144,
0.029431849718093872,
-0.017705241218209267,
-0.35040315985679626,
0.14641951024532318,
-0.12648987770080566,
0.13943663239479065,
0.3596007227897644,
0.4612451493740082,
-0.3284626305103302,
-0.20270629227161407,
-0.02407522313296795,
0.042347151786088943,
0.00464441254734993,
0.036161426454782486,
-0.18189294636249542,
0.14358468353748322,
-0.3938451409339905,
-0.03583987429738045,
-0.12207382917404175,
0.022270910441875458,
0.08602289855480194,
0.02708565630018711,
-0.25258761644363403,
-0.3549431264400482,
0.38276439905166626,
-0.6531062126159668,
-0.2620072662830353,
-0.06931997090578079,
0.3420597016811371,
0.2115110158920288,
-0.2256404012441635,
-0.3928539752960205,
-0.17191985249519348,
0.26260146498680115,
-0.06935829669237137,
-0.06165467947721481,
-0.18479059636592865,
-0.5037381052970886,
-0.03442905470728874,
-0.1576237976551056,
0.11528265476226807,
0.03572014719247818,
0.006658462807536125,
0.2311963438987732,
-0.3098658323287964
] |
https://github.com/huggingface/datasets/issues/2643 | Enum used in map functions will raise a RecursionError with dill. | I'm running into this as well. (Thank you so much for reporting @jorgeecardona — was staring at this massive stack trace and unsure what exactly was wrong!) | ## Describe the bug
Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from enum import Enum
class A(Enum):
a = 'a'
def main():
a = A.a
def f(x):
return {} if a == a.a else x
ds = load_dataset('cnn_dailymail', '3.0.0')['test']
ds = ds.map(f, num_proc=15)
if __name__ == "__main__":
main()
```
## Expected results
The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood.
## Actual results
```python
File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type
pickler.save_reduce(_create_type, (type(obj), obj.__name__,
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce
save(args)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save
f(self, obj) # Call unbound method with explicit self
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple
save(element)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save
self.framer.commit_frame()
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame
if f.tell() >= self._FRAME_SIZE_TARGET or force:
RecursionError: maximum recursion depth exceeded while calling a Python object
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 3.0.0
| 27 | Enum used in map functions will raise a RecursionError with dill.
## Describe the bug
Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from enum import Enum
class A(Enum):
a = 'a'
def main():
a = A.a
def f(x):
return {} if a == a.a else x
ds = load_dataset('cnn_dailymail', '3.0.0')['test']
ds = ds.map(f, num_proc=15)
if __name__ == "__main__":
main()
```
## Expected results
The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood.
## Actual results
```python
File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type
pickler.save_reduce(_create_type, (type(obj), obj.__name__,
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce
save(args)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save
f(self, obj) # Call unbound method with explicit self
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple
save(element)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save
self.framer.commit_frame()
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame
if f.tell() >= self._FRAME_SIZE_TARGET or force:
RecursionError: maximum recursion depth exceeded while calling a Python object
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 3.0.0
I'm running into this as well. (Thank you so much for reporting @jorgeecardona — was staring at this massive stack trace and unsure what exactly was wrong!) | [
0.10535983741283417,
0.19925466179847717,
0.04053230956196785,
0.14069963991641998,
-0.07437218725681305,
-0.07834335416555405,
0.14776058495044708,
0.2337798774242401,
0.12631802260875702,
0.1690645068883896,
0.1453322470188141,
0.9332165122032166,
-0.290869802236557,
-0.3072974681854248,
-0.07833743840456009,
0.0934455618262291,
0.02236761897802353,
0.04552217200398445,
-0.6181145906448364,
-0.24567852914333344,
-0.337514728307724,
-0.005241416394710541,
-0.10244697332382202,
-0.010088026523590088,
-0.21160192787647247,
0.22399954497814178,
0.0477658286690712,
0.4010360538959503,
0.08411349356174469,
-0.2200673222541809,
0.3333727717399597,
-0.07344925403594971,
0.19746242463588715,
0.3142176866531372,
-0.0001113916514441371,
0.08502468466758728,
0.1187557578086853,
-0.22744080424308777,
-0.36546480655670166,
-0.23953430354595184,
0.14749127626419067,
0.12261885404586792,
0.07264339923858643,
-0.41547590494155884,
0.22263628244400024,
0.37532082200050354,
-0.002573469653725624,
-0.2636489272117615,
-0.062162697315216064,
0.054368745535612106,
0.17183679342269897,
-0.13968050479888916,
0.2170407921075821,
0.07615981996059418,
0.4435100257396698,
-0.01828625053167343,
0.04481564462184906,
0.5206546783447266,
0.16535967588424683,
-0.3055949807167053,
-0.16434773802757263,
0.17223668098449707,
-0.09769639372825623,
-0.025411482900381088,
0.3883342742919922,
-0.11360835283994675,
0.6294151544570923,
-0.028846167027950287,
-0.1640150547027588,
0.22220289707183838,
-0.1290316879749298,
-0.28409630060195923,
-0.22954757511615753,
0.04017193615436554,
-0.07943809777498245,
-0.10172327607870102,
0.30878597497940063,
-0.01802716590464115,
-0.013356110081076622,
-0.07756055891513824,
0.12407079339027405,
-0.21598930656909943,
0.005677178502082825,
0.4278796911239624,
-0.16410410404205322,
0.5943021774291992,
0.13781261444091797,
0.16610467433929443,
0.2780689597129822,
-0.16848191618919373,
-0.19653727114200592,
0.11785159260034561,
0.10200582444667816,
0.09503304213285446,
-0.22087325155735016,
-0.09397956728935242,
0.28465789556503296,
-0.3601532280445099,
0.33536189794540405,
-0.15426065027713776,
0.014315841719508171,
0.1036648079752922,
-0.06858712434768677,
0.33369120955467224,
0.3899118900299072,
-0.1418338567018509,
-0.051656924188137054,
0.5599203705787659,
0.215542733669281,
-0.11224327981472015,
0.0307021327316761,
0.3607041537761688,
0.06001216173171997,
0.09190604090690613,
-0.008360665291547775,
-0.11108801513910294,
0.011288341134786606,
-0.09541095793247223,
-0.10620409995317459,
0.41727885603904724,
-0.4747130274772644,
-0.11361294239759445,
0.13495472073554993,
0.12400273978710175,
-0.10585067421197891,
0.02118634432554245,
0.13413619995117188,
0.08970116078853607,
-0.05256522446870804,
0.4216708242893219,
-0.21100789308547974,
-0.006028899922966957,
0.02341986820101738,
-0.21311503648757935,
-0.1768057942390442,
0.05482609570026398,
0.26328903436660767,
0.07132721692323685,
0.13230042159557343,
-0.02237415499985218,
0.08259247243404388,
-0.22468529641628265,
0.17830631136894226,
0.10253123193979263,
-0.5080524682998657,
-0.083213210105896,
0.25300344824790955,
-0.26041197776794434,
-0.2579997777938843,
0.2515305280685425,
-0.4531785249710083,
-0.09232734888792038,
-0.37195321917533875,
0.2141513079404831,
0.1512593775987625,
0.1420765221118927,
0.14658355712890625,
-0.1181599497795105,
0.30299049615859985,
-0.13724519312381744,
0.15522944927215576,
-0.41854965686798096,
-0.3111720383167267,
-0.24511149525642395,
0.07526508718729019,
-0.030983880162239075,
-0.0723969116806984,
-0.20129230618476868,
-0.2666208744049072,
0.15930351614952087,
0.175673708319664,
-0.04904034361243248,
-0.18482017517089844,
-0.14143818616867065,
-0.2404552698135376,
0.2867944836616516,
-0.10298991948366165,
-0.12635193765163422,
-0.36463478207588196,
-0.06305641680955887,
-0.05214627832174301,
0.1691659390926361,
-0.25418567657470703,
-0.16374415159225464,
0.20213721692562103,
-0.2736368477344513,
0.520444929599762,
0.17516902089118958,
0.11386439204216003,
-0.014207394793629646,
-0.32020366191864014,
-0.11339595168828964,
0.3278876543045044,
0.12095259130001068,
-0.1715003103017807,
-0.092616505920887,
-0.2653788626194,
-0.19638223946094513,
0.3977234959602356,
-0.26984313130378723,
0.0405845120549202,
0.13115856051445007,
0.10833801329135895,
0.08826552331447601,
0.06282962113618851,
-0.1535959541797638,
-0.3434663712978363,
0.19828984141349792,
-0.2558770775794983,
-0.02150668203830719,
0.016487255692481995,
-0.10047435015439987,
0.09639676660299301,
0.2580534815788269,
-0.0351017601788044,
-0.09730835258960724,
0.18913781642913818,
0.09944033622741699,
-0.10807277262210846,
-0.02163783833384514,
-0.00038608163595199585,
-0.3291845917701721,
-0.4009256362915039,
-0.029438313096761703,
0.05246305093169212,
0.30230405926704407,
-0.23050902783870697,
-0.23220668733119965,
-0.20589123666286469,
0.1653580218553543,
-0.09189973026514053,
0.003567565931007266,
-0.2516867518424988,
0.029070118442177773,
0.3874913454055786,
-0.5933535099029541,
-0.28054073452949524,
-0.05451805889606476,
-0.11675303429365158,
-0.2748851776123047,
0.036842361092567444,
0.46847280859947205,
0.1454920768737793,
-0.2771620452404022,
0.24590075016021729,
0.17548538744449615,
0.175849050283432,
0.12285947054624557,
0.06971694529056549,
0.22729627788066864,
-0.19982634484767914,
-0.11351636797189713,
-0.029024286195635796,
-0.373683363199234,
-0.101966992020607,
0.09346914291381836,
0.034510280936956406,
0.11486131697893143,
-0.038851428776979446,
-0.25294438004493713,
0.16791608929634094,
0.24728327989578247,
0.2872362732887268,
0.26803842186927795,
-0.14141106605529785,
0.08006981760263443,
0.1683729887008667,
0.05610932782292366,
0.11422796547412872,
-0.0879766121506691,
0.09766986966133118,
0.1423887461423874,
-0.11716901510953903,
0.11365246772766113,
-0.07366744428873062,
0.0754610002040863,
0.3981691598892212,
0.14574028551578522,
-0.060011282563209534,
0.04964800179004669,
-0.04125625640153885,
-0.2883341908454895,
-0.0536869615316391,
0.10212989151477814,
-0.06844025105237961,
0.07459206134080887,
-0.4567013084888458,
0.4747103154659271,
0.1333305984735489,
-0.5235565900802612,
-0.24588710069656372,
-0.2118293195962906,
-0.17015503346920013,
0.12948134541511536,
-0.5239447951316833,
0.21116356551647186,
-0.1791202276945114,
-0.4466729164123535,
0.19966557621955872,
-0.34406277537345886,
0.28589943051338196,
-0.32105809450149536,
-0.29670408368110657,
-0.023546896874904633,
0.1581539511680603,
-0.17905980348587036,
0.03748956322669983,
0.26271501183509827,
-0.3319728374481201,
0.03557746112346649,
-0.20127084851264954,
0.14697611331939697,
0.032461777329444885,
0.17112791538238525,
0.2742409110069275,
0.09315648674964905,
-0.4386814832687378,
-0.42289865016937256,
0.13251635432243347,
0.13393573462963104,
-0.058665551245212555,
0.060103751718997955,
0.2963470220565796,
0.27226829528808594,
-0.22220076620578766,
-0.3065890669822693,
-0.1973074972629547,
-0.38459891080856323,
-0.20849917829036713,
0.07037974894046783,
0.45469337701797485,
0.27421635389328003,
-0.016064466908574104,
0.4758409261703491,
0.3324284851551056,
0.3127489387989044,
-0.3234799802303314,
0.3757650852203369,
0.20174923539161682,
-0.16261015832424164,
-0.2093159556388855,
-0.16371816396713257,
-0.54200679063797,
0.08442670851945877,
0.11821456998586655,
-0.5454445481300354,
-0.20521092414855957,
0.1891743540763855,
0.07230938971042633,
-0.24910065531730652,
-0.19578085839748383,
0.1190050020813942,
0.22331896424293518,
0.06280981749296188,
-0.0219537615776062,
-0.27260127663612366,
0.22372198104858398,
0.2733665704727173,
0.15183904767036438,
0.17838716506958008,
-0.010950963944196701,
-0.043243519961833954,
0.3684883117675781,
0.34897327423095703,
-0.02533074840903282,
0.41160085797309875,
0.35298770666122437,
-0.08654987812042236,
0.04252200573682785,
0.036325372755527496,
0.11212003231048584,
0.03950551152229309,
-0.08969477564096451,
0.13299408555030823,
-0.14528772234916687,
-0.662301778793335,
0.03204943984746933,
0.14800913631916046,
0.30373063683509827,
-0.492302268743515,
0.2677827775478363,
-0.39397624135017395,
0.05314468592405319,
-0.3042105734348297,
0.2357541024684906,
0.124234139919281,
0.22633731365203857,
0.1090451329946518,
-0.09142482280731201,
0.1903570294380188,
-0.11923661082983017,
-0.0924871638417244,
-0.16503724455833435,
-0.006722837686538696,
0.11854085326194763,
0.33537614345550537,
0.37176546454429626,
-0.04535840451717377,
-0.37601354718208313,
-0.12439592182636261,
-0.10633192956447601,
0.40101051330566406,
-0.348197877407074,
0.07695681601762772,
0.41222652792930603,
-0.2628348469734192,
-0.28996071219444275,
-0.13580623269081116,
0.07485605776309967,
0.04181502014398575,
0.3262105882167816,
-0.12380996346473694,
-0.49230366945266724,
0.11857856810092926,
0.4219985902309418,
0.008125515654683113,
0.11812444031238556,
-0.003884495235979557,
-0.058898668736219406,
-0.18780335783958435,
-0.29514992237091064,
-0.011557944118976593,
-0.1458284556865692,
0.12250459939241409,
0.2150280624628067,
-0.01799980364739895,
-0.11493135988712311,
0.10041720420122147,
-0.08380316197872162,
-0.16687768697738647,
0.28626149892807007,
-0.12395133078098297,
0.15847167372703552,
0.1450277864933014,
0.3025130331516266,
0.27380743622779846,
0.3276349604129791,
-0.33748048543930054,
0.19927158951759338,
0.29324638843536377,
0.22560028731822968,
0.17617611587047577,
0.05524693429470062,
0.20080243051052094,
0.15379349887371063,
0.010555675253272057,
-0.1905154436826706,
-0.17882534861564636,
-0.3223811686038971,
0.08727885037660599,
0.050028931349515915,
-0.1219283863902092,
-0.38156768679618835,
0.06622358411550522,
0.16936972737312317,
-0.01104668527841568,
0.06162590533494949,
-0.36573535203933716,
-0.010244548320770264,
0.49813389778137207,
0.35206732153892517,
0.871096670627594,
0.2196195423603058,
-0.04610629007220268,
0.09723149240016937,
-0.026318447664380074,
-0.22970490157604218,
0.3024888038635254,
-0.18043233454227448,
-0.298661470413208,
0.004067772999405861,
-0.07449685782194138,
-0.12460903823375702,
-0.021565482020378113,
-0.015255473554134369,
-0.39489826560020447,
0.023444125428795815,
-0.1997496634721756,
0.04196631908416748,
0.02823679894208908,
-0.052602630108594894,
-0.060700803995132446,
-0.10948339104652405,
0.2939586341381073,
0.16086900234222412,
0.09298714995384216,
0.07982431352138519,
-0.06561333686113358,
-0.09195239096879959,
-0.24051132798194885,
-0.38050997257232666,
-0.15403702855110168,
0.1441749930381775,
-0.11376595497131348,
0.44629204273223877,
0.3543669581413269,
-0.28590482473373413,
0.13251599669456482,
0.3625553250312805,
-0.267566442489624,
0.12171065807342529,
-0.06499583274126053,
-0.02340785413980484,
0.04192598536610603,
0.19903460144996643,
0.25699111819267273,
-0.06536507606506348,
0.532714307308197,
-0.008403491228818893,
-0.23212316632270813,
0.14574354887008667,
-0.09407813847064972,
-0.2741774916648865,
-0.0868036299943924,
0.30605798959732056,
0.31087416410446167,
-0.01821853220462799,
0.05569498613476753,
-0.057049721479415894,
-0.17519408464431763,
-0.17226311564445496,
0.14878110587596893,
0.19785133004188538,
-0.1734820008277893,
0.25131627917289734,
0.0907394140958786,
-0.21897083520889282,
-0.08010654151439667,
0.4010274410247803,
0.40486404299736023,
0.5142780542373657,
0.31335657835006714,
-0.06605400145053864,
-0.11954376846551895,
-0.15255028009414673,
-0.3521782457828522,
-0.35391688346862793,
0.2396394908428192,
0.20173212885856628,
0.018483398482203484,
-0.14710870385169983,
-0.33260563015937805,
-0.09506687521934509,
0.08194142580032349,
0.2781376838684082,
-0.40852344036102295,
-0.2797383666038513,
-0.3357236683368683,
0.09742622822523117,
-0.12044684588909149,
0.21470920741558075,
-0.25884610414505005,
-0.037535764276981354,
-0.31563735008239746,
0.2042561173439026,
-0.321906179189682,
0.038184650242328644,
-0.3997882008552551,
0.17228057980537415,
-0.14830660820007324,
-0.2481517791748047,
0.018231254070997238,
0.030766062438488007,
0.16738727688789368,
0.2304181009531021,
-0.28738996386528015,
-0.1121997982263565,
-0.2405651956796646,
0.0865456834435463,
0.14103926718235016,
-0.13691487908363342,
0.13077551126480103,
-0.16638155281543732,
0.07748997211456299,
-0.18978747725486755,
0.032598212361335754,
-0.15484613180160522,
-0.11857165396213531,
0.36417728662490845,
0.19780729711055756,
0.15579891204833984,
0.18834377825260162,
0.265674889087677,
-0.1431952267885208,
0.28395622968673706,
-0.15872040390968323,
0.013291515409946442,
-0.22597049176692963,
-0.08386331796646118,
-0.08421744406223297,
0.07267589867115021,
-0.21821118891239166,
-0.23917865753173828,
0.2639336884021759,
-0.015074923634529114,
-0.1912013590335846,
-0.08650648593902588,
0.17252548038959503,
0.20492766797542572,
-0.3796466886997223,
-0.15305902063846588,
0.5407615900039673,
0.2050435096025467,
-0.004619846120476723,
-0.03410511836409569,
0.5727962851524353,
-0.09246158599853516,
0.23166051506996155,
0.3061138093471527,
-0.15375696122646332,
-0.18797588348388672,
-0.1503075361251831,
-0.01179868821054697,
-0.3474121689796448,
0.05281338840723038,
0.2156006544828415,
0.4500194489955902,
-0.19076023995876312,
0.15370409190654755,
0.15344294905662537,
-0.13423503935337067,
0.5434716939926147,
0.014411259442567825,
0.13494549691677094,
0.15740811824798584,
-0.001568485051393509,
0.04443780705332756,
0.37951573729515076,
-0.48997101187705994,
0.4982146620750427,
0.6172643899917603,
0.23855946958065033,
0.3534955382347107,
0.11364445090293884,
0.17976820468902588,
-0.18039895594120026,
0.031092924997210503,
-0.16140884160995483,
0.20594266057014465,
-0.34705379605293274,
-0.01827419549226761,
-0.01757039502263069,
-0.12879693508148193,
0.002571292221546173,
0.031799253076314926,
-0.03310741111636162,
-0.1463281810283661,
0.22259244322776794,
0.1030735969543457,
-0.2522370219230652,
-0.36131569743156433,
-0.029379405081272125,
-0.19579389691352844,
0.019742347300052643,
-0.22029906511306763,
-0.05942893773317337,
0.12754860520362854,
0.13945737481117249,
-0.3628344237804413,
0.12339890003204346,
0.20217837393283844,
0.5606963038444519,
-0.45155805349349976,
-0.2535938620567322,
0.29515257477760315,
0.08716588467359543,
-0.29883283376693726,
0.169747456908226,
-0.2322254180908203,
-0.17149415612220764,
0.44228729605674744,
0.07521603256464005,
-0.24496343731880188,
-0.1833673119544983,
0.1342611461877823,
0.49244269728660583,
0.26432955265045166,
0.0972134917974472,
0.21301312744617462,
0.20477953553199768,
0.16330792009830475,
-0.2080276608467102,
-0.2605634927749634,
-0.15556694567203522,
0.1988859474658966,
-0.006320272572338581,
0.3195679783821106,
0.07287776470184326,
0.09287793934345245,
-0.04253533110022545,
0.23829567432403564,
0.21525661647319794,
0.17456841468811035,
-0.046425461769104004,
-0.08781637251377106,
-0.2692611813545227,
0.35070282220840454,
-0.13880151510238647,
-0.20813335478305817,
0.30596011877059937,
-0.011172356083989143,
0.06573615968227386,
0.15030983090400696,
-0.11548617482185364,
-0.20898696780204773,
0.16076287627220154,
0.44860997796058655,
-0.2906099557876587,
-0.18499219417572021,
-0.10596266388893127,
-0.15106749534606934,
0.2687523663043976,
-0.540983259677887,
0.13426315784454346,
0.14736442267894745,
0.07054398953914642,
-0.23181729018688202,
0.014068938791751862,
-0.011605663225054741,
0.3986550271511078,
0.425405353307724,
0.11474393308162689,
0.4639260172843933,
-0.19395551085472107,
-0.10574523359537125,
0.20565836131572723,
0.015728456899523735,
-0.021350791677832603,
-0.1691848337650299,
-0.11767910420894623,
0.3652643859386444,
-0.08496995270252228,
-0.23371346294879913,
-0.12840372323989868,
0.5321088433265686,
-0.10693158209323883,
-0.18596908450126648,
-0.16029754281044006,
0.31231576204299927,
-0.01321389526128769,
0.023958710953593254,
-0.4056386947631836,
0.20579767227172852,
0.16618353128433228,
0.2969312369823456,
-0.06534428149461746,
-0.23560690879821777,
0.7419953942298889,
0.06212368607521057,
-0.054097920656204224,
-0.12703576683998108,
0.020278766751289368,
-0.5549435615539551,
-0.1697128266096115,
-0.24630755186080933,
-0.1268681287765503,
0.21109367907047272,
0.1947377324104309,
-0.5221102237701416,
-0.15029221773147583,
0.14504534006118774,
0.07150299847126007,
-0.20047588646411896,
0.6373550891876221,
-0.23666656017303467,
-0.33415403962135315,
0.2838113605976105,
-0.09788397699594498
] |
https://github.com/huggingface/datasets/issues/2643 | Enum used in map functions will raise a RecursionError with dill. | Hi ! Thanks for reporting :)
Until this is fixed on `dill`'s side, we could implement a custom saving in our Pickler indefined in utils.py_utils.py
There is already a suggestion in this message about how to do it:
https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
Let me know if such a workaround could help, and feel free to open a PR if you want to contribute ! | ## Describe the bug
Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from enum import Enum
class A(Enum):
a = 'a'
def main():
a = A.a
def f(x):
return {} if a == a.a else x
ds = load_dataset('cnn_dailymail', '3.0.0')['test']
ds = ds.map(f, num_proc=15)
if __name__ == "__main__":
main()
```
## Expected results
The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood.
## Actual results
```python
File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type
pickler.save_reduce(_create_type, (type(obj), obj.__name__,
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce
save(args)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save
f(self, obj) # Call unbound method with explicit self
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple
save(element)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save
self.framer.commit_frame()
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame
if f.tell() >= self._FRAME_SIZE_TARGET or force:
RecursionError: maximum recursion depth exceeded while calling a Python object
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 3.0.0
| 61 | Enum used in map functions will raise a RecursionError with dill.
## Describe the bug
Enums used in functions pass to `map` will fail at pickling with a maximum recursion exception as described here: https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
In my particular case, I use an enum to define an argument with fixed options using the `TraininigArguments` dataclass as base class and the `HfArgumentParser`. In the same file I use a `ds.map` that tries to pickle the content of the module including the definition of the enum that runs into the dill bug described above.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from enum import Enum
class A(Enum):
a = 'a'
def main():
a = A.a
def f(x):
return {} if a == a.a else x
ds = load_dataset('cnn_dailymail', '3.0.0')['test']
ds = ds.map(f, num_proc=15)
if __name__ == "__main__":
main()
```
## Expected results
The known problem with dill could be prevented as explained in the link above (workaround.) Since `HFArgumentParser` nicely uses the enum class for choices it makes sense to also deal with this bug under the hood.
## Actual results
```python
File "/home/xxxx/miniconda3/lib/python3.8/site-packages/dill/_dill.py", line 1373, in save_type
pickler.save_reduce(_create_type, (type(obj), obj.__name__,
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 690, in save_reduce
save(args)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 558, in save
f(self, obj) # Call unbound method with explicit self
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 899, in save_tuple
save(element)
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 534, in save
self.framer.commit_frame()
File "/home/xxxx/miniconda3/lib/python3.8/pickle.py", line 220, in commit_frame
if f.tell() >= self._FRAME_SIZE_TARGET or force:
RecursionError: maximum recursion depth exceeded while calling a Python object
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.10
- Python version: 3.8.5
- PyArrow version: 3.0.0
Hi ! Thanks for reporting :)
Until this is fixed on `dill`'s side, we could implement a custom saving in our Pickler indefined in utils.py_utils.py
There is already a suggestion in this message about how to do it:
https://github.com/uqfoundation/dill/issues/250#issuecomment-852566284
Let me know if such a workaround could help, and feel free to open a PR if you want to contribute ! | [
0.10535983741283417,
0.19925466179847717,
0.04053230956196785,
0.14069963991641998,
-0.07437218725681305,
-0.07834335416555405,
0.14776058495044708,
0.2337798774242401,
0.12631802260875702,
0.1690645068883896,
0.1453322470188141,
0.9332165122032166,
-0.290869802236557,
-0.3072974681854248,
-0.07833743840456009,
0.0934455618262291,
0.02236761897802353,
0.04552217200398445,
-0.6181145906448364,
-0.24567852914333344,
-0.337514728307724,
-0.005241416394710541,
-0.10244697332382202,
-0.010088026523590088,
-0.21160192787647247,
0.22399954497814178,
0.0477658286690712,
0.4010360538959503,
0.08411349356174469,
-0.2200673222541809,
0.3333727717399597,
-0.07344925403594971,
0.19746242463588715,
0.3142176866531372,
-0.0001113916514441371,
0.08502468466758728,
0.1187557578086853,
-0.22744080424308777,
-0.36546480655670166,
-0.23953430354595184,
0.14749127626419067,
0.12261885404586792,
0.07264339923858643,
-0.41547590494155884,
0.22263628244400024,
0.37532082200050354,
-0.002573469653725624,
-0.2636489272117615,
-0.062162697315216064,
0.054368745535612106,
0.17183679342269897,
-0.13968050479888916,
0.2170407921075821,
0.07615981996059418,
0.4435100257396698,
-0.01828625053167343,
0.04481564462184906,
0.5206546783447266,
0.16535967588424683,
-0.3055949807167053,
-0.16434773802757263,
0.17223668098449707,
-0.09769639372825623,
-0.025411482900381088,
0.3883342742919922,
-0.11360835283994675,
0.6294151544570923,
-0.028846167027950287,
-0.1640150547027588,
0.22220289707183838,
-0.1290316879749298,
-0.28409630060195923,
-0.22954757511615753,
0.04017193615436554,
-0.07943809777498245,
-0.10172327607870102,
0.30878597497940063,
-0.01802716590464115,
-0.013356110081076622,
-0.07756055891513824,
0.12407079339027405,
-0.21598930656909943,
0.005677178502082825,
0.4278796911239624,
-0.16410410404205322,
0.5943021774291992,
0.13781261444091797,
0.16610467433929443,
0.2780689597129822,
-0.16848191618919373,
-0.19653727114200592,
0.11785159260034561,
0.10200582444667816,
0.09503304213285446,
-0.22087325155735016,
-0.09397956728935242,
0.28465789556503296,
-0.3601532280445099,
0.33536189794540405,
-0.15426065027713776,
0.014315841719508171,
0.1036648079752922,
-0.06858712434768677,
0.33369120955467224,
0.3899118900299072,
-0.1418338567018509,
-0.051656924188137054,
0.5599203705787659,
0.215542733669281,
-0.11224327981472015,
0.0307021327316761,
0.3607041537761688,
0.06001216173171997,
0.09190604090690613,
-0.008360665291547775,
-0.11108801513910294,
0.011288341134786606,
-0.09541095793247223,
-0.10620409995317459,
0.41727885603904724,
-0.4747130274772644,
-0.11361294239759445,
0.13495472073554993,
0.12400273978710175,
-0.10585067421197891,
0.02118634432554245,
0.13413619995117188,
0.08970116078853607,
-0.05256522446870804,
0.4216708242893219,
-0.21100789308547974,
-0.006028899922966957,
0.02341986820101738,
-0.21311503648757935,
-0.1768057942390442,
0.05482609570026398,
0.26328903436660767,
0.07132721692323685,
0.13230042159557343,
-0.02237415499985218,
0.08259247243404388,
-0.22468529641628265,
0.17830631136894226,
0.10253123193979263,
-0.5080524682998657,
-0.083213210105896,
0.25300344824790955,
-0.26041197776794434,
-0.2579997777938843,
0.2515305280685425,
-0.4531785249710083,
-0.09232734888792038,
-0.37195321917533875,
0.2141513079404831,
0.1512593775987625,
0.1420765221118927,
0.14658355712890625,
-0.1181599497795105,
0.30299049615859985,
-0.13724519312381744,
0.15522944927215576,
-0.41854965686798096,
-0.3111720383167267,
-0.24511149525642395,
0.07526508718729019,
-0.030983880162239075,
-0.0723969116806984,
-0.20129230618476868,
-0.2666208744049072,
0.15930351614952087,
0.175673708319664,
-0.04904034361243248,
-0.18482017517089844,
-0.14143818616867065,
-0.2404552698135376,
0.2867944836616516,
-0.10298991948366165,
-0.12635193765163422,
-0.36463478207588196,
-0.06305641680955887,
-0.05214627832174301,
0.1691659390926361,
-0.25418567657470703,
-0.16374415159225464,
0.20213721692562103,
-0.2736368477344513,
0.520444929599762,
0.17516902089118958,
0.11386439204216003,
-0.014207394793629646,
-0.32020366191864014,
-0.11339595168828964,
0.3278876543045044,
0.12095259130001068,
-0.1715003103017807,
-0.092616505920887,
-0.2653788626194,
-0.19638223946094513,
0.3977234959602356,
-0.26984313130378723,
0.0405845120549202,
0.13115856051445007,
0.10833801329135895,
0.08826552331447601,
0.06282962113618851,
-0.1535959541797638,
-0.3434663712978363,
0.19828984141349792,
-0.2558770775794983,
-0.02150668203830719,
0.016487255692481995,
-0.10047435015439987,
0.09639676660299301,
0.2580534815788269,
-0.0351017601788044,
-0.09730835258960724,
0.18913781642913818,
0.09944033622741699,
-0.10807277262210846,
-0.02163783833384514,
-0.00038608163595199585,
-0.3291845917701721,
-0.4009256362915039,
-0.029438313096761703,
0.05246305093169212,
0.30230405926704407,
-0.23050902783870697,
-0.23220668733119965,
-0.20589123666286469,
0.1653580218553543,
-0.09189973026514053,
0.003567565931007266,
-0.2516867518424988,
0.029070118442177773,
0.3874913454055786,
-0.5933535099029541,
-0.28054073452949524,
-0.05451805889606476,
-0.11675303429365158,
-0.2748851776123047,
0.036842361092567444,
0.46847280859947205,
0.1454920768737793,
-0.2771620452404022,
0.24590075016021729,
0.17548538744449615,
0.175849050283432,
0.12285947054624557,
0.06971694529056549,
0.22729627788066864,
-0.19982634484767914,
-0.11351636797189713,
-0.029024286195635796,
-0.373683363199234,
-0.101966992020607,
0.09346914291381836,
0.034510280936956406,
0.11486131697893143,
-0.038851428776979446,
-0.25294438004493713,
0.16791608929634094,
0.24728327989578247,
0.2872362732887268,
0.26803842186927795,
-0.14141106605529785,
0.08006981760263443,
0.1683729887008667,
0.05610932782292366,
0.11422796547412872,
-0.0879766121506691,
0.09766986966133118,
0.1423887461423874,
-0.11716901510953903,
0.11365246772766113,
-0.07366744428873062,
0.0754610002040863,
0.3981691598892212,
0.14574028551578522,
-0.060011282563209534,
0.04964800179004669,
-0.04125625640153885,
-0.2883341908454895,
-0.0536869615316391,
0.10212989151477814,
-0.06844025105237961,
0.07459206134080887,
-0.4567013084888458,
0.4747103154659271,
0.1333305984735489,
-0.5235565900802612,
-0.24588710069656372,
-0.2118293195962906,
-0.17015503346920013,
0.12948134541511536,
-0.5239447951316833,
0.21116356551647186,
-0.1791202276945114,
-0.4466729164123535,
0.19966557621955872,
-0.34406277537345886,
0.28589943051338196,
-0.32105809450149536,
-0.29670408368110657,
-0.023546896874904633,
0.1581539511680603,
-0.17905980348587036,
0.03748956322669983,
0.26271501183509827,
-0.3319728374481201,
0.03557746112346649,
-0.20127084851264954,
0.14697611331939697,
0.032461777329444885,
0.17112791538238525,
0.2742409110069275,
0.09315648674964905,
-0.4386814832687378,
-0.42289865016937256,
0.13251635432243347,
0.13393573462963104,
-0.058665551245212555,
0.060103751718997955,
0.2963470220565796,
0.27226829528808594,
-0.22220076620578766,
-0.3065890669822693,
-0.1973074972629547,
-0.38459891080856323,
-0.20849917829036713,
0.07037974894046783,
0.45469337701797485,
0.27421635389328003,
-0.016064466908574104,
0.4758409261703491,
0.3324284851551056,
0.3127489387989044,
-0.3234799802303314,
0.3757650852203369,
0.20174923539161682,
-0.16261015832424164,
-0.2093159556388855,
-0.16371816396713257,
-0.54200679063797,
0.08442670851945877,
0.11821456998586655,
-0.5454445481300354,
-0.20521092414855957,
0.1891743540763855,
0.07230938971042633,
-0.24910065531730652,
-0.19578085839748383,
0.1190050020813942,
0.22331896424293518,
0.06280981749296188,
-0.0219537615776062,
-0.27260127663612366,
0.22372198104858398,
0.2733665704727173,
0.15183904767036438,
0.17838716506958008,
-0.010950963944196701,
-0.043243519961833954,
0.3684883117675781,
0.34897327423095703,
-0.02533074840903282,
0.41160085797309875,
0.35298770666122437,
-0.08654987812042236,
0.04252200573682785,
0.036325372755527496,
0.11212003231048584,
0.03950551152229309,
-0.08969477564096451,
0.13299408555030823,
-0.14528772234916687,
-0.662301778793335,
0.03204943984746933,
0.14800913631916046,
0.30373063683509827,
-0.492302268743515,
0.2677827775478363,
-0.39397624135017395,
0.05314468592405319,
-0.3042105734348297,
0.2357541024684906,
0.124234139919281,
0.22633731365203857,
0.1090451329946518,
-0.09142482280731201,
0.1903570294380188,
-0.11923661082983017,
-0.0924871638417244,
-0.16503724455833435,
-0.006722837686538696,
0.11854085326194763,
0.33537614345550537,
0.37176546454429626,
-0.04535840451717377,
-0.37601354718208313,
-0.12439592182636261,
-0.10633192956447601,
0.40101051330566406,
-0.348197877407074,
0.07695681601762772,
0.41222652792930603,
-0.2628348469734192,
-0.28996071219444275,
-0.13580623269081116,
0.07485605776309967,
0.04181502014398575,
0.3262105882167816,
-0.12380996346473694,
-0.49230366945266724,
0.11857856810092926,
0.4219985902309418,
0.008125515654683113,
0.11812444031238556,
-0.003884495235979557,
-0.058898668736219406,
-0.18780335783958435,
-0.29514992237091064,
-0.011557944118976593,
-0.1458284556865692,
0.12250459939241409,
0.2150280624628067,
-0.01799980364739895,
-0.11493135988712311,
0.10041720420122147,
-0.08380316197872162,
-0.16687768697738647,
0.28626149892807007,
-0.12395133078098297,
0.15847167372703552,
0.1450277864933014,
0.3025130331516266,
0.27380743622779846,
0.3276349604129791,
-0.33748048543930054,
0.19927158951759338,
0.29324638843536377,
0.22560028731822968,
0.17617611587047577,
0.05524693429470062,
0.20080243051052094,
0.15379349887371063,
0.010555675253272057,
-0.1905154436826706,
-0.17882534861564636,
-0.3223811686038971,
0.08727885037660599,
0.050028931349515915,
-0.1219283863902092,
-0.38156768679618835,
0.06622358411550522,
0.16936972737312317,
-0.01104668527841568,
0.06162590533494949,
-0.36573535203933716,
-0.010244548320770264,
0.49813389778137207,
0.35206732153892517,
0.871096670627594,
0.2196195423603058,
-0.04610629007220268,
0.09723149240016937,
-0.026318447664380074,
-0.22970490157604218,
0.3024888038635254,
-0.18043233454227448,
-0.298661470413208,
0.004067772999405861,
-0.07449685782194138,
-0.12460903823375702,
-0.021565482020378113,
-0.015255473554134369,
-0.39489826560020447,
0.023444125428795815,
-0.1997496634721756,
0.04196631908416748,
0.02823679894208908,
-0.052602630108594894,
-0.060700803995132446,
-0.10948339104652405,
0.2939586341381073,
0.16086900234222412,
0.09298714995384216,
0.07982431352138519,
-0.06561333686113358,
-0.09195239096879959,
-0.24051132798194885,
-0.38050997257232666,
-0.15403702855110168,
0.1441749930381775,
-0.11376595497131348,
0.44629204273223877,
0.3543669581413269,
-0.28590482473373413,
0.13251599669456482,
0.3625553250312805,
-0.267566442489624,
0.12171065807342529,
-0.06499583274126053,
-0.02340785413980484,
0.04192598536610603,
0.19903460144996643,
0.25699111819267273,
-0.06536507606506348,
0.532714307308197,
-0.008403491228818893,
-0.23212316632270813,
0.14574354887008667,
-0.09407813847064972,
-0.2741774916648865,
-0.0868036299943924,
0.30605798959732056,
0.31087416410446167,
-0.01821853220462799,
0.05569498613476753,
-0.057049721479415894,
-0.17519408464431763,
-0.17226311564445496,
0.14878110587596893,
0.19785133004188538,
-0.1734820008277893,
0.25131627917289734,
0.0907394140958786,
-0.21897083520889282,
-0.08010654151439667,
0.4010274410247803,
0.40486404299736023,
0.5142780542373657,
0.31335657835006714,
-0.06605400145053864,
-0.11954376846551895,
-0.15255028009414673,
-0.3521782457828522,
-0.35391688346862793,
0.2396394908428192,
0.20173212885856628,
0.018483398482203484,
-0.14710870385169983,
-0.33260563015937805,
-0.09506687521934509,
0.08194142580032349,
0.2781376838684082,
-0.40852344036102295,
-0.2797383666038513,
-0.3357236683368683,
0.09742622822523117,
-0.12044684588909149,
0.21470920741558075,
-0.25884610414505005,
-0.037535764276981354,
-0.31563735008239746,
0.2042561173439026,
-0.321906179189682,
0.038184650242328644,
-0.3997882008552551,
0.17228057980537415,
-0.14830660820007324,
-0.2481517791748047,
0.018231254070997238,
0.030766062438488007,
0.16738727688789368,
0.2304181009531021,
-0.28738996386528015,
-0.1121997982263565,
-0.2405651956796646,
0.0865456834435463,
0.14103926718235016,
-0.13691487908363342,
0.13077551126480103,
-0.16638155281543732,
0.07748997211456299,
-0.18978747725486755,
0.032598212361335754,
-0.15484613180160522,
-0.11857165396213531,
0.36417728662490845,
0.19780729711055756,
0.15579891204833984,
0.18834377825260162,
0.265674889087677,
-0.1431952267885208,
0.28395622968673706,
-0.15872040390968323,
0.013291515409946442,
-0.22597049176692963,
-0.08386331796646118,
-0.08421744406223297,
0.07267589867115021,
-0.21821118891239166,
-0.23917865753173828,
0.2639336884021759,
-0.015074923634529114,
-0.1912013590335846,
-0.08650648593902588,
0.17252548038959503,
0.20492766797542572,
-0.3796466886997223,
-0.15305902063846588,
0.5407615900039673,
0.2050435096025467,
-0.004619846120476723,
-0.03410511836409569,
0.5727962851524353,
-0.09246158599853516,
0.23166051506996155,
0.3061138093471527,
-0.15375696122646332,
-0.18797588348388672,
-0.1503075361251831,
-0.01179868821054697,
-0.3474121689796448,
0.05281338840723038,
0.2156006544828415,
0.4500194489955902,
-0.19076023995876312,
0.15370409190654755,
0.15344294905662537,
-0.13423503935337067,
0.5434716939926147,
0.014411259442567825,
0.13494549691677094,
0.15740811824798584,
-0.001568485051393509,
0.04443780705332756,
0.37951573729515076,
-0.48997101187705994,
0.4982146620750427,
0.6172643899917603,
0.23855946958065033,
0.3534955382347107,
0.11364445090293884,
0.17976820468902588,
-0.18039895594120026,
0.031092924997210503,
-0.16140884160995483,
0.20594266057014465,
-0.34705379605293274,
-0.01827419549226761,
-0.01757039502263069,
-0.12879693508148193,
0.002571292221546173,
0.031799253076314926,
-0.03310741111636162,
-0.1463281810283661,
0.22259244322776794,
0.1030735969543457,
-0.2522370219230652,
-0.36131569743156433,
-0.029379405081272125,
-0.19579389691352844,
0.019742347300052643,
-0.22029906511306763,
-0.05942893773317337,
0.12754860520362854,
0.13945737481117249,
-0.3628344237804413,
0.12339890003204346,
0.20217837393283844,
0.5606963038444519,
-0.45155805349349976,
-0.2535938620567322,
0.29515257477760315,
0.08716588467359543,
-0.29883283376693726,
0.169747456908226,
-0.2322254180908203,
-0.17149415612220764,
0.44228729605674744,
0.07521603256464005,
-0.24496343731880188,
-0.1833673119544983,
0.1342611461877823,
0.49244269728660583,
0.26432955265045166,
0.0972134917974472,
0.21301312744617462,
0.20477953553199768,
0.16330792009830475,
-0.2080276608467102,
-0.2605634927749634,
-0.15556694567203522,
0.1988859474658966,
-0.006320272572338581,
0.3195679783821106,
0.07287776470184326,
0.09287793934345245,
-0.04253533110022545,
0.23829567432403564,
0.21525661647319794,
0.17456841468811035,
-0.046425461769104004,
-0.08781637251377106,
-0.2692611813545227,
0.35070282220840454,
-0.13880151510238647,
-0.20813335478305817,
0.30596011877059937,
-0.011172356083989143,
0.06573615968227386,
0.15030983090400696,
-0.11548617482185364,
-0.20898696780204773,
0.16076287627220154,
0.44860997796058655,
-0.2906099557876587,
-0.18499219417572021,
-0.10596266388893127,
-0.15106749534606934,
0.2687523663043976,
-0.540983259677887,
0.13426315784454346,
0.14736442267894745,
0.07054398953914642,
-0.23181729018688202,
0.014068938791751862,
-0.011605663225054741,
0.3986550271511078,
0.425405353307724,
0.11474393308162689,
0.4639260172843933,
-0.19395551085472107,
-0.10574523359537125,
0.20565836131572723,
0.015728456899523735,
-0.021350791677832603,
-0.1691848337650299,
-0.11767910420894623,
0.3652643859386444,
-0.08496995270252228,
-0.23371346294879913,
-0.12840372323989868,
0.5321088433265686,
-0.10693158209323883,
-0.18596908450126648,
-0.16029754281044006,
0.31231576204299927,
-0.01321389526128769,
0.023958710953593254,
-0.4056386947631836,
0.20579767227172852,
0.16618353128433228,
0.2969312369823456,
-0.06534428149461746,
-0.23560690879821777,
0.7419953942298889,
0.06212368607521057,
-0.054097920656204224,
-0.12703576683998108,
0.020278766751289368,
-0.5549435615539551,
-0.1697128266096115,
-0.24630755186080933,
-0.1268681287765503,
0.21109367907047272,
0.1947377324104309,
-0.5221102237701416,
-0.15029221773147583,
0.14504534006118774,
0.07150299847126007,
-0.20047588646411896,
0.6373550891876221,
-0.23666656017303467,
-0.33415403962135315,
0.2838113605976105,
-0.09788397699594498
] |
https://github.com/huggingface/datasets/issues/2642 | Support multi-worker with streaming dataset (IterableDataset). | Hi ! This is a great idea :)
I think we could have something similar to what we have in `datasets.Dataset.map`, i.e. a `num_proc` parameter that tells how many processes to spawn to parallelize the data processing.
Regarding AUTOTUNE, this could be a nice feature as well, we could see how to add it in a second step | **Is your feature request related to a problem? Please describe.**
The current `.map` does not support multi-process, CPU can become bottleneck if the pre-processing is complex (e.g. t5 span masking).
**Describe the solution you'd like**
Ideally `.map` should support multi-worker like tfds, with `AUTOTUNE`.
**Describe alternatives you've considered**
A simpler solution is to shard the dataset and process it in parallel with pytorch dataloader. The shard does not need to be of equal size.
* https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset
**Additional context**
| 58 | Support multi-worker with streaming dataset (IterableDataset).
**Is your feature request related to a problem? Please describe.**
The current `.map` does not support multi-process, CPU can become bottleneck if the pre-processing is complex (e.g. t5 span masking).
**Describe the solution you'd like**
Ideally `.map` should support multi-worker like tfds, with `AUTOTUNE`.
**Describe alternatives you've considered**
A simpler solution is to shard the dataset and process it in parallel with pytorch dataloader. The shard does not need to be of equal size.
* https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset
**Additional context**
Hi ! This is a great idea :)
I think we could have something similar to what we have in `datasets.Dataset.map`, i.e. a `num_proc` parameter that tells how many processes to spawn to parallelize the data processing.
Regarding AUTOTUNE, this could be a nice feature as well, we could see how to add it in a second step | [
-0.6293725967407227,
-0.5262196063995361,
-0.14244073629379272,
-0.042048484086990356,
-0.19271793961524963,
-0.01043052226305008,
0.5165582895278931,
0.17827948927879333,
0.08271841704845428,
0.14804665744304657,
-0.08475644141435623,
0.30201202630996704,
-0.26877060532569885,
0.26690420508384705,
-0.08264833688735962,
-0.23721492290496826,
-0.1250283420085907,
0.06431931257247925,
-0.00823519378900528,
0.23084689676761627,
-0.12495716661214828,
0.004640428349375725,
-0.13399791717529297,
-0.20448242127895355,
-0.3420334458351135,
-0.09328674525022507,
-0.01881541684269905,
0.03790026903152466,
0.3172484338283539,
-0.24438999593257904,
0.060374610126018524,
0.43439483642578125,
0.13053415715694427,
0.5852184891700745,
-0.00010765406477730721,
-0.09300301223993301,
0.1798296570777893,
-0.00038813427090644836,
-0.08988054096698761,
0.05900104343891144,
-0.07781145721673965,
-0.10355198383331299,
0.06305725127458572,
-0.34426355361938477,
-0.059643276035785675,
-0.26670345664024353,
0.1754973977804184,
-0.4042598009109497,
0.20376229286193848,
-0.16770517826080322,
0.16247661411762238,
0.3757341802120209,
-0.18459965288639069,
0.1089051142334938,
-0.3134661614894867,
-0.0016084983944892883,
-0.12126178294420242,
0.0694388747215271,
0.6291936635971069,
0.03759004920721054,
-0.37667468190193176,
0.3427777588367462,
-0.2514381408691406,
0.37034276127815247,
0.24197804927825928,
-0.1848532259464264,
-0.3477924168109894,
-0.48358574509620667,
0.088019460439682,
0.39750218391418457,
0.26475590467453003,
-0.24325263500213623,
-0.17544853687286377,
-0.4112386703491211,
-0.1313701719045639,
-0.06726155430078506,
-0.05690162628889084,
0.15999212861061096,
-0.22044333815574646,
-0.07610766589641571,
-0.3439471125602722,
-0.08794953674077988,
-0.21086399257183075,
0.10953620076179504,
0.15640418231487274,
0.3157588243484497,
0.08343615382909775,
0.2758638560771942,
0.2605762183666229,
0.11593339592218399,
0.32857412099838257,
-0.1067807674407959,
0.33220577239990234,
0.13729944825172424,
-0.4830511808395386,
-0.23227235674858093,
-0.0932082012295723,
-0.4594945013523102,
0.17240852117538452,
-0.03727328032255173,
0.23544222116470337,
0.3031926155090332,
-0.1467362493276596,
0.31024929881095886,
0.3134957551956177,
-0.2739816904067993,
-0.27895718812942505,
-0.11715549975633621,
0.40164363384246826,
-0.1800668090581894,
-0.1007048636674881,
0.07917677611112595,
0.10899192094802856,
-0.3574831783771515,
0.33227217197418213,
0.21112516522407532,
0.12560345232486725,
0.35327619314193726,
0.14718137681484222,
-0.3941151797771454,
-0.1462428867816925,
-0.29771676659584045,
-0.06369391083717346,
0.1053125187754631,
-0.06475242227315903,
0.3614371120929718,
-0.11024820804595947,
-0.18956461548805237,
-0.06090506166219711,
-0.2694207727909088,
-0.010817399248480797,
-0.265239953994751,
-0.03063986450433731,
0.13681870698928833,
0.2078416794538498,
-0.5171918272972107,
0.211282879114151,
-0.01886918768286705,
0.3191460371017456,
0.23083338141441345,
0.3875930905342102,
-0.26263338327407837,
0.2241917848587036,
0.03368927538394928,
0.026763591915369034,
-0.0016432031989097595,
-0.18489083647727966,
0.5143530964851379,
-0.18683820962905884,
0.38260993361473083,
-0.24189740419387817,
-0.534145176410675,
-0.003077743574976921,
0.1260261982679367,
0.042639218270778656,
-0.02611398696899414,
-0.17060917615890503,
0.320934534072876,
0.29112833738327026,
-0.2322874367237091,
-0.04504915326833725,
-0.08294441550970078,
-0.3704206943511963,
-0.2616882622241974,
0.10993710905313492,
0.1438867747783661,
0.0900043398141861,
-0.014194242656230927,
-0.01761436276137829,
0.052084147930145264,
0.06043446809053421,
0.27844199538230896,
-0.2516740560531616,
-0.1148802861571312,
-0.12092571705579758,
0.2565869688987732,
0.2521812915802002,
-0.06233251839876175,
-0.12814687192440033,
0.5759633779525757,
-0.10128627717494965,
0.067070871591568,
0.22913837432861328,
0.4602636396884918,
0.4873190224170685,
-0.10045279562473297,
0.0499882698059082,
0.432059109210968,
-0.36817610263824463,
0.32796958088874817,
-0.13287125527858734,
-0.2349710911512375,
0.22220434248447418,
0.4411795139312744,
0.21412301063537598,
-0.12051958590745926,
-0.033991046249866486,
-0.32426998019218445,
0.39233484864234924,
-0.17285461723804474,
0.28227004408836365,
0.007750656455755234,
-0.01836630329489708,
0.042802877724170685,
0.10390898585319519,
-0.4952969253063202,
-0.4325997829437256,
0.17709267139434814,
0.14759549498558044,
-0.13157501816749573,
0.3082439601421356,
-0.18408577144145966,
0.2749662399291992,
-0.12518644332885742,
-0.12111611664295197,
-0.16848646104335785,
0.05965490639209747,
0.16396132111549377,
-0.23236818611621857,
-0.40809041261672974,
-0.5029193758964539,
0.20636984705924988,
-0.08608958125114441,
-0.26511794328689575,
-0.1824338138103485,
0.1871775984764099,
0.14421053230762482,
-0.08662155270576477,
-0.13989666104316711,
-0.014000743627548218,
-0.06669186800718307,
-0.16114208102226257,
-0.003110296092927456,
0.2786311209201813,
-0.13348744809627533,
0.29930436611175537,
0.08580562472343445,
0.5260641574859619,
0.4518819749355316,
-0.15627290308475494,
0.04584234952926636,
0.2426927238702774,
-0.13487333059310913,
-0.20620182156562805,
-0.009011216461658478,
0.18455462157726288,
-0.33688026666641235,
0.21941255033016205,
0.04171258211135864,
-0.01135859452188015,
0.20308087766170502,
0.06691916286945343,
-0.17308086156845093,
0.19924089312553406,
-0.052555594593286514,
-0.3027149736881256,
0.07365070283412933,
-0.0028761979192495346,
-0.5791727900505066,
0.25165754556655884,
0.3946076035499573,
0.1065460741519928,
-0.012772627174854279,
0.0887366309762001,
-0.1118113175034523,
0.010602068156003952,
0.18349115550518036,
0.10432885587215424,
0.35386228561401367,
0.26243698596954346,
0.1418784111738205,
-0.10684802383184433,
0.19296404719352722,
-0.09492208808660507,
-0.005133435130119324,
0.024186652153730392,
0.34795400500297546,
0.27289554476737976,
0.09870797395706177,
-0.012377607636153698,
-0.04142781347036362,
-0.4256391227245331,
0.24876746535301208,
-0.016484009101986885,
0.03929428383708,
-0.015385638922452927,
0.0869060531258583,
-0.017311125993728638,
-0.08038003742694855,
-0.16489045321941376,
-0.034139011055231094,
-0.02099904976785183,
0.16126631200313568,
0.7649847269058228,
-0.10869252681732178,
0.33682799339294434,
0.18699753284454346,
0.1899256706237793,
0.0012891385704278946,
-0.20533375442028046,
-0.10985243320465088,
-0.20620013773441315,
0.27138978242874146,
0.10821513831615448,
0.1666259467601776,
-0.23586514592170715,
0.43592190742492676,
0.3054792881011963,
-0.04455479234457016,
-0.4260464310646057,
-0.04827006161212921,
-0.0027317702770233154,
0.07704105973243713,
-0.20293670892715454,
0.027796529233455658,
0.12102070450782776,
0.2024897187948227,
-0.2030801922082901,
0.05917087197303772,
-0.32402461767196655,
0.04673255234956741,
-0.10959462076425552,
0.014464803040027618,
0.0102422796189785,
-0.053355515003204346,
-0.21542468667030334,
-0.27461931109428406,
-0.4614112377166748,
0.3068503141403198,
-0.19972670078277588,
0.34954237937927246,
-0.10976315289735794,
0.08055166900157928,
-0.13137458264827728,
0.38156846165657043,
-0.1566506028175354,
-0.018726447597146034,
-0.4405148923397064,
0.21834853291511536,
-0.3194654583930969,
-0.174950510263443,
-0.06871990114450455,
0.0693105012178421,
0.10514261573553085,
0.4950215220451355,
-0.15729551017284393,
-0.14647310972213745,
-0.1428733617067337,
0.22850674390792847,
-0.1550750881433487,
-0.014803914353251457,
0.47001057863235474,
0.22092917561531067,
-0.05595563352108002,
0.03303731232881546,
0.03623348847031593,
-0.03365661948919296,
0.22122466564178467,
-0.17672905325889587,
0.36868375539779663,
0.19567781686782837,
0.22417938709259033,
0.9834290742874146,
0.27304279804229736,
-0.19336926937103271,
0.1726337969303131,
-0.097055584192276,
-0.2342127412557602,
-0.02133047580718994,
-0.4307991564273834,
0.11778928339481354,
-0.3169783353805542,
0.12755239009857178,
0.24728387594223022,
-0.16830265522003174,
-0.4030022621154785,
-0.06692185997962952,
-0.15083977580070496,
-0.09752022475004196,
-0.09799450635910034,
0.4519287347793579,
-0.25209975242614746,
0.5229314565658569,
-0.2508050501346588,
-0.23539578914642334,
-0.2905538082122803,
-0.0854284018278122,
-0.0017173271626234055,
-0.059142544865608215,
0.532516598701477,
-0.21697936952114105,
0.18759389221668243,
0.28965136408805847,
-0.3857788145542145,
0.21801120042800903,
0.2700884938240051,
0.11157280206680298,
0.021134961396455765,
-0.03079961985349655,
0.1801569163799286,
-0.022209441289305687,
0.5902077555656433,
-0.18095819652080536,
-0.008510943502187729,
-0.11729435622692108,
-0.42984825372695923,
-0.17853614687919617,
0.12087684869766235,
-0.02199956588447094,
0.5310908555984497,
0.1881127655506134,
0.3519921898841858,
-0.3006891906261444,
-0.338738352060318,
0.16811354458332062,
-0.04917197674512863,
-0.2068440169095993,
-0.5010212659835815,
-0.14665080606937408,
0.09972859174013138,
-0.33033254742622375,
0.05757156386971474,
0.2879678010940552,
-0.01010807603597641,
-0.04309006780385971,
-0.3219869136810303,
0.0266617052257061,
-0.07254096865653992,
-0.09720839560031891,
0.08933813869953156,
-0.1573418378829956,
0.03913939744234085,
0.25164559483528137,
0.29526254534721375,
0.09983715415000916,
-0.01023167185485363,
0.16870570182800293,
-0.03941268101334572,
-0.29952338337898254,
0.1923433244228363,
0.021537646651268005,
0.33958277106285095,
0.14120671153068542,
0.0733015388250351,
0.12171471863985062,
0.30946359038352966,
0.3474087715148926,
-0.3580637574195862,
-0.06978289037942886,
0.19161805510520935,
0.16636869311332703,
-0.24137111008167267,
-0.5865657329559326,
0.1394340842962265,
-0.061425529420375824,
0.02125474065542221,
0.7402989268302917,
-0.6871580481529236,
-0.009741757065057755,
0.030659038573503494,
0.2126389741897583,
0.7318969964981079,
-0.1772024780511856,
-0.007323771715164185,
-0.24399468302726746,
-0.10935556888580322,
-0.028422880917787552,
-0.6782627701759338,
0.29529690742492676,
-0.3901478946208954,
-0.3920976519584656,
0.012379748746752739,
-0.011121388524770737,
-0.04938600957393646,
0.31224524974823,
-0.17223213613033295,
0.08357434719800949,
0.4423425793647766,
0.13142406940460205,
-0.028305629268288612,
0.5326045751571655,
-0.1827601045370102,
-0.4784122407436371,
0.19029325246810913,
0.10071529448032379,
-0.18420952558517456,
-0.06905980408191681,
-0.05006879195570946,
-0.23474076390266418,
0.4787387549877167,
0.18935047090053558,
-0.31637758016586304,
-0.18002155423164368,
-0.33345118165016174,
0.20924639701843262,
-0.1788121908903122,
-0.15912631154060364,
0.17559927701950073,
0.3089121878147125,
-0.03533231467008591,
-0.24074329435825348,
-0.17260052263736725,
-0.036350492388010025,
0.1060291975736618,
0.1997058391571045,
-0.21263380348682404,
-0.20049497485160828,
0.2052827775478363,
-0.18765178322792053,
-0.3720928132534027,
0.18470564484596252,
0.07952294498682022,
-0.710837721824646,
-0.11374585330486298,
0.18628376722335815,
0.24199970066547394,
-0.053062841296195984,
0.0024887053295969963,
0.14667725563049316,
-0.3283703625202179,
-0.08689757436513901,
0.08642883598804474,
0.1477682888507843,
-0.2835691571235657,
0.3946528732776642,
-0.10987970232963562,
-0.014617949724197388,
0.019464600831270218,
0.2222326695919037,
0.2573193311691284,
0.16549697518348694,
0.10476239025592804,
0.19185586273670197,
-0.11484673619270325,
-0.15791325271129608,
-0.07952609658241272,
-0.06923618912696838,
-0.2391887605190277,
0.1350424736738205,
0.04124942794442177,
-0.06975254416465759,
-0.013754588551819324,
0.02602217346429825,
-0.14515453577041626,
0.32030925154685974,
-0.45744526386260986,
-0.18129843473434448,
-0.38388288021087646,
-0.0492512583732605,
-0.12821844220161438,
0.24074940383434296,
0.15238192677497864,
0.18353907763957977,
0.2417328655719757,
0.27741187810897827,
-0.3676075339317322,
0.0033953357487916946,
0.030381804332137108,
0.11781574040651321,
0.3157610595226288,
0.007741119712591171,
0.032887913286685944,
0.11788767576217651,
-0.012073532678186893,
0.14006182551383972,
-0.22025446593761444,
-0.2053065299987793,
0.005428178235888481,
0.13103534281253815,
-0.0028322450816631317,
-0.13038982450962067,
-0.1397249549627304,
-0.30365341901779175,
-0.42151734232902527,
-0.2941891849040985,
0.38740700483322144,
0.007346637547016144,
-0.1853875368833542,
0.1504862755537033,
0.3489686846733093,
-0.17146611213684082,
-0.38207393884658813,
0.12575659155845642,
0.012714684009552002,
-0.011070765554904938,
-0.1302943080663681,
0.18070222437381744,
0.1936529278755188,
-0.07856446504592896,
0.11382915079593658,
-0.006094709038734436,
0.4877415895462036,
0.07901443541049957,
0.2957887351512909,
-0.09311997890472412,
-0.008385058492422104,
-0.02643023058772087,
0.5431421995162964,
0.08525833487510681,
0.01140032522380352,
0.05728450417518616,
0.10599333792924881,
0.23800984025001526,
-0.22438272833824158,
-0.09633014351129532,
0.25889959931373596,
-0.013398428447544575,
0.359709769487381,
0.047792769968509674,
0.1111508160829544,
0.2732599079608917,
0.2716703414916992,
0.08935604989528656,
0.06527234613895416,
-0.6158901453018188,
0.10825552046298981,
0.05343107506632805,
0.03127161040902138,
-0.007179427891969681,
0.19993115961551666,
-0.01074870303273201,
0.10785862803459167,
0.11450177431106567,
-0.0024119094014167786,
0.4664054214954376,
0.3444426953792572,
-0.029109712690114975,
0.4277685880661011,
-0.17506657540798187,
-0.14977429807186127,
-0.24475696682929993,
0.054421741515398026,
0.20614567399024963,
0.13182789087295532,
0.3818691670894623,
-0.13287131488323212,
-0.31230953335762024,
-0.1352180689573288,
0.2957098186016083,
-0.08329611271619797,
0.08015976846218109,
0.14021894335746765,
-0.09164394438266754,
0.049121201038360596,
0.11678193509578705,
0.003189999610185623,
0.15273578464984894,
0.5788419246673584,
0.14173565804958344,
0.02992105484008789,
-0.11544986069202423,
-0.1152566596865654,
0.16182392835617065,
0.4018126428127289,
-0.10140207409858704,
0.03524810075759888,
0.2605164051055908,
-0.08764457702636719,
-0.1865587681531906,
0.3738200068473816,
-0.011405695229768753,
0.22883467376232147,
-0.28903481364250183,
0.30834099650382996,
-0.19425159692764282,
0.049305953085422516,
-0.061687812209129333,
0.13052445650100708,
0.0310061015188694,
-0.18489298224449158,
0.2718439996242523,
0.08624088764190674,
-0.13598957657814026,
0.14005328714847565,
0.07788365334272385,
-0.053323131054639816,
-0.17757464945316315,
-0.05225738137960434,
0.1619800478219986,
-0.3829643130302429,
0.09483905136585236,
-0.13587889075279236,
-0.30948925018310547,
-0.19898168742656708,
0.3970511555671692,
-0.5590792894363403,
-0.017253942787647247,
-0.06779339909553528,
0.09711852669715881,
-0.036235105246305466,
0.5721180438995361,
-0.046466488391160965,
0.12125907838344574,
-0.1624726504087448,
-0.089201919734478,
-0.4362136423587799,
0.14046677947044373,
0.05101795867085457,
0.1698208749294281,
0.0484594963490963,
0.16332565248012543,
0.09679064154624939,
0.24675320088863373,
0.1776275932788849,
-0.23213891685009003,
0.22961920499801636,
0.5826245546340942,
-0.26575055718421936,
0.00824032723903656,
-0.1866101175546646,
0.18398325145244598,
0.25053897500038147,
-0.2351413369178772,
0.17524009943008423,
-0.00011629611253738403,
0.07796794921159744,
-0.13949118554592133,
-0.197713240981102,
0.23929786682128906,
-0.11817573010921478,
0.30517542362213135,
-0.03235910087823868,
0.1504874974489212,
-0.19561037421226501,
0.16578830778598785,
0.01889416202902794,
0.13869920372962952,
-0.25869429111480713,
0.15839622914791107,
0.40991151332855225,
0.21719682216644287,
-0.14109785854816437,
-0.22944839298725128,
-0.4657682776451111,
0.1876072734594345,
-0.24572503566741943,
-0.06983371078968048,
-0.042702361941337585,
-0.08915884047746658,
-0.11891718208789825,
0.15199844539165497,
-0.08278711140155792,
0.4181878864765167,
-0.005067054182291031,
-0.17244304716587067,
-0.3620941638946533,
-0.14713171124458313,
0.2909374535083771,
-0.39710962772369385,
-0.34329092502593994,
-0.21648694574832916,
0.12056544423103333,
0.2122364342212677,
0.30545294284820557,
-0.3281841278076172,
-0.09522856771945953,
0.22784046828746796,
0.09350840747356415,
-0.06815963238477707,
0.2993306815624237,
-0.0034040408208966255,
-0.15404927730560303,
-0.05746091902256012,
0.020473405718803406,
0.14080823957920074,
-0.18393315374851227,
-0.186102032661438,
-0.3761652112007141
] |
https://github.com/huggingface/datasets/issues/2641 | load_dataset("financial_phrasebank") NonMatchingChecksumError | Hi! It's probably because this dataset is stored on google drive and it has a per day quota limit. It should work if you retry, I was able to initiate the download.
Similar issue [here](https://github.com/huggingface/datasets/issues/2646) | ## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
| 35 | load_dataset("financial_phrasebank") NonMatchingChecksumError
## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
Hi! It's probably because this dataset is stored on google drive and it has a per day quota limit. It should work if you retry, I was able to initiate the download.
Similar issue [here](https://github.com/huggingface/datasets/issues/2646) | [
-0.12216179072856903,
0.21915149688720703,
-0.07840727269649506,
0.2884525656700134,
0.220360666513443,
0.13471686840057373,
0.06588926911354065,
0.33106106519699097,
0.20957426726818085,
0.18217235803604126,
-0.14143899083137512,
0.053387727588415146,
0.16741617023944855,
0.07501636445522308,
-0.14153334498405457,
0.04391290992498398,
0.04270346090197563,
-0.028759434819221497,
0.030453626066446304,
-0.10899047553539276,
-0.10355684906244278,
0.39962220191955566,
-0.21437004208564758,
-0.2048732191324234,
-0.0571751669049263,
0.027174292132258415,
0.12565001845359802,
0.1493474841117859,
-0.35550934076309204,
-0.1062433198094368,
0.3173013925552368,
0.2356409728527069,
-0.03640621900558472,
0.4088567793369293,
-0.00011659786105155945,
-0.1570468246936798,
0.29543599486351013,
-0.0023202896118164062,
-0.3087725341320038,
-0.41172391176223755,
-0.31016120314598083,
-0.5327080488204956,
-0.0006331843324005604,
-0.15623781085014343,
0.14720898866653442,
0.2293875813484192,
0.11874106526374817,
-0.04043924808502197,
0.18392565846443176,
0.25631093978881836,
0.19764454662799835,
0.17663149535655975,
0.1544107049703598,
-0.06725738942623138,
0.23560625314712524,
-0.306135356426239,
-0.04426581412553787,
0.20613397657871246,
0.13392634689807892,
0.1396636664867401,
-0.11160867661237717,
0.09866443276405334,
-0.24097885191440582,
0.33987829089164734,
-0.024823248386383057,
-0.05693208426237106,
-0.1054869070649147,
-0.43503135442733765,
0.3071873188018799,
0.42931655049324036,
0.5019189715385437,
-0.13831791281700134,
-0.3338046073913574,
-0.2137766182422638,
-0.13144643604755402,
-0.005059555172920227,
0.41336846351623535,
0.22542360424995422,
-0.22245192527770996,
-0.04874910041689873,
-0.4026890993118286,
0.21270212531089783,
0.05220755934715271,
0.17423243820667267,
0.0008501186966896057,
-0.07864789664745331,
-0.14659500122070312,
-0.09588413685560226,
0.25252434611320496,
-0.0932488888502121,
0.07781369239091873,
-0.31025463342666626,
-0.07113301753997803,
0.2796265780925751,
-0.3990388512611389,
-0.0756756067276001,
0.04461631178855896,
0.5124948620796204,
0.5575389862060547,
0.37240684032440186,
0.15554089844226837,
0.22752422094345093,
-0.2916587293148041,
0.019775569438934326,
0.1210925281047821,
0.24869780242443085,
0.01460786908864975,
-0.16169050335884094,
0.2106146216392517,
0.4556136131286621,
-0.05905601382255554,
0.1310696005821228,
-0.08836068958044052,
-0.07427626103162766,
0.5709369778633118,
-0.05590001493692398,
0.06539308279752731,
-0.5341383218765259,
-0.34824955463409424,
0.44460126757621765,
-0.12518000602722168,
-0.1410450041294098,
-0.043769147247076035,
0.26912450790405273,
-0.25135543942451477,
0.11096123605966568,
-0.06691089272499084,
0.14728522300720215,
-0.03764421492815018,
-0.15068984031677246,
-0.26718461513519287,
-0.05509542301297188,
-0.12497703731060028,
-0.03890499472618103,
0.2755371034145355,
-0.44555002450942993,
0.3306753635406494,
-0.08118017762899399,
0.22233180701732635,
-0.20229104161262512,
0.043920792639255524,
-0.15927110612392426,
-0.27565309405326843,
0.2825683653354645,
0.1362634152173996,
0.22327640652656555,
0.038224637508392334,
0.08375474810600281,
0.0077710822224617004,
0.019864007830619812,
-0.23611387610435486,
-0.11986346542835236,
0.095601886510849,
0.21206100285053253,
-0.5457584261894226,
-0.4264361262321472,
-0.09183304756879807,
-0.2004866600036621,
0.1569828987121582,
-0.06462757289409637,
-0.04297325760126114,
-0.0988631397485733,
-0.21709132194519043,
-0.2330787181854248,
-0.01289720181375742,
0.22084273397922516,
-0.13609153032302856,
-0.019684135913848877,
-0.11425482481718063,
-0.08468027412891388,
0.4203273355960846,
0.3317066431045532,
-0.07461228966712952,
0.04677605628967285,
-0.19933763146400452,
0.3415541648864746,
0.28765541315078735,
-0.040250759571790695,
-0.8489016890525818,
0.27362433075904846,
-0.046151302754879,
0.3179972469806671,
0.11358156055212021,
0.0936850756406784,
-0.012098493054509163,
0.09861502051353455,
0.05960136651992798,
0.21109116077423096,
0.0724121555685997,
0.16988520324230194,
-0.19966216385364532,
-0.33295315504074097,
-0.02838864177465439,
0.1590505838394165,
0.05410478636622429,
0.1359463930130005,
0.18385055661201477,
-0.04453412443399429,
0.289162814617157,
-0.02627650275826454,
0.01800398901104927,
0.23368585109710693,
0.272754430770874,
0.2090260088443756,
0.10214684158563614,
-0.23141920566558838,
-0.3615787923336029,
0.3223057687282562,
-0.21957233548164368,
0.10022113472223282,
-0.015848152339458466,
-0.14869719743728638,
-0.3613639175891876,
-0.28247392177581787,
-0.14902237057685852,
0.13008227944374084,
0.08987989276647568,
0.3411877155303955,
0.3992164731025696,
0.040505532175302505,
-0.04598339647054672,
0.3040057420730591,
-0.12900108098983765,
0.0751190036535263,
-0.14075890183448792,
0.27499300241470337,
-0.03420791029930115,
-0.01598523184657097,
0.030126146972179413,
-0.01776871830224991,
0.16300584375858307,
0.036278922110795975,
-0.18745183944702148,
0.2895476520061493,
0.20951181650161743,
0.14282479882240295,
-0.08752024918794632,
0.2737722396850586,
-0.1594999134540558,
-0.07256479561328888,
0.02899179607629776,
0.49118712544441223,
0.14285439252853394,
-0.0163482204079628,
-0.1632610559463501,
0.3131430447101593,
0.07550793141126633,
0.006095506250858307,
0.037729471921920776,
0.15927456319332123,
0.37337055802345276,
-0.1345326155424118,
-0.08254488557577133,
-0.15182065963745117,
0.5095812082290649,
-0.3409506678581238,
0.20428620278835297,
0.011727102100849152,
-0.27683472633361816,
-0.06286094337701797,
0.24348244071006775,
-0.1203332245349884,
0.13074342906475067,
0.18533003330230713,
0.04703253507614136,
-0.07596799731254578,
-0.15245237946510315,
0.5569280385971069,
0.2706281542778015,
0.22486747801303864,
0.18611085414886475,
0.03036120906472206,
-0.06965087354183197,
-0.21904127299785614,
-0.04961796849966049,
0.22690318524837494,
0.1424948275089264,
0.5023207664489746,
0.27117517590522766,
0.04496004432439804,
-0.4356454312801361,
-0.06091021001338959,
0.04209975153207779,
0.3274988532066345,
-0.32108795642852783,
-0.11848267167806625,
-0.07401949167251587,
-0.31581783294677734,
-0.22192372381687164,
-0.12681323289871216,
-0.14411742985248566,
-0.446329265832901,
-0.10088004171848297,
0.3465780019760132,
0.01658569648861885,
0.06583791971206665,
-0.2468443661928177,
0.05642949044704437,
-0.042521897703409195,
-0.2394363433122635,
-0.13592317700386047,
0.25029900670051575,
-0.19677311182022095,
0.010874591767787933,
0.2604631781578064,
-0.03293232619762421,
0.31964150071144104,
-0.391743928194046,
-0.03261785954236984,
-0.7137264013290405,
-0.2451636791229248,
0.06358081847429276,
-0.2230633646249771,
0.23766660690307617,
0.286250501871109,
0.2511950135231018,
-0.27261507511138916,
0.012699647806584835,
0.12770134210586548,
-0.06589512526988983,
-0.38355574011802673,
0.28925952315330505,
-0.12026883661746979,
0.004103253595530987,
0.07608665525913239,
0.009130612015724182,
-0.22126375138759613,
-0.33927199244499207,
0.10557863116264343,
0.15357521176338196,
0.1743028163909912,
0.3875114619731903,
-0.13699492812156677,
0.09829321503639221,
-0.014452900737524033,
0.42502495646476746,
-0.28994378447532654,
-0.5708979964256287,
0.5505203604698181,
0.10472320020198822,
-0.43636780977249146,
0.06504279375076294,
-0.006888981908559799,
0.0403064601123333,
0.2376907467842102,
-0.5485625267028809,
-0.175759956240654,
-0.47500237822532654,
-0.01979265734553337,
0.20691660046577454,
0.08637712150812149,
0.24515631794929504,
-0.11927799135446548,
-0.07313477993011475,
-0.14276663959026337,
-0.20405332744121552,
0.16441914439201355,
0.045720651745796204,
0.24326881766319275,
-0.21868368983268738,
0.33145737648010254,
0.030098866671323776,
0.24556007981300354,
0.49934881925582886,
0.2258814424276352,
0.3620397746562958,
-0.01570487953722477,
0.10154367238283157,
-0.12468650192022324,
-0.2068132609128952,
-0.22093889117240906,
-0.1449074149131775,
-0.19079846143722534,
0.28845876455307007,
0.09232164174318314,
-0.025849005207419395,
-0.17141005396842957,
-0.2088155895471573,
-0.32718154788017273,
-0.0996699184179306,
-0.0835736021399498,
0.03743654862046242,
0.2761646509170532,
0.21418747305870056,
0.17351466417312622,
0.02331872656941414,
-0.41179734468460083,
-0.035950057208538055,
0.19156214594841003,
-0.1432245671749115,
-0.08619751781225204,
-0.12493155896663666,
0.06699779629707336,
-0.19411736726760864,
0.30623671412467957,
0.20489457249641418,
0.31327763199806213,
0.09187865257263184,
-0.0567602813243866,
0.08086330443620682,
-0.1370035707950592,
0.23501712083816528,
-0.31957951188087463,
0.24178430438041687,
-0.11738651990890503,
-0.09755252301692963,
-0.04004991799592972,
-0.13468044996261597,
-0.18394151329994202,
-0.006652523297816515,
0.1781342327594757,
0.21112824976444244,
-0.3331180810928345,
0.1802724152803421,
0.16220305860042572,
0.35551732778549194,
-0.07344505190849304,
-0.2499948889017105,
-0.36025270819664,
-0.3973379135131836,
-0.47306913137435913,
-0.0465521439909935,
-0.07807351648807526,
0.2964998483657837,
0.00577587028965354,
0.008306901901960373,
0.12369140982627869,
-0.060904644429683685,
0.3348432779312134,
-0.11783500015735626,
0.2964920699596405,
0.1444331258535385,
0.43108829855918884,
0.020804088562726974,
-0.252949982881546,
0.24282391369342804,
0.8506206274032593,
-0.11155802011489868,
-0.3002636730670929,
-0.02082391455769539,
-0.2596761882305145,
-0.1827901005744934,
0.2945629358291626,
-0.06982529163360596,
-0.15803512930870056,
0.5602293014526367,
-0.045953765511512756,
0.029553569853305817,
-0.18414348363876343,
0.2151620090007782,
0.15455149114131927,
-0.3614540994167328,
-0.38297080993652344,
0.2304239571094513,
0.19757969677448273,
-0.004677422344684601,
-0.003740668296813965,
0.07192300260066986,
0.01691126450896263,
0.27248865365982056,
-0.09370491653680801,
0.8974528908729553,
-0.05524589121341705,
0.11758945882320404,
0.18049520254135132,
-0.03261096030473709,
0.2929919362068176,
-0.12151819467544556,
0.006957944482564926,
-0.31332576274871826,
-0.3222326934337616,
-0.13472777605056763,
-0.160371795296669,
-0.029078103601932526,
0.07323864102363586,
-0.08669812977313995,
0.479954332113266,
-0.07983434945344925,
0.1357240080833435,
0.18392939865589142,
0.2583584189414978,
-0.3799641728401184,
0.014992970041930676,
-0.08801480382680893,
0.14437320828437805,
-0.15403607487678528,
0.4836394190788269,
-0.014065772294998169,
-0.03524313122034073,
-0.19933553040027618,
-0.06974414736032486,
-0.4931161403656006,
0.1923333704471588,
-0.1009213998913765,
-0.030927278101444244,
0.1258208304643631,
-0.04681041091680527,
-0.08201956748962402,
0.1417165994644165,
0.3609260320663452,
0.2172042429447174,
-0.3999873399734497,
0.09116531163454056,
0.4621311128139496,
-0.11980059742927551,
0.16167719662189484,
-0.16887445747852325,
0.39826086163520813,
-0.08860377967357635,
-0.08835187554359436,
0.02036099135875702,
0.030174024403095245,
-0.2782291769981384,
-0.10406875610351562,
-0.16732174158096313,
-0.22086144983768463,
-0.4374094307422638,
-0.31199443340301514,
-0.220615416765213,
-0.022059593349695206,
-0.33845412731170654,
0.1484306901693344,
0.3153916001319885,
-0.11709911376237869,
0.045221321284770966,
0.1356400102376938,
-0.3526616394519806,
-0.28949543833732605,
0.5082677006721497,
0.06656922399997711,
-0.21722862124443054,
0.4001295864582062,
0.21372611820697784,
-0.37201887369155884,
-0.20602962374687195,
-0.24808672070503235,
0.015485275536775589,
-0.5568869113922119,
0.1028466522693634,
-0.1460925191640854,
0.14394040405750275,
-0.19288082420825958,
0.6873809099197388,
0.3661983013153076,
0.06979940086603165,
0.0478508360683918,
-0.5624492764472961,
-0.08625470101833344,
0.007836863398551941,
0.19249501824378967,
0.2684265971183777,
-0.11066442728042603,
-0.1940048187971115,
0.11822815239429474,
-0.30498170852661133,
-0.3084527552127838,
0.09513396769762039,
-0.36771851778030396,
-0.2362300157546997,
0.025771450251340866,
0.04568886384367943,
0.21575592458248138,
-0.02526758424937725,
0.15246789157390594,
0.12209927290678024,
-0.13023443520069122,
-0.22903931140899658,
-0.09524466097354889,
0.12706002593040466,
0.10714728385210037,
-0.13452501595020294,
0.1926586627960205,
-0.24109578132629395,
-0.27479904890060425,
-0.0860033631324768,
-0.10771642625331879,
0.23229926824569702,
-0.006431058049201965,
-0.0020667221397161484,
0.403373658657074,
-0.08528032153844833,
-0.07539206743240356,
-0.010309793055057526,
-0.30132076144218445,
0.14770610630512238,
0.049876656383275986,
0.04649750888347626,
0.10966718196868896,
0.01571686565876007,
0.019007345661520958,
0.10128621011972427,
0.2976636290550232,
-0.12611663341522217,
0.2856268882751465,
-0.49334990978240967,
0.03499886021018028,
0.37914910912513733,
0.4438383877277374,
0.3468146324157715,
-0.3567603528499603,
-0.12225383520126343,
0.21931400895118713,
0.24582509696483612,
-0.30807095766067505,
-0.040192507207393646,
0.1209115982055664,
-0.15546530485153198,
0.08580219745635986,
0.18313589692115784,
0.28041091561317444,
-0.2571406662464142,
0.31849026679992676,
0.09237799793481827,
0.3009258210659027,
-0.1381950080394745,
-0.05756957083940506,
0.276933878660202,
0.04870137199759483,
-0.040664996951818466,
0.1509651392698288,
-0.088011234998703,
-0.23645782470703125,
-0.061256006360054016,
-0.0018635764718055725,
0.1562170833349228,
-0.13952404260635376,
0.25534486770629883,
-0.362796425819397,
-0.43434450030326843,
0.5834090113639832,
0.28078365325927734,
-0.10729065537452698,
0.010827567428350449,
0.09341011941432953,
0.4049907624721527,
0.06367325037717819,
0.4803867042064667,
-0.48382169008255005,
0.12429623305797577,
-0.14191290736198425,
-0.04819318279623985,
0.08562612533569336,
-0.34572523832321167,
-0.0336674340069294,
0.25997394323349,
-0.12453235685825348,
-0.053814180195331573,
0.17619383335113525,
0.02603989467024803,
-0.06620003283023834,
-0.5886387825012207,
-0.21443310379981995,
0.05566651374101639,
0.036891937255859375,
-0.36824461817741394,
0.3280429542064667,
0.006831824779510498,
-0.10714855790138245,
0.15430939197540283,
0.5266045928001404,
0.40514835715293884,
0.26894208788871765,
0.049749813973903656,
-0.046061206609010696,
-0.10302175581455231,
-0.06396674364805222,
-0.10547678917646408,
0.7308722138404846,
0.06666754186153412,
0.18393228948116302,
0.45251938700675964,
0.12511292099952698,
-0.23850470781326294,
-0.11845040321350098,
-0.19093529880046844,
-0.16591498255729675,
-0.20354770123958588,
0.5051548480987549,
-0.054609134793281555,
0.34099823236465454,
-0.23270085453987122,
0.030385836958885193,
-0.5357773303985596,
-0.20074689388275146,
0.14764352142810822,
0.04563483968377113,
0.14323264360427856,
0.01005882490426302,
0.09482848644256592,
-0.15580187737941742,
0.2976530194282532,
0.47380852699279785,
0.3946792185306549,
-0.2382066249847412,
-0.17043250799179077,
-0.7519159913063049,
0.24899715185165405,
-0.22980603575706482,
0.01741144247353077,
0.011271826922893524,
0.25487515330314636,
0.0063313692808151245,
0.14319446682929993,
0.22653828561306,
0.14724379777908325,
-0.2896074652671814,
0.09639225900173187,
-0.09629996120929718,
-0.15392275154590607,
0.1487317979335785,
-0.06579117476940155,
-0.14170759916305542,
-0.2585194408893585,
0.2292402684688568,
0.011226988397538662,
0.06664279103279114,
-0.09979652613401413,
-0.09539555013179779,
-0.13192307949066162,
-0.06980866938829422,
0.17151698470115662,
0.07039988040924072,
0.702363133430481,
-0.10016471892595291,
-0.19500009715557098,
-0.13632211089134216,
-0.06155383214354515,
-0.19642063975334167,
0.25394847989082336,
-0.035317499190568924,
0.37246671319007874,
0.027615563943982124,
-0.10689365863800049,
-0.207997664809227,
0.11938238143920898,
0.21415717899799347,
-0.30311256647109985,
-0.24129609763622284,
0.08206410706043243,
-0.216059148311615,
0.18233522772789001,
-0.17762652039527893,
0.07504092156887054,
0.19897273182868958,
0.22106577455997467,
-0.17981117963790894,
-0.41483941674232483,
0.5957764387130737,
-0.10847558081150055,
-0.19664674997329712,
-0.03641471639275551,
0.13481247425079346,
0.06607872247695923,
-0.325369268655777,
-0.7558810710906982,
0.1723077893257141,
0.2922213077545166,
0.043301768600940704,
-0.30468395352363586,
0.21042214334011078,
-0.2924982011318207,
0.1448926031589508,
0.0048214830458164215,
0.3195840120315552,
0.18153151869773865,
-0.21716609597206116,
0.06463943421840668,
-0.13977761566638947
] |
https://github.com/huggingface/datasets/issues/2641 | load_dataset("financial_phrasebank") NonMatchingChecksumError | Hi ! Loading the dataset works on my side as well.
Feel free to try again and let us know if it works for you know | ## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
| 26 | load_dataset("financial_phrasebank") NonMatchingChecksumError
## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
Hi ! Loading the dataset works on my side as well.
Feel free to try again and let us know if it works for you know | [
-0.11983361840248108,
0.1794109344482422,
-0.08838144689798355,
0.33969879150390625,
0.18796761333942413,
0.11738615483045578,
0.006067812442779541,
0.3996656835079193,
0.1419461965560913,
0.1976887583732605,
-0.1613846868276596,
0.24372774362564087,
0.23040367662906647,
-0.10897809267044067,
-0.09277454018592834,
0.14061444997787476,
0.13382214307785034,
0.0298897847533226,
0.034554798156023026,
-0.1668420135974884,
-0.18393105268478394,
0.3492649793624878,
-0.1968890130519867,
-0.1531038135290146,
-0.02556472085416317,
0.12776856124401093,
0.1105167418718338,
0.16471615433692932,
-0.24969695508480072,
-0.11283509433269501,
0.37320297956466675,
0.1607767790555954,
-0.07798518240451813,
0.4326269030570984,
-0.00011980133422184736,
-0.10419626533985138,
0.23497699201107025,
-0.017019599676132202,
-0.27026933431625366,
-0.3771180510520935,
-0.4048718214035034,
-0.5063533782958984,
0.01478167250752449,
-0.17797285318374634,
0.10074903815984726,
0.2671559751033783,
0.11917435377836227,
-0.07231035828590393,
0.09381532669067383,
0.1856914609670639,
0.19363544881343842,
0.1554284244775772,
0.04863615706562996,
-0.04125995561480522,
0.3124481439590454,
-0.2527003884315491,
-0.06519124656915665,
0.16221964359283447,
0.1873304843902588,
0.12674082815647125,
-0.2227669656276703,
0.1186726987361908,
-0.3079538941383362,
0.30044060945510864,
-0.03449639678001404,
0.010814141482114792,
0.046739205718040466,
-0.32647013664245605,
0.2752402126789093,
0.4079023003578186,
0.43255379796028137,
-0.18715113401412964,
-0.2944856286048889,
-0.1738472282886505,
-0.1533006876707077,
-0.0023671910166740417,
0.4001491069793701,
0.1629093885421753,
-0.22787414491176605,
-0.04638795927166939,
-0.3922572433948517,
0.2648792266845703,
0.05286058783531189,
0.21533584594726562,
0.05902989208698273,
0.048393018543720245,
-0.060972027480602264,
-0.11910679191350937,
0.1370474398136139,
-0.07547567039728165,
0.2253556102514267,
-0.3740886151790619,
-0.1097707748413086,
0.2610444128513336,
-0.420671284198761,
-0.061446115374565125,
-0.030306309461593628,
0.5376819968223572,
0.5291839838027954,
0.3535023331642151,
0.1522071808576584,
0.25143343210220337,
-0.24456728994846344,
0.046146243810653687,
0.020477768033742905,
0.2093229591846466,
0.06558572500944138,
-0.09437867254018784,
0.1245105117559433,
0.38729044795036316,
-0.1391386091709137,
0.18053781986236572,
-0.03683178871870041,
-0.04564625397324562,
0.6784499883651733,
0.018159756436944008,
0.1439570188522339,
-0.5884655714035034,
-0.3368139863014221,
0.45496639609336853,
-0.15174269676208496,
-0.11990830302238464,
-0.0062468042597174644,
0.30786722898483276,
-0.28311148285865784,
0.16855305433273315,
-0.10505983233451843,
0.13788248598575592,
-0.08046068996191025,
-0.15398354828357697,
-0.29575443267822266,
-0.1397237777709961,
-0.1504710465669632,
-0.06328334659337997,
0.22468237578868866,
-0.35655441880226135,
0.33523979783058167,
-0.051572978496551514,
0.2992814779281616,
-0.1967780739068985,
0.015907177701592445,
-0.11585347354412079,
-0.1921093463897705,
0.20232626795768738,
0.029857482761144638,
0.2005928009748459,
0.15499624609947205,
0.059726789593696594,
0.01335185021162033,
0.0879233330488205,
-0.2705896198749542,
-0.1324615329504013,
0.11088381707668304,
0.20539987087249756,
-0.5836597681045532,
-0.3937798738479614,
0.04517759382724762,
-0.2672809064388275,
0.24978289008140564,
-0.1411278396844864,
0.05445373058319092,
-0.1093120127916336,
-0.2154652327299118,
-0.26877808570861816,
-0.019984187558293343,
0.13693131506443024,
-0.16751804947853088,
-0.0077666789293289185,
-0.09424445033073425,
-0.1026170551776886,
0.5374273657798767,
0.2014998346567154,
-0.04169845208525658,
0.02853257581591606,
-0.20541460812091827,
0.2833970785140991,
0.39067187905311584,
-0.1673753410577774,
-0.8798971176147461,
0.25976309180259705,
-0.027319513261318207,
0.4781264066696167,
0.1399351954460144,
0.16004478931427002,
-0.05211795121431351,
0.06582131236791611,
0.10364139080047607,
0.11953294277191162,
0.07776901125907898,
0.1902896612882614,
-0.24744510650634766,
-0.3442922532558441,
0.03944704681634903,
0.15396027266979218,
0.04432499781250954,
0.1407003104686737,
0.18513360619544983,
-0.021084100008010864,
0.3947170376777649,
-0.04582994058728218,
-0.03270746022462845,
0.09459468722343445,
0.33417847752571106,
0.2300526201725006,
0.1512170433998108,
-0.31374186277389526,
-0.373969703912735,
0.318992018699646,
-0.2645716667175293,
0.0681859701871872,
0.014973387122154236,
-0.17033064365386963,
-0.38154909014701843,
-0.2504175007343292,
-0.2797926068305969,
0.12390926480293274,
0.07687529921531677,
0.3769243359565735,
0.3604225516319275,
-0.011744251474738121,
-0.04197105020284653,
0.3240380585193634,
-0.0933075025677681,
0.11794321984052658,
-0.18032769858837128,
0.28040459752082825,
0.03200852498412132,
-0.05064080283045769,
-0.12849649786949158,
0.09056615829467773,
0.19223523139953613,
0.11005230247974396,
-0.247399240732193,
0.3598937690258026,
0.24147509038448334,
0.06738963723182678,
-0.1680864691734314,
0.21456333994865417,
-0.17359468340873718,
-0.156068354845047,
-0.03036990575492382,
0.5238758325576782,
0.10827336460351944,
-0.0023802965879440308,
-0.01483166217803955,
0.2883142828941345,
0.07230111956596375,
0.038045868277549744,
-0.04398978129029274,
0.08570075035095215,
0.32627159357070923,
-0.16129738092422485,
-0.09348663687705994,
-0.20174790918827057,
0.4962552487850189,
-0.40733134746551514,
0.19810888171195984,
0.037977319210767746,
-0.29526329040527344,
-0.09915540367364883,
0.18289801478385925,
-0.11328046023845673,
0.16031114757061005,
0.11918716132640839,
0.024935748428106308,
-0.05444712191820145,
-0.10001745820045471,
0.5423452258110046,
0.30443793535232544,
0.21199801564216614,
0.1004113107919693,
0.1059403046965599,
-0.12250126153230667,
-0.17140857875347137,
-0.007275290787220001,
0.22831644117832184,
0.26619505882263184,
0.5490415096282959,
0.24146051704883575,
0.0022519854828715324,
-0.4095121920108795,
-0.030139947310090065,
-0.05528268963098526,
0.24403956532478333,
-0.43012282252311707,
-0.0997072160243988,
-0.16958197951316833,
-0.3729841411113739,
-0.27357515692710876,
-0.24975745379924774,
-0.1284099966287613,
-0.45852553844451904,
-0.08365179598331451,
0.2773178219795227,
0.05466717854142189,
0.11805634200572968,
-0.37742161750793457,
-0.012010186910629272,
-0.09482941776514053,
-0.22511371970176697,
-0.15111756324768066,
0.2100319266319275,
-0.19578030705451965,
-0.015423535369336605,
0.1645873337984085,
-0.04272635653614998,
0.25262853503227234,
-0.41173380613327026,
0.01652374118566513,
-0.6264848709106445,
-0.2493334412574768,
0.07065339386463165,
-0.1580808162689209,
0.20787206292152405,
0.3840276300907135,
0.13923129439353943,
-0.26323992013931274,
-0.07447256147861481,
0.220940962433815,
-0.03933803737163544,
-0.3720571994781494,
0.34365811944007874,
-0.09349548816680908,
0.014834081754088402,
0.1287028044462204,
-0.004067324101924896,
-0.23220942914485931,
-0.2908133566379547,
-0.01859903335571289,
0.10105486214160919,
0.22702978551387787,
0.3653256297111511,
-0.1820603907108307,
0.09776018559932709,
-0.11691223829984665,
0.49779030680656433,
-0.2711403965950012,
-0.5762321949005127,
0.5287804007530212,
0.1319567710161209,
-0.3189798593521118,
0.012340296059846878,
-0.01789676398038864,
0.060624897480010986,
0.27940452098846436,
-0.5194584131240845,
-0.1023494228720665,
-0.3720167875289917,
-0.029239464551210403,
0.1933087408542633,
0.06930568814277649,
0.18192096054553986,
0.0034624175168573856,
-0.054521456360816956,
-0.21126550436019897,
-0.14101769030094147,
0.13839106261730194,
-0.0830831378698349,
0.38952702283859253,
-0.2822097837924957,
0.29594886302948,
0.019822590053081512,
0.2290996015071869,
0.5105569362640381,
0.21022465825080872,
0.27906593680381775,
-0.022138500586152077,
0.07863253355026245,
-0.1357039213180542,
-0.25301527976989746,
-0.35911640524864197,
-0.09603904187679291,
-0.20275983214378357,
0.2613118290901184,
0.06720627844333649,
-0.04260241240262985,
-0.1346849650144577,
-0.1588946282863617,
-0.3620477020740509,
-0.10073137283325195,
-0.11169154942035675,
-0.10788804292678833,
0.2217814326286316,
0.22864341735839844,
0.19206860661506653,
-0.007441149093210697,
-0.46606844663619995,
-0.05608794093132019,
0.19574403762817383,
-0.22194239497184753,
-0.11901671439409256,
-0.18783089518547058,
0.052746232599020004,
-0.051920823752880096,
0.3516172170639038,
0.2311101257801056,
0.3435096740722656,
0.1457471251487732,
-0.16312754154205322,
0.0708230584859848,
-0.12495327740907669,
0.2933344841003418,
-0.33997872471809387,
0.26452672481536865,
-0.09139314293861389,
-0.13607078790664673,
-0.08742827922105789,
-0.168993279337883,
-0.1418352574110031,
0.006641412619501352,
0.19799543917179108,
0.2709627151489258,
-0.20726320147514343,
0.15207378566265106,
0.15959657728672028,
0.352571964263916,
-0.12525781989097595,
-0.36781811714172363,
-0.41356325149536133,
-0.26233357191085815,
-0.3545680344104767,
-0.11335628479719162,
-0.24033671617507935,
0.3150269091129303,
0.06034526973962784,
-0.04138489067554474,
0.10935605317354202,
-0.052159857004880905,
0.41513365507125854,
-0.06014051288366318,
0.32452577352523804,
0.049405667930841446,
0.4183500409126282,
-0.02340998500585556,
-0.1006493866443634,
0.24927712976932526,
0.7642984390258789,
-0.1491083949804306,
-0.42216527462005615,
-0.1268506944179535,
-0.25713852047920227,
-0.036470599472522736,
0.24822410941123962,
-0.11500824242830276,
-0.12688690423965454,
0.5341652631759644,
-0.16082975268363953,
0.06935466080904007,
-0.2341209501028061,
0.12690351903438568,
0.19645795226097107,
-0.36611461639404297,
-0.3686046302318573,
0.19636473059654236,
0.18175941705703735,
-0.054231926798820496,
-0.033306047320365906,
-0.017497189342975616,
-0.06651107221841812,
0.3405209183692932,
-0.05974597483873367,
0.9199488162994385,
0.04241669923067093,
0.12593133747577667,
0.1951054334640503,
-0.05166638270020485,
0.30477437376976013,
-0.10513229668140411,
0.02030152827501297,
-0.3845823109149933,
-0.3679984211921692,
-0.1337032914161682,
-0.23278680443763733,
0.015421442687511444,
0.07597802579402924,
-0.06337857246398926,
0.49163302779197693,
-0.1382281333208084,
0.08971206843852997,
0.16433924436569214,
0.07082093507051468,
-0.274777352809906,
0.04892192780971527,
-0.08069341629743576,
0.11888951063156128,
-0.20446060597896576,
0.4700181782245636,
-0.05999166890978813,
0.03785255178809166,
-0.2523473799228668,
-0.03251476213335991,
-0.38826388120651245,
0.3136295676231384,
-0.09004126489162445,
0.006835068576037884,
0.1810777634382248,
-0.05990235507488251,
-0.11713744699954987,
0.20418798923492432,
0.34893327951431274,
0.21619771420955658,
-0.33887702226638794,
0.03610687702894211,
0.6333321928977966,
0.028817761689424515,
0.25527557730674744,
-0.13955777883529663,
0.38174107670783997,
-0.031974587589502335,
-0.15427374839782715,
0.03701598197221756,
0.03703093156218529,
-0.331062912940979,
-0.026652425527572632,
-0.22565530240535736,
-0.05559760332107544,
-0.44163620471954346,
-0.3367222547531128,
-0.23617371916770935,
0.08366163074970245,
-0.3581356108188629,
0.14542357623577118,
0.2794802188873291,
-0.19105768203735352,
0.10480346530675888,
0.09022803604602814,
-0.42492443323135376,
-0.19864121079444885,
0.510945200920105,
0.13011980056762695,
-0.25815609097480774,
0.3898145854473114,
0.12990884482860565,
-0.3723614811897278,
-0.1800108551979065,
-0.18823952972888947,
-0.0007802087347954512,
-0.5864368677139282,
0.005312512628734112,
-0.16096481680870056,
0.13228292763233185,
-0.1549677848815918,
0.6723014712333679,
0.4406668543815613,
0.0752781555056572,
0.032201822847127914,
-0.5120888352394104,
-0.11799829453229904,
0.04608962684869766,
0.2858416736125946,
0.28090402483940125,
-0.09239459037780762,
-0.2369220107793808,
0.04205693304538727,
-0.32041406631469727,
-0.28944629430770874,
0.027953116223216057,
-0.3091946542263031,
-0.19011448323726654,
-0.127556711435318,
0.1389646977186203,
0.15910650789737701,
-0.02356879413127899,
0.16289891302585602,
0.10893435776233673,
-0.1183578222990036,
-0.22951418161392212,
-0.055268544703722,
0.14344623684883118,
0.11181720346212387,
-0.15792258083820343,
0.16409675776958466,
-0.15748979151248932,
-0.13482622802257538,
-0.10072331130504608,
-0.1353990137577057,
0.25226908922195435,
0.02098388597369194,
0.1265067458152771,
0.43979835510253906,
-0.046628519892692566,
-0.10417741537094116,
0.004940755665302277,
-0.3345201909542084,
0.12648367881774902,
0.00967482477426529,
-0.009626813232898712,
-0.019408466294407845,
-0.025675825774669647,
0.09814395010471344,
0.1202697604894638,
0.29927778244018555,
-0.0745696872472763,
0.3204854726791382,
-0.5192996859550476,
0.04082570597529411,
0.44135716557502747,
0.32207557559013367,
0.32905080914497375,
-0.3597913980484009,
-0.16259004175662994,
0.1890527307987213,
0.24222296476364136,
-0.33308178186416626,
-0.026663629338145256,
0.18442031741142273,
-0.11384082585573196,
0.04578132554888725,
0.2178555428981781,
0.20199495553970337,
-0.3238886594772339,
0.36651426553726196,
0.05213487893342972,
0.3090810477733612,
-0.17898587882518768,
0.03767307475209236,
0.4241368770599365,
0.026364166289567947,
0.011183109134435654,
0.08064987510442734,
-0.12899373471736908,
-0.24660542607307434,
-0.010965302586555481,
0.06563042849302292,
0.23676463961601257,
-0.08834146708250046,
0.21062467992305756,
-0.3246667981147766,
-0.36851823329925537,
0.5605854392051697,
0.2961850166320801,
-0.11805948615074158,
0.008645206689834595,
0.16438308358192444,
0.41162997484207153,
0.1224045380949974,
0.4931638240814209,
-0.4444054961204529,
0.05533324554562569,
-0.17627471685409546,
-0.06258305162191391,
-0.024395732209086418,
-0.3048769235610962,
0.014393500983715057,
0.1418551504611969,
-0.21413198113441467,
0.0696999654173851,
0.16987591981887817,
0.018070314079523087,
-0.029125027358531952,
-0.538227915763855,
-0.18063253164291382,
0.07539018988609314,
0.0018890127539634705,
-0.36477917432785034,
0.3437759578227997,
0.047611936926841736,
-0.07407635450363159,
0.18847696483135223,
0.5166018605232239,
0.3630858063697815,
0.3304816782474518,
0.05722174420952797,
-0.1468570977449417,
-0.10634563863277435,
-0.04530835151672363,
-0.10671502351760864,
0.7710251212120056,
0.089290551841259,
0.19641995429992676,
0.4270017445087433,
0.12177234888076782,
-0.20610854029655457,
-0.07853925228118896,
-0.0745917409658432,
-0.13731235265731812,
-0.09800784289836884,
0.6256076097488403,
-0.028387635946273804,
0.311757892370224,
-0.12542420625686646,
0.08713918924331665,
-0.5139366984367371,
-0.17036230862140656,
0.22158139944076538,
0.11663071066141129,
0.14531558752059937,
0.07132989913225174,
0.0824284479022026,
-0.1198960691690445,
0.23209042847156525,
0.4119340181350708,
0.30598607659339905,
-0.282814621925354,
-0.18406802415847778,
-0.7421244978904724,
0.38186800479888916,
-0.1460011601448059,
0.046047672629356384,
0.032015714794397354,
0.21921406686306,
0.05515534058213234,
0.13895192742347717,
0.25699275732040405,
0.05523258447647095,
-0.3129648268222809,
0.1226777657866478,
-0.08734886348247528,
-0.17400263249874115,
0.14115945994853973,
-0.07592625170946121,
-0.17135436832904816,
-0.29097533226013184,
0.20075201988220215,
0.10117752104997635,
0.07879319041967392,
-0.08704320341348648,
-0.14613348245620728,
-0.07502897828817368,
-0.04258792847394943,
0.15973207354545593,
0.020474476739764214,
0.6913187503814697,
-0.0852559506893158,
-0.1843099445104599,
-0.08076143264770508,
-0.13667547702789307,
-0.14035345613956451,
0.35395997762680054,
-0.0689118504524231,
0.33791738748550415,
0.0062353163957595825,
-0.030395079404115677,
-0.16037245094776154,
0.006934553384780884,
0.20290786027908325,
-0.40472131967544556,
-0.29472172260284424,
0.1081533282995224,
-0.1863497793674469,
0.11586868762969971,
-0.19770246744155884,
0.06922093033790588,
0.18685606122016907,
0.3272363841533661,
-0.12603861093521118,
-0.3980073928833008,
0.6327152848243713,
-0.10716432332992554,
-0.22570542991161346,
-0.08753465116024017,
0.18512728810310364,
-0.06244129687547684,
-0.28968173265457153,
-0.737183690071106,
0.05270925909280777,
0.38873013854026794,
0.055881567299366,
-0.22276942431926727,
0.17169421911239624,
-0.293539822101593,
0.18155845999717712,
-0.019017396494746208,
0.28851622343063354,
0.176771879196167,
-0.18691663444042206,
0.04732295498251915,
-0.24154551327228546
] |
https://github.com/huggingface/datasets/issues/2641 | load_dataset("financial_phrasebank") NonMatchingChecksumError | Thank you! I've been trying periodically for the past month, and no luck yet with this particular dataset. Just tried again and still hitting the checksum error.
Code:
`dataset = load_dataset("financial_phrasebank", "sentences_allagree") `
Traceback:
```
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-2-55cc2144f31e> in <module>
----> 1 dataset = load_dataset("financial_phrasebank", "sentences_allagree")
/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
859 ignore_verifications=ignore_verifications,
860 try_from_hf_gcs=try_from_hf_gcs,
--> 861 use_auth_token=use_auth_token,
862 )
863
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
582 if not downloaded_from_gcs:
583 self._download_and_prepare(
--> 584 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
585 )
586 # Sync info
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
642 if verify_infos:
643 verify_checksums(
--> 644 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files"
645 )
646
/opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
38 if len(bad_urls) > 0:
39 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls))
41 logger.info("All the checksums matched successfully" + for_verification_name)
42
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
``` | ## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
| 174 | load_dataset("financial_phrasebank") NonMatchingChecksumError
## Describe the bug
Attempting to download the financial_phrasebank dataset results in a NonMatchingChecksumError
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("financial_phrasebank", 'sentences_allagree')
```
## Expected results
I expect to see the financial_phrasebank dataset downloaded successfully
## Actual results
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-4.14.232-177.418.amzn2.x86_64-x86_64-with-debian-10.6
- Python version: 3.7.10
- PyArrow version: 4.0.1
Thank you! I've been trying periodically for the past month, and no luck yet with this particular dataset. Just tried again and still hitting the checksum error.
Code:
`dataset = load_dataset("financial_phrasebank", "sentences_allagree") `
Traceback:
```
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-2-55cc2144f31e> in <module>
----> 1 dataset = load_dataset("financial_phrasebank", "sentences_allagree")
/opt/conda/lib/python3.7/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, streaming, **config_kwargs)
859 ignore_verifications=ignore_verifications,
860 try_from_hf_gcs=try_from_hf_gcs,
--> 861 use_auth_token=use_auth_token,
862 )
863
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
582 if not downloaded_from_gcs:
583 self._download_and_prepare(
--> 584 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
585 )
586 # Sync info
/opt/conda/lib/python3.7/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
642 if verify_infos:
643 verify_checksums(
--> 644 self.info.download_checksums, dl_manager.get_recorded_sizes_checksums(), "dataset source files"
645 )
646
/opt/conda/lib/python3.7/site-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
38 if len(bad_urls) > 0:
39 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 40 raise NonMatchingChecksumError(error_msg + str(bad_urls))
41 logger.info("All the checksums matched successfully" + for_verification_name)
42
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://www.researchgate.net/profile/Pekka_Malo/publication/251231364_FinancialPhraseBank-v10/data/0c96051eee4fb1d56e000000/FinancialPhraseBank-v10.zip']
``` | [
-0.1219041496515274,
0.2504365146160126,
-0.06328262388706207,
0.3291987180709839,
0.16331961750984192,
0.130601167678833,
0.02943124622106552,
0.3981846570968628,
0.10427387058734894,
0.10010794550180435,
-0.23703093826770782,
0.2519075274467468,
0.24082158505916595,
-0.18088652193546295,
-0.13947167992591858,
0.14047719538211823,
0.10747317969799042,
0.043175168335437775,
-0.013817980885505676,
-0.0908905491232872,
-0.1074007898569107,
0.2812156677246094,
-0.21454711258411407,
-0.20221056044101715,
-0.025687241926789284,
0.08639319986104965,
0.11048966646194458,
0.07201041281223297,
-0.26582685112953186,
-0.13488955795764923,
0.49202626943588257,
0.1678614765405655,
-0.07267406582832336,
0.4778307378292084,
-0.0001244328304892406,
-0.051994308829307556,
0.27157390117645264,
-0.04863367974758148,
-0.356780081987381,
-0.37078744173049927,
-0.453424334526062,
-0.46621963381767273,
-0.043372370302677155,
-0.2014852613210678,
0.13786810636520386,
0.3529539406299591,
0.14451512694358826,
-0.12618732452392578,
0.054510291665792465,
0.17452985048294067,
0.13974927365779877,
0.247865229845047,
0.146776482462883,
0.034986063838005066,
0.2998352646827698,
-0.19095931947231293,
-0.11348956823348999,
0.27035191655158997,
0.14605776965618134,
0.0511573851108551,
-0.20772242546081543,
0.10880732536315918,
-0.3613066077232361,
0.3707383871078491,
-0.0008353777229785919,
0.06891666352748871,
0.058834612369537354,
-0.2889934182167053,
0.21376532316207886,
0.35743463039398193,
0.4351555407047272,
-0.21873340010643005,
-0.3650902211666107,
-0.12399435043334961,
-0.20846842229366302,
-0.04632148891687393,
0.41735410690307617,
0.16478434205055237,
-0.2831152081489563,
-0.06299740076065063,
-0.4683903753757477,
0.27760156989097595,
-0.00927792489528656,
0.23450306057929993,
0.03265047073364258,
0.062035366892814636,
-0.018513023853302002,
-0.07872716337442398,
0.19150346517562866,
-0.061874084174633026,
0.26586613059043884,
-0.3590574264526367,
-0.03918606415390968,
0.2633780539035797,
-0.41608503460884094,
-0.10001623630523682,
-0.07440610975027084,
0.4421424865722656,
0.4887322783470154,
0.419053852558136,
0.18087877333164215,
0.160891592502594,
-0.182338684797287,
0.09546169638633728,
0.05090034008026123,
0.1860755980014801,
0.043060801923274994,
0.019263509660959244,
0.17986488342285156,
0.41344958543777466,
-0.10694359242916107,
0.16260278224945068,
-0.0692649781703949,
-0.0316094234585762,
0.7316479086875916,
0.009483983740210533,
0.2204509824514389,
-0.6202268600463867,
-0.3789450228214264,
0.4553827941417694,
-0.16313819587230682,
-0.17401598393917084,
0.04855665937066078,
0.2002510130405426,
-0.312951922416687,
0.1997928023338318,
-0.060188356786966324,
0.0835544541478157,
-0.07940851897001266,
-0.17340584099292755,
-0.22657018899917603,
-0.05891064926981926,
-0.12272271513938904,
0.03202550858259201,
0.31397387385368347,
-0.32501426339149475,
0.301709920167923,
-0.058596912771463394,
0.3189166784286499,
-0.1349216103553772,
0.1294146478176117,
-0.1472216099500656,
-0.17779314517974854,
0.32437920570373535,
-0.06084044277667999,
0.19005286693572998,
0.17798379063606262,
0.06997144222259521,
-0.11060215532779694,
0.15080112218856812,
-0.215724915266037,
-0.14491088688373566,
0.00848475843667984,
0.12882961332798004,
-0.6136752963066101,
-0.3836398422718048,
0.07472720742225647,
-0.417157918214798,
0.3301469385623932,
-0.23647886514663696,
0.05976741015911102,
-0.1355563998222351,
-0.20996969938278198,
-0.23266267776489258,
0.02240222506225109,
0.18676131963729858,
-0.11508285999298096,
0.06421072781085968,
-0.12378901988267899,
-0.081536665558815,
0.5374081134796143,
0.20216695964336395,
-0.011569307185709476,
0.01983218640089035,
-0.19813738763332367,
0.1501958966255188,
0.22727514803409576,
-0.15796492993831635,
-0.8371691703796387,
0.2042018622159958,
0.043803028762340546,
0.5060786008834839,
0.11317268013954163,
0.19068370759487152,
-0.05193968862295151,
0.09216979891061783,
0.16588298976421356,
0.08204178512096405,
-0.02658773399889469,
0.084858737885952,
-0.23684567213058472,
-0.3326885402202606,
0.14462661743164062,
0.2096131294965744,
0.05113907903432846,
0.14553722739219666,
0.14115001261234283,
0.032155442982912064,
0.2999107837677002,
-0.03403094783425331,
-0.011776445433497429,
0.05323085933923721,
0.45308640599250793,
0.17207834124565125,
0.09318549185991287,
-0.363153338432312,
-0.4774754047393799,
0.28873834013938904,
-0.16491100192070007,
0.07056260108947754,
-0.09167785942554474,
-0.0877334475517273,
-0.385681688785553,
-0.2757384777069092,
-0.21656157076358795,
0.17427292466163635,
0.01956121250987053,
0.38248690962791443,
0.375399649143219,
-0.06750412285327911,
-0.04576467350125313,
0.4224551022052765,
-0.14184187352657318,
0.1107594296336174,
-0.2753629982471466,
0.3411248028278351,
-0.008216625079512596,
-0.05344874784350395,
-0.08309244364500046,
0.05141088739037514,
0.14452677965164185,
0.060413531959056854,
-0.21133005619049072,
0.3504084646701813,
0.2670069932937622,
-0.05311819911003113,
-0.17560294270515442,
0.2846330404281616,
-0.14557668566703796,
-0.1669679582118988,
-0.04297861456871033,
0.5265862345695496,
0.091802679002285,
-0.01793619617819786,
-0.05864424258470535,
0.35159456729888916,
-0.024047281593084335,
0.04812270775437355,
-0.06882274150848389,
0.14170192182064056,
0.35582849383354187,
-0.1717814952135086,
-0.1814335584640503,
-0.1569630205631256,
0.5086336731910706,
-0.2532767951488495,
0.13408666849136353,
0.042463723570108414,
-0.21523214876651764,
-0.13378483057022095,
0.105900838971138,
-0.12580633163452148,
0.10818102955818176,
0.1274552047252655,
0.11383234709501266,
-0.026365112513303757,
-0.044639043509960175,
0.4975655972957611,
0.3507775664329529,
0.15262964367866516,
0.14896568655967712,
0.1117483600974083,
-0.2153274565935135,
-0.06402143836021423,
-0.04538515955209732,
0.18302753567695618,
0.2811231315135956,
0.5960564017295837,
0.22876586019992828,
0.022712308913469315,
-0.38970473408699036,
-0.16366559267044067,
-0.048549048602581024,
0.3402174115180969,
-0.4080103933811188,
-0.05833663046360016,
-0.247799351811409,
-0.20786795020103455,
-0.29767388105392456,
-0.344523161649704,
-0.2360512912273407,
-0.46606186032295227,
-0.11717256903648376,
0.45180609822273254,
0.08961448073387146,
0.1947266161441803,
-0.538322925567627,
0.019480213522911072,
-0.049649931490421295,
-0.3143506646156311,
-0.16389217972755432,
0.13016313314437866,
-0.13653355836868286,
-0.05996203050017357,
0.3283936679363251,
-0.03349395841360092,
0.2559363543987274,
-0.4378318190574646,
0.0011310316622257233,
-0.569376528263092,
-0.30584195256233215,
-0.011247381567955017,
-0.09501779079437256,
0.23265378177165985,
0.3062494993209839,
0.19372430443763733,
-0.23374636471271515,
-0.21114224195480347,
0.1895802766084671,
-0.0036037415266036987,
-0.3972529470920563,
0.34699344635009766,
-0.16436345875263214,
0.03636639192700386,
0.13481441140174866,
-0.03908846527338028,
-0.193068265914917,
-0.23758265376091003,
-0.020974576473236084,
0.11288060247898102,
0.26172077655792236,
0.38317951560020447,
-0.1477775275707245,
0.1182781234383583,
-0.12505003809928894,
0.5495762825012207,
-0.2225157469511032,
-0.6153045296669006,
0.6148754358291626,
0.15102428197860718,
-0.2769509553909302,
0.06005086377263069,
-0.04394092410802841,
0.11415985226631165,
0.3257278800010681,
-0.5195679068565369,
-0.11781341582536697,
-0.31529736518859863,
-0.0033044591546058655,
0.18808899819850922,
0.033629484474658966,
0.18436214327812195,
-0.02210155501961708,
0.0029330868273973465,
-0.16384655237197876,
-0.2238500714302063,
0.1285644769668579,
-0.000764843076467514,
0.42409029603004456,
-0.2705939710140228,
0.27519017457962036,
0.012868564575910568,
0.23596733808517456,
0.5632447600364685,
0.17028798162937164,
0.1899775266647339,
0.011248849332332611,
0.12867404520511627,
-0.12157627195119858,
-0.28594475984573364,
-0.34536609053611755,
-0.13486862182617188,
-0.21408526599407196,
0.11198914796113968,
0.024002045392990112,
-0.09198133647441864,
-0.17869998514652252,
-0.11643055081367493,
-0.28104856610298157,
-0.12575596570968628,
-0.07352671027183533,
-0.12981505692005157,
0.2713858485221863,
0.1732885241508484,
0.1204104796051979,
-0.08613647520542145,
-0.47925153374671936,
-0.08387556672096252,
0.2706716060638428,
-0.21831631660461426,
-0.07338274270296097,
-0.18700143694877625,
0.03893860802054405,
-0.022825412452220917,
0.3018488883972168,
0.24468876421451569,
0.502172589302063,
0.1392093151807785,
-0.14951592683792114,
0.004543624818325043,
-0.14194196462631226,
0.2533034682273865,
-0.28258395195007324,
0.27477192878723145,
0.0071259718388319016,
-0.14876005053520203,
-0.029389210045337677,
-0.18783801794052124,
-0.1596636176109314,
0.006762189324945211,
0.23660486936569214,
0.3087536096572876,
-0.2637108266353607,
0.16304263472557068,
0.28670161962509155,
0.3816690444946289,
-0.07852151244878769,
-0.35038256645202637,
-0.41512158513069153,
-0.25879549980163574,
-0.32489216327667236,
-0.043484367430210114,
-0.18860550224781036,
0.34318768978118896,
0.10906097292900085,
0.006323430687189102,
0.08530022948980331,
-0.01855553314089775,
0.40095603466033936,
-0.005348621867597103,
0.23462390899658203,
0.08730663359165192,
0.4733595848083496,
0.018309887498617172,
-0.10448881983757019,
0.2621963620185852,
0.7463154196739197,
-0.1263418197631836,
-0.39050009846687317,
-0.06016988307237625,
-0.21824495494365692,
-0.08930347114801407,
0.15728110074996948,
-0.024759352207183838,
-0.19627752900123596,
0.5755326747894287,
-0.20400391519069672,
0.09693638980388641,
-0.2935262620449066,
0.06068659573793411,
0.18350668251514435,
-0.4045853018760681,
-0.31513816118240356,
0.1746530830860138,
0.15045465528964996,
-0.004304096102714539,
0.11257223784923553,
-0.03746210038661957,
0.01851353421807289,
0.19665084779262543,
0.04529619216918945,
0.931977391242981,
0.05433295667171478,
0.0852784812450409,
0.15116649866104126,
-0.12259545922279358,
0.19171938300132751,
-0.03832816705107689,
0.03851400315761566,
-0.3248586356639862,
-0.3994268476963043,
-0.14228825271129608,
-0.2868812084197998,
0.15568314492702484,
0.041933078318834305,
-0.06734730303287506,
0.42791494727134705,
-0.04807720333337784,
0.17228704690933228,
0.15311504900455475,
-0.00039985403418540955,
-0.248152494430542,
0.06846511363983154,
-0.054443053901195526,
0.09035132825374603,
-0.23296089470386505,
0.48039373755455017,
-0.03460507094860077,
0.03291117772459984,
-0.2976817786693573,
-0.055048130452632904,
-0.4033454656600952,
0.26588281989097595,
-0.012809552252292633,
0.04641532897949219,
0.3049306869506836,
-0.08832551538944244,
-0.09860700368881226,
0.06679899990558624,
0.3115852177143097,
0.09231936186552048,
-0.33782875537872314,
-0.049736324697732925,
0.5200314521789551,
0.01602252945303917,
0.2511168420314789,
-0.1807616651058197,
0.379658043384552,
-0.03394569829106331,
-0.12295839935541153,
0.053332965821027756,
0.054515764117240906,
-0.41569942235946655,
0.15361985564231873,
-0.20631106197834015,
-0.07173673808574677,
-0.3756565749645233,
-0.2514217793941498,
-0.19476377964019775,
0.10447682440280914,
-0.33857330679893494,
0.10921354591846466,
0.2938651740550995,
-0.16723592579364777,
0.1314905285835266,
0.03177259862422943,
-0.35526204109191895,
-0.16967585682868958,
0.5675473213195801,
0.17598402500152588,
-0.30295416712760925,
0.3590080142021179,
0.06067051365971565,
-0.40593254566192627,
-0.1437842845916748,
-0.1519136130809784,
-0.12607577443122864,
-0.5568311214447021,
0.003629508428275585,
-0.22601652145385742,
0.2084527164697647,
-0.16190727055072784,
0.5562611222267151,
0.4231029152870178,
0.060546740889549255,
0.09637156128883362,
-0.5787783861160278,
-0.18463273346424103,
0.05215354636311531,
0.2902793884277344,
0.32824015617370605,
-0.2014424204826355,
-0.16807906329631805,
0.036143191158771515,
-0.2816241681575775,
-0.229026198387146,
0.016598735004663467,
-0.322854608297348,
-0.14374612271785736,
-0.10013755410909653,
0.08945716172456741,
0.11470901966094971,
0.010799556970596313,
0.12131063640117645,
0.08766251802444458,
-0.14289362728595734,
-0.15187236666679382,
-0.10980798304080963,
0.16906732320785522,
0.11867956072092056,
-0.1569393426179886,
0.24704104661941528,
-0.1336452066898346,
-0.13502295315265656,
-0.09562046825885773,
-0.23086947202682495,
0.2656274437904358,
0.003949016332626343,
0.1658155620098114,
0.4067257344722748,
-0.06676153093576431,
-0.10096301138401031,
-0.017544671893119812,
-0.3136404752731323,
0.09984330087900162,
0.0851508304476738,
0.0601077601313591,
-0.024116434156894684,
0.001869991421699524,
0.10257714241743088,
0.10029235482215881,
0.13743841648101807,
-0.17239046096801758,
0.3762362003326416,
-0.48068034648895264,
0.039581310003995895,
0.4147223234176636,
0.313961923122406,
0.41340819001197815,
-0.2964341640472412,
-0.14438198506832123,
0.2171419858932495,
0.18169158697128296,
-0.36610081791877747,
-0.020809298381209373,
0.3057403266429901,
-0.088687963783741,
0.04597229138016701,
0.21803778409957886,
0.09813322126865387,
-0.4027267396450043,
0.506294846534729,
0.07321085780858994,
0.2739267647266388,
-0.2543124556541443,
0.08857510983943939,
0.4516225755214691,
0.05087534710764885,
-0.02885158732533455,
0.18169942498207092,
-0.1374540477991104,
-0.1385573148727417,
-0.0538746640086174,
0.0023304373025894165,
0.1581181436777115,
-0.1749134361743927,
0.2445433884859085,
-0.3738253116607666,
-0.33133465051651,
0.43535229563713074,
0.31040143966674805,
-0.02273544669151306,
0.018237099051475525,
0.14799216389656067,
0.32040953636169434,
0.03827439993619919,
0.4804668724536896,
-0.4871775209903717,
0.02089782990515232,
-0.1371549665927887,
-0.003139411099255085,
-0.1264350414276123,
-0.306162029504776,
-0.012793406844139099,
0.18619777262210846,
-0.1569746732711792,
0.05002037435770035,
0.3224601149559021,
0.06318272650241852,
-0.09631314873695374,
-0.5983762145042419,
-0.1321241557598114,
0.08315996825695038,
-0.0296672061085701,
-0.3643825948238373,
0.3487524092197418,
0.09356756508350372,
-0.13446380198001862,
0.10596193373203278,
0.4878089129924774,
0.38323676586151123,
0.35552799701690674,
0.1230696439743042,
-0.058242980390787125,
-0.1259450912475586,
-0.05715254321694374,
-0.044296517968177795,
0.8251371383666992,
0.06317925453186035,
0.11446438729763031,
0.3569461405277252,
0.08081316947937012,
-0.1470835953950882,
-0.009499695152044296,
-0.13336803019046783,
-0.220253124833107,
-0.06710776686668396,
0.6605433225631714,
0.017865747213363647,
0.27883973717689514,
-0.052564702928066254,
0.06358270347118378,
-0.39882978796958923,
-0.22116456925868988,
0.170447438955307,
0.1211584210395813,
0.09412339329719543,
0.15477178990840912,
0.04186440259218216,
-0.17780759930610657,
0.223585307598114,
0.3849758505821228,
0.22848257422447205,
-0.3141389489173889,
-0.2495037466287613,
-0.8176968693733215,
0.3130857050418854,
-0.21408745646476746,
-0.013297077268362045,
0.10578730702400208,
0.21921294927597046,
0.03268144279718399,
0.20042598247528076,
0.221034973859787,
-0.0831790640950203,
-0.28143876791000366,
0.11789374053478241,
-0.1038769781589508,
-0.18483825027942657,
0.1755460500717163,
-0.08947179466485977,
-0.17638252675533295,
-0.30683600902557373,
0.18460270762443542,
0.17327943444252014,
0.03282156586647034,
-0.03668385371565819,
-0.12157388776540756,
-0.012953728437423706,
0.10752800107002258,
0.09821514785289764,
0.005804042331874371,
0.744156002998352,
0.0030069611966609955,
-0.20145222544670105,
-0.11333699524402618,
-0.11369113624095917,
-0.10945569723844528,
0.3623201251029968,
-0.06145738437771797,
0.372808039188385,
-0.00012639164924621582,
-0.03321152552962303,
-0.19792436063289642,
0.18345141410827637,
0.12079617381095886,
-0.41667747497558594,
-0.2454313039779663,
0.14119713008403778,
-0.20585155487060547,
0.18009315431118011,
-0.26658231019973755,
0.032294925302267075,
0.19596147537231445,
0.4007236659526825,
-0.21571475267410278,
-0.3244050145149231,
0.6163963079452515,
-0.18732520937919617,
-0.23345035314559937,
-0.08662215620279312,
0.12301883101463318,
-0.22332754731178284,
-0.26451578736305237,
-0.7100587487220764,
0.08795144408941269,
0.4004306197166443,
0.014068426564335823,
-0.22925038635730743,
0.24373799562454224,
-0.283145934343338,
0.19639308750629425,
-0.02415028214454651,
0.40233176946640015,
0.10485498607158661,
-0.21672466397285461,
0.004747159779071808,
-0.20925593376159668
] |
https://github.com/huggingface/datasets/issues/2630 | Progress bars are not properly rendered in Jupyter notebook | To add my experience when trying to debug this issue:
Seems like previously the workaround given [here](https://github.com/tqdm/tqdm/issues/485#issuecomment-473338308) worked around this issue. But with the latest version of jupyter/tqdm I still get terminal warnings that IPython tried to send a message from a forked process. | ## Describe the bug
The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal).
## Steps to reproduce the bug
```python
ds.map(tokenize, num_proc=10)
```
## Expected results
Jupyter widgets displaying the progress bars.
## Actual results
Simple plane progress bars.
cc: Reported by @thomwolf | 44 | Progress bars are not properly rendered in Jupyter notebook
## Describe the bug
The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal).
## Steps to reproduce the bug
```python
ds.map(tokenize, num_proc=10)
```
## Expected results
Jupyter widgets displaying the progress bars.
## Actual results
Simple plane progress bars.
cc: Reported by @thomwolf
To add my experience when trying to debug this issue:
Seems like previously the workaround given [here](https://github.com/tqdm/tqdm/issues/485#issuecomment-473338308) worked around this issue. But with the latest version of jupyter/tqdm I still get terminal warnings that IPython tried to send a message from a forked process. | [
0.1817360371351242,
0.026652365922927856,
-0.004884393885731697,
0.056550975888967514,
0.11842585355043411,
-0.3483627438545227,
0.5567895174026489,
0.4173838496208191,
-0.2593967318534851,
0.002457655966281891,
-0.21256756782531738,
0.6025975346565247,
0.2658940553665161,
0.16721603274345398,
0.0038396641612052917,
-0.2379225194454193,
-0.1584530770778656,
0.1034996435046196,
-0.3469724655151367,
0.0024842098355293274,
-0.28962647914886475,
0.19180378317832947,
-0.2716614603996277,
0.3635062575340271,
-0.4041294753551483,
0.003033895045518875,
0.07437300682067871,
0.07676196843385696,
0.12478946149349213,
-0.48778554797172546,
0.10105125606060028,
-0.07118594646453857,
0.03666223958134651,
0.3372049033641815,
-0.00011567028559511527,
-0.02859143167734146,
0.5814051628112793,
0.04831966757774353,
-0.0534026175737381,
0.3121863007545471,
0.4811510741710663,
-0.4962192177772522,
0.29216763377189636,
-0.2768402397632599,
0.029793374240398407,
-0.1636992245912552,
-0.3128538429737091,
0.1014394760131836,
0.5365031957626343,
-0.11443059146404266,
0.18877345323562622,
0.577862024307251,
0.072400763630867,
0.2014874368906021,
0.062327802181243896,
-0.0967913269996643,
-0.23233062028884888,
0.08268167078495026,
0.4364382028579712,
-0.1705179661512375,
-0.40722233057022095,
0.08624982833862305,
-0.08278771489858627,
0.3567172884941101,
-0.04892154783010483,
0.168275386095047,
0.8467930555343628,
-0.09504252672195435,
-0.30108389258384705,
0.17561304569244385,
0.15708696842193604,
-0.22179177403450012,
-0.2138744741678238,
-0.19088035821914673,
-0.2720873951911926,
-0.124178946018219,
-0.02478937804698944,
-0.21172748506069183,
-0.1801389902830124,
0.06307472288608551,
-0.30829766392707825,
0.1876825988292694,
-0.07521034777164459,
0.06115971505641937,
-0.27182069420814514,
0.05223646014928818,
0.016274215653538704,
0.022246792912483215,
-0.42516809701919556,
0.04470685124397278,
0.21431563794612885,
-0.08994307368993759,
0.0952497124671936,
0.031985778361558914,
0.010343626141548157,
-0.10967426747083664,
0.19297879934310913,
-0.22121748328208923,
-0.17088046669960022,
0.062981516122818,
-0.13237364590168,
0.08013206720352173,
-0.19846192002296448,
0.13801100850105286,
0.22727826237678528,
-0.024273164570331573,
0.2722265124320984,
0.03187603875994682,
0.40797436237335205,
0.1121734231710434,
0.07710011303424835,
0.020398147404193878,
0.16397780179977417,
-0.1972358077764511,
0.12641611695289612,
0.20299464464187622,
-0.012148838490247726,
-0.011550869792699814,
-0.16465936601161957,
0.3339945077896118,
0.3537822961807251,
0.08275750279426575,
0.13006635010242462,
-0.05989747494459152,
-0.11285261809825897,
-0.09856993705034256,
0.1420912742614746,
0.21145957708358765,
-0.16501441597938538,
-0.33982053399086,
-0.045571468770504,
-0.3156956136226654,
-0.11316180229187012,
-0.03261255472898483,
-0.08190281689167023,
0.5226360559463501,
0.20157188177108765,
0.1167478933930397,
-0.013367332518100739,
-0.060845375061035156,
-0.00395596120506525,
-0.04545696824789047,
0.1604149341583252,
0.2736175060272217,
-0.18018513917922974,
0.06456426531076431,
0.3331308364868164,
-0.21472615003585815,
0.10041888803243637,
0.4017113745212555,
0.0019664019346237183,
0.014730539172887802,
-0.3248889148235321,
0.02713552862405777,
-0.34490692615509033,
0.2925199866294861,
-0.3482389748096466,
-0.23470960557460785,
0.31206077337265015,
0.019109010696411133,
0.0911078006029129,
-0.4993656873703003,
0.07046444714069366,
-0.04171936213970184,
0.24282494187355042,
0.2687726616859436,
-0.5468881130218506,
-0.36617305874824524,
-0.27299755811691284,
-0.11320732533931732,
0.58226478099823,
0.4652716815471649,
0.09132160991430283,
0.3527909517288208,
-0.051646195352077484,
0.07999385893344879,
-0.07150676101446152,
0.00407940149307251,
-0.32400938868522644,
-0.0506804920732975,
0.03423444926738739,
0.35980865359306335,
-0.22170183062553406,
-0.1391572505235672,
0.5451202392578125,
0.0268426313996315,
0.22252120077610016,
0.10771840810775757,
0.22015182673931122,
0.005068046972155571,
-0.5182210803031921,
0.11981439590454102,
0.14246715605258942,
0.05395256355404854,
0.22645166516304016,
-0.04139711707830429,
-0.07606301456689835,
-0.3514191508293152,
0.3787600100040436,
0.4695475697517395,
0.06139864772558212,
-0.10327506065368652,
-0.12359000742435455,
0.03793218731880188,
0.20851105451583862,
0.22916221618652344,
0.11621075868606567,
0.22494420409202576,
-0.208949476480484,
-0.034340329468250275,
0.07958735525608063,
0.1317460536956787,
-0.4423650801181793,
0.09883204847574234,
-0.3059398829936981,
-0.14150507748126984,
0.1749255359172821,
-0.17712748050689697,
-0.08690255135297775,
0.25032058358192444,
0.16657695174217224,
-0.15933261811733246,
-0.08787009119987488,
0.08418744057416916,
0.2446448802947998,
0.6247323155403137,
0.2298949658870697,
-0.6264799237251282,
0.07589927315711975,
0.1546844244003296,
-0.04753613471984863,
0.1062091663479805,
-0.09966514259576797,
0.02558046765625477,
0.410932332277298,
-0.07424129545688629,
-0.26283982396125793,
-0.20663295686244965,
0.24791617691516876,
0.09211279451847076,
-0.05275876820087433,
0.6166579127311707,
-0.1669977903366089,
-0.07358589768409729,
0.2651451528072357,
0.1080775335431099,
-0.1507936418056488,
0.21667638421058655,
-0.16688299179077148,
0.3541097939014435,
-0.04775087907910347,
0.004200544208288193,
-0.16466271877288818,
-0.09659309685230255,
0.08652809262275696,
0.05198174715042114,
0.10383769869804382,
-0.2703278362751007,
0.28992578387260437,
0.24557644128799438,
0.28564247488975525,
0.059728581458330154,
0.1261177361011505,
-0.10842718929052353,
-0.442605197429657,
0.39192891120910645,
0.35090816020965576,
-0.12448525428771973,
-0.06417511403560638,
-0.005991858430206776,
-0.09250810742378235,
0.1071568951010704,
-0.105612613260746,
-0.19117794930934906,
-0.24193915724754333,
0.29319775104522705,
0.07175783812999725,
0.28137829899787903,
-0.0015513147227466106,
-0.09768474847078323,
-0.1878180205821991,
0.17447708547115326,
-0.24198399484157562,
0.04160685837268829,
-0.25969958305358887,
-0.17730702459812164,
-0.2635085880756378,
-0.07081606984138489,
0.05746548995375633,
-0.3950708210468292,
-0.12415692210197449,
-0.24603749811649323,
0.06400781869888306,
0.2776847183704376,
-0.045718368142843246,
0.4009772837162018,
0.47033053636550903,
-0.1269143670797348,
0.2192734330892563,
0.3190118074417114,
-0.20363563299179077,
-0.20758730173110962,
-0.12638995051383972,
0.059733796864748,
-0.0034546861425042152,
-0.08284629881381989,
-0.07269291579723358,
-0.45866504311561584,
0.21375548839569092,
-0.2816912829875946,
-0.05254979431629181,
0.07435988634824753,
-0.03552204370498657,
0.5063043832778931,
-0.2617622911930084,
0.25293368101119995,
-0.11073923110961914,
0.4106066823005676,
0.40455496311187744,
-0.2005269080400467,
-0.1289592683315277,
0.019947350025177002,
0.07788883149623871,
-0.26079753041267395,
-0.03935818746685982,
0.3344095051288605,
-0.2608051896095276,
-0.14244547486305237,
0.27833569049835205,
0.05029642954468727,
0.1694934219121933,
-0.5509196519851685,
-0.31590741872787476,
0.051640380173921585,
0.2530948221683502,
-0.1564558744430542,
-0.028212537989020348,
-0.22231166064739227,
0.2857840359210968,
-0.2854258120059967,
-0.20397859811782837,
-0.13331474363803864,
-0.03297305479645729,
0.021692318841814995,
-0.6995681524276733,
-0.39133334159851074,
-0.016667310148477554,
-0.15150916576385498,
0.5323095917701721,
0.08804904669523239,
0.025373918935656548,
0.027831360697746277,
0.0030353600159287453,
-0.004420669749379158,
-0.06637470424175262,
-0.2988646626472473,
0.016813769936561584,
0.04030609503388405,
0.33514031767845154,
-0.0734652727842331,
0.04137997701764107,
-0.1678367406129837,
0.2677585780620575,
0.1905384659767151,
0.09431912004947662,
0.03248828649520874,
-0.09370477497577667,
0.07331854850053787,
0.012670531868934631,
-0.09742764383554459,
-0.11528205871582031,
-0.18588972091674805,
-0.07310369610786438,
0.06310535967350006,
0.1063179299235344,
0.15936586260795593,
0.19336798787117004,
0.03479837253689766,
-0.19471490383148193,
-0.28610217571258545,
-0.11827638745307922,
-0.22992247343063354,
-0.11677782982587814,
0.03353520855307579,
0.3312153220176697,
-0.07197737693786621,
-0.22324329614639282,
-0.12265460193157196,
0.18327194452285767,
0.4686755836009979,
0.04867831617593765,
0.3824276328086853,
-0.16219311952590942,
-0.20853793621063232,
-0.0009657889604568481,
0.14338311553001404,
0.03038029372692108,
-0.06371942907571793,
0.010240770876407623,
0.21037575602531433,
0.19039686024188995,
0.18648633360862732,
0.03762771189212799,
-0.13159503042697906,
0.4868623912334442,
-0.13295352458953857,
-0.5907807946205139,
-0.4485069513320923,
-0.08383706212043762,
-0.046181753277778625,
0.44644924998283386,
0.20259346067905426,
0.12144597619771957,
0.1832023710012436,
-0.1629595160484314,
0.16133782267570496,
-0.4406791925430298,
-0.40850144624710083,
-0.5296405553817749,
-0.07720832526683807,
-0.12081032246351242,
0.10129408538341522,
0.0220488328486681,
-0.28231000900268555,
-0.3443129360675812,
-0.4439452886581421,
0.1510322540998459,
-0.23436838388442993,
-0.20386485755443573,
0.4826020896434784,
0.16186431050300598,
-0.36910587549209595,
0.2843441665172577,
0.19465309381484985,
0.07034820318222046,
0.20927320420742035,
-0.12134204804897308,
0.19559729099273682,
0.11742334067821503,
0.21292084455490112,
-0.45357173681259155,
-0.05423536151647568,
-0.03272956609725952,
-0.05404704809188843,
0.2696756422519684,
-0.3494568169116974,
0.11181746423244476,
-0.07139700651168823,
-0.21714019775390625,
0.3293794095516205,
-0.10247422754764557,
0.10407052934169769,
0.2512635588645935,
0.06648173183202744,
-0.13879188895225525,
-0.03926706314086914,
0.06480556726455688,
-0.29582327604293823,
0.2502627670764923,
-0.3924267888069153,
0.2538975775241852,
0.4127407968044281,
-0.307387113571167,
-0.198552668094635,
0.11352711170911789,
-0.10084070265293121,
0.06740528345108032,
0.38427484035491943,
0.07691148668527603,
-0.45790576934814453,
-0.13557513058185577,
0.08969870954751968,
-0.19706471264362335,
-0.07434601336717606,
0.014375314116477966,
-0.2643187344074249,
0.0920366644859314,
-0.35802823305130005,
-0.0003539472818374634,
0.14225685596466064,
-0.1866113245487213,
0.47328081727027893,
-0.09451895952224731,
-0.23930859565734863,
0.16986015439033508,
-0.17928937077522278,
0.3100370168685913,
-0.0778421014547348,
0.032334670424461365,
-0.2217232584953308,
0.25930583477020264,
-0.3242446780204773,
0.1942669153213501,
0.08688531816005707,
0.3065233826637268,
0.6779506206512451,
-0.25824999809265137,
-0.47805652022361755,
-0.13056974112987518,
0.09575515240430832,
-0.029838968068361282,
0.04109244421124458,
0.10047870874404907,
0.2653995454311371,
0.12242832034826279,
0.041963789612054825,
0.23409564793109894,
0.11695235967636108,
-0.26593026518821716,
-0.3217814564704895,
0.23032435774803162,
0.016510874032974243,
-0.40088558197021484,
-0.19088727235794067,
0.21245227754116058,
0.5923565030097961,
0.07727725058794022,
0.6071112751960754,
-0.17086917161941528,
0.09386909008026123,
-0.20454919338226318,
0.13926440477371216,
0.20389193296432495,
-0.10192713141441345,
0.6167322993278503,
-0.22411565482616425,
-0.010504595935344696,
-0.0011594947427511215,
0.015534132719039917,
-0.10594294220209122,
0.24638837575912476,
0.1346396654844284,
0.25717586278915405,
-0.270790159702301,
-0.04004500433802605,
0.39044496417045593,
0.025342168286442757,
-0.03690013661980629,
0.4749499559402466,
-0.2261110246181488,
0.28439563512802124,
-0.306298166513443,
0.20494788885116577,
0.30424267053604126,
-0.15158623456954956,
-0.4816407859325409,
-0.17073315382003784,
-0.5891594290733337,
0.0861809179186821,
-0.051126617938280106,
-0.17541508376598358,
-0.06312160193920135,
0.5393028259277344,
-0.03439392149448395,
-0.11661168932914734,
-0.22600802779197693,
-0.00277844350785017,
-0.19654060900211334,
0.15880204737186432,
0.3093070387840271,
-0.1977655291557312,
-0.32457709312438965,
-0.17858384549617767,
-0.050725992769002914,
0.07640144228935242,
0.05612713471055031,
-0.18200859427452087,
-0.2545241117477417,
0.08414996415376663,
-0.007868137210607529,
-0.2569129168987274,
-0.04232650622725487,
0.1870150864124298,
-0.019393261522054672,
-0.06057089567184448,
0.17046663165092468,
0.01013929396867752,
0.09255249053239822,
0.2859081029891968,
0.07863914966583252,
0.12869980931282043,
-0.13408122956752777,
-0.08959446847438812,
0.10999426245689392,
0.5431032180786133,
-0.03638370707631111,
0.13043123483657837,
0.21002714335918427,
0.20702612400054932,
-0.009353691712021828,
-0.08435779064893723,
-0.3582524061203003,
0.25757619738578796,
0.3693300485610962,
-0.27557575702667236,
0.19901244342327118,
-0.3448749780654907,
0.2791688144207001,
0.2967938482761383,
-0.038264330476522446,
-0.429625004529953,
0.12471359968185425,
0.16032655537128448,
-0.0035060010850429535,
-0.14564743638038635,
0.15967309474945068,
0.35910332202911377,
-0.06596823036670685,
0.23620879650115967,
-0.1499634087085724,
0.05239225924015045,
0.1445036083459854,
0.0649680495262146,
0.004103538580238819,
-0.15380807220935822,
-0.2074185162782669,
0.3424947261810303,
-0.03875704109668732,
0.291608065366745,
0.2955346703529358,
-0.17970263957977295,
-0.24894043803215027,
-0.22901053726673126,
0.08828561007976532,
-0.14182759821414948,
0.16462424397468567,
-0.09159517288208008,
0.08868589252233505,
0.2083357274532318,
-0.3614557087421417,
-0.2503945529460907,
-0.005938977003097534,
0.011077795177698135,
0.06865622103214264,
0.1550813913345337,
-0.16485166549682617,
-0.22167566418647766,
-0.3788730502128601,
0.07779952138662338,
-0.09324450045824051,
0.0874355137348175,
-0.17690803110599518,
-0.020430788397789,
-0.09728062152862549,
0.06880758702754974,
-0.1281934529542923,
0.3972252607345581,
0.20024648308753967,
-0.015864796936511993,
0.006948128342628479,
-0.3464377820491791,
-0.20097142457962036,
0.10603845864534378,
0.29967883229255676,
-0.0015276335179805756,
-0.10863731056451797,
0.30108872056007385,
0.24251635372638702,
-0.2698392868041992,
0.18075208365917206,
0.20704616606235504,
0.3308272063732147,
-0.18414944410324097,
-0.5122315287590027,
-0.08719468116760254,
0.014796582981944084,
0.0765605941414833,
0.39830008149147034,
0.010446697473526001,
-0.23937870562076569,
0.03720468655228615,
0.07162369787693024,
-0.13995759189128876,
0.1981380581855774,
0.0323801189661026,
0.23989063501358032,
0.14454549551010132,
0.5007630586624146,
-0.23234650492668152,
-0.21111443638801575,
0.10010921210050583,
-0.35311785340309143,
-0.1419488787651062,
0.007519819308072329,
0.2385789155960083,
-0.08022795617580414,
-0.023847274482250214,
-0.14158743619918823,
0.07907509803771973,
-0.40651997923851013,
0.36234694719314575,
0.3410241901874542,
0.31756123900413513,
-0.025495491921901703,
-0.049203384667634964,
-0.3845287561416626,
0.3794112801551819,
-0.17815276980400085,
-0.3013525903224945,
0.2541188597679138,
0.043315544724464417,
-0.2651924788951874,
0.37010395526885986,
0.7036462426185608,
-0.2908417284488678,
-0.5082314610481262,
-0.3333394229412079,
-0.27697768807411194,
0.008610934019088745,
0.35017913579940796,
-0.2469128668308258,
-0.08904558420181274,
-0.09827907383441925,
0.27659842371940613,
-0.07497672736644745,
0.1320379674434662,
0.15401706099510193,
-0.12428981065750122,
0.06883478164672852,
0.5911545753479004,
0.06915847212076187,
0.20646171271800995,
0.1213233470916748,
0.04429665952920914,
-0.1319373995065689,
0.15083441138267517,
-0.3454105257987976,
-0.021868577226996422,
0.3271316885948181,
-0.3355368673801422,
0.4607938230037689,
0.2721307873725891,
-0.07497997581958771,
-0.3710607886314392,
0.4132901728153229,
0.22086651623249054,
-0.004890909418463707,
-0.09036781638860703,
-0.09348271787166595,
0.051162026822566986,
-0.07921238243579865,
-0.06527891010046005,
0.11650912463665009,
-0.05069241672754288,
0.48007267713546753,
-0.07640069723129272,
-0.1664094179868698,
0.27836257219314575,
-0.18382813036441803,
-0.37989121675491333,
-0.12455931305885315,
-0.02177925407886505,
0.07253650575876236,
-0.009623082354664803,
-0.04417552426457405,
-0.3208199143409729,
0.22673168778419495,
-0.1420067846775055,
-0.2845942974090576,
0.12167668342590332,
-0.1535634845495224,
0.07170520722866058,
0.04702822491526604,
0.13287292420864105,
0.1103113666176796,
0.014506043866276741,
-0.1096889078617096,
-0.09730927646160126
] |
https://github.com/huggingface/datasets/issues/2630 | Progress bars are not properly rendered in Jupyter notebook | Hi @mludv, thanks for the hint!!! :)
We will definitely take it into account to try to fix this issue... It seems somehow related to `multiprocessing` and `tqdm`... | ## Describe the bug
The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal).
## Steps to reproduce the bug
```python
ds.map(tokenize, num_proc=10)
```
## Expected results
Jupyter widgets displaying the progress bars.
## Actual results
Simple plane progress bars.
cc: Reported by @thomwolf | 28 | Progress bars are not properly rendered in Jupyter notebook
## Describe the bug
The progress bars are not Jupyter widgets; regular progress bars appear (like in a terminal).
## Steps to reproduce the bug
```python
ds.map(tokenize, num_proc=10)
```
## Expected results
Jupyter widgets displaying the progress bars.
## Actual results
Simple plane progress bars.
cc: Reported by @thomwolf
Hi @mludv, thanks for the hint!!! :)
We will definitely take it into account to try to fix this issue... It seems somehow related to `multiprocessing` and `tqdm`... | [
0.0840735137462616,
-0.017447158694267273,
-0.055343396961688995,
0.14674875140190125,
0.14180518686771393,
-0.2826744318008423,
0.4365515112876892,
0.30817079544067383,
-0.281387060880661,
0.1335177719593048,
-0.1734691560268402,
0.4958983063697815,
0.30211344361305237,
0.3606443405151367,
-0.09345885366201401,
-0.28195488452911377,
-0.08388072997331619,
0.1640946865081787,
-0.30970826745033264,
-0.00134316086769104,
-0.35535380244255066,
0.22891201078891754,
-0.36001700162887573,
0.2748989760875702,
-0.32604771852493286,
-0.015769237652420998,
0.006736995652318001,
-0.033976100385189056,
0.20255446434020996,
-0.37077125906944275,
0.06032127887010574,
-0.08699724078178406,
0.12911805510520935,
0.43682488799095154,
-0.00011342280777171254,
-0.10874781012535095,
0.48756641149520874,
0.041340172290802,
0.0329013429582119,
0.2878974974155426,
0.4559461772441864,
-0.4877918064594269,
0.282934308052063,
-0.2850031852722168,
0.07105956971645355,
-0.179469034075737,
-0.39549148082733154,
-0.04206107556819916,
0.40650683641433716,
-0.15673980116844177,
0.2473645806312561,
0.4405185580253601,
-0.018232155591249466,
0.20767848193645477,
0.03911061957478523,
-0.14612187445163727,
-0.2083890587091446,
-0.028221674263477325,
0.46539145708084106,
-0.30636101961135864,
-0.3879881501197815,
0.10639669001102448,
-0.04864297807216644,
0.41870179772377014,
-0.039380885660648346,
0.2133059948682785,
0.9913766980171204,
-0.08786457777023315,
-0.2944222092628479,
0.2115096151828766,
0.23941761255264282,
-0.10597769170999527,
-0.15123629570007324,
-0.12025383114814758,
-0.27351075410842896,
-0.11603929102420807,
-0.19667360186576843,
-0.08610671758651733,
-0.2104891687631607,
0.02147289551794529,
-0.325485497713089,
0.1474573016166687,
0.023079439997673035,
0.00393185019493103,
-0.2227216511964798,
0.06387535482645035,
-0.01642666384577751,
-0.02541525661945343,
-0.41520941257476807,
0.11075936257839203,
0.1686970591545105,
-0.1647113710641861,
0.1662708967924118,
-0.017423667013645172,
-0.06687623262405396,
0.05144643783569336,
0.17058557271957397,
-0.039477817714214325,
-0.19512486457824707,
-0.08938801288604736,
-0.09344461560249329,
0.10656656324863434,
-0.11095807701349258,
0.11761143803596497,
0.1380227655172348,
0.03638285771012306,
0.2670513391494751,
-0.07379882782697678,
0.41574758291244507,
0.026566501706838608,
0.02622850611805916,
0.051055893301963806,
0.2824544310569763,
-0.28433719277381897,
0.11908340454101562,
0.26966241002082825,
-0.16990317404270172,
-0.024019639939069748,
-0.13256506621837616,
0.28395143151283264,
0.3845818340778351,
-0.11722380667924881,
0.050101861357688904,
-0.02120024710893631,
-0.16043776273727417,
0.045893847942352295,
0.09822359681129456,
0.20161497592926025,
-0.09388671070337296,
-0.26942601799964905,
-0.12792594730854034,
-0.2795519232749939,
-0.2595214545726776,
0.006324537098407745,
-0.12580688297748566,
0.360922247171402,
0.22342449426651,
0.1400429904460907,
-0.055691465735435486,
-0.1958281546831131,
-0.041062742471694946,
-0.05041084438562393,
0.10325372964143753,
0.2466241866350174,
-0.08296065777540207,
0.1367763727903366,
0.29609212279319763,
-0.29108697175979614,
0.12651661038398743,
0.42590463161468506,
-0.039344340562820435,
0.03939294442534447,
-0.3534797430038452,
0.08327958732843399,
-0.31911492347717285,
0.37443259358406067,
-0.45552858710289,
-0.2263980358839035,
0.39377373456954956,
0.07767258584499359,
0.09674595296382904,
-0.4163128137588501,
-0.0178413987159729,
-0.17858098447322845,
0.17323780059814453,
0.14559783041477203,
-0.5406765937805176,
-0.31435516476631165,
-0.099909208714962,
-0.1438429206609726,
0.674564778804779,
0.33117592334747314,
0.061638619750738144,
0.3111010193824768,
-0.03555252403020859,
0.18038053810596466,
-0.029942326247692108,
-0.09980764985084534,
-0.27030086517333984,
-0.04463334009051323,
0.06868116557598114,
0.3434051275253296,
-0.11681007593870163,
-0.10472546517848969,
0.3879329562187195,
0.05716831982135773,
0.1605413854122162,
0.19956189393997192,
0.22495025396347046,
-0.00405036099255085,
-0.5000805854797363,
0.14725449681282043,
0.2613547742366791,
0.13687588274478912,
0.2515568137168884,
-0.10519152134656906,
-0.11006823927164078,
-0.44717156887054443,
0.454856812953949,
0.3896092474460602,
0.07356564700603485,
-0.10861577093601227,
-0.20651941001415253,
0.04866859316825867,
0.2095973640680313,
0.2003740668296814,
0.05015398934483528,
0.272540807723999,
-0.22282715141773224,
-0.15057924389839172,
0.10816323012113571,
0.08416757732629776,
-0.2802232503890991,
0.05745295435190201,
-0.36373117566108704,
-0.21233892440795898,
0.2303527295589447,
-0.02149225026369095,
-0.0324372835457325,
0.1609058380126953,
0.1928897351026535,
-0.03816305845975876,
0.04494815319776535,
-0.0241242665797472,
0.2177131026983261,
0.6586601734161377,
0.2201005518436432,
-0.5620325207710266,
0.1005692183971405,
0.10981015861034393,
-0.01001257449388504,
0.059965830296278,
-0.11675641685724258,
0.10554644465446472,
0.37067723274230957,
-0.012615382671356201,
-0.2862398028373718,
-0.2531238794326782,
0.19412435591220856,
0.14762289822101593,
-0.11425452679395676,
0.5261469483375549,
-0.05835378170013428,
-0.12186509370803833,
0.34492918848991394,
0.08726200461387634,
-0.19324353337287903,
0.35059654712677,
-0.1336083859205246,
0.257316529750824,
-0.014807092025876045,
0.01654670014977455,
-0.05423861742019653,
-0.14585185050964355,
0.13753381371498108,
0.03434838354587555,
0.055680688470602036,
-0.2651257812976837,
0.3374616503715515,
0.21012407541275024,
0.2718624472618103,
0.09492570161819458,
0.16949346661567688,
-0.17086058855056763,
-0.4523807764053345,
0.38700613379478455,
0.3288428485393524,
-0.12609608471393585,
0.1076468974351883,
0.08871989697217941,
-0.055690351873636246,
0.03884003311395645,
0.03462443873286247,
-0.27298301458358765,
-0.2650899589061737,
0.2690732479095459,
0.28521302342414856,
0.3415223956108093,
-0.055394984781742096,
-0.1524236500263214,
-0.08432360738515854,
0.1791526824235916,
-0.26766321063041687,
0.06212210655212402,
-0.15036405622959137,
-0.2169014811515808,
-0.2802099585533142,
-0.08143278956413269,
0.10667381435632706,
-0.27983522415161133,
-0.09731990098953247,
-0.20149759948253632,
-0.02945670112967491,
0.13565364480018616,
0.054809633642435074,
0.3602175712585449,
0.563369631767273,
-0.12253864109516144,
0.14015315473079681,
0.36741742491722107,
-0.18481244146823883,
-0.23125675320625305,
-0.20940318703651428,
0.07960772514343262,
0.021868996322155,
-0.02702425979077816,
-0.1452452689409256,
-0.5066239237785339,
0.26959896087646484,
-0.2906704843044281,
0.0424453467130661,
0.05529740825295448,
0.0010297968983650208,
0.4239056408405304,
-0.31180718541145325,
0.19143347442150116,
-0.04860440641641617,
0.46846023201942444,
0.37796300649642944,
-0.12739267945289612,
-0.16813825070858002,
0.08221948891878128,
0.08497066795825958,
-0.2132693976163864,
-0.050414375960826874,
0.3898361325263977,
-0.3317185044288635,
-0.10926535725593567,
0.23912301659584045,
-0.02956606075167656,
0.19687694311141968,
-0.7200556397438049,
-0.2799724042415619,
-0.023818187415599823,
0.293268620967865,
-0.06939585506916046,
-0.10436263680458069,
-0.13135911524295807,
0.2333751618862152,
-0.28601378202438354,
-0.25431644916534424,
-0.236277773976326,
-0.05905580148100853,
0.03119908645749092,
-0.6471829414367676,
-0.41208672523498535,
-0.08593235909938812,
-0.20043674111366272,
0.3781544268131256,
0.03820515051484108,
0.17491461336612701,
0.15846529603004456,
0.0033081439323723316,
-0.053871363401412964,
-0.08494387567043304,
-0.4036497175693512,
0.052433643490076065,
-0.016965318471193314,
0.3014836311340332,
-0.023008741438388824,
-0.027071453630924225,
-0.17107056081295013,
0.13825957477092743,
0.29923394322395325,
0.07538489252328873,
0.1574772447347641,
-0.05222158133983612,
-0.01415218785405159,
0.10126948356628418,
-0.0767282173037529,
-0.16937513649463654,
-0.19423097372055054,
0.04780815541744232,
0.12274318933486938,
0.0846467837691307,
0.06527575105428696,
0.1389368325471878,
-0.013386519625782967,
-0.3803441524505615,
-0.1787622570991516,
-0.15538576245307922,
-0.1738331913948059,
-0.08481628447771072,
0.006455268710851669,
0.2819893956184387,
-0.01142048928886652,
-0.20941630005836487,
-0.10500167310237885,
0.18780159950256348,
0.34503254294395447,
-0.02185504324734211,
0.43832793831825256,
-0.2292403131723404,
-0.16163986921310425,
0.167397141456604,
0.17129148542881012,
-0.021953899413347244,
0.05344277247786522,
0.07230444997549057,
0.16861295700073242,
0.11266676336526871,
0.34542959928512573,
-0.13131588697433472,
-0.10814124345779419,
0.43998250365257263,
-0.1932765543460846,
-0.5599934458732605,
-0.5287842750549316,
-0.13888177275657654,
-0.02711423672735691,
0.3023216128349304,
0.32387685775756836,
0.17046239972114563,
0.1294378787279129,
-0.30586302280426025,
0.1342187523841858,
-0.4507176876068115,
-0.500569224357605,
-0.542831540107727,
-0.032037850469350815,
-0.009937823750078678,
-0.02758978307247162,
-0.09849659353494644,
-0.10001026093959808,
-0.30135899782180786,
-0.46530526876449585,
0.11867174506187439,
-0.2689274549484253,
-0.14942975342273712,
0.4330695569515228,
0.15918508172035217,
-0.22847290337085724,
0.1799616664648056,
0.1587315797805786,
0.22333863377571106,
0.1399243026971817,
-0.18813854455947876,
0.0017882920801639557,
0.217332661151886,
0.25869351625442505,
-0.47339868545532227,
0.042398467659950256,
-0.08063766360282898,
-0.11619549244642258,
0.2704630494117737,
-0.46032214164733887,
0.2149660438299179,
-0.1570170819759369,
-0.26892316341400146,
0.3414733111858368,
-0.04832109063863754,
0.013210859149694443,
0.2080336958169937,
0.12329436838626862,
0.005004735663533211,
-0.1137179285287857,
-0.06892170011997223,
-0.2857619524002075,
0.21302267909049988,
-0.370186448097229,
0.22927120327949524,
0.33128902316093445,
-0.3805869221687317,
-0.17504115402698517,
-0.06809122860431671,
-0.22689051926136017,
0.11773887276649475,
0.30304384231567383,
0.06246624514460564,
-0.3827468752861023,
-0.26039665937423706,
0.08250334113836288,
-0.2630772590637207,
-0.025888070464134216,
-0.004011727869510651,
-0.27648019790649414,
0.20610171556472778,
-0.4202798008918762,
-0.04117225483059883,
0.13082537055015564,
-0.13842341303825378,
0.6062141060829163,
-0.10455571115016937,
-0.13994963467121124,
0.16358409821987152,
-0.2762547731399536,
0.3311763107776642,
-0.12989091873168945,
0.06651104986667633,
-0.15402726829051971,
0.2529994249343872,
-0.33406537771224976,
0.16219928860664368,
0.04697106033563614,
0.3277943730354309,
0.5213461518287659,
-0.24674339592456818,
-0.4642069935798645,
0.127960205078125,
0.18284296989440918,
-0.0753345638513565,
0.08023194223642349,
0.02823283150792122,
0.10759903490543365,
0.15364322066307068,
-0.01521978434175253,
0.20356237888336182,
0.06593768298625946,
-0.34262916445732117,
-0.3608887195587158,
0.27685996890068054,
0.054474227130413055,
-0.3398233652114868,
-0.15800759196281433,
0.2512797713279724,
0.515322744846344,
0.165976420044899,
0.5921123623847961,
-0.08236686885356903,
0.22006329894065857,
-0.23100726306438446,
0.16854873299598694,
0.21387365460395813,
-0.21187841892242432,
0.7508044242858887,
-0.20676855742931366,
-0.021772921085357666,
0.04264508932828903,
0.026349924504756927,
0.07040751725435257,
0.12680213153362274,
0.06716296076774597,
0.3412514925003052,
-0.2547580301761627,
-0.09635503590106964,
0.2661042809486389,
0.1276562511920929,
0.011672809720039368,
0.48333537578582764,
-0.22200356423854828,
0.26461541652679443,
-0.22588828206062317,
0.3405125141143799,
0.2906492054462433,
-0.00999874621629715,
-0.42938345670700073,
-0.24618308246135712,
-0.5078004598617554,
0.05476579815149307,
0.07291439175605774,
-0.199318990111351,
-0.10203766822814941,
0.4341857135295868,
0.009431662037968636,
0.12359123677015305,
-0.26004931330680847,
0.04824833571910858,
-0.21037644147872925,
0.14167040586471558,
0.21560221910476685,
-0.1273958683013916,
-0.38743260502815247,
-0.10207322239875793,
0.011142196133732796,
0.02948862686753273,
-0.02499297261238098,
-0.25054875016212463,
-0.23735858500003815,
0.05905460566282272,
-0.06183920055627823,
-0.11896491795778275,
0.0829758495092392,
0.17660316824913025,
-0.013700854033231735,
-0.05032797530293465,
0.18991942703723907,
0.0070659928023815155,
0.042771290987730026,
0.348899245262146,
0.13461123406887054,
0.11654119193553925,
-0.15153349936008453,
-0.06056904047727585,
-0.005983300507068634,
0.5434556603431702,
-0.06601956486701965,
0.10436464101076126,
0.30759182572364807,
0.16127915680408478,
0.04893425107002258,
-0.2327803075313568,
-0.3188105821609497,
0.2774236500263214,
0.26232820749282837,
-0.30502551794052124,
0.23511642217636108,
-0.3422239422798157,
0.3326389193534851,
0.14374776184558868,
-0.03386121988296509,
-0.27242326736450195,
0.13753747940063477,
0.2036050260066986,
-0.06833601742982864,
-0.20919862389564514,
0.20824430882930756,
0.34614700078964233,
-0.008187629282474518,
0.3194352388381958,
-0.14218257367610931,
0.04629102349281311,
0.10240796953439713,
0.024094950407743454,
-0.06754369288682938,
0.009102249518036842,
-0.20597897469997406,
0.3505123257637024,
0.06566382944583893,
0.27441084384918213,
0.2748168408870697,
-0.0593205951154232,
-0.3289276659488678,
-0.17680157721042633,
0.11064203828573227,
-0.04349882900714874,
0.07476705312728882,
-0.09425093233585358,
0.0331624411046505,
0.15543341636657715,
-0.17413416504859924,
-0.12453445792198181,
-0.0719834417104721,
-0.018395215272903442,
-0.06289002299308777,
0.22632598876953125,
-0.167966827750206,
-0.26154232025146484,
-0.32795366644859314,
0.0831795483827591,
-0.09470982104539871,
-0.021626189351081848,
-0.0767764300107956,
-0.09712174534797668,
-0.0849747359752655,
0.07932153344154358,
-0.10627886652946472,
0.32113534212112427,
0.31224194169044495,
-0.027970314025878906,
-0.009963765740394592,
-0.1597612053155899,
-0.2634785771369934,
0.12583759427070618,
0.31412768363952637,
0.001135699450969696,
-0.17652037739753723,
0.23308496177196503,
0.239050954580307,
-0.3890816569328308,
0.21031931042671204,
0.15970104932785034,
0.3547721207141876,
-0.29915839433670044,
-0.5115672945976257,
0.046582408249378204,
0.04317111521959305,
0.07456178218126297,
0.357771098613739,
0.1426042914390564,
-0.25978386402130127,
0.05221598967909813,
0.07832495868206024,
-0.17512263357639313,
0.28208184242248535,
0.07682406157255173,
0.3440589904785156,
0.1252899169921875,
0.44952353835105896,
-0.27047014236450195,
-0.15200725197792053,
0.10305415093898773,
-0.2561649978160858,
-0.2923445403575897,
0.04721613973379135,
0.2022022306919098,
-0.1473376750946045,
-0.03489764407277107,
-0.13492503762245178,
0.10294216126203537,
-0.39617159962654114,
0.3771844208240509,
0.26361528038978577,
0.4115660786628723,
-0.10703877359628677,
-0.19586102664470673,
-0.39082539081573486,
0.3388752341270447,
-0.13048496842384338,
-0.2475668042898178,
0.1263134479522705,
0.13020893931388855,
-0.2292507290840149,
0.355163037776947,
0.7703403234481812,
-0.1849016696214676,
-0.4258202910423279,
-0.14957056939601898,
-0.40364083647727966,
0.0335618332028389,
0.31737852096557617,
-0.2314189076423645,
-0.04336223006248474,
-0.07006983458995819,
0.24275431036949158,
-0.05393553152680397,
0.2154809534549713,
0.0531415119767189,
-0.0059425607323646545,
0.05825914815068245,
0.360284686088562,
0.18918202817440033,
0.11749850958585739,
0.026011362671852112,
0.01477944478392601,
-0.08302690833806992,
0.3153711259365082,
-0.11409442126750946,
0.1464642733335495,
0.25889089703559875,
-0.29211634397506714,
0.35840171575546265,
0.13578644394874573,
0.1304062157869339,
-0.37190183997154236,
0.34127679467201233,
0.27343809604644775,
0.10593518614768982,
-0.12067550420761108,
-0.06708290427923203,
0.23115849494934082,
-0.1974952071905136,
0.03510461002588272,
0.10295312851667404,
-0.12112395465373993,
0.34088578820228577,
-0.11126414686441422,
-0.09854144603013992,
0.26667845249176025,
-0.1712305098772049,
-0.4160824716091156,
-0.15713581442832947,
-0.04291097819805145,
0.06637883931398392,
0.047920823097229004,
-0.06479392200708389,
-0.3053118586540222,
0.23956242203712463,
-0.05822523683309555,
-0.3515856862068176,
0.14495906233787537,
-0.3256433308124542,
0.026567306369543076,
0.06825268268585205,
-0.035690367221832275,
0.1399088054895401,
-0.003514237701892853,
-0.1854763627052307,
-0.182235449552536
] |
https://github.com/huggingface/datasets/issues/2629 | Load datasets from the Hub without requiring a dataset script | This is so cool, let us know if we can help with anything on the hub side (@Pierrci @elishowk) 🎉 | As a user I would like to be able to upload my csv/json/text/parquet/etc. files in a dataset repository on the Hugging Face Hub and be able to load this dataset with `load_dataset` without having to implement a dataset script.
Moreover I would like to be able to specify which file goes into which split using the `data_files` argument.
This feature should be compatible with private repositories and dataset streaming.
This can be implemented by checking the extension of the files in the dataset repository and then by using the right dataset builder that is already packaged in the library (csv/json/text/parquet/etc.) | 20 | Load datasets from the Hub without requiring a dataset script
As a user I would like to be able to upload my csv/json/text/parquet/etc. files in a dataset repository on the Hugging Face Hub and be able to load this dataset with `load_dataset` without having to implement a dataset script.
Moreover I would like to be able to specify which file goes into which split using the `data_files` argument.
This feature should be compatible with private repositories and dataset streaming.
This can be implemented by checking the extension of the files in the dataset repository and then by using the right dataset builder that is already packaged in the library (csv/json/text/parquet/etc.)
This is so cool, let us know if we can help with anything on the hub side (@Pierrci @elishowk) 🎉 | [
-0.45757606625556946,
-0.04470066726207733,
-0.04213670641183853,
0.19916479289531708,
-0.1262199431657791,
0.16351592540740967,
0.3772641718387604,
0.1787041574716568,
0.4132857024669647,
0.13889102637767792,
-0.23918169736862183,
0.33877232670783997,
-0.06379535794258118,
0.5494141578674316,
0.2678025960922241,
0.17318813502788544,
0.13554038107395172,
0.3373369574546814,
0.01566746085882187,
0.1087152361869812,
-0.14726725220680237,
-0.028141403570771217,
0.050965845584869385,
-0.3055990934371948,
-0.41661226749420166,
0.13375332951545715,
-0.05747569724917412,
0.5216125845909119,
-0.20110207796096802,
-0.21193690598011017,
0.4005637764930725,
0.5012658834457397,
0.2502654790878296,
0.1841820925474167,
-0.00012120536848669872,
0.04340939223766327,
0.192807137966156,
-0.14684952795505524,
-0.3016454577445984,
-0.15394599735736847,
-0.2993464469909668,
0.023187855258584023,
0.2855735123157501,
-0.10106395930051804,
-0.08238119632005692,
0.20935961604118347,
0.15716251730918884,
-0.12919528782367706,
0.36773955821990967,
0.09762267023324966,
0.0166194885969162,
0.29998207092285156,
-0.259233683347702,
-0.33838769793510437,
0.10609704256057739,
0.5227718949317932,
-0.050180405378341675,
0.0753660649061203,
0.4466712772846222,
0.15012817084789276,
-0.2684878706932068,
-0.06160159409046173,
-0.051112618297338486,
-0.13064037263393402,
0.69785475730896,
0.014116943813860416,
-0.4139387607574463,
-0.33698832988739014,
-0.05588550865650177,
0.26961132884025574,
0.4849347174167633,
-0.22265958786010742,
-0.18848149478435516,
-0.5040715336799622,
-0.10109002143144608,
-0.023110918700695038,
0.11610907316207886,
0.38299253582954407,
-0.07452304661273956,
0.3300851881504059,
-0.1943240612745285,
-0.4995054304599762,
-0.28945016860961914,
-0.039415664970874786,
0.08703368902206421,
0.05103564262390137,
0.0833543986082077,
-0.1139836385846138,
0.20592999458312988,
0.07169119268655777,
0.312540203332901,
-0.15259990096092224,
-0.1997712105512619,
0.18415935337543488,
-0.2591177523136139,
-0.15117093920707703,
-0.19092991948127747,
0.35444211959838867,
0.2726556360721588,
0.47769618034362793,
0.03134931996464729,
0.24505174160003662,
-0.4523222744464874,
0.05961209163069725,
0.34711143374443054,
-0.004910370334982872,
0.12107257544994354,
0.05489693582057953,
0.31359463930130005,
0.23628884553909302,
0.3534659147262573,
-0.019690167158842087,
-0.19496656954288483,
0.08065332472324371,
-0.49105802178382874,
-0.17289003729820251,
0.17837212979793549,
-0.08503591269254684,
-0.08366603404283524,
-0.34614163637161255,
0.5396618247032166,
0.05282063037157059,
0.22990402579307556,
0.2829741835594177,
0.13641692698001862,
0.12909868359565735,
-0.261796236038208,
0.18942415714263916,
-0.11748944967985153,
-0.29593783617019653,
-0.10570495575666428,
0.13449755311012268,
0.10334032773971558,
0.26941585540771484,
0.3688507676124573,
-0.3593107759952545,
0.11025846749544144,
0.006927837617695332,
0.44229286909103394,
0.043747834861278534,
-0.08644068241119385,
-0.01306203380227089,
0.01631767302751541,
0.14329411089420319,
0.3748806118965149,
-0.05359801650047302,
-0.022815894335508347,
-0.23779499530792236,
-0.319248765707016,
0.0625881552696228,
-0.44182324409484863,
-0.5183888077735901,
-0.05697526037693024,
0.012152288109064102,
-0.42683887481689453,
0.028067387640476227,
-0.6266533136367798,
0.060500018298625946,
-0.3998807966709137,
-0.04166431352496147,
-0.07952491194009781,
0.21163073182106018,
-0.012384280562400818,
-0.03998793661594391,
0.1320939064025879,
0.5962685942649841,
-0.26256516575813293,
-0.11461851000785828,
-0.05672571808099747,
-0.21468672156333923,
-0.3286294639110565,
-0.04497668519616127,
-0.1742633879184723,
0.18604378402233124,
-0.22782330214977264,
0.3033220171928406,
0.44986361265182495,
-0.5796927809715271,
-0.28539952635765076,
0.006489476189017296,
-0.11793742328882217,
0.07326438277959824,
0.1743251234292984,
0.3771466314792633,
0.39571332931518555,
-0.12965402007102966,
-0.13182897865772247,
0.5260874629020691,
0.0008256230503320694,
0.09093992412090302,
0.1459447294473648,
-0.5183840394020081,
-0.15791599452495575,
0.43199512362480164,
0.12436568737030029,
0.030488435178995132,
0.31154152750968933,
0.20132143795490265,
0.13874861598014832,
-0.2980286777019501,
0.14302076399326324,
-0.10111671686172485,
0.0254290122538805,
0.04013238102197647,
-0.06843292713165283,
-0.05485248565673828,
-0.6891090869903564,
0.31631505489349365,
0.09649558365345001,
-0.0020368099212646484,
-0.024445153772830963,
-0.37102603912353516,
-0.11712278425693512,
-0.18989749252796173,
-0.28183862566947937,
0.06346474587917328,
-0.09096132218837738,
-0.08301495015621185,
0.0350431464612484,
-0.13566093146800995,
-0.592109739780426,
0.601855993270874,
-0.014924172312021255,
0.19606131315231323,
-0.6531129479408264,
0.4063936471939087,
0.3386693596839905,
-0.015376131050288677,
0.21685364842414856,
-0.02859039604663849,
0.12458313256502151,
-0.122152179479599,
0.11262549459934235,
0.2599675953388214,
0.12577329576015472,
0.6147465705871582,
0.2605295777320862,
0.17029531300067902,
0.14838701486587524,
-0.05835207551717758,
0.2140933722257614,
-0.34898239374160767,
0.012365545146167278,
-0.13904966413974762,
-0.3719671368598938,
0.34141069650650024,
-0.49830183386802673,
0.11907660961151123,
0.07015754282474518,
-0.02043749950826168,
0.005231777206063271,
-0.046847205609083176,
-0.18611197173595428,
-0.18773680925369263,
-0.045521218329668045,
0.10429450869560242,
0.15938729047775269,
0.043912164866924286,
0.021955206990242004,
0.021886833012104034,
0.40208736062049866,
-0.08207773417234421,
0.0510965958237648,
0.1745690405368805,
-0.15870872139930725,
-0.03679046407341957,
0.18825480341911316,
0.06003556028008461,
0.2340116798877716,
0.15282012522220612,
-0.0666545033454895,
0.25531041622161865,
0.391766220331192,
-0.2559643089771271,
-0.006317012012004852,
-0.03884284943342209,
0.004694059956818819,
0.1148882806301117,
-0.11439068615436554,
-0.14909040927886963,
-0.3427889049053192,
-0.0038193166255950928,
-0.05664708465337753,
-0.11972369253635406,
-0.20247504115104675,
-0.1974550038576126,
-0.18856284022331238,
0.04416672885417938,
0.10861388593912125,
-0.13905110955238342,
-0.22801154851913452,
-0.04748913645744324,
0.1132049486041069,
0.29261457920074463,
0.13568314909934998,
-0.18085159361362457,
0.10218776762485504,
0.8752849698066711,
-0.2077581137418747,
-0.4260384440422058,
-0.2744225263595581,
-0.005217715632170439,
0.21125751733779907,
-0.03576485812664032,
0.25368794798851013,
0.3942895233631134,
0.21860677003860474,
-0.27567464113235474,
0.20061983168125153,
-0.3470384478569031,
0.17975154519081116,
0.1969388723373413,
0.03706606104969978,
0.02868262678384781,
0.11388521641492844,
0.07888688892126083,
0.2208520919084549,
-0.02244643308222294,
-0.13174931704998016,
-0.09864430874586105,
-0.060006096959114075,
-0.19490404427051544,
0.0839633122086525,
-0.05863667652010918,
-0.14587293565273285,
-0.12070632725954056,
-0.367988646030426,
-0.456332802772522,
0.3621254563331604,
0.3808920681476593,
0.027584519237279892,
-0.22611446678638458,
-0.09481964260339737,
-0.012828860431909561,
-0.16839292645454407,
-0.29920947551727295,
0.04538942128419876,
-0.5231457948684692,
0.4055298864841461,
-0.3415709137916565,
-0.2106560617685318,
0.2707839906215668,
0.06096635013818741,
0.15447339415550232,
0.05394149571657181,
-0.33927351236343384,
-0.24300311505794525,
0.05323091894388199,
0.0894927829504013,
0.03982734680175781,
0.06509017944335938,
0.2832045257091522,
-0.11025705188512802,
0.22099556028842926,
-0.06201814115047455,
-0.07308132946491241,
0.0882783830165863,
0.2928555905818939,
-0.35064777731895447,
0.18580463528633118,
-0.12052441388368607,
-0.11982998251914978,
0.5136719942092896,
0.279159814119339,
0.2512262165546417,
0.19403240084648132,
-0.018737731501460075,
0.387634813785553,
-0.34569576382637024,
0.0017483718693256378,
-0.1830444037914276,
0.03836633265018463,
-0.045129455626010895,
0.47785091400146484,
0.262803852558136,
0.121673583984375,
-0.3591518998146057,
-0.4306388199329376,
0.02882019430398941,
-0.19772982597351074,
0.07834110409021378,
-0.011111315339803696,
-0.010418355464935303,
-0.16705875098705292,
0.020522765815258026,
-0.12513206899166107,
-0.28141269087791443,
0.032601937651634216,
0.3820100426673889,
0.3374098837375641,
0.1487741321325302,
-0.19223818182945251,
0.09197220951318741,
-0.2916877865791321,
0.22297976911067963,
-0.023476680740714073,
-0.3273977041244507,
0.014421138912439346,
0.02606189250946045,
0.04344448074698448,
-0.07840568572282791,
0.5525971055030823,
-0.07682272046804428,
-0.025626614689826965,
-0.23901470005512238,
-0.22094322741031647,
-0.1558264046907425,
0.09949930012226105,
0.13804970681667328,
0.013220615684986115,
-0.48803460597991943,
0.7941616177558899,
-0.09951535612344742,
-0.3218313753604889,
0.05241720750927925,
-0.08582847565412521,
-0.18601363897323608,
-0.10606890916824341,
0.11036580801010132,
-0.07856310904026031,
-0.4641360640525818,
-0.2623741328716278,
0.09455930441617966,
-0.10300686955451965,
-0.23746979236602783,
-0.1350490301847458,
-0.06299089640378952,
0.13107824325561523,
0.19001932442188263,
0.17378628253936768,
0.2542227506637573,
0.057827968150377274,
-0.13125242292881012,
0.42895209789276123,
0.059199631214141846,
0.2980826497077942,
0.6782124042510986,
0.13967488706111908,
-0.4402044415473938,
0.013495486229658127,
-0.2010638266801834,
0.29217731952667236,
0.522347629070282,
0.09386371821165085,
0.05640755593776703,
0.05856841430068016,
0.0362379215657711,
-0.5819568037986755,
0.14771246910095215,
-0.03819473832845688,
-0.2752721607685089,
-0.43040889501571655,
-0.4510781764984131,
0.6226555109024048,
-0.06891853362321854,
0.06402571499347687,
-0.10698005557060242,
0.4030175805091858,
-0.3770490288734436,
0.12314309179782867,
0.07024313509464264,
0.8982314467430115,
-0.07115459442138672,
0.29762762784957886,
0.03603225201368332,
-0.06406276673078537,
0.3835212290287018,
-0.6910939812660217,
-0.005356442183256149,
-0.31642746925354004,
-0.1875430941581726,
-0.351982057094574,
-0.024089181795716286,
0.16820195317268372,
0.22230446338653564,
-0.21350710093975067,
0.37431052327156067,
0.0577206164598465,
0.4703805446624756,
-0.044575467705726624,
0.4272416830062866,
-0.39702939987182617,
-0.523944079875946,
-0.18130463361740112,
0.02165990322828293,
0.02624461241066456,
-0.021381985396146774,
-0.045597344636917114,
-0.14370271563529968,
0.0020613297820091248,
-0.10980097949504852,
-0.007788203656673431,
0.140237957239151,
0.21435551345348358,
-0.2197982519865036,
0.006636213511228561,
-0.01443944126367569,
0.3113364279270172,
0.35827094316482544,
0.21587957441806793,
0.030009057372808456,
-0.3226814568042755,
0.23041437566280365,
-0.21720167994499207,
-0.01574156992137432,
-0.13946563005447388,
-0.02728695049881935,
0.26913002133369446,
0.054662078619003296,
-0.11568350344896317,
-0.04985494166612625,
-0.04645882174372673,
-0.3997412919998169,
-0.19418148696422577,
0.11445420980453491,
0.18132910132408142,
-0.2519474923610687,
-0.13601073622703552,
0.012785285711288452,
0.06616364419460297,
0.053681645542383194,
-0.030336759984493256,
0.03368593379855156,
0.03138788789510727,
-0.009990185499191284,
0.13846133649349213,
-0.10356563329696655,
-0.08631736040115356,
0.13031864166259766,
-0.28540948033332825,
-0.32508301734924316,
0.08191688358783722,
-0.06309324502944946,
-0.09481458365917206,
-0.1671716570854187,
0.19665703177452087,
0.4302739202976227,
-0.3918290436267853,
0.11484511196613312,
0.0370120070874691,
-0.03905414044857025,
0.003885112004354596,
0.032310694456100464,
-0.03909771889448166,
-0.17222130298614502,
-0.16301120817661285,
-0.259466290473938,
-0.05826340615749359,
0.24057044088840485,
0.024960750713944435,
0.3125118315219879,
0.2753751873970032,
-0.3476411700248718,
-0.21384570002555847,
-0.0816117525100708,
-0.16379046440124512,
0.16816850006580353,
-0.06791766732931137,
0.03381466493010521,
-0.02600596472620964,
0.16277912259101868,
0.035104356706142426,
-0.20604777336120605,
-0.10871844738721848,
-0.004719749093055725,
-0.3626047372817993,
-0.027424179017543793,
-0.08532096445560455,
0.23919101059436798,
0.05780935287475586,
0.12776467204093933,
-0.16292521357536316,
-0.11075189709663391,
-0.21453361213207245,
-0.3260585069656372,
0.5787267088890076,
0.04648049175739288,
-0.009024187922477722,
-0.17312289774417877,
0.5797995924949646,
0.06452251225709915,
-0.3917693495750427,
0.36771631240844727,
0.28823840618133545,
0.49360817670822144,
-0.18939556181430817,
0.1349031627178192,
-0.3057212233543396,
0.060380056500434875,
0.3331644833087921,
0.6284927725791931,
0.9139988422393799,
0.12127967923879623,
0.2586694657802582,
-0.12423466145992279,
0.1203276664018631,
-0.028455987572669983,
0.26342037320137024,
0.11792416870594025,
-0.147369384765625,
0.14693431556224823,
0.13268718123435974,
-0.0013378318399190903,
0.003538288176059723,
-0.1091664507985115,
0.46513766050338745,
-0.2163633555173874,
0.08972726762294769,
0.41693323850631714,
0.3571683168411255,
0.10197226703166962,
-0.22885935008525848,
0.04790462553501129,
0.6168881058692932,
0.17624425888061523,
0.33694443106651306,
0.4259210228919983,
-0.18104207515716553,
0.0998251736164093,
-0.00179184228181839,
0.2226395606994629,
0.053464073687791824,
0.4730294942855835,
-0.3988974094390869,
0.36296162009239197,
0.2224755883216858,
0.13492952287197113,
0.336578905582428,
-0.36837130784988403,
-0.20578791201114655,
-0.017030715942382812,
0.23256815969944,
0.09599564969539642,
-0.07590600848197937,
0.347836971282959,
-0.1701820343732834,
-0.047482043504714966,
-0.4018291234970093,
0.0004570372402667999,
0.0625685378909111,
0.13173586130142212,
0.01391131803393364,
-0.21970629692077637,
-0.2836593687534332,
0.2622631788253784,
-0.08788952231407166,
-0.33141452074050903,
-0.19185671210289001,
0.16858482360839844,
0.2644771337509155,
0.2347228080034256,
0.37269851565361023,
-0.010806713253259659,
0.03640299662947655,
-0.07333140820264816,
0.005684377625584602,
-0.0789167582988739,
0.1261889636516571,
0.47383952140808105,
0.06578021496534348,
-0.09595224261283875,
0.14172294735908508,
0.02035616897046566,
0.20796306431293488,
0.10001999139785767,
-0.09756340086460114,
0.10166719555854797,
-0.07910893857479095,
-0.1497848480939865,
0.33562377095222473,
0.014182046055793762,
0.08485666662454605,
-0.030817966908216476,
-0.025422710925340652,
-0.16912619769573212,
0.0687805712223053,
-0.3932403326034546,
0.37342122197151184,
0.1371646672487259,
-0.02530532330274582,
-0.0013592541217803955,
-0.031855396926403046,
-0.17497742176055908,
-0.28128522634506226,
0.42917799949645996,
-0.07159867882728577,
0.11567302793264389,
0.12712664902210236,
-0.0008260030299425125,
-0.023229733109474182,
0.45806312561035156,
0.10400883108377457,
-0.0665540024638176,
0.02904053032398224,
-0.1584469974040985,
-0.34426164627075195,
-0.04805877059698105,
0.15532594919204712,
-0.062034040689468384,
0.01657363958656788,
-0.08754721283912659,
0.1618349850177765,
0.247854545712471,
0.017980925738811493,
-0.22715595364570618,
0.22940389811992645,
0.027110666036605835,
-0.06810957193374634,
-0.04274587705731392,
0.12311266362667084,
0.11129071563482285,
-0.12107396125793457,
-0.2770122289657593,
0.03647999465465546,
0.19023607671260834,
-0.2698025703430176,
0.25699928402900696,
0.21857023239135742,
0.20786716043949127,
-0.4765971004962921,
0.21236079931259155,
-0.20955760776996613,
0.2198651134967804,
-0.031543951481580734,
0.18969406187534332,
-0.2996181845664978,
-0.04613576829433441,
-0.33556994795799255,
-0.07559353858232498,
-0.17488595843315125,
0.21646951138973236,
-0.2423887997865677,
-0.013368651270866394,
-0.30653002858161926,
-0.030205877497792244,
-0.035739049315452576,
0.1394874006509781,
-0.20004281401634216,
-0.08810003101825714,
-0.39696216583251953,
0.16549831628799438,
0.26738864183425903,
0.10681195557117462,
-0.109273761510849,
-0.17768731713294983,
-0.08374179154634476,
0.04896600544452667,
0.4212643504142761,
-0.22802014648914337,
-0.24503295123577118,
0.0018885117024183273,
-0.05274014174938202,
0.18599233031272888,
-0.1028052419424057,
-0.14504733681678772,
0.11273964494466782,
0.06363613903522491,
-0.1726149618625641,
0.16220569610595703,
0.24996542930603027,
0.16669771075248718,
-0.15021365880966187,
-0.20822931826114655,
-0.2506304383277893,
0.3272824287414551,
-0.16726899147033691,
-0.10961094498634338,
-0.4348282217979431
] |
https://github.com/huggingface/datasets/issues/2622 | Integration with AugLy | Hi,
you can define your own custom formatting with `Dataset.set_transform()` and then run the tokenizer with the batches of augmented data as follows:
```python
dset = load_dataset("imdb", split="train") # Let's say we are working with the IMDB dataset
dset.set_transform(lambda ex: {"text": augly_text_augmentation(ex["text"])}, columns="text", output_all_columns=True)
dataloader = torch.utils.data.DataLoader(dset, batch_size=32)
for epoch in range(5):
for batch in dataloader:
tokenizer_output = tokenizer(batch.pop("text"), padding=True, truncation=True, return_tensors="pt")
batch.update(tokenizer_output)
output = model(**batch)
...
``` | **Is your feature request related to a problem? Please describe.**
Facebook recently launched a library, [AugLy](https://github.com/facebookresearch/AugLy) , that has a unified API for augmentations for image, video and text.
It would be pretty exciting to have it hooked up to HF libraries so that we can make NLP models robust to misspellings or to punctuation, or emojis etc. Plus, with Transformers supporting more CV use cases, having augmentations support becomes crucial.
**Describe the solution you'd like**
The biggest difference between augmentations and preprocessing is that preprocessing happens only once, but you are running augmentations once per epoch. AugLy operates on text directly, so this breaks the typical workflow where we would run the tokenizer once, set format to pt tensors and be ready for the Dataloader.
**Describe alternatives you've considered**
One possible way of implementing these is to make a custom Dataset class where getitem(i) runs the augmentation and the tokenizer every time, though this would slow training down considerably given we wouldn't even run the tokenizer in batches.
| 68 | Integration with AugLy
**Is your feature request related to a problem? Please describe.**
Facebook recently launched a library, [AugLy](https://github.com/facebookresearch/AugLy) , that has a unified API for augmentations for image, video and text.
It would be pretty exciting to have it hooked up to HF libraries so that we can make NLP models robust to misspellings or to punctuation, or emojis etc. Plus, with Transformers supporting more CV use cases, having augmentations support becomes crucial.
**Describe the solution you'd like**
The biggest difference between augmentations and preprocessing is that preprocessing happens only once, but you are running augmentations once per epoch. AugLy operates on text directly, so this breaks the typical workflow where we would run the tokenizer once, set format to pt tensors and be ready for the Dataloader.
**Describe alternatives you've considered**
One possible way of implementing these is to make a custom Dataset class where getitem(i) runs the augmentation and the tokenizer every time, though this would slow training down considerably given we wouldn't even run the tokenizer in batches.
Hi,
you can define your own custom formatting with `Dataset.set_transform()` and then run the tokenizer with the batches of augmented data as follows:
```python
dset = load_dataset("imdb", split="train") # Let's say we are working with the IMDB dataset
dset.set_transform(lambda ex: {"text": augly_text_augmentation(ex["text"])}, columns="text", output_all_columns=True)
dataloader = torch.utils.data.DataLoader(dset, batch_size=32)
for epoch in range(5):
for batch in dataloader:
tokenizer_output = tokenizer(batch.pop("text"), padding=True, truncation=True, return_tensors="pt")
batch.update(tokenizer_output)
output = model(**batch)
...
``` | [
-0.17492364346981049,
-0.19208070635795593,
-0.14345213770866394,
-0.23967806994915009,
0.1912633776664734,
0.026355132460594177,
0.1673916131258011,
0.3273123502731323,
-0.323489785194397,
0.01600705087184906,
0.044724904000759125,
-0.017034316435456276,
-0.26089581847190857,
0.11050001531839371,
-0.07232948392629623,
-0.12908238172531128,
0.1623862236738205,
0.1287822723388672,
0.08359558880329132,
-0.06145159527659416,
0.24582388997077942,
-0.08019398152828217,
-0.12166761606931686,
0.08045361191034317,
-0.4331212639808655,
-0.20052948594093323,
-0.01846364513039589,
-0.1191418245434761,
0.03238704055547714,
-0.05491949990391731,
-0.2768346071243286,
0.29288235306739807,
0.1394537091255188,
0.28613215684890747,
-0.00010948609269689769,
-0.22785790264606476,
-0.04578423500061035,
-0.13730297982692719,
-0.3240188658237457,
-0.037046730518341064,
0.8906270265579224,
-0.4260543882846832,
0.01843705214560032,
-0.19566777348518372,
-0.20869311690330505,
-0.24436138570308685,
0.22595487534999847,
-0.1025846004486084,
0.7065521478652954,
-0.14006255567073822,
0.1746797412633896,
0.1642671823501587,
-0.1695445030927658,
0.17488998174667358,
0.08123765885829926,
0.6041797995567322,
-0.09989716112613678,
-0.1248123049736023,
0.33720940351486206,
-0.28763753175735474,
-0.16024711728096008,
0.5248733758926392,
0.08380965888500214,
-0.08503635227680206,
0.3582632839679718,
0.07865007221698761,
0.05024854093790054,
-0.5240309238433838,
-0.22245174646377563,
0.1617944985628128,
0.06442564725875854,
-0.18447139859199524,
-0.5932478904724121,
-0.3726414144039154,
0.22791412472724915,
-0.016429543495178223,
-0.23478683829307556,
0.10636160522699356,
-0.18184061348438263,
0.040381837636232376,
-0.19040897488594055,
-0.1769423484802246,
-0.05903150141239166,
0.2114747166633606,
0.25740674138069153,
0.2118021547794342,
0.23271195590496063,
-0.10308312624692917,
-0.31521183252334595,
-0.19015051424503326,
-0.01755017414689064,
0.10926312208175659,
0.21676713228225708,
0.3279651999473572,
-0.016493257135152817,
-0.16861160099506378,
-0.2443472445011139,
-0.3988581597805023,
-0.000884275883436203,
0.12807497382164001,
0.030747372657060623,
0.420788049697876,
-0.4762338399887085,
0.03917751461267471,
0.005793694406747818,
0.028280433267354965,
0.007681272923946381,
0.16383622586727142,
0.31968188285827637,
0.05407267063856125,
0.0039824023842811584,
-0.023267649114131927,
0.010846363380551338,
0.1630413979291916,
0.030164647847414017,
-0.1091240718960762,
-0.31270962953567505,
0.22830229997634888,
-0.26280683279037476,
0.009847166948020458,
-0.16757529973983765,
0.14024680852890015,
0.07051901519298553,
0.2345564067363739,
-0.22743339836597443,
0.28143808245658875,
0.25647759437561035,
0.1967920958995819,
0.0014194995164871216,
0.03552207350730896,
-0.04339975118637085,
0.17431585490703583,
-0.35392969846725464,
0.16251148283481598,
0.2804238498210907,
0.564819872379303,
0.14449657499790192,
0.07089025527238846,
0.3205162286758423,
0.009568344801664352,
0.2328442633152008,
-0.142587810754776,
0.42174649238586426,
-0.047833140939474106,
-0.1146405041217804,
0.22019165754318237,
-0.06575377285480499,
0.07215330004692078,
-0.11961935460567474,
-0.17513859272003174,
-0.15281853079795837,
0.1419905126094818,
-0.21869304776191711,
0.24643099308013916,
0.3550998568534851,
-0.01511634886264801,
-0.20945680141448975,
0.3241272568702698,
0.02104298025369644,
-0.3204982280731201,
0.17271788418293,
-0.13759499788284302,
0.01153482124209404,
-0.05997393652796745,
0.22750595211982727,
0.03743830323219299,
-0.041299544274806976,
-0.25403594970703125,
0.4374259412288666,
0.21485669910907745,
0.11356231570243835,
0.31734830141067505,
-0.26805931329727173,
0.07125964015722275,
-0.047738686203956604,
0.07811218500137329,
0.5492469072341919,
-0.4070940613746643,
0.05106598138809204,
0.20317046344280243,
0.01568915694952011,
0.06391093879938126,
-0.15260696411132812,
0.39137333631515503,
0.24380919337272644,
0.007396929431706667,
0.14716151356697083,
0.5788081288337708,
-0.046290501952171326,
0.0729110836982727,
-0.07357461750507355,
-0.31046241521835327,
0.2083488255739212,
0.0925205647945404,
0.09482257068157196,
-0.3573518991470337,
-0.20487576723098755,
0.0999734029173851,
0.30837154388427734,
-0.27003031969070435,
0.35838228464126587,
-0.0095582976937294,
-0.2125837653875351,
0.3153032064437866,
-0.03424365818500519,
-0.15589337050914764,
0.008181802928447723,
0.01510685682296753,
-0.08702848851680756,
0.30452805757522583,
-0.19639013707637787,
-0.38196390867233276,
0.22948357462882996,
-0.06370346993207932,
0.06825102865695953,
-0.3417004644870758,
0.18840327858924866,
0.061184242367744446,
-0.08514665067195892,
-0.05510909855365753,
-0.3363075256347656,
0.1103336438536644,
-0.11352996528148651,
0.10987810790538788,
0.05173880606889725,
0.04068778455257416,
-0.03455454856157303,
-0.14306260645389557,
-0.3016892075538635,
0.37117835879325867,
-0.0835314467549324,
-0.01991928741335869,
-0.010555502027273178,
0.291292279958725,
-0.05409705266356468,
0.12017706036567688,
-0.05367974936962128,
0.24017372727394104,
0.35652032494544983,
-0.09624317288398743,
0.16828466951847076,
0.13726861774921417,
-0.010751903057098389,
-0.2892519533634186,
-0.003915131092071533,
0.5061612129211426,
0.22247250378131866,
0.20472031831741333,
0.30282407999038696,
-0.0844089686870575,
0.08724066615104675,
0.0437297560274601,
-0.27210408449172974,
-0.3616882562637329,
-0.16090892255306244,
-0.09398545324802399,
0.13427577912807465,
-0.3366353511810303,
-0.5899164080619812,
-0.011485405266284943,
0.28068268299102783,
0.2557838559150696,
-0.014595218002796173,
0.13992366194725037,
-0.18369033932685852,
-0.13974766433238983,
0.07565663754940033,
-0.5855827331542969,
-0.07501153647899628,
0.2024066150188446,
-0.016865361481904984,
0.14358389377593994,
-0.08547491580247879,
-0.005228971131145954,
0.03526845574378967,
0.23537933826446533,
-0.025514546781778336,
0.09510718286037445,
0.4083150327205658,
0.36045122146606445,
-0.13965478539466858,
-0.30781134963035583,
-0.15908654034137726,
-0.4041632115840912,
-0.05803060904145241,
0.24767647683620453,
-0.171883687376976,
-0.4956326186656952,
-0.1368507593870163,
-0.4858056306838989,
-0.23158511519432068,
0.09462305158376694,
0.393837571144104,
-0.033978451043367386,
-0.12132607400417328,
0.3089970648288727,
-0.05525093898177147,
0.31204360723495483,
-0.014854203909635544,
-0.10320001095533371,
-0.029511604458093643,
0.1958804428577423,
-0.204299658536911,
0.027239985764026642,
0.003990374505519867,
0.047897957265377045,
0.4143899381160736,
0.23677031695842743,
-0.061321526765823364,
-0.36885347962379456,
-0.5738258957862854,
0.19891531765460968,
-0.04357319325208664,
-0.07544216513633728,
0.1535949409008026,
-0.24654768407344818,
0.0378195121884346,
-0.5249403715133667,
0.08292687684297562,
-0.23652620613574982,
-0.08772248029708862,
-0.32292604446411133,
0.08983168005943298,
-0.12273814529180527,
-0.25322225689888,
0.08238232880830765,
-0.320919007062912,
-0.3508954346179962,
-0.06733311712741852,
0.21393559873104095,
0.035834189504384995,
-0.15401701629161835,
-0.26023048162460327,
-0.10371744632720947,
0.1582040786743164,
0.24899724125862122,
0.027655843645334244,
0.036008019000291824,
0.28665438294410706,
-0.30430537462234497,
-0.14367464184761047,
-0.19873961806297302,
-0.31533151865005493,
0.10663414001464844,
0.22379465401172638,
-0.1450604498386383,
-0.2972113788127899,
0.07444357872009277,
0.08421695232391357,
-0.24843204021453857,
-0.12398381531238556,
0.08421242982149124,
-0.056963853538036346,
-0.15260417759418488,
0.04900595545768738,
-0.018391720950603485,
0.17895232141017914,
-0.17695742845535278,
0.16233402490615845,
-0.35058367252349854,
0.2998359203338623,
0.20657901465892792,
0.41561752557754517,
-0.10095950961112976,
-0.18605810403823853,
0.4628739655017853,
-0.10156802088022232,
-0.054713863879442215,
-0.033703938126564026,
-0.06935655325651169,
-0.014559530653059483,
-0.21227136254310608,
-0.027137236669659615,
0.2304038107395172,
-0.008917722851037979,
-0.23647956550121307,
-0.15787379443645477,
0.20579150319099426,
-0.35136231780052185,
-0.15940357744693756,
0.33360394835472107,
-0.5718927979469299,
0.23963162302970886,
-0.21302489936351776,
0.15913915634155273,
-0.15975500643253326,
-0.2681816518306732,
0.32106003165245056,
-0.16644395887851715,
0.26737990975379944,
-0.08260449767112732,
-0.051388174295425415,
0.047082655131816864,
-0.14047396183013916,
0.2797586917877197,
0.2064885050058365,
0.15287697315216064,
0.12105096876621246,
-0.17610278725624084,
0.11294412612915039,
-0.1383548527956009,
0.413658082485199,
0.010340813547372818,
-0.3415986895561218,
-0.035696350038051605,
-0.11379460245370865,
-0.1227884516119957,
-0.17809170484542847,
-0.1877986639738083,
-0.026624521240592003,
0.5311681628227234,
0.5997405052185059,
-0.2997634708881378,
-0.2721070349216461,
0.30778607726097107,
-0.10649288445711136,
-0.1589568555355072,
0.13468290865421295,
0.1879255473613739,
0.21513408422470093,
-0.4126155972480774,
0.12117680162191391,
0.05508899688720703,
0.005767168011516333,
0.13236314058303833,
-0.10527865588665009,
-0.07042104005813599,
0.18555215001106262,
0.2677006721496582,
0.167682945728302,
-0.039902299642562866,
-0.03502300754189491,
-0.057504575699567795,
-0.022307954728603363,
0.09607676416635513,
0.3651776611804962,
-0.026444651186466217,
0.0704544186592102,
-0.24456363916397095,
-0.04471872001886368,
0.15620563924312592,
0.4355120062828064,
0.44801464676856995,
0.2516481578350067,
0.3036266267299652,
0.025630196556448936,
0.10535222291946411,
-0.3496856391429901,
0.30982550978660583,
0.446502685546875,
-0.015354102477431297,
-0.49742910265922546,
-0.4103814959526062,
0.17625407874584198,
-0.09635697305202484,
-0.015520550310611725,
-0.25995269417762756,
0.08112581819295883,
-0.39264315366744995,
0.6640622615814209,
0.4433377981185913,
1.1297674179077148,
0.3573448061943054,
0.4586035907268524,
-0.042354121804237366,
0.11525027453899384,
0.3830612301826477,
-0.673458993434906,
0.06602896004915237,
-0.31177809834480286,
0.042526111006736755,
-0.03144189342856407,
0.04843335971236229,
0.010546751320362091,
0.23686112463474274,
-0.06575080752372742,
0.22402678430080414,
0.05880771577358246,
0.011048443615436554,
-0.1085084080696106,
0.44474563002586365,
0.00510671641677618,
-0.627037763595581,
-0.13108684122562408,
0.12677091360092163,
0.04231041669845581,
-0.022391393780708313,
-0.08845359086990356,
-0.16451044380664825,
0.1444622129201889,
0.0065412260591983795,
-0.13513407111167908,
0.04821036756038666,
-0.26968544721603394,
0.16328473389148712,
0.07335478067398071,
-0.07795199751853943,
0.23921754956245422,
-0.27086272835731506,
0.3563746213912964,
0.19401609897613525,
0.10041479766368866,
0.1763647198677063,
0.11717651784420013,
0.24891561269760132,
-0.054225701838731766,
-0.31676504015922546,
0.8901431560516357,
-0.03716949000954628,
0.20003029704093933,
0.0912044420838356,
0.2408939003944397,
-0.1644592434167862,
-0.022564858198165894,
-0.13243822753429413,
0.3902795910835266,
-0.17365916073322296,
-0.07812362909317017,
0.18459883332252502,
-0.21834436058998108,
-0.12471002340316772,
0.13353446125984192,
-0.031188085675239563,
-0.16716071963310242,
0.2195688784122467,
0.3298565149307251,
-0.026112612336874008,
-0.17155247926712036,
0.10394542664289474,
-0.21595394611358643,
-0.45866259932518005,
0.5600898265838623,
0.10689347982406616,
-0.22206662595272064,
-0.116867795586586,
-0.24980592727661133,
0.23137760162353516,
-0.07322351634502411,
-0.02474192902445793,
0.1908102184534073,
-0.18326640129089355,
0.06540340930223465,
0.24950659275054932,
0.13217417895793915,
0.018896471709012985,
-0.3815693259239197,
-0.07892866432666779,
-0.23479828238487244,
0.2478347271680832,
0.20007634162902832,
0.23172713816165924,
0.015280541032552719,
0.38590338826179504,
-0.08332164585590363,
0.40193140506744385,
-0.38871508836746216,
-0.07362470030784607,
0.060383573174476624,
0.32455354928970337,
-0.4759228229522705,
-0.123663030564785,
-0.06353062391281128,
0.2932156026363373,
0.09521976113319397,
0.2746933698654175,
-0.07042761892080307,
-0.17638063430786133,
-0.31557002663612366,
0.10930365324020386,
0.008839080110192299,
-0.03007899783551693,
-0.005570076406002045,
0.09157652407884598,
-0.15527164936065674,
-0.39599180221557617,
0.0469370074570179,
-0.057598330080509186,
-0.00039695948362350464,
0.049351874738931656,
-0.007732655853033066,
0.033723510801792145,
0.058431416749954224,
-0.18134739995002747,
0.16355443000793457,
0.2311697155237198,
0.21000981330871582,
0.19165471196174622,
-0.023030851036310196,
-0.13396060466766357,
-0.16000498831272125,
0.2594052255153656,
0.39722198247909546,
-0.1446174681186676,
0.03271368891000748,
0.06406670063734055,
-0.29730647802352905,
0.015183934941887856,
0.31591829657554626,
0.14793148636817932,
-0.07138033956289291,
-0.2626306116580963,
0.32405173778533936,
0.2630266845226288,
-0.2260718196630478,
0.13833585381507874,
-0.034776248037815094,
-0.5336184501647949,
0.0946139395236969,
0.25899794697761536,
0.34363657236099243,
0.4469383955001831,
-0.15339356660842896,
-0.0033767931163311005,
-0.03965044766664505,
-0.4922484755516052,
-0.026031969115138054,
-0.10514411330223083,
-0.11396586894989014,
0.0825667679309845,
0.264701783657074,
0.12361694872379303,
0.282700777053833,
-0.033463798463344574,
0.04620840400457382,
0.29884058237075806,
0.393766850233078,
0.02455480396747589,
0.15599876642227173,
-0.08951115608215332,
-0.1781274676322937,
-0.16767144203186035,
0.3514983654022217,
0.3922956883907318,
-0.015484578907489777,
0.01065506786108017,
0.1252191960811615,
-0.35954976081848145,
-0.09105735272169113,
0.47492432594299316,
-0.15800175070762634,
-0.03693981096148491,
0.09388813376426697,
0.016643866896629333,
-0.5320450067520142,
-0.0606440044939518,
-0.02812185510993004,
-0.08474253118038177,
-0.3039166033267975,
0.23173673450946808,
-0.01217091828584671,
-0.09179823100566864,
0.10230156034231186,
-0.21341541409492493,
0.5871022939682007,
-0.24508695304393768,
0.007228419184684753,
0.16291625797748566,
0.15804839134216309,
-0.01443924754858017,
0.13437101244926453,
0.3595368266105652,
0.34834054112434387,
-0.24692362546920776,
0.09211838990449905,
-0.3106662333011627,
-0.02305920608341694,
-0.14571277797222137,
0.20294871926307678,
0.31866729259490967,
0.17782433331012726,
0.06842944025993347,
0.1633450835943222,
-0.28827103972435,
-0.04679268226027489,
-0.11429482698440552,
0.379062294960022,
-0.249966561794281,
0.1722797006368637,
0.2577946186065674,
-0.19165796041488647,
-0.44913995265960693,
0.012258894741535187,
-0.24131786823272705,
-0.02361895889043808,
0.30173107981681824,
-0.239032581448555,
-0.033083636313676834,
-0.20297890901565552,
0.10858191549777985,
0.024044446647167206,
0.4602806568145752,
0.5174252986907959,
0.3198360502719879,
-0.0012374278157949448,
-0.04606562852859497,
-0.16398152709007263,
-0.03206106275320053,
0.3065175712108612,
-0.06327305734157562,
-0.07436215132474899,
0.33610397577285767,
0.21541500091552734,
0.005399323999881744,
-0.004030361771583557,
-0.2370176762342453,
-0.2534389793872833,
0.2219526618719101,
-0.1255369782447815,
0.4652816653251648,
-0.26097893714904785,
0.22665458917617798,
0.1869703084230423,
-0.16299355030059814,
-0.0399305634200573,
-0.25185486674308777,
0.05419868975877762,
0.09493134170770645,
-0.06723323464393616,
0.11916783452033997,
0.00027962028980255127,
0.5229855179786682,
0.08704216778278351,
0.12298616766929626,
-0.33340880274772644,
-0.13739170134067535,
-0.1719626486301422,
-0.17227019369602203,
-0.5522133708000183,
0.0878211259841919,
0.0875234603881836,
0.6268981695175171,
0.09717967361211777,
-0.12026600539684296,
-0.1241287812590599,
0.08815325796604156,
0.013139132410287857,
-0.5722596645355225,
-0.14993110299110413,
0.0011818883940577507,
-0.08785033226013184,
-0.01497313380241394,
-0.06615006178617477,
0.4720073342323303,
0.05170654505491257,
-0.00702858529984951,
-0.3324209451675415,
-0.45484986901283264,
0.3370194435119629,
-0.053553082048892975,
-0.27091696858406067,
-0.39913636445999146,
0.15169657766819,
0.3290497064590454,
0.11891872435808182,
-0.6594871878623962,
-0.15592248737812042,
0.20907792448997498,
0.07949693500995636,
-0.014465542510151863,
0.3205156624317169,
0.09034505486488342,
-0.18939821422100067,
-0.26280972361564636,
0.025504250079393387,
-0.19812354445457458,
0.03156086802482605,
-0.3176020085811615,
-0.29445481300354004
] |
https://github.com/huggingface/datasets/issues/2618 | `filelock.py` Error | Hi @liyucheng09, thanks for reporting.
Apparently this issue has to do with your environment setup. One question: is your data in an NFS share? Some people have reported this error when using `fcntl` to write to an NFS share... If this is the case, then it might be that your NFS just may not be set up to provide file locks. You should ask your system administrator, or try these commands in the terminal:
```shell
sudo systemctl enable rpc-statd
sudo systemctl start rpc-statd
``` | ## Describe the bug
It seems that the `filelock.py` went error.
```
>>> ds=load_dataset('xsum')
^CTraceback (most recent call last):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 37] No locks available
```
According to error log, it is OSError, but there is an `except` in the `_acquire` function.
```
def _acquire(self):
open_mode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC
try:
fd = os.open(self._lock_file, open_mode)
except (IOError, OSError):
pass
else:
self._lock_file_fd = fd
return None
```
I don't know why it stucked rather than `pass` directly.
I am not quite familiar with filelock operation, so any help is highly appriciated.
## Steps to reproduce the bug
```python
ds = load_dataset('xsum')
```
## Expected results
A clear and concise description of the expected results.
## Actual results
```
>>> ds=load_dataset('xsum')
^CTraceback (most recent call last):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 37] No locks available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 818, in load_dataset
use_auth_token=use_auth_token,
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 470, in prepare_module
with FileLock(lock_path):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 323, in __enter__
self.acquire()
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 272, in acquire
self._acquire()
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
KeyboardInterrupt
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.0
- Platform: Linux-4.15.0-135-generic-x86_64-with-debian-buster-sid
- Python version: 3.6.13
- PyArrow version: 4.0.1
| 84 | `filelock.py` Error
## Describe the bug
It seems that the `filelock.py` went error.
```
>>> ds=load_dataset('xsum')
^CTraceback (most recent call last):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 37] No locks available
```
According to error log, it is OSError, but there is an `except` in the `_acquire` function.
```
def _acquire(self):
open_mode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC
try:
fd = os.open(self._lock_file, open_mode)
except (IOError, OSError):
pass
else:
self._lock_file_fd = fd
return None
```
I don't know why it stucked rather than `pass` directly.
I am not quite familiar with filelock operation, so any help is highly appriciated.
## Steps to reproduce the bug
```python
ds = load_dataset('xsum')
```
## Expected results
A clear and concise description of the expected results.
## Actual results
```
>>> ds=load_dataset('xsum')
^CTraceback (most recent call last):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 37] No locks available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 818, in load_dataset
use_auth_token=use_auth_token,
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/load.py", line 470, in prepare_module
with FileLock(lock_path):
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 323, in __enter__
self.acquire()
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 272, in acquire
self._acquire()
File "/user/HS502/yl02706/.conda/envs/lyc/lib/python3.6/site-packages/datasets/utils/filelock.py", line 402, in _acquire
fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
KeyboardInterrupt
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.0
- Platform: Linux-4.15.0-135-generic-x86_64-with-debian-buster-sid
- Python version: 3.6.13
- PyArrow version: 4.0.1
Hi @liyucheng09, thanks for reporting.
Apparently this issue has to do with your environment setup. One question: is your data in an NFS share? Some people have reported this error when using `fcntl` to write to an NFS share... If this is the case, then it might be that your NFS just may not be set up to provide file locks. You should ask your system administrator, or try these commands in the terminal:
```shell
sudo systemctl enable rpc-statd
sudo systemctl start rpc-statd
``` | [
0.13904297351837158,
-0.3473016917705536,
0.01514747366309166,
0.0418621301651001,
0.030275877565145493,
0.09070471674203873,
0.1623595952987671,
0.13566650450229645,
0.05923748388886452,
0.09362287819385529,
-0.10108611732721329,
0.34031912684440613,
-0.032960910350084305,
-0.4240645468235016,
-0.4592517018318176,
0.11418285965919495,
0.006927616894245148,
-0.0698576271533966,
-0.11495725810527802,
-0.013815876096487045,
-0.3595567047595978,
0.3968338072299957,
-0.42495155334472656,
0.06983686983585358,
-0.27931830286979675,
-0.04803530126810074,
-0.13662536442279816,
0.388651579618454,
-0.16889901459217072,
-0.13956297934055328,
-0.051724132150411606,
0.08670692145824432,
0.048041678965091705,
0.5414590239524841,
-0.00011423230898799375,
-0.11047101020812988,
0.07514961063861847,
-0.056615374982357025,
-0.37209248542785645,
-0.042281001806259155,
0.14076006412506104,
-0.09100808203220367,
-0.08224913477897644,
-0.3874736726284027,
0.2373989224433899,
-0.3464201092720032,
0.14347846806049347,
-0.2871149480342865,
0.4022386074066162,
0.26393142342567444,
0.1441260427236557,
0.14820322394371033,
0.41752874851226807,
-0.17800910770893097,
0.10951284319162369,
-0.42019468545913696,
-0.05971862003207207,
0.6798741817474365,
0.7193894386291504,
-0.1613592505455017,
0.017196640372276306,
0.08550544083118439,
-0.14825023710727692,
-0.20494019985198975,
0.23206230998039246,
0.01935013383626938,
0.38151904940605164,
-0.44018790125846863,
-0.2167769968509674,
-0.06764275580644608,
0.04765749350190163,
-0.03311610221862793,
-0.4759548008441925,
-0.1618099808692932,
0.4275054633617401,
-0.07762046903371811,
0.06741656363010406,
0.14741484820842743,
-0.3159744143486023,
0.3756866753101349,
0.3556923568248749,
-0.11536048352718353,
-0.014598194509744644,
0.07217634469270706,
-0.06326054036617279,
0.30863523483276367,
0.028133869171142578,
0.13706645369529724,
0.2627243101596832,
-0.030875347554683685,
-0.08056854456663132,
-0.022622209042310715,
-0.07862445712089539,
0.1791381686925888,
-0.3750115931034088,
0.053203046321868896,
0.1346539556980133,
0.05768720805644989,
0.049189336597919464,
-0.23617739975452423,
-0.34432825446128845,
-0.2468751072883606,
-0.2653762698173523,
0.23430666327476501,
-0.10378843545913696,
0.039134614169597626,
0.05643061548471451,
0.1757366806268692,
0.3515816330909729,
0.10157108306884766,
-0.19551803171634674,
0.01386917196214199,
-0.06824744492769241,
-0.26271262764930725,
0.13233469426631927,
0.2916421890258789,
0.4077898859977722,
-0.15220052003860474,
-0.039868712425231934,
0.23378042876720428,
-0.3236958682537079,
0.018107246607542038,
0.13108566403388977,
0.291645348072052,
0.11067675054073334,
-0.08095020055770874,
0.44701844453811646,
0.16833586990833282,
-0.14556634426116943,
0.08150605857372284,
-0.08969929069280624,
0.20967404544353485,
-0.03427433967590332,
-0.00056447833776474,
-0.17086318135261536,
-0.3630225658416748,
0.07559599727392197,
0.3683512508869171,
0.2384219616651535,
-0.33143988251686096,
0.20222604274749756,
-0.1128135621547699,
-0.1493000090122223,
0.11939667165279388,
-0.13946504890918732,
-0.0028865300118923187,
0.3368243873119354,
-0.24561381340026855,
0.12863001227378845,
0.17143920063972473,
-0.3326627016067505,
-0.1702181100845337,
-0.24440766870975494,
0.14466819167137146,
-0.06694145500659943,
0.05731402710080147,
0.1982470005750656,
-0.30102717876434326,
0.04589804261922836,
-0.31522300839424133,
0.15902289748191833,
-0.33976858854293823,
0.1084689199924469,
-0.15303833782672882,
0.04826044291257858,
0.40750008821487427,
-0.12052440643310547,
0.29175084829330444,
0.18150295317173004,
-0.19200600683689117,
0.16255611181259155,
0.09017448127269745,
-0.021339477971196175,
0.11091446876525879,
-0.4444107413291931,
0.019757278263568878,
0.10673972219228745,
-0.5011026263237,
-0.5333335399627686,
0.056169189512729645,
-0.4790894389152527,
0.0537874698638916,
0.1695943921804428,
0.4211782217025757,
-0.017368730157613754,
-0.16417071223258972,
0.2718968987464905,
0.03714114427566528,
-0.013501500710844994,
-0.1450967937707901,
-0.15280912816524506,
0.037539973855018616,
-0.0440806970000267,
0.14069215953350067,
-0.002950366586446762,
0.15863820910453796,
0.1399637758731842,
0.007126885466277599,
0.5296831130981445,
-0.14621329307556152,
-0.2674141526222229,
0.162833109498024,
0.47947999835014343,
0.13991351425647736,
0.0850246250629425,
-0.1591181457042694,
-0.18927273154258728,
0.25222769379615784,
-0.19898280501365662,
-0.07433643937110901,
-0.07250635325908661,
-0.07643154263496399,
-0.04376998543739319,
-0.04353424534201622,
-0.04201529547572136,
-0.081364706158638,
0.11759726703166962,
-0.014887727797031403,
-0.1799631267786026,
0.049714814871549606,
-0.12948769330978394,
0.47908443212509155,
-0.4433477818965912,
0.20137934386730194,
-0.1435980200767517,
0.07251722365617752,
-0.1064029410481453,
-0.2321331650018692,
-0.2575788199901581,
-0.007140733301639557,
0.28432342410087585,
-0.19003580510616302,
-0.27922794222831726,
0.4126051664352417,
0.2959447205066681,
-0.11242681741714478,
-0.21720191836357117,
-0.2112124115228653,
0.17446021735668182,
0.35837599635124207,
-0.23047655820846558,
0.014889946207404137,
0.08370711654424667,
-0.06126198545098305,
0.12024088203907013,
0.1285019814968109,
0.0746096819639206,
-0.039793960750103,
-0.08322715014219284,
0.21097955107688904,
-0.02518204227089882,
0.0652942806482315,
0.02042941190302372,
0.01948045939207077,
0.46110546588897705,
0.0080115320160985,
0.062438469380140305,
-0.10792240500450134,
-0.05187877267599106,
-0.0763704851269722,
0.19074083864688873,
0.05702020600438118,
0.2793467938899994,
0.18843409419059753,
0.31287917494773865,
0.3672703206539154,
-0.1931106448173523,
0.5885148644447327,
0.7208226919174194,
0.10168430954217911,
-0.2875610589981079,
0.019920634105801582,
0.302702397108078,
-0.2104957550764084,
-0.046900369226932526,
-0.033083364367485046,
-0.041874390095472336,
0.21207299828529358,
0.05869468301534653,
0.23114964365959167,
0.2032684087753296,
-0.8740934729576111,
-0.012596813961863518,
0.23404814302921295,
-0.004903171211481094,
-0.04891902208328247,
-0.16946129500865936,
0.1353212594985962,
0.060186415910720825,
0.3312353193759918,
-0.031747665256261826,
-0.31381338834762573,
0.1344846785068512,
0.46495354175567627,
-0.07447779923677444,
0.003971271216869354,
-0.3631454408168793,
0.06436027586460114,
0.19804726541042328,
0.13166043162345886,
0.11120586097240448,
0.036751408129930496,
-0.09585648030042648,
-0.0664248913526535,
0.13150784373283386,
-0.0980738028883934,
0.20801445841789246,
-0.0003202427178621292,
-0.08122601360082626,
-0.42460474371910095,
-0.1829686462879181,
-0.03146690875291824,
-0.1735009253025055,
0.45975619554519653,
0.05671524256467819,
0.30354803800582886,
-0.02334631234407425,
0.02494676783680916,
0.13830353319644928,
-0.09792980551719666,
-0.07827752828598022,
0.07984162122011185,
0.01495764497667551,
-0.07151579856872559,
-0.38446876406669617,
-0.03470843285322189,
-0.3898947834968567,
-0.517512321472168,
0.14336612820625305,
-0.18550924956798553,
0.06644251197576523,
0.33252283930778503,
-0.15231256186962128,
0.4005427956581116,
0.10167065262794495,
0.18093426525592804,
0.14396052062511444,
-0.29267099499702454,
0.29690438508987427,
-0.0858427956700325,
-0.42288580536842346,
-0.31535372138023376,
0.08550326526165009,
-0.4737822413444519,
-0.11343178153038025,
-0.2983643412590027,
-0.5243875980377197,
-0.3494299650192261,
0.09394672513008118,
-0.5529794692993164,
0.019617997109889984,
0.16180822253227234,
-0.24514934420585632,
-0.06537827104330063,
-0.2333381175994873,
0.17943210899829865,
0.1334114670753479,
0.08641056716442108,
0.12635473906993866,
0.0655042827129364,
0.05867689102888107,
-0.0067037902772426605,
0.363944411277771,
0.1085522323846817,
0.22693967819213867,
0.2979885935783386,
-0.09206189960241318,
0.2684897482395172,
0.023914963006973267,
-0.29589805006980896,
-0.2039767950773239,
0.26492375135421753,
-0.23208709061145782,
-0.18439455330371857,
-0.01485946774482727,
0.29027774930000305,
-0.1478254199028015,
-0.3533315062522888,
-0.2893275320529938,
-0.3504851758480072,
-0.08503243327140808,
0.4227718114852905,
-0.09890168160200119,
-0.1246485561132431,
0.12014978379011154,
0.10847622156143188,
0.15865641832351685,
0.0896880179643631,
0.5906798243522644,
0.4121553301811218,
-0.10582159459590912,
-0.08029408752918243,
-0.19680170714855194,
0.032653551548719406,
0.32548362016677856,
-0.035332586616277695,
0.25913095474243164,
-0.08967344462871552,
0.0270855650305748,
0.10452259331941605,
-0.14179804921150208,
0.4386395812034607,
0.38485273718833923,
0.13846227526664734,
0.04644032195210457,
0.11602158844470978,
-0.025785325095057487,
-0.1277816891670227,
-0.2922453284263611,
0.24068816006183624,
0.45883914828300476,
0.38517966866493225,
-0.034746598452329636,
-0.05584538355469704,
-0.2660071551799774,
0.17024138569831848,
-0.21928079426288605,
-0.6137141585350037,
-0.027883008122444153,
-0.10194388777017593,
-0.43936511874198914,
0.11961191892623901,
0.09540241211652756,
0.1485143005847931,
-0.017836706712841988,
-0.07586885988712311,
0.2558477520942688,
-0.20389214158058167,
0.023045092821121216,
-0.09569686651229858,
0.06682524085044861,
-0.11880090087652206,
0.1291114240884781,
-0.005666650831699371,
-0.35343876481056213,
0.33840546011924744,
0.22878772020339966,
0.27276355028152466,
0.05998671427369118,
0.25807473063468933,
-0.2394801378250122,
-0.009457141160964966,
0.2725372314453125,
-0.2674671411514282,
0.14914076030254364,
-0.03856924548745155,
0.23627568781375885,
0.17786280810832977,
-0.2500500977039337,
0.24824683368206024,
0.04107055813074112,
0.038537897169589996,
0.045814551413059235,
0.059394992887973785,
0.11779382824897766,
-0.07418137788772583,
0.7165999412536621,
0.41439056396484375,
0.0822593942284584,
0.314322292804718,
0.010075956583023071,
0.78897625207901,
0.011548113077878952,
-0.057582657784223557,
0.22419455647468567,
-0.0027727633714675903,
0.3785955011844635,
-0.17744097113609314,
0.11317005008459091,
-0.3271002173423767,
-0.5434807538986206,
0.11708895862102509,
-0.2865748703479767,
0.43152546882629395,
-0.46608930826187134,
-0.07265805453062057,
-0.029668843373656273,
-0.3799651265144348,
-0.422393262386322,
0.022712834179401398,
0.010389775037765503,
-0.8001109957695007,
-0.03949800133705139,
-0.16886864602565765,
0.11110064387321472,
0.16464217007160187,
0.34542593359947205,
-0.10815134644508362,
-0.11124642193317413,
-0.3464564085006714,
-0.16939328610897064,
-0.3626008629798889,
0.12797507643699646,
0.02965855598449707,
0.26357609033584595,
-0.08925135433673859,
0.09733828902244568,
-0.0544365718960762,
0.4668453335762024,
-0.06601522862911224,
0.25165513157844543,
0.09808673709630966,
-0.02136775478720665,
0.03229022026062012,
0.05249547213315964,
0.25745171308517456,
-0.058138657361269,
0.5052600502967834,
-0.03953122720122337,
-0.1861063539981842,
0.22421029210090637,
-0.11820951849222183,
-0.22629007697105408,
0.01977907121181488,
0.16499513387680054,
0.05355922877788544,
0.020764179527759552,
-0.328797847032547,
-0.3234480321407318,
-0.24973975121974945,
-0.11839471757411957,
0.07017552852630615,
0.2645707130432129,
-0.280615895986557,
0.041297703981399536,
-0.2572527825832367,
-0.2472550868988037,
0.07781180739402771,
0.23694640398025513,
-0.1354961097240448,
-0.15625008940696716,
0.7352308034896851,
0.3345284163951874,
0.07651606947183609,
-0.09322327375411987,
0.16827398538589478,
-0.18576978147029877,
-0.310703307390213,
0.12187399715185165,
-0.11818793416023254,
0.2336878925561905,
0.15470190346240997,
0.13541226089000702,
0.18550656735897064,
-0.16562864184379578,
-0.047842711210250854,
-0.8504989147186279,
-0.3750936985015869,
-0.1020798534154892,
-0.2187470644712448,
0.04181688278913498,
-0.19383004307746887,
-0.05386664345860481,
-0.12492605298757553,
-0.1879468709230423,
-0.2676633894443512,
0.09532693773508072,
-0.3377150595188141,
-0.11402492225170135,
0.2787441611289978,
0.13261161744594574,
-0.0353810153901577,
0.066925048828125,
0.14833329617977142,
0.4477185010910034,
0.037708982825279236,
-0.11066385358572006,
-0.23869651556015015,
0.18022973835468292,
-0.007502879947423935,
0.05982457101345062,
0.16730697453022003,
-0.42677807807922363,
-0.015984542667865753,
0.19859161972999573,
-0.18044565618038177,
0.16996213793754578,
0.04991363734006882,
0.13163523375988007,
0.4090226888656616,
0.3865372836589813,
-0.031267859041690826,
0.24747808277606964,
-0.15970657765865326,
-0.05310507118701935,
-0.011753368191421032,
-0.03756967931985855,
-0.32584288716316223,
0.0814671516418457,
-0.6099715828895569,
-0.21357175707817078,
-0.03528429567813873,
0.2961655855178833,
0.22895526885986328,
-0.052655450999736786,
0.23114317655563354,
0.37490153312683105,
0.3837078809738159,
0.1908649504184723,
-0.14633537828922272,
0.17294810712337494,
0.15540754795074463,
0.19783936440944672,
-0.028234045952558517,
0.002865058835595846,
0.26053065061569214,
0.11684601753950119,
-0.24268661439418793,
0.13616393506526947,
-0.5636628270149231,
-0.03446757420897484,
0.008577346801757812,
0.05504714697599411,
-0.05344892293214798,
0.13514529168605804,
-0.05059780552983284,
0.027880040928721428,
-0.021687425673007965,
0.0026912912726402283,
0.22837495803833008,
-0.11277155578136444,
0.11676932126283646,
0.20271483063697815,
-0.3984917402267456,
-0.044369861483573914,
0.038787852972745895,
0.024672549217939377,
0.2728336751461029,
-0.39692023396492004,
0.31708917021751404,
0.006524592638015747,
0.1835418939590454,
-0.1422097086906433,
-0.1942434310913086,
0.1280916929244995,
-0.23842866718769073,
0.19145505130290985,
0.22333325445652008,
0.35838907957077026,
-0.17988866567611694,
0.3329327404499054,
0.3796776831150055,
-0.05581481754779816,
0.07675701379776001,
-0.2198263704776764,
0.0660911500453949,
0.08640976250171661,
-0.21481654047966003,
0.3427783250808716,
0.04180916026234627,
-0.3922550082206726,
-0.4485297203063965,
0.20995071530342102,
0.36796361207962036,
-0.33282309770584106,
-0.20377512276172638,
0.5172692537307739,
0.11834228783845901,
0.30158913135528564,
-0.04628455638885498,
0.36407554149627686,
0.5558557510375977,
0.08136701583862305,
0.3179982006549835,
-0.1306931972503662,
-0.004330208525061607,
0.06706442683935165,
0.3741811513900757,
0.1950095295906067,
0.07650645077228546,
0.2795679569244385,
0.1557217836380005,
-0.24709723889827728,
0.10125241428613663,
0.09901593625545502,
0.25357353687286377,
-0.27105793356895447,
0.2363584339618683,
0.15872441232204437,
-0.12887296080589294,
-0.10933874547481537,
0.03506578505039215,
-0.29956507682800293,
-0.02776266634464264,
-0.0843690037727356,
0.21661677956581116,
0.031953368335962296,
-0.013926718384027481,
0.09887181222438812,
-0.0031077973544597626,
-0.31882405281066895,
0.5872225165367126,
0.22566691040992737,
-0.32831060886383057,
0.17957238852977753,
-0.5215359926223755,
0.33253705501556396,
0.1587125062942505,
-0.43448302149772644,
-0.10756776481866837,
-0.035503022372722626,
-0.08127918094396591,
-0.034282147884368896,
0.5500484108924866,
-0.1895494908094406,
0.18381460011005402,
0.47698456048965454,
-0.20527619123458862,
-0.20118068158626556,
0.15575091540813446,
-0.1988183557987213,
-0.059536952525377274,
-0.10382042825222015,
0.009544052183628082,
-0.45229899883270264,
0.12382643669843674,
-0.08144615590572357,
-0.5590332746505737,
-0.02296338975429535,
-0.0602857768535614,
0.2571272850036621,
0.10171623528003693,
0.36431655287742615,
-0.10407862812280655,
-0.37731170654296875,
-0.1476336270570755,
-0.11325231194496155,
0.04849477857351303,
-0.3111395239830017,
0.02866712585091591,
0.3408146798610687,
-0.3522248864173889,
-0.41356855630874634,
-0.4027699828147888,
0.4307861030101776,
-0.4707092046737671,
-0.40591171383857727,
-0.5092312097549438,
0.3551386892795563,
-0.05866134166717529,
0.03474486246705055,
0.28444522619247437,
0.32307058572769165,
0.20757220685482025,
0.31688690185546875,
-0.40638142824172974,
-0.14963273704051971,
0.6324785351753235,
-0.5143593549728394,
-0.043319251388311386,
0.14104634523391724,
0.40481552481651306,
-0.03848457336425781,
-0.14385740458965302,
-0.05028679221868515,
0.008029244840145111,
0.32626837491989136,
0.0352984257042408,
-0.11909548938274384,
0.017381049692630768,
0.04601727053523064,
-0.027551766484975815,
0.08915455639362335,
0.12601910531520844,
0.06519608199596405,
0.1504264622926712,
0.32259035110473633,
0.03883420675992966
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | For some reason this happens (both `datasets` version are on master) only on Python 3.6 and not Python 3.8. | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 19 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
For some reason this happens (both `datasets` version are on master) only on Python 3.6 and not Python 3.8. | [
-0.350413054227829,
0.13335853815078735,
-0.006901651620864868,
0.3097100257873535,
0.038903068751096725,
0.08054875582456589,
0.21886467933654785,
0.3883451223373413,
0.0006035156548023224,
-0.040230393409729004,
0.3230991065502167,
0.034594740718603134,
0.06731633841991425,
0.044697538018226624,
-0.16802453994750977,
-0.1674068570137024,
0.21948304772377014,
-0.030850037932395935,
0.033668000251054764,
0.22254152595996857,
-0.277071475982666,
0.3025192618370056,
-0.1921597272157669,
-0.22603653371334076,
-0.39885929226875305,
-0.21687106788158417,
0.1474187672138214,
0.014026965945959091,
-0.0263656172901392,
-0.5282496809959412,
-0.039114810526371,
-0.23884329199790955,
0.44403940439224243,
0.5343339443206787,
-0.00012084822083124891,
-0.15447059273719788,
0.33359891176223755,
0.006130525842308998,
-0.20748192071914673,
0.026441462337970734,
-0.43909788131713867,
-0.3250519037246704,
0.06267755478620529,
-0.33215969800949097,
0.4254884421825409,
-0.043326590210199356,
-0.35616180300712585,
-0.46521756052970886,
0.6484065651893616,
0.44555917382240295,
0.127259761095047,
0.04884527623653412,
0.09546931087970734,
-0.013406728394329548,
-0.030333928763866425,
0.1398148089647293,
-0.027030352503061295,
0.14632219076156616,
-0.16734275221824646,
0.27415695786476135,
0.2642323076725006,
-0.05715304613113403,
-0.15867184102535248,
-0.2541062533855438,
-0.11992412060499191,
-0.0854102298617363,
-0.05930463224649429,
-0.28581497073173523,
0.18332549929618835,
0.40008556842803955,
0.11885803937911987,
-0.19417664408683777,
-0.21227598190307617,
-0.3544592261314392,
0.11099280416965485,
-0.5715140104293823,
0.05930091440677643,
0.5090218782424927,
-0.0011913729831576347,
0.10803702473640442,
-0.2637680470943451,
-0.11440970748662949,
-0.21542569994926453,
-0.04446630924940109,
0.0033303499221801758,
-0.18538004159927368,
-0.12459245324134827,
0.023660022765398026,
-0.12368254363536835,
-0.09167546033859253,
-0.001767149195075035,
-0.279203861951828,
-0.5480957627296448,
-0.048375580459833145,
-0.1531422883272171,
0.07192545384168625,
0.16831684112548828,
-0.4102761447429657,
0.0765404924750328,
-0.170694500207901,
0.275611937046051,
-0.3768741190433502,
0.2522153854370117,
0.03994359076023102,
0.5629564523696899,
0.12413445115089417,
0.3155883848667145,
-0.01165540236979723,
0.23482945561408997,
0.013442996889352798,
0.0630367249250412,
-0.051226697862148285,
0.018255241215229034,
-0.16855314373970032,
0.13086430728435516,
0.05271880701184273,
0.015618011355400085,
-0.08819214999675751,
-0.05242260545492172,
0.17997854948043823,
-0.35753077268600464,
-0.1791665256023407,
-0.2505488097667694,
-0.19062304496765137,
-0.09928096830844879,
0.26185479760169983,
0.1635042279958725,
0.2956344485282898,
-0.17176395654678345,
0.006308835931122303,
-0.020449019968509674,
-0.11028601229190826,
-0.0897178053855896,
-0.023623207584023476,
-0.0731949657201767,
-0.2337144911289215,
-0.012696946039795876,
0.2607298195362091,
-0.07130788266658783,
-0.24395595490932465,
-0.09356631338596344,
-0.042942631989717484,
-0.11929292231798172,
0.20152056217193604,
0.30511778593063354,
0.14322136342525482,
-0.13218089938163757,
-0.1420600414276123,
-0.055118657648563385,
0.18369349837303162,
-0.44878071546554565,
-0.05097262188792229,
-0.39949071407318115,
0.13035835325717926,
-0.18312124907970428,
0.132242351770401,
-0.4531036913394928,
-0.07572819292545319,
0.10636354982852936,
0.10563747584819794,
0.37759828567504883,
-0.3547270894050598,
0.5717488527297974,
-0.2804207503795624,
0.02248477376997471,
0.2825922966003418,
-0.7132406234741211,
0.09057444334030151,
0.07878570258617401,
-0.01803893968462944,
0.4428820312023163,
0.3599774241447449,
-0.0533611960709095,
0.32683005928993225,
-0.11791789531707764,
0.2507765293121338,
0.14929446578025818,
0.18227194249629974,
0.07331889122724533,
0.4902760684490204,
-0.07509629428386688,
0.008264908567070961,
-0.01788090169429779,
-0.34517768025398254,
0.6365361213684082,
0.10816794633865356,
0.5238187909126282,
0.378955602645874,
0.056740306317806244,
0.24714338779449463,
-0.17493554949760437,
-0.1934180110692978,
-0.05823049694299698,
-0.19986240565776825,
-0.33822333812713623,
-0.047783397138118744,
0.1436721384525299,
-0.20432816445827484,
0.3136591911315918,
-0.24686956405639648,
0.11876421421766281,
0.42371881008148193,
0.13869497179985046,
0.12137763947248459,
0.0007525430992245674,
0.22975099086761475,
-0.44707930088043213,
-0.14845913648605347,
-0.1031331792473793,
-0.1582559198141098,
-0.1408953070640564,
-0.026228006929159164,
0.20962858200073242,
0.2228926718235016,
-0.06189114972949028,
0.14834453165531158,
0.020685609430074692,
-0.11799345910549164,
-0.08283205330371857,
0.20885489881038666,
-0.04391968995332718,
0.10726582258939743,
0.18921488523483276,
0.046816807240247726,
-0.25189003348350525,
0.301450252532959,
0.2420790046453476,
-0.2325037270784378,
0.20497553050518036,
0.12091950327157974,
0.159819558262825,
-0.30478623509407043,
-0.1392456591129303,
0.20688846707344055,
0.05533434450626373,
-0.04376153647899628,
-0.21176400780677795,
0.050000205636024475,
0.12288728356361389,
0.14272922277450562,
-0.1562669426202774,
0.29582399129867554,
-0.060060154646635056,
0.09399997442960739,
-0.06637301295995712,
0.6036190986633301,
-0.16806678473949432,
0.3515247702598572,
-0.0444825105369091,
-0.009333789348602295,
0.20486997067928314,
-0.10043235123157501,
-0.0489787831902504,
-0.23922310769557953,
0.2890390455722809,
0.21995000541210175,
-0.11893798410892487,
0.035022128373384476,
-0.2944983243942261,
0.0433693528175354,
0.6203622817993164,
0.028687801212072372,
0.0749301016330719,
0.2449774146080017,
-0.027928218245506287,
-0.010686108842492104,
0.0029468853026628494,
0.11934669315814972,
0.34180501103401184,
0.1002831906080246,
0.006235327571630478,
0.1227358803153038,
0.22482769191265106,
-0.082127645611763,
0.28829225897789,
0.15306483209133148,
0.344041109085083,
0.29733213782310486,
0.1898813098669052,
0.1800428032875061,
-0.14058370888233185,
-0.39450034499168396,
-0.21517260372638702,
0.07262631505727768,
-0.3205600380897522,
0.35708191990852356,
-0.18105287849903107,
-0.007561307400465012,
-0.49126994609832764,
-0.42576202750205994,
-0.2852294445037842,
-0.322109192609787,
-0.18691633641719818,
-0.1177201122045517,
-0.47566261887550354,
-0.16669677197933197,
-0.16257637739181519,
0.06794673204421997,
0.10909691452980042,
-0.062014222145080566,
0.08074545860290527,
0.007107512094080448,
-0.12853121757507324,
-0.12260833382606506,
-0.03142964467406273,
-0.21984867751598358,
0.02818142995238304,
0.09626287966966629,
0.09538944810628891,
-0.07991776615381241,
0.12638995051383972,
0.1485724002122879,
0.022512570023536682,
-0.09865589439868927,
0.17728057503700256,
0.19193410873413086,
0.037925563752651215,
-0.5070136189460754,
0.044114913791418076,
0.13461145758628845,
0.004804201424121857,
0.17157617211341858,
-0.06951627880334854,
-0.16232609748840332,
-0.09681161493062973,
-0.05303824692964554,
-0.023268306627869606,
-0.36814379692077637,
0.42807233333587646,
-0.10500259697437286,
0.07836595177650452,
-0.092758409678936,
0.12514452636241913,
-0.05205400288105011,
-0.05367644876241684,
-0.2879786491394043,
0.21346013247966766,
-0.4409472644329071,
0.007613103836774826,
-0.28375542163848877,
-0.259248822927475,
0.11729693412780762,
0.15138351917266846,
-0.02927713468670845,
0.0501033291220665,
-0.3940514922142029,
0.5075171589851379,
-0.10015659034252167,
0.3795507848262787,
-0.12314534187316895,
0.19707247614860535,
0.12103038281202316,
-0.06950367242097855,
-0.016998756676912308,
-0.040780290961265564,
0.11084519326686859,
0.11252264678478241,
0.05565183609724045,
0.48213478922843933,
-0.08725381642580032,
0.7164244055747986,
-0.23811911046504974,
-0.12439696490764618,
0.8051135540008545,
0.16235366463661194,
0.20871339738368988,
0.09969445317983627,
0.17027251422405243,
-0.14298847317695618,
-0.027412716299295425,
0.030717061832547188,
-0.12323778867721558,
-0.14783623814582825,
0.17173635959625244,
0.03455975279211998,
-0.15304239094257355,
0.037861548364162445,
-0.01081153191626072,
-0.38519102334976196,
-0.3762856423854828,
0.23838259279727936,
-0.10052213072776794,
0.32723090052604675,
-0.3106668293476105,
0.018064886331558228,
-0.02607269585132599,
0.08669750392436981,
-0.24858856201171875,
-0.039185479283332825,
0.22624388337135315,
0.12180802971124649,
-0.5017979741096497,
-0.3746839463710785,
-0.49013054370880127,
0.21432271599769592,
0.06045713275671005,
0.6483102440834045,
0.141809344291687,
0.0654703676700592,
-0.06857079267501831,
-0.07539224624633789,
0.6379686594009399,
-0.018766062334179878,
-0.2247709482908249,
0.2450767457485199,
0.3232693076133728,
-0.2799651026725769,
-0.13157083094120026,
0.15154515206813812,
0.21558021008968353,
0.8975411057472229,
0.059788163751363754,
-0.284892201423645,
-0.0003904420882463455,
0.2221134454011917,
0.3107576370239258,
-0.10430032014846802,
-0.26524877548217773,
-0.17475555837154388,
-0.18595978617668152,
-0.07460130006074905,
-0.2814912796020508,
0.10140899568796158,
0.4137974977493286,
-0.15763509273529053,
-0.1487763375043869,
0.06871171295642853,
-0.34378156065940857,
-0.041205376386642456,
0.00847814790904522,
0.2232959270477295,
-0.08426596969366074,
0.13859176635742188,
-0.024647273123264313,
0.25639310479164124,
0.4521259069442749,
0.30588018894195557,
0.03567202761769295,
-0.4467417001724243,
-0.08229409158229828,
-0.24422906339168549,
0.3771297335624695,
-0.08253490924835205,
-0.21510927379131317,
0.10141495615243912,
-0.09078168123960495,
0.3834992051124573,
0.12199991196393967,
-0.3035017251968384,
0.314987450838089,
0.05135166645050049,
-0.8291918635368347,
0.02235311083495617,
0.3281487822532654,
0.054703373461961746,
0.2725345492362976,
0.18033072352409363,
-0.2888333201408386,
-0.3916207551956177,
0.1753714382648468,
-0.18076851963996887,
0.5057506561279297,
0.44220906496047974,
0.1994863599538803,
0.08180718123912811,
-0.4618528485298157,
0.6346325278282166,
0.11708864569664001,
0.05739190801978111,
-0.24336403608322144,
0.45917606353759766,
0.13322222232818604,
-0.17513974010944366,
0.10180634260177612,
0.006923258304595947,
-0.10190196335315704,
0.027728065848350525,
-0.5292732119560242,
-0.29043540358543396,
-0.23429076373577118,
-0.019791075959801674,
0.16610310971736908,
-0.21770083904266357,
-0.5199822783470154,
-0.011451441794633865,
-0.036423660814762115,
-0.22290199995040894,
-0.061597101390361786,
-0.21488824486732483,
0.08854325115680695,
-0.169039785861969,
-0.4068049192428589,
0.17536145448684692,
0.04276229068636894,
0.1383480727672577,
0.3813120722770691,
-0.232272669672966,
0.1784355491399765,
-0.18819619715213776,
0.23854005336761475,
0.12398397922515869,
0.041076600551605225,
-0.055925313383340836,
-0.07377582043409348,
-0.08621370047330856,
0.10324788093566895,
-0.02033926546573639,
0.16117990016937256,
-0.05620986968278885,
-0.15634895861148834,
0.16221855580806732,
0.042542219161987305,
-0.25142669677734375,
-0.06245829164981842,
0.282257080078125,
-0.2384878545999527,
-0.3111315369606018,
-0.12317217886447906,
0.08429092168807983,
0.24334847927093506,
-0.12550869584083557,
0.023761682212352753,
0.2197459191083908,
0.01795095205307007,
0.30154141783714294,
-0.39906981587409973,
-0.20240765810012817,
-0.27893003821372986,
0.12374426424503326,
0.028623314574360847,
-0.2644248306751251,
0.25477588176727295,
0.5522834658622742,
-0.17249330878257751,
-0.0548529215157032,
0.46135789155960083,
0.29941681027412415,
-0.43730634450912476,
0.5468566417694092,
-0.116193488240242,
0.25728362798690796,
-0.06473778188228607,
0.4393738806247711,
0.02462979033589363,
-0.0039291903376579285,
0.10563190281391144,
-0.4127843976020813,
-0.15964235365390778,
-0.05612504482269287,
0.15598638355731964,
-0.015146125108003616,
0.05027352273464203,
0.45136943459510803,
0.07334752380847931,
-0.22266042232513428,
-0.12542349100112915,
-0.0003817039541900158,
-0.15583470463752747,
0.027469616383314133,
-0.09106166660785675,
-0.05169195681810379,
0.07027027010917664,
-0.07889220118522644,
0.02371297962963581,
0.09433577209711075,
-0.042736250907182693,
-0.09131787717342377,
-0.38596951961517334,
0.1511208713054657,
0.15769928693771362,
-0.23846302926540375,
0.18402089178562164,
-0.02805408649146557,
-0.21688102185726166,
-0.019497232511639595,
0.23997673392295837,
0.008456818759441376,
-0.10936421155929565,
-0.034828346222639084,
0.04175540804862976,
-0.13956928253173828,
-0.04501686990261078,
0.09158596396446228,
0.24780568480491638,
0.6310973167419434,
-0.003961988724768162,
0.46173250675201416,
-0.08375166356563568,
-0.08179864287376404,
-0.44471970200538635,
0.0365290641784668,
-0.18443717062473297,
0.36843186616897583,
0.12581674754619598,
-0.7131571769714355,
-0.033392686396837234,
0.31533029675483704,
0.17132402956485748,
0.3518638610839844,
-0.2561751902103424,
0.09288089722394943,
0.06092995032668114,
0.14939570426940918,
0.048913292586803436,
-0.18384265899658203,
-0.0148722343146801,
0.15426059067249298,
-0.20738014578819275,
0.027051173150539398,
-0.10553658753633499,
-0.37536895275115967,
-0.2184976488351822,
-0.056206852197647095,
0.31482744216918945,
0.19694024324417114,
0.30100759863853455,
0.3379618227481842,
0.11700701713562012,
0.17157021164894104,
-0.0953865721821785,
0.2353028655052185,
0.18741850554943085,
0.08522599935531616,
0.21916013956069946,
-0.05308288335800171,
0.5097373127937317,
-0.16366267204284668,
-0.13277491927146912,
-0.507712185382843,
-0.06292212009429932,
-0.024322569370269775,
-0.11083732545375824,
0.29696589708328247,
0.17315298318862915,
0.12956367433071136,
-0.23282702267169952,
-0.054678890854120255,
-0.13174369931221008,
0.13548269867897034,
-0.1146024689078331,
0.02711673453450203,
-0.19798056781291962,
0.03003961592912674,
0.21398386359214783,
0.14034602046012878,
0.025071073323488235,
0.22181329131126404,
-0.16148433089256287,
0.2567005753517151,
-0.014826752245426178,
-0.46431368589401245,
0.14462926983833313,
-0.09628116339445114,
0.20306804776191711,
-0.3048175573348999,
0.0698813647031784,
0.174724280834198,
-0.059431761503219604,
-0.11744269728660583,
0.12700967490673065,
0.6228168606758118,
0.33179572224617004,
0.22543801367282867,
-0.15236662328243256,
-0.18559885025024414,
0.11939108371734619,
0.088217593729496,
0.1380409300327301,
0.23200111091136932,
0.07387594133615494,
0.1868015080690384,
0.02776257134974003,
-0.05973772332072258,
0.37795528769493103,
0.12570004165172577,
0.10867772996425629,
0.06752951443195343,
0.21369147300720215,
-0.15392233431339264,
-0.1720207780599594,
-0.4478193521499634,
-0.14316484332084656,
-0.2603190839290619,
-0.03903127834200859,
0.4155711233615875,
-0.07769009470939636,
-0.1089189276099205,
-0.11100521683692932,
0.021132320165634155,
-0.23128074407577515,
0.425467312335968,
0.3163934648036957,
0.35856783390045166,
-0.08461280167102814,
-0.1597924530506134,
0.12364919483661652,
-0.033279262483119965,
-0.33230629563331604,
0.3897254765033722,
0.371633917093277,
0.28890907764434814,
-0.27526694536209106,
0.04168177768588066,
0.243531733751297,
0.6358323693275452,
-0.5123921036720276,
-0.011497355997562408,
-0.4014301598072052,
0.04142971336841583,
0.42351430654525757,
0.05217325687408447,
-0.1359286904335022,
-0.17397141456604004,
0.4652431607246399,
-0.17832790315151215,
-0.07558359205722809,
-0.1921008825302124,
0.10290907323360443,
-0.030434411019086838,
0.011667463928461075,
0.0697246789932251,
0.4269149899482727,
0.08409903943538666,
-0.022990014404058456,
-0.2912995219230652,
-0.34647244215011597,
-0.1918725073337555,
0.043244868516922,
0.2732582986354828,
0.24712708592414856,
0.5369348526000977,
-0.144412562251091,
-0.06542755663394928,
-0.2570609748363495,
0.20391462743282318,
-0.03455401957035065,
-0.3771499991416931,
-0.09034346789121628,
0.04677058756351471,
-0.09816306084394455,
0.05405070260167122,
0.27091971039772034,
0.2368745505809784,
-0.0699155330657959,
0.21320676803588867,
-0.00195486843585968,
-0.2278091311454773,
0.09395711123943329,
-0.4700150489807129,
-0.36103731393814087,
-0.04717005416750908,
0.28955990076065063,
0.19705136120319366,
-0.08777464926242828,
-0.1467592716217041,
0.1632651388645172,
0.37989139556884766,
-0.17678648233413696,
-0.38568758964538574,
0.21378660202026367,
-0.1509811282157898,
-0.07103677839040756,
0.20524705946445465,
0.3572632670402527,
0.26546093821525574,
-0.4532509744167328,
0.25724321603775024,
-0.09538397192955017
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | @TevenLeScao we are using `pandas` to serialize the dataset to JSON Lines. So it must be due to pandas. Could you please check the pandas version causing the issue? | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 29 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
@TevenLeScao we are using `pandas` to serialize the dataset to JSON Lines. So it must be due to pandas. Could you please check the pandas version causing the issue? | [
-0.352936714887619,
0.1344452202320099,
-0.013970842584967613,
0.2699114680290222,
0.09136572480201721,
0.08057758957147598,
0.27589884400367737,
0.4209211468696594,
-0.0012250710278749466,
-0.054687485098838806,
0.34397321939468384,
0.016831915825605392,
0.10500948131084442,
0.16637860238552094,
-0.21232737600803375,
-0.21984586119651794,
0.23667281866073608,
0.00086946040391922,
-0.00469970703125,
0.21118400990962982,
-0.29907500743865967,
0.26034101843833923,
-0.17275655269622803,
-0.15274274349212646,
-0.43175870180130005,
-0.329873263835907,
0.09384133666753769,
-0.0441342294216156,
0.005860256962478161,
-0.4725072681903839,
-0.042332932353019714,
-0.2630414664745331,
0.46765607595443726,
0.5261775851249695,
-0.00011956582602579147,
-0.19447638094425201,
0.3220660090446472,
0.013589480891823769,
-0.18676282465457916,
0.05446130037307739,
-0.4758787155151367,
-0.3755784034729004,
0.02641104720532894,
-0.3169344365596771,
0.46774476766586304,
-0.1366843730211258,
-0.31923070549964905,
-0.3943057358264923,
0.6600264310836792,
0.37505024671554565,
0.14587333798408508,
-0.011616747826337814,
0.12283751368522644,
0.002756876405328512,
-0.18551698327064514,
0.14200106263160706,
0.012076107785105705,
0.14037556946277618,
-0.19491979479789734,
0.25602275133132935,
0.24393728375434875,
-0.04059283807873726,
-0.12992805242538452,
-0.2738685607910156,
-0.1651044487953186,
-0.1033712849020958,
0.010668851435184479,
-0.26502010226249695,
0.22221195697784424,
0.3889646828174591,
0.23349320888519287,
-0.17788171768188477,
-0.23011086881160736,
-0.34139081835746765,
0.08765575289726257,
-0.5814911723136902,
0.05224253609776497,
0.49748748540878296,
0.034825630486011505,
0.10731476545333862,
-0.15997330844402313,
-0.09862019121646881,
-0.2680472731590271,
-0.057115405797958374,
-0.01281357929110527,
-0.23517736792564392,
-0.13531608879566193,
0.00228925421833992,
-0.21643780171871185,
-0.16583338379859924,
-0.04938339814543724,
-0.2810889482498169,
-0.48074379563331604,
-0.002158096060156822,
-0.20092196762561798,
0.06759320944547653,
0.12323705852031708,
-0.5326524376869202,
0.0609978586435318,
-0.05705258250236511,
0.3082880973815918,
-0.33180782198905945,
0.184278666973114,
0.04805826395750046,
0.5355820059776306,
0.2027207762002945,
0.2703157365322113,
-0.05362551286816597,
0.2857011556625366,
0.00648482795804739,
0.09284371137619019,
-0.07490218430757523,
-0.00857393816113472,
-0.2188672125339508,
0.08254110813140869,
0.014951580204069614,
0.03338174149394035,
-0.08841006457805634,
-0.045792825520038605,
0.23818325996398926,
-0.3975791037082672,
-0.15027065575122833,
-0.25661545991897583,
-0.1565052568912506,
-0.10368525236845016,
0.3045486807823181,
0.14409539103507996,
0.24826113879680634,
-0.09998036175966263,
0.04324651509523392,
-0.04050658643245697,
-0.09615390002727509,
-0.05104270577430725,
-0.04171556234359741,
-0.05988851934671402,
-0.1935318261384964,
-0.022359129041433334,
0.2295278012752533,
-0.1399095356464386,
-0.2545558512210846,
-0.11934767663478851,
-0.0958462655544281,
-0.13041755557060242,
0.19195209443569183,
0.2618645429611206,
0.14008666574954987,
-0.18783332407474518,
-0.16362406313419342,
-0.011247590184211731,
0.18538957834243774,
-0.419641375541687,
-0.00660131499171257,
-0.4253174960613251,
0.13835251331329346,
-0.10448316484689713,
0.13674768805503845,
-0.4679200351238251,
-0.031233910471200943,
0.10295412689447403,
0.16811637580394745,
0.40238967537879944,
-0.2843468189239502,
0.5852177143096924,
-0.27372506260871887,
-0.013412073254585266,
0.27959537506103516,
-0.7273968458175659,
0.07802917063236237,
0.16635631024837494,
-0.006694115698337555,
0.4735567569732666,
0.4228546917438507,
-0.008796686306595802,
0.3183477818965912,
-0.08388114720582962,
0.24509640038013458,
0.09562766551971436,
0.19646872580051422,
0.07900301367044449,
0.584323525428772,
-0.050126977264881134,
0.005099033936858177,
0.08080441504716873,
-0.3214181661605835,
0.5988559722900391,
0.11403548717498779,
0.4622330367565155,
0.39239323139190674,
0.06146865338087082,
0.21833734214305878,
-0.1816776841878891,
-0.23739831149578094,
0.02646326646208763,
-0.2356799691915512,
-0.2884984612464905,
0.005860254168510437,
0.14680913090705872,
-0.19645678997039795,
0.30138030648231506,
-0.24606114625930786,
0.10709407180547714,
0.42183196544647217,
0.13881990313529968,
0.1713823676109314,
0.040416229516267776,
0.26136744022369385,
-0.3996378481388092,
-0.20260101556777954,
-0.1755862981081009,
-0.17055650055408478,
-0.17461369931697845,
-0.061129678040742874,
0.19949054718017578,
0.2102847695350647,
0.03375047445297241,
0.18469002842903137,
0.043400414288043976,
-0.15289384126663208,
-0.10800667107105255,
0.2392735630273819,
-0.020253747701644897,
0.2720687687397003,
0.12153594195842743,
0.07032120227813721,
-0.28771984577178955,
0.2894153296947479,
0.19511821866035461,
-0.2047722488641739,
0.2890506386756897,
0.10895033180713654,
0.18024703860282898,
-0.3298683166503906,
-0.12435678392648697,
0.25067824125289917,
-0.02377428486943245,
-0.02984003722667694,
-0.11056441813707352,
0.09191972762346268,
0.1511954814195633,
0.18651160597801208,
-0.18519699573516846,
0.2800287902355194,
-0.02116096392273903,
0.07372666150331497,
-0.11322133988142014,
0.5642175078392029,
-0.24571283161640167,
0.28290748596191406,
-0.06255704164505005,
-0.012817353010177612,
0.30056995153427124,
-0.06253119558095932,
-0.08799654990434647,
-0.17144691944122314,
0.26607951521873474,
0.1631944477558136,
-0.11388367414474487,
0.056223101913928986,
-0.44015806913375854,
-0.05164977163076401,
0.5020250678062439,
-0.03905150294303894,
0.12360846996307373,
0.21827000379562378,
0.023058809340000153,
-0.032824352383613586,
0.08202270418405533,
0.09209668636322021,
0.27145668864250183,
0.12381809949874878,
-0.089297816157341,
0.04322142153978348,
0.1545461267232895,
-0.0774388313293457,
0.28068700432777405,
0.17417225241661072,
0.2688160538673401,
0.25406086444854736,
0.15056638419628143,
0.1775210201740265,
-0.1411738246679306,
-0.3314291536808014,
-0.18644928932189941,
0.11156927049160004,
-0.31044939160346985,
0.33212077617645264,
-0.20764021575450897,
-0.09999953210353851,
-0.44916725158691406,
-0.3982084095478058,
-0.23862338066101074,
-0.23002630472183228,
-0.23674671351909637,
-0.11908285319805145,
-0.43339332938194275,
-0.07528698444366455,
-0.14493851363658905,
0.09910231828689575,
0.1697906106710434,
-0.004572812467813492,
0.029529206454753876,
0.006193655077368021,
-0.08695776015520096,
-0.07575201243162155,
0.025316815823316574,
-0.15593138337135315,
0.015302930027246475,
0.11565081030130386,
0.1703978329896927,
-0.06139146536588669,
0.16796573996543884,
0.06882715970277786,
-0.023609068244695663,
-0.1093079149723053,
0.14025148749351501,
0.267113596200943,
-0.055196672677993774,
-0.5096032619476318,
-0.01152659673243761,
0.16024769842624664,
0.02814306877553463,
0.13682401180267334,
-0.10921062529087067,
-0.21881677210330963,
-0.07029574364423752,
-0.03415845334529877,
-0.0018338821828365326,
-0.306993693113327,
0.47992461919784546,
-0.08552609384059906,
0.07245661318302155,
-0.05270470678806305,
0.12632663547992706,
-0.0759284570813179,
0.0402933694422245,
-0.27232879400253296,
0.17494763433933258,
-0.4066641628742218,
0.037872813642024994,
-0.25770989060401917,
-0.27748993039131165,
0.1150120198726654,
0.14480286836624146,
-0.04731209948658943,
-0.06690186262130737,
-0.3617932200431824,
0.5396337509155273,
-0.13072234392166138,
0.3153800368309021,
-0.15099504590034485,
0.14081652462482452,
0.10639089345932007,
-0.05154424533247948,
-0.04819195345044136,
-0.00955190509557724,
0.12017834186553955,
0.18759320676326752,
0.044819049537181854,
0.44332024455070496,
-0.041380830109119415,
0.7773236632347107,
-0.19269801676273346,
-0.2444991022348404,
0.7898449897766113,
0.13163454830646515,
0.2115892767906189,
0.11514502763748169,
0.1390169858932495,
-0.135359525680542,
-0.027930283918976784,
0.04556512087583542,
-0.1468818485736847,
-0.0766196921467781,
0.18344902992248535,
-0.014942007139325142,
-0.11806123703718185,
0.06473443657159805,
-0.04257935285568237,
-0.3984569013118744,
-0.32889074087142944,
0.17668791115283966,
-0.09409154951572418,
0.3057630658149719,
-0.29748183488845825,
-0.02124592661857605,
-0.06645505130290985,
0.08713032305240631,
-0.19681887328624725,
0.00413966178894043,
0.22742104530334473,
0.10770632326602936,
-0.4807264506816864,
-0.4307636022567749,
-0.5369925498962402,
0.2102299928665161,
0.04101891070604324,
0.7110474705696106,
0.13481049239635468,
0.12581241130828857,
-0.04932628571987152,
-0.06794509291648865,
0.7193494439125061,
0.037716083228588104,
-0.25523650646209717,
0.1822212040424347,
0.3052656352519989,
-0.2205708920955658,
-0.07528425753116608,
0.16747216880321503,
0.22765590250492096,
0.7511643767356873,
0.025430839508771896,
-0.2779783606529236,
-0.017720455303788185,
0.2570808529853821,
0.269254207611084,
-0.13743987679481506,
-0.2642759680747986,
-0.17530883848667145,
-0.14556510746479034,
-0.09270241856575012,
-0.20501801371574402,
0.07761071622371674,
0.4493772089481354,
-0.15859970450401306,
-0.14479824900627136,
0.016642702743411064,
-0.41100993752479553,
0.023443490266799927,
0.033266518265008926,
0.22651714086532593,
-0.03399433195590973,
0.12269842624664307,
-0.09172353148460388,
0.31805142760276794,
0.5115274786949158,
0.1914924830198288,
0.036632418632507324,
-0.3783218264579773,
-0.05974821001291275,
-0.33646878600120544,
0.3730202615261078,
-0.09454038739204407,
-0.2697617709636688,
0.08902546018362045,
-0.12257109582424164,
0.3454499840736389,
0.09784655272960663,
-0.3196588456630707,
0.3448731303215027,
0.12714964151382446,
-0.8693085312843323,
0.04032939672470093,
0.34971290826797485,
0.0754920244216919,
0.25599586963653564,
0.16324637830257416,
-0.2913643717765808,
-0.4001287817955017,
0.19540151953697205,
-0.22159016132354736,
0.5349735617637634,
0.400005042552948,
0.12563863396644592,
0.07806049287319183,
-0.43801236152648926,
0.62679523229599,
0.10976013541221619,
0.06205177307128906,
-0.2052256464958191,
0.38216230273246765,
0.086835116147995,
-0.14589324593544006,
0.1996173858642578,
0.010888561606407166,
-0.09757381677627563,
0.06205358728766441,
-0.5207387208938599,
-0.2721303701400757,
-0.21038946509361267,
0.06331976503133774,
0.2039894014596939,
-0.21075470745563507,
-0.5702716708183289,
-0.0021740123629570007,
-0.06078844517469406,
-0.25334593653678894,
-0.0670556128025055,
-0.20457620918750763,
0.05903397873044014,
-0.1251281499862671,
-0.3649448752403259,
0.09070558845996857,
0.13180263340473175,
0.2061842978000641,
0.33682480454444885,
-0.19523251056671143,
0.14475423097610474,
-0.17887082695960999,
0.29558122158050537,
0.10777123272418976,
0.004501694813370705,
-0.06743845343589783,
-0.11309046298265457,
-0.1078406274318695,
0.0571671798825264,
0.03888516128063202,
0.18763966858386993,
-0.015558058395981789,
-0.12592008709907532,
0.19381433725357056,
0.07043712586164474,
-0.193529412150383,
-0.0962933748960495,
0.2029903680086136,
-0.29468876123428345,
-0.32950788736343384,
-0.1623886376619339,
0.03291575610637665,
0.23245489597320557,
-0.13721014559268951,
0.039067354053258896,
0.19242650270462036,
0.028040286153554916,
0.3296639323234558,
-0.3757054805755615,
-0.16141727566719055,
-0.33908942341804504,
0.11047668755054474,
0.02226346917450428,
-0.19467881321907043,
0.2751021385192871,
0.537406325340271,
-0.2416735291481018,
-0.042946066707372665,
0.46251749992370605,
0.32019954919815063,
-0.46037980914115906,
0.5341425538063049,
-0.07708000391721725,
0.24495293200016022,
-0.12033581733703613,
0.4825560450553894,
0.07726418972015381,
0.001296311616897583,
0.1211182028055191,
-0.39841213822364807,
-0.22245784103870392,
0.00357702374458313,
0.1803523749113083,
0.004817686975002289,
0.07670764625072479,
0.5469910502433777,
0.09695026278495789,
-0.22412312030792236,
-0.14053267240524292,
-0.01305324211716652,
-0.2337547242641449,
0.03334571048617363,
-0.09655293822288513,
-0.03221302479505539,
0.03569919988512993,
-0.07310053706169128,
0.03665347397327423,
0.11454258114099503,
0.016436155885457993,
-0.12364901602268219,
-0.3727948069572449,
0.12719322741031647,
0.1557140350341797,
-0.21100133657455444,
0.1434066891670227,
-0.003373580053448677,
-0.25018957257270813,
0.01025047805160284,
0.17929707467556,
0.061912402510643005,
-0.09441922605037689,
-0.045881982892751694,
0.11534631252288818,
-0.16106390953063965,
-0.06818854808807373,
0.10865816473960876,
0.20254555344581604,
0.548891544342041,
0.011907706037163734,
0.40533676743507385,
-0.0716574415564537,
-0.07321427017450333,
-0.4471324384212494,
0.027734246104955673,
-0.20394141972064972,
0.300170361995697,
0.1436186283826828,
-0.7271792888641357,
-0.09986823797225952,
0.36713331937789917,
0.16161608695983887,
0.2915070056915283,
-0.24271181225776672,
0.07722070068120956,
0.046941809356212616,
0.16245561838150024,
-0.015732567757368088,
-0.18023352324962616,
-0.008784815669059753,
0.0827631950378418,
-0.19238555431365967,
0.027068130671977997,
-0.03086046688258648,
-0.41434699296951294,
-0.17525438964366913,
-0.04088958352804184,
0.3402945399284363,
0.1533823162317276,
0.2932587265968323,
0.3838330805301666,
0.18604694306850433,
0.1612788438796997,
-0.08301244676113129,
0.3084385097026825,
0.17190739512443542,
0.04135608673095703,
0.23581266403198242,
-0.15187036991119385,
0.5499087572097778,
-0.07974933087825775,
-0.2109902799129486,
-0.4842013120651245,
-0.10135585069656372,
0.03855586051940918,
-0.21278005838394165,
0.2878963053226471,
0.178676038980484,
0.14122658967971802,
-0.20532108843326569,
-0.05851047486066818,
-0.1316244900226593,
0.14698274433612823,
-0.15497586131095886,
-0.01915888860821724,
-0.21657025814056396,
0.0453941747546196,
0.21189063787460327,
0.09916722774505615,
0.043898388743400574,
0.225600928068161,
-0.2876898944377899,
0.21127809584140778,
-0.021982736885547638,
-0.43771108984947205,
0.11448338627815247,
-0.1112743392586708,
0.21589787304401398,
-0.2742500901222229,
0.042808230966329575,
0.14317412674427032,
-0.06423091888427734,
-0.08319629728794098,
0.15453116595745087,
0.5885650515556335,
0.2697698473930359,
0.2648817300796509,
-0.12079960852861404,
-0.17063544690608978,
0.10733503103256226,
0.1742773801088333,
0.1686098873615265,
0.23148547112941742,
-0.013646122068166733,
0.17520223557949066,
0.03922805190086365,
-0.06720919907093048,
0.38386112451553345,
0.18975839018821716,
0.11000628769397736,
0.002835933119058609,
0.1769019365310669,
-0.19848091900348663,
-0.19822996854782104,
-0.42002272605895996,
-0.1710657775402069,
-0.25587713718414307,
-0.0049819862470030785,
0.33944466710090637,
-0.15377715229988098,
-0.1319400817155838,
-0.09986073523759842,
0.029187079519033432,
-0.27284297347068787,
0.41001096367836,
0.3090415894985199,
0.3422877788543701,
-0.03625447303056717,
-0.1375625729560852,
0.1079028844833374,
-0.11085296422243118,
-0.27091655135154724,
0.38404443860054016,
0.37149807810783386,
0.2755202353000641,
-0.28142672777175903,
-0.05659572035074234,
0.24657073616981506,
0.6157260537147522,
-0.5056504011154175,
0.012002084404230118,
-0.39066827297210693,
0.11916223168373108,
0.3668132424354553,
0.08031561225652695,
-0.16511543095111847,
-0.12296367436647415,
0.49000489711761475,
-0.12068206816911697,
-0.07893429696559906,
-0.11988838016986847,
0.09806318581104279,
-0.1092522144317627,
0.07670794427394867,
0.015267234295606613,
0.40788164734840393,
0.025043822824954987,
-0.02955145202577114,
-0.20831650495529175,
-0.2941690683364868,
-0.19283239543437958,
0.06147843226790428,
0.34285208582878113,
0.2553371489048004,
0.5357613563537598,
-0.1673199087381363,
-0.03850865736603737,
-0.18306376039981842,
0.2234836220741272,
-0.03289055824279785,
-0.38658657670021057,
-0.1538762003183365,
0.06417577713727951,
-0.14416244626045227,
0.012856744229793549,
0.28595811128616333,
0.22450432181358337,
-0.08729512989521027,
0.2617082893848419,
0.052951157093048096,
-0.26854902505874634,
0.06169745326042175,
-0.4994957149028778,
-0.363834410905838,
-0.04777561128139496,
0.23986506462097168,
0.25025516748428345,
-0.048028841614723206,
-0.04698946326971054,
0.16219496726989746,
0.35885459184646606,
-0.1503748893737793,
-0.35271140933036804,
0.18693514168262482,
-0.19289173185825348,
-0.059713661670684814,
0.17860479652881622,
0.2957513928413391,
0.28699877858161926,
-0.4042106568813324,
0.2542155981063843,
-0.12488045543432236
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | @TevenLeScao I have just checked it: this was a bug in `pandas` and it was fixed in version 1.2: https://github.com/pandas-dev/pandas/pull/36898 | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 20 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
@TevenLeScao I have just checked it: this was a bug in `pandas` and it was fixed in version 1.2: https://github.com/pandas-dev/pandas/pull/36898 | [
-0.3412720263004303,
0.12403039634227753,
-0.005501927807927132,
0.2580180764198303,
0.10834015905857086,
0.07570450752973557,
0.3035866320133209,
0.4069502055644989,
0.026413068175315857,
-0.04118363559246063,
0.2745388150215149,
0.006749139167368412,
0.13871566951274872,
0.1741788536310196,
-0.20554934442043304,
-0.24398615956306458,
0.20179039239883423,
-0.02124691754579544,
0.008456781506538391,
0.22758854925632477,
-0.3102153539657593,
0.22211098670959473,
-0.169682115316391,
-0.14789286255836487,
-0.4680122435092926,
-0.3230392634868622,
0.0654655322432518,
-0.041501134634017944,
0.04601522535085678,
-0.42860835790634155,
-0.03551729395985603,
-0.256343811750412,
0.4413878917694092,
0.5364953279495239,
-0.00011903703125426546,
-0.21555939316749573,
0.33192765712738037,
0.018269425258040428,
-0.2052392065525055,
0.06863497197628021,
-0.47203946113586426,
-0.3954092264175415,
0.02196492813527584,
-0.3430728018283844,
0.4541318416595459,
-0.17430725693702698,
-0.33281826972961426,
-0.41770896315574646,
0.647518515586853,
0.3707946836948395,
0.14861120283603668,
-0.03284167870879173,
0.10634946823120117,
-0.03713291138410568,
-0.20363351702690125,
0.08379671722650528,
0.02001163922250271,
0.11599388718605042,
-0.2379017174243927,
0.20983706414699554,
0.23007544875144958,
-0.07169769704341888,
-0.12556663155555725,
-0.23419518768787384,
-0.17675119638442993,
-0.06569577008485794,
-0.022257447242736816,
-0.29927098751068115,
0.19615903496742249,
0.444934219121933,
0.2029716670513153,
-0.18288156390190125,
-0.2681330442428589,
-0.41250669956207275,
0.11130581051111221,
-0.5898333191871643,
0.05293735861778259,
0.47416985034942627,
0.03470980003476143,
0.08704715967178345,
-0.11217745393514633,
-0.08080524206161499,
-0.21300645172595978,
-0.05697472393512726,
-0.050337642431259155,
-0.23723983764648438,
-0.15188103914260864,
-0.018115133047103882,
-0.20366023480892181,
-0.14652103185653687,
0.002788781188428402,
-0.28158295154571533,
-0.4799136817455292,
0.024566592648625374,
-0.19687996804714203,
0.07400818169116974,
0.15187355875968933,
-0.5287774205207825,
0.0522209033370018,
-0.07783597707748413,
0.3272005021572113,
-0.3820245563983917,
0.12911315262317657,
0.07608573138713837,
0.5744821429252625,
0.21209318935871124,
0.1829940229654312,
-0.07161977142095566,
0.3002839982509613,
0.0313616506755352,
0.0964876115322113,
-0.0893939658999443,
0.06885185837745667,
-0.23532451689243317,
0.06840087473392487,
0.00238192081451416,
0.032888490706682205,
-0.052488744258880615,
-0.09419064968824387,
0.2288014441728592,
-0.36047354340553284,
-0.15770989656448364,
-0.2764320969581604,
-0.18580207228660583,
-0.12722234427928925,
0.32874125242233276,
0.1308707445859909,
0.24276505410671234,
-0.08450713008642197,
0.04720137268304825,
-0.06987619400024414,
-0.03750362619757652,
-0.005530092865228653,
-0.0535055473446846,
-0.05424923449754715,
-0.17534132301807404,
0.010775817558169365,
0.24157048761844635,
-0.08612824976444244,
-0.28998100757598877,
-0.15351243317127228,
-0.11275476217269897,
-0.15665030479431152,
0.24031977355480194,
0.32144805788993835,
0.14449836313724518,
-0.147299125790596,
-0.1794860064983368,
-0.015587843954563141,
0.14833667874336243,
-0.4130094051361084,
-0.01501285657286644,
-0.3744754493236542,
0.13524746894836426,
-0.14235520362854004,
0.1480707973241806,
-0.5019361972808838,
-0.03146977350115776,
0.07775364071130753,
0.19644305109977722,
0.4208010733127594,
-0.25308382511138916,
0.6042638421058655,
-0.28486356139183044,
0.014876710250973701,
0.2816122770309448,
-0.7312344312667847,
0.10305869579315186,
0.14703088998794556,
0.036165133118629456,
0.48975643515586853,
0.4170348644256592,
-0.02458113059401512,
0.3368769884109497,
-0.11289945989847183,
0.26215362548828125,
0.07115860283374786,
0.20940282940864563,
0.09824714064598083,
0.5672953724861145,
-0.07086364924907684,
0.01828254945576191,
0.02979853004217148,
-0.3001287281513214,
0.5715798139572144,
0.11376263946294785,
0.4756498634815216,
0.4330531358718872,
0.038426000624895096,
0.22938525676727295,
-0.16469435393810272,
-0.19791163504123688,
0.03481505438685417,
-0.2483367770910263,
-0.25467684864997864,
0.0026691854000091553,
0.15434640645980835,
-0.19281694293022156,
0.264437198638916,
-0.241007000207901,
0.12512119114398956,
0.42681199312210083,
0.13288570940494537,
0.1417975127696991,
0.02186739072203636,
0.24896731972694397,
-0.3805505633354187,
-0.19011643528938293,
-0.1566677838563919,
-0.1665302962064743,
-0.16085277497768402,
-0.07391433417797089,
0.17346462607383728,
0.18610437214374542,
0.038809310644865036,
0.15548662841320038,
0.05027013272047043,
-0.15815283358097076,
-0.1364501565694809,
0.27177566289901733,
-0.053061343729496,
0.3020302951335907,
0.13651348650455475,
0.057023581117391586,
-0.26733100414276123,
0.26723989844322205,
0.23919425904750824,
-0.17067067325115204,
0.3222694993019104,
0.11060310900211334,
0.18305951356887817,
-0.29606667160987854,
-0.15149524807929993,
0.2638215124607086,
-0.037714626640081406,
0.021618738770484924,
-0.11758067458868027,
0.06696493923664093,
0.1620999574661255,
0.19486984610557556,
-0.22730299830436707,
0.25844836235046387,
-0.012184945866465569,
0.06135963648557663,
-0.14027667045593262,
0.6026519536972046,
-0.2641139030456543,
0.2733403742313385,
-0.03685038536787033,
0.02741284854710102,
0.33734241127967834,
-0.10238143801689148,
-0.10841988027095795,
-0.1580343246459961,
0.23595133423805237,
0.1434631645679474,
-0.12257111072540283,
0.05400577932596207,
-0.4003922939300537,
-0.030365921556949615,
0.5197229385375977,
0.0007628053426742554,
0.11705689132213593,
0.18443015217781067,
0.033920809626579285,
-0.015438316389918327,
0.07595161348581314,
0.12546487152576447,
0.2930738925933838,
0.12649784982204437,
-0.039447057992219925,
0.052566446363925934,
0.11511725932359695,
-0.08624225109815598,
0.28487250208854675,
0.1711801439523697,
0.2693840563297272,
0.24856936931610107,
0.14662332832813263,
0.19778232276439667,
-0.1394345760345459,
-0.3373420536518097,
-0.1755516678094864,
0.1275867372751236,
-0.303041011095047,
0.3055093586444855,
-0.1936163455247879,
-0.10430479794740677,
-0.3914407193660736,
-0.4014569818973541,
-0.20602408051490784,
-0.2955176830291748,
-0.2415340691804886,
-0.09551171958446503,
-0.46586698293685913,
-0.08531232178211212,
-0.1617807298898697,
0.09635751694440842,
0.15710169076919556,
-0.0004355981945991516,
0.019278161227703094,
0.0009034147951751947,
-0.04310246556997299,
-0.054947011172771454,
-0.004951298702508211,
-0.12387242913246155,
0.027097556740045547,
0.1601213961839676,
0.14568720757961273,
-0.0970122218132019,
0.18153098225593567,
0.04111155867576599,
-0.01881975680589676,
-0.08321325480937958,
0.14754432439804077,
0.263080894947052,
-0.07275090366601944,
-0.548150360584259,
-0.018291790038347244,
0.16640420258045197,
0.038401417434215546,
0.14124971628189087,
-0.12064701318740845,
-0.1862713247537613,
-0.09327520430088043,
-0.06034911423921585,
0.019440172240138054,
-0.33499011397361755,
0.48103922605514526,
-0.10552836954593658,
0.026902254670858383,
-0.08642197400331497,
0.14760996401309967,
-0.064203180372715,
0.07812384516000748,
-0.26733168959617615,
0.15394562482833862,
-0.4169493615627289,
0.03054484911262989,
-0.2566615641117096,
-0.27216780185699463,
0.12775494158267975,
0.09632077813148499,
0.009677283465862274,
-0.0782594159245491,
-0.3716356158256531,
0.5211656093597412,
-0.1465875804424286,
0.31202468276023865,
-0.1196971982717514,
0.19106124341487885,
0.07264268398284912,
-0.07631640881299973,
-0.07024133205413818,
0.026829607784748077,
0.1516527533531189,
0.15008434653282166,
0.06341828405857086,
0.42528215050697327,
-0.06817839294672012,
0.7963743805885315,
-0.20709221065044403,
-0.24280135333538055,
0.785178542137146,
0.17984367907047272,
0.21473704278469086,
0.11149771511554718,
0.1771978735923767,
-0.13248863816261292,
-0.05162998288869858,
0.05629883334040642,
-0.15351194143295288,
-0.08478164672851562,
0.13839052617549896,
-0.03342143073678017,
-0.09914837777614594,
0.034630186855793,
-0.038312189280986786,
-0.39570531249046326,
-0.3372080624103546,
0.16532167792320251,
-0.12995797395706177,
0.27858489751815796,
-0.2796359360218048,
-0.05692445859313011,
-0.054633017629384995,
0.11190272867679596,
-0.22682499885559082,
-0.025355391204357147,
0.2500799894332886,
0.09088705480098724,
-0.4192577600479126,
-0.44160157442092896,
-0.5331687927246094,
0.16814398765563965,
0.02670661173760891,
0.6945685744285583,
0.15230236947536469,
0.1240500882267952,
-0.06367458403110504,
-0.05542733147740364,
0.6983474493026733,
0.026432203128933907,
-0.2924916744232178,
0.169961079955101,
0.275851845741272,
-0.2267138510942459,
-0.06627970933914185,
0.16232067346572876,
0.18739435076713562,
0.7814661264419556,
-0.004074864089488983,
-0.2857838273048401,
-0.020449601113796234,
0.2629450261592865,
0.2712850570678711,
-0.1538698375225067,
-0.25293365120887756,
-0.16030341386795044,
-0.1997380554676056,
-0.08141469210386276,
-0.17845851182937622,
0.1562788039445877,
0.45317989587783813,
-0.20902465283870697,
-0.1592240184545517,
-0.007167983800172806,
-0.4004323482513428,
0.03992374241352081,
0.03999261185526848,
0.19509148597717285,
-0.010805354453623295,
0.15040865540504456,
-0.12283448874950409,
0.26946234703063965,
0.47117605805397034,
0.2290252298116684,
0.009293165057897568,
-0.36694225668907166,
-0.07097785174846649,
-0.31965962052345276,
0.38022369146347046,
-0.09306737780570984,
-0.28097814321517944,
0.08545049279928207,
-0.15418778359889984,
0.36330920457839966,
0.12155989557504654,
-0.28747618198394775,
0.3155449330806732,
0.15527474880218506,
-0.8324906229972839,
0.026684531942009926,
0.3657894432544708,
0.11177808046340942,
0.2571146488189697,
0.19805465638637543,
-0.268913209438324,
-0.37629926204681396,
0.17021052539348602,
-0.24468529224395752,
0.47957295179367065,
0.38245540857315063,
0.15801902115345,
0.11303425580263138,
-0.40802574157714844,
0.6761997938156128,
0.0891280323266983,
0.045614443719387054,
-0.18873800337314606,
0.3455248475074768,
0.09429334104061127,
-0.1524704098701477,
0.1718711256980896,
0.0052323117852211,
-0.08847685158252716,
0.07359827309846878,
-0.5113880634307861,
-0.24493706226348877,
-0.1931401640176773,
0.0475892499089241,
0.20214532315731049,
-0.2321404069662094,
-0.6011213064193726,
-0.00031004101037979126,
-0.03181061893701553,
-0.26168006658554077,
-0.04518863186240196,
-0.18009157478809357,
0.053606417030096054,
-0.09577340632677078,
-0.3610684275627136,
0.08353423327207565,
0.14783413708209991,
0.186136856675148,
0.3207153081893921,
-0.1669662594795227,
0.1520550698041916,
-0.1513986587524414,
0.33277660608291626,
0.11784319579601288,
0.007848430424928665,
-0.0754910260438919,
-0.09935007244348526,
-0.08848178386688232,
0.05147252231836319,
0.050672274082899094,
0.21071819961071014,
0.006188608705997467,
-0.09544820338487625,
0.2538418769836426,
0.0702209398150444,
-0.18007108569145203,
-0.07872629165649414,
0.2651982605457306,
-0.34441810846328735,
-0.341068834066391,
-0.1577458679676056,
0.023549702018499374,
0.23344972729682922,
-0.16997602581977844,
0.051647089421749115,
0.2095886915922165,
0.014995558187365532,
0.34835368394851685,
-0.37768951058387756,
-0.17215150594711304,
-0.3480568826198578,
0.10025054961442947,
0.045505937188863754,
-0.1881156861782074,
0.24463103711605072,
0.4835466146469116,
-0.24977968633174896,
-0.027428273111581802,
0.42381736636161804,
0.34465059638023376,
-0.4265531301498413,
0.598486065864563,
-0.1005202978849411,
0.22189556062221527,
-0.1415470987558365,
0.4189101457595825,
0.06582613289356232,
0.026471249759197235,
0.11265198886394501,
-0.3906415104866028,
-0.24384385347366333,
-0.011029824614524841,
0.19854404032230377,
0.0316888689994812,
0.08003934472799301,
0.5649991631507874,
0.08254294842481613,
-0.19616378843784332,
-0.14319664239883423,
-0.004007754381746054,
-0.26326602697372437,
0.020001228898763657,
-0.09764941781759262,
0.005412749946117401,
0.030438318848609924,
-0.05904578045010567,
0.046773865818977356,
0.1368303894996643,
0.030649272724986076,
-0.1308162808418274,
-0.4030764698982239,
0.11219636350870132,
0.18126147985458374,
-0.21314974129199982,
0.15760931372642517,
-0.025361953303217888,
-0.262444406747818,
-0.012082792818546295,
0.1790468394756317,
0.09029298275709152,
-0.10168972611427307,
-0.04644601419568062,
0.15315625071525574,
-0.1598239541053772,
-0.05627483129501343,
0.11641175299882889,
0.21096409857273102,
0.5365217924118042,
0.030634041875600815,
0.39132797718048096,
-0.08806506544351578,
-0.055530041456222534,
-0.40430647134780884,
-0.017955124378204346,
-0.234364852309227,
0.2840466797351837,
0.1519262194633484,
-0.6966726183891296,
-0.10602851212024689,
0.35113489627838135,
0.17171959578990936,
0.2847225069999695,
-0.25997820496559143,
0.11797456443309784,
0.06566131860017776,
0.15840980410575867,
-0.05722569674253464,
-0.1518694907426834,
-0.0016455985605716705,
0.11289477348327637,
-0.13792410492897034,
0.04017484933137894,
-0.005804240703582764,
-0.43508148193359375,
-0.15296196937561035,
-0.05427522584795952,
0.33135202527046204,
0.13988517224788666,
0.27545103430747986,
0.3992129862308502,
0.17215828597545624,
0.1769740730524063,
-0.05640265345573425,
0.2889541685581207,
0.1773955076932907,
0.06841477751731873,
0.2014058232307434,
-0.16212710738182068,
0.4717506468296051,
-0.09537498652935028,
-0.20968225598335266,
-0.4819863736629486,
-0.07465888559818268,
0.007945403456687927,
-0.26847603917121887,
0.2657918334007263,
0.1635706126689911,
0.11677679419517517,
-0.22710207104682922,
-0.010114079341292381,
-0.07705723494291306,
0.17644402384757996,
-0.17316383123397827,
0.003912817686796188,
-0.15827247500419617,
0.018120862543582916,
0.2310762107372284,
0.1033623218536377,
0.09146050363779068,
0.1970943659543991,
-0.25585123896598816,
0.19263586401939392,
-0.015991009771823883,
-0.39487916231155396,
0.13563407957553864,
-0.11074552685022354,
0.22688758373260498,
-0.2725757360458374,
-0.00007581152021884918,
0.16755178570747375,
-0.09849503636360168,
-0.12516966462135315,
0.16203464567661285,
0.5886420607566833,
0.25816744565963745,
0.2816852033138275,
-0.1151432916522026,
-0.1393066942691803,
0.09206387400627136,
0.14478306472301483,
0.15262223780155182,
0.23008915781974792,
-0.012620534747838974,
0.1981305330991745,
0.057374998927116394,
-0.08566756546497345,
0.3561892509460449,
0.1813802570104599,
0.12666495144367218,
-0.030474336817860603,
0.210536926984787,
-0.17604167759418488,
-0.19700098037719727,
-0.43459364771842957,
-0.15644749999046326,
-0.209841787815094,
-0.039111245423555374,
0.3237747848033905,
-0.18789227306842804,
-0.11117838323116302,
-0.10994008928537369,
0.036206554621458054,
-0.27355751395225525,
0.3935529589653015,
0.3105422854423523,
0.3471531271934509,
-0.05775631219148636,
-0.1337612420320511,
0.05047397315502167,
-0.09896823018789291,
-0.3138720393180847,
0.3750600516796112,
0.3629864752292633,
0.27409568428993225,
-0.3101065456867218,
-0.06367161870002747,
0.24083249270915985,
0.6288325786590576,
-0.47640228271484375,
-0.01522810012102127,
-0.39451518654823303,
0.01709645800292492,
0.2993394136428833,
0.07333074510097504,
-0.1631338894367218,
-0.11501889675855637,
0.47841429710388184,
-0.09131740778684616,
-0.06442141532897949,
-0.10116109251976013,
0.12137813866138458,
-0.0869336724281311,
0.11778094619512558,
-0.023704566061496735,
0.42740026116371155,
0.004521109163761139,
-0.04165114089846611,
-0.19965682923793793,
-0.3047748804092407,
-0.16739806532859802,
0.04482436925172806,
0.29766038060188293,
0.26405805349349976,
0.5109527111053467,
-0.1467372328042984,
-0.11968064308166504,
-0.20361000299453735,
0.23331625759601593,
0.0009658373892307281,
-0.39932605624198914,
-0.15931382775306702,
0.06733767688274384,
-0.12506037950515747,
0.05300213024020195,
0.2979462742805481,
0.2603335678577423,
-0.10928806662559509,
0.2785037159919739,
0.08147096633911133,
-0.2846658229827881,
0.09906460344791412,
-0.47344422340393066,
-0.36315926909446716,
-0.070015549659729,
0.230745330452919,
0.24492767453193665,
-0.03573334217071533,
-0.0005883350968360901,
0.15984904766082764,
0.33970528841018677,
-0.1527704894542694,
-0.3735359311103821,
0.16939449310302734,
-0.20994515717029572,
-0.037030383944511414,
0.18277773261070251,
0.24769802391529083,
0.3111516833305359,
-0.3687024414539337,
0.25976482033729553,
-0.11535027623176575
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | Sorry, I was also talking to teven offline so I already had the PR ready before noticing x) | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 18 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
Sorry, I was also talking to teven offline so I already had the PR ready before noticing x) | [
-0.37644121050834656,
0.06210219860076904,
-0.024925589561462402,
0.28617584705352783,
0.04461913928389549,
0.08094977587461472,
0.15584607422351837,
0.39717432856559753,
0.051058609038591385,
-0.04763726890087128,
0.3336985409259796,
0.004116030875593424,
0.08341796696186066,
0.1582752764225006,
-0.1321926712989807,
-0.1995786726474762,
0.1929604709148407,
-0.07226350903511047,
0.08719725161790848,
0.2302478402853012,
-0.23156504333019257,
0.26635199785232544,
-0.1839069128036499,
-0.20316274464130402,
-0.40153712034225464,
-0.27350637316703796,
0.15770192444324493,
-0.005098611116409302,
0.04369308799505234,
-0.46156272292137146,
-0.09915027767419815,
-0.2882118821144104,
0.49962547421455383,
0.4922950267791748,
-0.0001196299126604572,
-0.1714506298303604,
0.2876415252685547,
-0.0389571413397789,
-0.2002025842666626,
0.08754280209541321,
-0.43542370200157166,
-0.39700621366500854,
-0.046841949224472046,
-0.3596856892108917,
0.38232943415641785,
-0.10171502083539963,
-0.34819495677948,
-0.4584693908691406,
0.65581876039505,
0.402802973985672,
0.14249001443386078,
0.016279850155115128,
0.1383097618818283,
0.017079411074519157,
-0.07578914612531662,
0.06951165944337845,
-0.0042962320148944855,
0.10235825181007385,
-0.1442514806985855,
0.32739531993865967,
0.247768372297287,
-0.06330836564302444,
-0.164243683218956,
-0.27507561445236206,
-0.12257576733827591,
-0.08651885390281677,
-0.09251490980386734,
-0.25166821479797363,
0.19806578755378723,
0.36374422907829285,
0.1841878890991211,
-0.2028268277645111,
-0.14577530324459076,
-0.32028964161872864,
0.07138492912054062,
-0.6242570281028748,
0.050285886973142624,
0.5177462697029114,
-0.0037655290216207504,
0.11183986067771912,
-0.2235129028558731,
-0.09080798178911209,
-0.23120424151420593,
-0.0297224223613739,
0.002363845705986023,
-0.22776326537132263,
-0.11781860888004303,
0.004029061645269394,
-0.1674535870552063,
-0.09842488169670105,
-0.11116651445627213,
-0.22272354364395142,
-0.5720725655555725,
-0.014035961590707302,
-0.17840972542762756,
0.04437306523323059,
0.13686503469944,
-0.4408855140209198,
0.10792168229818344,
-0.0460408478975296,
0.33374258875846863,
-0.3853136897087097,
0.20835955440998077,
0.05007544159889221,
0.5481048226356506,
0.19067038595676422,
0.28014621138572693,
-0.11003661155700684,
0.2598358690738678,
-0.021328194066882133,
0.0885004997253418,
-0.07924236357212067,
0.04713874310255051,
-0.20015059411525726,
0.09543336927890778,
0.038546621799468994,
-0.02713957242667675,
-0.0987015962600708,
-0.059927236288785934,
0.20172685384750366,
-0.4078761339187622,
-0.15180793404579163,
-0.28079184889793396,
-0.1851523518562317,
-0.09836804121732712,
0.22934845089912415,
0.16236914694309235,
0.2720746099948883,
-0.1685686707496643,
-0.10858561098575592,
-0.04240044206380844,
-0.0828750878572464,
-0.07478809356689453,
-0.04330449551343918,
-0.03373153507709503,
-0.15753011405467987,
-0.020363684743642807,
0.22455836832523346,
-0.0742417573928833,
-0.28053659200668335,
-0.10958699136972427,
-0.035690583288669586,
-0.1673450469970703,
0.17966820299625397,
0.2852642238140106,
0.12752528488636017,
-0.16396182775497437,
-0.21393974125385284,
-0.015400990843772888,
0.19687223434448242,
-0.4836392402648926,
-0.07495450228452682,
-0.36041751503944397,
0.14187517762184143,
-0.17853087186813354,
0.11251498758792877,
-0.4827485978603363,
-0.0880972295999527,
0.10055359452962875,
0.17400383949279785,
0.3533976972103119,
-0.27883124351501465,
0.630363404750824,
-0.2761411666870117,
0.02790367789566517,
0.23053470253944397,
-0.7488178610801697,
0.09581376612186432,
0.18259890377521515,
0.015944980084896088,
0.4496085047721863,
0.39536187052726746,
-0.023734597489237785,
0.3770446479320526,
-0.08816539496183395,
0.2835768461227417,
0.10067100822925568,
0.19749757647514343,
0.11717776209115982,
0.4938793182373047,
-0.07221733778715134,
-0.006322512403130531,
0.018416628241539,
-0.29926103353500366,
0.6212935447692871,
0.10847518593072891,
0.5063617825508118,
0.40432649850845337,
0.037752844393253326,
0.23536264896392822,
-0.21436768770217896,
-0.16883936524391174,
-0.05590301752090454,
-0.18442925810813904,
-0.385259211063385,
-0.055643580853939056,
0.1588100790977478,
-0.17462565004825592,
0.29622650146484375,
-0.24518737196922302,
0.11858221888542175,
0.46603113412857056,
0.08287627249956131,
0.14888012409210205,
0.007621741387993097,
0.30066943168640137,
-0.4398679733276367,
-0.19850760698318481,
-0.08823724091053009,
-0.16344259679317474,
-0.1268041729927063,
-0.03372243419289589,
0.19733282923698425,
0.21878889203071594,
-0.03818920627236366,
0.13924583792686462,
0.05120176076889038,
-0.12722225487232208,
-0.14366713166236877,
0.17980484664440155,
-0.006183873862028122,
0.23887179791927338,
0.18224945664405823,
0.02512545883655548,
-0.31409698724746704,
0.2853181064128876,
0.23682565987110138,
-0.20688706636428833,
0.18413878977298737,
0.12206331640481949,
0.16750776767730713,
-0.3401520848274231,
-0.15554407238960266,
0.2237616777420044,
0.02579321153461933,
-0.08694453537464142,
-0.1305895447731018,
0.12461449205875397,
0.12810857594013214,
0.0885491669178009,
-0.12777499854564667,
0.29191526770591736,
-0.061554841697216034,
0.057341717183589935,
-0.13191071152687073,
0.5513089895248413,
-0.2694433629512787,
0.320151150226593,
-0.06762854754924774,
-0.0254184752702713,
0.22795245051383972,
-0.11077781021595001,
-0.044240158051252365,
-0.1289411336183548,
0.2877560257911682,
0.15129593014717102,
-0.1880396604537964,
-0.028312021866440773,
-0.356978178024292,
0.003124155104160309,
0.5259003639221191,
0.022396840155124664,
0.030083023011684418,
0.18466907739639282,
-0.021222375333309174,
0.009898833930492401,
0.07386928796768188,
0.06190789118409157,
0.2687597870826721,
0.13875514268875122,
-0.06137988343834877,
0.07108517736196518,
0.22848235070705414,
-0.06771331280469894,
0.2718980610370636,
0.12099222093820572,
0.22851596772670746,
0.3146279454231262,
0.19395214319229126,
0.1624784916639328,
-0.1181250661611557,
-0.4355783462524414,
-0.23856399953365326,
0.11199043691158295,
-0.31849387288093567,
0.29018211364746094,
-0.142760768532753,
-0.048205889761447906,
-0.4705466330051422,
-0.36782190203666687,
-0.25753483176231384,
-0.3024013042449951,
-0.16738592088222504,
-0.0986446887254715,
-0.47471368312835693,
-0.14060209691524506,
-0.11370456218719482,
0.08236058056354523,
0.09370393306016922,
-0.11059107631444931,
0.03883647173643112,
-0.0006970050744712353,
-0.1376160979270935,
-0.08971825242042542,
0.01832326501607895,
-0.1932252198457718,
0.10842259973287582,
0.09787670522928238,
0.10402294993400574,
-0.11546000093221664,
0.12399467080831528,
0.12517237663269043,
-0.015024881809949875,
-0.04349950700998306,
0.12024549394845963,
0.28388094902038574,
-0.0367327444255352,
-0.5128861665725708,
0.03372132033109665,
0.19289152324199677,
0.03331542760133743,
0.18269070982933044,
-0.09856671094894409,
-0.17415039241313934,
-0.09308041632175446,
-0.11911460012197495,
-0.03447423130273819,
-0.3550938069820404,
0.4420230984687805,
-0.07105335593223572,
0.030207708477973938,
-0.03390906751155853,
0.12593014538288116,
-0.11035417765378952,
0.06718815863132477,
-0.28472182154655457,
0.23164641857147217,
-0.404739111661911,
-0.010936465114355087,
-0.2776227593421936,
-0.22218526899814606,
0.13450738787651062,
0.17797847092151642,
-0.005669306963682175,
0.013606410473585129,
-0.39462989568710327,
0.6360438466072083,
-0.09919590502977371,
0.442253977060318,
-0.19708657264709473,
0.15475694835186005,
0.10136343538761139,
-0.05050401762127876,
-0.025711718946695328,
-0.023835530504584312,
0.15369276702404022,
0.15302477777004242,
0.026020895689725876,
0.4894847869873047,
-0.07192826271057129,
0.6651268601417542,
-0.21649006009101868,
-0.19084341824054718,
0.7653549909591675,
0.1234651505947113,
0.21719110012054443,
0.10957568138837814,
0.08394231647253036,
-0.15813571214675903,
0.015622654929757118,
0.0867915078997612,
-0.12681365013122559,
-0.16432052850723267,
0.14840760827064514,
0.040094442665576935,
-0.1123046949505806,
0.012047801166772842,
0.015458248555660248,
-0.40645691752433777,
-0.351084440946579,
0.2497023046016693,
-0.010953377932310104,
0.29385125637054443,
-0.3571613132953644,
-0.06922183185815811,
-0.05841485410928726,
0.010948892682790756,
-0.23227956891059875,
-0.01728764921426773,
0.2271156907081604,
0.1395568549633026,
-0.5072891116142273,
-0.4268558621406555,
-0.4834097623825073,
0.23163801431655884,
0.010129899717867374,
0.5988476872444153,
0.13513055443763733,
0.07534190267324448,
-0.08297036588191986,
-0.0961533933877945,
0.6169039011001587,
-0.02791821025311947,
-0.18883879482746124,
0.25809672474861145,
0.3820476233959198,
-0.1696614772081375,
-0.110373854637146,
0.10426296293735504,
0.16997383534908295,
0.8767223954200745,
0.039348650723695755,
-0.305812805891037,
-0.03144746273756027,
0.2559387981891632,
0.3879101872444153,
-0.12919026613235474,
-0.24966168403625488,
-0.13385909795761108,
-0.18624520301818848,
-0.08754274994134903,
-0.26139891147613525,
0.12687638401985168,
0.44499263167381287,
-0.16074097156524658,
-0.15259875357151031,
0.07047595828771591,
-0.3098802864551544,
-0.01015239953994751,
0.003996254876255989,
0.25584208965301514,
-0.10632914304733276,
0.16595613956451416,
-0.1203421801328659,
0.3574886620044708,
0.4377617835998535,
0.1959049105644226,
0.06533555686473846,
-0.33153456449508667,
-0.0828126072883606,
-0.270319402217865,
0.4001964330673218,
-0.143629252910614,
-0.21399301290512085,
0.06373757123947144,
-0.19266605377197266,
0.42278212308883667,
0.1368257999420166,
-0.27315887808799744,
0.2954879701137543,
0.08491804450750351,
-0.8648973703384399,
0.09164363890886307,
0.32879990339279175,
0.07985670864582062,
0.2831910252571106,
0.17337343096733093,
-0.36568546295166016,
-0.370063841342926,
0.2008543759584427,
-0.1924821436405182,
0.5724707245826721,
0.4445643424987793,
0.14518697559833527,
0.0728924572467804,
-0.39680373668670654,
0.6061351895332336,
-0.13807865977287292,
0.04998974874615669,
-0.19445912539958954,
0.40449345111846924,
0.14807718992233276,
-0.13637790083885193,
0.10135604441165924,
0.08131983876228333,
-0.11469797790050507,
0.03746407851576805,
-0.5104408860206604,
-0.23553228378295898,
-0.26618513464927673,
0.006801925599575043,
0.25483354926109314,
-0.2045743763446808,
-0.49931472539901733,
0.00025744736194610596,
-0.09606665372848511,
-0.23614022135734558,
-0.07675112038850784,
-0.21219389140605927,
0.09233221411705017,
-0.12663325667381287,
-0.34473174810409546,
0.12222044914960861,
0.0673820748925209,
0.13416698575019836,
0.3516375422477722,
-0.16145873069763184,
0.14188483357429504,
-0.17869211733341217,
0.26160192489624023,
0.1652999371290207,
0.03019890934228897,
-0.049489427357912064,
-0.04384124279022217,
-0.09116463363170624,
0.10173819214105606,
0.030471183359622955,
0.09667515754699707,
-0.06684917956590652,
-0.1283196657896042,
0.17463015019893646,
0.04051549732685089,
-0.21313166618347168,
-0.1321573555469513,
0.2128765732049942,
-0.2299482375383377,
-0.3254309296607971,
-0.08128994703292847,
0.155105859041214,
0.22935456037521362,
-0.12099796533584595,
0.043292731046676636,
0.1576843559741974,
0.0012232328299432993,
0.3172686696052551,
-0.3695150315761566,
-0.18020722270011902,
-0.3000700771808624,
0.082847461104393,
0.060517728328704834,
-0.31042543053627014,
0.22041438519954681,
0.5383707880973816,
-0.18880437314510345,
-0.07554341852664948,
0.467637300491333,
0.28994420170783997,
-0.529538094997406,
0.5389200448989868,
-0.06842699646949768,
0.2785641551017761,
-0.1015070378780365,
0.5041586756706238,
0.05234558880329132,
0.0035981982946395874,
0.19552774727344513,
-0.38536110520362854,
-0.19702599942684174,
0.01929258555173874,
0.21551114320755005,
0.033506207168102264,
0.040332868695259094,
0.5567024350166321,
0.04001595824956894,
-0.19977794587612152,
-0.1487131416797638,
-0.035841070115566254,
-0.15304255485534668,
0.04411359131336212,
-0.06791996210813522,
0.005858052521944046,
0.044663429260253906,
-0.03260105103254318,
0.0643293634057045,
0.11546418070793152,
-0.02020975574851036,
-0.12171619385480881,
-0.3338366448879242,
0.13598895072937012,
0.13836747407913208,
-0.21226869523525238,
0.15691763162612915,
-0.02654292993247509,
-0.21732847392559052,
-0.010731495916843414,
0.2423771619796753,
0.004665885120630264,
-0.08582000434398651,
-0.07955393940210342,
0.11577218770980835,
-0.09992917627096176,
-0.08266105502843857,
0.1023370698094368,
0.3121541738510132,
0.6382731795310974,
-0.022369185462594032,
0.42319631576538086,
-0.08757174760103226,
-0.12362605333328247,
-0.48613467812538147,
0.03502931818366051,
-0.16866789758205414,
0.396234929561615,
0.08721692115068436,
-0.7172757387161255,
-0.0945853739976883,
0.28832346200942993,
0.1118500828742981,
0.30698373913764954,
-0.24428777396678925,
0.07100354880094528,
0.05542483180761337,
0.1902158558368683,
0.03191050514578819,
-0.1302335262298584,
0.03345131874084473,
0.10647638887166977,
-0.200151264667511,
0.030840523540973663,
-0.07134833931922913,
-0.38219910860061646,
-0.146462082862854,
-0.10122080892324448,
0.3103373944759369,
0.15546859800815582,
0.26499655842781067,
0.34873515367507935,
0.12825796008110046,
0.1409231275320053,
-0.1922418624162674,
0.19463489949703217,
0.19321149587631226,
0.045002445578575134,
0.18775132298469543,
-0.10481129586696625,
0.6095268726348877,
-0.15014030039310455,
-0.1892772912979126,
-0.5214866995811462,
-0.11232344806194305,
0.04340646415948868,
-0.10853907465934753,
0.29482436180114746,
0.15338465571403503,
0.1485014408826828,
-0.1096445769071579,
-0.10477868467569351,
-0.1312394142150879,
0.17129991948604584,
-0.13234645128250122,
0.07832604646682739,
-0.23754772543907166,
-0.031153611838817596,
0.15101690590381622,
0.12559400498867035,
0.047065816819667816,
0.2665867209434509,
-0.22357991337776184,
0.26425614953041077,
-0.01981620490550995,
-0.4577934145927429,
0.14665356278419495,
-0.12411829084157944,
0.1841651201248169,
-0.27219539880752563,
0.11806601285934448,
0.21605300903320312,
-0.06732723116874695,
-0.1253824681043625,
0.0946725532412529,
0.5830351114273071,
0.2718700170516968,
0.2764331102371216,
-0.11516598612070084,
-0.200484037399292,
0.11040864884853363,
0.092461958527565,
0.13983532786369324,
0.21135394275188446,
-0.05347747728228569,
0.2168440818786621,
0.0385824590921402,
-0.06237996369600296,
0.36921846866607666,
0.1508297324180603,
0.04765944182872772,
0.06920401751995087,
0.12510806322097778,
-0.09312036633491516,
-0.22094491124153137,
-0.44002410769462585,
-0.21727249026298523,
-0.23730427026748657,
-0.02073156088590622,
0.37013566493988037,
-0.08246858417987823,
-0.10080372542142868,
-0.07182980328798294,
0.03176959976553917,
-0.27501314878463745,
0.40353459119796753,
0.23317912220954895,
0.3617778420448303,
-0.12018435448408127,
-0.19719786942005157,
0.14962725341320038,
-0.04852425307035446,
-0.30615735054016113,
0.37824416160583496,
0.3052501678466797,
0.25458553433418274,
-0.26591235399246216,
0.02813691273331642,
0.24523037672042847,
0.6335805654525757,
-0.44912439584732056,
0.08297241479158401,
-0.41122308373451233,
0.05561473220586777,
0.4788248538970947,
0.08781256526708603,
-0.13905870914459229,
-0.15925148129463196,
0.4242456257343292,
-0.0451962985098362,
-0.06596788763999939,
-0.16331784427165985,
0.11275868117809296,
-0.013856502249836922,
0.07298871874809265,
0.050052233040332794,
0.3976196050643921,
0.09548424929380417,
-0.04865153878927231,
-0.26079902052879333,
-0.29279258847236633,
-0.21465946733951569,
0.05671451613306999,
0.2732057571411133,
0.31866779923439026,
0.5101505517959595,
-0.10516151785850525,
0.007079385221004486,
-0.2610445022583008,
0.17906200885772705,
-0.004899371415376663,
-0.3528937101364136,
-0.1002604141831398,
-0.009924902580678463,
-0.10005869716405869,
0.058464813977479935,
0.2610982656478882,
0.24038776755332947,
-0.0881788432598114,
0.2841227650642395,
-0.001655973494052887,
-0.24503974616527557,
0.10228615254163742,
-0.40795767307281494,
-0.32936063408851624,
-0.02425369620323181,
0.3105502724647522,
0.19074279069900513,
-0.03876739740371704,
-0.04044834151864052,
0.17132973670959473,
0.3940410912036896,
-0.1353382170200348,
-0.3708803653717041,
0.29068753123283386,
-0.1157102882862091,
-0.12219272553920746,
0.23614591360092163,
0.358216255903244,
0.30314549803733826,
-0.43360328674316406,
0.25449731945991516,
-0.08951587975025177
] |
https://github.com/huggingface/datasets/issues/2615 | Jsonlines export error | I was also already working in my PR... Nevermind. Next time we should pay attention if there is somebody (self-)assigned to an issue and if he/she is still working on it before overtaking it... 😄 | ## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1 | 35 | Jsonlines export error
## Describe the bug
When exporting large datasets in jsonlines (c4 in my case) the created file has an error every 9999 lines: the 9999th and 10000th are concatenated, thus breaking the jsonlines format. This sounds like it is related to batching, which is by 10000 by default
## Steps to reproduce the bug
This what I'm running:
in python:
```
from datasets import load_dataset
ptb = load_dataset("ptb_text_only")
ptb["train"].to_json("ptb.jsonl")
```
then out of python:
```
head -10000 ptb.jsonl
```
## Expected results
Properly separated lines
## Actual results
The last line is a concatenation of two lines
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.9.1.dev0
- Platform: Linux-5.4.0-1046-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyArrow version: 4.0.1
I was also already working in my PR... Nevermind. Next time we should pay attention if there is somebody (self-)assigned to an issue and if he/she is still working on it before overtaking it... 😄 | [
-0.3961874842643738,
0.14125025272369385,
-0.04477698355913162,
0.26520559191703796,
0.05528939515352249,
0.06807660311460495,
0.1558922529220581,
0.3812044560909271,
-0.011089343577623367,
-0.035005584359169006,
0.3722899258136749,
0.01186427567154169,
0.08164003491401672,
0.17778854072093964,
-0.1461666077375412,
-0.17324982583522797,
0.1780272126197815,
-0.04271617531776428,
0.034485749900341034,
0.24138028919696808,
-0.23631736636161804,
0.2680271863937378,
-0.18620070815086365,
-0.1968686729669571,
-0.404449462890625,
-0.27882975339889526,
0.14521975815296173,
-0.021789580583572388,
-0.025608142837882042,
-0.48308396339416504,
-0.0936044305562973,
-0.23293516039848328,
0.4571807086467743,
0.4846557676792145,
-0.00011653531691990793,
-0.17358514666557312,
0.3210092782974243,
0.002408228814601898,
-0.2353120744228363,
0.05304522067308426,
-0.4531079828739166,
-0.3837757706642151,
-0.038564182817935944,
-0.36365675926208496,
0.4063381254673004,
-0.12237062305212021,
-0.34130892157554626,
-0.417258620262146,
0.6630908846855164,
0.41125723719596863,
0.1693601906299591,
-0.033770602196455,
0.15367034077644348,
-0.01725202240049839,
-0.06961395591497421,
0.10264280438423157,
0.00659090094268322,
0.09388424456119537,
-0.17908474802970886,
0.28807345032691956,
0.2553640604019165,
-0.05842534825205803,
-0.14248467981815338,
-0.309188574552536,
-0.1423952877521515,
-0.11779846996068954,
-0.060458578169345856,
-0.25529944896698,
0.19986259937286377,
0.3594556450843811,
0.1978222131729126,
-0.22590962052345276,
-0.14749057590961456,
-0.31169840693473816,
0.11333853751420975,
-0.6214420199394226,
0.04877844452857971,
0.5457034111022949,
-0.01932816207408905,
0.13053004443645477,
-0.22660109400749207,
-0.10340473055839539,
-0.23982153832912445,
-0.05593365430831909,
0.032496728003025055,
-0.21104168891906738,
-0.12725670635700226,
-0.0004988834261894226,
-0.15281344950199127,
-0.11805456876754761,
-0.05797543004155159,
-0.2560563087463379,
-0.5472081899642944,
-0.011619930155575275,
-0.17634104192256927,
0.06494906544685364,
0.15674668550491333,
-0.42492586374282837,
0.1423414647579193,
-0.038958653807640076,
0.3401719927787781,
-0.3556581437587738,
0.26039332151412964,
0.05851873382925987,
0.5224486589431763,
0.16737893223762512,
0.28015023469924927,
-0.06273501366376877,
0.2633463442325592,
0.0293103139847517,
0.07203727960586548,
-0.07997745275497437,
0.012157296761870384,
-0.20610211789608002,
0.06487253308296204,
0.08414486050605774,
-0.021978937089443207,
-0.07445510476827621,
-0.03361004218459129,
0.2073495090007782,
-0.34386879205703735,
-0.1791137009859085,
-0.25021252036094666,
-0.16040512919425964,
-0.08438863605260849,
0.2370714247226715,
0.18380513787269592,
0.22996576130390167,
-0.1399751752614975,
-0.056174106895923615,
-0.05275769531726837,
-0.07646933197975159,
-0.09755970537662506,
-0.02744271047413349,
-0.043410226702690125,
-0.15162460505962372,
-0.02210397645831108,
0.24528269469738007,
-0.09676307439804077,
-0.2866637110710144,
-0.11443455517292023,
-0.0557890422642231,
-0.15059161186218262,
0.1774311661720276,
0.27376171946525574,
0.0941285789012909,
-0.18243619799613953,
-0.17922529578208923,
-0.029098868370056152,
0.16853560507297516,
-0.47691237926483154,
-0.04237040877342224,
-0.3549838066101074,
0.18472301959991455,
-0.15051685273647308,
0.15186449885368347,
-0.49854978919029236,
-0.04304094240069389,
0.08197394758462906,
0.1303449124097824,
0.36108192801475525,
-0.27511364221572876,
0.6181908845901489,
-0.2749444544315338,
0.05406201630830765,
0.23970076441764832,
-0.7175127267837524,
0.08108414709568024,
0.13168738782405853,
-0.04455774649977684,
0.4499325454235077,
0.35948285460472107,
-0.04706043750047684,
0.38199567794799805,
-0.12507371604442596,
0.2862238883972168,
0.10258787870407104,
0.21366721391677856,
0.0858989879488945,
0.4878997802734375,
-0.09101507067680359,
-0.023389972746372223,
0.04455512389540672,
-0.3476254642009735,
0.6521722078323364,
0.11511583626270294,
0.5111974477767944,
0.3936982750892639,
0.04307030886411667,
0.23321577906608582,
-0.20628222823143005,
-0.19885899126529694,
-0.03997238725423813,
-0.19819770753383636,
-0.3763441741466522,
-0.06517762690782547,
0.13632513582706451,
-0.20178836584091187,
0.3150220811367035,
-0.26564326882362366,
0.11128930747509003,
0.46081411838531494,
0.14559592306613922,
0.12427199631929398,
0.016856376081705093,
0.2683565020561218,
-0.433143675327301,
-0.1937398612499237,
-0.14755329489707947,
-0.15639394521713257,
-0.13996006548404694,
-0.06078726798295975,
0.1878935694694519,
0.2176554799079895,
-0.030970703810453415,
0.162468820810318,
0.09083140641450882,
-0.14384505152702332,
-0.11942091584205627,
0.22005610167980194,
-0.030386565253138542,
0.23140226304531097,
0.14009742438793182,
0.02960493415594101,
-0.27822935581207275,
0.2797183096408844,
0.19401231408119202,
-0.20661865174770355,
0.22570836544036865,
0.11975110322237015,
0.16107557713985443,
-0.3396230638027191,
-0.14500901103019714,
0.20799875259399414,
-0.022490449249744415,
-0.04336094856262207,
-0.13138189911842346,
0.11531396210193634,
0.13006040453910828,
0.07430529594421387,
-0.18313287198543549,
0.26599249243736267,
-0.04127011448144913,
0.0790858194231987,
-0.13025248050689697,
0.5811465382575989,
-0.22382186353206635,
0.31291669607162476,
-0.03374399617314339,
-0.035951945930719376,
0.2417219877243042,
-0.1326749622821808,
-0.052395403385162354,
-0.1432102918624878,
0.2920067310333252,
0.15066877007484436,
-0.10959577560424805,
-0.0038501452654600143,
-0.29977405071258545,
0.013056889176368713,
0.5700368881225586,
-0.0009291823953390121,
0.054382383823394775,
0.20030856132507324,
-0.010424338281154633,
-0.012890439480543137,
0.04819644242525101,
0.0733967274427414,
0.2701426148414612,
0.14349187910556793,
-0.06108848378062248,
0.08177067339420319,
0.23918643593788147,
-0.07930336147546768,
0.2866184413433075,
0.10854863375425339,
0.2617504298686981,
0.30455005168914795,
0.18696025013923645,
0.1485619693994522,
-0.14278893172740936,
-0.39718908071517944,
-0.19291140139102936,
0.09804102778434753,
-0.29900845885276794,
0.28128528594970703,
-0.17970088124275208,
-0.03177223354578018,
-0.46068432927131653,
-0.34267154335975647,
-0.24311304092407227,
-0.26586440205574036,
-0.16170963644981384,
-0.1251092404127121,
-0.4919673502445221,
-0.11036842316389084,
-0.12330922484397888,
0.11657173931598663,
0.0984005331993103,
-0.06516986340284348,
0.048017315566539764,
-0.025851894170045853,
-0.07901714742183685,
-0.06261253356933594,
0.048323214054107666,
-0.1822832226753235,
0.08695346862077713,
0.11184293776750565,
0.11575627326965332,
-0.11185701936483383,
0.12596750259399414,
0.12819339334964752,
0.013544522225856781,
-0.07983846962451935,
0.116839699447155,
0.267139196395874,
0.00461786612868309,
-0.5441421866416931,
0.009305275976657867,
0.1585279107093811,
-0.000654168426990509,
0.1666567623615265,
-0.10949153453111649,
-0.19390572607517242,
-0.10407222807407379,
-0.11589560657739639,
-0.049713850021362305,
-0.3589126765727997,
0.42976659536361694,
-0.11073997616767883,
0.06243975833058357,
-0.056682683527469635,
0.14181958138942719,
-0.08346588164567947,
0.026438873261213303,
-0.2701597809791565,
0.20860980451107025,
-0.3947085440158844,
-0.038347866386175156,
-0.2872617244720459,
-0.2344917207956314,
0.11537016928195953,
0.1351056694984436,
-0.041231829673051834,
-0.014871375635266304,
-0.39450788497924805,
0.5985481142997742,
-0.09118033945560455,
0.40726327896118164,
-0.154326930642128,
0.1598566174507141,
0.10821305215358734,
-0.06093880906701088,
-0.06058824807405472,
-0.017103031277656555,
0.12432537972927094,
0.1429901421070099,
0.04056329280138016,
0.4537535607814789,
-0.07690979540348053,
0.6510974764823914,
-0.21718384325504303,
-0.19337685406208038,
0.7931041121482849,
0.1460738331079483,
0.20749330520629883,
0.10003944486379623,
0.08902496099472046,
-0.12757247686386108,
-0.01491992175579071,
0.12592612206935883,
-0.11181020736694336,
-0.16639907658100128,
0.17380252480506897,
0.014976180158555508,
-0.1547597348690033,
0.032363809645175934,
-0.018932238221168518,
-0.4336755573749542,
-0.3735411465167999,
0.24959810078144073,
0.017279963940382004,
0.3149964213371277,
-0.3155670464038849,
-0.08373747020959854,
-0.04976852983236313,
0.08106943219900131,
-0.20026102662086487,
-0.03123113512992859,
0.20590674877166748,
0.1080913096666336,
-0.5688772797584534,
-0.4343661367893219,
-0.4829704761505127,
0.20019498467445374,
0.0003754589706659317,
0.5802277326583862,
0.12531577050685883,
0.10263829678297043,
-0.08849035203456879,
-0.1208556666970253,
0.6239221096038818,
0.017961885780096054,
-0.20773328840732574,
0.23253953456878662,
0.3804989159107208,
-0.11947623640298843,
-0.11368580162525177,
0.1311788409948349,
0.20407570898532867,
0.8154346346855164,
0.014414690434932709,
-0.33628958463668823,
-0.03151962533593178,
0.2510596513748169,
0.3690200746059418,
-0.1367790251970291,
-0.24732176959514618,
-0.12215928733348846,
-0.2105514407157898,
-0.10639974474906921,
-0.2394157350063324,
0.10652539879083633,
0.45788803696632385,
-0.1845739781856537,
-0.15015916526317596,
0.0830240398645401,
-0.309368371963501,
-0.023828864097595215,
-0.0061983633786439896,
0.2689371407032013,
-0.10252979397773743,
0.13195466995239258,
-0.10675090551376343,
0.3046078085899353,
0.4929370582103729,
0.25554585456848145,
0.059175893664360046,
-0.3818761706352234,
-0.06486040353775024,
-0.2778077721595764,
0.39060071110725403,
-0.08639171719551086,
-0.23039065301418304,
0.08983863145112991,
-0.11477570235729218,
0.4310978651046753,
0.10552478581666946,
-0.3060206472873688,
0.28390905261039734,
0.09387882798910141,
-0.868029773235321,
0.0672667995095253,
0.3517999053001404,
0.08513754606246948,
0.2663381099700928,
0.14252370595932007,
-0.299360990524292,
-0.3890746235847473,
0.22682684659957886,
-0.22128498554229736,
0.5617581009864807,
0.4622306823730469,
0.13098211586475372,
0.05016929656267166,
-0.38236451148986816,
0.6059628129005432,
-0.07513702660799026,
0.049606066197156906,
-0.19818618893623352,
0.41801053285598755,
0.15991093218326569,
-0.1468542516231537,
0.13306452333927155,
0.05717397481203079,
-0.12497982382774353,
0.04600732773542404,
-0.5140425562858582,
-0.26885131001472473,
-0.2236865758895874,
0.04585724323987961,
0.22918511927127838,
-0.19563212990760803,
-0.4780570864677429,
0.027446702122688293,
-0.07784894108772278,
-0.25079578161239624,
-0.07657953351736069,
-0.22125202417373657,
0.08225233852863312,
-0.13663390278816223,
-0.3644060492515564,
0.13540557026863098,
0.013326868414878845,
0.14755378663539886,
0.3296106159687042,
-0.17591843008995056,
0.16549062728881836,
-0.21675992012023926,
0.2632959485054016,
0.17569929361343384,
0.04035935923457146,
-0.03551517054438591,
-0.04984830319881439,
-0.09105511009693146,
0.051833249628543854,
0.018013156950473785,
0.13972465693950653,
-0.07206268608570099,
-0.14763182401657104,
0.16769453883171082,
0.05310644209384918,
-0.18707525730133057,
-0.09450089931488037,
0.21206724643707275,
-0.22726650536060333,
-0.312339723110199,
-0.13695292174816132,
0.13842500746250153,
0.23499998450279236,
-0.1234997808933258,
0.0652361586689949,
0.15457147359848022,
-0.034568991512060165,
0.3239796757698059,
-0.3269083797931671,
-0.17504116892814636,
-0.3134276568889618,
0.06735292822122574,
0.019751453772187233,
-0.28363922238349915,
0.23683851957321167,
0.5338138937950134,
-0.18514399230480194,
-0.09182269871234894,
0.45403361320495605,
0.318233460187912,
-0.5063894391059875,
0.5193535089492798,
-0.03970539942383766,
0.2553133964538574,
-0.09215626120567322,
0.4893001616001129,
0.05319530516862869,
0.01107550784945488,
0.16090145707130432,
-0.3807056248188019,
-0.1938469558954239,
0.016890011727809906,
0.18402600288391113,
-0.01620643213391304,
0.06619691103696823,
0.5399196743965149,
0.04049728065729141,
-0.19532033801078796,
-0.18746797740459442,
-0.009231270290911198,
-0.19971737265586853,
0.03257635980844498,
-0.09072959423065186,
-0.05426527559757233,
0.020311424508690834,
-0.0453835166990757,
0.08947718888521194,
0.12455128133296967,
-0.04446941614151001,
-0.1580924689769745,
-0.34930872917175293,
0.11712221801280975,
0.12625724077224731,
-0.2073090523481369,
0.14146769046783447,
-0.029193472117185593,
-0.21039408445358276,
0.0005525886081159115,
0.21248257160186768,
-0.011709444224834442,
-0.07638323307037354,
-0.07668241858482361,
0.08843931555747986,
-0.1290408968925476,
-0.0834910050034523,
0.12048479169607162,
0.282374769449234,
0.6134359240531921,
-0.017117224633693695,
0.4254065155982971,
-0.11095262318849564,
-0.09252139925956726,
-0.45309099555015564,
0.027766093611717224,
-0.16838054358959198,
0.3954140543937683,
0.1107921153306961,
-0.7080250978469849,
-0.06729231029748917,
0.3276759684085846,
0.13211028277873993,
0.2972358465194702,
-0.2673638164997101,
0.10470764338970184,
0.0698431059718132,
0.21390601992607117,
0.008948240429162979,
-0.1369241178035736,
0.05161038041114807,
0.08065123111009598,
-0.1645413190126419,
0.00978057086467743,
-0.031682319939136505,
-0.3678213357925415,
-0.16884781420230865,
-0.07475193589925766,
0.3498598337173462,
0.18097209930419922,
0.27245351672172546,
0.2772696614265442,
0.15944597125053406,
0.13484831154346466,
-0.16235700249671936,
0.2629072070121765,
0.201291024684906,
0.03307241201400757,
0.16319246590137482,
-0.1277635097503662,
0.5978219509124756,
-0.12198051810264587,
-0.16437500715255737,
-0.5197513103485107,
-0.060705650597810745,
0.05477766692638397,
-0.13637788593769073,
0.2861790955066681,
0.13115514814853668,
0.14128264784812927,
-0.1452389657497406,
-0.08225689828395844,
-0.11501552164554596,
0.15404841303825378,
-0.11617182940244675,
0.06583020091056824,
-0.24059325456619263,
-0.011379145085811615,
0.15866535902023315,
0.10759596526622772,
0.056421924382448196,
0.23676589131355286,
-0.2280271351337433,
0.2521010935306549,
-0.029671765863895416,
-0.44366636872291565,
0.1266709566116333,
-0.0706358253955841,
0.20835378766059875,
-0.28052759170532227,
0.1073610931634903,
0.20405849814414978,
-0.059235647320747375,
-0.13311994075775146,
0.15193985402584076,
0.6114043593406677,
0.2904873788356781,
0.24302448332309723,
-0.1104620099067688,
-0.1894603669643402,
0.10828840732574463,
0.08538659662008286,
0.12491071224212646,
0.24422426521778107,
-0.025654252618551254,
0.1872604489326477,
0.07729051262140274,
-0.09636616706848145,
0.3418990671634674,
0.17633092403411865,
0.03982497751712799,
0.06062572821974754,
0.09779702126979828,
-0.13572439551353455,
-0.19358289241790771,
-0.46401339769363403,
-0.19273462891578674,
-0.25392961502075195,
-0.02770831063389778,
0.4014788866043091,
-0.11803457140922546,
-0.09881111979484558,
-0.0877252146601677,
0.05420416593551636,
-0.2858717441558838,
0.400265634059906,
0.25228413939476013,
0.3638438880443573,
-0.106338270008564,
-0.19443196058273315,
0.13509385287761688,
-0.06894484907388687,
-0.3103601634502411,
0.37894055247306824,
0.3164226710796356,
0.29057663679122925,
-0.2551524341106415,
0.008613385260105133,
0.22561989724636078,
0.5962046980857849,
-0.45040470361709595,
0.04813165217638016,
-0.4447443187236786,
0.11197228729724884,
0.43549585342407227,
0.09938294440507889,
-0.12633764743804932,
-0.15381041169166565,
0.45351114869117737,
-0.09020153433084488,
-0.04746852070093155,
-0.15131938457489014,
0.14033307135105133,
-0.0010726284235715866,
0.03111541084945202,
0.052958808839321136,
0.39204156398773193,
0.09075374156236649,
-0.0732085108757019,
-0.25000572204589844,
-0.28596431016921997,
-0.20422206819057465,
0.04797781631350517,
0.2739371955394745,
0.3353996276855469,
0.5070767402648926,
-0.11643174290657043,
-0.04981844499707222,
-0.2381436973810196,
0.1675790548324585,
-0.008768454194068909,
-0.3936249613761902,
-0.1375321000814438,
0.016430769115686417,
-0.08683441579341888,
0.05253537371754646,
0.23167067766189575,
0.23373812437057495,
-0.08835390210151672,
0.24967046082019806,
0.02073955535888672,
-0.2763341963291168,
0.10884132236242294,
-0.39654314517974854,
-0.3167787492275238,
-0.016159940510988235,
0.31356990337371826,
0.20531287789344788,
-0.036102548241615295,
-0.045027099549770355,
0.18038758635520935,
0.3660033941268921,
-0.1656162440776825,
-0.3628188967704773,
0.2734829783439636,
-0.1614822894334793,
-0.08955134451389313,
0.228884756565094,
0.32580408453941345,
0.28992801904678345,
-0.4333473742008209,
0.22828888893127441,
-0.08570745587348938
] |
https://github.com/huggingface/datasets/issues/2607 | Streaming local gzip compressed JSON line files is not working | Hi @thomwolf, thanks for reporting.
It seems this might be due to the fact that the JSON Dataset builder uses `pyarrow.json` (`paj.read_json`) to read the data without using the Python standard `open(file,...` (which is the one patched with `xopen` to work in streaming mode).
This has to be fixed. | ## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0 | 49 | Streaming local gzip compressed JSON line files is not working
## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0
Hi @thomwolf, thanks for reporting.
It seems this might be due to the fact that the JSON Dataset builder uses `pyarrow.json` (`paj.read_json`) to read the data without using the Python standard `open(file,...` (which is the one patched with `xopen` to work in streaming mode).
This has to be fixed. | [
-0.19924913346767426,
-0.1339779496192932,
-0.009144341573119164,
0.23913531005382538,
0.07776336371898651,
0.016880445182323456,
0.3976747691631317,
0.5178912281990051,
0.19702084362506866,
0.0789990946650505,
0.10300023853778839,
0.33068305253982544,
-0.08836634457111359,
0.020874669775366783,
0.22888627648353577,
-0.18093405663967133,
-0.04366134852170944,
0.35606133937835693,
-0.025167889893054962,
0.0015848688781261444,
-0.13056659698486328,
0.2937992215156555,
-0.14045916497707367,
-0.018516555428504944,
-0.018798721954226494,
-0.03955550491809845,
-0.04715031385421753,
0.1500941812992096,
-0.09395948797464371,
-0.3326387405395508,
0.06277024000883102,
-0.16841410100460052,
0.18802247941493988,
0.44545480608940125,
-0.00011453594197519124,
0.2886410355567932,
0.2961103320121765,
-0.16291412711143494,
-0.38860633969306946,
-0.47124797105789185,
-0.2299010455608368,
-0.14929865300655365,
-0.13077174127101898,
-0.2858470678329468,
-0.13781914114952087,
-0.34743544459342957,
-0.03375731408596039,
-0.5071985721588135,
0.5416867136955261,
0.2922607958316803,
0.15566378831863403,
0.04196535423398018,
-0.06177150830626488,
0.09057888388633728,
0.03901635482907295,
0.15732330083847046,
-0.08860787004232407,
0.3150975704193115,
0.03278735280036926,
0.11496931314468384,
0.055284999310970306,
0.42864614725112915,
-0.22549577057361603,
-0.17477695643901825,
0.14736899733543396,
-0.0008152835071086884,
-0.0843823030591011,
-0.12578703463077545,
-0.16831547021865845,
0.08573459088802338,
0.18454521894454956,
-0.4122556149959564,
-0.4398341178894043,
-0.3761066496372223,
0.0466744601726532,
-0.44880327582359314,
0.21185395121574402,
0.40928658843040466,
-0.25030767917633057,
0.19696958363056183,
-0.10066523402929306,
-0.13053134083747864,
-0.3545626401901245,
0.0854525938630104,
0.36184993386268616,
0.34808340668678284,
-0.09467792510986328,
0.009128980338573456,
-0.09198705852031708,
0.11937961727380753,
-0.08398396521806717,
-0.3859614431858063,
-0.18570706248283386,
0.22775614261627197,
-0.24214117228984833,
-0.13492333889007568,
0.1443624645471573,
-0.6062148809432983,
0.15115061402320862,
0.10122884064912796,
0.46157681941986084,
-0.12574487924575806,
0.35880759358406067,
0.05460844188928604,
0.2728675603866577,
0.18704858422279358,
0.1769658923149109,
0.26384222507476807,
0.056659016758203506,
0.38988056778907776,
-0.08656706660985947,
-0.19807329773902893,
-0.23633761703968048,
-0.039404433220624924,
-0.09152821451425552,
0.13681045174598694,
0.48332661390304565,
-0.15766538679599762,
-0.08909309655427933,
0.0819111317396164,
-0.5941799879074097,
-0.13270039856433868,
0.15767164528369904,
0.09860995411872864,
0.0661015436053276,
0.22017395496368408,
0.026484854519367218,
0.16108398139476776,
-0.0021049864590168,
-0.0618940144777298,
-0.09079568833112717,
0.023572538048028946,
0.07405923306941986,
0.1347987949848175,
0.2518966794013977,
-0.5213877558708191,
0.2793646454811096,
0.008754835464060307,
-0.04603008180856705,
-0.15623460710048676,
0.005846243351697922,
-0.12555718421936035,
0.15045166015625,
0.14683885872364044,
-0.025929458439350128,
0.019363360479474068,
0.20588478446006775,
-0.11022668331861496,
-0.17381948232650757,
0.11835359036922455,
-0.27519622445106506,
-0.26721397042274475,
0.03723509609699249,
0.20101678371429443,
0.03815913572907448,
0.009389335289597511,
-0.008149422705173492,
0.0059310272336006165,
0.05569879338145256,
-0.3565126955509186,
0.023636184632778168,
-0.009464647620916367,
-0.05580206587910652,
-0.0841297134757042,
0.2759929597377777,
0.4360958933830261,
-0.3608710467815399,
-0.10359220206737518,
0.07156623154878616,
0.21758437156677246,
0.7216561436653137,
0.3425387442111969,
-0.23797141015529633,
0.12730826437473297,
-0.36812013387680054,
0.36190545558929443,
0.6931352019309998,
0.016038335859775543,
-0.3624655306339264,
0.852236270904541,
-0.108634352684021,
0.3817501962184906,
0.48008492588996887,
-0.2044287770986557,
0.19414830207824707,
-0.010518110357224941,
0.33520692586898804,
0.28128719329833984,
-0.044572435319423676,
0.03852761536836624,
-0.46427056193351746,
0.1312146931886673,
0.041949521750211716,
0.03780551627278328,
-0.2513180673122406,
0.2954411208629608,
-0.04339214414358139,
0.015033130533993244,
0.35209015011787415,
-0.18005652725696564,
0.10818429291248322,
0.29045605659484863,
0.2378067821264267,
0.019946180284023285,
0.20217405259609222,
0.009263712912797928,
-0.21780288219451904,
0.032493025064468384,
-0.33661139011383057,
-0.26293662190437317,
-0.2826172709465027,
-0.06241067498922348,
-0.1401136815547943,
0.14870043098926544,
-0.18434883654117584,
-0.3533778488636017,
0.1464821845293045,
0.4111505150794983,
0.380899041891098,
0.02243763953447342,
-0.4623299539089203,
0.300654798746109,
-0.2987259328365326,
-0.10485620051622391,
-0.2611705958843231,
0.4293639063835144,
0.07213469594717026,
-0.2631468176841736,
0.17588387429714203,
-0.05898887664079666,
0.17178946733474731,
-0.2416352480649948,
-0.2221173346042633,
0.24508240818977356,
-0.12085473537445068,
0.17090663313865662,
0.11697430163621902,
-0.22262577712535858,
0.2957747280597687,
-0.006211631000041962,
-0.07205746322870255,
0.34458673000335693,
0.21932761371135712,
0.20412081480026245,
-0.22399073839187622,
0.4739874005317688,
-0.03056645765900612,
0.3029976189136505,
0.020911678671836853,
-0.20583629608154297,
0.19243426620960236,
-0.008431758731603622,
-0.3421518802642822,
0.06537017226219177,
0.33458417654037476,
-0.12588869035243988,
0.09460471570491791,
-0.06129611283540726,
-0.37913402915000916,
-0.06355752795934677,
0.5271081328392029,
-0.08305846154689789,
-0.16150137782096863,
0.19268783926963806,
-0.18031254410743713,
-0.055544573813676834,
0.2965637147426605,
-0.00671657919883728,
0.33357688784599304,
0.15754491090774536,
0.10460278391838074,
0.01661362126469612,
-0.11111696064472198,
-0.25655391812324524,
0.20916080474853516,
-0.09003441035747528,
0.11462675780057907,
0.5449172258377075,
0.03563675656914711,
0.04491705447435379,
-0.3995398283004761,
-0.2428152859210968,
-0.12888257205486298,
0.14558027684688568,
-0.09908787906169891,
0.3841347098350525,
-0.3911353051662445,
-0.3713180124759674,
-0.1201702356338501,
-0.11286944895982742,
-0.06306320428848267,
-0.08577275276184082,
-0.026965584605932236,
0.2985593378543854,
-0.20046056807041168,
0.23292391002178192,
0.0005530808120965958,
0.03940087556838989,
0.25194913148880005,
-0.4227369427680969,
-0.4818934500217438,
-0.16303886473178864,
-0.19115698337554932,
-0.010403230786323547,
0.2656029164791107,
-0.2878887355327606,
0.30171722173690796,
-0.04590483382344246,
-0.3699759244918823,
-0.2708004415035248,
0.11940648406744003,
0.14356118440628052,
0.0721823051571846,
-0.022700974717736244,
-0.09127949178218842,
0.22808393836021423,
-0.07968787848949432,
-0.3324354588985443,
0.28701022267341614,
-0.2174527943134308,
-0.14865605533123016,
0.19485224783420563,
-0.031185459345579147,
-0.0018445150926709175,
-0.23529799282550812,
-0.26552173495292664,
-0.1472453474998474,
-0.4852219521999359,
0.289681613445282,
-0.040369387716054916,
0.3086790442466736,
0.24291092157363892,
0.1440979391336441,
0.17795976996421814,
0.15565794706344604,
-0.05469176173210144,
-0.1509629637002945,
-0.6362743973731995,
0.3917452096939087,
-0.11013627052307129,
-0.23037861287593842,
-0.029500897973775864,
-0.15559729933738708,
-0.05509701743721962,
0.3612903952598572,
-0.4562183618545532,
0.2379126101732254,
0.07027335464954376,
0.08341825008392334,
-0.09506794810295105,
-0.1340567022562027,
0.19144567847251892,
-0.10754582285881042,
-0.060360439121723175,
-0.2590092420578003,
0.07594428956508636,
-0.012234970927238464,
0.25273072719573975,
0.1833099126815796,
0.40134382247924805,
0.7469968795776367,
-0.03916153684258461,
0.2865431308746338,
0.35339248180389404,
0.14586889743804932,
0.5503771305084229,
-0.13009318709373474,
0.16025011241436005,
-0.2425835132598877,
-0.2188410609960556,
0.059646349400281906,
0.10508374124765396,
-0.3196406364440918,
0.027433566749095917,
0.0012179287150502205,
-0.34065836668014526,
-0.32408449053764343,
0.12440317869186401,
-0.3062017858028412,
-0.18829496204853058,
0.20148375630378723,
-0.09639263153076172,
0.1964128017425537,
-0.03942333906888962,
-0.02964046597480774,
-0.0032322434708476067,
0.11535072326660156,
-0.04832805320620537,
0.26540952920913696,
0.4285118579864502,
0.12893380224704742,
-0.05432466045022011,
-0.18306809663772583,
-0.34849312901496887,
0.07876445353031158,
0.2743043005466461,
0.6020612120628357,
-0.16699925065040588,
-0.1687544584274292,
0.07984810322523117,
-0.1684127002954483,
0.46363067626953125,
-0.12587988376617432,
-0.03415410965681076,
0.34727731347084045,
-0.12427917122840881,
-0.026653451845049858,
-0.11905510723590851,
-0.043170180171728134,
0.35300952196121216,
0.19594988226890564,
0.6723822951316833,
-0.17720749974250793,
-0.2202005237340927,
0.11325743794441223,
0.02156556397676468,
0.09070289134979248,
-0.15626809000968933,
-0.29280784726142883,
-0.13581255078315735,
-0.2019336223602295,
-0.06550390273332596,
-0.0717766135931015,
0.24107946455478668,
0.019955942407250404,
-0.13128213584423065,
0.05360097438097,
-0.07305420935153961,
-0.11266767978668213,
0.007804127410054207,
0.29403916001319885,
-0.03253127261996269,
0.15934227406978607,
0.05702204257249832,
0.5039330720901489,
0.2327844649553299,
0.5136663317680359,
0.5314755439758301,
-0.414777934551239,
0.13258449733257294,
0.07024488598108292,
0.13299402594566345,
0.1649875044822693,
-0.13509312272071838,
-0.1513882279396057,
0.1381034255027771,
0.2574629783630371,
-0.035580966621637344,
-0.08321420103311539,
0.23381994664669037,
-0.15558256208896637,
-0.3567379415035248,
-0.4606517553329468,
0.24326208233833313,
-0.039203330874443054,
0.19205348193645477,
0.7787442207336426,
-0.6046565175056458,
-0.1680707484483719,
0.1287052184343338,
-0.32743915915489197,
0.6506008505821228,
0.30569252371788025,
-0.012611914426088333,
0.4230310916900635,
-0.1530071496963501,
0.42910832166671753,
-0.4506235718727112,
0.3880232572555542,
-0.1075456291437149,
-0.1895090490579605,
0.013624737039208412,
-0.15217828750610352,
0.3272458016872406,
0.17365053296089172,
-0.33012494444847107,
0.15608155727386475,
0.09498704969882965,
-0.026112359017133713,
0.05640243738889694,
0.08446617424488068,
-0.34109097719192505,
-0.14785538613796234,
-0.6056388020515442,
0.08227258920669556,
-0.16434235870838165,
0.3591594994068146,
0.11986435204744339,
-0.38716012239456177,
0.010003659874200821,
-0.21891891956329346,
-0.1640433520078659,
0.4873071610927582,
-0.22052308917045593,
-0.04379674047231674,
-0.12016469240188599,
-0.6457440257072449,
-0.32317832112312317,
-0.16653476655483246,
-0.3695802688598633,
-0.10148696601390839,
-0.09688010811805725,
-0.014016423374414444,
-0.15600305795669556,
0.08157433569431305,
-0.42448654770851135,
0.24423223733901978,
0.18791112303733826,
-0.144757479429245,
-0.08543519675731659,
0.17301839590072632,
-0.2793934643268585,
-0.551679253578186,
0.20679554343223572,
-0.09458164870738983,
0.24433758854866028,
0.13876886665821075,
-0.014280715957283974,
0.01889728754758835,
-0.19521312415599823,
-0.20210681855678558,
0.13159580528736115,
-0.14081433415412903,
-0.3405297100543976,
-0.2667003571987152,
-0.15190233290195465,
-0.20086145401000977,
-0.1044817715883255,
0.27983328700065613,
0.07013891637325287,
0.30247962474823,
0.3966621160507202,
-0.01760793849825859,
-0.06330126523971558,
-0.2849562168121338,
0.08220339566469193,
-0.19944505393505096,
-0.06271900236606598,
0.1458606868982315,
-0.02385745756328106,
0.17356522381305695,
-0.22501666843891144,
-0.010573621839284897,
0.15743304789066315,
0.05278032273054123,
0.031123917549848557,
-0.4647313058376312,
-0.13592922687530518,
-0.1071503609418869,
-0.005500931292772293,
0.11171901226043701,
0.10440447181463242,
0.20525580644607544,
0.15069329738616943,
-0.18481230735778809,
-0.2874046564102173,
-0.14904485642910004,
-0.1798340231180191,
0.03887759894132614,
0.01970139890909195,
0.14451417326927185,
0.30589812994003296,
0.04177677258849144,
0.17262406647205353,
0.18458135426044464,
0.11455335468053818,
-0.27606406807899475,
-0.12947580218315125,
0.10174402594566345,
0.1475505828857422,
-0.1066451445221901,
-0.25680702924728394,
-0.07840237021446228,
-0.23974460363388062,
-0.09031300246715546,
0.1030203104019165,
-0.08908581733703613,
-0.0714159607887268,
0.22048453986644745,
0.3504030406475067,
-0.041480422019958496,
-0.16511644423007965,
-0.06969349086284637,
-0.20297139883041382,
0.324615478515625,
-0.14919251203536987,
0.09574644267559052,
0.0479329377412796,
0.0756743997335434,
-0.5871009230613708,
-0.08130396157503128,
-0.09646037220954895,
0.15437722206115723,
0.5952443480491638,
-0.4551481604576111,
0.031126033514738083,
0.04556873068213463,
0.16995346546173096,
0.4789007902145386,
-0.13045631349086761,
0.039012908935546875,
0.172951340675354,
0.18766723573207855,
-0.04849914088845253,
-0.07027454674243927,
0.13779567182064056,
0.10602827370166779,
-0.06373320519924164,
-0.07113232463598251,
-0.15258313715457916,
-0.1502196490764618,
0.09985959529876709,
0.01431916281580925,
0.33302387595176697,
0.04588901996612549,
0.21135444939136505,
0.408084899187088,
0.20176024734973907,
0.07180235534906387,
-0.38099154829978943,
0.020054437220096588,
0.07189971208572388,
-0.18873091042041779,
-0.15243831276893616,
-0.1257028728723526,
0.08139854669570923,
0.12150491774082184,
-0.3927775025367737,
-0.31883493065834045,
-0.35021457076072693,
0.08560090512037277,
-0.11790679395198822,
0.40861278772354126,
-0.005913250148296356,
0.20302638411521912,
-0.20639893412590027,
0.03384692594408989,
0.04388466477394104,
0.1606595516204834,
0.018573841080069542,
0.11596135795116425,
-0.5277096033096313,
-0.03108043223619461,
-0.05830550193786621,
0.03896540030837059,
0.3544372618198395,
0.5155141949653625,
-0.03619919717311859,
0.22145426273345947,
-0.10615229606628418,
-0.1359124481678009,
0.08837771415710449,
0.17714756727218628,
0.34257450699806213,
-0.37393948435783386,
0.28764671087265015,
0.21353983879089355,
0.08201055228710175,
-0.07543835043907166,
0.009954208508133888,
0.3729596734046936,
0.3608311116695404,
0.06650171428918839,
0.02780885249376297,
0.03634870797395706,
-0.09334062039852142,
0.02666173130273819,
0.33547765016555786,
0.19048556685447693,
-0.18797948956489563,
0.22218923270702362,
0.11016619205474854,
-0.08871228247880936,
0.39441728591918945,
0.09830336272716522,
0.11966095864772797,
-0.11526410281658173,
0.1943054497241974,
-0.2477383315563202,
-0.10861162841320038,
0.06404577940702438,
-0.35414427518844604,
-0.3587694466114044,
-0.06347715109586716,
0.23324891924858093,
0.11249049752950668,
0.04407956451177597,
-0.025077033787965775,
0.08495406806468964,
-0.12893228232860565,
0.2790076732635498,
0.24560260772705078,
-0.07999954372644424,
-0.16684474050998688,
-0.1844666600227356,
-0.2015261948108673,
0.1580561399459839,
-0.0404096283018589,
-0.10791928321123123,
0.23713892698287964,
0.3279326558113098,
-0.0682460144162178,
0.20604552328586578,
-0.09007112681865692,
-0.18220143020153046,
-0.29460155963897705,
0.280714213848114,
-0.3546521067619324,
-0.2369973510503769,
0.17879731953144073,
0.23359712958335876,
0.09106454998254776,
-0.4543970227241516,
0.20507264137268066,
-0.3312034010887146,
0.11783594638109207,
0.05539174750447273,
-0.030520524829626083,
0.015679676085710526,
0.0668506771326065,
0.2356526404619217,
0.16210795938968658,
0.11554720997810364,
-0.13499557971954346,
-0.19207040965557098,
-0.07281896471977234,
-0.1768481582403183,
-0.018311597406864166,
0.1458827257156372,
-0.05825025215744972,
0.502875566482544,
-0.048434920608997345,
-0.4014248549938202,
-0.43713825941085815,
0.428581178188324,
-0.043962374329566956,
-0.4439988434314728,
0.010393792763352394,
0.014011124148964882,
-0.1760360300540924,
0.181882843375206,
0.01247693132609129,
0.17777326703071594,
-0.05060441046953201,
0.06168282777070999,
-0.30855220556259155,
-0.10215945541858673,
0.5942238569259644,
-0.4224965572357178,
-0.31925445795059204,
0.3241399824619293,
0.126687690615654,
0.1190689355134964,
0.1298954039812088,
-0.19659096002578735,
0.13247624039649963,
0.43720465898513794,
-0.028387434780597687,
0.12153759598731995,
0.15976382791996002,
0.11520299315452576,
0.18512991070747375,
0.11781883239746094,
0.07764884829521179,
0.17259731888771057,
-0.25976046919822693,
0.13292750716209412,
-0.21405023336410522
] |
https://github.com/huggingface/datasets/issues/2607 | Streaming local gzip compressed JSON line files is not working | Sorry for reopening this, but I'm having the same issue as @thomwolf when streaming a gzipped JSON Lines file from the hub. Or is that just not possible by definition?
I installed `datasets`in editable mode from source (so probably includes the fix from #2608 ?):
```
>>> datasets.__version__
'1.9.1.dev0'
```
```
>>> msmarco = datasets.load_dataset("webis/msmarco", "corpus", streaming=True)
Using custom data configuration corpus-174d3b7155eb68db
>>> msmarco_iter = iter(msmarco['train'])
>>> print(next(msmarco_iter))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 338, in __iter__
for key, example in self._iter():
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 335, in _iter
yield from ex_iterable
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 78, in __iter__
for key, example in self.generate_examples_fn(**self.kwargs):
File "/home/christopher/.cache/huggingface/modules/datasets_modules/datasets/msmarco/eb63dff8d83107168e973c7a655a6082d37e08d71b4ac39a0afada479c138745/msmarco.py", line 96, in _generate_examples
with gzip.open(file, "rt", encoding="utf-8") as f:
File "/usr/lib/python3.6/gzip.py", line 53, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/usr/lib/python3.6/gzip.py", line 163, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'https://huggingface.co/datasets/webis/msmarco/resolve/main/msmarco_doc_00.gz'
```
Loading the dataset without streaming set to True, works fine. | ## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0 | 167 | Streaming local gzip compressed JSON line files is not working
## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0
Sorry for reopening this, but I'm having the same issue as @thomwolf when streaming a gzipped JSON Lines file from the hub. Or is that just not possible by definition?
I installed `datasets`in editable mode from source (so probably includes the fix from #2608 ?):
```
>>> datasets.__version__
'1.9.1.dev0'
```
```
>>> msmarco = datasets.load_dataset("webis/msmarco", "corpus", streaming=True)
Using custom data configuration corpus-174d3b7155eb68db
>>> msmarco_iter = iter(msmarco['train'])
>>> print(next(msmarco_iter))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 338, in __iter__
for key, example in self._iter():
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 335, in _iter
yield from ex_iterable
File "/media/ssd/TREC/msmarco/datasets/src/datasets/iterable_dataset.py", line 78, in __iter__
for key, example in self.generate_examples_fn(**self.kwargs):
File "/home/christopher/.cache/huggingface/modules/datasets_modules/datasets/msmarco/eb63dff8d83107168e973c7a655a6082d37e08d71b4ac39a0afada479c138745/msmarco.py", line 96, in _generate_examples
with gzip.open(file, "rt", encoding="utf-8") as f:
File "/usr/lib/python3.6/gzip.py", line 53, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/usr/lib/python3.6/gzip.py", line 163, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'https://huggingface.co/datasets/webis/msmarco/resolve/main/msmarco_doc_00.gz'
```
Loading the dataset without streaming set to True, works fine. | [
-0.19924913346767426,
-0.1339779496192932,
-0.009144341573119164,
0.23913531005382538,
0.07776336371898651,
0.016880445182323456,
0.3976747691631317,
0.5178912281990051,
0.19702084362506866,
0.0789990946650505,
0.10300023853778839,
0.33068305253982544,
-0.08836634457111359,
0.020874669775366783,
0.22888627648353577,
-0.18093405663967133,
-0.04366134852170944,
0.35606133937835693,
-0.025167889893054962,
0.0015848688781261444,
-0.13056659698486328,
0.2937992215156555,
-0.14045916497707367,
-0.018516555428504944,
-0.018798721954226494,
-0.03955550491809845,
-0.04715031385421753,
0.1500941812992096,
-0.09395948797464371,
-0.3326387405395508,
0.06277024000883102,
-0.16841410100460052,
0.18802247941493988,
0.44545480608940125,
-0.00011453594197519124,
0.2886410355567932,
0.2961103320121765,
-0.16291412711143494,
-0.38860633969306946,
-0.47124797105789185,
-0.2299010455608368,
-0.14929865300655365,
-0.13077174127101898,
-0.2858470678329468,
-0.13781914114952087,
-0.34743544459342957,
-0.03375731408596039,
-0.5071985721588135,
0.5416867136955261,
0.2922607958316803,
0.15566378831863403,
0.04196535423398018,
-0.06177150830626488,
0.09057888388633728,
0.03901635482907295,
0.15732330083847046,
-0.08860787004232407,
0.3150975704193115,
0.03278735280036926,
0.11496931314468384,
0.055284999310970306,
0.42864614725112915,
-0.22549577057361603,
-0.17477695643901825,
0.14736899733543396,
-0.0008152835071086884,
-0.0843823030591011,
-0.12578703463077545,
-0.16831547021865845,
0.08573459088802338,
0.18454521894454956,
-0.4122556149959564,
-0.4398341178894043,
-0.3761066496372223,
0.0466744601726532,
-0.44880327582359314,
0.21185395121574402,
0.40928658843040466,
-0.25030767917633057,
0.19696958363056183,
-0.10066523402929306,
-0.13053134083747864,
-0.3545626401901245,
0.0854525938630104,
0.36184993386268616,
0.34808340668678284,
-0.09467792510986328,
0.009128980338573456,
-0.09198705852031708,
0.11937961727380753,
-0.08398396521806717,
-0.3859614431858063,
-0.18570706248283386,
0.22775614261627197,
-0.24214117228984833,
-0.13492333889007568,
0.1443624645471573,
-0.6062148809432983,
0.15115061402320862,
0.10122884064912796,
0.46157681941986084,
-0.12574487924575806,
0.35880759358406067,
0.05460844188928604,
0.2728675603866577,
0.18704858422279358,
0.1769658923149109,
0.26384222507476807,
0.056659016758203506,
0.38988056778907776,
-0.08656706660985947,
-0.19807329773902893,
-0.23633761703968048,
-0.039404433220624924,
-0.09152821451425552,
0.13681045174598694,
0.48332661390304565,
-0.15766538679599762,
-0.08909309655427933,
0.0819111317396164,
-0.5941799879074097,
-0.13270039856433868,
0.15767164528369904,
0.09860995411872864,
0.0661015436053276,
0.22017395496368408,
0.026484854519367218,
0.16108398139476776,
-0.0021049864590168,
-0.0618940144777298,
-0.09079568833112717,
0.023572538048028946,
0.07405923306941986,
0.1347987949848175,
0.2518966794013977,
-0.5213877558708191,
0.2793646454811096,
0.008754835464060307,
-0.04603008180856705,
-0.15623460710048676,
0.005846243351697922,
-0.12555718421936035,
0.15045166015625,
0.14683885872364044,
-0.025929458439350128,
0.019363360479474068,
0.20588478446006775,
-0.11022668331861496,
-0.17381948232650757,
0.11835359036922455,
-0.27519622445106506,
-0.26721397042274475,
0.03723509609699249,
0.20101678371429443,
0.03815913572907448,
0.009389335289597511,
-0.008149422705173492,
0.0059310272336006165,
0.05569879338145256,
-0.3565126955509186,
0.023636184632778168,
-0.009464647620916367,
-0.05580206587910652,
-0.0841297134757042,
0.2759929597377777,
0.4360958933830261,
-0.3608710467815399,
-0.10359220206737518,
0.07156623154878616,
0.21758437156677246,
0.7216561436653137,
0.3425387442111969,
-0.23797141015529633,
0.12730826437473297,
-0.36812013387680054,
0.36190545558929443,
0.6931352019309998,
0.016038335859775543,
-0.3624655306339264,
0.852236270904541,
-0.108634352684021,
0.3817501962184906,
0.48008492588996887,
-0.2044287770986557,
0.19414830207824707,
-0.010518110357224941,
0.33520692586898804,
0.28128719329833984,
-0.044572435319423676,
0.03852761536836624,
-0.46427056193351746,
0.1312146931886673,
0.041949521750211716,
0.03780551627278328,
-0.2513180673122406,
0.2954411208629608,
-0.04339214414358139,
0.015033130533993244,
0.35209015011787415,
-0.18005652725696564,
0.10818429291248322,
0.29045605659484863,
0.2378067821264267,
0.019946180284023285,
0.20217405259609222,
0.009263712912797928,
-0.21780288219451904,
0.032493025064468384,
-0.33661139011383057,
-0.26293662190437317,
-0.2826172709465027,
-0.06241067498922348,
-0.1401136815547943,
0.14870043098926544,
-0.18434883654117584,
-0.3533778488636017,
0.1464821845293045,
0.4111505150794983,
0.380899041891098,
0.02243763953447342,
-0.4623299539089203,
0.300654798746109,
-0.2987259328365326,
-0.10485620051622391,
-0.2611705958843231,
0.4293639063835144,
0.07213469594717026,
-0.2631468176841736,
0.17588387429714203,
-0.05898887664079666,
0.17178946733474731,
-0.2416352480649948,
-0.2221173346042633,
0.24508240818977356,
-0.12085473537445068,
0.17090663313865662,
0.11697430163621902,
-0.22262577712535858,
0.2957747280597687,
-0.006211631000041962,
-0.07205746322870255,
0.34458673000335693,
0.21932761371135712,
0.20412081480026245,
-0.22399073839187622,
0.4739874005317688,
-0.03056645765900612,
0.3029976189136505,
0.020911678671836853,
-0.20583629608154297,
0.19243426620960236,
-0.008431758731603622,
-0.3421518802642822,
0.06537017226219177,
0.33458417654037476,
-0.12588869035243988,
0.09460471570491791,
-0.06129611283540726,
-0.37913402915000916,
-0.06355752795934677,
0.5271081328392029,
-0.08305846154689789,
-0.16150137782096863,
0.19268783926963806,
-0.18031254410743713,
-0.055544573813676834,
0.2965637147426605,
-0.00671657919883728,
0.33357688784599304,
0.15754491090774536,
0.10460278391838074,
0.01661362126469612,
-0.11111696064472198,
-0.25655391812324524,
0.20916080474853516,
-0.09003441035747528,
0.11462675780057907,
0.5449172258377075,
0.03563675656914711,
0.04491705447435379,
-0.3995398283004761,
-0.2428152859210968,
-0.12888257205486298,
0.14558027684688568,
-0.09908787906169891,
0.3841347098350525,
-0.3911353051662445,
-0.3713180124759674,
-0.1201702356338501,
-0.11286944895982742,
-0.06306320428848267,
-0.08577275276184082,
-0.026965584605932236,
0.2985593378543854,
-0.20046056807041168,
0.23292391002178192,
0.0005530808120965958,
0.03940087556838989,
0.25194913148880005,
-0.4227369427680969,
-0.4818934500217438,
-0.16303886473178864,
-0.19115698337554932,
-0.010403230786323547,
0.2656029164791107,
-0.2878887355327606,
0.30171722173690796,
-0.04590483382344246,
-0.3699759244918823,
-0.2708004415035248,
0.11940648406744003,
0.14356118440628052,
0.0721823051571846,
-0.022700974717736244,
-0.09127949178218842,
0.22808393836021423,
-0.07968787848949432,
-0.3324354588985443,
0.28701022267341614,
-0.2174527943134308,
-0.14865605533123016,
0.19485224783420563,
-0.031185459345579147,
-0.0018445150926709175,
-0.23529799282550812,
-0.26552173495292664,
-0.1472453474998474,
-0.4852219521999359,
0.289681613445282,
-0.040369387716054916,
0.3086790442466736,
0.24291092157363892,
0.1440979391336441,
0.17795976996421814,
0.15565794706344604,
-0.05469176173210144,
-0.1509629637002945,
-0.6362743973731995,
0.3917452096939087,
-0.11013627052307129,
-0.23037861287593842,
-0.029500897973775864,
-0.15559729933738708,
-0.05509701743721962,
0.3612903952598572,
-0.4562183618545532,
0.2379126101732254,
0.07027335464954376,
0.08341825008392334,
-0.09506794810295105,
-0.1340567022562027,
0.19144567847251892,
-0.10754582285881042,
-0.060360439121723175,
-0.2590092420578003,
0.07594428956508636,
-0.012234970927238464,
0.25273072719573975,
0.1833099126815796,
0.40134382247924805,
0.7469968795776367,
-0.03916153684258461,
0.2865431308746338,
0.35339248180389404,
0.14586889743804932,
0.5503771305084229,
-0.13009318709373474,
0.16025011241436005,
-0.2425835132598877,
-0.2188410609960556,
0.059646349400281906,
0.10508374124765396,
-0.3196406364440918,
0.027433566749095917,
0.0012179287150502205,
-0.34065836668014526,
-0.32408449053764343,
0.12440317869186401,
-0.3062017858028412,
-0.18829496204853058,
0.20148375630378723,
-0.09639263153076172,
0.1964128017425537,
-0.03942333906888962,
-0.02964046597480774,
-0.0032322434708476067,
0.11535072326660156,
-0.04832805320620537,
0.26540952920913696,
0.4285118579864502,
0.12893380224704742,
-0.05432466045022011,
-0.18306809663772583,
-0.34849312901496887,
0.07876445353031158,
0.2743043005466461,
0.6020612120628357,
-0.16699925065040588,
-0.1687544584274292,
0.07984810322523117,
-0.1684127002954483,
0.46363067626953125,
-0.12587988376617432,
-0.03415410965681076,
0.34727731347084045,
-0.12427917122840881,
-0.026653451845049858,
-0.11905510723590851,
-0.043170180171728134,
0.35300952196121216,
0.19594988226890564,
0.6723822951316833,
-0.17720749974250793,
-0.2202005237340927,
0.11325743794441223,
0.02156556397676468,
0.09070289134979248,
-0.15626809000968933,
-0.29280784726142883,
-0.13581255078315735,
-0.2019336223602295,
-0.06550390273332596,
-0.0717766135931015,
0.24107946455478668,
0.019955942407250404,
-0.13128213584423065,
0.05360097438097,
-0.07305420935153961,
-0.11266767978668213,
0.007804127410054207,
0.29403916001319885,
-0.03253127261996269,
0.15934227406978607,
0.05702204257249832,
0.5039330720901489,
0.2327844649553299,
0.5136663317680359,
0.5314755439758301,
-0.414777934551239,
0.13258449733257294,
0.07024488598108292,
0.13299402594566345,
0.1649875044822693,
-0.13509312272071838,
-0.1513882279396057,
0.1381034255027771,
0.2574629783630371,
-0.035580966621637344,
-0.08321420103311539,
0.23381994664669037,
-0.15558256208896637,
-0.3567379415035248,
-0.4606517553329468,
0.24326208233833313,
-0.039203330874443054,
0.19205348193645477,
0.7787442207336426,
-0.6046565175056458,
-0.1680707484483719,
0.1287052184343338,
-0.32743915915489197,
0.6506008505821228,
0.30569252371788025,
-0.012611914426088333,
0.4230310916900635,
-0.1530071496963501,
0.42910832166671753,
-0.4506235718727112,
0.3880232572555542,
-0.1075456291437149,
-0.1895090490579605,
0.013624737039208412,
-0.15217828750610352,
0.3272458016872406,
0.17365053296089172,
-0.33012494444847107,
0.15608155727386475,
0.09498704969882965,
-0.026112359017133713,
0.05640243738889694,
0.08446617424488068,
-0.34109097719192505,
-0.14785538613796234,
-0.6056388020515442,
0.08227258920669556,
-0.16434235870838165,
0.3591594994068146,
0.11986435204744339,
-0.38716012239456177,
0.010003659874200821,
-0.21891891956329346,
-0.1640433520078659,
0.4873071610927582,
-0.22052308917045593,
-0.04379674047231674,
-0.12016469240188599,
-0.6457440257072449,
-0.32317832112312317,
-0.16653476655483246,
-0.3695802688598633,
-0.10148696601390839,
-0.09688010811805725,
-0.014016423374414444,
-0.15600305795669556,
0.08157433569431305,
-0.42448654770851135,
0.24423223733901978,
0.18791112303733826,
-0.144757479429245,
-0.08543519675731659,
0.17301839590072632,
-0.2793934643268585,
-0.551679253578186,
0.20679554343223572,
-0.09458164870738983,
0.24433758854866028,
0.13876886665821075,
-0.014280715957283974,
0.01889728754758835,
-0.19521312415599823,
-0.20210681855678558,
0.13159580528736115,
-0.14081433415412903,
-0.3405297100543976,
-0.2667003571987152,
-0.15190233290195465,
-0.20086145401000977,
-0.1044817715883255,
0.27983328700065613,
0.07013891637325287,
0.30247962474823,
0.3966621160507202,
-0.01760793849825859,
-0.06330126523971558,
-0.2849562168121338,
0.08220339566469193,
-0.19944505393505096,
-0.06271900236606598,
0.1458606868982315,
-0.02385745756328106,
0.17356522381305695,
-0.22501666843891144,
-0.010573621839284897,
0.15743304789066315,
0.05278032273054123,
0.031123917549848557,
-0.4647313058376312,
-0.13592922687530518,
-0.1071503609418869,
-0.005500931292772293,
0.11171901226043701,
0.10440447181463242,
0.20525580644607544,
0.15069329738616943,
-0.18481230735778809,
-0.2874046564102173,
-0.14904485642910004,
-0.1798340231180191,
0.03887759894132614,
0.01970139890909195,
0.14451417326927185,
0.30589812994003296,
0.04177677258849144,
0.17262406647205353,
0.18458135426044464,
0.11455335468053818,
-0.27606406807899475,
-0.12947580218315125,
0.10174402594566345,
0.1475505828857422,
-0.1066451445221901,
-0.25680702924728394,
-0.07840237021446228,
-0.23974460363388062,
-0.09031300246715546,
0.1030203104019165,
-0.08908581733703613,
-0.0714159607887268,
0.22048453986644745,
0.3504030406475067,
-0.041480422019958496,
-0.16511644423007965,
-0.06969349086284637,
-0.20297139883041382,
0.324615478515625,
-0.14919251203536987,
0.09574644267559052,
0.0479329377412796,
0.0756743997335434,
-0.5871009230613708,
-0.08130396157503128,
-0.09646037220954895,
0.15437722206115723,
0.5952443480491638,
-0.4551481604576111,
0.031126033514738083,
0.04556873068213463,
0.16995346546173096,
0.4789007902145386,
-0.13045631349086761,
0.039012908935546875,
0.172951340675354,
0.18766723573207855,
-0.04849914088845253,
-0.07027454674243927,
0.13779567182064056,
0.10602827370166779,
-0.06373320519924164,
-0.07113232463598251,
-0.15258313715457916,
-0.1502196490764618,
0.09985959529876709,
0.01431916281580925,
0.33302387595176697,
0.04588901996612549,
0.21135444939136505,
0.408084899187088,
0.20176024734973907,
0.07180235534906387,
-0.38099154829978943,
0.020054437220096588,
0.07189971208572388,
-0.18873091042041779,
-0.15243831276893616,
-0.1257028728723526,
0.08139854669570923,
0.12150491774082184,
-0.3927775025367737,
-0.31883493065834045,
-0.35021457076072693,
0.08560090512037277,
-0.11790679395198822,
0.40861278772354126,
-0.005913250148296356,
0.20302638411521912,
-0.20639893412590027,
0.03384692594408989,
0.04388466477394104,
0.1606595516204834,
0.018573841080069542,
0.11596135795116425,
-0.5277096033096313,
-0.03108043223619461,
-0.05830550193786621,
0.03896540030837059,
0.3544372618198395,
0.5155141949653625,
-0.03619919717311859,
0.22145426273345947,
-0.10615229606628418,
-0.1359124481678009,
0.08837771415710449,
0.17714756727218628,
0.34257450699806213,
-0.37393948435783386,
0.28764671087265015,
0.21353983879089355,
0.08201055228710175,
-0.07543835043907166,
0.009954208508133888,
0.3729596734046936,
0.3608311116695404,
0.06650171428918839,
0.02780885249376297,
0.03634870797395706,
-0.09334062039852142,
0.02666173130273819,
0.33547765016555786,
0.19048556685447693,
-0.18797948956489563,
0.22218923270702362,
0.11016619205474854,
-0.08871228247880936,
0.39441728591918945,
0.09830336272716522,
0.11966095864772797,
-0.11526410281658173,
0.1943054497241974,
-0.2477383315563202,
-0.10861162841320038,
0.06404577940702438,
-0.35414427518844604,
-0.3587694466114044,
-0.06347715109586716,
0.23324891924858093,
0.11249049752950668,
0.04407956451177597,
-0.025077033787965775,
0.08495406806468964,
-0.12893228232860565,
0.2790076732635498,
0.24560260772705078,
-0.07999954372644424,
-0.16684474050998688,
-0.1844666600227356,
-0.2015261948108673,
0.1580561399459839,
-0.0404096283018589,
-0.10791928321123123,
0.23713892698287964,
0.3279326558113098,
-0.0682460144162178,
0.20604552328586578,
-0.09007112681865692,
-0.18220143020153046,
-0.29460155963897705,
0.280714213848114,
-0.3546521067619324,
-0.2369973510503769,
0.17879731953144073,
0.23359712958335876,
0.09106454998254776,
-0.4543970227241516,
0.20507264137268066,
-0.3312034010887146,
0.11783594638109207,
0.05539174750447273,
-0.030520524829626083,
0.015679676085710526,
0.0668506771326065,
0.2356526404619217,
0.16210795938968658,
0.11554720997810364,
-0.13499557971954346,
-0.19207040965557098,
-0.07281896471977234,
-0.1768481582403183,
-0.018311597406864166,
0.1458827257156372,
-0.05825025215744972,
0.502875566482544,
-0.048434920608997345,
-0.4014248549938202,
-0.43713825941085815,
0.428581178188324,
-0.043962374329566956,
-0.4439988434314728,
0.010393792763352394,
0.014011124148964882,
-0.1760360300540924,
0.181882843375206,
0.01247693132609129,
0.17777326703071594,
-0.05060441046953201,
0.06168282777070999,
-0.30855220556259155,
-0.10215945541858673,
0.5942238569259644,
-0.4224965572357178,
-0.31925445795059204,
0.3241399824619293,
0.126687690615654,
0.1190689355134964,
0.1298954039812088,
-0.19659096002578735,
0.13247624039649963,
0.43720465898513794,
-0.028387434780597687,
0.12153759598731995,
0.15976382791996002,
0.11520299315452576,
0.18512991070747375,
0.11781883239746094,
0.07764884829521179,
0.17259731888771057,
-0.25976046919822693,
0.13292750716209412,
-0.21405023336410522
] |
https://github.com/huggingface/datasets/issues/2607 | Streaming local gzip compressed JSON line files is not working | Hi ! To make the streaming work, we extend `open` in the dataset builder to work with urls.
Therefore you just need to use `open` before using `gzip.open`:
```diff
- with gzip.open(file, "rt", encoding="utf-8") as f:
+ with gzip.open(open(file, "rb"), "rt", encoding="utf-8") as f:
```
You can see that it is the case for oscar.py and c4.py for example:
https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/oscar/oscar.py#L358-L358
https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/c4/c4.py#L88-L88
| ## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0 | 61 | Streaming local gzip compressed JSON line files is not working
## Describe the bug
Using streaming to iterate on local gzip compressed JSON files raise a file not exist error
## Steps to reproduce the bug
```python
from datasets import load_dataset
streamed_dataset = load_dataset('json', split='train', data_files=data_files, streaming=True)
next(iter(streamed_dataset))
```
## Actual results
```
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-27a664e29784> in <module>
----> 1 next(iter(streamed_dataset))
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
336
337 def __iter__(self):
--> 338 for key, example in self._iter():
339 if self.features:
340 # we encode the example for ClassLabel feature types for example
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in _iter(self)
333 else:
334 ex_iterable = self._ex_iterable
--> 335 yield from ex_iterable
336
337 def __iter__(self):
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in __iter__(self)
76
77 def __iter__(self):
---> 78 for key, example in self.generate_examples_fn(**self.kwargs):
79 yield key, example
80
~/Documents/GitHub/datasets/src/datasets/iterable_dataset.py in wrapper(**kwargs)
282 def wrapper(**kwargs):
283 python_formatter = PythonFormatter()
--> 284 for key, table in generate_tables_fn(**kwargs):
285 batch = python_formatter.format_batch(table)
286 for i, example in enumerate(_batch_to_examples(batch)):
~/Documents/GitHub/datasets/src/datasets/packaged_modules/json/json.py in _generate_tables(self, files, original_files)
85 file,
86 read_options=self.config.pa_read_options,
---> 87 parse_options=self.config.pa_parse_options,
88 )
89 except pa.ArrowInvalid as err:
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json.read_json()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/_json.pyx in pyarrow._json._get_reader()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_input_stream()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.get_native_file()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile.__cinit__()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/io.pxi in pyarrow.lib.OSFile._open_readable()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
~/miniconda2/envs/datasets/lib/python3.7/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()
FileNotFoundError: [Errno 2] Failed to open local file 'gzip://file-000000000000.json::/Users/thomwolf/github-dataset/file-000000000000.json.gz'. Detail: [errno 2] No such file or directory
```
## Environment info
- `datasets` version: 1.9.1.dev0
- Platform: Darwin-19.6.0-x86_64-i386-64bit
- Python version: 3.7.7
- PyArrow version: 1.0.0
Hi ! To make the streaming work, we extend `open` in the dataset builder to work with urls.
Therefore you just need to use `open` before using `gzip.open`:
```diff
- with gzip.open(file, "rt", encoding="utf-8") as f:
+ with gzip.open(open(file, "rb"), "rt", encoding="utf-8") as f:
```
You can see that it is the case for oscar.py and c4.py for example:
https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/oscar/oscar.py#L358-L358
https://github.com/huggingface/datasets/blob/8814b393984c1c2e1800ba370de2a9f7c8644908/datasets/c4/c4.py#L88-L88
| [
-0.19924913346767426,
-0.1339779496192932,
-0.009144341573119164,
0.23913531005382538,
0.07776336371898651,
0.016880445182323456,
0.3976747691631317,
0.5178912281990051,
0.19702084362506866,
0.0789990946650505,
0.10300023853778839,
0.33068305253982544,
-0.08836634457111359,
0.020874669775366783,
0.22888627648353577,
-0.18093405663967133,
-0.04366134852170944,
0.35606133937835693,
-0.025167889893054962,
0.0015848688781261444,
-0.13056659698486328,
0.2937992215156555,
-0.14045916497707367,
-0.018516555428504944,
-0.018798721954226494,
-0.03955550491809845,
-0.04715031385421753,
0.1500941812992096,
-0.09395948797464371,
-0.3326387405395508,
0.06277024000883102,
-0.16841410100460052,
0.18802247941493988,
0.44545480608940125,
-0.00011453594197519124,
0.2886410355567932,
0.2961103320121765,
-0.16291412711143494,
-0.38860633969306946,
-0.47124797105789185,
-0.2299010455608368,
-0.14929865300655365,
-0.13077174127101898,
-0.2858470678329468,
-0.13781914114952087,
-0.34743544459342957,
-0.03375731408596039,
-0.5071985721588135,
0.5416867136955261,
0.2922607958316803,
0.15566378831863403,
0.04196535423398018,
-0.06177150830626488,
0.09057888388633728,
0.03901635482907295,
0.15732330083847046,
-0.08860787004232407,
0.3150975704193115,
0.03278735280036926,
0.11496931314468384,
0.055284999310970306,
0.42864614725112915,
-0.22549577057361603,
-0.17477695643901825,
0.14736899733543396,
-0.0008152835071086884,
-0.0843823030591011,
-0.12578703463077545,
-0.16831547021865845,
0.08573459088802338,
0.18454521894454956,
-0.4122556149959564,
-0.4398341178894043,
-0.3761066496372223,
0.0466744601726532,
-0.44880327582359314,
0.21185395121574402,
0.40928658843040466,
-0.25030767917633057,
0.19696958363056183,
-0.10066523402929306,
-0.13053134083747864,
-0.3545626401901245,
0.0854525938630104,
0.36184993386268616,
0.34808340668678284,
-0.09467792510986328,
0.009128980338573456,
-0.09198705852031708,
0.11937961727380753,
-0.08398396521806717,
-0.3859614431858063,
-0.18570706248283386,
0.22775614261627197,
-0.24214117228984833,
-0.13492333889007568,
0.1443624645471573,
-0.6062148809432983,
0.15115061402320862,
0.10122884064912796,
0.46157681941986084,
-0.12574487924575806,
0.35880759358406067,
0.05460844188928604,
0.2728675603866577,
0.18704858422279358,
0.1769658923149109,
0.26384222507476807,
0.056659016758203506,
0.38988056778907776,
-0.08656706660985947,
-0.19807329773902893,
-0.23633761703968048,
-0.039404433220624924,
-0.09152821451425552,
0.13681045174598694,
0.48332661390304565,
-0.15766538679599762,
-0.08909309655427933,
0.0819111317396164,
-0.5941799879074097,
-0.13270039856433868,
0.15767164528369904,
0.09860995411872864,
0.0661015436053276,
0.22017395496368408,
0.026484854519367218,
0.16108398139476776,
-0.0021049864590168,
-0.0618940144777298,
-0.09079568833112717,
0.023572538048028946,
0.07405923306941986,
0.1347987949848175,
0.2518966794013977,
-0.5213877558708191,
0.2793646454811096,
0.008754835464060307,
-0.04603008180856705,
-0.15623460710048676,
0.005846243351697922,
-0.12555718421936035,
0.15045166015625,
0.14683885872364044,
-0.025929458439350128,
0.019363360479474068,
0.20588478446006775,
-0.11022668331861496,
-0.17381948232650757,
0.11835359036922455,
-0.27519622445106506,
-0.26721397042274475,
0.03723509609699249,
0.20101678371429443,
0.03815913572907448,
0.009389335289597511,
-0.008149422705173492,
0.0059310272336006165,
0.05569879338145256,
-0.3565126955509186,
0.023636184632778168,
-0.009464647620916367,
-0.05580206587910652,
-0.0841297134757042,
0.2759929597377777,
0.4360958933830261,
-0.3608710467815399,
-0.10359220206737518,
0.07156623154878616,
0.21758437156677246,
0.7216561436653137,
0.3425387442111969,
-0.23797141015529633,
0.12730826437473297,
-0.36812013387680054,
0.36190545558929443,
0.6931352019309998,
0.016038335859775543,
-0.3624655306339264,
0.852236270904541,
-0.108634352684021,
0.3817501962184906,
0.48008492588996887,
-0.2044287770986557,
0.19414830207824707,
-0.010518110357224941,
0.33520692586898804,
0.28128719329833984,
-0.044572435319423676,
0.03852761536836624,
-0.46427056193351746,
0.1312146931886673,
0.041949521750211716,
0.03780551627278328,
-0.2513180673122406,
0.2954411208629608,
-0.04339214414358139,
0.015033130533993244,
0.35209015011787415,
-0.18005652725696564,
0.10818429291248322,
0.29045605659484863,
0.2378067821264267,
0.019946180284023285,
0.20217405259609222,
0.009263712912797928,
-0.21780288219451904,
0.032493025064468384,
-0.33661139011383057,
-0.26293662190437317,
-0.2826172709465027,
-0.06241067498922348,
-0.1401136815547943,
0.14870043098926544,
-0.18434883654117584,
-0.3533778488636017,
0.1464821845293045,
0.4111505150794983,
0.380899041891098,
0.02243763953447342,
-0.4623299539089203,
0.300654798746109,
-0.2987259328365326,
-0.10485620051622391,
-0.2611705958843231,
0.4293639063835144,
0.07213469594717026,
-0.2631468176841736,
0.17588387429714203,
-0.05898887664079666,
0.17178946733474731,
-0.2416352480649948,
-0.2221173346042633,
0.24508240818977356,
-0.12085473537445068,
0.17090663313865662,
0.11697430163621902,
-0.22262577712535858,
0.2957747280597687,
-0.006211631000041962,
-0.07205746322870255,
0.34458673000335693,
0.21932761371135712,
0.20412081480026245,
-0.22399073839187622,
0.4739874005317688,
-0.03056645765900612,
0.3029976189136505,
0.020911678671836853,
-0.20583629608154297,
0.19243426620960236,
-0.008431758731603622,
-0.3421518802642822,
0.06537017226219177,
0.33458417654037476,
-0.12588869035243988,
0.09460471570491791,
-0.06129611283540726,
-0.37913402915000916,
-0.06355752795934677,
0.5271081328392029,
-0.08305846154689789,
-0.16150137782096863,
0.19268783926963806,
-0.18031254410743713,
-0.055544573813676834,
0.2965637147426605,
-0.00671657919883728,
0.33357688784599304,
0.15754491090774536,
0.10460278391838074,
0.01661362126469612,
-0.11111696064472198,
-0.25655391812324524,
0.20916080474853516,
-0.09003441035747528,
0.11462675780057907,
0.5449172258377075,
0.03563675656914711,
0.04491705447435379,
-0.3995398283004761,
-0.2428152859210968,
-0.12888257205486298,
0.14558027684688568,
-0.09908787906169891,
0.3841347098350525,
-0.3911353051662445,
-0.3713180124759674,
-0.1201702356338501,
-0.11286944895982742,
-0.06306320428848267,
-0.08577275276184082,
-0.026965584605932236,
0.2985593378543854,
-0.20046056807041168,
0.23292391002178192,
0.0005530808120965958,
0.03940087556838989,
0.25194913148880005,
-0.4227369427680969,
-0.4818934500217438,
-0.16303886473178864,
-0.19115698337554932,
-0.010403230786323547,
0.2656029164791107,
-0.2878887355327606,
0.30171722173690796,
-0.04590483382344246,
-0.3699759244918823,
-0.2708004415035248,
0.11940648406744003,
0.14356118440628052,
0.0721823051571846,
-0.022700974717736244,
-0.09127949178218842,
0.22808393836021423,
-0.07968787848949432,
-0.3324354588985443,
0.28701022267341614,
-0.2174527943134308,
-0.14865605533123016,
0.19485224783420563,
-0.031185459345579147,
-0.0018445150926709175,
-0.23529799282550812,
-0.26552173495292664,
-0.1472453474998474,
-0.4852219521999359,
0.289681613445282,
-0.040369387716054916,
0.3086790442466736,
0.24291092157363892,
0.1440979391336441,
0.17795976996421814,
0.15565794706344604,
-0.05469176173210144,
-0.1509629637002945,
-0.6362743973731995,
0.3917452096939087,
-0.11013627052307129,
-0.23037861287593842,
-0.029500897973775864,
-0.15559729933738708,
-0.05509701743721962,
0.3612903952598572,
-0.4562183618545532,
0.2379126101732254,
0.07027335464954376,
0.08341825008392334,
-0.09506794810295105,
-0.1340567022562027,
0.19144567847251892,
-0.10754582285881042,
-0.060360439121723175,
-0.2590092420578003,
0.07594428956508636,
-0.012234970927238464,
0.25273072719573975,
0.1833099126815796,
0.40134382247924805,
0.7469968795776367,
-0.03916153684258461,
0.2865431308746338,
0.35339248180389404,
0.14586889743804932,
0.5503771305084229,
-0.13009318709373474,
0.16025011241436005,
-0.2425835132598877,
-0.2188410609960556,
0.059646349400281906,
0.10508374124765396,
-0.3196406364440918,
0.027433566749095917,
0.0012179287150502205,
-0.34065836668014526,
-0.32408449053764343,
0.12440317869186401,
-0.3062017858028412,
-0.18829496204853058,
0.20148375630378723,
-0.09639263153076172,
0.1964128017425537,
-0.03942333906888962,
-0.02964046597480774,
-0.0032322434708476067,
0.11535072326660156,
-0.04832805320620537,
0.26540952920913696,
0.4285118579864502,
0.12893380224704742,
-0.05432466045022011,
-0.18306809663772583,
-0.34849312901496887,
0.07876445353031158,
0.2743043005466461,
0.6020612120628357,
-0.16699925065040588,
-0.1687544584274292,
0.07984810322523117,
-0.1684127002954483,
0.46363067626953125,
-0.12587988376617432,
-0.03415410965681076,
0.34727731347084045,
-0.12427917122840881,
-0.026653451845049858,
-0.11905510723590851,
-0.043170180171728134,
0.35300952196121216,
0.19594988226890564,
0.6723822951316833,
-0.17720749974250793,
-0.2202005237340927,
0.11325743794441223,
0.02156556397676468,
0.09070289134979248,
-0.15626809000968933,
-0.29280784726142883,
-0.13581255078315735,
-0.2019336223602295,
-0.06550390273332596,
-0.0717766135931015,
0.24107946455478668,
0.019955942407250404,
-0.13128213584423065,
0.05360097438097,
-0.07305420935153961,
-0.11266767978668213,
0.007804127410054207,
0.29403916001319885,
-0.03253127261996269,
0.15934227406978607,
0.05702204257249832,
0.5039330720901489,
0.2327844649553299,
0.5136663317680359,
0.5314755439758301,
-0.414777934551239,
0.13258449733257294,
0.07024488598108292,
0.13299402594566345,
0.1649875044822693,
-0.13509312272071838,
-0.1513882279396057,
0.1381034255027771,
0.2574629783630371,
-0.035580966621637344,
-0.08321420103311539,
0.23381994664669037,
-0.15558256208896637,
-0.3567379415035248,
-0.4606517553329468,
0.24326208233833313,
-0.039203330874443054,
0.19205348193645477,
0.7787442207336426,
-0.6046565175056458,
-0.1680707484483719,
0.1287052184343338,
-0.32743915915489197,
0.6506008505821228,
0.30569252371788025,
-0.012611914426088333,
0.4230310916900635,
-0.1530071496963501,
0.42910832166671753,
-0.4506235718727112,
0.3880232572555542,
-0.1075456291437149,
-0.1895090490579605,
0.013624737039208412,
-0.15217828750610352,
0.3272458016872406,
0.17365053296089172,
-0.33012494444847107,
0.15608155727386475,
0.09498704969882965,
-0.026112359017133713,
0.05640243738889694,
0.08446617424488068,
-0.34109097719192505,
-0.14785538613796234,
-0.6056388020515442,
0.08227258920669556,
-0.16434235870838165,
0.3591594994068146,
0.11986435204744339,
-0.38716012239456177,
0.010003659874200821,
-0.21891891956329346,
-0.1640433520078659,
0.4873071610927582,
-0.22052308917045593,
-0.04379674047231674,
-0.12016469240188599,
-0.6457440257072449,
-0.32317832112312317,
-0.16653476655483246,
-0.3695802688598633,
-0.10148696601390839,
-0.09688010811805725,
-0.014016423374414444,
-0.15600305795669556,
0.08157433569431305,
-0.42448654770851135,
0.24423223733901978,
0.18791112303733826,
-0.144757479429245,
-0.08543519675731659,
0.17301839590072632,
-0.2793934643268585,
-0.551679253578186,
0.20679554343223572,
-0.09458164870738983,
0.24433758854866028,
0.13876886665821075,
-0.014280715957283974,
0.01889728754758835,
-0.19521312415599823,
-0.20210681855678558,
0.13159580528736115,
-0.14081433415412903,
-0.3405297100543976,
-0.2667003571987152,
-0.15190233290195465,
-0.20086145401000977,
-0.1044817715883255,
0.27983328700065613,
0.07013891637325287,
0.30247962474823,
0.3966621160507202,
-0.01760793849825859,
-0.06330126523971558,
-0.2849562168121338,
0.08220339566469193,
-0.19944505393505096,
-0.06271900236606598,
0.1458606868982315,
-0.02385745756328106,
0.17356522381305695,
-0.22501666843891144,
-0.010573621839284897,
0.15743304789066315,
0.05278032273054123,
0.031123917549848557,
-0.4647313058376312,
-0.13592922687530518,
-0.1071503609418869,
-0.005500931292772293,
0.11171901226043701,
0.10440447181463242,
0.20525580644607544,
0.15069329738616943,
-0.18481230735778809,
-0.2874046564102173,
-0.14904485642910004,
-0.1798340231180191,
0.03887759894132614,
0.01970139890909195,
0.14451417326927185,
0.30589812994003296,
0.04177677258849144,
0.17262406647205353,
0.18458135426044464,
0.11455335468053818,
-0.27606406807899475,
-0.12947580218315125,
0.10174402594566345,
0.1475505828857422,
-0.1066451445221901,
-0.25680702924728394,
-0.07840237021446228,
-0.23974460363388062,
-0.09031300246715546,
0.1030203104019165,
-0.08908581733703613,
-0.0714159607887268,
0.22048453986644745,
0.3504030406475067,
-0.041480422019958496,
-0.16511644423007965,
-0.06969349086284637,
-0.20297139883041382,
0.324615478515625,
-0.14919251203536987,
0.09574644267559052,
0.0479329377412796,
0.0756743997335434,
-0.5871009230613708,
-0.08130396157503128,
-0.09646037220954895,
0.15437722206115723,
0.5952443480491638,
-0.4551481604576111,
0.031126033514738083,
0.04556873068213463,
0.16995346546173096,
0.4789007902145386,
-0.13045631349086761,
0.039012908935546875,
0.172951340675354,
0.18766723573207855,
-0.04849914088845253,
-0.07027454674243927,
0.13779567182064056,
0.10602827370166779,
-0.06373320519924164,
-0.07113232463598251,
-0.15258313715457916,
-0.1502196490764618,
0.09985959529876709,
0.01431916281580925,
0.33302387595176697,
0.04588901996612549,
0.21135444939136505,
0.408084899187088,
0.20176024734973907,
0.07180235534906387,
-0.38099154829978943,
0.020054437220096588,
0.07189971208572388,
-0.18873091042041779,
-0.15243831276893616,
-0.1257028728723526,
0.08139854669570923,
0.12150491774082184,
-0.3927775025367737,
-0.31883493065834045,
-0.35021457076072693,
0.08560090512037277,
-0.11790679395198822,
0.40861278772354126,
-0.005913250148296356,
0.20302638411521912,
-0.20639893412590027,
0.03384692594408989,
0.04388466477394104,
0.1606595516204834,
0.018573841080069542,
0.11596135795116425,
-0.5277096033096313,
-0.03108043223619461,
-0.05830550193786621,
0.03896540030837059,
0.3544372618198395,
0.5155141949653625,
-0.03619919717311859,
0.22145426273345947,
-0.10615229606628418,
-0.1359124481678009,
0.08837771415710449,
0.17714756727218628,
0.34257450699806213,
-0.37393948435783386,
0.28764671087265015,
0.21353983879089355,
0.08201055228710175,
-0.07543835043907166,
0.009954208508133888,
0.3729596734046936,
0.3608311116695404,
0.06650171428918839,
0.02780885249376297,
0.03634870797395706,
-0.09334062039852142,
0.02666173130273819,
0.33547765016555786,
0.19048556685447693,
-0.18797948956489563,
0.22218923270702362,
0.11016619205474854,
-0.08871228247880936,
0.39441728591918945,
0.09830336272716522,
0.11966095864772797,
-0.11526410281658173,
0.1943054497241974,
-0.2477383315563202,
-0.10861162841320038,
0.06404577940702438,
-0.35414427518844604,
-0.3587694466114044,
-0.06347715109586716,
0.23324891924858093,
0.11249049752950668,
0.04407956451177597,
-0.025077033787965775,
0.08495406806468964,
-0.12893228232860565,
0.2790076732635498,
0.24560260772705078,
-0.07999954372644424,
-0.16684474050998688,
-0.1844666600227356,
-0.2015261948108673,
0.1580561399459839,
-0.0404096283018589,
-0.10791928321123123,
0.23713892698287964,
0.3279326558113098,
-0.0682460144162178,
0.20604552328586578,
-0.09007112681865692,
-0.18220143020153046,
-0.29460155963897705,
0.280714213848114,
-0.3546521067619324,
-0.2369973510503769,
0.17879731953144073,
0.23359712958335876,
0.09106454998254776,
-0.4543970227241516,
0.20507264137268066,
-0.3312034010887146,
0.11783594638109207,
0.05539174750447273,
-0.030520524829626083,
0.015679676085710526,
0.0668506771326065,
0.2356526404619217,
0.16210795938968658,
0.11554720997810364,
-0.13499557971954346,
-0.19207040965557098,
-0.07281896471977234,
-0.1768481582403183,
-0.018311597406864166,
0.1458827257156372,
-0.05825025215744972,
0.502875566482544,
-0.048434920608997345,
-0.4014248549938202,
-0.43713825941085815,
0.428581178188324,
-0.043962374329566956,
-0.4439988434314728,
0.010393792763352394,
0.014011124148964882,
-0.1760360300540924,
0.181882843375206,
0.01247693132609129,
0.17777326703071594,
-0.05060441046953201,
0.06168282777070999,
-0.30855220556259155,
-0.10215945541858673,
0.5942238569259644,
-0.4224965572357178,
-0.31925445795059204,
0.3241399824619293,
0.126687690615654,
0.1190689355134964,
0.1298954039812088,
-0.19659096002578735,
0.13247624039649963,
0.43720465898513794,
-0.028387434780597687,
0.12153759598731995,
0.15976382791996002,
0.11520299315452576,
0.18512991070747375,
0.11781883239746094,
0.07764884829521179,
0.17259731888771057,
-0.25976046919822693,
0.13292750716209412,
-0.21405023336410522
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Hi !
If we want something more general, we could either
1. delete the extracted files after the arrow data generation automatically, or
2. delete each extracted file during the arrow generation right after it has been closed.
Solution 2 is better to save disk space during the arrow generation. Is it what you had in mind ?
The API could look like
```python
load_dataset(..., delete_extracted_files_after_usage=True)
```
In terms of implementation, here are some directions we could take for each solution:
1. get the list of the extracted files from the DownloadManager and then delete them after the dataset is processed. This can be implemented in `download_and_prepare` I guess
2. maybe wrap and mock `open` in the builder to make it delete the file when the file is closed. | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 129 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Hi !
If we want something more general, we could either
1. delete the extracted files after the arrow data generation automatically, or
2. delete each extracted file during the arrow generation right after it has been closed.
Solution 2 is better to save disk space during the arrow generation. Is it what you had in mind ?
The API could look like
```python
load_dataset(..., delete_extracted_files_after_usage=True)
```
In terms of implementation, here are some directions we could take for each solution:
1. get the list of the extracted files from the DownloadManager and then delete them after the dataset is processed. This can be implemented in `download_and_prepare` I guess
2. maybe wrap and mock `open` in the builder to make it delete the file when the file is closed. | [
-0.042224787175655365,
-0.05207763612270355,
-0.13756443560123444,
0.24913619458675385,
-0.08902096748352051,
0.10409878939390182,
-0.11982813477516174,
0.18471884727478027,
0.23423123359680176,
0.24075888097286224,
0.15672843158245087,
0.5178806185722351,
-0.3404891788959503,
-0.05085202306509018,
-0.13492843508720398,
-0.020200669765472412,
-0.19922542572021484,
0.34002411365509033,
-0.004785314202308655,
0.23033012449741364,
-0.22097858786582947,
0.026225602254271507,
0.023204080760478973,
-0.10261748731136322,
0.08117848634719849,
-0.38592037558555603,
0.13598695397377014,
-0.18674638867378235,
-0.16227532923221588,
-0.5164055228233337,
0.054175153374671936,
0.5212089419364929,
0.23224949836730957,
0.09713247418403625,
-0.00012233477900736034,
0.03224796801805496,
0.25915127992630005,
0.07995457947254181,
-0.4075604975223541,
0.12440113723278046,
-0.14612632989883423,
-0.2453017234802246,
0.2597355246543884,
-0.1671178638935089,
0.21014276146888733,
-0.5648967623710632,
-0.22389550507068634,
-0.6139013767242432,
0.5910024642944336,
-0.09774378687143326,
0.0498434342443943,
0.13846103847026825,
-0.32603129744529724,
0.2452625185251236,
0.2004278004169464,
0.277032732963562,
-0.04240061342716217,
0.02236713096499443,
0.41518962383270264,
0.09675552695989609,
0.16196712851524353,
0.38070377707481384,
-0.05502422899007797,
-0.16032040119171143,
0.44451600313186646,
0.06313162297010422,
-0.03192409873008728,
-0.4852727949619293,
0.13982561230659485,
-0.006692796945571899,
0.706152617931366,
-0.4330635070800781,
-0.26728788018226624,
-0.45743754506111145,
0.028046943247318268,
-0.5922435522079468,
0.038591865450143814,
0.2951575815677643,
-0.12118063867092133,
0.20892883837223053,
-0.11039535701274872,
-0.45443716645240784,
-0.373391717672348,
-0.08714091777801514,
0.6077171564102173,
-0.3243740200996399,
-0.05686210095882416,
-0.06566860526800156,
0.3697434961795807,
0.0736781656742096,
0.2949273884296417,
-0.26989585161209106,
-0.1399102658033371,
0.505906879901886,
-0.027143340557813644,
-0.1845744401216507,
-0.2607630491256714,
-0.28970998525619507,
0.119435615837574,
0.30298149585723877,
0.3516377806663513,
-0.007010325789451599,
0.19306211173534393,
0.11101526767015457,
0.1876695156097412,
0.37513306736946106,
0.007887855172157288,
-0.05305399373173714,
0.17217549681663513,
0.207680344581604,
0.06429801881313324,
-0.0915423110127449,
0.0383337065577507,
-0.1278783082962036,
0.36367881298065186,
0.01545766182243824,
0.07163328677415848,
0.026188421994447708,
-0.16508150100708008,
0.07824958115816116,
0.12913081049919128,
-0.1351679265499115,
0.15134936571121216,
0.26704129576683044,
0.058730773627758026,
0.1620463728904724,
0.21588893234729767,
0.23504424095153809,
-0.02994144707918167,
-0.14658784866333008,
0.13762271404266357,
0.07318101823329926,
-0.2401803582906723,
-0.18840940296649933,
0.36413446068763733,
-0.008334608748555183,
0.0416417270898819,
0.0005884049460291862,
-0.3138783574104309,
-0.06418273597955704,
0.6676417589187622,
-0.09938623011112213,
0.28070104122161865,
0.34219709038734436,
-0.10934725403785706,
-0.24361905455589294,
-0.32482093572616577,
-0.11986909061670303,
-0.19655878841876984,
0.5875698924064636,
-0.15688765048980713,
-0.31701698899269104,
-0.13684433698654175,
0.12908965349197388,
-0.027050400152802467,
0.243729829788208,
-0.5556284189224243,
0.11721128225326538,
0.163152813911438,
0.06273007392883301,
-0.022435910999774933,
0.29615652561187744,
-0.05861114338040352,
-0.17877759039402008,
-0.18934722244739532,
0.36914339661598206,
-0.5007235407829285,
-0.12231052666902542,
-0.3205624222755432,
-0.1797681301832199,
0.14246010780334473,
-0.0010876767337322235,
-0.12397382408380508,
0.3791070282459259,
-0.2620407044887543,
0.09159739315509796,
0.5124646425247192,
-0.18157167732715607,
-0.4231870174407959,
0.14827562868595123,
0.11009906232357025,
0.2711135447025299,
0.3149677813053131,
0.25079670548439026,
0.2787880301475525,
0.0021170037798583508,
-0.03848873823881149,
0.4016496539115906,
0.07365204393863678,
0.004099840298295021,
-0.22394634783267975,
-0.4116465747356415,
0.05135532096028328,
0.24719856679439545,
-0.02079293504357338,
0.0398838073015213,
0.06239676848053932,
-0.1024291142821312,
0.3069232702255249,
0.0978262647986412,
0.1519836038351059,
0.13272210955619812,
0.14489269256591797,
-0.2485726922750473,
-0.2080589383840561,
0.06977993994951248,
-0.5534015893936157,
0.1737689971923828,
-0.5192018747329712,
-0.29176798462867737,
-0.4091198444366455,
-0.34444570541381836,
0.08205940574407578,
0.19592541456222534,
-0.29890191555023193,
0.19668173789978027,
0.03276422619819641,
-0.18940380215644836,
0.28316810727119446,
-0.006417226046323776,
-0.42843037843704224,
0.019906144589185715,
-0.14090056717395782,
0.17419399321079254,
-0.45013147592544556,
0.10403715074062347,
0.2124258577823639,
-0.19869890809059143,
-0.11104770749807358,
-0.009402386844158173,
-0.29103776812553406,
-0.342291921377182,
-0.09363905340433121,
0.2829713225364685,
0.3651207685470581,
0.2683430314064026,
0.10736420750617981,
0.22819766402244568,
0.22038774192333221,
0.22185015678405762,
0.08242900669574738,
0.25904881954193115,
0.08714056760072708,
0.1824856698513031,
-0.2291259765625,
0.5258798003196716,
-0.07651002705097198,
0.024130314588546753,
-0.1283980906009674,
-0.30223557353019714,
0.22405678033828735,
-0.0017425194382667542,
0.012859635055065155,
-0.4730241894721985,
-0.05428747460246086,
0.36830657720565796,
0.12888817489147186,
0.09176641702651978,
0.1476069986820221,
-0.015088677406311035,
0.09251141548156738,
-0.10315082967281342,
-0.10266947001218796,
0.3242192268371582,
-0.06961790472269058,
-0.16131821274757385,
0.05732981860637665,
0.4151652455329895,
0.44812071323394775,
0.0921720340847969,
-0.11546356976032257,
-0.0787656158208847,
0.4702812731266022,
0.05142135173082352,
0.2684764862060547,
0.1953538954257965,
0.08138623833656311,
0.36181142926216125,
0.16824108362197876,
-0.06226044520735741,
-0.27486783266067505,
-0.09148302674293518,
0.0715453177690506,
0.2726360559463501,
0.22083419561386108,
-0.06113767623901367,
-0.1839367300271988,
-0.2929829955101013,
0.2759947180747986,
0.12522080540657043,
0.217290461063385,
-0.016195256263017654,
0.4093543291091919,
0.07793351262807846,
-0.38933876156806946,
0.07481997460126877,
0.008212532848119736,
0.5284098982810974,
-0.08733707666397095,
-0.2672448754310608,
-0.34041857719421387,
-0.13126756250858307,
0.23669275641441345,
-0.0275298822671175,
0.38182979822158813,
-0.19845448434352875,
0.5107128620147705,
0.07859054207801819,
0.0959748774766922,
-0.03027254529297352,
-0.09184548258781433,
0.061533622443675995,
0.40848106145858765,
0.05227983742952347,
0.13317328691482544,
0.16845020651817322,
0.12487342953681946,
0.06091989576816559,
-0.13083142042160034,
-0.22052320837974548,
-0.09630429744720459,
0.15619270503520966,
0.0524330735206604,
0.09632445871829987,
-0.21652457118034363,
-0.016315214335918427,
-0.30719542503356934,
-0.37771639227867126,
0.25576263666152954,
0.10729140043258667,
0.13723666965961456,
0.08451179414987564,
0.2943948209285736,
-0.05875708535313606,
0.14127251505851746,
0.07038366049528122,
0.045388173311948776,
-0.5879285931587219,
0.11898213624954224,
-0.20733954012393951,
0.07256968319416046,
0.3074825406074524,
-0.12210390716791153,
0.060423288494348526,
0.3388388752937317,
-0.37634968757629395,
-0.06939215213060379,
-0.04157343506813049,
0.20565663278102875,
-0.2972855865955353,
-0.036534860730171204,
0.19675946235656738,
0.3320673704147339,
-0.021748872473835945,
0.0054509639739990234,
0.2608993947505951,
0.16489437222480774,
0.2400374412536621,
0.06586423516273499,
0.22860240936279297,
0.2869080901145935,
0.057427000254392624,
0.4774214029312134,
-0.12406931817531586,
0.02121603488922119,
0.33306318521499634,
0.322478324174881,
0.33700060844421387,
-0.22266045212745667,
0.25848060846328735,
-0.5167117714881897,
-0.07041618227958679,
-0.1229766309261322,
0.0886603444814682,
0.14520490169525146,
-0.12835681438446045,
0.09056663513183594,
-0.15577690303325653,
-0.20417159795761108,
-0.18588940799236298,
0.3037089705467224,
-0.3123892545700073,
0.08660034090280533,
-0.024936847388744354,
-0.2253096103668213,
-0.16899420320987701,
-0.05793789401650429,
0.06850187480449677,
0.11713261157274246,
0.5481660962104797,
-0.12295641005039215,
-0.061933837831020355,
-0.0753127783536911,
-0.3717125654220581,
0.24668636918067932,
-0.1443479210138321,
-0.27008405327796936,
0.1441914141178131,
0.02280394360423088,
0.1901639699935913,
0.09201224148273468,
0.2852833867073059,
-0.02146301604807377,
-0.09214290976524353,
-0.19374880194664001,
-0.024101676419377327,
-0.332391619682312,
0.009094707667827606,
0.05995861813426018,
0.04491502791643143,
-0.1582275629043579,
0.398545503616333,
-0.3091912269592285,
-0.19246074557304382,
-0.35099703073501587,
0.6400803327560425,
-0.26455003023147583,
-0.06942994892597198,
-0.1440267562866211,
-0.30620071291923523,
-0.6328197717666626,
0.06679089367389679,
0.07988015562295914,
-0.05907686427235603,
0.15394926071166992,
-0.33153820037841797,
-0.10191884636878967,
-0.1806175708770752,
0.018712319433689117,
0.01430315338075161,
0.6302095055580139,
-0.3630814850330353,
0.09315477311611176,
-0.1307266801595688,
0.023438874632120132,
0.4153999090194702,
0.3095860481262207,
-0.09043863415718079,
-0.16624808311462402,
-0.08794024586677551,
-0.25198590755462646,
0.06396476924419403,
0.16846568882465363,
-0.2705997824668884,
0.4433530271053314,
-0.1818029284477234,
0.5496022701263428,
-0.10453556478023529,
-0.021343180909752846,
-0.07653748989105225,
-0.2536758482456207,
0.004494079388678074,
-0.45481574535369873,
0.22769120335578918,
0.04461606219410896,
-0.17590659856796265,
0.5514414310455322,
-0.08505995571613312,
-0.26997464895248413,
0.5203484296798706,
0.06900821626186371,
1.0979149341583252,
-0.048418253660202026,
0.05875377357006073,
-0.016736943274736404,
-0.27758729457855225,
0.3807532489299774,
-0.4976658225059509,
0.20901182293891907,
-0.06454648077487946,
-0.031050261110067368,
0.04918603599071503,
-0.06229405477643013,
0.04272870719432831,
0.23650529980659485,
-0.19303810596466064,
0.12303511053323746,
-0.39047539234161377,
-0.13137315213680267,
-0.28552407026290894,
0.3503839075565338,
-0.26335710287094116,
-0.2937423586845398,
-0.24290505051612854,
-0.042314354330301285,
0.043784249573946,
0.00460207462310791,
-0.3125774562358856,
-0.08231431990861893,
0.3401925563812256,
-0.06238827109336853,
0.2848975658416748,
-0.14018626511096954,
-0.33962416648864746,
0.3695372939109802,
-0.1837325543165207,
-0.17639005184173584,
-0.2778177559375763,
0.20903638005256653,
-0.28934502601623535,
-0.013277929276227951,
0.15230678021907806,
0.06730993837118149,
0.006426721811294556,
0.02335309609770775,
-0.33204129338264465,
-0.0007071923464536667,
0.0622989684343338,
-0.16004180908203125,
0.011435993015766144,
0.20374903082847595,
-0.36745503544807434,
-0.3369385004043579,
0.21514612436294556,
0.14481130242347717,
-0.0885290801525116,
0.057230859994888306,
-0.3552052080631256,
-0.20079708099365234,
-0.4958287179470062,
0.08581314980983734,
0.06282375007867813,
0.3129725456237793,
-0.24828433990478516,
0.2814546525478363,
-0.35067319869995117,
-0.13248282670974731,
-0.1104249507188797,
-0.22553393244743347,
0.295469731092453,
-0.05007651448249817,
0.37388017773628235,
-0.1685558706521988,
-0.21558164060115814,
-0.3375292122364044,
0.020504862070083618,
-0.017896505072712898,
-0.47945213317871094,
0.4637887179851532,
0.15697334706783295,
-0.07216258347034454,
0.035401761531829834,
0.00899488478899002,
-0.0942452996969223,
0.049326442182064056,
-0.15729926526546478,
-0.17859026789665222,
-0.577164351940155,
0.23688724637031555,
0.26574787497520447,
0.4896400570869446,
0.0345773845911026,
-0.11167880892753601,
-0.10581061989068985,
0.03295910358428955,
-0.20042577385902405,
0.22640861570835114,
0.20596449077129364,
0.13561126589775085,
-0.09614403545856476,
0.27472785115242004,
0.013817108236253262,
-0.22921036183834076,
-0.11262697726488113,
0.03344903513789177,
-0.16565577685832977,
-0.1269177794456482,
-0.1983720064163208,
0.1402418315410614,
-0.09141486883163452,
-0.1350334733724594,
-0.09112178534269333,
-0.2899685502052307,
0.0810251533985138,
-0.1910167783498764,
0.26229286193847656,
-0.2783588767051697,
-0.13212762773036957,
-0.1273307055234909,
0.3750874400138855,
0.03311622142791748,
-0.2510365843772888,
0.22649887204170227,
-0.13317647576332092,
0.41045618057250977,
0.02755669504404068,
0.027309933677315712,
-0.09927619248628616,
-0.05671324208378792,
-0.24998867511749268,
0.05641908198595047,
0.2500879764556885,
0.0263423640280962,
0.1521475911140442,
-0.07124519348144531,
-0.09944348782300949,
-0.0005779704079031944,
0.19166681170463562,
0.27419376373291016,
-0.06994899362325668,
-0.000806223601102829,
-0.07769739627838135,
0.17561180889606476,
-0.2982027232646942,
-0.15867070853710175,
-0.059192512184381485,
-0.0076439278200268745,
-0.16193607449531555,
0.29615047574043274,
0.2256491780281067,
0.08999289572238922,
-0.11989434063434601,
0.15138021111488342,
0.3126504421234131,
-0.23478393256664276,
0.23937566578388214,
0.369867205619812,
0.07807549834251404,
-0.10592682659626007,
-0.054584890604019165,
0.31039050221443176,
0.2109910249710083,
-0.046723224222660065,
-0.25925934314727783,
0.44650331139564514,
0.5072873830795288,
0.2389117181301117,
-0.5002036094665527,
-0.3075021803379059,
-0.2232683151960373,
0.5195422172546387,
-0.08148384094238281,
0.36818042397499084,
0.40821775794029236,
0.23829275369644165,
0.25956907868385315,
-0.24804328382015228,
-0.13587334752082825,
0.5102307200431824,
0.06218119338154793,
-0.0676645040512085,
0.06789635866880417,
-0.11460420489311218,
0.11578734219074249,
0.10465656220912933,
0.17962202429771423,
0.1921076625585556,
-0.18540805578231812,
0.3415929079055786,
0.0732639729976654,
0.21381163597106934,
0.45334482192993164,
0.22816908359527588,
0.4140395522117615,
-0.24927523732185364,
-0.22960279881954193,
0.28142398595809937,
0.21103058755397797,
-0.1215115338563919,
-0.17472462356090546,
0.08497308194637299,
0.10954658687114716,
-0.46097680926322937,
0.08603768050670624,
0.07071593403816223,
0.07601095736026764,
-0.26451194286346436,
0.3912452459335327,
0.23917649686336517,
-0.09450624883174896,
-0.07020062208175659,
0.025468068197369576,
-0.10132955759763718,
0.08780410140752792,
0.16490831971168518,
0.23448863625526428,
-0.18679994344711304,
-0.038895390927791595,
0.29619526863098145,
-0.47129958868026733,
-0.02062440663576126,
-0.11658144742250443,
-0.15844063460826874,
-0.06561008095741272,
0.2926979064941406,
-0.19556011259555817,
-0.021068952977657318,
-0.10474876314401627,
0.050378039479255676,
-0.29025834798812866,
0.24982568621635437,
0.18878458440303802,
-0.1815618872642517,
-0.30607864260673523,
-0.27863848209381104,
-0.378164142370224,
-0.25455906987190247,
-0.19806396961212158,
-0.03524436429142952,
0.25989672541618347,
0.13812628388404846,
-0.03564273566007614,
0.19690470397472382,
0.03241143375635147,
0.0291325394064188,
0.07392026484012604,
0.10207320749759674,
-0.4914742410182953,
0.0756242424249649,
0.17661696672439575,
0.13979415595531464,
0.09360700845718384,
-0.5097525119781494,
-0.3088512122631073,
-0.1815594583749771,
-0.046721890568733215,
-0.09110161662101746,
0.2209639847278595,
0.27557802200317383,
0.6003799438476562,
0.7884595394134521,
-0.10868147015571594,
-0.26113009452819824,
-0.024623136967420578,
-0.2064293622970581,
0.06255538016557693,
-0.05511641129851341,
-0.08326981961727142,
-0.21044981479644775,
0.3017948567867279,
0.3111489713191986,
-0.28447964787483215,
0.36058682203292847,
-0.34081581234931946,
-0.24362479150295258,
-0.1466904580593109,
0.040938910096883774,
-0.26271286606788635,
-0.0334499329328537,
-0.048903729766607285,
0.4001444876194,
0.013686289079487324,
0.2550773024559021,
0.02955779992043972,
0.05883371829986572,
-0.35976743698120117,
-0.025477420538663864,
0.38397467136383057,
0.19793732464313507,
-0.29566940665245056,
0.40798622369766235,
0.10535506904125214,
0.048719316720962524,
0.03056880086660385,
-0.35000553727149963,
0.28719598054885864,
0.14004620909690857,
-0.30887550115585327,
-0.06100619584321976,
0.27140164375305176,
0.010257220827043056,
0.006112843751907349,
0.1072331964969635,
0.43427345156669617,
0.2631801962852478,
0.09327264875173569,
-0.47916123270988464,
-0.25328946113586426
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Also, if I delete the extracted files they need to be re-extracted again instead of loading from the Arrow cache files | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 21 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Also, if I delete the extracted files they need to be re-extracted again instead of loading from the Arrow cache files | [
-0.028062835335731506,
-0.1268453449010849,
-0.14626361429691315,
0.15173645317554474,
-0.175587996840477,
0.19438332319259644,
-0.21975265443325043,
0.2515491545200348,
0.17995063960552216,
0.16384977102279663,
0.10564127564430237,
0.4813861548900604,
-0.24072282016277313,
-0.10407430678606033,
-0.18873931467533112,
-0.0030708536505699158,
-0.23559966683387756,
0.28896987438201904,
-0.007610216736793518,
0.1621084064245224,
-0.1351308524608612,
0.015067558735609055,
0.04653821885585785,
-0.1541210412979126,
0.05377603694796562,
-0.4090356230735779,
0.20611189305782318,
-0.2602272927761078,
-0.11028578132390976,
-0.35236939787864685,
-0.0030763577669858932,
0.5342468619346619,
0.2766074240207672,
0.1419578194618225,
-0.0001208869434776716,
-0.01427345722913742,
0.2875983715057373,
0.07234395295381546,
-0.4089953601360321,
0.22555780410766602,
-0.2436768114566803,
-0.10312871634960175,
0.2598839998245239,
-0.1265430897474289,
0.294694721698761,
-0.40844017267227173,
-0.20414520800113678,
-0.6497342586517334,
0.5037789344787598,
-0.23861603438854218,
0.09738226234912872,
0.00960974395275116,
-0.545406699180603,
0.10604389756917953,
0.33380889892578125,
0.34750741720199585,
-0.13104194402694702,
-0.008145280182361603,
0.4774487316608429,
0.10099707543849945,
0.27679547667503357,
0.3542623221874237,
-0.07383594661951065,
-0.2929222881793976,
0.338668555021286,
-0.025792956352233887,
-0.07459738105535507,
-0.25957703590393066,
0.29153501987457275,
0.024685047566890717,
0.6543720364570618,
-0.34599724411964417,
-0.09162413328886032,
-0.33271703124046326,
0.12472224980592728,
-0.586995542049408,
0.08348500728607178,
0.17490501701831818,
0.047030672430992126,
0.24708743393421173,
-0.10422433167695999,
-0.4791460633277893,
-0.3593367338180542,
-0.14785487949848175,
0.6762906312942505,
-0.4306485950946808,
-0.0751289650797844,
-0.1268765926361084,
0.5420329570770264,
0.1520409882068634,
0.21741841733455658,
-0.17600367963314056,
-0.30393218994140625,
0.40963420271873474,
-0.06563080847263336,
-0.17927710711956024,
-0.4102029502391815,
-0.29980456829071045,
0.15669819712638855,
0.17528708279132843,
0.4254445731639862,
-0.00521448627114296,
0.17472968995571136,
0.02122076228260994,
0.24583417177200317,
0.38672134280204773,
0.07013150304555893,
-0.061833374202251434,
0.18849456310272217,
0.11725720018148422,
0.13806435465812683,
-0.04927944391965866,
0.02894262596964836,
-0.03818482533097267,
0.2580296993255615,
0.01993582770228386,
-0.03841238468885422,
-0.13205072283744812,
-0.07181041687726974,
0.06477886438369751,
0.20612040162086487,
-0.1974598467350006,
0.08658914268016815,
0.1973831057548523,
0.23601371049880981,
0.03407011926174164,
0.06153678148984909,
0.29826462268829346,
0.012463493272662163,
-0.3605460822582245,
0.12153295427560806,
0.12219151854515076,
-0.3169586956501007,
-0.23776395618915558,
0.4114533066749573,
-0.005869954824447632,
-0.04179999977350235,
-0.12772208452224731,
-0.33678823709487915,
0.06539729237556458,
0.5076661109924316,
-0.11965635418891907,
0.27888816595077515,
0.27717500925064087,
-0.1964021623134613,
-0.2270883172750473,
-0.2803884446620941,
-0.011432375758886337,
-0.13215282559394836,
0.510410487651825,
-0.12530109286308289,
-0.21734073758125305,
-0.06654881685972214,
0.11250334978103638,
0.15282969176769257,
0.2723380923271179,
-0.588419497013092,
0.1173693835735321,
0.10265038162469864,
0.04258247837424278,
0.04083971679210663,
0.34860867261886597,
0.018630336970090866,
-0.08032338321208954,
-0.33215227723121643,
0.2598169147968292,
-0.6571018099784851,
-0.08885563910007477,
-0.35451117157936096,
-0.25676727294921875,
0.21151617169380188,
0.11250744760036469,
-0.11750732362270355,
0.23762288689613342,
-0.15777035057544708,
0.15940998494625092,
0.3421456515789032,
-0.09356726706027985,
-0.3924854099750519,
0.15464532375335693,
0.09582771360874176,
0.19225139915943146,
0.31760701537132263,
0.3045816421508789,
0.3846725523471832,
0.03865063190460205,
-0.06867143511772156,
0.26155829429626465,
0.08801546692848206,
-0.10836979001760483,
-0.324745237827301,
-0.4044745862483978,
0.034336209297180176,
0.22382758557796478,
-0.0033785663545131683,
0.05534520372748375,
0.223191499710083,
-0.030548732727766037,
0.17100447416305542,
0.14985249936580658,
0.16635119915008545,
0.16068461537361145,
0.139022558927536,
-0.27145707607269287,
-0.2364155352115631,
0.1407700777053833,
-0.6055960059165955,
-0.008895259350538254,
-0.5798187255859375,
-0.37776365876197815,
-0.18285207450389862,
-0.3519930839538574,
0.13155803084373474,
0.013107063248753548,
-0.198033407330513,
0.1989232450723648,
0.03461623191833496,
-0.06162317097187042,
0.24890410900115967,
-0.027792880311608315,
-0.42329517006874084,
-0.01714644394814968,
-0.09408293664455414,
-0.0000213547027669847,
-0.4419437348842621,
0.12545743584632874,
0.15121914446353912,
-0.2590888738632202,
-0.019973497837781906,
0.014080200344324112,
-0.2875117361545563,
-0.4913886487483978,
-0.13185060024261475,
0.2647310495376587,
0.30569860339164734,
0.2912362217903137,
0.2880556583404541,
0.2514714002609253,
0.18143242597579956,
0.1652211993932724,
0.10452581197023392,
0.15996044874191284,
-0.01762571930885315,
0.08846335858106613,
-0.3933168053627014,
0.3887653946876526,
-0.2242792397737503,
-0.03521207720041275,
-0.18233880400657654,
-0.3922523856163025,
0.22075289487838745,
-0.10205809772014618,
0.11299849301576614,
-0.5385865569114685,
0.047297824174165726,
0.34361007809638977,
-0.11630091071128845,
0.028712322935461998,
0.10376183688640594,
-0.11539315432310104,
-0.006207842379808426,
-0.044993914663791656,
-0.14715424180030823,
0.30062463879585266,
-0.014815665781497955,
-0.16255265474319458,
0.07893604040145874,
0.38627395033836365,
0.35112014412879944,
0.17661863565444946,
-0.18468539416790009,
-0.16306474804878235,
0.4579220414161682,
-0.009584703482687473,
0.13688413798809052,
0.0368465818464756,
0.018498117104172707,
0.36775660514831543,
0.06021692231297493,
-0.006298626773059368,
-0.2424098551273346,
-0.05912834405899048,
0.11282617598772049,
0.2101316750049591,
0.28193312883377075,
-0.26309263706207275,
-0.2769407331943512,
-0.4187944531440735,
0.47453582286834717,
0.3225940763950348,
0.2582398056983948,
-0.018371224403381348,
0.5235853791236877,
0.06135335937142372,
-0.4129444360733032,
0.06954474747180939,
-0.019826453179121017,
0.6686819791793823,
-0.12507936358451843,
-0.21563789248466492,
-0.4043358266353607,
-0.18864774703979492,
0.15785881876945496,
0.016733329743146896,
0.3731079399585724,
-0.10124438256025314,
0.5151020884513855,
0.1303829550743103,
0.11426413059234619,
-0.09011811763048172,
-0.03235086798667908,
0.07831138372421265,
0.36885738372802734,
-0.07538303732872009,
0.08123711496591568,
0.1757236123085022,
-0.052680715918540955,
0.12168493866920471,
-0.1933169960975647,
-0.2980664074420929,
-0.12483099102973938,
0.15777170658111572,
0.08859050273895264,
-0.021348217502236366,
-0.2257014662027359,
-0.0321052223443985,
-0.16813397407531738,
-0.39504560828208923,
0.22720833122730255,
-0.025539837777614594,
0.00004782155156135559,
0.1141304299235344,
0.23134498298168182,
0.012226494960486889,
0.016425900161266327,
0.07076793164014816,
-0.009582449682056904,
-0.5886608362197876,
0.1329728066921234,
-0.20801518857479095,
0.07411866635084152,
0.22291716933250427,
0.018606282770633698,
-0.0014546364545822144,
0.3487135171890259,
-0.3909090757369995,
0.047515418380498886,
0.01797354407608509,
0.11814999580383301,
-0.3372396230697632,
-0.07647395879030228,
0.21486976742744446,
0.23132026195526123,
-0.08521711826324463,
0.031103387475013733,
0.1433154195547104,
0.2431013584136963,
0.3958527147769928,
0.11967316269874573,
0.08341039717197418,
0.214574933052063,
0.11879301071166992,
0.38819342851638794,
-0.2566869854927063,
0.03814151883125305,
0.31950491666793823,
0.39017221331596375,
0.4156234562397003,
-0.19081515073776245,
0.2777887284755707,
-0.41881558299064636,
0.05566240847110748,
-0.0858856588602066,
0.11906445771455765,
0.02616143599152565,
-0.14592626690864563,
0.1614791452884674,
-0.22399091720581055,
-0.12839257717132568,
-0.09236450493335724,
0.31239795684814453,
-0.23370274901390076,
0.06038365513086319,
-0.005724633112549782,
-0.2973105013370514,
-0.016966018825769424,
-0.023003917187452316,
0.16609317064285278,
0.17804408073425293,
0.42484724521636963,
-0.10657966136932373,
-0.2460833638906479,
-0.07650359719991684,
-0.1745063066482544,
0.32370176911354065,
-0.23531408607959747,
-0.2074507772922516,
-0.08010801672935486,
0.030074186623096466,
0.16102901101112366,
0.25126031041145325,
0.3416737914085388,
-0.11187443882226944,
-0.03614633530378342,
-0.16752006113529205,
0.048944130539894104,
-0.24401162564754486,
-0.025270307436585426,
-0.010316375643014908,
0.03819534555077553,
-0.003887016326189041,
0.40422967076301575,
-0.2591196298599243,
-0.1607067584991455,
-0.20550325512886047,
0.5759978890419006,
-0.2591151297092438,
-0.09164740890264511,
-0.03293585777282715,
-0.17119300365447998,
-0.5231111645698547,
0.06662552803754807,
0.01827489398419857,
-0.11666566878557205,
0.16972686350345612,
-0.3050327003002167,
-0.09726128727197647,
-0.32481926679611206,
0.04770907014608383,
0.04382063075900078,
0.5563671588897705,
-0.2645013630390167,
0.06221512332558632,
-0.12865248322486877,
0.1483028084039688,
0.5444573760032654,
0.20434701442718506,
-0.09195823967456818,
0.019247010350227356,
0.016274303197860718,
-0.39697831869125366,
0.17365536093711853,
0.15995042026042938,
-0.20136724412441254,
0.3397921323776245,
-0.22125355899333954,
0.5212977528572083,
0.06998737901449203,
-0.022642631083726883,
-0.20586472749710083,
-0.30381685495376587,
-0.018577201291918755,
-0.16657577455043793,
0.11500589549541473,
0.028012823313474655,
-0.17568814754486084,
0.4709271192550659,
-0.10545772314071655,
-0.24383749067783356,
0.49040764570236206,
0.09972575306892395,
1.1869288682937622,
-0.09772881865501404,
-0.03779950365424156,
-0.2128308117389679,
-0.2820967137813568,
0.27176833152770996,
-0.5684893727302551,
0.139094740152359,
0.02683432772755623,
-0.07168015837669373,
0.10704292356967926,
-0.05061262473464012,
0.036974579095840454,
0.21113179624080658,
-0.24817489087581635,
0.050142593681812286,
-0.3473033308982849,
-0.15810441970825195,
-0.28847748041152954,
0.3806917667388916,
-0.08262648433446884,
-0.218288391828537,
-0.04897191375494003,
-0.023917537182569504,
0.03371765837073326,
-0.08946734666824341,
-0.2412540316581726,
-0.07381530106067657,
0.37015777826309204,
-0.01027156412601471,
0.32304686307907104,
-0.13159096240997314,
-0.2650003433227539,
0.3628650903701782,
-0.18912988901138306,
-0.12919160723686218,
-0.2284797579050064,
0.044005297124385834,
-0.232473686337471,
0.03194577246904373,
0.13629953563213348,
0.012450391426682472,
0.09062658995389938,
-0.06330326944589615,
-0.4203033447265625,
0.0675700455904007,
-0.10307638347148895,
-0.1273813098669052,
0.0338439866900444,
0.1527552455663681,
-0.2764269709587097,
-0.3605758547782898,
0.15111446380615234,
0.14768177270889282,
-0.11209098994731903,
0.05394362285733223,
-0.26469066739082336,
-0.12671810388565063,
-0.5518770813941956,
0.09996162354946136,
0.0886898785829544,
0.29871219396591187,
-0.17196807265281677,
0.2865872383117676,
-0.16545754671096802,
-0.14706428349018097,
-0.20525464415550232,
-0.15969762206077576,
0.28457778692245483,
-0.1546221226453781,
0.24596185982227325,
-0.24498121440410614,
-0.22904056310653687,
-0.45948663353919983,
-0.01600538194179535,
-0.06295087933540344,
-0.3975648880004883,
0.4622114896774292,
0.026100149378180504,
-0.16923528909683228,
0.0772048607468605,
-0.09734602272510529,
0.04377352073788643,
0.03076125681400299,
-0.14058786630630493,
-0.10743550956249237,
-0.47023025155067444,
0.27464330196380615,
0.22888313233852386,
0.574930727481842,
0.035582706332206726,
-0.014640044420957565,
-0.12301059812307358,
0.10551003366708755,
-0.22848401963710785,
0.2524852752685547,
0.27347368001937866,
0.15813402831554413,
-0.04516226053237915,
0.28651875257492065,
0.05474633723497391,
-0.23749566078186035,
-0.09784556180238724,
0.056866757571697235,
-0.12066331505775452,
-0.15867045521736145,
-0.10713471472263336,
0.112603098154068,
-0.13982021808624268,
-0.10548317432403564,
-0.19010905921459198,
-0.2603558301925659,
0.09114769101142883,
-0.17662306129932404,
0.21074168384075165,
-0.24861803650856018,
-0.140925794839859,
-0.14723539352416992,
0.456141859292984,
-0.029298603534698486,
-0.08774283528327942,
0.17303287982940674,
-0.07146880030632019,
0.35031718015670776,
-0.019552743062376976,
-0.01222478598356247,
-0.043540652841329575,
-0.07487118244171143,
-0.32223960757255554,
0.067704938352108,
0.3231787085533142,
0.06817252933979034,
-0.01557699590921402,
-0.0005586631596088409,
-0.09038913249969482,
0.06921282410621643,
0.04206007346510887,
0.2573951780796051,
-0.06960152089595795,
-0.11795918643474579,
-0.051268141716718674,
0.18712124228477478,
-0.21504606306552887,
-0.15425708889961243,
-0.06351467967033386,
0.017414947971701622,
-0.2230873703956604,
0.27659544348716736,
0.36537206172943115,
0.06911018490791321,
0.06696739792823792,
0.08811606466770172,
0.26177605986595154,
-0.2271978110074997,
0.33914071321487427,
0.3206998407840729,
0.05533282086253166,
-0.24115680158138275,
-0.1346069574356079,
0.2819799780845642,
0.12347778677940369,
-0.1622914969921112,
-0.1784498691558838,
0.39388978481292725,
0.5958602428436279,
0.3432157635688782,
-0.5122552514076233,
-0.2275400012731552,
-0.29467326402664185,
0.606234073638916,
-0.07410752773284912,
0.44445687532424927,
0.4342080354690552,
0.17581385374069214,
0.3189781904220581,
-0.2883319556713104,
-0.2041713148355484,
0.4129083752632141,
0.08763372898101807,
0.06665228307247162,
0.02879655361175537,
-0.12466046959161758,
0.11173203587532043,
0.10138700902462006,
0.1449337601661682,
0.40165019035339355,
-0.10802149772644043,
0.32951200008392334,
0.08342844247817993,
0.25785282254219055,
0.5938122272491455,
0.18515968322753906,
0.42739883065223694,
-0.14336296916007996,
-0.20683762431144714,
0.20079737901687622,
0.27189207077026367,
0.04930244758725166,
-0.10121553391218185,
-0.07751335203647614,
0.16235633194446564,
-0.3642899692058563,
-0.0038275495171546936,
0.09089916944503784,
0.06325706094503403,
-0.26244235038757324,
0.475157231092453,
0.25955909490585327,
-0.24158446490764618,
-0.035523444414138794,
0.055804066359996796,
-0.08228492736816406,
0.1704401969909668,
0.09245972335338593,
0.20302848517894745,
-0.08391840755939484,
-0.2313915491104126,
0.38464275002479553,
-0.4732677638530731,
0.03242667764425278,
-0.14344343543052673,
-0.09428736567497253,
0.012214375659823418,
0.272504597902298,
-0.28599679470062256,
0.004099426791071892,
-0.052631475031375885,
0.056673794984817505,
-0.22327032685279846,
0.2803288400173187,
0.20435653626918793,
-0.3420995771884918,
-0.2589814066886902,
-0.31614938378334045,
-0.21759231388568878,
-0.2054600715637207,
-0.21435511112213135,
0.030853232368826866,
0.24433556199073792,
0.2561439573764801,
-0.024252161383628845,
0.22624395787715912,
0.2455410659313202,
-0.13791243731975555,
-0.04179258644580841,
0.05559634044766426,
-0.4732881784439087,
0.14338859915733337,
0.3838843107223511,
0.2196662276983261,
0.14698749780654907,
-0.42318490147590637,
-0.2671886682510376,
0.04114082455635071,
-0.01392708346247673,
-0.19046637415885925,
0.21655255556106567,
0.1297939270734787,
0.7412770986557007,
0.6710225939750671,
-0.14078213274478912,
-0.30980053544044495,
-0.08683498203754425,
-0.1885189712047577,
-0.01236574724316597,
-0.12501364946365356,
0.03008037805557251,
-0.18885540962219238,
0.47497570514678955,
0.20999370515346527,
-0.2864184081554413,
0.2727656960487366,
-0.28618258237838745,
-0.21525520086288452,
-0.17120954394340515,
0.23679551482200623,
-0.22968392074108124,
-0.0501834899187088,
0.023488610982894897,
0.4224824607372284,
-0.038404613733291626,
0.19408228993415833,
0.06902997195720673,
0.08399728685617447,
-0.36010634899139404,
0.03290387988090515,
0.3062986731529236,
0.3926439881324768,
-0.3070213496685028,
0.5346325039863586,
0.14903327822685242,
0.08522000908851624,
-0.0019337907433509827,
-0.2796178162097931,
0.2397046685218811,
0.1016339436173439,
-0.2820936143398285,
0.04367496445775032,
0.28979143500328064,
-0.03108184039592743,
-0.04599466547369957,
0.10218267142772675,
0.29897597432136536,
0.3729037344455719,
0.040529265999794006,
-0.45894527435302734,
-0.2643263339996338
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | I think we already opened an issue about this topic (suggested by @stas00): duplicated of #2481?
This is in our TODO list... 😅 | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 23 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
I think we already opened an issue about this topic (suggested by @stas00): duplicated of #2481?
This is in our TODO list... 😅 | [
-0.0192105770111084,
-0.12697668373584747,
-0.1481829583644867,
0.07984647154808044,
-0.13216948509216309,
0.17651614546775818,
-0.1987026184797287,
0.24316348135471344,
0.21240152418613434,
0.20227862894535065,
0.16154170036315918,
0.4751732051372528,
-0.2215890884399414,
-0.0703338161110878,
-0.2046111524105072,
0.040220439434051514,
-0.1827220320701599,
0.2646830677986145,
0.0021858438849449158,
0.1824556440114975,
-0.14065346121788025,
0.03627340495586395,
0.039483875036239624,
-0.1689867228269577,
0.09754984080791473,
-0.3767837584018707,
0.21478991210460663,
-0.2744060456752777,
-0.12017654627561569,
-0.3621693253517151,
0.042905181646347046,
0.5484215617179871,
0.23813897371292114,
0.15253855288028717,
-0.00012055243860231712,
-0.03805048391222954,
0.2979126572608948,
0.10062487423419952,
-0.4042664170265198,
0.1757790595293045,
-0.23994535207748413,
-0.1098075732588768,
0.23047833144664764,
-0.1402711123228073,
0.27543675899505615,
-0.32103487849235535,
-0.16257542371749878,
-0.6223289966583252,
0.4326826333999634,
-0.24686802923679352,
0.09601348638534546,
0.016747571527957916,
-0.5319132208824158,
0.09543536603450775,
0.30504322052001953,
0.41855907440185547,
-0.18246914446353912,
-0.057390835136175156,
0.5388314723968506,
0.034159161150455475,
0.27265840768814087,
0.37126287817955017,
-0.05881398171186447,
-0.278178870677948,
0.352153480052948,
-0.06666198372840881,
-0.08703596144914627,
-0.2991165220737457,
0.27807942032814026,
-0.021190665662288666,
0.6806839108467102,
-0.3543691039085388,
-0.12488051503896713,
-0.30690354108810425,
0.07663702964782715,
-0.5461723208427429,
0.12643121182918549,
0.17991402745246887,
-0.02150217816233635,
0.272322416305542,
-0.16785913705825806,
-0.42577823996543884,
-0.3638322949409485,
-0.11202993988990784,
0.6866955757141113,
-0.38862040638923645,
-0.051100946962833405,
-0.1442253589630127,
0.5321459770202637,
0.17108669877052307,
0.20388424396514893,
-0.08411110192537308,
-0.2778003215789795,
0.41678595542907715,
-0.030232366174459457,
-0.1976912021636963,
-0.3469563126564026,
-0.3571127653121948,
0.24825042486190796,
0.1723567098379135,
0.42539602518081665,
-0.031795598566532135,
0.17850661277770996,
0.06279371678829193,
0.28112560510635376,
0.3864463269710541,
0.06191783770918846,
-0.10313474386930466,
0.21242544054985046,
0.10010109096765518,
0.15065176784992218,
-0.045267537236213684,
0.11010835319757462,
-0.01060626469552517,
0.2505987584590912,
0.030772147700190544,
-0.03741052374243736,
-0.14562198519706726,
-0.05157490074634552,
0.07406410574913025,
0.20238721370697021,
-0.1960345357656479,
0.06666847318410873,
0.17084577679634094,
0.2334364354610443,
0.053400930017232895,
0.07130568474531174,
0.30214977264404297,
-0.002523208037018776,
-0.33679431676864624,
0.12562525272369385,
0.13417592644691467,
-0.3137153685092926,
-0.2757600247859955,
0.4017674922943115,
-0.03297420218586922,
-0.03757553547620773,
-0.08564481139183044,
-0.3078609108924866,
0.05091734975576401,
0.5031171441078186,
-0.055331505835056305,
0.23666933178901672,
0.3152056932449341,
-0.1929740160703659,
-0.24961555004119873,
-0.27443593740463257,
-0.051533427089452744,
-0.14778971672058105,
0.48949262499809265,
-0.14005041122436523,
-0.2936854362487793,
-0.11329050362110138,
0.10494827479124069,
0.15744318068027496,
0.232984259724617,
-0.5811312198638916,
0.15515676140785217,
0.0752398818731308,
0.05137773975729942,
-0.02949061244726181,
0.41429877281188965,
-0.01334410160779953,
-0.0749283954501152,
-0.3167099952697754,
0.26987263560295105,
-0.6963497400283813,
-0.0778401717543602,
-0.34368255734443665,
-0.2515721321105957,
0.20949064195156097,
0.15332819521427155,
-0.11950509250164032,
0.1820375770330429,
-0.176944762468338,
0.159718856215477,
0.2982478439807892,
-0.10388447344303131,
-0.37672847509384155,
0.1588910073041916,
0.06183154881000519,
0.18615560233592987,
0.3381637930870056,
0.3027481138706207,
0.35100340843200684,
0.0028313826769590378,
-0.07175932824611664,
0.3363140821456909,
0.04287488013505936,
-0.04590236395597458,
-0.377196729183197,
-0.4258618652820587,
0.11388777941465378,
0.21614642441272736,
0.018699713051319122,
0.0835738405585289,
0.2645461857318878,
0.025289855897426605,
0.1387614905834198,
0.13089223206043243,
0.10844384133815765,
0.1359115093946457,
0.1836434304714203,
-0.25096988677978516,
-0.23596209287643433,
0.1677509844303131,
-0.5864211320877075,
-0.033072784543037415,
-0.5517922639846802,
-0.29435479640960693,
-0.14356447756290436,
-0.3622744679450989,
0.13966765999794006,
0.05309848487377167,
-0.14787966012954712,
0.17327648401260376,
0.03879757225513458,
-0.08863162994384766,
0.21170423924922943,
-0.02619774080812931,
-0.41543048620224,
-0.033096469938755035,
-0.11283852159976959,
0.002000118140131235,
-0.4649408459663391,
0.1039665937423706,
0.08355104178190231,
-0.22564278542995453,
-0.04976902902126312,
0.0020138174295425415,
-0.2528688609600067,
-0.5000702738761902,
-0.15242087841033936,
0.29057931900024414,
0.28508082032203674,
0.29951128363609314,
0.28221046924591064,
0.2653033435344696,
0.21807122230529785,
0.18823975324630737,
0.047434352338314056,
0.1773792952299118,
-0.04573392495512962,
0.07357605546712875,
-0.40500837564468384,
0.3439503610134125,
-0.24090228974819183,
-0.08493072539567947,
-0.20359183847904205,
-0.3892907202243805,
0.25160056352615356,
-0.10028884559869766,
0.0859733372926712,
-0.4930270314216614,
0.08599512279033661,
0.3708960711956024,
-0.19177217781543732,
0.019916357472538948,
0.12141282856464386,
-0.10241866856813431,
0.0037557557225227356,
-0.07824580371379852,
-0.1640658676624298,
0.36104464530944824,
0.0768098309636116,
-0.21984556317329407,
0.07044658064842224,
0.37029170989990234,
0.3388828635215759,
0.19030018150806427,
-0.22036272287368774,
-0.16752810776233673,
0.4414026141166687,
0.01768329367041588,
0.16876214742660522,
0.04626363888382912,
-0.033980950713157654,
0.344234436750412,
0.10060079395771027,
-0.001235579140484333,
-0.2634168565273285,
-0.08329115808010101,
0.10247721523046494,
0.22081126272678375,
0.261554479598999,
-0.27762168645858765,
-0.2431856244802475,
-0.40857812762260437,
0.5601937174797058,
0.34271401166915894,
0.23053526878356934,
-0.06289584189653397,
0.5425229072570801,
0.08289726823568344,
-0.46944329142570496,
0.06873063743114471,
0.03268098458647728,
0.7095778584480286,
-0.16345110535621643,
-0.14679227769374847,
-0.42665278911590576,
-0.16525216400623322,
0.1574263870716095,
-0.0002179853618144989,
0.38724780082702637,
-0.1314128041267395,
0.5233252644538879,
0.10603750497102737,
0.09480296075344086,
-0.09105242043733597,
-0.12024393677711487,
0.07959352433681488,
0.37840622663497925,
0.02716953121125698,
0.10427309572696686,
0.1606735736131668,
-0.019535917788743973,
0.05859116464853287,
-0.21745263040065765,
-0.27450671792030334,
-0.11529069393873215,
0.167218416929245,
0.12561848759651184,
0.0023228966165333986,
-0.26975440979003906,
-0.05116681009531021,
-0.1811913102865219,
-0.40721601247787476,
0.2652526795864105,
-0.0908307135105133,
0.045416366308927536,
0.10082186758518219,
0.20785166323184967,
-0.0895775631070137,
0.018045272678136826,
0.08798237890005112,
-0.07053318619728088,
-0.706108570098877,
0.11357012391090393,
-0.19569692015647888,
0.027380995452404022,
0.2443941831588745,
0.034326862543821335,
-0.03269065544009209,
0.3245285749435425,
-0.4147774577140808,
-0.05044944956898689,
0.08866620808839798,
0.16216857731342316,
-0.3129664659500122,
-0.1039423793554306,
0.16851752996444702,
0.2275390774011612,
-0.08146841078996658,
0.05715024471282959,
0.04842810705304146,
0.19117799401283264,
0.382415771484375,
0.1352139562368393,
0.11765166372060776,
0.28518038988113403,
0.20928263664245605,
0.33621782064437866,
-0.2803318500518799,
0.08804081380367279,
0.3748093843460083,
0.39838942885398865,
0.4186537265777588,
-0.22159886360168457,
0.18794521689414978,
-0.39081767201423645,
0.019648045301437378,
-0.16225898265838623,
0.12510326504707336,
0.05331643670797348,
-0.21205885708332062,
0.15563370287418365,
-0.2383016049861908,
-0.11498667299747467,
-0.08372125774621964,
0.2974502742290497,
-0.21942415833473206,
0.025799233466386795,
0.015226170420646667,
-0.2889430820941925,
-0.07832574099302292,
-0.04410715773701668,
0.16524136066436768,
0.2261781394481659,
0.43134188652038574,
-0.07598955929279327,
-0.23365697264671326,
-0.08161314576864243,
-0.16857847571372986,
0.30737921595573425,
-0.20654354989528656,
-0.161927729845047,
-0.14566299319267273,
0.0682433694601059,
0.18039588630199432,
0.23532311618328094,
0.46964210271835327,
-0.09612225741147995,
-0.0197155624628067,
-0.22198180854320526,
0.024103716015815735,
-0.1631162017583847,
0.011968076229095459,
0.02078888937830925,
0.012108976021409035,
0.10475848615169525,
0.417272686958313,
-0.2507813572883606,
-0.18217934668064117,
-0.20675547420978546,
0.5407702326774597,
-0.22915223240852356,
-0.1452028751373291,
-0.0057226307690143585,
-0.2123621106147766,
-0.5202822685241699,
0.06259274482727051,
0.09475639462471008,
-0.12366246432065964,
0.23448626697063446,
-0.33655866980552673,
-0.06005926430225372,
-0.3407362401485443,
0.055932022631168365,
0.03338188678026199,
0.5054507255554199,
-0.25198546051979065,
0.0512893907725811,
-0.17798437178134918,
0.11412405967712402,
0.4623524844646454,
0.1752742975950241,
-0.10099786520004272,
0.02745569497346878,
0.004470814019441605,
-0.39341190457344055,
0.1438112109899521,
0.15089504420757294,
-0.14859117567539215,
0.29902908205986023,
-0.2558402121067047,
0.5546311140060425,
0.029625996947288513,
-0.0601639598608017,
-0.18102020025253296,
-0.30580106377601624,
-0.01899527758359909,
-0.1649744063615799,
0.1217678040266037,
0.026150554418563843,
-0.18004381656646729,
0.45813989639282227,
-0.13039405643939972,
-0.21818380057811737,
0.520268976688385,
0.06373555958271027,
1.1716755628585815,
-0.07429675757884979,
-0.06214413419365883,
-0.23096540570259094,
-0.2570970058441162,
0.31656092405319214,
-0.6766654253005981,
0.12440213561058044,
0.07342077791690826,
-0.12433317303657532,
0.10238690674304962,
-0.016225311905145645,
0.019967693835496902,
0.22192758321762085,
-0.24784240126609802,
0.06393038481473923,
-0.30015677213668823,
-0.17652365565299988,
-0.28580930829048157,
0.3896430432796478,
-0.10068769752979279,
-0.2490496039390564,
-0.0716717541217804,
-0.017344359308481216,
0.015346534550189972,
-0.021393056958913803,
-0.22157150506973267,
-0.059590063989162445,
0.41318532824516296,
-0.0172291062772274,
0.24687407910823822,
-0.11212410032749176,
-0.2360200583934784,
0.36482322216033936,
-0.1647966057062149,
-0.06896091997623444,
-0.23242849111557007,
0.029913993552327156,
-0.17332147061824799,
0.09428171813488007,
0.1340535283088684,
-0.016353636980056763,
0.07486648857593536,
-0.01726788468658924,
-0.3920023739337921,
0.08182115107774734,
-0.054944463074207306,
-0.12539446353912354,
0.046439118683338165,
0.10123307257890701,
-0.29798388481140137,
-0.37127602100372314,
0.0831153392791748,
0.09878680855035782,
-0.151712104678154,
0.023013180121779442,
-0.28440502285957336,
-0.1307135373353958,
-0.5083085894584656,
0.08351452648639679,
0.09186810255050659,
0.33764827251434326,
-0.19567465782165527,
0.33203986287117004,
-0.1939462274312973,
-0.1492912769317627,
-0.2179480344057083,
-0.1215125247836113,
0.25115031003952026,
-0.19148558378219604,
0.178842693567276,
-0.20948870480060577,
-0.24187687039375305,
-0.43166932463645935,
-0.014950830489397049,
-0.08279595524072647,
-0.38654595613479614,
0.43023890256881714,
0.04940636456012726,
-0.23306402564048767,
0.07522769272327423,
-0.13678060472011566,
0.05797719210386276,
0.0033782050013542175,
-0.10839167982339859,
-0.15507011115550995,
-0.4857679307460785,
0.22410155832767487,
0.2175265997648239,
0.5688451528549194,
0.07881404459476471,
0.045363545417785645,
-0.11925242096185684,
0.06876397132873535,
-0.23064398765563965,
0.2507718503475189,
0.23308980464935303,
0.1651652306318283,
-0.012129168957471848,
0.2815660834312439,
0.03340741991996765,
-0.2585388422012329,
-0.09457771480083466,
0.07847540080547333,
-0.11481396853923798,
-0.1441342532634735,
-0.0973207950592041,
0.12153828144073486,
-0.09912936389446259,
-0.0808284655213356,
-0.13448281586170197,
-0.24194778501987457,
0.07781922817230225,
-0.16440699994564056,
0.21825267374515533,
-0.18387699127197266,
-0.12009531259536743,
-0.11282754689455032,
0.4099229574203491,
-0.03949055075645447,
-0.006142701953649521,
0.1524103879928589,
-0.04289036989212036,
0.3734450340270996,
-0.0446038544178009,
0.01339733973145485,
-0.06459145247936249,
-0.05919938161969185,
-0.3752081096172333,
0.07337615638971329,
0.2588772177696228,
0.10901076346635818,
-0.00039925798773765564,
0.022551748901605606,
-0.08754883706569672,
0.09660714119672775,
0.0399099700152874,
0.18271282315254211,
-0.11699149757623672,
-0.06763966381549835,
-0.023515552282333374,
0.19176428020000458,
-0.1976945996284485,
-0.19882681965827942,
-0.060872744768857956,
0.07522453367710114,
-0.21398866176605225,
0.24785968661308289,
0.4000193476676941,
0.07418791949748993,
0.13047637045383453,
0.10996336489915848,
0.3531484007835388,
-0.27663642168045044,
0.31930869817733765,
0.31046682596206665,
-0.016634173691272736,
-0.2100166529417038,
-0.17697031795978546,
0.2833026051521301,
0.11947281658649445,
-0.14271420240402222,
-0.16981053352355957,
0.38633081316947937,
0.600713849067688,
0.3873366415500641,
-0.4875272810459137,
-0.18168413639068604,
-0.263919860124588,
0.618278980255127,
-0.05144156515598297,
0.4884510636329651,
0.46629709005355835,
0.18845471739768982,
0.2922811508178711,
-0.26067429780960083,
-0.20654165744781494,
0.4309631288051605,
0.07680758833885193,
0.03764765337109566,
-0.0007755272090435028,
-0.1363188624382019,
0.1158708781003952,
0.08702056109905243,
0.14269320666790009,
0.38408833742141724,
-0.11650566756725311,
0.3271658420562744,
0.06553506851196289,
0.28887295722961426,
0.5928447842597961,
0.15780769288539886,
0.4371982514858246,
-0.15944771468639374,
-0.16556976735591888,
0.19451534748077393,
0.22015540301799774,
0.06932397186756134,
-0.05798977613449097,
-0.015621896833181381,
0.16151243448257446,
-0.31887921690940857,
-0.02127542346715927,
0.05909723788499832,
0.053390271961688995,
-0.2769361138343811,
0.47112709283828735,
0.2056371122598648,
-0.22479425370693207,
-0.059054747223854065,
0.045820944011211395,
-0.08724658191204071,
0.17573067545890808,
0.12730653584003448,
0.2065495252609253,
-0.07347148656845093,
-0.22617360949516296,
0.3755020201206207,
-0.43417707085609436,
0.02968701906502247,
-0.17757025361061096,
-0.10822473466396332,
-0.019717711955308914,
0.26287713646888733,
-0.2581291198730469,
0.05270242691040039,
-0.06550578027963638,
0.0659320056438446,
-0.18186375498771667,
0.22174721956253052,
0.18540142476558685,
-0.4435366094112396,
-0.24828079342842102,
-0.27213114500045776,
-0.26674526929855347,
-0.18070554733276367,
-0.190693661570549,
0.05151639133691788,
0.30419400334358215,
0.21051287651062012,
-0.028946101665496826,
0.24904991686344147,
0.1911310851573944,
-0.13289529085159302,
-0.056894540786743164,
0.10769273340702057,
-0.47540774941444397,
0.10722610354423523,
0.38881516456604004,
0.27825552225112915,
0.16422247886657715,
-0.37879303097724915,
-0.28443416953086853,
0.003773367963731289,
-0.01456587016582489,
-0.2515193223953247,
0.27655550837516785,
0.11542050540447235,
0.7933056354522705,
0.5852679014205933,
-0.1099349856376648,
-0.3783087730407715,
-0.09885578602552414,
-0.20238906145095825,
0.01573992520570755,
-0.12932772934436798,
0.011677823029458523,
-0.1971292495727539,
0.45067402720451355,
0.19108057022094727,
-0.2832459807395935,
0.21060137450695038,
-0.2632029056549072,
-0.22452551126480103,
-0.24308420717716217,
0.24088354408740997,
-0.28431686758995056,
0.02772495336830616,
0.02193646878004074,
0.4092617928981781,
-0.0663309171795845,
0.19950950145721436,
0.06343910843133926,
0.11378161609172821,
-0.3624655604362488,
-0.017779119312763214,
0.2839454710483551,
0.35586386919021606,
-0.31324946880340576,
0.523949146270752,
0.07520726323127747,
0.06318860501050949,
-0.013141391798853874,
-0.29039743542671204,
0.23104435205459595,
0.07785781472921371,
-0.26765742897987366,
0.04249202087521553,
0.3427079916000366,
-0.05037181079387665,
-0.07368636876344681,
0.10609228909015656,
0.2718818783760071,
0.42965251207351685,
0.020260455086827278,
-0.40444085001945496,
-0.2552903890609741
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | I think the deletion of each extracted file could be implemented in our CacheManager and ExtractManager (once merged to master: #2295, #2277). 😉 | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 23 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
I think the deletion of each extracted file could be implemented in our CacheManager and ExtractManager (once merged to master: #2295, #2277). 😉 | [
-0.02260180376470089,
-0.11210353672504425,
-0.1641407608985901,
0.16398632526397705,
-0.14083077013492584,
0.15682166814804077,
-0.19473449885845184,
0.2873060405254364,
0.23211440443992615,
0.17758825421333313,
0.09998244792222977,
0.4532555341720581,
-0.23331521451473236,
-0.10648258030414581,
-0.22852426767349243,
0.06522165238857269,
-0.21820476651191711,
0.27318108081817627,
-0.02739756554365158,
0.202579066157341,
-0.08164051175117493,
0.08623786270618439,
0.07947202026844025,
-0.1437501460313797,
0.05151190608739853,
-0.41865307092666626,
0.21561743319034576,
-0.2527051866054535,
-0.09215312451124191,
-0.39590299129486084,
0.0014369040727615356,
0.5230810642242432,
0.2234826683998108,
0.1859763264656067,
-0.0001158199374913238,
-0.05534674599766731,
0.30542683601379395,
0.08451977372169495,
-0.34730029106140137,
0.1930387318134308,
-0.18833616375923157,
-0.10024687647819519,
0.21812188625335693,
-0.14174401760101318,
0.2566111385822296,
-0.30456897616386414,
-0.19590908288955688,
-0.6068359017372131,
0.45279085636138916,
-0.23664361238479614,
0.1494678556919098,
-0.014858868904411793,
-0.5173224210739136,
0.13463419675827026,
0.30285096168518066,
0.31945210695266724,
-0.11070965975522995,
-0.04752345010638237,
0.4241870641708374,
0.07512802630662918,
0.20089936256408691,
0.37398114800453186,
-0.1134389117360115,
-0.25006404519081116,
0.3243030905723572,
-0.00998480524867773,
-0.1423211693763733,
-0.24491196870803833,
0.31422096490859985,
0.015083268284797668,
0.5898218750953674,
-0.39730754494667053,
-0.0776175856590271,
-0.28950396180152893,
0.05655963718891144,
-0.5846498012542725,
0.11072200536727905,
0.16773340106010437,
0.005849890410900116,
0.24140925705432892,
-0.14000529050827026,
-0.42986345291137695,
-0.3438483476638794,
-0.19005610048770905,
0.6732538938522339,
-0.37429261207580566,
-0.09493471682071686,
-0.14132779836654663,
0.45346787571907043,
0.14644789695739746,
0.1862225979566574,
-0.12596110999584198,
-0.28882062435150146,
0.3707070052623749,
-0.07129934430122375,
-0.20187312364578247,
-0.36891621351242065,
-0.3332549035549164,
0.23701494932174683,
0.17089638113975525,
0.4238251745700836,
0.05188488960266113,
0.2351706475019455,
0.0633942186832428,
0.2637763023376465,
0.39542263746261597,
0.08836114406585693,
-0.12768083810806274,
0.20075806975364685,
0.11122618615627289,
0.07688342034816742,
-0.05424642562866211,
0.09289399534463882,
0.0000738450326025486,
0.3071673512458801,
0.02065185084939003,
-0.07225656509399414,
-0.1556963175535202,
-0.04293624684214592,
0.07413545995950699,
0.25637689232826233,
-0.17253507673740387,
0.08697937428951263,
0.2019754946231842,
0.1532338410615921,
0.0464807003736496,
0.06329074501991272,
0.22911368310451508,
0.024084502831101418,
-0.2961387634277344,
0.08566330373287201,
0.17189384996891022,
-0.3100754916667938,
-0.26614293456077576,
0.3942469358444214,
-0.06005172058939934,
-0.03532165288925171,
-0.12831340730190277,
-0.30434656143188477,
0.039079710841178894,
0.5187658667564392,
-0.13173513114452362,
0.2679389715194702,
0.26269105076789856,
-0.1665896773338318,
-0.25993213057518005,
-0.28569290041923523,
-0.02748202532529831,
-0.15682218968868256,
0.42219507694244385,
-0.11598386615514755,
-0.24324150383472443,
-0.03909877687692642,
0.16736488044261932,
0.1655033975839615,
0.3048390746116638,
-0.4949512779712677,
0.13256148993968964,
0.15543189644813538,
0.0527002178132534,
-0.02544594556093216,
0.3915017247200012,
-0.01217079907655716,
-0.10844747722148895,
-0.30852973461151123,
0.2602825164794922,
-0.6160300970077515,
-0.07654933631420135,
-0.29436272382736206,
-0.265122652053833,
0.19346550107002258,
0.13791419565677643,
-0.06257592141628265,
0.18025852739810944,
-0.17585378885269165,
0.15688323974609375,
0.3047705888748169,
-0.10472994297742844,
-0.36682191491127014,
0.16302436590194702,
0.06689126789569855,
0.19863353669643402,
0.3475051820278168,
0.2767184376716614,
0.3986896276473999,
-0.006051409989595413,
-0.03151024878025055,
0.27651309967041016,
0.07729354500770569,
-0.06928272545337677,
-0.3465443551540375,
-0.39543434977531433,
0.01669844426214695,
0.20936083793640137,
0.041117556393146515,
0.048639118671417236,
0.2571699023246765,
0.014543051831424236,
0.16152745485305786,
0.15622912347316742,
0.15401357412338257,
0.17702151834964752,
0.1292436122894287,
-0.2629849910736084,
-0.2178771197795868,
0.12992876768112183,
-0.5425727963447571,
0.01111692190170288,
-0.5635603666305542,
-0.35784226655960083,
-0.16811920702457428,
-0.3451918959617615,
0.14465731382369995,
0.025972431525588036,
-0.15063712000846863,
0.1525575816631317,
0.12016654014587402,
-0.030617214739322662,
0.23218029737472534,
-0.05763239413499832,
-0.4141541123390198,
0.08212468773126602,
-0.07872563600540161,
0.02141168713569641,
-0.47092393040657043,
0.039850443601608276,
0.1304667592048645,
-0.22291842103004456,
-0.024755088612437248,
0.010905645787715912,
-0.27362725138664246,
-0.504494309425354,
-0.13943615555763245,
0.2698449492454529,
0.2659400403499603,
0.26945510506629944,
0.24031418561935425,
0.2347729206085205,
0.1686522513628006,
0.25293323397636414,
0.07808966934680939,
0.1655549257993698,
-0.021997526288032532,
0.05738919973373413,
-0.36924344301223755,
0.3941810727119446,
-0.1629275232553482,
-0.06804285198450089,
-0.209150031208992,
-0.39630940556526184,
0.2487938106060028,
-0.11829179525375366,
0.14941532909870148,
-0.528213620185852,
0.07540112733840942,
0.3249076306819916,
-0.09787526726722717,
0.012904658913612366,
0.12580788135528564,
-0.08437833935022354,
-0.0029911138117313385,
0.003072556108236313,
-0.08140743523836136,
0.3343491554260254,
-0.0005705356597900391,
-0.206473708152771,
0.017972977831959724,
0.39476463198661804,
0.3731958270072937,
0.1863260269165039,
-0.1443183571100235,
-0.1430865079164505,
0.46747684478759766,
-0.0077397869899868965,
0.15518486499786377,
0.03569665178656578,
0.0012496000854298472,
0.3792586326599121,
0.08274200558662415,
0.009579283185303211,
-0.26533329486846924,
-0.09086179733276367,
0.10354515165090561,
0.1854017674922943,
0.328143835067749,
-0.21570035815238953,
-0.2645326256752014,
-0.35030847787857056,
0.4957946836948395,
0.34749895334243774,
0.22671279311180115,
0.0012921905145049095,
0.5297096967697144,
0.10805830359458923,
-0.43761295080184937,
0.07942620664834976,
0.036007460206747055,
0.634299099445343,
-0.13388898968696594,
-0.1276337057352066,
-0.405132532119751,
-0.19303077459335327,
0.1563117504119873,
0.041336867958307266,
0.37005606293678284,
-0.09467481821775436,
0.49196261167526245,
0.12803086638450623,
0.10748450458049774,
-0.1013571172952652,
-0.08289659023284912,
0.09048871695995331,
0.3652797341346741,
-0.04226486384868622,
0.12500819563865662,
0.15209448337554932,
-0.019618479534983635,
0.12587015330791473,
-0.21635887026786804,
-0.3381370007991791,
-0.1388872116804123,
0.20752479135990143,
0.08520466089248657,
-0.019843772053718567,
-0.2818315625190735,
-0.021942973136901855,
-0.19018203020095825,
-0.426212877035141,
0.22398066520690918,
-0.06023332476615906,
0.07225431501865387,
0.05355638638138771,
0.15967310965061188,
-0.030491966754198074,
0.030051585286855698,
0.08891195058822632,
-0.07788316905498505,
-0.6628463864326477,
0.09835123270750046,
-0.1868421584367752,
0.0379834845662117,
0.24253633618354797,
0.04447324573993683,
0.0063197314739227295,
0.28077149391174316,
-0.3876612186431885,
-0.057343434542417526,
0.08183901011943817,
0.10494570434093475,
-0.31309252977371216,
-0.11844180524349213,
0.20262151956558228,
0.24761784076690674,
-0.12332737445831299,
-0.0007630959153175354,
0.1013074666261673,
0.23003539443016052,
0.34242135286331177,
0.10334037244319916,
0.12404344975948334,
0.3077453374862671,
0.2200436294078827,
0.3042972683906555,
-0.28093624114990234,
0.044384781271219254,
0.3332589268684387,
0.4032053053379059,
0.3957521617412567,
-0.19995900988578796,
0.23206627368927002,
-0.3902219831943512,
-0.010768383741378784,
-0.1272914707660675,
0.15311619639396667,
0.019208010286092758,
-0.23719818890094757,
0.1621902883052826,
-0.235183984041214,
-0.10763383656740189,
-0.09245730936527252,
0.3103531002998352,
-0.18960285186767578,
0.013722795993089676,
0.03372599929571152,
-0.28911927342414856,
-0.04449418932199478,
-0.028092799708247185,
0.14880575239658356,
0.16695228219032288,
0.3563661277294159,
-0.0836421325802803,
-0.26351338624954224,
-0.08785941451787949,
-0.2644629180431366,
0.33327817916870117,
-0.22235463559627533,
-0.18991076946258545,
-0.10917489975690842,
0.05860399454832077,
0.13714557886123657,
0.19426080584526062,
0.3985283374786377,
-0.09872221946716309,
-0.025950007140636444,
-0.18945439159870148,
-0.006674792617559433,
-0.15789349377155304,
0.03472113236784935,
0.014704585075378418,
0.05538957938551903,
0.06256017088890076,
0.3513261675834656,
-0.30229634046554565,
-0.20039589703083038,
-0.2519721984863281,
0.5415750741958618,
-0.26827457547187805,
-0.1403578370809555,
-0.05329620838165283,
-0.23000314831733704,
-0.5152537822723389,
0.07185165584087372,
0.024821722880005836,
-0.12059416621923447,
0.19343537092208862,
-0.3178030252456665,
-0.09704811125993729,
-0.31471171975135803,
0.035662293434143066,
0.013495197519659996,
0.5749181509017944,
-0.30809125304222107,
0.0529581718146801,
-0.1670600324869156,
0.1460404396057129,
0.46142542362213135,
0.18314498662948608,
-0.07405738532543182,
0.05674158036708832,
0.04555580019950867,
-0.3605612814426422,
0.07472778111696243,
0.13285137712955475,
-0.15213315188884735,
0.3234335482120514,
-0.23785445094108582,
0.564159631729126,
0.09268158674240112,
-0.05503557622432709,
-0.23530641198158264,
-0.2607456147670746,
-0.019143514335155487,
-0.14114929735660553,
0.08383273333311081,
0.04532778635621071,
-0.1757594794034958,
0.44834429025650024,
-0.23646943271160126,
-0.27199870347976685,
0.4784601926803589,
0.09388159960508347,
1.15234375,
-0.06309367716312408,
-0.04436081275343895,
-0.24818795919418335,
-0.28774192929267883,
0.29684609174728394,
-0.6555522680282593,
0.14335563778877258,
-0.035474345088005066,
-0.11665944755077362,
0.10456104576587677,
0.011456239968538284,
0.014401264488697052,
0.1993401050567627,
-0.25248289108276367,
0.09566671401262283,
-0.287977397441864,
-0.14062274992465973,
-0.28222760558128357,
0.38690507411956787,
-0.1198885515332222,
-0.2729753255844116,
-0.052428267896175385,
0.031132761389017105,
0.002545338124036789,
-0.08387653529644012,
-0.2410699725151062,
-0.11412139981985092,
0.4444575011730194,
-0.05005280300974846,
0.31522172689437866,
-0.09987734258174896,
-0.21775326132774353,
0.4091779589653015,
-0.17414319515228271,
-0.10874591022729874,
-0.3227093815803528,
-0.04315054789185524,
-0.17693717777729034,
0.05093785375356674,
0.17138966917991638,
-0.006379920989274979,
0.11495214700698853,
-0.032729972153902054,
-0.40300682187080383,
0.041604336351156235,
-0.11487171053886414,
-0.14889243245124817,
0.058799393475055695,
0.10789342224597931,
-0.29504677653312683,
-0.3856201171875,
0.18595165014266968,
0.1410578191280365,
-0.1611449420452118,
0.08118433505296707,
-0.24838729202747345,
-0.1064990907907486,
-0.5253578424453735,
0.09415283799171448,
0.1336238980293274,
0.3176446557044983,
-0.2119377851486206,
0.31058645248413086,
-0.1847434937953949,
-0.15752264857292175,
-0.24238242208957672,
-0.14056992530822754,
0.33649104833602905,
-0.16293294727802277,
0.21285070478916168,
-0.20560549199581146,
-0.2502361536026001,
-0.46905744075775146,
-0.027792125940322876,
-0.04766794294118881,
-0.363472580909729,
0.41304200887680054,
0.004934112075716257,
-0.22474688291549683,
0.11111700534820557,
-0.16200806200504303,
0.04598578065633774,
0.04976640269160271,
-0.16964615881443024,
-0.1416979879140854,
-0.46954038739204407,
0.23926465213298798,
0.2084292471408844,
0.5362952351570129,
0.05319412797689438,
-0.022218022495508194,
-0.15061397850513458,
0.16034641861915588,
-0.28432193398475647,
0.23701246082782745,
0.21973589062690735,
0.16887076199054718,
-0.05063919723033905,
0.2401759922504425,
0.045583583414554596,
-0.20881356298923492,
-0.05205317214131355,
0.14314046502113342,
-0.14152023196220398,
-0.20871049165725708,
-0.07090109586715698,
0.08741655200719833,
-0.15715324878692627,
-0.023114686831831932,
-0.22869765758514404,
-0.12959983944892883,
0.09588329493999481,
-0.17305679619312286,
0.26352912187576294,
-0.19058877229690552,
-0.12760087847709656,
-0.13562734425067902,
0.44365283846855164,
-0.06297320872545242,
-0.08623383939266205,
0.15292906761169434,
-0.03501211106777191,
0.3017429709434509,
-0.04383113235235214,
-0.022368893027305603,
-0.08287344872951508,
-0.06810644268989563,
-0.3027176558971405,
0.0466780960559845,
0.27493077516555786,
0.06934340298175812,
-0.014225088059902191,
-0.0127621591091156,
-0.08268721401691437,
0.1370898336172104,
0.04499103128910065,
0.2047966867685318,
-0.07489608973264694,
-0.12294882535934448,
-0.037907589226961136,
0.23747046291828156,
-0.2128140926361084,
-0.20705243945121765,
-0.07186272740364075,
0.012748712673783302,
-0.19172196090221405,
0.2789093255996704,
0.3626364767551422,
0.08865773677825928,
0.16993361711502075,
0.12532970309257507,
0.34716665744781494,
-0.28704333305358887,
0.2739582061767578,
0.21543759107589722,
0.0546477772295475,
-0.20920957624912262,
-0.06464306265115738,
0.3144548833370209,
0.14342127740383148,
-0.11452165246009827,
-0.1292230486869812,
0.39059722423553467,
0.5757666230201721,
0.3090757429599762,
-0.5367897152900696,
-0.22238312661647797,
-0.2938578128814697,
0.6234041452407837,
-0.13510888814926147,
0.44279658794403076,
0.40388262271881104,
0.1510085016489029,
0.2659569978713989,
-0.32298150658607483,
-0.21953022480010986,
0.44567254185676575,
0.04572747275233269,
0.06986857950687408,
0.07855735719203949,
-0.07747510075569153,
0.1426016390323639,
0.09141641855239868,
0.19995170831680298,
0.4314362406730652,
-0.08097925782203674,
0.31322717666625977,
0.0318869985640049,
0.2796560823917389,
0.5481153726577759,
0.18506360054016113,
0.41650572419166565,
-0.16227062046527863,
-0.1929338127374649,
0.2023344486951828,
0.2120334357023239,
0.0040212348103523254,
-0.07101453840732574,
-0.06563881039619446,
0.18741987645626068,
-0.3410090208053589,
-0.01581423729658127,
0.06780067831277847,
0.06332188099622726,
-0.3073604106903076,
0.44823768734931946,
0.23076844215393066,
-0.28878504037857056,
-0.041534848511219025,
0.08832689374685287,
-0.11801198124885559,
0.21898871660232544,
0.11878609657287598,
0.15066173672676086,
-0.05605735257267952,
-0.20428964495658875,
0.4145418703556061,
-0.42569732666015625,
0.02168171852827072,
-0.17774006724357605,
-0.20820745825767517,
-0.014102364890277386,
0.25358450412750244,
-0.2977363169193268,
0.026771757751703262,
-0.09831653535366058,
0.0933159813284874,
-0.16336482763290405,
0.27569785714149475,
0.15642167627811432,
-0.41754308342933655,
-0.23385830223560333,
-0.28696125745773315,
-0.24209019541740417,
-0.14071696996688843,
-0.23422253131866455,
0.04745528846979141,
0.2318337857723236,
0.23805101215839386,
-0.05370862036943436,
0.23276184499263763,
0.17775359749794006,
-0.1275854855775833,
-0.1051265224814415,
0.034712448716163635,
-0.552329421043396,
0.1517511010169983,
0.4012066125869751,
0.19706624746322632,
0.19633346796035767,
-0.3999384343624115,
-0.24176110327243805,
-0.02551722154021263,
0.04892142862081528,
-0.1619686633348465,
0.25410711765289307,
0.11399951577186584,
0.7210943698883057,
0.6302268505096436,
-0.09510235488414764,
-0.3539767265319824,
-0.11521773785352707,
-0.17464132606983185,
-0.004683155566453934,
-0.09540364891290665,
0.009421403519809246,
-0.2118445336818695,
0.49120935797691345,
0.23967471718788147,
-0.26306629180908203,
0.20590005815029144,
-0.24400630593299866,
-0.14438700675964355,
-0.20593038201332092,
0.19791832566261292,
-0.20805704593658447,
0.0010103220120072365,
0.04793007671833038,
0.45296162366867065,
-0.028187576681375504,
0.23035117983818054,
0.0885678306221962,
0.08757799118757248,
-0.40072453022003174,
-0.017265334725379944,
0.2634519934654236,
0.33871176838874817,
-0.34305739402770996,
0.4724915623664856,
0.12066089361906052,
0.11631502211093903,
-0.05245217680931091,
-0.227125346660614,
0.259223997592926,
0.050888705998659134,
-0.22611334919929504,
-0.0018729306757450104,
0.2962719202041626,
-0.07650947570800781,
-0.06469234079122543,
0.10924623906612396,
0.22421413660049438,
0.38441240787506104,
0.013439422473311424,
-0.431814581155777,
-0.2402963489294052
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Nevermind @thomwolf, I just mentioned the other issue so that both appear linked in GitHub and we do not forget to close both once we make the corresponding Pull Request... That was the main reason! 😄 | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 36 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Nevermind @thomwolf, I just mentioned the other issue so that both appear linked in GitHub and we do not forget to close both once we make the corresponding Pull Request... That was the main reason! 😄 | [
-0.08552773296833038,
-0.0671883374452591,
-0.1844741404056549,
0.10478697717189789,
-0.06817727535963058,
0.09409267455339432,
-0.20691703259944916,
0.35798102617263794,
0.19299161434173584,
0.18033073842525482,
0.125636026263237,
0.5178526043891907,
-0.19906547665596008,
-0.05329111963510513,
-0.2303045690059662,
0.10034619271755219,
-0.17107823491096497,
0.25079846382141113,
-0.09663653373718262,
0.17212334275245667,
-0.11822546273469925,
0.15862984955310822,
0.0584242045879364,
-0.21477986872196198,
0.04728661850094795,
-0.31169393658638,
0.2470160722732544,
-0.130671888589859,
-0.20018213987350464,
-0.333546906709671,
0.04969401657581329,
0.46657416224479675,
0.1547936350107193,
0.19245541095733643,
-0.00011205147166037932,
-0.058840394020080566,
0.3263462781906128,
0.04196365177631378,
-0.2812095880508423,
0.15788380801677704,
-0.15463362634181976,
-0.12968164682388306,
0.24625112116336823,
-0.17160215973854065,
0.1941537857055664,
-0.28602999448776245,
-0.26198726892471313,
-0.5600829720497131,
0.4046287536621094,
-0.20745596289634705,
0.21848024427890778,
0.06591933965682983,
-0.4778711795806885,
0.03866894170641899,
0.3469436466693878,
0.313068687915802,
-0.22080063819885254,
-0.024144619703292847,
0.4340989291667938,
0.021030372008681297,
0.13282333314418793,
0.42030903697013855,
-0.04279313609004021,
-0.1682278960943222,
0.3660373091697693,
-0.03185361623764038,
-0.13207665085792542,
-0.26599496603012085,
0.3651876151561737,
-0.04188840836286545,
0.6081593036651611,
-0.40394917130470276,
-0.07049670070409775,
-0.23321887850761414,
-0.0010145108681172132,
-0.5103726387023926,
0.19648268818855286,
0.13087579607963562,
-0.029424436390399933,
0.20578788220882416,
-0.21564526855945587,
-0.33208757638931274,
-0.2986851930618286,
-0.22750221192836761,
0.5624459981918335,
-0.3171727955341339,
-0.0931842252612114,
-0.1442534327507019,
0.46278518438339233,
0.11779114603996277,
0.16542170941829681,
-0.04384075105190277,
-0.3093244433403015,
0.28318849205970764,
-0.08998985588550568,
-0.22045207023620605,
-0.21628519892692566,
-0.3502410352230072,
0.2751035690307617,
0.21590855717658997,
0.3916679918766022,
0.035079099237918854,
0.19524827599525452,
-0.06963052600622177,
0.27034348249435425,
0.4323020577430725,
0.04222043976187706,
-0.13065092265605927,
0.26715123653411865,
0.05668635293841362,
0.07128919661045074,
0.01436401903629303,
0.1246163547039032,
-0.027785498648881912,
0.20985761284828186,
-0.03530878201127052,
-0.02236059308052063,
-0.2735995352268219,
-0.0027615688741207123,
0.07690326124429703,
0.29915353655815125,
-0.11166388541460037,
0.04727569967508316,
0.25071707367897034,
0.21069058775901794,
0.10886001586914062,
0.05727767199277878,
0.25734972953796387,
-0.007382383570075035,
-0.2515539824962616,
0.03862687572836876,
0.1590309888124466,
-0.34530436992645264,
-0.20713503658771515,
0.3635469377040863,
0.016520675271749496,
0.044597283005714417,
-0.08718322962522507,
-0.2391289919614792,
0.095771923661232,
0.47681093215942383,
-0.05259097367525101,
0.1936008334159851,
0.32825547456741333,
-0.12140780687332153,
-0.19680950045585632,
-0.24860911071300507,
-0.03909924626350403,
-0.12420908361673355,
0.376486212015152,
-0.14884012937545776,
-0.2738036513328552,
-0.07598227262496948,
0.21675075590610504,
0.1099698543548584,
0.2422163188457489,
-0.5487087965011597,
0.11655817925930023,
0.1360514909029007,
0.042357321828603745,
0.0025533586740493774,
0.38911569118499756,
0.007782716304063797,
-0.1569080650806427,
-0.27080848813056946,
0.18428334593772888,
-0.6277379393577576,
0.018134385347366333,
-0.24190784990787506,
-0.18491901457309723,
0.2255014330148697,
0.24005216360092163,
-0.1519254446029663,
0.12502260506153107,
-0.1377110481262207,
0.1953275054693222,
0.2903514504432678,
-0.13761106133460999,
-0.4272359311580658,
0.16460783779621124,
0.011630386114120483,
0.12677468359470367,
0.3082723021507263,
0.19194395840168,
0.36406922340393066,
0.019980983808636665,
-0.005991578102111816,
0.2740211486816406,
0.04541614651679993,
-0.008872225880622864,
-0.44721904397010803,
-0.40306612849235535,
0.018170861527323723,
0.20657020807266235,
0.043548833578825,
-0.004268750548362732,
0.2280380129814148,
-0.045446187257766724,
0.14474229514598846,
0.025209862738847733,
0.11020027846097946,
0.1990106701850891,
0.16364386677742004,
-0.3638191819190979,
-0.16709397733211517,
0.10511698573827744,
-0.5550236701965332,
0.026747994124889374,
-0.5376005172729492,
-0.25356581807136536,
-0.15530242025852203,
-0.33772778511047363,
0.11387919634580612,
-0.017806190997362137,
-0.13681302964687347,
0.09948703646659851,
0.1636173576116562,
-0.05052804946899414,
0.21016624569892883,
-0.11344312131404877,
-0.3678581416606903,
-0.0459861159324646,
-0.0555349662899971,
-0.017163937911391258,
-0.4335532486438751,
0.0670199766755104,
0.07132412493228912,
-0.2523716390132904,
0.07253514230251312,
-0.011652268469333649,
-0.18548855185508728,
-0.4729955196380615,
-0.15386325120925903,
0.26038333773612976,
0.24507802724838257,
0.29219692945480347,
0.28770554065704346,
0.2621397078037262,
0.21281376481056213,
0.20982971787452698,
0.13724446296691895,
0.1424439400434494,
-0.01592753827571869,
0.059455402195453644,
-0.4149564504623413,
0.39453810453414917,
-0.15297050774097443,
-0.05917228013277054,
-0.15091493725776672,
-0.3506006896495819,
0.290330171585083,
-0.14018447697162628,
0.04752659052610397,
-0.45435935258865356,
0.10199470818042755,
0.31083735823631287,
-0.11021468043327332,
0.015106515027582645,
0.07892642915248871,
0.04020630940794945,
0.10060793161392212,
-0.04016394913196564,
-0.139970600605011,
0.3669394254684448,
0.055462099611759186,
-0.28063222765922546,
0.06649579852819443,
0.3567683696746826,
0.37911391258239746,
0.21070238947868347,
-0.19492924213409424,
-0.19077366590499878,
0.35975876450538635,
-0.01840151660144329,
0.20914418995380402,
0.02218404784798622,
0.029099825769662857,
0.34127992391586304,
0.12374958395957947,
-0.026617802679538727,
-0.29555544257164,
-0.10011595487594604,
0.07769379019737244,
0.23164121806621552,
0.24728691577911377,
-0.28162938356399536,
-0.24299423396587372,
-0.3020983338356018,
0.5641663074493408,
0.3144172132015228,
0.22227312624454498,
-0.07187692821025848,
0.5412743091583252,
0.0934952050447464,
-0.5482691526412964,
0.12951606512069702,
0.061964649707078934,
0.6242780089378357,
-0.1175667867064476,
-0.0005489848554134369,
-0.39890891313552856,
-0.2547471523284912,
0.13614560663700104,
0.08734266459941864,
0.3191331624984741,
-0.08648619055747986,
0.4921013116836548,
0.03618967533111572,
0.08332352340221405,
-0.1482580453157425,
-0.1364152431488037,
0.09518983215093613,
0.28647297620773315,
-0.035788871347904205,
0.11291329562664032,
0.1283290684223175,
0.001989319920539856,
0.06898929178714752,
-0.14435870945453644,
-0.3590824604034424,
-0.15671399235725403,
0.17789018154144287,
0.05167547985911369,
-0.14595362544059753,
-0.34835463762283325,
-0.13757938146591187,
-0.11672955006361008,
-0.4708239436149597,
0.28618916869163513,
-0.004263490438461304,
0.058068811893463135,
0.10668104141950607,
0.18718846142292023,
-0.010237238369882107,
0.10183840990066528,
0.051530562341213226,
-0.1312522292137146,
-0.645632803440094,
0.16300001740455627,
-0.24192211031913757,
-0.10737864673137665,
0.2100313901901245,
0.08453936129808426,
0.06748597323894501,
0.24125641584396362,
-0.4375689625740051,
-0.04720255732536316,
-0.014671975746750832,
0.16061937808990479,
-0.20703241229057312,
-0.11852705478668213,
0.1915569007396698,
0.2598811388015747,
-0.20311200618743896,
-0.03333570808172226,
0.030755113810300827,
0.2139245569705963,
0.31519046425819397,
0.11255669593811035,
0.059974055737257004,
0.28921177983283997,
0.1651335507631302,
0.36261385679244995,
-0.3334106206893921,
0.0752129852771759,
0.3752727806568146,
0.3635936379432678,
0.44553473591804504,
-0.274126261472702,
0.20365533232688904,
-0.3434276580810547,
-0.017896294593811035,
-0.0921311229467392,
0.1906609833240509,
0.06591618061065674,
-0.27662962675094604,
0.14961080253124237,
-0.22674135863780975,
-0.04684632271528244,
-0.09855391085147858,
0.3262544870376587,
-0.20884904265403748,
-0.09147720783948898,
0.06213502958416939,
-0.20484882593154907,
-0.06888449192047119,
0.006367922760546207,
0.18377313017845154,
0.10838839411735535,
0.2688835859298706,
-0.13042905926704407,
-0.2644745707511902,
-0.039400387555360794,
-0.2572125792503357,
0.28510481119155884,
-0.2717999517917633,
-0.21928614377975464,
-0.1319359689950943,
-0.017209727317094803,
0.1451883614063263,
0.13104982674121857,
0.41792142391204834,
-0.14094436168670654,
-0.10061217844486237,
-0.1882832944393158,
0.012589260935783386,
-0.22018687427043915,
0.018931318074464798,
-0.036356162279844284,
0.10790199041366577,
0.13140985369682312,
0.3927898705005646,
-0.2881762683391571,
-0.20880132913589478,
-0.22045817971229553,
0.45836004614830017,
-0.20307311415672302,
-0.09956680983304977,
-0.035675227642059326,
-0.26757490634918213,
-0.5211293697357178,
0.08275766670703888,
0.13852837681770325,
-0.11202987283468246,
0.14951005578041077,
-0.2988815903663635,
-0.01960618607699871,
-0.33071985840797424,
0.049219463020563126,
0.10103769600391388,
0.5875726342201233,
-0.2887619435787201,
0.09519046545028687,
-0.20156270265579224,
0.18223392963409424,
0.4474596679210663,
0.29023128747940063,
-0.09353932738304138,
0.10954247415065765,
0.08886662870645523,
-0.3233519494533539,
0.02589065581560135,
0.16844232380390167,
-0.11674283444881439,
0.23019090294837952,
-0.24753311276435852,
0.6316035389900208,
0.06192602217197418,
-0.1011543869972229,
-0.15818969905376434,
-0.29539555311203003,
0.03682631254196167,
-0.11686786264181137,
0.144199937582016,
0.0038702674210071564,
-0.15173909068107605,
0.49749353528022766,
-0.17422668635845184,
-0.2369040846824646,
0.5581259727478027,
0.11188775300979614,
1.1223021745681763,
0.06624560803174973,
-0.00821012631058693,
-0.11594117432832718,
-0.3521796464920044,
0.25676167011260986,
-0.6527990698814392,
0.09199023246765137,
0.012415427714586258,
-0.13667885959148407,
0.14952491223812103,
-0.007631130516529083,
-0.05051868408918381,
0.17213931679725647,
-0.3216419816017151,
0.04343380779027939,
-0.24369491636753082,
-0.1264188140630722,
-0.3005655109882355,
0.39729198813438416,
-0.08812090754508972,
-0.30367279052734375,
-0.13684995472431183,
0.06959020346403122,
0.09616464376449585,
-0.10275262594223022,
-0.2141229510307312,
-0.1129530668258667,
0.3157939314842224,
-0.08421821892261505,
0.20024816691875458,
-0.0531652495265007,
-0.17646044492721558,
0.3988566994667053,
-0.17001941800117493,
-0.0771731361746788,
-0.26304203271865845,
-0.08888231217861176,
-0.12113218009471893,
0.0884738564491272,
0.01521007064729929,
0.05394882708787918,
0.11296048760414124,
0.09238441288471222,
-0.35023319721221924,
-0.026247568428516388,
-0.06316253542900085,
-0.19011127948760986,
0.04500921815633774,
0.038484588265419006,
-0.3371969163417816,
-0.2730948328971863,
0.12757760286331177,
0.13418155908584595,
-0.1687285453081131,
-0.003963338676840067,
-0.20656637847423553,
-0.0774887353181839,
-0.5094297528266907,
0.01376272365450859,
0.18160562217235565,
0.28552818298339844,
-0.1449529528617859,
0.3495640158653259,
-0.07684136927127838,
-0.2227313369512558,
-0.27390187978744507,
-0.056163154542446136,
0.3547874689102173,
-0.09188786149024963,
0.14979764819145203,
-0.16595977544784546,
-0.28155118227005005,
-0.4964163899421692,
-0.07264403253793716,
0.022501232102513313,
-0.431398868560791,
0.45400071144104004,
-0.002281341003254056,
-0.311653733253479,
0.11540870368480682,
-0.06609080731868744,
0.13808660209178925,
0.037206295877695084,
-0.1806195229291916,
-0.09118246287107468,
-0.47339484095573425,
0.2555477023124695,
0.15065637230873108,
0.5617166757583618,
0.0009451247751712799,
-0.00164877250790596,
-0.07332862913608551,
0.18513144552707672,
-0.34371644258499146,
0.18667107820510864,
0.14187569916248322,
0.1569518744945526,
-0.0738392099738121,
0.15225516259670258,
0.0887032076716423,
-0.1735324263572693,
0.0005618836730718613,
0.11840922385454178,
-0.18257877230644226,
-0.24245214462280273,
-0.036061931401491165,
0.08901439607143402,
-0.15983331203460693,
-0.08232608437538147,
-0.11708622425794601,
-0.10314187407493591,
-0.0009935032576322556,
-0.15497489273548126,
0.30166229605674744,
-0.1995357871055603,
-0.06857012212276459,
-0.21739795804023743,
0.4563750922679901,
-0.09549642354249954,
0.017429765313863754,
0.16717807948589325,
-0.03978995233774185,
0.3143783211708069,
-0.05145661160349846,
0.014695823192596436,
-0.09666024893522263,
-0.1061326339840889,
-0.21365979313850403,
0.0702316090464592,
0.2113620638847351,
0.11381368339061737,
-0.009303584694862366,
0.009166061878204346,
-0.115338534116745,
0.13311028480529785,
0.11078517138957977,
0.2708089053630829,
-0.08258817344903946,
-0.15676651895046234,
-0.032938964664936066,
0.3032124638557434,
-0.20506872236728668,
-0.19601325690746307,
-0.10919950902462006,
0.008195765316486359,
-0.16488951444625854,
0.18214432895183563,
0.3783397972583771,
0.011259347200393677,
0.2039264589548111,
0.18902882933616638,
0.3733145594596863,
-0.292995810508728,
0.2233545333147049,
0.09373903274536133,
-0.05710737407207489,
-0.23700715601444244,
-0.08507755398750305,
0.24107462167739868,
0.14417138695716858,
-0.05541134625673294,
-0.15221598744392395,
0.31871575117111206,
0.5666558742523193,
0.33260348439216614,
-0.4247440993785858,
-0.09829407930374146,
-0.19804316759109497,
0.5276713967323303,
-0.12083925306797028,
0.4313074052333832,
0.4194302260875702,
0.11996611952781677,
0.26244544982910156,
-0.3267875611782074,
-0.2990856170654297,
0.4584271013736725,
0.0017612501978874207,
0.013881541788578033,
0.027894310653209686,
-0.18515953421592712,
0.15031540393829346,
0.08225327730178833,
0.14632561802864075,
0.42367202043533325,
0.005089722573757172,
0.2698335647583008,
0.03951016813516617,
0.22514696419239044,
0.5589661598205566,
0.1303587257862091,
0.4065192639827728,
-0.14258860051631927,
-0.0419805571436882,
0.2612919807434082,
0.222058966755867,
0.005021970719099045,
0.002629907801747322,
0.15770776569843292,
0.26277589797973633,
-0.3247098922729492,
-0.030076395720243454,
0.1915379911661148,
0.004753341898322105,
-0.3440207540988922,
0.46571633219718933,
0.26511073112487793,
-0.22768224775791168,
0.024503160268068314,
0.15113233029842377,
-0.20070989429950714,
0.19505374133586884,
0.09904864430427551,
0.13870619237422943,
-0.014525407925248146,
-0.2503450810909271,
0.35740745067596436,
-0.4714490473270416,
0.04335024952888489,
-0.22809633612632751,
-0.24726611375808716,
-0.0754450187087059,
0.17681550979614258,
-0.28443443775177,
0.0725034773349762,
-0.10673247277736664,
0.1258525848388672,
-0.1753312200307846,
0.3727460205554962,
0.10643136501312256,
-0.4275985658168793,
-0.24818482995033264,
-0.30173468589782715,
-0.2549426555633545,
-0.09554877132177353,
-0.20056511461734772,
0.04579359292984009,
0.20846353471279144,
0.3400157690048218,
-0.045929230749607086,
0.15530620515346527,
0.282234251499176,
-0.12575934827327728,
-0.11817612498998642,
0.04544566944241524,
-0.6027141809463501,
0.2640288770198822,
0.3624565005302429,
0.21310456097126007,
0.22419306635856628,
-0.38736435770988464,
-0.2172861546278,
0.03569319099187851,
0.09042153507471085,
-0.23749200999736786,
0.23517754673957825,
0.13612869381904602,
0.6803228855133057,
0.5626965761184692,
-0.0797039046883583,
-0.32143381237983704,
-0.18048927187919617,
-0.2506408989429474,
-0.1027364432811737,
-0.1903570294380188,
0.014654607512056828,
-0.16617810726165771,
0.5049529075622559,
0.2326376736164093,
-0.19656246900558472,
0.09622062742710114,
-0.23316630721092224,
-0.12894198298454285,
-0.19134676456451416,
0.2648504078388214,
-0.17442587018013,
0.08594702184200287,
0.05704817920923233,
0.3812097907066345,
-0.1171637549996376,
0.18152156472206116,
0.07427271455526352,
0.10074223577976227,
-0.3683781623840332,
-0.12657177448272705,
0.3467051386833191,
0.2702934443950653,
-0.34618014097213745,
0.5040476322174072,
0.10222350060939789,
0.06730341166257858,
-0.09444504976272583,
-0.3364170491695404,
0.21338042616844177,
0.023565880954265594,
-0.1767968237400055,
-0.00018722191452980042,
0.3356524109840393,
-0.09552285075187683,
-0.05872740596532822,
0.06713071465492249,
0.2493179440498352,
0.3315475881099701,
-0.08112671226263046,
-0.3822198808193207,
-0.28657013177871704
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Ok yes. I think this is an important feature to be able to use large datasets which are pretty much always compressed files.
In particular now this requires to keep the extracted file on the drive if you want to avoid reprocessing the dataset so in my case, this require using always ~400GB of drive instead of just 200GB (which is already significant).
Two nice features would be to:
- allow to delete the extracted files without loosing the ability to load the dataset from the cached arrow-file
- streamlined decompression when only the currently read file is extracted - this might require to read the list of files from the extracted archives before processing them? | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 116 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Ok yes. I think this is an important feature to be able to use large datasets which are pretty much always compressed files.
In particular now this requires to keep the extracted file on the drive if you want to avoid reprocessing the dataset so in my case, this require using always ~400GB of drive instead of just 200GB (which is already significant).
Two nice features would be to:
- allow to delete the extracted files without loosing the ability to load the dataset from the cached arrow-file
- streamlined decompression when only the currently read file is extracted - this might require to read the list of files from the extracted archives before processing them? | [
-0.06597884744405746,
-0.0675048679113388,
-0.1214437186717987,
0.13619405031204224,
-0.1881696581840515,
0.2371560037136078,
-0.16013000905513763,
0.24732784926891327,
0.16247132420539856,
0.15841087698936462,
0.10431898385286331,
0.44837677478790283,
-0.30285346508026123,
-0.10580552369356155,
-0.1939978301525116,
-0.03911262005567551,
-0.18083590269088745,
0.301862895488739,
0.06003051623702049,
0.1913313865661621,
-0.14811521768569946,
-0.05452173203229904,
0.021462559700012207,
-0.12868963181972504,
0.11615531146526337,
-0.42013072967529297,
0.20555534958839417,
-0.23629552125930786,
-0.0982234999537468,
-0.3271234929561615,
-0.00777408666908741,
0.5414355397224426,
0.33001574873924255,
0.1635194569826126,
-0.00012168643297627568,
0.0521237850189209,
0.28179770708084106,
0.06432454288005829,
-0.44947120547294617,
0.14464136958122253,
-0.3190247714519501,
-0.18726365268230438,
0.14483976364135742,
-0.16058018803596497,
0.27584314346313477,
-0.5139073133468628,
-0.1515798270702362,
-0.7546899318695068,
0.4762699007987976,
-0.20399104058742523,
0.07530742138624191,
-0.004946283996105194,
-0.5496508479118347,
0.15623623132705688,
0.31247201561927795,
0.3418084383010864,
-0.1361890733242035,
-0.0434948168694973,
0.49675801396369934,
0.1190328449010849,
0.2489931285381317,
0.3314891457557678,
-0.04649230092763901,
-0.3507285416126251,
0.3594217896461487,
-0.0695534348487854,
-0.07357408851385117,
-0.2807365655899048,
0.2501985728740692,
0.062279026955366135,
0.6185548305511475,
-0.29497861862182617,
-0.17888376116752625,
-0.3965516984462738,
0.09390325844287872,
-0.6207106113433838,
-0.0016173720359802246,
0.24568812549114227,
0.013516046106815338,
0.31003427505493164,
-0.09905556589365005,
-0.43966054916381836,
-0.38945892453193665,
-0.1128680557012558,
0.6326627731323242,
-0.4742104709148407,
-0.07410325109958649,
-0.11111662536859512,
0.5121363997459412,
0.18672528862953186,
0.2198595553636551,
-0.19674357771873474,
-0.21677091717720032,
0.3942319452762604,
-0.08308742940425873,
-0.1818787157535553,
-0.37051013112068176,
-0.2833351790904999,
0.18886920809745789,
0.14147740602493286,
0.42014047503471375,
-0.04349342733621597,
0.17956708371639252,
0.08539150655269623,
0.28400036692619324,
0.39246034622192383,
-0.01701957732439041,
-0.10819385200738907,
0.16415998339653015,
0.10968439280986786,
0.18371911346912384,
-0.06346887350082397,
0.04517955332994461,
-0.062221113592386246,
0.16862119734287262,
0.10199946910142899,
-0.09058895707130432,
-0.11006786674261093,
-0.03997476398944855,
0.04463570564985275,
0.07130774855613708,
-0.20954255759716034,
0.09905906766653061,
0.17989742755889893,
0.23382656276226044,
0.07128863036632538,
0.08952076733112335,
0.2898358702659607,
0.04636818915605545,
-0.3151601254940033,
0.11107882857322693,
0.07670433819293976,
-0.3082769513130188,
-0.24432145059108734,
0.4048580229282379,
-0.1130666583776474,
-0.05293560028076172,
-0.1779990941286087,
-0.2501620054244995,
0.08876296877861023,
0.515902042388916,
-0.15522749722003937,
0.3246419131755829,
0.23602455854415894,
-0.2288743406534195,
-0.25145789980888367,
-0.2872160077095032,
-0.014499817043542862,
-0.17151236534118652,
0.5403384566307068,
-0.13087892532348633,
-0.273629754781723,
-0.011904513463377953,
0.08275243639945984,
0.07786791026592255,
0.2827015519142151,
-0.5317147374153137,
0.23508299887180328,
0.0539899617433548,
-0.04681830108165741,
-0.041092611849308014,
0.33516889810562134,
-0.015607152134180069,
-0.01356955524533987,
-0.347605437040329,
0.2468971461057663,
-0.6518740653991699,
-0.06022709980607033,
-0.3570016622543335,
-0.237094908952713,
0.1824227273464203,
0.11429634690284729,
-0.1536516696214676,
0.1675509214401245,
-0.18183627724647522,
0.10571697354316711,
0.3822946846485138,
-0.06416705250740051,
-0.38674652576446533,
0.19539211690425873,
0.10777091979980469,
0.2615789473056793,
0.3133721649646759,
0.21503227949142456,
0.41475293040275574,
-0.07295368611812592,
-0.09576736390590668,
0.27998340129852295,
0.0771864578127861,
-0.09694249927997589,
-0.29890114068984985,
-0.46227869391441345,
0.0986720621585846,
0.24797631800174713,
0.021134668961167336,
0.12906348705291748,
0.2614651322364807,
-0.03573174774646759,
0.20370325446128845,
0.16515228152275085,
0.22094117105007172,
0.14003130793571472,
0.06426309794187546,
-0.2695464491844177,
-0.1503099501132965,
0.1737479865550995,
-0.4975172281265259,
0.012630883604288101,
-0.5214078426361084,
-0.31724482774734497,
-0.20453764498233795,
-0.2885700464248657,
0.1372271478176117,
-0.03350451588630676,
-0.19882531464099884,
0.20152252912521362,
0.023784954100847244,
-0.14128078520298004,
0.27245551347732544,
0.06531988084316254,
-0.41017064452171326,
-0.06578118354082108,
-0.0675787404179573,
-0.05952226370573044,
-0.4646088182926178,
0.12049275636672974,
0.15674634277820587,
-0.14072689414024353,
-0.12659096717834473,
0.05243666470050812,
-0.3225055932998657,
-0.4410727322101593,
-0.15056931972503662,
0.1877078413963318,
0.20102548599243164,
0.2613532543182373,
0.16141828894615173,
0.32752397656440735,
0.2161501795053482,
0.14286258816719055,
0.173959881067276,
0.13869331777095795,
0.02979041263461113,
0.09586457163095474,
-0.3868558406829834,
0.4077587127685547,
-0.32795602083206177,
-0.025380238890647888,
-0.19282063841819763,
-0.4176356792449951,
0.2501660883426666,
-0.1081964373588562,
0.03018580935895443,
-0.5059494972229004,
0.07320879399776459,
0.34958380460739136,
-0.09041765332221985,
-0.02619188092648983,
0.14831601083278656,
-0.2089318335056305,
-0.018065381795167923,
-0.07656592130661011,
-0.2578068673610687,
0.3139602839946747,
-0.09848848730325699,
-0.12047364562749863,
0.10992550849914551,
0.45663073658943176,
0.3945101499557495,
0.21345455944538116,
-0.1338796466588974,
-0.18257954716682434,
0.501558780670166,
0.016986127942800522,
0.13197380304336548,
0.056771568953990936,
0.06116919219493866,
0.4169520437717438,
0.1301811933517456,
0.07144194841384888,
-0.21482285857200623,
-0.12605687975883484,
0.17610909044742584,
0.1470308154821396,
0.2887785732746124,
-0.14003941416740417,
-0.20875680446624756,
-0.4624941647052765,
0.4350055754184723,
0.38458359241485596,
0.2519322335720062,
-0.006583475507795811,
0.5214502811431885,
0.007745120674371719,
-0.3969195485115051,
0.05999693274497986,
-0.0019935481250286102,
0.7599343061447144,
-0.09310390055179596,
-0.30559685826301575,
-0.4187728762626648,
-0.197709858417511,
0.18832439184188843,
0.0038352683186531067,
0.3493974208831787,
-0.17901861667633057,
0.47960197925567627,
0.21437376737594604,
0.047968387603759766,
-0.08091401308774948,
-0.0552876740694046,
0.08498094975948334,
0.3521830439567566,
-0.04784499853849411,
0.03502122312784195,
0.14568884670734406,
0.08630190789699554,
0.09378979355096817,
-0.17337064445018768,
-0.21019048988819122,
-0.1256006360054016,
0.10749351978302002,
0.12088502198457718,
0.09522752463817596,
-0.2698006331920624,
0.042623989284038544,
-0.2468218356370926,
-0.4235397279262543,
0.30913037061691284,
-0.05132896080613136,
-0.06899310648441315,
0.15832649171352386,
0.23417054116725922,
-0.04457612335681915,
0.057584233582019806,
0.06800099462270737,
-0.03361913934350014,
-0.6436611413955688,
0.1269380748271942,
-0.19446071982383728,
0.0436173751950264,
0.08085903525352478,
-0.06316886097192764,
-0.07405634224414825,
0.4198179244995117,
-0.37694650888442993,
0.03516876697540283,
0.06432482600212097,
0.1337394416332245,
-0.29881468415260315,
-0.08062883466482162,
0.20376554131507874,
0.2121613323688507,
-0.01761225238442421,
-0.010585874319076538,
0.14545676112174988,
0.2049529254436493,
0.37933605909347534,
0.14576061069965363,
0.19179695844650269,
0.2467256784439087,
0.21695935726165771,
0.4157979488372803,
-0.25783637166023254,
-0.0076827965676784515,
0.3150099515914917,
0.39198562502861023,
0.44852957129478455,
-0.1432017683982849,
0.19770239293575287,
-0.33463919162750244,
-0.01016119122505188,
-0.1489812135696411,
0.06697456538677216,
0.026199202984571457,
-0.27768445014953613,
0.14526823163032532,
-0.20312243700027466,
-0.05048508569598198,
-0.11471952497959137,
0.28537899255752563,
-0.29610520601272583,
0.11132955551147461,
0.029748309403657913,
-0.2856218218803406,
-0.06092553213238716,
-0.06043179705739021,
0.17402897775173187,
0.1901511549949646,
0.5275208950042725,
-0.05491114407777786,
-0.1452023983001709,
-0.03288005292415619,
-0.16762235760688782,
0.27328911423683167,
-0.17261861264705658,
-0.19989098608493805,
0.035664256662130356,
-0.012007491663098335,
0.09214960783720016,
0.23882509768009186,
0.35155245661735535,
-0.12520965933799744,
-0.030797079205513,
-0.15207374095916748,
0.04300674796104431,
-0.2111055701971054,
0.01376613974571228,
0.008030854165554047,
0.020717483013868332,
0.008940767496824265,
0.44952890276908875,
-0.26231515407562256,
-0.14193624258041382,
-0.232568621635437,
0.5902498960494995,
-0.2365604043006897,
-0.1827661544084549,
-0.0008264258503913879,
-0.1295434832572937,
-0.5585114359855652,
0.005739539861679077,
0.043273843824863434,
-0.10352855175733566,
0.0979592576622963,
-0.26685425639152527,
-0.19030702114105225,
-0.24984142184257507,
0.08967277407646179,
0.02027323469519615,
0.4588962197303772,
-0.2742724120616913,
0.05620255693793297,
-0.03503313660621643,
0.23896707594394684,
0.5481042861938477,
0.21424256265163422,
-0.14730222523212433,
-0.058522433042526245,
0.026267124339938164,
-0.3692213296890259,
0.1674475520849228,
0.1663956642150879,
-0.2425576001405716,
0.325441837310791,
-0.22777703404426575,
0.4670632481575012,
-0.06896830350160599,
0.06520454585552216,
-0.25908589363098145,
-0.25053849816322327,
-0.05719810351729393,
-0.20396584272384644,
0.19116994738578796,
0.05414038524031639,
-0.20987239480018616,
0.43510961532592773,
-0.12059171497821808,
-0.25727108120918274,
0.5326520204544067,
0.059078678488731384,
1.1551052331924438,
-0.11283989250659943,
0.014977376908063889,
-0.26804080605506897,
-0.17977675795555115,
0.37282657623291016,
-0.6633313298225403,
0.18162734806537628,
0.014957543462514877,
-0.1384880691766739,
0.059305958449840546,
-0.03762855380773544,
0.03766865283250809,
0.2846592664718628,
-0.22821956872940063,
0.059017784893512726,
-0.20256899297237396,
-0.28046005964279175,
-0.2769898772239685,
0.39813607931137085,
-0.07361718267202377,
-0.2576676309108734,
-0.05926872789859772,
-0.03604419529438019,
0.05962073430418968,
-0.05741071328520775,
-0.21115028858184814,
-0.10651658475399017,
0.376834899187088,
0.028975538909435272,
0.27763473987579346,
-0.17108866572380066,
-0.32079315185546875,
0.37308651208877563,
-0.21182894706726074,
-0.2551981806755066,
-0.10242016613483429,
0.0718899518251419,
-0.2685132622718811,
0.05033373460173607,
0.14716339111328125,
-0.0070661455392837524,
0.090349942445755,
-0.0627790316939354,
-0.3701254725456238,
0.03449586406350136,
-0.0024113785475492477,
-0.07829464226961136,
0.09779063612222672,
0.13365879654884338,
-0.33973705768585205,
-0.34654200077056885,
0.1758272647857666,
0.13666187226772308,
-0.12443071603775024,
0.05645769461989403,
-0.29807063937187195,
-0.0924467146396637,
-0.48418325185775757,
0.14099057018756866,
0.058678872883319855,
0.300280898809433,
-0.14333555102348328,
0.2562093436717987,
-0.19350051879882812,
-0.11901775002479553,
-0.1494343876838684,
-0.1528203785419464,
0.1490320861339569,
-0.20141233503818512,
0.2311079055070877,
-0.25531068444252014,
-0.2430460900068283,
-0.38028624653816223,
-0.0017050765454769135,
-0.14410288631916046,
-0.38900384306907654,
0.4247317612171173,
0.03931774944067001,
-0.16467119753360748,
0.05666395649313927,
-0.16595080494880676,
0.002174846827983856,
0.005637496709823608,
-0.06999170780181885,
-0.16726607084274292,
-0.459288090467453,
0.25871407985687256,
0.13622504472732544,
0.5790667533874512,
0.08899425715208054,
0.0018236069008708,
-0.19067969918251038,
0.03037179633975029,
-0.21412284672260284,
0.31212249398231506,
0.3379599153995514,
0.1776241660118103,
0.026968471705913544,
0.27746647596359253,
0.04031739756464958,
-0.23742082715034485,
-0.11227697134017944,
0.10826931148767471,
-0.042461562901735306,
-0.12655378878116608,
-0.1338110864162445,
0.1278323233127594,
-0.10390842705965042,
-0.11733247339725494,
-0.15632717311382294,
-0.2644065022468567,
0.02924494817852974,
-0.20146679878234863,
0.25277888774871826,
-0.25299498438835144,
-0.12736725807189941,
-0.13154061138629913,
0.3878418207168579,
-0.05597890168428421,
-0.15237264335155487,
0.1996949166059494,
-0.03712383657693863,
0.4207250475883484,
0.01259453222155571,
0.10740365833044052,
-0.07901383191347122,
-0.05573006719350815,
-0.393859326839447,
0.08159896731376648,
0.3363562226295471,
0.09103257954120636,
0.14534659683704376,
0.00982740893959999,
-0.03466133400797844,
0.11173243820667267,
0.05705449730157852,
0.20794989168643951,
-0.1051374152302742,
-0.05906234681606293,
0.023487690836191177,
0.15832173824310303,
-0.21244654059410095,
-0.10635741055011749,
-0.04757792130112648,
-0.007340031675994396,
-0.16043005883693695,
0.25049179792404175,
0.36052119731903076,
0.08016571402549744,
-0.017550669610500336,
0.041823774576187134,
0.3067474961280823,
-0.12815995514392853,
0.3053993284702301,
0.3543407618999481,
0.11227256059646606,
-0.19181321561336517,
-0.16343806684017181,
0.331218957901001,
0.18813256919384003,
-0.1521894633769989,
-0.17444920539855957,
0.40831634402275085,
0.6499546766281128,
0.3493705093860626,
-0.5603495240211487,
-0.27893391251564026,
-0.23835517466068268,
0.623247504234314,
-0.059078022837638855,
0.4289214015007019,
0.3845158815383911,
0.21221065521240234,
0.3161065876483917,
-0.13665200769901276,
-0.1427980661392212,
0.39825984835624695,
0.09055924415588379,
0.03552135080099106,
0.08935660123825073,
-0.18091116845607758,
0.10884565114974976,
0.06977683305740356,
0.13558708131313324,
0.37126272916793823,
-0.15991133451461792,
0.3642851710319519,
0.16240936517715454,
0.26025447249412537,
0.5718256831169128,
0.20839381217956543,
0.46636420488357544,
-0.15894752740859985,
-0.22220651805400848,
0.2036527395248413,
0.24285246431827545,
0.11754454672336578,
-0.14864425361156464,
-0.057664018124341965,
0.11165595054626465,
-0.34513604640960693,
-0.039750877767801285,
0.02430231124162674,
0.08403828740119934,
-0.25720304250717163,
0.4885832667350769,
0.2748905122280121,
-0.18983228504657745,
0.06644153594970703,
0.004417195916175842,
-0.0531424842774868,
0.12792004644870758,
0.10668573528528214,
0.21259158849716187,
-0.13473357260227203,
-0.23573464155197144,
0.3795193135738373,
-0.40408894419670105,
0.009247638285160065,
-0.1563638150691986,
-0.01641145348548889,
0.02939356118440628,
0.32022252678871155,
-0.2720816433429718,
0.07905962318181992,
-0.003983708098530769,
0.046587057411670685,
-0.22350506484508514,
0.2113468497991562,
0.2501467168331146,
-0.3231537938117981,
-0.27145954966545105,
-0.2597002387046814,
-0.19678014516830444,
-0.212723046541214,
-0.2271251678466797,
0.07632961124181747,
0.16946256160736084,
0.25538673996925354,
0.06601215153932571,
0.25661230087280273,
0.06949296593666077,
-0.10095703601837158,
0.06154294312000275,
0.06529175490140915,
-0.44694283604621887,
0.04307004436850548,
0.3881985545158386,
0.24351228773593903,
0.1337822675704956,
-0.4015812873840332,
-0.3996720314025879,
-0.0001543872058391571,
-0.021937768906354904,
-0.18887536227703094,
0.20177960395812988,
0.04502158984541893,
0.6890190839767456,
0.6287792325019836,
-0.11400434374809265,
-0.3001963198184967,
-0.05391528457403183,
-0.22842390835285187,
-0.011897902935743332,
-0.08300997316837311,
0.013651452027261257,
-0.1953004002571106,
0.44236698746681213,
0.193467378616333,
-0.35213977098464966,
0.2612170875072479,
-0.2566979229450226,
-0.290436327457428,
-0.18764474987983704,
0.1607293039560318,
-0.3335026800632477,
-0.0664428099989891,
0.01909707486629486,
0.4339578449726105,
-0.02291237562894821,
0.20966455340385437,
0.08175591379404068,
0.08185359090566635,
-0.33819425106048584,
0.05306842923164368,
0.30169183015823364,
0.31271684169769287,
-0.27461332082748413,
0.5506635904312134,
0.0493570938706398,
0.08168256282806396,
0.07999949902296066,
-0.25681692361831665,
0.2503434717655182,
0.1334230750799179,
-0.3104122579097748,
0.02690204232931137,
0.22445768117904663,
0.029676342383027077,
-0.0604562982916832,
0.05018157884478569,
0.22973796725273132,
0.4168800711631775,
0.06957145780324936,
-0.45290717482566833,
-0.2204631268978119
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Note that I'm confirming that with the current master branch of dataset, deleting extracted files (without deleting the arrow cache file) lead to **re-extracting** these files when reloading the dataset instead of directly loading the arrow cache file. | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 38 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Note that I'm confirming that with the current master branch of dataset, deleting extracted files (without deleting the arrow cache file) lead to **re-extracting** these files when reloading the dataset instead of directly loading the arrow cache file. | [
-0.16383515298366547,
0.03803035616874695,
-0.14476849138736725,
0.1780925691127777,
-0.15926988422870636,
0.23571425676345825,
-0.1746572107076645,
0.2873370349407196,
0.12659180164337158,
0.15852275490760803,
0.06744377315044403,
0.5160760283470154,
-0.22754168510437012,
-0.06908741593360901,
-0.20187127590179443,
0.06880123913288116,
-0.24983826279640198,
0.2992706298828125,
-0.12158364057540894,
0.14755681157112122,
-0.15092453360557556,
0.02095167338848114,
0.06885431706905365,
-0.1775144785642624,
-0.0016517206095159054,
-0.3966255784034729,
0.22042599320411682,
-0.2167356014251709,
-0.13470004498958588,
-0.4136340320110321,
0.06340052932500839,
0.5557299256324768,
0.26556819677352905,
0.18643289804458618,
-0.00011691272084135562,
-0.011352818459272385,
0.29782527685165405,
0.1052255779504776,
-0.4620431959629059,
0.19280141592025757,
-0.2715248167514801,
-0.11854841560125351,
0.27215349674224854,
-0.11764451861381531,
0.23779603838920593,
-0.4201449751853943,
-0.2090124785900116,
-0.6489424705505371,
0.4792971611022949,
-0.1898254156112671,
0.14784659445285797,
0.032926302403211594,
-0.5153900384902954,
0.06158933416008949,
0.257277250289917,
0.3319452404975891,
-0.09819288551807404,
0.0039394814521074295,
0.3674488961696625,
0.08879191428422928,
0.17937368154525757,
0.37152042984962463,
-0.03400155529379845,
-0.22617311775684357,
0.36559149622917175,
-0.016139328479766846,
-0.17322635650634766,
-0.2317010462284088,
0.30979305505752563,
0.04438235983252525,
0.6939405202865601,
-0.4388226270675659,
-0.1589530110359192,
-0.3909517824649811,
0.14216557145118713,
-0.5054191946983337,
0.11756287515163422,
0.18172046542167664,
0.011459548026323318,
0.2422340363264084,
-0.14760692417621613,
-0.4430018365383148,
-0.3262474834918976,
-0.19662095606327057,
0.5953682661056519,
-0.4200972020626068,
-0.08782051503658295,
-0.12669384479522705,
0.4859713912010193,
0.08394195139408112,
0.22520211338996887,
-0.17928598821163177,
-0.3020443320274353,
0.3221309185028076,
-0.10049477219581604,
-0.19479018449783325,
-0.33180397748947144,
-0.2837395966053009,
0.16330844163894653,
0.19714385271072388,
0.3921894133090973,
0.015577823854982853,
0.15899084508419037,
-0.0024579130113124847,
0.36501196026802063,
0.3253180980682373,
0.056748829782009125,
-0.015444690361618996,
0.1955098956823349,
0.12192869186401367,
0.09446635842323303,
-0.06264052540063858,
0.05644196271896362,
-0.03616938367486,
0.30555838346481323,
-0.022461384534835815,
0.032076045870780945,
-0.16437232494354248,
-0.07733641564846039,
0.06615515053272247,
0.19198063015937805,
-0.18181030452251434,
0.051408518105745316,
0.19190439581871033,
0.19456204771995544,
0.1084139421582222,
0.012029819190502167,
0.23961462080478668,
0.032586246728897095,
-0.37295863032341003,
0.06241585686802864,
0.08423805236816406,
-0.31524667143821716,
-0.21676981449127197,
0.42512020468711853,
-0.06925250589847565,
-0.06774357706308365,
-0.0776427760720253,
-0.3325960636138916,
0.12386777997016907,
0.5096793174743652,
-0.09293796122074127,
0.2749292552471161,
0.3011271357536316,
-0.1944488137960434,
-0.21141968667507172,
-0.28873300552368164,
0.011574618518352509,
-0.14620570838451385,
0.47187256813049316,
-0.08362645655870438,
-0.2405284196138382,
-0.0792883113026619,
0.15828877687454224,
0.09983466565608978,
0.2539302110671997,
-0.6136040687561035,
0.10326462984085083,
0.10204178094863892,
0.06290711462497711,
0.006415694952011108,
0.27274346351623535,
-0.010928850620985031,
-0.07116566598415375,
-0.25002819299697876,
0.2974752187728882,
-0.7026975750923157,
-0.015114475041627884,
-0.3810773491859436,
-0.26154211163520813,
0.14419856667518616,
0.13600216805934906,
-0.11409950256347656,
0.2153523862361908,
-0.19310930371284485,
0.15850993990898132,
0.28107213973999023,
-0.12776361405849457,
-0.4494960308074951,
0.13856419920921326,
0.03167164325714111,
0.22164523601531982,
0.2527037262916565,
0.259944885969162,
0.40641990303993225,
-0.005348734091967344,
-0.07470564544200897,
0.2618269622325897,
0.007222490385174751,
-0.08188848942518234,
-0.310149610042572,
-0.37168601155281067,
0.009132688865065575,
0.29029518365859985,
-0.046423379331827164,
0.0333966501057148,
0.24577376246452332,
-0.011613759212195873,
0.1760636270046234,
0.13778865337371826,
0.17655639350414276,
0.15648892521858215,
0.11293697357177734,
-0.2869834303855896,
-0.2430572509765625,
0.11736273020505905,
-0.6472290754318237,
0.051557570695877075,
-0.4302785098552704,
-0.3367316424846649,
-0.2597639560699463,
-0.4017214775085449,
0.10697979480028152,
0.0003130771219730377,
-0.22545988857746124,
0.19226491451263428,
0.0904281809926033,
-0.045862630009651184,
0.1582464575767517,
-0.06656241416931152,
-0.3913014233112335,
0.04698821157217026,
-0.06503864377737045,
0.020746953785419464,
-0.47979462146759033,
0.06953058391809464,
0.17147426307201385,
-0.22552216053009033,
0.03000568598508835,
0.037717219442129135,
-0.3066352903842926,
-0.4373163878917694,
-0.1367698311805725,
0.2760285437107086,
0.26771506667137146,
0.2772713899612427,
0.2583811283111572,
0.22322304546833038,
0.1723564863204956,
0.15177971124649048,
0.0993087962269783,
0.14391805231571198,
-0.019358083605766296,
0.10480644553899765,
-0.44821956753730774,
0.38629448413848877,
-0.1830083280801773,
-0.028417028486728668,
-0.1669946312904358,
-0.34873753786087036,
0.2705666720867157,
-0.08068433403968811,
0.09486530721187592,
-0.6014312505722046,
-0.036736395210027695,
0.3301694691181183,
-0.058925047516822815,
0.07945623248815536,
0.09068258106708527,
0.02664317935705185,
0.061290521174669266,
-0.04236626625061035,
-0.11621522158384323,
0.3406755030155182,
-0.06976146250963211,
-0.21004095673561096,
0.11707595735788345,
0.4911104142665863,
0.3566943407058716,
0.2214135378599167,
-0.08467186987400055,
-0.13095726072788239,
0.44060271978378296,
0.004432640969753265,
0.14526832103729248,
0.040674906224012375,
0.08575809746980667,
0.3085532784461975,
0.09131480753421783,
-0.011007285676896572,
-0.2508102059364319,
-0.06625554710626602,
0.10402114689350128,
0.2441476583480835,
0.23360317945480347,
-0.2658804655075073,
-0.33044958114624023,
-0.38185977935791016,
0.4872902035713196,
0.33268022537231445,
0.2534184157848358,
-0.04122104123234749,
0.4535219073295593,
0.1211717277765274,
-0.4766841232776642,
0.12499238550662994,
-0.06676468253135681,
0.6247702240943909,
-0.10102950781583786,
-0.20495912432670593,
-0.3821294903755188,
-0.21683964133262634,
0.12663882970809937,
0.05643134191632271,
0.39073076844215393,
-0.06460010260343552,
0.49733129143714905,
0.11805083602666855,
0.13144081830978394,
-0.16481363773345947,
-0.004127934575080872,
0.08187626302242279,
0.31104087829589844,
-0.057107217609882355,
0.13391846418380737,
0.14532965421676636,
-0.06765101104974747,
0.12356492877006531,
-0.2136646956205368,
-0.30394551157951355,
-0.15679749846458435,
0.1779378354549408,
0.06375180184841156,
-0.004493513610213995,
-0.24458745121955872,
-0.11159192770719528,
-0.16384413838386536,
-0.4349410831928253,
0.267432302236557,
-0.051096782088279724,
0.023929279297590256,
0.10862645506858826,
0.17426535487174988,
-0.01750444993376732,
-0.0008388045243918896,
0.009125184267759323,
-0.07489142566919327,
-0.5851706266403198,
0.16504009068012238,
-0.21321912109851837,
0.023018822073936462,
0.2357921302318573,
0.03746342286467552,
0.025158356875181198,
0.3056427836418152,
-0.4097907543182373,
0.027888134121894836,
-0.06115809082984924,
0.17914855480194092,
-0.290641725063324,
-0.1186671257019043,
0.20300522446632385,
0.25512558221817017,
-0.12128258496522903,
0.034108661115169525,
0.1248953640460968,
0.27558279037475586,
0.3200300633907318,
0.03232743591070175,
0.03424137830734253,
0.28591588139533997,
0.16407828032970428,
0.3512730002403259,
-0.1879606544971466,
0.05121592804789543,
0.299366295337677,
0.36904215812683105,
0.48385706543922424,
-0.256412148475647,
0.24886706471443176,
-0.3840301036834717,
0.019996732473373413,
-0.04048941656947136,
0.15241661667823792,
0.04078522324562073,
-0.14639264345169067,
0.21615657210350037,
-0.23632872104644775,
-0.0881395936012268,
-0.17929673194885254,
0.27316486835479736,
-0.28892815113067627,
0.04020825773477554,
0.08009634912014008,
-0.26846686005592346,
-0.018503505736589432,
-0.023389363661408424,
0.15335172414779663,
0.07738439738750458,
0.38780486583709717,
-0.0952337384223938,
-0.2750808596611023,
-0.026789916679263115,
-0.26552683115005493,
0.30231794714927673,
-0.24603115022182465,
-0.13320395350456238,
-0.04756627604365349,
0.005439352244138718,
0.14726683497428894,
0.24686117470264435,
0.3770071864128113,
-0.1615939438343048,
0.0034669190645217896,
-0.13444940745830536,
0.049362920224666595,
-0.3254888653755188,
0.03855408355593681,
-0.011381175369024277,
0.06590603291988373,
-0.024817533791065216,
0.318622887134552,
-0.2891429662704468,
-0.20058196783065796,
-0.1354067474603653,
0.565841555595398,
-0.24586927890777588,
-0.08191537111997604,
0.004275187849998474,
-0.22070658206939697,
-0.48492926359176636,
0.07907763868570328,
0.026117773726582527,
-0.11660300195217133,
0.14590463042259216,
-0.2863048017024994,
-0.12784956395626068,
-0.29632771015167236,
0.08318495750427246,
0.09186990559101105,
0.598414421081543,
-0.20507171750068665,
0.16364316642284393,
-0.0610128715634346,
0.1400483250617981,
0.6094433665275574,
0.3160099983215332,
-0.10910642147064209,
-0.008836314082145691,
0.03451859951019287,
-0.3696351945400238,
0.14171180129051208,
0.11273740231990814,
-0.18668203055858612,
0.256353497505188,
-0.1997176557779312,
0.5040172934532166,
0.009394720196723938,
0.002710076980292797,
-0.24886730313301086,
-0.28397223353385925,
-0.06844066828489304,
-0.2279612272977829,
0.10805018246173859,
0.042394619435071945,
-0.15456175804138184,
0.4536227285861969,
-0.10007332265377045,
-0.23695339262485504,
0.4782823920249939,
0.11140184104442596,
1.0490742921829224,
-0.07758325338363647,
0.035616450011730194,
-0.1609680950641632,
-0.2834872603416443,
0.3261195719242096,
-0.559850811958313,
0.0843033418059349,
0.012318771332502365,
-0.12019184231758118,
0.11320130527019501,
-0.03430642932653427,
-0.002378605306148529,
0.277234822511673,
-0.23475074768066406,
0.07955526560544968,
-0.3114003539085388,
-0.12003448605537415,
-0.24714742600917816,
0.43069010972976685,
-0.13019847869873047,
-0.28822144865989685,
-0.07622969895601273,
0.03502216190099716,
0.0873173177242279,
-0.18881946802139282,
-0.21895164251327515,
-0.0781412199139595,
0.38358962535858154,
-0.03891541436314583,
0.23994876444339752,
-0.08207418024539948,
-0.25561442971229553,
0.36344772577285767,
-0.19746093451976776,
-0.13240621984004974,
-0.15016229450702667,
0.0025842376053333282,
-0.16743646562099457,
0.048540908843278885,
0.12681788206100464,
0.07211752980947495,
0.07881353795528412,
0.010212279856204987,
-0.3229551911354065,
0.017608080059289932,
-0.08162373304367065,
-0.12787142395973206,
0.005740635097026825,
0.0871279239654541,
-0.2665800452232361,
-0.3794736862182617,
0.2276148796081543,
0.1466221958398819,
-0.15347622334957123,
0.01737339422106743,
-0.25477614998817444,
-0.125576451420784,
-0.47910982370376587,
0.04894109442830086,
0.12537117302417755,
0.2693440616130829,
-0.12796398997306824,
0.28543680906295776,
-0.17087991535663605,
-0.20496141910552979,
-0.22086314857006073,
-0.11515644937753677,
0.2870613932609558,
-0.10199763625860214,
0.3308948576450348,
-0.15263231098651886,
-0.19449467957019806,
-0.4860874116420746,
0.006278291344642639,
0.08983670920133591,
-0.43113359808921814,
0.4288212060928345,
0.008331921882927418,
-0.1597498059272766,
0.13438750803470612,
-0.07853366434574127,
-0.004922740161418915,
-0.00238027423620224,
-0.1550840437412262,
-0.11795604228973389,
-0.47711673378944397,
0.2584299147129059,
0.16686706244945526,
0.5414478182792664,
0.051760271191596985,
-0.04771794006228447,
-0.15015824139118195,
0.124898761510849,
-0.2867146134376526,
0.20424310863018036,
0.25243139266967773,
0.16709333658218384,
-0.056289829313755035,
0.3051934838294983,
0.11983437836170197,
-0.3132944703102112,
-0.051785603165626526,
0.06298147141933441,
-0.13107264041900635,
-0.20620891451835632,
-0.079700767993927,
0.08791946619749069,
-0.1630656123161316,
-0.08994977176189423,
-0.17486795783042908,
-0.17788125574588776,
0.028861908242106438,
-0.21043480932712555,
0.27034881711006165,
-0.19277963042259216,
-0.1530979722738266,
-0.15478633344173431,
0.44222739338874817,
-0.09786073118448257,
-0.12741337716579437,
0.1500854194164276,
-0.046530723571777344,
0.30003345012664795,
-0.0446944423019886,
0.062179096043109894,
-0.08254943042993546,
-0.08361382782459259,
-0.22505080699920654,
0.1014934629201889,
0.2650090157985687,
0.07711559534072876,
-0.019549362361431122,
-0.027510225772857666,
-0.12506642937660217,
0.15177710354328156,
0.13582274317741394,
0.26904207468032837,
-0.04627782851457596,
-0.17909207940101624,
-0.03917447850108147,
0.23563095927238464,
-0.234113872051239,
-0.1392619013786316,
-0.025732561945915222,
0.05467071756720543,
-0.17031949758529663,
0.24598203599452972,
0.338591605424881,
0.0634865015745163,
0.05670873075723648,
0.13113832473754883,
0.26759451627731323,
-0.2423131912946701,
0.38431140780448914,
0.36347195506095886,
0.07470303773880005,
-0.24427296221256256,
-0.06529891490936279,
0.31883639097213745,
0.16028082370758057,
0.037858929485082626,
-0.10421539098024368,
0.417553186416626,
0.6066238880157471,
0.3013850748538971,
-0.4863903224468231,
-0.3089408278465271,
-0.20991338789463043,
0.5793691873550415,
-0.0945495218038559,
0.4008532762527466,
0.44044235348701477,
0.16705231368541718,
0.32271960377693176,
-0.3564125895500183,
-0.2688569128513336,
0.367848664522171,
0.05679929628968239,
0.056950535625219345,
0.03248557448387146,
-0.11354275792837143,
0.15987077355384827,
0.12404613196849823,
0.10776431858539581,
0.33576083183288574,
-0.06218598783016205,
0.2875964641571045,
0.09811611473560333,
0.15082120895385742,
0.5758999586105347,
0.173801451921463,
0.36414408683776855,
-0.136581152677536,
-0.15990278124809265,
0.19969797134399414,
0.2128983736038208,
0.08413867652416229,
-0.03698500990867615,
-0.015507075935602188,
0.15016299486160278,
-0.32227036356925964,
0.06045275181531906,
0.06881390511989594,
0.0356951504945755,
-0.2824091911315918,
0.4310353398323059,
0.21985802054405212,
-0.2790068984031677,
0.012440236285328865,
0.10588325560092926,
-0.09512777626514435,
0.16213703155517578,
0.09952349960803986,
0.18848291039466858,
-0.06826377660036087,
-0.20394235849380493,
0.3901362121105194,
-0.4440835416316986,
0.06192187964916229,
-0.13760143518447876,
-0.09181144833564758,
-0.049572065472602844,
0.35887354612350464,
-0.3027019500732422,
0.006712090224027634,
-0.14203952252864838,
0.09058665484189987,
-0.19460952281951904,
0.34902429580688477,
0.18697088956832886,
-0.33954861760139465,
-0.21268044412136078,
-0.31546562910079956,
-0.33789360523223877,
-0.18929174542427063,
-0.26758304238319397,
0.01379549689590931,
0.26983240246772766,
0.26742279529571533,
-0.019810043275356293,
0.22800354659557343,
0.26776862144470215,
-0.048059772700071335,
-0.10250723361968994,
0.02511746808886528,
-0.5011223554611206,
0.12118230760097504,
0.32261961698532104,
0.21139873564243317,
0.13018658757209778,
-0.4562161862850189,
-0.21588261425495148,
-0.013516183942556381,
0.007538355886936188,
-0.14071133732795715,
0.21233099699020386,
0.13694743812084198,
0.6466155052185059,
0.6635482311248779,
-0.0839911475777626,
-0.3119259476661682,
-0.07297781109809875,
-0.1753682792186737,
-0.11988548934459686,
-0.147124782204628,
-0.07379572838544846,
-0.10964039713144302,
0.4317798614501953,
0.29412439465522766,
-0.29699182510375977,
0.25748082995414734,
-0.2406548112630844,
-0.20889097452163696,
-0.1787061095237732,
0.24331237375736237,
-0.2513645589351654,
0.05997427552938461,
0.046966515481472015,
0.4676735997200012,
-0.05154716968536377,
0.18821385502815247,
0.07399431616067886,
0.11811281740665436,
-0.357902467250824,
-0.0601620227098465,
0.3388683795928955,
0.2894139587879181,
-0.34980547428131104,
0.4524701237678528,
0.14525465667247772,
0.09759236872196198,
-0.13752935826778412,
-0.2947254776954651,
0.25656193494796753,
0.10068778693675995,
-0.21679243445396423,
-0.02597098983824253,
0.24208873510360718,
-0.04881324619054794,
-0.028710929676890373,
0.0757225900888443,
0.39282622933387756,
0.3239247798919678,
-0.07213786989450455,
-0.405116468667984,
-0.28326237201690674
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | Hi ! That's weird, it doesn't do that on my side (tested on master on my laptop by deleting the `extracted` folder in the download cache directory). You tested with one of the files at https://huggingface.co/datasets/thomwolf/github-python that you have locally ? | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 41 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
Hi ! That's weird, it doesn't do that on my side (tested on master on my laptop by deleting the `extracted` folder in the download cache directory). You tested with one of the files at https://huggingface.co/datasets/thomwolf/github-python that you have locally ? | [
-0.0332573726773262,
-0.0617310106754303,
-0.15180495381355286,
0.23214028775691986,
-0.07944207638502121,
0.18995392322540283,
-0.15191936492919922,
0.3226887583732605,
0.2679445445537567,
0.18591156601905823,
-0.008661424741148949,
0.4785897135734558,
-0.20648208260536194,
0.019821105524897575,
-0.12495580315589905,
0.019379422068595886,
-0.261220246553421,
0.26731106638908386,
-0.03528285026550293,
0.10239529609680176,
-0.16498136520385742,
0.16154815256595612,
0.030712127685546875,
-0.21431635320186615,
-0.0014292111154645681,
-0.2806628942489624,
0.1773870885372162,
-0.09008292108774185,
-0.23682166635990143,
-0.41202592849731445,
0.09119482338428497,
0.45860517024993896,
0.2278512716293335,
0.28420841693878174,
-0.00011894121416844428,
0.020276211202144623,
0.3218187093734741,
0.06642712652683258,
-0.3416104018688202,
0.09655553102493286,
-0.10906340181827545,
-0.2528342604637146,
0.33651697635650635,
-0.23950788378715515,
0.1118236854672432,
-0.27658092975616455,
-0.2922462224960327,
-0.5912129878997803,
0.5315217971801758,
-0.0952567607164383,
0.1267586052417755,
0.14667128026485443,
-0.35595840215682983,
0.2192574441432953,
0.27476370334625244,
0.21668103337287903,
-0.09886474162340164,
0.05372831970453262,
0.3152771592140198,
0.06759986281394958,
0.2849494516849518,
0.39096930623054504,
-0.1213170513510704,
-0.10548678040504456,
0.3051477372646332,
0.05371417850255966,
-0.16517683863639832,
-0.44982752203941345,
0.26314252614974976,
-0.031178534030914307,
0.5653123259544373,
-0.496991366147995,
-0.21954190731048584,
-0.39770758152008057,
0.020580969750881195,
-0.6025552153587341,
0.07928942143917084,
0.3545745015144348,
-0.08755350112915039,
0.23048879206180573,
-0.2468704879283905,
-0.38599032163619995,
-0.30758965015411377,
-0.08355291187763214,
0.4763801395893097,
-0.26208481192588806,
-0.18241126835346222,
-0.10666344314813614,
0.4677398204803467,
0.17958204448223114,
0.04245295003056526,
-0.22894620895385742,
-0.2521286904811859,
0.3555213212966919,
-0.12741200625896454,
-0.22249604761600494,
-0.2088654339313507,
-0.3137003481388092,
0.23071157932281494,
0.26990625262260437,
0.2709539234638214,
0.015721702948212624,
0.10453342646360397,
-0.030552037060260773,
0.3759334981441498,
0.4152933359146118,
-0.06111455708742142,
0.1297471970319748,
0.3189994692802429,
0.10175918787717819,
0.049483466893434525,
-0.07571466267108917,
0.10971616953611374,
-0.024488598108291626,
0.31628701090812683,
-0.17408838868141174,
0.17497551441192627,
-0.15314960479736328,
-0.09122297912836075,
0.16153812408447266,
0.13619914650917053,
-0.1264776885509491,
0.04332127794623375,
0.2908787131309509,
0.03046594187617302,
0.087058424949646,
0.06710808724164963,
0.32099300622940063,
-0.05610102415084839,
-0.16051515936851501,
0.0770602747797966,
0.17351692914962769,
-0.2492254227399826,
-0.2693280577659607,
0.4215797483921051,
-0.1249043196439743,
0.08871488273143768,
-0.04357241839170456,
-0.21626262366771698,
-0.04131433367729187,
0.5175769329071045,
-0.1195729672908783,
0.34117668867111206,
0.4210417568683624,
-0.07458817958831787,
-0.11498506367206573,
-0.17227904498577118,
-0.16577371954917908,
-0.1743793785572052,
0.46092531085014343,
-0.14981156587600708,
-0.23878361284732819,
-0.12822310626506805,
0.15674126148223877,
-0.0032489150762557983,
0.2452874332666397,
-0.6246504783630371,
0.0005449317395687103,
0.15193265676498413,
0.21350672841072083,
0.08486150950193405,
0.22636178135871887,
0.04966117814183235,
-0.1697266399860382,
-0.15711760520935059,
0.3347269296646118,
-0.466812402009964,
-0.033384911715984344,
-0.20986990630626678,
-0.1474110335111618,
0.18472826480865479,
0.2946442663669586,
-0.09122621268033981,
0.24073046445846558,
-0.2020544707775116,
0.11876368522644043,
0.33514562249183655,
-0.250532865524292,
-0.5275449752807617,
0.22019855678081512,
0.06431712210178375,
0.3103691339492798,
0.2630608379840851,
0.23854437470436096,
0.3052229881286621,
0.0946832224726677,
0.040031008422374725,
0.3342136740684509,
0.04026561602950096,
0.05798596888780594,
-0.4034211337566376,
-0.29490089416503906,
0.044560037553310394,
0.24695564806461334,
-0.04131882265210152,
0.10118476301431656,
0.1281721591949463,
-0.10587123036384583,
0.30768391489982605,
0.041146859526634216,
0.13623367249965668,
0.2670242190361023,
0.17707903683185577,
-0.2603800892829895,
-0.1623837947845459,
0.018359586596488953,
-0.4770283102989197,
0.09452248364686966,
-0.40801286697387695,
-0.26341643929481506,
-0.3683609366416931,
-0.3869248628616333,
0.004312384873628616,
0.08109349012374878,
-0.34231284260749817,
0.06193657964468002,
0.05870988219976425,
-0.16310401260852814,
0.3893432915210724,
0.002706095576286316,
-0.34600207209587097,
0.1510159820318222,
0.020282315090298653,
0.10224340856075287,
-0.49060338735580444,
0.19226829707622528,
0.18864236772060394,
-0.25181740522384644,
-0.04091336578130722,
-0.015228688716888428,
-0.24884295463562012,
-0.46050214767456055,
-0.15496855974197388,
0.24935385584831238,
0.29993751645088196,
0.1253160536289215,
0.20679843425750732,
0.2235664576292038,
0.16702298820018768,
0.21811386942863464,
0.1772170215845108,
0.22225438058376312,
0.061759233474731445,
0.10059864073991776,
-0.2781880795955658,
0.44789111614227295,
-0.18853743374347687,
-0.029127202928066254,
-0.14883282780647278,
-0.37662091851234436,
0.302179753780365,
-0.0755830779671669,
-0.054107263684272766,
-0.47026100754737854,
-0.03024594858288765,
0.3676838278770447,
-0.001634698361158371,
-0.020219555124640465,
-0.02539195865392685,
-0.04728352278470993,
0.15453843772411346,
-0.04993956908583641,
-0.1253127157688141,
0.40555423498153687,
-0.1499510109424591,
-0.19621539115905762,
-0.014080176129937172,
0.4155000150203705,
0.4606255888938904,
0.15917468070983887,
-0.0678066611289978,
-0.017316831275820732,
0.37356796860694885,
0.0155714713037014,
0.19843456149101257,
0.07100780308246613,
-0.04625795781612396,
0.31296035647392273,
0.2086464762687683,
-0.03255577012896538,
-0.25692835450172424,
0.020821496844291687,
-0.030083339661359787,
0.29177653789520264,
0.18798162043094635,
-0.09842083603143692,
-0.3195217251777649,
-0.3765307366847992,
0.40938493609428406,
0.18575474619865417,
0.1845465451478958,
-0.11933162808418274,
0.398658812046051,
0.18073886632919312,
-0.3674200475215912,
0.0814925953745842,
0.03442349657416344,
0.3880394697189331,
-0.0016941651701927185,
-0.31067484617233276,
-0.2539876699447632,
-0.14662913978099823,
0.18870550394058228,
-0.0019917692989110947,
0.26630330085754395,
-0.16141816973686218,
0.5131770968437195,
-0.022254426032304764,
-0.005792520008981228,
-0.17050613462924957,
0.020988695323467255,
0.08563986420631409,
0.2487105429172516,
0.06926649063825607,
0.11285555362701416,
0.24188891053199768,
0.019284628331661224,
0.16073673963546753,
-0.09564770758152008,
-0.28837403655052185,
-0.13499028980731964,
0.1901530623435974,
0.13943181931972504,
0.02591967023909092,
-0.2716071903705597,
-0.10412488132715225,
-0.2724410593509674,
-0.4422227144241333,
0.35005897283554077,
0.15261980891227722,
0.09991258382797241,
0.17439758777618408,
0.2171633541584015,
-0.025562405586242676,
0.1482318937778473,
0.0802660584449768,
-0.12247971445322037,
-0.6555262804031372,
0.22020268440246582,
-0.23324710130691528,
-0.04623996093869209,
0.31758248805999756,
0.03875485807657242,
0.0010783039033412933,
0.2596186399459839,
-0.4103813171386719,
-0.15558019280433655,
-0.193201944231987,
0.24532181024551392,
-0.1802005171775818,
0.13677218556404114,
0.17678305506706238,
0.14481548964977264,
-0.07559169083833694,
0.039244674146175385,
0.04607829824090004,
0.10476307570934296,
0.3434075117111206,
-0.004457354545593262,
0.10572610050439835,
0.3205355703830719,
0.11073678731918335,
0.47765058279037476,
-0.0486314631998539,
0.08833827078342438,
0.40712952613830566,
0.2520940601825714,
0.49202656745910645,
-0.33740460872650146,
0.12588275969028473,
-0.4846435487270355,
-0.09348566830158234,
-0.08548806607723236,
0.1300487220287323,
0.15596437454223633,
-0.15210357308387756,
0.13951003551483154,
-0.2521052360534668,
-0.16738460958003998,
-0.1934487372636795,
0.26682770252227783,
-0.23442554473876953,
-0.02599158138036728,
0.0939272791147232,
-0.16950161755084991,
-0.08371813595294952,
-0.07947950065135956,
0.02418387681245804,
0.13828612864017487,
0.28045812249183655,
-0.06284814327955246,
-0.17513582110404968,
-0.1319059133529663,
-0.4479261040687561,
0.3159879744052887,
-0.23350439965724945,
-0.2515755593776703,
0.11238934099674225,
-0.0193624384701252,
0.2216554880142212,
0.13527660071849823,
0.41837799549102783,
-0.14904896914958954,
-0.09666363894939423,
-0.07559198141098022,
-0.11375410109758377,
-0.3181278109550476,
0.002689529210329056,
-0.02132180519402027,
0.18507921695709229,
0.06184105947613716,
0.2871915102005005,
-0.27887022495269775,
-0.25357264280319214,
-0.10043814778327942,
0.6766913533210754,
-0.2556501626968384,
-0.06285460293292999,
-0.23580770194530487,
-0.4080512523651123,
-0.6040328741073608,
0.0970640704035759,
0.1638946384191513,
-0.10489074885845184,
0.07506819069385529,
-0.25104963779449463,
-0.06948119401931763,
-0.30547308921813965,
0.02717532217502594,
0.061597902327775955,
0.6772764325141907,
-0.26999279856681824,
0.18345515429973602,
-0.12313444912433624,
0.09921595454216003,
0.4116414189338684,
0.4825188219547272,
-0.06741027534008026,
-0.03673814237117767,
-0.019238263368606567,
-0.2285836637020111,
0.0878264531493187,
0.18019866943359375,
-0.1216646209359169,
0.20071010291576385,
-0.3159458637237549,
0.6137966513633728,
-0.025559961795806885,
-0.027834339067339897,
-0.0738731250166893,
-0.24620991945266724,
-0.1315942108631134,
-0.37582919001579285,
0.12421654164791107,
0.01242697611451149,
-0.08102154731750488,
0.473664253950119,
-0.15424844622612,
-0.22749240696430206,
0.4616502523422241,
-0.07324288040399551,
1.1378891468048096,
-0.05731304734945297,
0.12181234359741211,
-0.05174277722835541,
-0.31845027208328247,
0.33690589666366577,
-0.65982985496521,
0.15848852694034576,
-0.11123187094926834,
-0.06817969679832458,
0.1269742101430893,
-0.055370282381772995,
-0.02406090497970581,
0.13341309130191803,
-0.24228139221668243,
0.2128768414258957,
-0.40904730558395386,
-0.2152431309223175,
-0.32385680079460144,
0.4293536841869354,
-0.10488439351320267,
-0.27679914236068726,
-0.29888683557510376,
0.04711593687534332,
0.12152372300624847,
0.04287111386656761,
-0.1723898947238922,
-0.07762307673692703,
0.31757211685180664,
-0.14178255200386047,
0.11994440853595734,
-0.06929824501276016,
-0.1389092206954956,
0.37158530950546265,
-0.1808599829673767,
-0.15897652506828308,
-0.3154515027999878,
0.025391489267349243,
-0.04091233015060425,
0.10761949419975281,
0.13791583478450775,
-0.0042085424065589905,
-0.019211769104003906,
0.02074052207171917,
-0.330017626285553,
0.006679403595626354,
-0.062433257699012756,
-0.14764313399791718,
-0.03753744065761566,
0.1586964726448059,
-0.3073330223560333,
-0.4090113043785095,
0.24643537402153015,
0.26791536808013916,
-0.20212574303150177,
-0.04825073853135109,
-0.26961371302604675,
-0.12425409257411957,
-0.39612147212028503,
0.028507832437753677,
0.11120946705341339,
0.39537733793258667,
-0.289613276720047,
0.40579164028167725,
-0.2678987383842468,
-0.3382912278175354,
-0.28329792618751526,
-0.09366626292467117,
0.3441712558269501,
-0.018629925325512886,
0.3068983852863312,
-0.13570097088813782,
-0.247672438621521,
-0.4111405611038208,
-0.02659234032034874,
-0.025421610102057457,
-0.36148345470428467,
0.5023354887962341,
0.07104367762804031,
-0.054200179874897,
0.03575184941291809,
-0.04586086794734001,
-0.07853587716817856,
-0.004988230764865875,
-0.19251427054405212,
-0.09155132621526718,
-0.44914674758911133,
0.11110705137252808,
0.2908153831958771,
0.5239841938018799,
0.12693265080451965,
0.06260588765144348,
-0.052387744188308716,
0.12280146777629852,
-0.26100075244903564,
0.2496437430381775,
0.12279947847127914,
0.10145661234855652,
-0.003810148686170578,
0.2337707281112671,
0.12164955586194992,
-0.30093470215797424,
-0.06060218811035156,
0.07559394836425781,
-0.15733647346496582,
-0.20633912086486816,
-0.0989713966846466,
0.1312091052532196,
-0.14490070939064026,
-0.1276477873325348,
-0.07396049797534943,
-0.1366322785615921,
0.1312752664089203,
-0.25270795822143555,
0.41089534759521484,
-0.07778079062700272,
-0.06810590624809265,
-0.11617586761713028,
0.4291161894798279,
-0.13653773069381714,
-0.02487252466380596,
0.10991723835468292,
-0.19124671816825867,
0.4337040185928345,
0.0322050079703331,
-0.007711678743362427,
-0.030894320458173752,
-0.0435570552945137,
-0.3207204043865204,
-0.004678018391132355,
0.20045869052410126,
0.06980547308921814,
0.06874700635671616,
-0.1616942137479782,
-0.08159112930297852,
0.13989941775798798,
0.20402994751930237,
0.38968130946159363,
-0.13757961988449097,
-0.11160925030708313,
0.0036818129010498524,
0.22071094810962677,
-0.2480199933052063,
-0.2681474983692169,
0.025924677029252052,
0.002277463674545288,
-0.15715807676315308,
0.34770575165748596,
0.3385128378868103,
0.15678881108760834,
0.10676786303520203,
0.17926457524299622,
0.424369215965271,
-0.24841465055942535,
0.36612600088119507,
0.15656207501888275,
0.07318994402885437,
-0.19898782670497894,
-0.08611830323934555,
0.24347905814647675,
0.15557961165905,
-0.002066727727651596,
-0.14343929290771484,
0.3063279390335083,
0.5199893712997437,
0.20461051166057587,
-0.5770911574363708,
-0.2283816933631897,
-0.2111484557390213,
0.4667413532733917,
-0.23423641920089722,
0.47356778383255005,
0.4336739778518677,
0.1427621692419052,
0.12221098691225052,
-0.2752476930618286,
-0.2910158038139343,
0.5431447625160217,
0.015019593760371208,
-0.029163291677832603,
0.1798153668642044,
-0.09651125967502594,
0.12398047745227814,
0.22515073418617249,
0.12460537254810333,
0.2634061276912689,
-0.027209170162677765,
0.2285270094871521,
0.0037360191345214844,
0.09112251549959183,
0.5725486278533936,
0.050842829048633575,
0.42818543314933777,
-0.20180095732212067,
-0.15888342261314392,
0.208746999502182,
0.17495450377464294,
-0.11982403695583344,
-0.030880426988005638,
0.1743924766778946,
0.21221260726451874,
-0.3490409255027771,
0.05871402099728584,
0.042639151215553284,
-0.0047612059861421585,
-0.29583534598350525,
0.389500230550766,
0.15211328864097595,
-0.16104567050933838,
-0.07685594260692596,
0.11173726618289948,
-0.11847389489412308,
0.17021729052066803,
0.08844905346632004,
0.19124409556388855,
-0.22710178792476654,
-0.06560995429754257,
0.2860576808452606,
-0.40478062629699707,
-0.009061701595783234,
-0.24572893977165222,
-0.29520195722579956,
-0.006770739331841469,
0.2661706507205963,
-0.222427636384964,
0.03551921620965004,
-0.1656460016965866,
0.08896252512931824,
-0.19935822486877441,
0.34228628873825073,
0.2350546419620514,
-0.27209287881851196,
-0.3159390985965729,
-0.20595401525497437,
-0.31357720494270325,
-0.1919192373752594,
-0.3323296308517456,
-0.11632335931062698,
0.1817060112953186,
0.3304489254951477,
-0.10603883117437363,
0.2373960316181183,
0.18711182475090027,
-0.0952255055308342,
-0.11681783199310303,
0.002011910080909729,
-0.46048811078071594,
0.13782711327075958,
0.1788463443517685,
0.22822050750255585,
0.20815643668174744,
-0.5176980495452881,
-0.2647787034511566,
-0.1527635157108307,
0.0007780976593494415,
-0.13586938381195068,
0.30298087000846863,
0.15759208798408508,
0.5476999282836914,
0.6887494325637817,
0.0014794860035181046,
-0.25665098428726196,
-0.08706913143396378,
-0.24218787252902985,
-0.07384951412677765,
-0.12916094064712524,
-0.1220877394080162,
-0.15945583581924438,
0.346560537815094,
0.31438377499580383,
-0.3293672204017639,
0.08468183875083923,
-0.2532246708869934,
-0.0861109048128128,
-0.06821809709072113,
0.14552293717861176,
-0.0891813114285469,
-0.016318492591381073,
0.07654868811368942,
0.41577574610710144,
-0.07014630734920502,
0.32452192902565,
-0.021070443093776703,
0.15894946455955505,
-0.34482088685035706,
-0.1187073215842247,
0.3293445110321045,
0.2186022251844406,
-0.48176589608192444,
0.40038537979125977,
0.13537466526031494,
0.06570678949356079,
-0.15056701004505157,
-0.36182457208633423,
0.3132103383541107,
0.13255228102207184,
-0.2016751766204834,
-0.13047705590724945,
0.32267478108406067,
-0.08665882050991058,
-0.07668929547071457,
0.10986249148845673,
0.33088868856430054,
0.31244567036628723,
-0.07593342661857605,
-0.31975874304771423,
-0.2632791996002197
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | @thomwolf I'm sorry but I can't reproduce this problem. I'm also using:
```python
ds = load_dataset("json", split="train", data_files=data_files, cache_dir=cache_dir)
```
after having removed the extracted files:
```python
assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == []
```
I get the logging message:
```shell
WARNING datasets.builder:builder.py:531 Reusing dataset json ...
``` | I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 49 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
@thomwolf I'm sorry but I can't reproduce this problem. I'm also using:
```python
ds = load_dataset("json", split="train", data_files=data_files, cache_dir=cache_dir)
```
after having removed the extracted files:
```python
assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == []
```
I get the logging message:
```shell
WARNING datasets.builder:builder.py:531 Reusing dataset json ...
``` | [
0.0387394092977047,
0.001151256263256073,
-0.07317286729812622,
0.288826048374176,
-0.022598430514335632,
0.24423488974571228,
0.0043713971972465515,
0.22520136833190918,
0.21111620962619781,
0.11122684180736542,
0.13000912964344025,
0.44470375776290894,
-0.3149458169937134,
-0.15223407745361328,
-0.18791718780994415,
0.06854502856731415,
-0.1822633147239685,
0.2303553968667984,
0.11799043416976929,
0.1538841873407364,
-0.14851698279380798,
0.01671331375837326,
0.02816052734851837,
-0.127724751830101,
-0.08119993656873703,
-0.3685380220413208,
0.17933891713619232,
-0.2001989483833313,
-0.0709400400519371,
-0.47556763887405396,
0.19351701438426971,
0.4872879385948181,
0.2634628415107727,
0.29377520084381104,
-0.0001270320499315858,
0.14023113250732422,
0.2824355363845825,
0.17064006626605988,
-0.4946134090423584,
0.073471300303936,
-0.21854868531227112,
-0.13172373175621033,
0.27834224700927734,
-0.12790915369987488,
0.23895668983459473,
-0.505801260471344,
-0.2874324321746826,
-0.7039571404457092,
0.6001020073890686,
-0.14448168873786926,
0.02261284738779068,
0.08817806094884872,
-0.4752632677555084,
0.23534183204174042,
0.17950525879859924,
0.343250572681427,
0.003217184916138649,
-0.014561371877789497,
0.3974127471446991,
0.04100637882947922,
0.25307631492614746,
0.3323468565940857,
-0.15001122653484344,
-0.2315431386232376,
0.2820379137992859,
-0.041238926351070404,
-0.030806109309196472,
-0.3038097023963928,
0.18477782607078552,
-0.003672834485769272,
0.6249610781669617,
-0.39469239115715027,
-0.25561726093292236,
-0.5423288941383362,
0.06265430152416229,
-0.6009432673454285,
0.02326066419482231,
0.27974987030029297,
-0.0825023502111435,
0.21299798786640167,
-0.18871234357357025,
-0.38327598571777344,
-0.3273221552371979,
-0.11234262585639954,
0.5984616279602051,
-0.39980554580688477,
-0.03723875433206558,
-0.04580650478601456,
0.4938407838344574,
0.14615023136138916,
0.23537258803844452,
-0.314292311668396,
-0.2171896994113922,
0.384613960981369,
-0.18738894164562225,
-0.09364330768585205,
-0.22392025589942932,
-0.2821354866027832,
0.1414933204650879,
0.15897692739963531,
0.29700881242752075,
-0.1674043834209442,
0.11853016912937164,
0.09084881097078323,
0.3935772776603699,
0.45970556139945984,
-0.048167698085308075,
0.11285530030727386,
0.10085250437259674,
0.16190865635871887,
0.048286374658346176,
-0.09799209982156754,
0.10118518024682999,
-0.0617838092148304,
0.4250563979148865,
-0.032199181616306305,
0.04165375232696533,
-0.10718800872564316,
-0.26106587052345276,
0.09687784314155579,
-0.007823068648576736,
-0.20520024001598358,
0.16661350429058075,
0.18667438626289368,
0.1723240464925766,
0.019371110945940018,
0.06729072332382202,
0.43016672134399414,
-0.05773121863603592,
-0.22655227780342102,
0.10329610854387283,
0.10110385715961456,
-0.32058846950531006,
-0.3679003417491913,
0.42376264929771423,
-0.1298707127571106,
-0.02597184106707573,
-0.004820568021386862,
-0.2550816535949707,
-0.06533356755971909,
0.48401278257369995,
-0.09291942417621613,
0.25380876660346985,
0.30998530983924866,
-0.2183116376399994,
-0.08803383260965347,
-0.21226538717746735,
-0.1653786450624466,
-0.14229294657707214,
0.5295102596282959,
-0.18499639630317688,
-0.3411290943622589,
-0.08569558709859848,
0.05997901409864426,
-0.06600126624107361,
0.280052125453949,
-0.5685244202613831,
0.06119975075125694,
0.19114312529563904,
0.0687459260225296,
-0.041827715933322906,
0.21400699019432068,
-0.03750986233353615,
-0.08871521800756454,
-0.22471508383750916,
0.4024037718772888,
-0.6254295110702515,
-0.13332882523536682,
-0.3174971640110016,
-0.1452019363641739,
0.20104674994945526,
0.2420940101146698,
-0.17494317889213562,
0.34942272305488586,
-0.31563568115234375,
0.00965840369462967,
0.40067312121391296,
-0.23287101089954376,
-0.45436757802963257,
0.17654180526733398,
0.11901263892650604,
0.4207149147987366,
0.35249435901641846,
0.25438788533210754,
0.2594750225543976,
-0.03225430101156235,
-0.002493150532245636,
0.33502107858657837,
0.07736751437187195,
-0.07384885847568512,
-0.2808282673358917,
-0.3792133629322052,
0.22563499212265015,
0.19167537987232208,
-0.09218490123748779,
0.11055207252502441,
0.16780930757522583,
-0.0024409517645835876,
0.26096856594085693,
0.11505158245563507,
0.11328429728746414,
0.1940722018480301,
0.11540882289409637,
-0.20100443065166473,
-0.17742255330085754,
0.1313793659210205,
-0.5052546858787537,
0.0986858531832695,
-0.465793251991272,
-0.33217692375183105,
-0.37567031383514404,
-0.28494971990585327,
0.03860458359122276,
0.1174926683306694,
-0.3890930712223053,
0.12905581295490265,
-0.02201710268855095,
-0.1279522329568863,
0.32808491587638855,
0.05594712123274803,
-0.3593130111694336,
0.15207219123840332,
-0.09838006645441055,
0.07802196592092514,
-0.5450092554092407,
0.20503593981266022,
0.18430164456367493,
-0.2473081350326538,
-0.12907153367996216,
0.14001208543777466,
-0.2306075096130371,
-0.36273396015167236,
-0.16539964079856873,
0.20361599326133728,
0.33911317586898804,
0.2150985598564148,
0.15600380301475525,
0.24213498830795288,
0.23040711879730225,
0.20095989108085632,
0.04697331786155701,
0.1948215365409851,
0.011585849337279797,
0.04638742655515671,
-0.2821236848831177,
0.38120704889297485,
-0.22195087373256683,
0.053480055183172226,
-0.17758260667324066,
-0.4575614035129547,
0.2535557448863983,
-0.057093944400548935,
0.07907924056053162,
-0.47995683550834656,
0.10833465307950974,
0.3552141487598419,
-0.053625307977199554,
0.024503707885742188,
0.11226136982440948,
-0.16337963938713074,
0.003609124571084976,
-0.0947125256061554,
-0.19757717847824097,
0.28924256563186646,
-0.1210101917386055,
-0.17924073338508606,
0.05397071689367294,
0.47220757603645325,
0.38724613189697266,
0.07281184196472168,
-0.06920766830444336,
-0.10370828956365585,
0.4217992126941681,
0.07832749933004379,
0.17058011889457703,
0.05632141977548599,
-0.03791403770446777,
0.3702071011066437,
0.2599155604839325,
-0.09258473664522171,
-0.2354394793510437,
0.01432301476597786,
0.10432608425617218,
0.26831793785095215,
0.12892243266105652,
-0.03347446769475937,
-0.39785027503967285,
-0.387317031621933,
0.33656877279281616,
0.19679959118366241,
0.19248025119304657,
-0.1469782590866089,
0.36439019441604614,
0.17990075051784515,
-0.2070637047290802,
0.03058408759534359,
-0.04499870538711548,
0.46036601066589355,
0.007302587851881981,
-0.3709694445133209,
-0.34440362453460693,
-0.16320811212062836,
0.12286458164453506,
-0.08310598880052567,
0.4022934138774872,
-0.280951589345932,
0.44407975673675537,
0.12756262719631195,
-0.003878156654536724,
-0.05424392223358154,
-0.017710331827402115,
0.03764751926064491,
0.38792431354522705,
0.1876695305109024,
0.10017769783735275,
0.15313123166561127,
0.037986889481544495,
0.09637899696826935,
-0.09912430495023727,
-0.14493468403816223,
-0.10224106907844543,
0.32337498664855957,
0.06612200289964676,
0.18513156473636627,
-0.17125733196735382,
0.0005537271499633789,
-0.2757933735847473,
-0.28989937901496887,
0.20133833587169647,
0.031960379332304,
-0.016234315931797028,
0.26891905069351196,
0.28101646900177,
-0.09652356058359146,
0.08417478948831558,
0.14889441430568695,
-0.02518380805850029,
-0.7104855179786682,
0.16074541211128235,
-0.07690156251192093,
0.13641463220119476,
0.18906556069850922,
-0.06975334882736206,
-0.029377002269029617,
0.3408827781677246,
-0.43363893032073975,
-0.012082023546099663,
0.06604505330324173,
0.16275952756404877,
-0.2804272174835205,
0.019199293106794357,
0.09588661789894104,
0.27543434500694275,
0.03788895159959793,
0.02017931640148163,
0.09850913286209106,
0.14473246037960052,
0.31982535123825073,
0.17311495542526245,
0.1262681931257248,
0.26036301255226135,
0.2043640911579132,
0.43218833208084106,
-0.06222430616617203,
0.019601983949542046,
0.3881903290748596,
0.31632524728775024,
0.43872886896133423,
-0.24701321125030518,
0.09891881048679352,
-0.47386816143989563,
0.0050007253885269165,
-0.2182045578956604,
-0.0037105530500411987,
0.12136740982532501,
-0.049647100269794464,
0.173568993806839,
-0.1063406765460968,
-0.13911840319633484,
-0.140474334359169,
0.21180373430252075,
-0.36621540784835815,
0.10254263877868652,
0.050067152827978134,
-0.27052053809165955,
-0.11742198467254639,
-0.1675274670124054,
0.03910805657505989,
0.1658005714416504,
0.5044091939926147,
-0.02096506580710411,
-0.1951974332332611,
-0.10791003704071045,
-0.22365325689315796,
0.26889196038246155,
-0.19639329612255096,
-0.12398630380630493,
0.025685463100671768,
0.09046582132577896,
0.21922756731510162,
0.22385956346988678,
0.4910547733306885,
-0.10353320837020874,
0.03907274082303047,
-0.09540072083473206,
-0.0014422982931137085,
-0.29947343468666077,
-0.039861857891082764,
0.05027991905808449,
0.0924934670329094,
-0.028744373470544815,
0.4003675878047943,
-0.2519613802433014,
-0.16512943804264069,
-0.22570857405662537,
0.6906102895736694,
-0.26012420654296875,
-0.1884298324584961,
-0.14954009652137756,
-0.2630366086959839,
-0.5465510487556458,
-0.02004414051771164,
-0.008021064102649689,
-0.023606084287166595,
0.08120407909154892,
-0.2832103967666626,
-0.12703071534633636,
-0.2804136574268341,
0.11664172261953354,
-0.05640533193945885,
0.5973091125488281,
-0.2932860553264618,
0.17258889973163605,
-0.07033094763755798,
0.08520490676164627,
0.5068807601928711,
0.31773197650909424,
-0.0923684686422348,
-0.0827542096376419,
-0.1680627167224884,
-0.1983066350221634,
0.10998737066984177,
0.09359721839427948,
-0.3003251850605011,
0.3180714249610901,
-0.24987924098968506,
0.44099152088165283,
-0.03151794523000717,
0.009721210226416588,
0.02719651162624359,
-0.2729801535606384,
-0.11541580408811569,
-0.39698097109794617,
0.09796009957790375,
0.0724431723356247,
-0.14415891468524933,
0.4777909517288208,
-0.2132851928472519,
-0.24777112901210785,
0.49188530445098877,
-0.14855504035949707,
1.0456448793411255,
-0.1345216929912567,
-0.0002495571970939636,
-0.057819731533527374,
-0.22546961903572083,
0.4228830635547638,
-0.6274009943008423,
0.19909411668777466,
-0.04310055077075958,
-0.040879618376493454,
0.10037603974342346,
-0.12001097202301025,
0.02303917333483696,
0.31523120403289795,
-0.05275314673781395,
0.24675048887729645,
-0.4842715859413147,
-0.16010774672031403,
-0.30236169695854187,
0.3316248655319214,
-0.05529969185590744,
-0.1308065503835678,
-0.1981833577156067,
-0.05600883811712265,
0.017417505383491516,
-0.020617306232452393,
-0.2003178596496582,
-0.05259709432721138,
0.4607537090778351,
-0.05187196657061577,
0.21361549198627472,
-0.12443716078996658,
-0.24202482402324677,
0.4143187403678894,
-0.13123667240142822,
-0.25381284952163696,
-0.18919827044010162,
0.1305614858865738,
-0.22440354526042938,
0.018959514796733856,
0.2749983072280884,
-0.003237057477235794,
0.031376685947179794,
-0.0009670340223237872,
-0.360175222158432,
0.10519903153181076,
0.017695438116788864,
-0.030539505183696747,
-0.024302631616592407,
0.15010178089141846,
-0.31834128499031067,
-0.44394850730895996,
0.14132282137870789,
0.15888634324073792,
-0.1130421906709671,
-0.04606745019555092,
-0.2940959632396698,
-0.09105819463729858,
-0.3285752236843109,
0.0937718003988266,
0.0375564843416214,
0.3554031252861023,
-0.228843554854393,
0.29445022344589233,
-0.4424223303794861,
-0.1805373728275299,
-0.13874249160289764,
-0.12592342495918274,
0.27815648913383484,
-0.1078391969203949,
0.40585848689079285,
-0.19610385596752167,
-0.16975025832653046,
-0.31144461035728455,
-0.10946423560380936,
-0.059165798127651215,
-0.352353572845459,
0.49597087502479553,
0.15415914356708527,
0.01911357045173645,
0.030613921582698822,
-0.1891186535358429,
-0.11282208561897278,
-0.003665044903755188,
-0.08838950097560883,
-0.233077272772789,
-0.5126237869262695,
0.13335596024990082,
0.23343271017074585,
0.5337324738502502,
0.09821928292512894,
0.07239164412021637,
-0.2063545137643814,
0.04030381143093109,
-0.14661455154418945,
0.2719168961048126,
0.27147606015205383,
0.1760980188846588,
-0.005753010511398315,
0.257684588432312,
0.12072666734457016,
-0.2755821645259857,
-0.13107958436012268,
-0.016249436885118484,
-0.10072005540132523,
-0.11332570016384125,
-0.13849994540214539,
0.13801035284996033,
-0.08580740541219711,
-0.08219477534294128,
-0.170872300863266,
-0.34160029888153076,
0.19510580599308014,
-0.2087671160697937,
0.30604028701782227,
-0.0774552971124649,
-0.0922984778881073,
-0.04609820246696472,
0.3641617000102997,
-0.101166270673275,
-0.03181231766939163,
0.12958699464797974,
-0.0777367502450943,
0.35818731784820557,
0.09357083588838577,
0.01844380609691143,
-0.024767646566033363,
0.021632209420204163,
-0.5045362114906311,
-0.015408128499984741,
0.2184852659702301,
0.0654108077287674,
0.11453373730182648,
-0.16347748041152954,
-0.051677823066711426,
0.054404791444540024,
0.1629255712032318,
0.24672245979309082,
-0.15288233757019043,
-0.013364783488214016,
-0.10647723823785782,
0.10300964117050171,
-0.1887701153755188,
-0.26447102427482605,
0.05740166828036308,
0.12217048555612564,
-0.2538685202598572,
0.35391589999198914,
0.38324636220932007,
0.059159472584724426,
0.04596143215894699,
0.04153847321867943,
0.3936084508895874,
-0.21633127331733704,
0.40347132086753845,
0.41596049070358276,
0.0731048583984375,
-0.21103326976299286,
-0.15883731842041016,
0.3227531313896179,
0.12933412194252014,
-0.011439286172389984,
-0.12805557250976562,
0.3922557830810547,
0.5880981683731079,
0.19317704439163208,
-0.6003847122192383,
-0.3592974841594696,
-0.2539200186729431,
0.6064806580543518,
-0.048820823431015015,
0.45393818616867065,
0.3565705716609955,
0.27205201983451843,
0.2334132194519043,
-0.15201237797737122,
-0.12469955533742905,
0.49895480275154114,
0.07639119029045105,
-0.060732413083314896,
0.18664558231830597,
-0.13066530227661133,
0.15587784349918365,
0.13195347785949707,
0.09249132126569748,
0.28267741203308105,
-0.2776648998260498,
0.23492160439491272,
-0.02092650532722473,
0.1108354851603508,
0.47641095519065857,
0.1960005760192871,
0.41553205251693726,
-0.19943185150623322,
-0.17052753269672394,
0.2443350851535797,
0.28390729427337646,
0.025532402098178864,
-0.09548456966876984,
0.14150865375995636,
0.11388780921697617,
-0.34405437111854553,
-0.011564885266125202,
0.03954198211431503,
0.0908902958035469,
-0.1983005702495575,
0.4838019609451294,
0.05263103172183037,
-0.18773610889911652,
-0.08844710886478424,
-0.02055768296122551,
-0.042602673172950745,
0.13732652366161346,
0.20743997395038605,
0.2993079721927643,
-0.2762264311313629,
-0.0551261231303215,
0.2671673595905304,
-0.3956136703491211,
-0.013017401099205017,
-0.09151872247457504,
-0.12840430438518524,
0.0006957855075597763,
0.46480652689933777,
-0.18815214931964874,
0.03861595690250397,
-0.11769846826791763,
0.03316217288374901,
-0.2790229618549347,
0.1828392744064331,
0.24306942522525787,
-0.32570865750312805,
-0.30328622460365295,
-0.17758230865001678,
-0.3610862195491791,
-0.2281065285205841,
-0.3321942985057831,
0.0023377854377031326,
0.2257026880979538,
0.190851092338562,
-0.08666553348302841,
0.1338692009449005,
0.16630040109157562,
-0.027751421555876732,
-0.038105182349681854,
0.04898102954030037,
-0.37456637620925903,
-0.014257155358791351,
0.21512168645858765,
0.18909896910190582,
0.07797467708587646,
-0.43464457988739014,
-0.3108425438404083,
-0.10405272245407104,
-0.0754254087805748,
-0.08235464990139008,
0.27466702461242676,
0.14712880551815033,
0.7400562763214111,
0.6187955737113953,
-0.036384209990501404,
-0.21408873796463013,
0.09637575596570969,
-0.20816883444786072,
-0.040174778550863266,
-0.16464048624038696,
-0.016814088448882103,
-0.15967777371406555,
0.2693033814430237,
0.269890159368515,
-0.4261142909526825,
0.2645617723464966,
-0.3312877416610718,
-0.2856917381286621,
-0.11480965465307236,
0.02319258078932762,
-0.2574581801891327,
-0.021233316510915756,
-0.029740286991000175,
0.5283961296081543,
0.009937538765370846,
0.3121957778930664,
0.047923147678375244,
0.22612479329109192,
-0.31683748960494995,
-0.06647305190563202,
0.33426010608673096,
0.17148828506469727,
-0.3807063400745392,
0.5087193846702576,
0.0780479907989502,
0.05069320648908615,
-0.05180402845144272,
-0.3348759114742279,
0.31848976016044617,
0.2205943763256073,
-0.3912212550640106,
0.004320025444030762,
0.22576501965522766,
-0.05564847216010094,
-0.0024553202092647552,
0.17469799518585205,
0.2327558398246765,
0.435697466135025,
0.06150559335947037,
-0.2619687020778656,
-0.17453649640083313
] |
https://github.com/huggingface/datasets/issues/2604 | Add option to delete temporary files (e.g. extracted files) when loading dataset | >
>
> Do you confirm the extracted folder stays empty after reloading?
Yes, I have the above mentioned assertion on the emptiness of the extracted folder:
```python
assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == []
```
| I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution. | 37 | Add option to delete temporary files (e.g. extracted files) when loading dataset
I'm loading a dataset constituted of 44 GB of compressed JSON files.
When loading the dataset with the JSON script, extracting the files create about 200 GB of uncompressed files before creating the 180GB of arrow cache tables
Having a simple way to delete the extracted files after usage (or even better, to stream extraction/delete) would be nice to avoid disk cluter.
I can maybe tackle this one in the JSON script unless you want a more general solution.
>
>
> Do you confirm the extracted folder stays empty after reloading?
Yes, I have the above mentioned assertion on the emptiness of the extracted folder:
```python
assert sorted((cache_dir / "downloads" / "extracted").iterdir()) == []
```
| [
0.04130703583359718,
-0.04853755980730057,
-0.14497222006320953,
0.22482967376708984,
-0.046606168150901794,
0.20178931951522827,
-0.1690857857465744,
0.3027108311653137,
0.22450827062129974,
0.13429425656795502,
0.010949618183076382,
0.48018592596054077,
-0.26869210600852966,
-0.12304278463125229,
-0.18242335319519043,
-0.00938454270362854,
-0.23490861058235168,
0.2767878770828247,
-0.00396256148815155,
0.1206633597612381,
-0.17447559535503387,
0.09212017804384232,
0.037845805287361145,
-0.19656915962696075,
0.052506253123283386,
-0.4080623686313629,
0.12740418314933777,
-0.08393994718790054,
-0.135651633143425,
-0.443868488073349,
0.04382000118494034,
0.4613909125328064,
0.26513558626174927,
0.2756151556968689,
-0.00011828109563793987,
-0.005250900983810425,
0.32141560316085815,
0.044897809624671936,
-0.44852104783058167,
0.07876069843769073,
-0.13910949230194092,
-0.16890422999858856,
0.26235127449035645,
-0.19875028729438782,
0.22335121035575867,
-0.356309711933136,
-0.2938635051250458,
-0.661741316318512,
0.5167126059532166,
-0.1608559489250183,
0.1268811672925949,
0.06837078928947449,
-0.4738248884677887,
0.19338878989219666,
0.27384671568870544,
0.24093127250671387,
-0.09168132394552231,
0.038586050271987915,
0.39279496669769287,
0.004567313939332962,
0.263293594121933,
0.3668135702610016,
-0.1002369225025177,
-0.21149778366088867,
0.35578474402427673,
0.021877020597457886,
-0.14610007405281067,
-0.321416437625885,
0.24983519315719604,
-0.028761640191078186,
0.6228613257408142,
-0.3944319486618042,
-0.22752390801906586,
-0.3693205416202545,
0.06139950454235077,
-0.6855835318565369,
0.07141181826591492,
0.264659583568573,
-0.025691289454698563,
0.23825086653232574,
-0.08053058385848999,
-0.3740077018737793,
-0.3292854428291321,
-0.14201419055461884,
0.5611363649368286,
-0.33493128418922424,
-0.06793779879808426,
-0.15238559246063232,
0.43475034832954407,
0.14553143084049225,
0.20151981711387634,
-0.2469361424446106,
-0.2134847342967987,
0.4398033320903778,
-0.11566007137298584,
-0.16844019293785095,
-0.2826525866985321,
-0.25508221983909607,
0.15414369106292725,
0.23844748735427856,
0.38733890652656555,
-0.031855471432209015,
0.16811053454875946,
0.012286338955163956,
0.3026491105556488,
0.4701259732246399,
0.0035452619194984436,
0.009140233509242535,
0.18236984312534332,
0.09233257919549942,
0.07843196392059326,
-0.059340640902519226,
-0.007166911847889423,
0.0037683439441025257,
0.3564751148223877,
-0.005452387034893036,
-0.0003948528319597244,
-0.10364347696304321,
-0.0663217082619667,
0.11097075045108795,
0.14655062556266785,
-0.17648954689502716,
0.058115482330322266,
0.25504159927368164,
0.11152312159538269,
0.07976981997489929,
0.11754517257213593,
0.318095326423645,
-0.006252343766391277,
-0.16972975432872772,
0.09014119952917099,
0.16229435801506042,
-0.28896594047546387,
-0.3153975009918213,
0.4541112780570984,
-0.08124604821205139,
0.01667666994035244,
-0.12122397869825363,
-0.23077808320522308,
0.024775691330432892,
0.5310213565826416,
-0.12268874049186707,
0.28558117151260376,
0.3619469702243805,
-0.1461789608001709,
-0.16047585010528564,
-0.19236218929290771,
-0.08462238311767578,
-0.15706481039524078,
0.49407443404197693,
-0.11577063053846359,
-0.24778681993484497,
-0.008217258378863335,
0.17212820053100586,
0.01016908511519432,
0.22849644720554352,
-0.5198009610176086,
0.01281820423901081,
0.10616935789585114,
0.09778331220149994,
0.008978530764579773,
0.3370693325996399,
0.05926791951060295,
-0.1662466675043106,
-0.21431885659694672,
0.3602549135684967,
-0.5754246711730957,
-0.07839307188987732,
-0.3162100911140442,
-0.13818489015102386,
0.14195293188095093,
0.19349955022335052,
-0.07481645792722702,
0.26965710520744324,
-0.2039482742547989,
0.15035930275917053,
0.3257906138896942,
-0.2086213082075119,
-0.4496496617794037,
0.1334090232849121,
0.09345577657222748,
0.35121282935142517,
0.292998343706131,
0.26573798060417175,
0.36374953389167786,
0.03704085946083069,
0.028022438287734985,
0.3027048110961914,
0.0446932278573513,
-0.03194611519575119,
-0.37993669509887695,
-0.3065946698188782,
0.12732172012329102,
0.2023753523826599,
0.040177591145038605,
0.06162324547767639,
0.1113654375076294,
-0.030888594686985016,
0.2415638566017151,
0.12423115968704224,
0.11324471235275269,
0.20969973504543304,
0.21012648940086365,
-0.21841661632061005,
-0.141133651137352,
0.07584191858768463,
-0.5337049961090088,
0.11611974984407425,
-0.48025596141815186,
-0.27000778913497925,
-0.3258729577064514,
-0.354566752910614,
-0.006288575939834118,
0.06039964407682419,
-0.2571120858192444,
0.07091537117958069,
0.10019268095493317,
-0.09838247299194336,
0.3363027274608612,
0.005329988896846771,
-0.40178796648979187,
0.09175931662321091,
-0.0026934389024972916,
0.0702558308839798,
-0.44256874918937683,
0.17931434512138367,
0.12845084071159363,
-0.2546827495098114,
-0.09137046337127686,
0.01984473317861557,
-0.22524148225784302,
-0.5050381422042847,
-0.17480799555778503,
0.25066256523132324,
0.32916566729545593,
0.23368993401527405,
0.2079574465751648,
0.22251644730567932,
0.17816618084907532,
0.2550548315048218,
0.09778959304094315,
0.21982631087303162,
0.07163742929697037,
0.06666304916143417,
-0.35931774973869324,
0.4581734538078308,
-0.22688893973827362,
-0.022665604948997498,
-0.12612715363502502,
-0.3892333507537842,
0.2734321057796478,
-0.1001378521323204,
0.08142965286970139,
-0.4512610137462616,
0.07874103635549545,
0.3533685803413391,
-0.049103692173957825,
0.0033764485269784927,
0.12963560223579407,
-0.08482850342988968,
-0.010779958218336105,
-0.059640608727931976,
-0.1538950502872467,
0.32068902254104614,
-0.10863534361124039,
-0.14420638978481293,
0.011089459992945194,
0.4614609181880951,
0.43855947256088257,
0.17018793523311615,
-0.10129114985466003,
-0.11482671648263931,
0.45718100666999817,
0.03653547912836075,
0.18168698251247406,
0.053016502410173416,
-0.04882798343896866,
0.37670812010765076,
0.17042627930641174,
0.0017944779247045517,
-0.3105229437351227,
-0.025425316765904427,
0.08667977899312973,
0.22457151114940643,
0.24443462491035461,
-0.15998625755310059,
-0.2307387888431549,
-0.3647025227546692,
0.46937695145606995,
0.19767577946186066,
0.2197485864162445,
-0.07263019680976868,
0.46891582012176514,
0.15392833948135376,
-0.32634010910987854,
0.09599235653877258,
-0.03339116647839546,
0.5423591136932373,
-0.017069337889552116,
-0.3114194869995117,
-0.37716615200042725,
-0.16810955107212067,
0.2098541557788849,
0.018621720373630524,
0.31552982330322266,
-0.19958148896694183,
0.4949294924736023,
0.08884885907173157,
0.058531321585178375,
-0.04641176015138626,
-0.06411723047494888,
0.049755603075027466,
0.2917642593383789,
0.027274925261735916,
0.10367488861083984,
0.2092256098985672,
0.022573918104171753,
0.10793574899435043,
-0.09464361518621445,
-0.3111012279987335,
-0.15140314400196075,
0.21326951682567596,
0.17556756734848022,
0.05093298479914665,
-0.27456021308898926,
-0.11113875359296799,
-0.28172725439071655,
-0.4231974482536316,
0.22542691230773926,
0.03980017080903053,
0.03311242163181305,
0.1260126233100891,
0.16883447766304016,
-0.06106766685843468,
0.11476436257362366,
0.08111599832773209,
-0.04502288997173309,
-0.6299265027046204,
0.18313588201999664,
-0.19124841690063477,
-0.0007609687745571136,
0.2425488531589508,
-0.0675698071718216,
-0.005753844976425171,
0.32386064529418945,
-0.367484450340271,
-0.05640622228384018,
-0.03328625112771988,
0.18072594702243805,
-0.3109469413757324,
-0.02231166698038578,
0.23866768181324005,
0.25498145818710327,
-0.10065668821334839,
-0.00019615143537521362,
0.09481178224086761,
0.16128534078598022,
0.36276304721832275,
0.08580941706895828,
0.015239082276821136,
0.22555306553840637,
0.1552606076002121,
0.45752882957458496,
-0.2319747656583786,
0.08945672959089279,
0.3778061866760254,
0.3623316287994385,
0.48309123516082764,
-0.26745176315307617,
0.13501882553100586,
-0.4761620759963989,
-0.05971646308898926,
-0.16356056928634644,
0.061500173062086105,
0.12683288753032684,
-0.14897312223911285,
0.1271561235189438,
-0.22674743831157684,
-0.2554056942462921,
-0.10871949791908264,
0.34884291887283325,
-0.24559158086776733,
0.07470710575580597,
0.033701930195093155,
-0.2601069211959839,
-0.11066606640815735,
-0.07503479719161987,
0.052546072751283646,
0.19343483448028564,
0.35559746623039246,
-0.09596192836761475,
-0.22939038276672363,
-0.07046493142843246,
-0.2582453489303589,
0.24369582533836365,
-0.1842191219329834,
-0.15758486092090607,
0.05077766999602318,
0.000902913510799408,
0.1316087245941162,
0.17041955888271332,
0.4188082814216614,
-0.11020342260599136,
-0.031615547835826874,
-0.0432012677192688,
-0.04910103231668472,
-0.2723810076713562,
0.014387831091880798,
-0.04368775710463524,
0.05138210207223892,
0.006243530660867691,
0.35178083181381226,
-0.2450859546661377,
-0.1610231101512909,
-0.2627812922000885,
0.6113595962524414,
-0.29141172766685486,
-0.14619097113609314,
-0.1679045855998993,
-0.27581730484962463,
-0.520576000213623,
0.013709232211112976,
0.10242662578821182,
-0.069949209690094,
0.12877152860164642,
-0.2261890172958374,
-0.11656603217124939,
-0.3135034739971161,
0.09558843076229095,
0.026120182126760483,
0.6730558276176453,
-0.31066304445266724,
0.1338150054216385,
-0.14997589588165283,
0.13530778884887695,
0.45759183168411255,
0.3512040972709656,
-0.1634143441915512,
0.032421983778476715,
-0.12535527348518372,
-0.26606157422065735,
0.11174921691417694,
0.15934117138385773,
-0.24974097311496735,
0.23550403118133545,
-0.34428414702415466,
0.4965212941169739,
-0.001997144892811775,
-0.043535757809877396,
-0.13015365600585938,
-0.2528441250324249,
-0.0031913290731608868,
-0.255446195602417,
0.10303016006946564,
-0.021974360570311546,
-0.15521171689033508,
0.4835706353187561,
-0.1392626166343689,
-0.25539302825927734,
0.5033284425735474,
-0.0633159950375557,
1.1462255716323853,
-0.09125553071498871,
0.05908013880252838,
-0.07462554425001144,
-0.2671492397785187,
0.2941931188106537,
-0.6101068258285522,
0.19285151362419128,
-0.02383340522646904,
-0.1474047154188156,
0.10325214266777039,
-0.03219446539878845,
0.007378879934549332,
0.197893425822258,
-0.257722944021225,
0.1724759340286255,
-0.4044645428657532,
-0.2458297312259674,
-0.31276261806488037,
0.3859442174434662,
-0.13364045321941376,
-0.23892390727996826,
-0.22290699183940887,
0.030417174100875854,
0.07036267220973969,
0.00969962403178215,
-0.24336987733840942,
-0.06993962824344635,
0.34831491112709045,
-0.10294020175933838,
0.2205173522233963,
-0.10508424043655396,
-0.2115626335144043,
0.3625530004501343,
-0.1709131896495819,
-0.16932544112205505,
-0.37470537424087524,
0.014716226607561111,
-0.22774778306484222,
0.06652792543172836,
0.17715686559677124,
0.01912202686071396,
-0.0063910111784935,
-0.02736618183553219,
-0.31080976128578186,
0.08405720442533493,
-0.023834766820073128,
-0.11778192967176437,
0.002306707203388214,
0.14611724019050598,
-0.35474637150764465,
-0.3214167356491089,
0.20320260524749756,
0.17500434815883636,
-0.12040580809116364,
0.010828156024217606,
-0.3190676271915436,
-0.11614193022251129,
-0.504313051700592,
0.08122345805168152,
0.11450517177581787,
0.34767889976501465,
-0.22784817218780518,
0.3304821252822876,
-0.29159078001976013,
-0.22508738934993744,
-0.22063176333904266,
-0.053279899060726166,
0.3131300210952759,
-0.15983907878398895,
0.33341509103775024,
-0.20198240876197815,
-0.2323346883058548,
-0.4242372512817383,
0.008244529366493225,
-0.0975864827632904,
-0.2666517198085785,
0.49219587445259094,
0.04981211945414543,
-0.1244073286652565,
0.05697430297732353,
-0.14614365994930267,
0.08514614403247833,
-0.008285664021968842,
-0.17067675292491913,
-0.19017311930656433,
-0.4423629939556122,
0.23615027964115143,
0.30118054151535034,
0.5027705430984497,
0.03338193893432617,
-0.004529343917965889,
-0.0241316556930542,
0.12317957729101181,
-0.27323848009109497,
0.24191069602966309,
0.1690094769001007,
0.1864473521709442,
-0.010839361697435379,
0.20980533957481384,
0.1146928146481514,
-0.2905045449733734,
-0.042486757040023804,
0.02802956849336624,
-0.11940471827983856,
-0.2052801549434662,
-0.11945876479148865,
0.11007329821586609,
-0.12230470031499863,
-0.08909031003713608,
-0.12792526185512543,
-0.25480955839157104,
0.15144798159599304,
-0.19670304656028748,
0.22192668914794922,
-0.14089679718017578,
-0.11528028547763824,
-0.038267750293016434,
0.4236799478530884,
-0.05349012464284897,
-0.06675029546022415,
0.12442819029092789,
-0.1753024160861969,
0.32819798588752747,
0.04843134060502052,
-0.058031581342220306,
-0.01517526526004076,
-0.055929675698280334,
-0.3425915539264679,
-0.012551024556159973,
0.14762572944164276,
0.0793357640504837,
0.07305555045604706,
-0.07566826045513153,
-0.0917990654706955,
0.04247719421982765,
0.16057582199573517,
0.31336745619773865,
-0.10058970749378204,
-0.0278405100107193,
-0.01520436443388462,
0.23555219173431396,
-0.30780959129333496,
-0.20288580656051636,
-0.09597066044807434,
0.04228591546416283,
-0.12828004360198975,
0.3526950180530548,
0.25518879294395447,
0.016021862626075745,
0.07859622687101364,
0.12195027619600296,
0.443540096282959,
-0.2625604271888733,
0.35673415660858154,
0.23301738500595093,
0.03352167084813118,
-0.203455850481987,
-0.1404133290052414,
0.2835746705532074,
0.08130671083927155,
-0.04119011014699936,
-0.13535133004188538,
0.41251787543296814,
0.5396207571029663,
0.27061712741851807,
-0.5496683120727539,
-0.2321297973394394,
-0.3047356605529785,
0.564860999584198,
-0.06363654136657715,
0.483397901058197,
0.4112476110458374,
0.16097746789455414,
0.1994059979915619,
-0.2693641483783722,
-0.21127602458000183,
0.39250490069389343,
0.037601642310619354,
0.015127092599868774,
0.17794519662857056,
-0.12256581336259842,
0.15458466112613678,
0.08909618854522705,
0.192801833152771,
0.31506723165512085,
-0.07630592584609985,
0.30509212613105774,
0.04034719988703728,
0.14444023370742798,
0.5403454899787903,
0.17267468571662903,
0.4122549593448639,
-0.20085029304027557,
-0.16832873225212097,
0.30699998140335083,
0.22863011062145233,
-0.04677945002913475,
-0.04264587163925171,
0.06075894832611084,
0.2300124317407608,
-0.40023839473724365,
0.056220535188913345,
0.029117271304130554,
0.03616516292095184,
-0.28099533915519714,
0.4738398790359497,
0.17641624808311462,
-0.16336087882518768,
-0.06650064885616302,
0.08923691511154175,
-0.13483978807926178,
0.22958439588546753,
0.12748098373413086,
0.16645671427249908,
-0.1332198530435562,
-0.09534002095460892,
0.3460349440574646,
-0.41619837284088135,
-0.039348818361759186,
-0.14949274063110352,
-0.24054542183876038,
0.028394877910614014,
0.3042207360267639,
-0.18590499460697174,
0.02068445459008217,
-0.09955146908760071,
0.08740095049142838,
-0.1506766825914383,
0.2765622138977051,
0.23043781518936157,
-0.31171801686286926,
-0.28551438450813293,
-0.24080787599086761,
-0.3313232660293579,
-0.19241741299629211,
-0.3334585130214691,
-0.07936114817857742,
0.20319147408008575,
0.28106024861335754,
-0.057895295321941376,
0.21943001449108124,
0.20724575221538544,
-0.04370580613613129,
-0.13206847012043,
0.009600486606359482,
-0.5555422902107239,
0.09323304891586304,
0.2999008297920227,
0.2253647893667221,
0.17154783010482788,
-0.5085920691490173,
-0.2904874384403229,
-0.07408435642719269,
0.049097515642642975,
-0.10993759334087372,
0.1973843276500702,
0.11965638399124146,
0.7663521766662598,
0.6555724143981934,
-0.08232895284891129,
-0.28139451146125793,
-0.08870749920606613,
-0.2264486849308014,
-0.02945564314723015,
-0.1210760623216629,
-0.018353603780269623,
-0.19157397747039795,
0.46125519275665283,
0.2556871771812439,
-0.35797119140625,
0.17517730593681335,
-0.2629181742668152,
-0.2018057107925415,
-0.11261451989412308,
0.11249703913927078,
-0.213692769408226,
0.02368241362273693,
0.0916539803147316,
0.466955304145813,
-0.07259984314441681,
0.3228863775730133,
-0.03769046068191528,
0.13406360149383545,
-0.3692814111709595,
-0.1002739816904068,
0.35504186153411865,
0.25347745418548584,
-0.40916743874549866,
0.48405420780181885,
0.11125817149877548,
0.021400678902864456,
-0.02040865831077099,
-0.2937958836555481,
0.31004369258880615,
0.13864712417125702,
-0.2728067934513092,
-0.0513293519616127,
0.25453275442123413,
-0.10606244206428528,
-0.08098161965608597,
0.13831570744514465,
0.23010896146297455,
0.3491556942462921,
0.06697610020637512,
-0.389557808637619,
-0.2239031344652176
] |
https://github.com/huggingface/datasets/issues/2598 | Unable to download omp dataset | Hi @erikadistefano , thanks for reporting the issue.
I have created a Pull Request that should fix it.
Once merged into master, feel free to update your installed `datasets` library (either by installing it from our GitHub master branch or waiting until our next release) to be able to load omp dataset. | ## Describe the bug
The omp dataset cannot be downloaded because of a DuplicatedKeysError
## Steps to reproduce the bug
from datasets import load_dataset
omp = load_dataset('omp', 'posts_labeled')
print(omp)
## Expected results
This code should download the omp dataset and print the dictionary
## Actual results
Downloading and preparing dataset omp/posts_labeled (download: 1.27 MiB, generated: 13.31 MiB, post-processed: Unknown size, total: 14.58 MiB) to /home/erika_distefano/.cache/huggingface/datasets/omp/posts_labeled/1.1.0/2fe5b067be3bff1d4588d5b0cbb9b5b22ae1b9d5b026a8ff572cd389f862735b...
0 examples [00:00, ? examples/s]2021-07-06 09:43:55.868815: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 990, in _prepare_split
writer.write(example, key)
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 338, in write
self.check_duplicate_keys()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 3326
Keys should be unique and deterministic in nature
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "hf_datasets.py", line 32, in <module>
omp = load_dataset('omp', 'posts_labeled')
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/load.py", line 748, in load_dataset
use_auth_token=use_auth_token,
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 3326
Keys should be unique and deterministic in nature
## Environment info
- `datasets` version: 1.8.0
- Platform: Ubuntu 18.04.4 LTS
- Python version: 3.6.9
- PyArrow version: 3.0.0
| 52 | Unable to download omp dataset
## Describe the bug
The omp dataset cannot be downloaded because of a DuplicatedKeysError
## Steps to reproduce the bug
from datasets import load_dataset
omp = load_dataset('omp', 'posts_labeled')
print(omp)
## Expected results
This code should download the omp dataset and print the dictionary
## Actual results
Downloading and preparing dataset omp/posts_labeled (download: 1.27 MiB, generated: 13.31 MiB, post-processed: Unknown size, total: 14.58 MiB) to /home/erika_distefano/.cache/huggingface/datasets/omp/posts_labeled/1.1.0/2fe5b067be3bff1d4588d5b0cbb9b5b22ae1b9d5b026a8ff572cd389f862735b...
0 examples [00:00, ? examples/s]2021-07-06 09:43:55.868815: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 990, in _prepare_split
writer.write(example, key)
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 338, in write
self.check_duplicate_keys()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 3326
Keys should be unique and deterministic in nature
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "hf_datasets.py", line 32, in <module>
omp = load_dataset('omp', 'posts_labeled')
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/load.py", line 748, in load_dataset
use_auth_token=use_auth_token,
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/erika_distefano/.local/lib/python3.6/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 3326
Keys should be unique and deterministic in nature
## Environment info
- `datasets` version: 1.8.0
- Platform: Ubuntu 18.04.4 LTS
- Python version: 3.6.9
- PyArrow version: 3.0.0
Hi @erikadistefano , thanks for reporting the issue.
I have created a Pull Request that should fix it.
Once merged into master, feel free to update your installed `datasets` library (either by installing it from our GitHub master branch or waiting until our next release) to be able to load omp dataset. | [
-0.2633763253688812,
-0.11635935306549072,
-0.08252900838851929,
0.10051024705171585,
0.23119881749153137,
-0.021743781864643097,
0.20523132383823395,
0.2830142378807068,
0.048313189297914505,
0.2094639539718628,
-0.20779301226139069,
0.5524358153343201,
-0.2091248333454132,
0.23590277135372162,
0.13298484683036804,
-0.26636460423469543,
-0.15812617540359497,
0.10206911712884903,
-0.33420559763908386,
-0.09262742102146149,
-0.11044439673423767,
0.29327139258384705,
-0.17788398265838623,
0.09048059582710266,
0.0324094295501709,
-0.18051046133041382,
-0.07453698664903641,
-0.04699062556028366,
-0.2778783440589905,
-0.3463788330554962,
0.05188649892807007,
0.05487920716404915,
-0.10146284103393555,
0.3988809883594513,
-0.00010960271174553782,
0.11781617999076843,
0.07417455315589905,
0.017112305387854576,
-0.14591191709041595,
-0.6719624996185303,
-0.13961024582386017,
-0.20140832662582397,
-0.08262063562870026,
-0.3633437156677246,
0.2272387444972992,
-0.2570015788078308,
0.05940664932131767,
-0.22670696675777435,
0.4353806972503662,
0.3867662250995636,
0.2739732265472412,
0.1229681521654129,
0.5405082702636719,
-0.07003871351480484,
0.13682076334953308,
-0.10913409292697906,
-0.12066341936588287,
0.34701961278915405,
0.05862336605787277,
0.15391120314598083,
0.2576218545436859,
0.32726243138313293,
0.02210295759141445,
0.2050425261259079,
0.09252367913722992,
0.012578885070979595,
0.13955801725387573,
-0.28003010153770447,
0.17920604348182678,
0.26130354404449463,
0.6987870931625366,
-0.3968588411808014,
-0.2707763910293579,
-0.11483422666788101,
0.21555955708026886,
-0.14401185512542725,
0.11427431553602219,
0.1241142600774765,
-0.19978493452072144,
0.07276570796966553,
-0.16058865189552307,
-0.03201359882950783,
-0.21355941891670227,
0.11175426840782166,
0.06572121381759644,
0.23256368935108185,
-0.0038950014859437943,
0.21636193990707397,
0.00007272139191627502,
-0.01699671521782875,
-0.08318697661161423,
-0.11486034095287323,
0.1384488195180893,
0.19057396054267883,
-0.11528690159320831,
-0.15327605605125427,
-0.05300493538379669,
-0.643604576587677,
0.2569108009338379,
0.02389475703239441,
0.3082268238067627,
-0.046323150396347046,
-0.2130422294139862,
0.03313165158033371,
0.1188264787197113,
0.22663451731204987,
0.14920008182525635,
0.041293881833553314,
0.10602191090583801,
0.12005483359098434,
-0.2173791378736496,
0.016823623329401016,
-0.08013273030519485,
-0.10014902800321579,
0.26476767659187317,
-0.055464670062065125,
0.5122632384300232,
-0.16099293529987335,
-0.4319579303264618,
0.23652322590351105,
-0.6948949694633484,
-0.10901442915201187,
-0.10884329676628113,
0.27707311511039734,
-0.07939919084310532,
-0.07464461773633957,
0.18085075914859772,
0.08326873183250427,
-0.23427622020244598,
-0.215696319937706,
-0.15666425228118896,
0.15462449193000793,
-0.03715450316667557,
-0.13525128364562988,
0.1518598198890686,
0.09009692072868347,
0.4250296354293823,
0.10700397938489914,
0.10887421667575836,
-0.5665578246116638,
0.2359188199043274,
0.18048162758350372,
-0.36078742146492004,
0.2312491536140442,
0.18124614655971527,
0.1465977430343628,
-0.06176884099841118,
0.037813857197761536,
-0.10027556866407394,
0.21245694160461426,
-0.16729366779327393,
-0.4056839346885681,
-0.07486674934625626,
0.34338247776031494,
0.05313543230295181,
-0.26994404196739197,
-0.1625707745552063,
-0.050822947174310684,
0.038954414427280426,
0.030983593314886093,
0.024678267538547516,
0.02246478572487831,
-0.256217896938324,
-0.24421164393424988,
0.14607514441013336,
0.26479071378707886,
-0.20397965610027313,
-0.06587192416191101,
-0.11586842685937881,
0.0010869242250919342,
0.2173057198524475,
0.21075165271759033,
-0.23821640014648438,
0.4920545816421509,
-0.12652231752872467,
-0.061378542333841324,
0.3794522285461426,
-0.294685423374176,
-0.5540878176689148,
0.14986325800418854,
-0.30938103795051575,
0.0878853052854538,
0.2221282571554184,
-0.04518883675336838,
0.1302655041217804,
0.16553711891174316,
0.12864142656326294,
-0.10271444171667099,
-0.13444291055202484,
-0.14395850896835327,
-0.3133152723312378,
-0.09504622220993042,
-0.23791341483592987,
0.035837505012750626,
0.18496990203857422,
-0.07829270511865616,
0.19712497293949127,
0.23298737406730652,
0.3517868220806122,
0.0966917872428894,
-0.06916741281747818,
0.22162988781929016,
0.30596017837524414,
-0.33004188537597656,
0.11082631349563599,
-0.22934675216674805,
-0.37397563457489014,
0.31553542613983154,
-0.01655711978673935,
-0.13559333980083466,
-0.030045077204704285,
-0.14324107766151428,
-0.531603991985321,
0.11481846123933792,
-0.047294143587350845,
0.07179643213748932,
0.16369615495204926,
-0.2225443720817566,
0.11997504532337189,
0.10335423052310944,
-0.19919966161251068,
0.3342377543449402,
-0.22978822886943817,
0.18912707269191742,
-0.04126550257205963,
0.0069938357919454575,
-0.3651171326637268,
0.06636955589056015,
0.18071205914020538,
0.15540257096290588,
0.15033528208732605,
-0.19908279180526733,
-0.18078815937042236,
0.40382733941078186,
-0.18736742436885834,
0.1631098985671997,
-0.19568496942520142,
-0.05841803550720215,
0.24309523403644562,
-0.24739712476730347,
-0.06984913349151611,
-0.04534599557518959,
0.17332281172275543,
0.014250926673412323,
-0.07704686373472214,
0.3409186601638794,
0.12122997641563416,
-0.21743804216384888,
0.015748657286167145,
0.2041933834552765,
0.3598780930042267,
-0.29171451926231384,
0.2594675123691559,
-0.22552450001239777,
0.4635399580001831,
-0.23633982241153717,
0.11572609841823578,
0.03737162798643112,
-0.19895370304584503,
0.29939189553260803,
0.06305450946092606,
0.006331335753202438,
0.11001896858215332,
-0.035482704639434814,
0.03148159757256508,
0.033440086990594864,
-0.07334839552640915,
0.4630732238292694,
0.24234262108802795,
0.2329948991537094,
0.08398006856441498,
0.1448703557252884,
-0.22240325808525085,
-0.14423124492168427,
0.20961672067642212,
0.06387622654438019,
0.12027890235185623,
0.3854893445968628,
0.09907335788011551,
0.14862829446792603,
-0.2791573405265808,
-0.2268591970205307,
0.45353612303733826,
0.3545288145542145,
-0.06497292220592499,
-0.0871000662446022,
-0.40043264627456665,
-0.23622485995292664,
-0.24781128764152527,
0.04715169966220856,
-0.06261470913887024,
-0.08938054740428925,
0.07931135594844818,
0.37668222188949585,
0.07222035527229309,
0.0774613693356514,
-0.005352528765797615,
0.00809277594089508,
-0.08714042603969574,
0.07691186666488647,
-0.011364035308361053,
-0.03304850310087204,
-0.26780304312705994,
0.12739010155200958,
0.2779999375343323,
-0.1478252410888672,
0.688592791557312,
0.032140761613845825,
-0.21633665263652802,
-0.5223973989486694,
-0.2491726279258728,
0.0373585969209671,
0.018759647384285927,
-0.2935933470726013,
0.04391393065452576,
-0.0209345743060112,
-0.13617642223834991,
-0.2722969949245453,
0.01980629935860634,
-0.24203035235404968,
-0.4843817949295044,
0.010391289368271828,
-0.11602313071489334,
-0.07208574563264847,
-0.2030249536037445,
-0.5646252632141113,
-0.2131236493587494,
-0.2400038093328476,
0.19354884326457977,
0.04669976606965065,
0.380845308303833,
0.24240802228450775,
-0.0673828050494194,
0.18595720827579498,
0.4195980727672577,
0.15391980111598969,
-0.19421081244945526,
-0.2394600808620453,
0.10296571254730225,
-0.21371354162693024,
-0.286795437335968,
0.047488342970609665,
-0.1526745706796646,
0.3554938733577728,
0.004659252241253853,
-0.6089305281639099,
-0.13658711314201355,
-0.2141961306333542,
0.024342533200979233,
-0.1862189918756485,
-0.1313258707523346,
0.3098134398460388,
0.015480903908610344,
-0.13652166724205017,
-0.2190905511379242,
-0.06299231946468353,
0.28794199228286743,
0.16355913877487183,
0.38208672404289246,
-0.13816019892692566,
0.5215932130813599,
0.20620478689670563,
0.5446684956550598,
0.20924828946590424,
0.030961982905864716,
0.27924925088882446,
-0.004617495462298393,
0.01929808408021927,
-0.05509869009256363,
-0.2558479607105255,
0.005471144802868366,
-0.0831020176410675,
0.009583640843629837,
0.00929107517004013,
-0.08934085816144943,
-0.07212565094232559,
-0.044656816869974136,
0.11755205690860748,
-0.36081477999687195,
-0.33770987391471863,
-0.10467228293418884,
-0.44690513610839844,
-0.048496708273887634,
0.21576040983200073,
0.06113872677087784,
-0.21308870613574982,
-0.007050123997032642,
0.09341627359390259,
0.020205862820148468,
-0.06889938563108444,
-0.0649510994553566,
-0.1495746523141861,
-0.019024154171347618,
-0.8308066129684448,
0.22517512738704681,
0.045099273324012756,
0.2880028784275055,
-0.12437501549720764,
0.32661956548690796,
0.393566370010376,
-0.16526900231838226,
0.391104519367218,
-0.16763414442539215,
0.26986610889434814,
0.09793657064437866,
-0.07905606925487518,
-0.14652375876903534,
-0.16566044092178345,
-0.2510335147380829,
0.08003155887126923,
0.40065962076187134,
0.35764026641845703,
-0.34976547956466675,
0.17940494418144226,
0.3486422300338745,
-0.06318935751914978,
-0.1417800337076187,
-0.21780654788017273,
0.08231261372566223,
-0.47434496879577637,
-0.48100173473358154,
-0.05216468125581741,
0.04391609877347946,
0.3531845808029175,
0.09113451093435287,
-0.030414346605539322,
-0.010776689276099205,
-0.036641113460063934,
0.16654519736766815,
-0.09437499940395355,
0.11842124909162521,
0.1601194143295288,
0.644845187664032,
0.09181499481201172,
-0.03527868539094925,
0.5881873965263367,
0.6839147210121155,
0.009393999353051186,
-0.5672085285186768,
-0.1577606201171875,
-0.1065872460603714,
-0.10101219266653061,
0.17822463810443878,
0.09080211073160172,
0.09334677457809448,
-0.2088739275932312,
-0.06466206908226013,
0.25874587893486023,
0.26434534788131714,
0.314203143119812,
0.07239078730344772,
-0.37630078196525574,
-0.25068309903144836,
0.31919631361961365,
-0.08175813406705856,
-0.15520137548446655,
0.584902822971344,
-0.0678471028804779,
-0.10478261858224869,
0.4721508026123047,
-0.011479713022708893,
0.7160583734512329,
-0.39857763051986694,
-0.09278476238250732,
0.07311379164457321,
-0.40176618099212646,
0.6066358089447021,
-0.2347753345966339,
0.13099820911884308,
-0.29871389269828796,
-0.20087066292762756,
0.039928920567035675,
-0.08245211839675903,
0.022216714918613434,
0.0752057358622551,
-0.19673682749271393,
-0.08724867552518845,
0.1580340713262558,
0.08727431297302246,
0.32063987851142883,
0.36741456389427185,
-0.03196477144956589,
-0.0848509669303894,
0.11500536650419235,
0.13733059167861938,
-0.2628634572029114,
0.4060242772102356,
-0.01812111772596836,
-0.06680383533239365,
0.10284499824047089,
-0.2992660403251648,
-0.4831857681274414,
0.21736031770706177,
-0.19474458694458008,
0.3185967803001404,
-0.062148530036211014,
-0.4355199933052063,
0.1259121298789978,
0.45831626653671265,
0.3842692971229553,
0.0739845559000969,
-0.10315170884132385,
0.20489250123500824,
0.2485315501689911,
-0.11783913522958755,
-0.13500536978244781,
-0.12105245888233185,
0.13636381924152374,
-0.18447723984718323,
-0.16478516161441803,
-0.02787230908870697,
0.13771918416023254,
-0.37018024921417236,
0.06738267838954926,
0.085800401866436,
0.17789801955223083,
0.10315871238708496,
0.10127179324626923,
0.11366795003414154,
-0.2541312277317047,
-0.43622395396232605,
0.1229943335056305,
-0.0469452366232872,
-0.24311281740665436,
0.15772564709186554,
-0.033042531460523605,
-0.4383397698402405,
0.04518096148967743,
0.4698190689086914,
0.34052416682243347,
-0.02508450672030449,
0.5422229766845703,
-0.18244433403015137,
0.02451872080564499,
-0.2797746956348419,
0.15969663858413696,
0.014383199624717236,
-0.19090336561203003,
0.2175249606370926,
-0.2706022262573242,
0.19175763428211212,
-0.028044769540429115,
0.27377837896347046,
0.295814573764801,
0.16458043456077576,
0.1127590537071228,
-0.42556312680244446,
-0.2509509027004242,
0.030122961848974228,
-0.06416328251361847,
0.13413254916667938,
0.0876583531498909,
0.41843175888061523,
-0.05069810152053833,
0.2553936541080475,
-0.3356301784515381,
0.14820736646652222,
-0.13183777034282684,
-0.05942027270793915,
0.1746106892824173,
-0.17171144485473633,
0.0425732284784317,
0.07189422845840454,
0.20413699746131897,
0.24372927844524384,
-0.10997899621725082,
-0.2864663898944855,
-0.2727624475955963,
0.12192531675100327,
-0.017965737730264664,
-0.00886358879506588,
-0.05679520219564438,
-0.2603071928024292,
-0.126079261302948,
0.13988704979419708,
-0.07489113509654999,
0.4401756227016449,
0.0784294456243515,
-0.16445598006248474,
0.1582755148410797,
0.24886950850486755,
-0.24606391787528992,
-0.03894992917776108,
-0.33696305751800537,
0.2750457525253296,
0.17593295872211456,
0.2675979733467102,
0.029240379109978676,
-0.12881417572498322,
-0.22964684665203094,
-0.2728821635246277,
-0.21313081681728363,
-0.14649656414985657,
0.24355590343475342,
-0.30185526609420776,
-0.04216894134879112,
0.15195435285568237,
0.24602267146110535,
0.1520494520664215,
-0.24860802292823792,
-0.16321933269500732,
0.16443589329719543,
0.24596920609474182,
-0.37973910570144653,
-0.28607872128486633,
0.20329125225543976,
0.26552799344062805,
0.10338626801967621,
0.31629297137260437,
0.1810368448495865,
-0.1276569366455078,
-0.0802396684885025,
-0.0684380978345871,
0.24738259613513947,
0.04037610441446304,
0.051541682332754135,
0.2337283343076706,
-0.061350513249635696,
-0.13159967958927155,
0.20034104585647583,
0.16556766629219055,
0.24642413854599,
0.2796701490879059,
-0.3739526569843292,
0.10082311928272247,
0.15907052159309387,
0.25484541058540344,
0.1725820004940033,
-0.2700340151786804,
0.02078254520893097,
0.053929246962070465,
-0.2069554328918457,
0.20229873061180115,
0.13905246555805206,
0.09932577610015869,
-0.2250608503818512,
-0.06419171392917633,
-0.14981335401535034,
0.11194820702075958,
-0.11649978905916214,
0.09845000505447388,
-0.48470965027809143,
-0.14654946327209473,
-0.21888941526412964,
0.17690594494342804,
0.03033681958913803,
-0.10449393093585968,
0.20717862248420715,
0.09878076612949371,
-0.3320994973182678,
-0.42192500829696655,
-0.2849453389644623,
0.1937776505947113,
0.22109341621398926,
-0.4458441734313965,
0.2861195504665375,
0.14531390368938446,
-0.22794628143310547,
-0.11886562407016754,
0.4128705859184265,
0.28825435042381287,
0.13772094249725342,
-0.004457706585526466,
0.18669967353343964,
0.2432628870010376,
0.06140904873609543,
-0.06629777699708939,
0.14676865935325623,
0.3831852674484253,
0.18610750138759613,
0.2336895614862442,
0.09374620020389557,
-0.14204446971416473,
-0.04586023464798927,
0.4072278141975403,
-0.051563482731580734,
0.026014097034931183,
0.201806902885437,
-0.12658263742923737,
-0.11345048248767853,
-0.04114939272403717,
0.16521981358528137,
-0.20652276277542114,
-0.35504525899887085,
0.08978505432605743,
0.06075441464781761,
0.13786983489990234,
0.010945182293653488,
0.11264503002166748,
-0.12174460291862488,
0.1125573068857193,
0.34110045433044434,
0.21329855918884277,
-0.42586010694503784,
-0.16143761575222015,
-0.6133245825767517,
0.38121581077575684,
-0.34733936190605164,
-0.002552362158894539,
0.03220801055431366,
0.2755568027496338,
-0.04451590031385422,
0.04744114726781845,
0.3256106972694397,
0.020612087100744247,
-0.13623227179050446,
0.530382513999939,
-0.39044874906539917,
-0.07948678731918335,
0.15652549266815186,
-0.2918986678123474,
-0.01342866849154234,
-0.28159502148628235,
0.28255343437194824,
-0.2720343768596649,
0.029364705085754395,
0.005583878606557846,
-0.0935334712266922,
0.2100784033536911,
-0.07036691904067993,
0.38036397099494934,
0.06225951015949249,
0.5195215344429016,
-0.030838117003440857,
-0.1754380166530609,
0.09449850022792816,
-0.011274773627519608,
-0.3946167230606079,
0.18183282017707825,
0.3479686379432678,
0.20453135669231415,
-0.09176836907863617,
-0.04745220020413399,
0.029755478724837303,
0.4856366217136383,
0.20239153504371643,
-0.15209312736988068,
-0.3098868727684021,
0.061571069061756134,
-0.22549301385879517,
0.10065826773643494,
0.008264088071882725,
0.3684367537498474,
0.06007978320121765,
0.1921825259923935,
-0.33775830268859863,
-0.4812723398208618,
0.5101732015609741,
-0.2088741958141327,
-0.09347985684871674,
-0.16106750071048737,
0.3750952482223511,
0.058628275990486145,
-0.0781513899564743,
-0.46961644291877747,
-0.11142095923423767,
0.36270806193351746,
-0.41146624088287354,
-0.21397584676742554,
-0.03889457508921623,
-0.06120205298066139,
0.03700405731797218,
-0.061633989214897156,
0.5893384218215942,
-0.026026424020528793,
-0.22749315202236176,
0.28756359219551086,
-0.2218986302614212
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Hi ! Do you have an example in mind that shows how this could be useful ? | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 17 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Hi ! Do you have an example in mind that shows how this could be useful ? | [
-0.41881972551345825,
-0.11185593158006668,
-0.021109823137521744,
0.16497838497161865,
0.44314730167388916,
-0.07371740788221359,
0.5200477838516235,
0.025510404258966446,
-0.00009091757237911224,
-0.061289384961128235,
0.13835756480693817,
0.35540682077407837,
-0.366428017616272,
0.1816854327917099,
0.14372268319129944,
-0.12673228979110718,
-0.019303396344184875,
0.3366397023200989,
-0.3813779950141907,
-0.14552202820777893,
-0.18102112412452698,
-0.3653591275215149,
-0.1667024791240692,
0.020922914147377014,
-0.1870875507593155,
-0.07787241786718369,
-0.032445140182971954,
-0.48121780157089233,
-0.033489301800727844,
-0.0890979990363121,
0.7275012135505676,
0.04963243752717972,
-0.01562667451798916,
0.645778238773346,
-0.00011804079986177385,
-0.19178393483161926,
0.09638718515634537,
-0.07683750987052917,
0.07401891052722931,
-0.39263129234313965,
-0.4702484905719757,
-0.09309963136911392,
0.03848012536764145,
-0.2704017758369446,
-0.4740888178348541,
-0.05278823524713516,
-0.03906800597906113,
-0.05446062609553337,
0.401872456073761,
0.13899825513362885,
0.17207281291484833,
-0.4391125738620758,
-0.1384250670671463,
-0.12190177291631699,
-0.07935240119695663,
0.44446372985839844,
-0.286996066570282,
-0.13274119794368744,
0.1904749572277069,
0.3042657673358917,
0.0484435074031353,
-0.02562846802175045,
-0.04942997545003891,
-0.15038201212882996,
0.7289831638336182,
-0.1378202885389328,
0.10423725843429565,
-0.4418714940547943,
-0.17863881587982178,
0.4444396495819092,
0.7537166476249695,
-0.3168216943740845,
-0.16756540536880493,
-0.1634073555469513,
0.2200717031955719,
0.2761266231536865,
-0.023150429129600525,
0.20091427862644196,
-0.02806057408452034,
0.28652873635292053,
-0.2226811945438385,
-0.25749462842941284,
-0.42249593138694763,
0.03227447718381882,
-0.5201641321182251,
0.11669650673866272,
-0.06819146126508713,
0.008747328072786331,
0.009133819490671158,
-0.052633658051490784,
0.26580584049224854,
0.06938664615154266,
0.11794202029705048,
0.17348209023475647,
-0.1398364156484604,
-0.5531543493270874,
-0.34619930386543274,
0.2137342393398285,
-0.1130962148308754,
-0.005009882152080536,
-0.1444610357284546,
-0.15903767943382263,
0.10091964900493622,
-0.0037082023918628693,
-0.04535361006855965,
0.2560715675354004,
0.04442426562309265,
0.28347256779670715,
0.15481247007846832,
-0.3329984247684479,
-0.18650121986865997,
0.14892446994781494,
0.004497374873608351,
-0.14534418284893036,
0.12781572341918945,
0.08482065796852112,
0.07673534750938416,
-0.1519826054573059,
0.0595550462603569,
-0.2803950607776642,
-0.01936788484454155,
0.04588409885764122,
-0.13188529014587402,
0.04307374730706215,
0.18125568330287933,
0.07920077443122864,
0.1768164038658142,
0.24583184719085693,
0.23447783291339874,
-0.22858063876628876,
0.0617155022919178,
0.2511281967163086,
-0.297173410654068,
-0.13998495042324066,
0.03754196688532829,
0.16391167044639587,
-0.2676413953304291,
0.006230193190276623,
-0.12349924445152283,
0.38048961758613586,
-0.00012044794857501984,
-0.26225295662879944,
0.14762014150619507,
0.29598185420036316,
-0.5519157648086548,
-0.21851980686187744,
0.15826866030693054,
-0.17859846353530884,
-0.2252626121044159,
0.46311289072036743,
-0.19851863384246826,
0.02311614528298378,
0.09012676030397415,
0.17781370878219604,
-0.033697936683893204,
0.0682862177491188,
-0.16854766011238098,
0.33712756633758545,
0.044504858553409576,
-0.11007697880268097,
0.17105937004089355,
-0.3961249589920044,
-0.10473782569169998,
-0.14223968982696533,
-0.09998708963394165,
0.09168694913387299,
-0.6140990257263184,
-0.3623420000076294,
-0.17605479061603546,
-0.07487119734287262,
0.11735896021127701,
0.06891453266143799,
-0.22854860126972198,
0.30405670404434204,
-0.14126668870449066,
-0.17977973818778992,
0.6639190316200256,
0.07276345789432526,
-0.27186471223831177,
0.20406755805015564,
-0.5375024676322937,
-0.13424642384052277,
0.14890941977500916,
0.39131009578704834,
0.2420562505722046,
-0.21895429491996765,
-0.5890012979507446,
0.23511569201946259,
-0.04817690700292587,
-0.13639403879642487,
0.09845970571041107,
-0.17218641936779022,
0.586936354637146,
0.02074512094259262,
0.29492270946502686,
0.4651505649089813,
0.1826668679714203,
0.5072152614593506,
-0.14355850219726562,
-0.37115752696990967,
0.2393028289079666,
-0.08109817653894424,
0.4471270442008972,
-0.04506070911884308,
0.0037965700030326843,
-0.3930870592594147,
-0.0073081329464912415,
-0.12235154211521149,
-0.08500142395496368,
0.13314194977283478,
0.37024837732315063,
-0.0906621515750885,
0.022119510918855667,
-0.31940776109695435,
-0.14612142741680145,
-0.11931201815605164,
0.14471518993377686,
-0.3999892473220825,
0.2801673114299774,
-0.2651735544204712,
-0.10513152182102203,
0.44936612248420715,
0.006080484017729759,
0.06006785109639168,
-0.4010297358036041,
0.2931925356388092,
0.08193008601665497,
0.22274810075759888,
-0.3591739535331726,
-0.04498688131570816,
-0.14419013261795044,
-0.19693143665790558,
-0.10154516994953156,
-0.18366369605064392,
-0.05840406194329262,
-0.05127841234207153,
0.008519589900970459,
0.43928825855255127,
0.2763766348361969,
-0.4933922588825226,
0.489682137966156,
0.07932058721780777,
0.09571906179189682,
-0.1939777135848999,
-0.34881627559661865,
0.4720555543899536,
-0.15012796223163605,
0.250313937664032,
-0.32073187828063965,
0.03624285012483597,
0.1863243281841278,
-0.4335702359676361,
-0.12522707879543304,
-0.0907752513885498,
-0.04599537327885628,
0.02808734029531479,
0.13917790353298187,
0.20288528501987457,
0.01947842538356781,
-0.10247648507356644,
-0.0012695826590061188,
-0.094983771443367,
0.2904401123523712,
0.46381479501724243,
-0.23570695519447327,
0.265341192483902,
-0.24323639273643494,
0.5296254754066467,
0.6370880603790283,
0.1556207686662674,
-0.2533012628555298,
0.2274799793958664,
0.09587191045284271,
-0.15038496255874634,
0.280673086643219,
-0.09431169927120209,
0.27169501781463623,
0.03509790450334549,
-0.15714579820632935,
0.13692164421081543,
0.07075780630111694,
-0.35829809308052063,
-0.0043882085010409355,
0.19408103823661804,
-0.10778847336769104,
0.04591798782348633,
-0.18414099514484406,
-0.09737706184387207,
-0.3303302526473999,
0.0659509226679802,
0.07209739089012146,
0.14699935913085938,
-0.09452392160892487,
-0.07283234596252441,
0.281208336353302,
0.0661744698882103,
-0.08332724869251251,
0.2607303261756897,
0.2367432862520218,
-0.057936541736125946,
-0.14711269736289978,
-0.0701679065823555,
0.07776901125907898,
0.15805846452713013,
-0.17417825758457184,
0.016990726813673973,
0.25427913665771484,
-0.34220370650291443,
0.13138020038604736,
-0.09901876747608185,
-0.4404468834400177,
-0.01193787157535553,
0.056602880358695984,
0.1673402041196823,
0.34222155809402466,
0.024785786867141724,
-0.08968427032232285,
0.04936858266592026,
-0.020710131153464317,
0.04608616232872009,
-0.18600347638130188,
-0.0157505813986063,
-0.2754976749420166,
0.23329560458660126,
0.08404485881328583,
-0.2450779378414154,
-0.2703361511230469,
-0.1052667647600174,
0.17080259323120117,
0.05757876858115196,
-0.05846007913351059,
0.011633745394647121,
0.08250211179256439,
-0.019699564203619957,
0.01605885848402977,
0.1571207344532013,
-0.0940389335155487,
0.036074649542570114,
0.27733850479125977,
0.08925323188304901,
-0.11801116168498993,
-0.1655021458864212,
-0.272834837436676,
-0.0858476310968399,
0.29584914445877075,
-0.31100064516067505,
0.0010260418057441711,
-0.11238159239292145,
0.022187653928995132,
-0.0838603526353836,
-0.145645409822464,
0.5014489889144897,
0.050976090133190155,
0.02375270240008831,
-0.021802851930260658,
0.06575852632522583,
-0.07431455701589584,
0.18657207489013672,
0.3480320870876312,
0.1766141653060913,
0.4494117796421051,
-0.016608184203505516,
0.225457563996315,
-0.3424140512943268,
-0.43817177414894104,
-0.2640427052974701,
0.05380897969007492,
-0.00427965447306633,
0.10790565609931946,
-0.41741815209388733,
0.24367493391036987,
0.2311609983444214,
-0.304920494556427,
-0.012119650840759277,
-0.08343467861413956,
-0.22157564759254456,
-0.16622477769851685,
-0.21215996146202087,
0.047875501215457916,
-0.07027431577444077,
0.01712406985461712,
-0.20957404375076294,
-0.06293600052595139,
-0.19674988090991974,
-0.04942278936505318,
0.12609221041202545,
-0.10384413599967957,
0.029248535633087158,
0.5218983292579651,
0.11035039275884628,
-0.04522999748587608,
-0.024213489145040512,
0.024873504415154457,
0.2543199360370636,
-0.0987890213727951,
-0.29556432366371155,
0.020069606602191925,
-0.08347171545028687,
0.056851789355278015,
-0.004699587821960449,
0.1922794133424759,
0.7796643376350403,
-0.055133968591690063,
0.19615605473518372,
0.1951417624950409,
-0.3799057900905609,
-0.20249617099761963,
0.05599096044898033,
-0.28587114810943604,
-0.1767360419034958,
0.01138920709490776,
0.08224143087863922,
-0.07985120266675949,
-0.12255844473838806,
0.10506486147642136,
0.27618104219436646,
-0.29477640986442566,
-0.36785179376602173,
0.18424002826213837,
0.008705899119377136,
-0.25606799125671387,
0.21490439772605896,
0.032303087413311005,
-0.15093249082565308,
-0.12190716713666916,
-0.05973391979932785,
-0.3734532594680786,
-0.002095453441143036,
0.310372531414032,
-0.14195606112480164,
-0.17178308963775635,
-0.09935508668422699,
0.2183588296175003,
0.00021246448159217834,
0.23024041950702667,
0.09645742923021317,
-0.0325968936085701,
0.20106013119220734,
-0.5295640230178833,
0.04635334014892578,
0.010304667986929417,
0.2909167408943176,
-0.21279752254486084,
0.04905758798122406,
-0.07316198199987411,
-0.09935265779495239,
0.2489531934261322,
-0.17136743664741516,
0.05671430751681328,
-0.06794840842485428,
0.043336838483810425,
-0.2862585484981537,
-0.39913514256477356,
0.3170524835586548,
0.19240470230579376,
-0.13701236248016357,
-0.029917672276496887,
-0.029586106538772583,
-0.5042585730552673,
0.1977590024471283,
0.559302806854248,
0.9863243103027344,
0.11598730087280273,
0.13852150738239288,
-0.1127605214715004,
-0.031208137050271034,
0.4583589434623718,
-0.11648952960968018,
-0.05821933597326279,
-0.29653796553611755,
-0.39263275265693665,
-0.23659391701221466,
-0.30422064661979675,
0.3992508351802826,
0.53607577085495,
-0.5129194855690002,
0.2585296928882599,
-0.37171804904937744,
-0.08380685746669769,
0.22416672110557556,
-0.10479956120252609,
0.3480711281299591,
-0.3577428162097931,
0.04610341787338257,
0.16791586577892303,
-0.08825400471687317,
0.2601304054260254,
0.03085717186331749,
-0.1675018072128296,
-0.07119990885257721,
0.28085607290267944,
-0.08807668089866638,
-0.06897027790546417,
-0.2679659128189087,
-0.14558099210262299,
-0.20074237883090973,
-0.4343772530555725,
0.8832829594612122,
0.37552669644355774,
0.21613571047782898,
0.22574593126773834,
-0.1638481318950653,
0.046508364379405975,
-0.07440353184938431,
0.30899322032928467,
0.0002888268791139126,
-0.18428729474544525,
0.45559194684028625,
-0.04589651897549629,
-0.0858478844165802,
0.06826717406511307,
0.012259679846465588,
-0.11869381368160248,
0.21348699927330017,
-0.17560185492038727,
0.11995385587215424,
-0.3734196722507477,
-0.01966601423919201,
0.03309714421629906,
0.018279988318681717,
-0.008692417293787003,
0.14617392420768738,
0.3212880492210388,
-0.035991739481687546,
0.4378371238708496,
0.359959214925766,
-0.2925550937652588,
-0.09265978634357452,
0.15254096686840057,
0.5887405872344971,
0.05939502269029617,
0.12736627459526062,
-0.38415974378585815,
-0.31160181760787964,
-0.38537558913230896,
0.2694803476333618,
-0.05881522595882416,
-0.2542472183704376,
0.22761040925979614,
0.06993069499731064,
0.02293252944946289,
-0.006897572427988052,
-0.3377261161804199,
0.2592754364013672,
0.29405471682548523,
-0.36910203099250793,
-0.4159674346446991,
-0.35631418228149414,
-0.2046516388654709,
0.09089812636375427,
0.070982426404953,
-0.07472763955593109,
0.19500525295734406,
0.3595224618911743,
0.02231631428003311,
-0.31310516595840454,
-0.05368644744157791,
0.004884606227278709,
0.1169305220246315,
0.17780429124832153,
0.16549725830554962,
-0.392032653093338,
0.16791705787181854,
0.01831611804664135,
-0.09339304268360138,
-0.14483365416526794,
-0.19754210114479065,
-0.17095835506916046,
0.15066245198249817,
0.15068286657333374,
0.2185852974653244,
-0.1473587602376938,
0.04010944068431854,
-0.014419831335544586,
0.10926520079374313,
-0.017783280462026596,
0.22909751534461975,
-0.05778402090072632,
0.375197172164917,
0.44899889826774597,
-0.27985459566116333,
-0.46485280990600586,
0.05322868376970291,
0.07201302796602249,
-0.0067786723375320435,
-0.15879420936107635,
0.2750157117843628,
0.09910261631011963,
0.09454520046710968,
-0.5071007609367371,
0.0320359468460083,
0.09959451854228973,
-0.06159106642007828,
0.41865381598472595,
-0.007899545133113861,
0.4520021080970764,
0.5059016942977905,
-0.044164106249809265,
0.05014405399560928,
-0.19266557693481445,
0.013904901221394539,
0.25092068314552307,
0.1545984447002411,
-0.3792208731174469,
0.13635660707950592,
0.2737792134284973,
0.01603972539305687,
-0.04809343442320824,
0.29519081115722656,
-0.04358677938580513,
0.08830153942108154,
-0.07070620357990265,
-0.10387770086526871,
0.418401837348938,
-0.36031973361968994,
0.27637767791748047,
0.6955440640449524,
-0.27418458461761475,
-0.000025209039449691772,
0.5876778960227966,
0.02941509708762169,
-0.0534791424870491,
0.34871941804885864,
0.16481243073940277,
0.3593233525753021,
0.11409890651702881,
-0.07635223865509033,
0.2673565447330475,
0.2705794870853424,
0.11856997013092041,
0.6662787199020386,
-0.07757066190242767,
-0.18246090412139893,
0.13055500388145447,
-0.18517687916755676,
-0.03667182847857475,
-0.2404724806547165,
-0.04606453329324722,
0.15598206222057343,
-0.23953568935394287,
0.32086482644081116,
-0.20139510929584503,
-0.056617431342601776,
0.12622272968292236,
-0.3402046263217926,
-0.16031619906425476,
-0.2548772692680359,
0.3563579022884369,
0.12667736411094666,
0.05375901982188225,
0.22560763359069824,
0.35044094920158386,
0.06690370291471481,
0.08717916905879974,
-0.08892703056335449,
-0.2596399486064911,
0.1178579106926918,
0.1217086911201477,
0.16990792751312256,
0.5181456804275513,
0.03592587262392044,
0.18658077716827393,
-0.04960471764206886,
0.05858803167939186,
-0.17138199508190155,
-0.24734574556350708,
0.09499049186706543,
0.2725587487220764,
-0.2967207729816437,
-0.15805597603321075,
0.18447163701057434,
0.2032933533191681,
-0.12133027613162994,
0.4222796857357025,
0.03669295832514763,
0.20910413563251495,
-0.25141075253486633,
0.39762982726097107,
0.3067564070224762,
-0.18231314420700073,
-0.1009441465139389,
0.1998399943113327,
0.0393761470913887,
-0.00329399760812521,
0.43142545223236084,
-0.4219200909137726,
-0.0242355577647686,
-0.04154147207736969,
0.03870226815342903,
0.21408727765083313,
0.13128238916397095,
0.01813264563679695,
0.01498572900891304,
-0.015118925832211971,
0.04978311061859131,
-0.3194946348667145,
0.20273102819919586,
0.16578248143196106,
0.01850941963493824,
-0.13365018367767334,
-0.20754818618297577,
0.00969766080379486,
0.25013262033462524,
0.05542591214179993,
-0.1713767647743225,
-0.14103832840919495,
0.20183686912059784,
-0.03654209151864052,
-0.02783413603901863,
0.153926283121109,
0.42837414145469666,
0.022340569645166397,
-0.22470206022262573,
0.07162249088287354,
0.29971447587013245,
0.02641197293996811,
-0.032923273742198944,
0.35139092803001404,
0.03854324296116829,
0.29778844118118286,
0.20751555263996124,
0.0420178659260273,
0.6284481287002563,
-0.05375969409942627,
0.379989355802536,
0.5167911052703857,
-0.033260032534599304,
-0.23738506436347961,
0.29584801197052,
0.20155419409275055,
-0.2141612023115158,
-0.24493171274662018,
-0.10700094699859619,
0.138083815574646,
-0.2363913506269455,
0.006223142147064209,
0.060479786247015,
-0.8246729373931885,
0.041549764573574066,
-0.1709612011909485,
-0.11131064593791962,
0.11977680027484894,
0.027487846091389656,
-0.06765072792768478,
-0.06712423264980316,
-0.05248361453413963,
-0.12982501089572906,
0.2856084406375885,
0.07810623943805695,
-0.33400845527648926,
-0.17240755259990692,
-0.06888680160045624,
-0.33146482706069946,
0.12221764773130417,
-0.06508713215589523,
-0.0006402283906936646,
0.4729185104370117,
-0.06968286633491516,
0.383110910654068,
0.05829398334026337,
-0.07388065755367279,
-0.0992475152015686,
-0.23022189736366272,
0.6369762420654297,
-0.2621822655200958,
0.042227670550346375,
-0.22691074013710022,
-0.09620825201272964
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Example:
Merge 2 datasets into one datasets
Label extraction from dataset
dataset(text, label)
—> dataset(text, newlabel)
TextCleaning.
For image dataset,
Transformation are easier (ie linear algebra).
> On Jul 6, 2021, at 17:39, Quentin Lhoest ***@***.***> wrote:
>
>
> Hi ! Do you have an example in mind that shows how this could be useful ?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 83 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Example:
Merge 2 datasets into one datasets
Label extraction from dataset
dataset(text, label)
—> dataset(text, newlabel)
TextCleaning.
For image dataset,
Transformation are easier (ie linear algebra).
> On Jul 6, 2021, at 17:39, Quentin Lhoest ***@***.***> wrote:
>
>
> Hi ! Do you have an example in mind that shows how this could be useful ?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| [
-0.4854315519332886,
0.15292999148368835,
-0.08864022046327591,
0.1896282583475113,
0.40064549446105957,
0.10685019940137863,
0.5075278282165527,
0.12447439134120941,
-0.011682716198265553,
-0.06204448640346527,
0.05338219553232193,
0.33453232049942017,
-0.35074296593666077,
0.18758204579353333,
0.07216080278158188,
-0.13148945569992065,
-0.02831127494573593,
0.3180106282234192,
-0.44351109862327576,
-0.1215897724032402,
-0.21722595393657684,
-0.2452007383108139,
-0.2043328732252121,
-0.03501732647418976,
-0.2736262381076813,
-0.13871276378631592,
-0.11187148839235306,
-0.274432897567749,
-0.12857191264629364,
0.0032410481944680214,
0.5669194459915161,
0.21555005013942719,
-0.0712965875864029,
0.5656960010528564,
-0.00011136322427773848,
-0.12790225446224213,
0.11006048321723938,
-0.008049014955759048,
-0.13629116117954254,
-0.3996155261993408,
-0.41637009382247925,
-0.06039658188819885,
-0.039646610617637634,
-0.2917911410331726,
-0.26644599437713623,
-0.18540744483470917,
0.02377552166581154,
-0.06451451778411865,
0.4134101867675781,
0.07513901591300964,
0.21365372836589813,
-0.42071157693862915,
-0.0813189446926117,
-0.1326415240764618,
-0.07253245264291763,
0.4323451519012451,
-0.1573558896780014,
-0.07395748794078827,
0.2559337615966797,
0.2774955630302429,
-0.005222685635089874,
0.2231018990278244,
-0.10980833321809769,
-0.21184729039669037,
0.6597420573234558,
-0.08687290549278259,
-0.05188988894224167,
-0.36802229285240173,
-0.17201179265975952,
0.30207207798957825,
0.6202866435050964,
-0.41654670238494873,
-0.2718198895454407,
-0.23530802130699158,
0.3179526627063751,
0.13809749484062195,
-0.09366431087255478,
0.15360385179519653,
-0.02915266342461109,
0.28622809052467346,
-0.3013933598995209,
-0.30707645416259766,
-0.312664657831192,
0.0769139751791954,
-0.39279040694236755,
0.18383421003818512,
-0.01870238035917282,
0.07870671898126602,
0.026106977835297585,
-0.01206151768565178,
0.2786215543746948,
0.028674324974417686,
0.17349039018154144,
0.13025137782096863,
-0.1575935035943985,
-0.44309714436531067,
-0.3470899164676666,
-0.016472049057483673,
-0.1724015176296234,
0.0820518434047699,
-0.06693767011165619,
-0.1407574713230133,
0.00015153735876083374,
0.06787500530481339,
-0.09761843085289001,
0.2801894247531891,
0.07562507688999176,
0.28350991010665894,
0.09272516518831253,
-0.2981131076812744,
-0.13427887856960297,
0.2335575819015503,
-0.15006844699382782,
-0.18283627927303314,
0.08238765597343445,
0.07516346871852875,
0.08817532658576965,
0.06075676158070564,
0.007932713255286217,
-0.3705032765865326,
0.010206915438175201,
0.010420778766274452,
-0.1592569649219513,
0.01142701506614685,
0.21353602409362793,
0.05374087020754814,
0.22687788307666779,
0.19773715734481812,
0.2781529128551483,
-0.2910175025463104,
0.003311889711767435,
0.3380632698535919,
-0.31294527649879456,
-0.15538138151168823,
0.0573047511279583,
0.09892435371875763,
-0.3175143003463745,
-0.006846569944173098,
-0.24449197947978973,
0.3860969543457031,
-0.010476583614945412,
-0.24803078174591064,
0.2561531960964203,
0.19992540776729584,
-0.4474494457244873,
-0.13089852035045624,
0.1515340507030487,
-0.2037792205810547,
-0.2086186707019806,
0.3421454429626465,
-0.19574257731437683,
0.1629631072282791,
0.06557591259479523,
0.2365569770336151,
0.11480170488357544,
0.03165096789598465,
-0.2980533242225647,
0.39044398069381714,
0.011353470385074615,
-0.06307626515626907,
0.10277790576219559,
-0.3152856230735779,
-0.06384649872779846,
-0.07782547175884247,
-0.07142085582017899,
0.13448114693164825,
-0.6597016453742981,
-0.3752608895301819,
-0.08923809975385666,
-0.04004417732357979,
0.02573954313993454,
0.17851048707962036,
-0.16793733835220337,
0.37262141704559326,
-0.1166769415140152,
-0.20428352057933807,
0.7212475538253784,
-0.06591793149709702,
-0.19491282105445862,
0.15814416110515594,
-0.5203285217285156,
-0.19140499830245972,
0.16405287384986877,
0.37043526768684387,
0.25961726903915405,
-0.17472946643829346,
-0.45526209473609924,
0.35977232456207275,
-0.1351933777332306,
-0.13348081707954407,
0.15245501697063446,
-0.2831432819366455,
0.4489608407020569,
0.1342543363571167,
0.2727266550064087,
0.27755361795425415,
0.08477043360471725,
0.4158124029636383,
-0.14019045233726501,
-0.4404047727584839,
0.28437283635139465,
0.040146443992853165,
0.30447712540626526,
-0.12694863975048065,
-0.03285042196512222,
-0.38591498136520386,
-0.1105199083685875,
-0.1262238770723343,
0.04785596579313278,
0.1563083529472351,
0.26923587918281555,
-0.05149098485708237,
-0.050979133695364,
-0.28546443581581116,
-0.16288751363754272,
-0.22486546635627747,
0.20877930521965027,
-0.34000423550605774,
0.25047945976257324,
-0.31470006704330444,
-0.07456979155540466,
0.5503131151199341,
0.03704511374235153,
0.21372778713703156,
-0.5016194581985474,
0.32242366671562195,
0.04493856430053711,
0.2022387683391571,
-0.3285861909389496,
0.047154754400253296,
-0.2616766691207886,
-0.2003248631954193,
0.002497431356459856,
-0.1345226764678955,
-0.09608479589223862,
-0.046261265873909,
0.09162456542253494,
0.3488047122955322,
0.31091004610061646,
-0.4374362826347351,
0.3571302890777588,
-0.08325611054897308,
0.196589395403862,
-0.1748177856206894,
-0.4034092426300049,
0.31442874670028687,
-0.22896750271320343,
0.28993329405784607,
-0.17747600376605988,
0.050870828330516815,
0.135777086019516,
-0.35507872700691223,
-0.11696072667837143,
-0.14954516291618347,
-0.06055940315127373,
-0.007577011361718178,
0.25073346495628357,
0.25669094920158386,
0.09110428392887115,
-0.08593621104955673,
0.14854733645915985,
-0.06722599267959595,
0.2210763394832611,
0.3868334889411926,
-0.2876424193382263,
0.22639945149421692,
-0.20820748805999756,
0.558769702911377,
0.4472165107727051,
0.2356889694929123,
-0.2560155689716339,
0.23048362135887146,
0.10215601325035095,
-0.07364009320735931,
0.26214173436164856,
0.026759732514619827,
0.44270986318588257,
-0.01327650249004364,
-0.044140398502349854,
0.21165654063224792,
0.044238731265068054,
-0.49060460925102234,
0.08058691024780273,
0.10660088062286377,
-0.020708493888378143,
0.0048887114971876144,
-0.18069559335708618,
-0.18151533603668213,
-0.4042210280895233,
0.15406642854213715,
0.037680964916944504,
-0.061111897230148315,
-0.0880037471652031,
-0.07290208339691162,
0.10770691931247711,
0.1231759786605835,
0.0667179524898529,
0.22310417890548706,
0.23783676326274872,
-0.15400061011314392,
-0.05822129175066948,
-0.11083287745714188,
0.05761459469795227,
0.19075070321559906,
-0.06669361889362335,
0.0429171621799469,
0.38644564151763916,
-0.36717289686203003,
0.23922882974147797,
-0.1411265879869461,
-0.5004369616508484,
0.13608579337596893,
-0.02469290792942047,
0.03684711828827858,
0.37807077169418335,
-0.08697015047073364,
-0.10102050006389618,
-0.04032426327466965,
0.02269039861857891,
0.05770055949687958,
-0.20354950428009033,
0.004541384056210518,
-0.23006518185138702,
0.07991120964288712,
0.04350205883383751,
-0.22631359100341797,
-0.3054027855396271,
-0.21694160997867584,
0.22144991159439087,
-0.012898651883006096,
-0.04391847550868988,
0.023433975875377655,
0.15077562630176544,
0.03176027908921242,
-0.08101727068424225,
0.1676730215549469,
-0.08090609312057495,
0.039048511534929276,
0.17361962795257568,
0.12728136777877808,
-0.09196129441261292,
-0.27837130427360535,
-0.36309194564819336,
0.023473987355828285,
0.3173162341117859,
-0.23527319729328156,
0.01467133965343237,
-0.1455157846212387,
0.04554261639714241,
-0.007652487605810165,
-0.07875709235668182,
0.5167160034179688,
0.13599127531051636,
-0.025053422898054123,
-0.04488616809248924,
0.00408056378364563,
-0.08321959525346756,
0.04592851176857948,
0.12903448939323425,
0.07093790173530579,
0.3557414412498474,
0.04346225783228874,
0.25244659185409546,
-0.19931969046592712,
-0.37292760610580444,
-0.29994580149650574,
0.19886955618858337,
0.09983344376087189,
0.07157860696315765,
-0.4846234917640686,
0.266557514667511,
0.12568770349025726,
-0.2803891897201538,
-0.06436328589916229,
-0.07264821976423264,
-0.1584724336862564,
-0.16526687145233154,
-0.0832471251487732,
-0.1282414197921753,
-0.11571325361728668,
0.12148237973451614,
-0.17386461794376373,
-0.060697175562381744,
-0.1348024606704712,
-0.11010544002056122,
0.06933458149433136,
0.0560908243060112,
0.012464404106140137,
0.45346611738204956,
0.043996673077344894,
-0.018561366945505142,
-0.14299233257770538,
0.0537794753909111,
0.20131215453147888,
-0.019841104745864868,
-0.16492295265197754,
-0.019235096871852875,
-0.02333105355501175,
0.013860385864973068,
-0.16047851741313934,
0.11670515686273575,
0.8743848204612732,
-0.10534683614969254,
0.039213743060827255,
0.17543911933898926,
-0.3215906023979187,
-0.24803167581558228,
0.03423750773072243,
-0.3715788424015045,
-0.3055794835090637,
0.06145128980278969,
0.20856742560863495,
-0.11381176114082336,
-0.12568439543247223,
0.3286089599132538,
0.3007804751396179,
-0.18762357532978058,
-0.24295233190059662,
0.22645850479602814,
-0.06087517738342285,
-0.3976781964302063,
0.06340290606021881,
0.09865926951169968,
0.018280532211065292,
-0.12873293459415436,
-0.015914274379611015,
-0.3286944627761841,
-0.0786561593413353,
0.32006850838661194,
-0.08871136605739594,
-0.16689151525497437,
-0.08836759626865387,
0.19265417754650116,
-0.039586760103702545,
0.22572623193264008,
0.13781899213790894,
0.11934829503297806,
0.027498601004481316,
-0.6537036299705505,
0.17152723670005798,
0.05056632682681084,
0.41624361276626587,
-0.1999148428440094,
0.03447609767317772,
-0.1658141314983368,
-0.09215206652879715,
0.22525151073932648,
-0.29541900753974915,
0.12159094214439392,
-0.03437691181898117,
0.14897647500038147,
-0.42043444514274597,
-0.3190869390964508,
0.2972903251647949,
0.27584847807884216,
-0.12644480168819427,
0.03623669594526291,
-0.10705652832984924,
-0.49728816747665405,
0.200677290558815,
0.4948280155658722,
0.8818396329879761,
-0.017355650663375854,
0.23648430407047272,
-0.048570916056632996,
-0.20043115317821503,
0.5380067825317383,
-0.0032371170818805695,
-0.020133014768362045,
-0.2822466492652893,
-0.35791537165641785,
-0.15456432104110718,
-0.26933860778808594,
0.3293364942073822,
0.5125812888145447,
-0.5189645886421204,
0.2395554482936859,
-0.21726524829864502,
-0.005757007747888565,
0.19216646254062653,
0.08041346073150635,
0.27583423256874084,
-0.5404214859008789,
0.021333858370780945,
0.18453805148601532,
-0.0028102025389671326,
0.18117663264274597,
-0.01033791247755289,
-0.17433050274848938,
-0.1444297432899475,
0.2676258087158203,
-0.14159198105335236,
-0.009930241852998734,
-0.24880705773830414,
-0.0028004292398691177,
-0.1635061651468277,
-0.348460853099823,
0.6934319734573364,
0.25554484128952026,
0.21477225422859192,
0.2217792123556137,
-0.05785561352968216,
-0.013601668179035187,
-0.16445812582969666,
0.3608770966529846,
0.03700645640492439,
-0.3177410662174225,
0.5784918069839478,
0.034881457686424255,
0.06118658930063248,
0.040362920612096786,
0.045564815402030945,
-0.0843532457947731,
0.10054980218410492,
-0.15194298326969147,
0.11859191954135895,
-0.33257293701171875,
-0.02504679746925831,
0.10562269389629364,
-0.009645409882068634,
-0.11249507963657379,
0.1491445004940033,
0.23612141609191895,
0.04162907972931862,
0.2985837459564209,
0.29074299335479736,
-0.33935877680778503,
-0.029010776430368423,
0.15575572848320007,
0.5326736569404602,
-0.006043467670679092,
0.2088623195886612,
-0.26990634202957153,
-0.2365809977054596,
-0.402652770280838,
0.26716169714927673,
0.11954012513160706,
-0.390973836183548,
0.30624112486839294,
-0.03936426714062691,
-0.061229169368743896,
0.04923155531287193,
-0.38518571853637695,
0.30855172872543335,
0.2617310583591461,
-0.28581610321998596,
-0.35280901193618774,
-0.3455181419849396,
-0.038141727447509766,
0.11074750125408173,
0.107931949198246,
0.00007627904415130615,
0.3572807013988495,
0.24430528283119202,
0.03758798539638519,
-0.3780187666416168,
-0.07535162568092346,
-0.025207065045833588,
0.07985270023345947,
0.16354884207248688,
0.07653716206550598,
-0.35503119230270386,
0.10565260052680969,
0.0826990008354187,
-0.07145380228757858,
-0.16293904185295105,
-0.2778497636318207,
-0.1733829528093338,
0.12104649096727371,
0.09080982208251953,
0.22928205132484436,
-0.0004705130122601986,
0.12548163533210754,
-0.03140289708971977,
-0.046860769391059875,
0.06337039172649384,
0.07096165418624878,
-0.04594096541404724,
0.28663796186447144,
0.24124228954315186,
-0.19019964337348938,
-0.31512564420700073,
0.0731053352355957,
0.03517678380012512,
-0.055635109543800354,
-0.19574539363384247,
0.35963308811187744,
0.19820599257946014,
0.09169070422649384,
-0.4791560471057892,
0.07729983329772949,
0.1645251214504242,
-0.08975590020418167,
0.3933243453502655,
-0.07313200831413269,
0.39167213439941406,
0.48867037892341614,
0.08665768802165985,
-0.06322610378265381,
-0.16469541192054749,
0.0011304635554552078,
0.10729658603668213,
0.21241851150989532,
-0.39235562086105347,
0.1034419983625412,
0.276743084192276,
0.03795722872018814,
0.03269462659955025,
0.21008183062076569,
-0.13459618389606476,
0.23817777633666992,
-0.11697578430175781,
-0.07819807529449463,
0.4796932637691498,
-0.3370962142944336,
0.3642071485519409,
0.6463413834571838,
-0.14794336259365082,
0.06179777905344963,
0.4965008795261383,
0.07117106020450592,
-0.019574694335460663,
0.3492739200592041,
0.09803817421197891,
0.46783214807510376,
0.00563240610063076,
-0.006191212683916092,
0.45553287863731384,
0.17751748859882355,
0.19881628453731537,
0.611443042755127,
-0.06006741523742676,
-0.028299294412136078,
0.023945510387420654,
-0.1431373655796051,
-0.05672368034720421,
-0.32464250922203064,
0.02775401808321476,
0.2988841235637665,
-0.22112199664115906,
0.3321259915828705,
-0.1391836404800415,
-0.08116718381643295,
0.07641756534576416,
-0.3467313051223755,
-0.22390514612197876,
-0.3499308228492737,
0.36921191215515137,
0.06603315472602844,
-0.036988064646720886,
0.0641428753733635,
0.16766664385795593,
-0.02178206667304039,
0.058932963758707047,
-0.1439840942621231,
-0.1938706636428833,
0.15546347200870514,
0.09185520559549332,
0.11438529193401337,
0.6183263063430786,
0.1413576900959015,
0.22683300077915192,
-0.026636745780706406,
0.045473240315914154,
-0.21947777271270752,
-0.2695857286453247,
-0.029579874128103256,
0.21051466464996338,
-0.24848473072052002,
-0.18525251746177673,
0.2631663382053375,
0.2606518864631653,
-0.1493424028158188,
0.24057938158512115,
0.08955182880163193,
0.16320134699344635,
-0.24390774965286255,
0.25727367401123047,
0.19719786942005157,
-0.15215075016021729,
-0.046641699969768524,
0.19722172617912292,
-0.1380615234375,
-0.08383127301931381,
0.5476487278938293,
-0.46067219972610474,
0.01923498511314392,
0.014284861274063587,
0.07617934793233871,
0.1886262595653534,
0.21151314675807953,
0.10032638907432556,
-0.040060147643089294,
-0.02381354570388794,
0.03714793920516968,
-0.3171057403087616,
0.08326543122529984,
0.1469305157661438,
-0.09470804035663605,
-0.18919894099235535,
-0.10042742639780045,
0.10864604264497757,
0.32453852891921997,
0.06717231869697571,
-0.1424286663532257,
-0.1395658552646637,
0.13004910945892334,
-0.17661425471305847,
-0.07182393968105316,
0.3381153345108032,
0.2639375925064087,
0.07753939181566238,
-0.3354128897190094,
0.06844359636306763,
0.3268899619579315,
0.0650976300239563,
-0.04752275347709656,
0.361934632062912,
0.13860465586185455,
0.1587197482585907,
0.20674125850200653,
0.09013096988201141,
0.5049055814743042,
-0.06866256147623062,
0.16379334032535553,
0.370455265045166,
-0.07328003644943237,
-0.262744277715683,
0.39999285340309143,
0.20488111674785614,
-0.03003796935081482,
-0.2529412806034088,
-0.1391836553812027,
0.16660213470458984,
-0.18997502326965332,
0.03654584288597107,
0.06697870790958405,
-0.8383824229240417,
0.06006551533937454,
-0.11592096090316772,
-0.00917078461498022,
0.1660306304693222,
0.059498533606529236,
0.0017779506742954254,
-0.021466489881277084,
-0.013974346220493317,
-0.30643579363822937,
0.30387356877326965,
0.04057358577847481,
-0.3939805030822754,
-0.14286234974861145,
-0.1634245216846466,
-0.21891427040100098,
0.1842781901359558,
-0.09426210075616837,
0.009631946682929993,
0.44709107279777527,
-0.1043228879570961,
0.3353060781955719,
0.2366403490304947,
0.07342678308486938,
0.005556806921958923,
-0.227494016289711,
0.5061411261558533,
-0.30775147676467896,
-0.17950060963630676,
-0.21115079522132874,
-0.17409925162792206
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | There are already a few transformations that you can apply on a dataset using methods like `dataset.map()`.
You can find examples in the documentation here:
https://huggingface.co/docs/datasets/processing.html
You can merge two datasets with `concatenate_datasets()` or do label extraction with `dataset.map()` for example | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 41 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
There are already a few transformations that you can apply on a dataset using methods like `dataset.map()`.
You can find examples in the documentation here:
https://huggingface.co/docs/datasets/processing.html
You can merge two datasets with `concatenate_datasets()` or do label extraction with `dataset.map()` for example | [
-0.46852487325668335,
-0.2306807041168213,
-0.053157467395067215,
0.14103952050209045,
0.3790980577468872,
-0.198714941740036,
0.3367200791835785,
0.16955819725990295,
0.10450328886508942,
0.19319093227386475,
-0.17467673122882843,
0.28939810395240784,
-0.23164236545562744,
0.559363067150116,
0.0868365541100502,
-0.21470555663108826,
-0.1576157510280609,
0.32449495792388916,
-0.45100173354148865,
-0.0933912843465805,
-0.20451369881629944,
-0.1517907977104187,
0.0859738290309906,
0.0435052290558815,
-0.20522910356521606,
-0.2564638555049896,
-0.05032220482826233,
-0.18086662888526917,
-0.09292744100093842,
-0.020691201090812683,
0.3956408202648163,
0.22751323878765106,
-0.1231825053691864,
0.4610513746738434,
-0.00009944682824425399,
-0.10746828466653824,
-0.15510226786136627,
-0.09259660542011261,
0.10216914117336273,
-0.168192520737648,
-0.12541809678077698,
-0.08463262021541595,
0.022099114954471588,
-0.2678523659706116,
-0.5002480149269104,
-0.10915401577949524,
-0.03184882551431656,
0.06312525272369385,
0.5358989834785461,
-0.010313678532838821,
0.295876681804657,
0.009789276868104935,
-0.01589672639966011,
-0.1169513463973999,
-0.006982274353504181,
0.27343812584877014,
-0.12759283185005188,
-0.01807234063744545,
0.17401093244552612,
0.2556486129760742,
-0.19455286860466003,
0.39340588450431824,
-0.016171451658010483,
-0.03295820951461792,
0.6259967088699341,
0.014367124997079372,
0.05476275831460953,
-0.40715643763542175,
-0.2678070664405823,
0.4698750078678131,
0.3069078326225281,
-0.23419180512428284,
-0.4158826172351837,
-0.42409414052963257,
0.14179883897304535,
-0.04368853569030762,
0.01820465549826622,
0.08188053965568542,
-0.019110150635242462,
0.21808411180973053,
-0.3345583975315094,
-0.22628706693649292,
-0.25507423281669617,
-0.08484093844890594,
-0.4569251835346222,
0.15570220351219177,
-0.15812039375305176,
-0.03208409249782562,
0.20830702781677246,
-0.10934695601463318,
-0.05707533285021782,
0.233216792345047,
0.0770111083984375,
0.12421878427267075,
-0.13193325698375702,
-0.46676182746887207,
-0.2404344081878662,
0.2420446276664734,
0.06411270052194595,
0.09259337186813354,
-0.10185328125953674,
0.036471981555223465,
-0.10745777189731598,
0.1789068579673767,
-0.0019430462270975113,
0.31971994042396545,
-0.018150724470615387,
0.08710523694753647,
0.28445786237716675,
-0.09844442456960678,
-0.07802192866802216,
0.14268194139003754,
0.1567527800798416,
-0.18715828657150269,
-0.10856151580810547,
-0.047767266631126404,
0.07163868099451065,
-0.12147301435470581,
0.051164038479328156,
-0.30870142579078674,
0.267241895198822,
0.17209455370903015,
-0.11213754862546921,
0.28789833188056946,
0.015388616360723972,
0.20372632145881653,
0.3953177332878113,
0.1793697029352188,
0.17633531987667084,
-0.14846472442150116,
-0.08256932348012924,
0.1802891045808792,
-0.04941009357571602,
-0.019671181216835976,
-0.0038548819720745087,
-0.03780164197087288,
-0.029367318376898766,
0.026139035820961,
-0.0889284610748291,
0.33100268244743347,
-0.08216685801744461,
-0.10424137115478516,
0.26524341106414795,
0.16714677214622498,
-0.28298088908195496,
-0.2588635981082916,
0.07455238699913025,
-0.16459167003631592,
-0.23826760053634644,
-0.013722427189350128,
-0.17087385058403015,
0.07976558804512024,
0.018603986129164696,
0.2774104177951813,
-0.003512568771839142,
-0.08648079633712769,
-0.21165704727172852,
0.40363022685050964,
-0.012850843369960785,
-0.09909188747406006,
0.04066944122314453,
-0.17359338700771332,
-0.1943630576133728,
-0.025116324424743652,
0.08863391727209091,
-0.059914201498031616,
-0.3292739689350128,
-0.49427491426467896,
0.16101892292499542,
-0.137393519282341,
-0.04528292268514633,
0.2936726212501526,
-0.03899506852030754,
0.19777259230613708,
-0.06221036612987518,
-0.08020873367786407,
0.4939520061016083,
-0.1065550148487091,
-0.18149642646312714,
0.06813990324735641,
-0.3399478793144226,
-0.018412377685308456,
0.008344210684299469,
0.3178720474243164,
0.2948320806026459,
-0.016495276242494583,
-0.34838902950286865,
0.3703305125236511,
-0.07521026581525803,
0.14979781210422516,
0.10503686964511871,
-0.2864675521850586,
0.24589602649211884,
0.06297223269939423,
0.23557732999324799,
0.2537992596626282,
-0.06926741451025009,
0.11178423464298248,
-0.07534921914339066,
-0.40835344791412354,
0.20055317878723145,
0.07484328746795654,
0.2569255232810974,
-0.03208625316619873,
-0.10398221015930176,
-0.43490633368492126,
-0.11740871518850327,
-0.10575690865516663,
-0.17698615789413452,
0.23050814867019653,
0.2835945188999176,
-0.28353533148765564,
-0.05045706778764725,
-0.24058297276496887,
-0.132819265127182,
-0.1575147807598114,
0.2584119439125061,
-0.2040453851222992,
0.22211608290672302,
-0.32947781682014465,
-0.10692647099494934,
0.42596375942230225,
0.10779149830341339,
0.24758315086364746,
-0.49182766675949097,
0.08941152691841125,
0.043243274092674255,
0.061395399272441864,
0.03785467892885208,
0.06427927315235138,
-0.15450268983840942,
-0.25673383474349976,
0.07156552374362946,
0.07099400460720062,
-0.08628552407026291,
0.08285514265298843,
-0.0011878609657287598,
0.3227491080760956,
0.26097068190574646,
-0.07840265333652496,
0.14390893280506134,
-0.05252952501177788,
0.17882685363292694,
0.043389059603214264,
-0.4305514097213745,
0.6129766702651978,
0.018001724034547806,
0.17224636673927307,
-0.04841839149594307,
0.04953213036060333,
0.300877183675766,
-0.33059900999069214,
-0.014369216747581959,
-0.19494278728961945,
-0.14801880717277527,
-0.13013561069965363,
0.2936965227127075,
0.10754256695508957,
-0.25539880990982056,
-0.023590028285980225,
0.2760583758354187,
0.03844190016388893,
0.19505956768989563,
0.329414039850235,
-0.25863227248191833,
0.23958921432495117,
-0.06543572247028351,
0.37129053473472595,
0.204014390707016,
0.35696670413017273,
-0.16672049462795258,
0.23902717232704163,
0.032015711069107056,
-0.004614455625414848,
0.18885773420333862,
-0.03382284939289093,
0.23572169244289398,
0.07838219404220581,
0.04891582578420639,
0.19456294178962708,
-0.22780641913414001,
-0.20590385794639587,
-0.26457011699676514,
0.003159174695611,
-0.20336514711380005,
0.003446921706199646,
-0.1967257857322693,
-0.14503636956214905,
-0.23931926488876343,
0.010016308166086674,
-0.31718987226486206,
-0.07846646010875702,
0.18617981672286987,
0.11252161860466003,
-0.23161689937114716,
0.11884110420942307,
0.24033516645431519,
0.283194363117218,
0.19869950413703918,
-0.020386213436722755,
-0.1275157928466797,
-0.16755080223083496,
0.10662401467561722,
0.21948274970054626,
-0.137041375041008,
0.09778125584125519,
0.418205589056015,
-0.41186925768852234,
0.12386713922023773,
-0.2679353654384613,
-0.49990060925483704,
0.26854926347732544,
-0.1570930927991867,
0.2256888896226883,
0.3385975956916809,
0.14909398555755615,
0.029423505067825317,
-0.018831871449947357,
0.08592521399259567,
-0.1540536731481552,
-0.289116770029068,
-0.06878232955932617,
-0.21526385843753815,
0.0695149376988411,
-0.13394778966903687,
-0.17378470301628113,
-0.23381738364696503,
-0.3581332564353943,
0.36579394340515137,
0.1533706784248352,
0.04517233371734619,
0.010571230202913284,
0.008277400396764278,
-0.031006697565317154,
-0.21544894576072693,
0.30046701431274414,
-0.21898676455020905,
-0.1780751645565033,
0.22596070170402527,
-0.07192977517843246,
-0.18184971809387207,
-0.2360558658838272,
-0.17908720672130585,
0.06738066673278809,
0.262001097202301,
-0.17967015504837036,
-0.29520660638809204,
-0.2022523730993271,
0.20449839532375336,
0.07635675370693207,
0.11472637951374054,
0.5687103271484375,
0.10932882875204086,
-0.17922097444534302,
-0.05551178380846977,
-0.02295040711760521,
0.10115765035152435,
0.15971872210502625,
0.05934727191925049,
-0.02602575719356537,
0.36849671602249146,
-0.03899780288338661,
0.3227410316467285,
-0.30086901783943176,
-0.4758780896663666,
-0.06196771562099457,
-0.058990053832530975,
0.2156086564064026,
0.04160015657544136,
-0.2979401648044586,
0.22788359224796295,
0.04417826980352402,
0.01915488764643669,
0.1481878012418747,
-0.04869949817657471,
0.011145977303385735,
-0.2310938984155655,
-0.15891790390014648,
-0.22453749179840088,
-0.31708991527557373,
0.04283091425895691,
0.24250316619873047,
-0.05015959590673447,
-0.07107968628406525,
0.018423117697238922,
-0.07545700669288635,
0.056210003793239594,
0.19944578409194946,
0.41511744260787964,
0.08474992215633392,
-0.023504847660660744,
-0.21098735928535461,
0.11679752171039581,
-0.024234235286712646,
0.24196766316890717,
-0.06833259761333466,
-0.22463549673557281,
0.005717795342206955,
-0.2587053179740906,
-0.14849261939525604,
-0.13567595183849335,
0.6416299343109131,
0.08486384153366089,
0.07675370573997498,
-0.017906304448843002,
-0.46462732553482056,
-0.2970890700817108,
0.20672880113124847,
-0.35520821809768677,
-0.22205893695354462,
0.15041318535804749,
0.345838338136673,
-0.35622915625572205,
-0.29236841201782227,
0.164476215839386,
0.3387872278690338,
-0.3072397708892822,
-0.08291267603635788,
-0.000813756138086319,
-0.12631231546401978,
-0.3773190379142761,
0.20552854239940643,
0.0385526642203331,
-0.0771322101354599,
0.0005987343611195683,
-0.05925098806619644,
-0.3329600393772125,
-0.11860673129558563,
0.2515347898006439,
0.3139461576938629,
0.06281165033578873,
-0.1446581929922104,
0.017149068415164948,
0.1051340103149414,
0.4406678378582001,
0.041890889406204224,
0.24944791197776794,
0.023510873317718506,
-0.5702090859413147,
-0.013386491686105728,
0.04227447137236595,
0.1509065330028534,
-0.002108141779899597,
0.12467905879020691,
-0.010499805212020874,
-0.0035680346190929413,
0.3054664731025696,
-0.4406083822250366,
0.29062217473983765,
-0.031088287010788918,
0.17822854220867157,
-0.2548517882823944,
-0.1046048030257225,
0.4059157371520996,
0.18762460350990295,
-0.21159964799880981,
-0.0006976574659347534,
0.21905390918254852,
-0.4485893249511719,
0.2102263867855072,
0.33791637420654297,
0.8208335041999817,
-0.02207246422767639,
0.1324441283941269,
0.22208726406097412,
-0.05619524419307709,
0.4963654577732086,
-0.15024423599243164,
0.03253037855029106,
-0.26915109157562256,
-0.39345091581344604,
-0.1357688009738922,
-0.06528909504413605,
0.21027690172195435,
0.24373139441013336,
-0.38134294748306274,
0.364153116941452,
-0.049697935581207275,
-0.15864673256874084,
-0.07656606286764145,
0.03289594501256943,
0.148718923330307,
-0.5673125386238098,
-0.4194624423980713,
0.25726523995399475,
-0.16187822818756104,
0.28471750020980835,
-0.003560556098818779,
-0.1318380981683731,
-0.08765703439712524,
0.04572854936122894,
0.09723232686519623,
-0.04412369430065155,
-0.3256532549858093,
-0.24212799966335297,
0.007395705208182335,
-0.2083844542503357,
0.33503827452659607,
0.25589391589164734,
0.30959421396255493,
0.19815857708454132,
-0.1272188127040863,
0.11926762759685516,
-0.285311758518219,
0.33461809158325195,
-0.09156695008277893,
-0.10337921231985092,
0.5256096124649048,
-0.03081153705716133,
0.03211776167154312,
-0.11503291875123978,
0.08190198242664337,
-0.12030132859945297,
0.42315512895584106,
-0.20499376952648163,
-0.09531797468662262,
-0.39099767804145813,
0.048823032528162,
0.08005359023809433,
0.10957574844360352,
-0.18680691719055176,
0.21176612377166748,
0.1607626974582672,
-0.11719553917646408,
0.27523714303970337,
0.4020009934902191,
-0.2543526589870453,
-0.1254383772611618,
0.24942177534103394,
0.22247257828712463,
0.13150201737880707,
0.019878655672073364,
-0.22106574475765228,
-0.28182268142700195,
-0.4306577146053314,
0.07077396661043167,
0.2052568793296814,
-0.4010012745857239,
0.33779051899909973,
0.09767379611730576,
-0.3812921345233917,
-0.11812624335289001,
0.11453865468502045,
0.3145768642425537,
0.042911577969789505,
-0.13495776057243347,
-0.32823580503463745,
-0.5083826184272766,
0.14490696787834167,
0.04217297211289406,
0.19679011404514313,
0.22567272186279297,
0.3546483814716339,
0.049536578357219696,
0.24302954971790314,
-0.48197707533836365,
-0.08268969506025314,
-0.20950208604335785,
0.19999131560325623,
0.2634351849555969,
-0.017115168273448944,
-0.037491682916879654,
0.02639850601553917,
0.17276199162006378,
-0.059602268040180206,
-0.2150496244430542,
-0.3660917580127716,
-0.31278055906295776,
0.061279915273189545,
-0.14530423283576965,
0.1823211908340454,
0.09409456700086594,
0.25626373291015625,
-0.07554322481155396,
-0.2365216612815857,
0.3544233441352844,
0.09062748402357101,
0.028078075498342514,
0.3455360531806946,
0.17912061512470245,
-0.20065367221832275,
-0.18708278238773346,
-0.018530920147895813,
0.09468784928321838,
-0.11021196842193604,
-0.20369195938110352,
0.1857883781194687,
-0.19227804243564606,
-0.007223866879940033,
0.01661532372236252,
0.15145567059516907,
0.3099438548088074,
-0.14213776588439941,
0.33267971873283386,
0.17622849345207214,
0.08304508030414581,
0.5306994318962097,
0.28765323758125305,
-0.03431123495101929,
-0.027517342939972878,
0.12354086339473724,
0.23192289471626282,
0.3524504601955414,
-0.5596116781234741,
0.0930916890501976,
0.3111479878425598,
-0.13095489144325256,
0.34835952520370483,
0.3157449960708618,
0.02329361066222191,
0.1996728479862213,
-0.004886135458946228,
-0.06492136418819427,
0.2668973505496979,
-0.30598652362823486,
0.13534781336784363,
0.36438828706741333,
-0.15115506947040558,
0.008681800216436386,
0.45881417393684387,
0.12982796132564545,
0.16626450419425964,
0.15356367826461792,
-0.01638515293598175,
0.4012468159198761,
-0.11602997034788132,
0.024523917585611343,
0.45412975549697876,
-0.0029643885791301727,
0.021549375727772713,
0.3619540333747864,
0.08465512096881866,
0.08487744629383087,
0.15446311235427856,
0.1645852029323578,
-0.12455154210329056,
-0.4523754417896271,
-0.08469977974891663,
0.4605717062950134,
-0.21761903166770935,
0.052509479224681854,
-0.15128862857818604,
-0.12918424606323242,
0.0573185533285141,
-0.17818626761436462,
-0.07563731074333191,
-0.28848642110824585,
0.4399873912334442,
0.06055593863129616,
0.15383420884609222,
-0.03797744959592819,
-0.02896638959646225,
-0.04299122840166092,
0.24989572167396545,
-0.07695279270410538,
0.02087984047830105,
0.2935600280761719,
0.022123292088508606,
0.2136034518480301,
0.6038633584976196,
0.14484329521656036,
-0.08494330942630768,
-0.16045573353767395,
0.1932704597711563,
-0.2475617676973343,
-0.20249536633491516,
-0.21259626746177673,
-0.031060464680194855,
-0.21452701091766357,
-0.168782576918602,
0.37703201174736023,
0.3230586051940918,
-0.24931001663208008,
0.12878887355327606,
-0.15603427588939667,
0.22320888936519623,
-0.20346055924892426,
0.19546422362327576,
0.20166735351085663,
-0.1328810453414917,
-0.2870439291000366,
-0.053905390202999115,
-0.12113451957702637,
0.09983622282743454,
0.16051246225833893,
-0.4364558160305023,
0.168609619140625,
0.01249772310256958,
0.14889314770698547,
0.23132696747779846,
0.2973574101924896,
0.07013144344091415,
-0.0600893497467041,
0.1038423702120781,
0.02333071082830429,
-0.4550197720527649,
0.05808696150779724,
0.335941344499588,
-0.1637784242630005,
-0.1979539394378662,
-0.18825404345989227,
0.07784835994243622,
0.31846410036087036,
0.024348795413970947,
-0.2890486419200897,
0.09324318170547485,
-0.07990206778049469,
-0.2769651710987091,
-0.006926119327545166,
-0.08207610249519348,
0.15442854166030884,
0.28096285462379456,
-0.3392110764980316,
-0.05509675666689873,
0.14504574239253998,
0.1700153946876526,
0.05634889751672745,
0.4660271406173706,
-0.2188386768102646,
-0.0072856806218624115,
0.20618624985218048,
0.25296518206596375,
0.3293147683143616,
-0.34061339497566223,
0.18472659587860107,
0.3814716339111328,
-0.15141235291957855,
-0.5562725067138672,
0.16682037711143494,
0.1318482905626297,
0.22879257798194885,
-0.06721209734678268,
-0.11912666261196136,
0.01812247931957245,
-0.003666776232421398,
0.1334281861782074,
0.05853772535920143,
-0.660028338432312,
0.2794370949268341,
0.02821216732263565,
-0.17848043143749237,
0.13719327747821808,
0.3119848668575287,
-0.055768758058547974,
-0.14055001735687256,
-0.11890460550785065,
-0.32300013303756714,
0.4701818525791168,
-0.03202659264206886,
-0.245929554104805,
-0.07235589623451233,
-0.09049998223781586,
0.04801157861948013,
-0.1316293627023697,
-0.3248482644557953,
0.11845362931489944,
0.20897088944911957,
-0.064403235912323,
0.06767496466636658,
0.17198768258094788,
-0.18988242745399475,
-0.24440254271030426,
-0.22526301443576813,
0.5100140571594238,
0.09942701458930969,
-0.209274560213089,
-0.2593587636947632,
-0.20649704337120056
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Ok, sure.
Thanks for pointing on functional part.
My question is more
“Philosophical”/Design perspective.
There are 2 perspetive:
Add transformation methods to
Dataset Class
OR Create a Transformer Class
which operates on Dataset Class.
T(Dataset) —> Dataset
datasetnew = MyTransform.transform(dataset)
datasetNew.save(path)
What would be the difficulty
of implementing a Transformer Class
operating at dataset level ?
thanks
> On Jul 6, 2021, at 22:00, Quentin Lhoest ***@***.***> wrote:
>
>
> There are already a few transformations that you can apply on a dataset using methods like dataset.map().
> You can find examples in the documentation here:
> https://huggingface.co/docs/datasets/processing.html
>
> You can merge two datasets with concatenate_datasets() or do label extraction with dataset.map() for example
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 142 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Ok, sure.
Thanks for pointing on functional part.
My question is more
“Philosophical”/Design perspective.
There are 2 perspetive:
Add transformation methods to
Dataset Class
OR Create a Transformer Class
which operates on Dataset Class.
T(Dataset) —> Dataset
datasetnew = MyTransform.transform(dataset)
datasetNew.save(path)
What would be the difficulty
of implementing a Transformer Class
operating at dataset level ?
thanks
> On Jul 6, 2021, at 22:00, Quentin Lhoest ***@***.***> wrote:
>
>
> There are already a few transformations that you can apply on a dataset using methods like dataset.map().
> You can find examples in the documentation here:
> https://huggingface.co/docs/datasets/processing.html
>
> You can merge two datasets with concatenate_datasets() or do label extraction with dataset.map() for example
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| [
-0.1065421998500824,
-0.053838908672332764,
0.02605351060628891,
0.143031507730484,
0.33659517765045166,
-0.13995954394340515,
0.5725399851799011,
-0.03391633555293083,
-0.052185818552970886,
0.16315799951553345,
0.1168564185500145,
0.24485869705677032,
-0.4620174169540405,
0.43270495533943176,
0.2910212278366089,
-0.31975436210632324,
0.06042950600385666,
0.21103912591934204,
-0.5410809516906738,
-0.05364904925227165,
-0.3712557256221771,
-0.3355918228626251,
-0.053156185895204544,
0.058087773621082306,
-0.219922736287117,
-0.1509212702512741,
-0.12715564668178558,
-0.17568519711494446,
-0.1485704779624939,
0.0726785659790039,
0.7325078248977661,
0.054779671132564545,
0.17945463955402374,
0.6730674505233765,
-0.00011880613601533696,
-0.038748517632484436,
-0.01755845546722412,
-0.05006127059459686,
-0.014884991571307182,
-0.3988001346588135,
-0.21084508299827576,
-0.12495061755180359,
-0.02503473311662674,
-0.3303230106830597,
-0.19540798664093018,
-0.015497849322855473,
0.05616897717118263,
-0.04345458745956421,
0.36257505416870117,
-0.05958053842186928,
0.10465448349714279,
-0.2699899971485138,
-0.06583667546510696,
0.04670277610421181,
-0.11548376828432083,
0.37155061960220337,
-0.2796653211116791,
0.0010379189625382423,
0.17316433787345886,
0.3063565492630005,
-0.028837963938713074,
0.07416577637195587,
0.0859447792172432,
-0.3187919855117798,
0.9122107625007629,
-0.07091755419969559,
-0.038492023944854736,
-0.39686495065689087,
-0.20462065935134888,
0.2444629967212677,
0.45993950963020325,
-0.27219125628471375,
-0.6343575119972229,
-0.26576876640319824,
0.07097389549016953,
0.15893004834651947,
0.22963854670524597,
-0.00587989017367363,
0.09211133420467377,
0.27855879068374634,
-0.32457149028778076,
-0.23609770834445953,
-0.4755641520023346,
0.09383699297904968,
-0.5276670455932617,
0.05061345174908638,
-0.1485307514667511,
0.015501856803894043,
0.062188319861888885,
-0.07446672022342682,
0.19515779614448547,
0.09761606156826019,
0.2587229311466217,
0.23564265668392181,
-0.2632695138454437,
-0.39627549052238464,
-0.1543959081172943,
0.2665102183818817,
-0.03981337323784828,
-0.05344264209270477,
-0.11784030497074127,
-0.10951215773820877,
-0.15198706090450287,
0.13212238252162933,
0.2445392608642578,
0.33472830057144165,
-0.06788557022809982,
0.17465248703956604,
0.2386985868215561,
-0.3149811029434204,
0.06063712760806084,
0.01930955797433853,
0.007583756931126118,
-0.1074855625629425,
0.06356646120548248,
0.029094092547893524,
0.238545760512352,
-0.0591093972325325,
0.24989357590675354,
-0.29123878479003906,
-0.10806889832019806,
-0.01599501259624958,
-0.14751163125038147,
0.02284851297736168,
0.2536223828792572,
0.3971208930015564,
0.3115745186805725,
0.06939245760440826,
0.35593655705451965,
-0.13714782893657684,
0.12343866378068924,
0.08962967991828918,
-0.2077118307352066,
-0.008513716980814934,
0.025431666523218155,
-0.08829501271247864,
-0.27008214592933655,
-0.0413118451833725,
-0.05176425725221634,
0.3604629635810852,
0.013220205903053284,
-0.4351191818714142,
0.12184279412031174,
0.321959912776947,
-0.47011128067970276,
-0.21497398614883423,
-0.13251399993896484,
-0.019255638122558594,
-0.14249880611896515,
0.407575398683548,
-0.13375142216682434,
-0.1032087430357933,
0.273627907037735,
0.08550026267766953,
0.013680823147296906,
0.09059298038482666,
-0.6206731796264648,
0.3858290910720825,
0.03931845724582672,
-0.18486331403255463,
0.04010208696126938,
-0.3430997133255005,
-0.15242722630500793,
-0.18201561272144318,
-0.17303822934627533,
-0.027576953172683716,
-0.48801732063293457,
-0.3247208297252655,
-0.05896693840622902,
-0.007816918194293976,
0.0338284894824028,
0.28751540184020996,
-0.31817665696144104,
0.5770641565322876,
-0.06493236124515533,
-0.11830577254295349,
0.7609328627586365,
-0.16234458982944489,
-0.3263244032859802,
0.13554047048091888,
-0.3932284712791443,
0.10560149699449539,
-0.028558723628520966,
0.3570365607738495,
0.39346951246261597,
-0.37401461601257324,
-0.5503365993499756,
0.2517985999584198,
-0.05029959976673126,
-0.011506807059049606,
0.18893544375896454,
-0.19707371294498444,
0.49732911586761475,
0.013382051140069962,
0.26654231548309326,
0.3399263024330139,
0.04659038409590721,
0.34409600496292114,
-0.2913910150527954,
-0.40865468978881836,
0.24897222220897675,
0.01503765769302845,
0.27128466963768005,
-0.007466554641723633,
-0.0214923694729805,
-0.4259059727191925,
-0.20004460215568542,
-0.03180950880050659,
-0.061900146305561066,
0.3268595337867737,
0.30269965529441833,
0.00834115594625473,
0.1577596366405487,
-0.11902256309986115,
-0.21913357079029083,
-0.2704632580280304,
-0.01204443909227848,
-0.3185947835445404,
0.3225787281990051,
-0.5568802356719971,
-0.3735564351081848,
0.41421815752983093,
-0.054054711014032364,
0.2334820181131363,
-0.5580810904502869,
0.11569464206695557,
0.02337430790066719,
0.24915508925914764,
-0.34818464517593384,
-0.007924631237983704,
-0.13359516859054565,
-0.29170146584510803,
-0.09533954411745071,
-0.058928921818733215,
-0.026133602485060692,
-0.15756599605083466,
-0.07205655425786972,
0.47626298666000366,
0.2876896262168884,
-0.21483272314071655,
0.3182380795478821,
0.06224486231803894,
0.22614194452762604,
-0.14589814841747284,
-0.34608811140060425,
0.2852136194705963,
-0.05357090011239052,
0.3659825921058655,
-0.08809631317853928,
-0.06483851373195648,
0.14044034481048584,
-0.2240229845046997,
-0.21818983554840088,
0.1399034708738327,
-0.11297953128814697,
-0.07260338962078094,
0.3441029191017151,
0.12703844904899597,
-0.03252100944519043,
-0.18194475769996643,
0.2679167687892914,
-0.10342122614383698,
0.13826733827590942,
0.4796474277973175,
-0.1408270001411438,
0.21424046158790588,
-0.3483155071735382,
0.49524179100990295,
0.6219207644462585,
0.11696717888116837,
-0.24429017305374146,
0.30609291791915894,
0.2635385990142822,
-0.052475228905677795,
0.15046066045761108,
0.11449968814849854,
0.23663368821144104,
-0.1106889620423317,
0.011536264792084694,
0.35518908500671387,
0.14767196774482727,
-0.44276541471481323,
-0.16228222846984863,
-0.029640721157193184,
-0.10992433875799179,
0.05889660120010376,
-0.028722936287522316,
-0.2380892038345337,
-0.3307724893093109,
-0.012987413443624973,
-0.10743823647499084,
0.09612330049276352,
-0.09994415938854218,
-0.1936996877193451,
0.07385022938251495,
0.024385474622249603,
0.17079392075538635,
0.3343960642814636,
0.13048192858695984,
-0.12423808127641678,
0.023108310997486115,
0.08673156797885895,
0.10825780779123306,
0.02926376461982727,
-0.04911221191287041,
0.038378529250621796,
0.28548532724380493,
-0.35486483573913574,
0.10197842121124268,
-0.04942803084850311,
-0.6258032917976379,
0.20463037490844727,
0.01140563003718853,
0.1709536910057068,
0.3630703091621399,
0.0625508725643158,
0.02740338444709778,
0.0422573983669281,
0.12479838728904724,
-0.07410014420747757,
-0.23391547799110413,
0.014663398265838623,
-0.06866805255413055,
0.17588120698928833,
-0.005366537719964981,
-0.10264819115400314,
-0.16871081292629242,
-0.23110349476337433,
0.46088600158691406,
0.12010407447814941,
0.07616876810789108,
-0.0585087314248085,
-0.20508496463298798,
0.04456071928143501,
0.004125216975808144,
0.26251643896102905,
-0.009350098669528961,
-0.11286374926567078,
0.22735658288002014,
0.07681304216384888,
-0.22240914404392242,
-0.2462586611509323,
-0.2503369450569153,
0.034182362258434296,
0.5150553584098816,
-0.2194654494524002,
-0.11575035005807877,
-0.09793514758348465,
0.17708110809326172,
0.04434516280889511,
0.1360619068145752,
0.6754922866821289,
0.1972072422504425,
0.10807175934314728,
-0.06831074506044388,
-0.22576135396957397,
-0.0008920431137084961,
0.28987428545951843,
0.12438564747571945,
0.46218574047088623,
0.5110169649124146,
-0.0024082139134407043,
0.3339206576347351,
-0.15105772018432617,
-0.25827762484550476,
-0.2768111526966095,
0.17634664475917816,
0.04431925714015961,
0.0027487650513648987,
-0.4018693268299103,
0.29877981543540955,
-0.07189635932445526,
-0.3413551449775696,
-0.06817653775215149,
0.034420475363731384,
-0.11981885880231857,
-0.26630693674087524,
-0.29751771688461304,
-0.15941083431243896,
-0.2106069177389145,
0.18181778490543365,
0.039316561073064804,
0.1803300976753235,
-0.08076252043247223,
0.11648798733949661,
-0.08866965770721436,
0.15492495894432068,
0.1667346954345703,
0.6605208516120911,
0.2578846216201782,
-0.009929100051522255,
-0.10723987966775894,
0.08720236271619797,
0.040046174079179764,
0.03668668866157532,
-0.0373532697558403,
0.11519623547792435,
0.035497043281793594,
-0.029695438221096992,
-0.13879349827766418,
-0.07746133953332901,
0.6734221577644348,
-0.1263866424560547,
-0.05388268828392029,
-0.09254595637321472,
-0.5396209955215454,
-0.20938993990421295,
0.22596178948879242,
-0.2650749385356903,
-0.22247059643268585,
0.174671471118927,
0.29931360483169556,
-0.14259515702724457,
-0.157789409160614,
0.12209418416023254,
0.40640988945961,
-0.3311172127723694,
-0.40636852383613586,
0.054921705275774,
-0.24088826775550842,
-0.17785799503326416,
-0.13179004192352295,
-0.09597431123256683,
-0.2433737814426422,
0.03069900907576084,
0.042529430240392685,
-0.38387617468833923,
0.00471535325050354,
0.16963618993759155,
-0.030225900933146477,
-0.24164175987243652,
-0.1622011661529541,
0.13182206451892853,
0.18348051607608795,
0.2295381873846054,
0.17898450791835785,
0.18173077702522278,
0.16271016001701355,
-0.6273974776268005,
0.1278335303068161,
0.22929930686950684,
0.24804240465164185,
0.01563921570777893,
-0.04927878454327583,
-0.13018444180488586,
0.04833237826824188,
0.13662756979465485,
-0.27567216753959656,
-0.0003733290359377861,
-0.04550065100193024,
0.3221082091331482,
-0.3522959053516388,
-0.5900351405143738,
0.3108600080013275,
0.22793728113174438,
-0.10288900136947632,
-0.15442408621311188,
0.17437328398227692,
-0.48224037885665894,
0.13401974737644196,
0.36472639441490173,
0.9555788636207581,
-0.01717909425497055,
0.07756207883358002,
0.13080793619155884,
-0.06025812774896622,
0.4272618889808655,
-0.21838204562664032,
0.027652446180582047,
-0.1985088288784027,
-0.36638572812080383,
-0.3195914924144745,
-0.27577316761016846,
0.47784626483917236,
0.4035695791244507,
-0.3696001470088959,
0.4447709918022156,
-0.02685573324561119,
0.08304241299629211,
0.37838634848594666,
0.058768242597579956,
0.27148622274398804,
-0.581607460975647,
-0.31192177534103394,
0.08925964683294296,
-0.10575920343399048,
0.2805688977241516,
-0.10498755425214767,
-0.18661613762378693,
-0.27182647585868835,
0.07700476795434952,
0.020539522171020508,
-0.04279312491416931,
-0.3292379677295685,
-0.19950631260871887,
-0.0850667655467987,
-0.21732233464717865,
0.8510028719902039,
0.34167590737342834,
0.2968757748603821,
0.21046848595142365,
-0.023609736934304237,
-0.1445998251438141,
-0.19451606273651123,
0.30038657784461975,
0.2033177763223648,
-0.15051834285259247,
0.5049749612808228,
-0.10628141462802887,
0.0509641095995903,
-0.06362912803888321,
-0.0944136455655098,
-0.20020942389965057,
0.2499520480632782,
-0.14954400062561035,
0.019924554973840714,
-0.4891400933265686,
0.06579728424549103,
0.07727876305580139,
-0.04380664974451065,
-0.02208293229341507,
0.08930470049381256,
0.1573813408613205,
0.003846494248136878,
0.3479999303817749,
0.2357843518257141,
-0.20184797048568726,
-0.06270627677440643,
0.001376122236251831,
0.3610294461250305,
0.12470567226409912,
0.04289647191762924,
-0.34291285276412964,
-0.28028082847595215,
-0.12544915080070496,
0.24068918824195862,
0.0951162576675415,
-0.4211357831954956,
0.20907044410705566,
0.06770329177379608,
-0.006852820515632629,
-0.18502674996852875,
0.026544570922851562,
0.2446223497390747,
-0.04675757884979248,
-0.40490221977233887,
-0.38550347089767456,
-0.5006260871887207,
0.10835213959217072,
0.2817618250846863,
-0.015572141855955124,
0.07296711951494217,
0.4616711735725403,
0.19580209255218506,
0.16723191738128662,
-0.2731505036354065,
-0.1845596581697464,
0.05712497979402542,
0.18183840811252594,
0.3260117471218109,
-0.12496911734342575,
-0.15133951604366302,
0.08860260248184204,
-0.04213215410709381,
-0.08288311213254929,
-0.1371411234140396,
-0.1382937729358673,
-0.10045024752616882,
0.17048168182373047,
0.1444207727909088,
0.04934827238321304,
-0.12902139127254486,
0.018103234469890594,
-0.07117579877376556,
-0.1099514290690422,
0.11450020968914032,
0.115331269800663,
-0.10273557901382446,
0.27024322748184204,
0.1610778272151947,
-0.033592090010643005,
-0.5131697058677673,
0.2962311804294586,
0.09047135710716248,
0.035935837775468826,
-0.2626500427722931,
0.19541136920452118,
-0.040306102484464645,
0.11272573471069336,
-0.4077848196029663,
0.20162221789360046,
0.25286832451820374,
0.07665777951478958,
0.45424845814704895,
-0.21426676213741302,
0.5300099849700928,
0.456241637468338,
0.1906006634235382,
0.09426109492778778,
-0.1394408941268921,
0.08930931240320206,
0.21378716826438904,
0.05392928421497345,
-0.361795574426651,
0.26425662636756897,
0.3354158401489258,
-0.12113890796899796,
0.03930263593792915,
0.42576083540916443,
-0.024711739271879196,
0.1340179592370987,
-0.16072119772434235,
-0.1882656216621399,
0.22889545559883118,
-0.19027292728424072,
0.1538877636194229,
0.5479018688201904,
-0.1896897256374359,
0.31014713644981384,
0.5182450413703918,
0.22187578678131104,
-0.08310503512620926,
0.2689262628555298,
0.12349675595760345,
0.26371362805366516,
0.0905313789844513,
-0.020528223365545273,
0.3966090977191925,
0.02871512621641159,
0.06794813275337219,
0.5042475461959839,
0.07376445829868317,
-0.21437722444534302,
0.12437156587839127,
-0.061073996126651764,
-0.09911524504423141,
-0.3878370225429535,
0.15651848912239075,
0.22662131488323212,
-0.13835003972053528,
0.4410693347454071,
-0.08696059882640839,
-0.025966063141822815,
0.14226554334163666,
-0.24066732823848724,
-0.32441332936286926,
-0.3866645097732544,
0.3253191113471985,
0.13279826939105988,
0.15069988369941711,
0.04162457585334778,
-0.07540211081504822,
-0.05169113725423813,
0.24636170268058777,
-0.06271937489509583,
-0.0002602245658636093,
0.22784128785133362,
0.22766919434070587,
0.09294886142015457,
0.539618730545044,
0.07618434727191925,
0.23168306052684784,
-0.04074673354625702,
0.18270425498485565,
-0.22757063806056976,
-0.18646779656410217,
0.03911551833152771,
0.1910354495048523,
-0.1933152675628662,
0.003873547539114952,
0.25460976362228394,
0.07402047514915466,
-0.037405919283628464,
0.22600506246089935,
-0.10734465718269348,
0.448650985956192,
-0.3857942521572113,
0.38672104477882385,
0.08281221240758896,
-0.13251227140426636,
-0.16839396953582764,
0.1630370318889618,
-0.11959545314311981,
-0.030396055430173874,
0.24657557904720306,
-0.3848780393600464,
0.049427278339862823,
-0.010487131774425507,
0.02933117374777794,
0.24433787167072296,
0.17568141222000122,
0.21909010410308838,
0.1514768898487091,
0.02479512058198452,
0.026575423777103424,
-0.3054017424583435,
-0.08438906818628311,
0.20601092278957367,
-0.18959814310073853,
-0.030219666659832,
-0.32391607761383057,
0.09800933301448822,
0.4614943861961365,
0.013751380145549774,
-0.3440374433994293,
0.018950968980789185,
0.05979282408952713,
-0.10773834586143494,
-0.047847848385572433,
0.0716327354311943,
0.30463746190071106,
0.07013793289661407,
-0.2273862361907959,
-0.025264013558626175,
0.29073697328567505,
-0.0455554835498333,
0.07543983310461044,
0.4472019672393799,
-0.12306702136993408,
0.06239704042673111,
0.13876211643218994,
0.20460043847560883,
0.39719223976135254,
-0.06043291091918945,
0.11159025877714157,
0.34806057810783386,
-0.025698984041810036,
-0.3430042564868927,
0.3999999761581421,
0.08634892106056213,
-0.006771691143512726,
-0.19524715840816498,
-0.12115144729614258,
-0.06401315331459045,
-0.2995356619358063,
-0.12132571637630463,
0.16044321656227112,
-0.7866063714027405,
0.10511903464794159,
-0.19826355576515198,
-0.21504811942577362,
0.15357202291488647,
0.2690836787223816,
-0.0474410280585289,
-0.16479100286960602,
-0.1739923357963562,
0.009541293606162071,
0.416262686252594,
-0.17124466598033905,
-0.2035199999809265,
-0.06164219230413437,
-0.24542561173439026,
-0.07947986572980881,
0.012492338195443153,
-0.3885907530784607,
-0.0811210572719574,
0.2913818657398224,
-0.035154037177562714,
0.23982635140419006,
0.19167478382587433,
-0.204472154378891,
-0.22091226279735565,
-0.13213086128234863,
0.6106512546539307,
-0.38815808296203613,
-0.043424878269433975,
-0.2438923418521881,
-0.009315166622400284
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.
I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :) | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 64 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.
I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :) | [
-0.4904249310493469,
0.08723007142543793,
-0.1906813532114029,
-0.08399483561515808,
0.34735822677612305,
-0.1753203272819519,
0.3381079435348511,
0.25743597745895386,
0.09037818014621735,
0.019790977239608765,
0.2580314576625824,
0.3618634343147278,
-0.3850792348384857,
0.4767216444015503,
0.19307029247283936,
-0.23244082927703857,
-0.15113478899002075,
0.26518380641937256,
-0.4250873625278473,
-0.01685386896133423,
-0.3289778232574463,
-0.1533588320016861,
-0.03308882936835289,
0.13287129998207092,
0.0029006816912442446,
-0.1466342955827713,
-0.09351357072591782,
-0.32801932096481323,
-0.07021589577198029,
-0.10451749712228775,
0.3167804777622223,
0.13688664138317108,
-0.05560280382633209,
0.43027424812316895,
-0.00010566466517047957,
-0.10335612297058105,
0.15286007523536682,
0.017244437709450722,
0.027098774909973145,
-0.36608898639678955,
-0.2878665626049042,
-0.23105230927467346,
-0.07963605225086212,
-0.35150226950645447,
-0.27247354388237,
-0.15478722751140594,
0.1759624183177948,
-0.3427094519138336,
0.5134338736534119,
0.16262955963611603,
0.24927589297294617,
-0.26640069484710693,
-0.1245216578245163,
-0.010689475573599339,
-0.05416984111070633,
0.4239858388900757,
-0.3033703863620758,
-0.5247580409049988,
0.4609450101852417,
0.23065628111362457,
-0.10122758895158768,
0.11873359978199005,
-0.09940466284751892,
-0.19072119891643524,
0.6304558515548706,
-0.11569911986589432,
-0.09317029267549515,
-0.5817269086837769,
-0.07845134288072586,
0.29589173197746277,
0.410266637802124,
-0.27051815390586853,
-0.47583121061325073,
-0.2998221516609192,
-0.014563723467290401,
0.12195391952991486,
-0.2259935736656189,
0.20291751623153687,
-0.021897658705711365,
0.32702213525772095,
-0.2893717288970947,
-0.22548937797546387,
-0.347273051738739,
0.012036480009555817,
-0.22293561697006226,
0.16009217500686646,
-0.09787455946207047,
-0.025984279811382294,
0.045367281883955,
0.040365323424339294,
0.23708924651145935,
0.09525235742330551,
0.16542086005210876,
0.14293871819972992,
-0.09124256670475006,
-0.42841148376464844,
-0.12218103557825089,
0.010444998741149902,
-0.20884186029434204,
0.20011070370674133,
0.03289974480867386,
0.12624606490135193,
-0.01828283630311489,
0.04924193397164345,
0.00542067363858223,
0.1322813630104065,
0.004580564796924591,
0.03821774944663048,
0.2880476713180542,
-0.36330437660217285,
-0.03134819120168686,
0.13700470328330994,
0.03543560206890106,
0.021280188113451004,
-0.14029639959335327,
0.16610592603683472,
0.014712370932102203,
0.014949169009923935,
-0.0016044676303863525,
-0.2726559638977051,
0.10667625814676285,
0.13367393612861633,
-0.13376650214195251,
0.07497944682836533,
0.1600475311279297,
0.3427145481109619,
0.409409761428833,
0.05671390891075134,
0.24071849882602692,
-0.19852934777736664,
0.0100686214864254,
0.17173992097377777,
-0.20101802051067352,
-0.03145059198141098,
0.0899898111820221,
0.09846095740795135,
-0.19028864800930023,
-0.08574919402599335,
-0.13601142168045044,
0.40322044491767883,
0.2586649954319,
-0.010307940654456615,
0.3266669809818268,
0.2876625061035156,
-0.38403454422950745,
-0.224759042263031,
0.047836583107709885,
-0.021408144384622574,
-0.26457005739212036,
0.15716257691383362,
-0.2843395471572876,
-0.049586549401283264,
0.1654483526945114,
0.2562444806098938,
0.07456798106431961,
-0.08259932696819305,
-0.25850990414619446,
0.43594467639923096,
0.03506230562925339,
-0.12886394560337067,
0.18799792230129242,
-0.2153187245130539,
-0.20616064965724945,
-0.09295377135276794,
-0.1613589972257614,
-0.08553038537502289,
-0.521026074886322,
-0.43303462862968445,
-0.2928818464279175,
0.06708509474992752,
0.18551868200302124,
0.12581218779087067,
-0.09951912611722946,
0.25495415925979614,
-0.054006434977054596,
0.017664916813373566,
0.6603582501411438,
-0.17471997439861298,
-0.09790228307247162,
0.2688249945640564,
-0.35721355676651,
-0.15987107157707214,
0.12790317833423615,
0.40350329875946045,
0.3632645905017853,
-0.2125302404165268,
-0.4146346151828766,
0.3534538745880127,
-0.0909685492515564,
0.005409816280007362,
0.15271718800067902,
-0.2682521641254425,
0.24697841703891754,
0.21280843019485474,
0.35049399733543396,
0.2810119092464447,
0.12943308055400848,
0.14013172686100006,
-0.11051324754953384,
-0.4927367866039276,
0.3531641364097595,
-0.037663474678993225,
0.19124430418014526,
0.02064960077404976,
0.04287266358733177,
-0.6312670707702637,
0.18813900649547577,
-0.11620896309614182,
-0.27098506689071655,
0.10826852172613144,
0.2710977792739868,
-0.1145072877407074,
0.1172642633318901,
-0.1550062894821167,
0.07336240261793137,
-0.16303561627864838,
0.23637935519218445,
-0.3905518054962158,
0.17087557911872864,
-0.20110248029232025,
-0.23998908698558807,
0.39378681778907776,
0.009754175320267677,
0.05346575751900673,
-0.4360542893409729,
0.14320403337478638,
0.2297930121421814,
0.18558356165885925,
-0.16413727402687073,
0.19893193244934082,
-0.34910744428634644,
-0.2043972611427307,
0.0468188114464283,
-0.22833698987960815,
0.07345971465110779,
0.06713738292455673,
0.04978392273187637,
0.5814133286476135,
0.25757402181625366,
-0.07388968765735626,
0.27157148718833923,
0.029743488878011703,
0.15121978521347046,
-0.06866458803415298,
-0.16900447010993958,
0.647994875907898,
-0.002713441848754883,
0.25563040375709534,
-0.13939623534679413,
0.1753907948732376,
0.2669113576412201,
-0.31811273097991943,
-0.2655089795589447,
-0.030036959797143936,
-0.03970976546406746,
-0.06468440592288971,
0.24214835464954376,
0.048163264989852905,
0.0189807265996933,
0.046281807124614716,
0.2515476644039154,
0.015413273125886917,
0.24255436658859253,
0.3825647234916687,
-0.15108874440193176,
0.20118212699890137,
-0.19379651546478271,
0.5782841444015503,
0.4915008544921875,
0.2047150731086731,
-0.2291339635848999,
0.19659872353076935,
0.18050380051136017,
-0.0880013033747673,
0.2533920109272003,
0.1599665880203247,
0.30585727095603943,
0.03243343532085419,
-0.027973288670182228,
0.13969098031520844,
-0.06318748742341995,
-0.4729800224304199,
-0.17488649487495422,
-0.055155470967292786,
-0.058984383940696716,
0.2467171996831894,
-0.2987348437309265,
-0.33896923065185547,
-0.18293865025043488,
-0.05429276451468468,
0.2892740070819855,
-0.051330626010894775,
0.20561283826828003,
-0.2524845004081726,
-0.11103032529354095,
0.16035223007202148,
-0.0294562429189682,
0.514957070350647,
0.10222822427749634,
-0.048777803778648376,
-0.28075864911079407,
-0.21418233215808868,
0.07959693670272827,
0.19242393970489502,
0.017154023051261902,
0.03269387036561966,
0.4736202657222748,
-0.2052604705095291,
0.35567086935043335,
-0.22284738719463348,
-0.582842230796814,
0.09998743236064911,
-0.03938083350658417,
0.15675310790538788,
0.3471786379814148,
-0.06408415734767914,
0.11750757694244385,
-0.08127842843532562,
-0.005426733288913965,
-0.19490236043930054,
-0.288954496383667,
-0.05807359144091606,
-0.15374135971069336,
-0.06828709691762924,
-0.10094256699085236,
-0.18541854619979858,
-0.30571621656417847,
-0.36530691385269165,
0.3621484041213989,
0.016843046993017197,
0.10683317482471466,
-0.14641538262367249,
-0.052857592701911926,
0.04665524140000343,
0.12019319832324982,
0.11843552440404892,
-0.025423642247915268,
-0.05449887365102768,
0.13311652839183807,
-0.1406107395887375,
-0.19210828840732574,
-0.24216391146183014,
-0.3054250478744507,
0.1779673993587494,
0.35930776596069336,
-0.1374824047088623,
-0.08648882061243057,
-0.17978444695472717,
0.026905659586191177,
0.1405409872531891,
-0.09509449452161789,
0.5606483221054077,
0.05805330350995064,
-0.10287097841501236,
-0.1430605947971344,
0.09604905545711517,
-0.15945467352867126,
0.14040452241897583,
0.062264636158943176,
0.20146134495735168,
0.4887658655643463,
0.0573834590613842,
0.39667612314224243,
-0.27635079622268677,
-0.560584306716919,
-0.15528889000415802,
0.055917657911777496,
-0.15926402807235718,
0.03577288240194321,
-0.4223344922065735,
0.11166070401668549,
-0.09613625705242157,
-0.18437348306179047,
0.01440170407295227,
-0.017721734941005707,
-0.42353618144989014,
-0.09080873429775238,
0.01250564306974411,
-0.24038627743721008,
-0.10807628929615021,
0.12253650277853012,
-0.05863828957080841,
0.12715207040309906,
-0.08068235963582993,
-0.005405016243457794,
-0.09422791004180908,
0.0064893364906311035,
0.25015148520469666,
0.3186611533164978,
0.22445738315582275,
-0.067120760679245,
-0.08952485024929047,
-0.13135679066181183,
0.05924033373594284,
0.19891011714935303,
-0.028622936457395554,
-0.1292303502559662,
-0.09338749945163727,
-0.12763719260692596,
-0.06058338284492493,
-0.09351565688848495,
0.6798667311668396,
-0.2585860788822174,
-0.18336020410060883,
0.11501741409301758,
-0.5211288928985596,
-0.21162308752536774,
0.15721577405929565,
-0.29362353682518005,
-0.13875457644462585,
0.18460196256637573,
0.2109849452972412,
-0.004083983600139618,
-0.09683086723089218,
-0.04368089139461517,
0.0557718500494957,
-0.2764882743358612,
-0.13824471831321716,
0.1732906848192215,
-0.16752006113529205,
-0.40469297766685486,
0.0434766560792923,
0.06670427322387695,
-0.11909327656030655,
-0.1624390035867691,
-0.22028718888759613,
-0.3782520592212677,
0.0179273821413517,
0.2050924152135849,
-0.11876729130744934,
-0.30534645915031433,
-0.2115316540002823,
0.1628762036561966,
-0.07561777532100677,
0.24822068214416504,
0.1217728853225708,
0.011103350669145584,
0.1771586835384369,
-0.44120997190475464,
0.2124978005886078,
0.06919164955615997,
0.2468559741973877,
-0.07703123986721039,
0.06955914944410324,
0.013677500188350677,
0.09931488335132599,
0.17309293150901794,
-0.4768766164779663,
0.09109120070934296,
-0.04908941686153412,
0.13108184933662415,
-0.17009231448173523,
-0.5385857820510864,
0.41645514965057373,
0.3622058033943176,
-0.14253348112106323,
0.19241446256637573,
-0.1396234929561615,
-0.45834797620773315,
0.3108941912651062,
0.5458207130432129,
0.882056713104248,
0.020246248692274094,
0.18159319460391998,
-0.16264629364013672,
-0.25209036469459534,
0.3659994900226593,
-0.33634841442108154,
0.1634485423564911,
-0.37656545639038086,
-0.35042664408683777,
-0.27775391936302185,
-0.16027238965034485,
0.358818382024765,
0.31633085012435913,
-0.4421457052230835,
0.2141096442937851,
0.1854148656129837,
-0.277467280626297,
0.09271311014890671,
0.1222992092370987,
-0.00641200877726078,
-0.5177205204963684,
-0.06172647327184677,
0.2326446771621704,
0.014714401215314865,
0.23466496169567108,
-0.07671242207288742,
-0.21865074336528778,
-0.06353168189525604,
0.2925376296043396,
-0.2410871833562851,
-0.08985967934131622,
-0.19458205997943878,
0.07600592076778412,
-0.1570577174425125,
-0.15793846547603607,
0.5903680920600891,
0.21399915218353271,
0.11315564066171646,
0.16557103395462036,
-0.15227526426315308,
0.028646010905504227,
-0.1678532361984253,
0.29730120301246643,
0.059607625007629395,
-0.22489048540592194,
0.529411256313324,
-0.07132680714130402,
0.02277209609746933,
-0.050037361681461334,
0.0985267236828804,
-0.23470285534858704,
0.05668410658836365,
-0.0197720006108284,
0.014620538800954819,
-0.2881876826286316,
0.03744162991642952,
0.06809686869382858,
-0.08478531241416931,
-0.009779714047908783,
0.20562773942947388,
0.13913477957248688,
0.10218450427055359,
0.488070011138916,
0.24779072403907776,
-0.26983344554901123,
-0.018706265836954117,
0.04850176349282265,
0.24337893724441528,
-0.02826523408293724,
0.10785975307226181,
-0.24742671847343445,
-0.307979941368103,
-0.40381237864494324,
0.19363129138946533,
-0.08006509393453598,
-0.14029720425605774,
0.42410293221473694,
0.056007422506809235,
-0.2723395526409149,
0.02278970181941986,
-0.29024747014045715,
0.27313104271888733,
-0.06062731891870499,
-0.3673824667930603,
-0.4418165683746338,
-0.2765268087387085,
0.0984332337975502,
-0.04817857965826988,
0.17486202716827393,
-0.11950621008872986,
0.1579868197441101,
0.22333459556102753,
0.019256845116615295,
-0.4004310369491577,
-0.02061004936695099,
-0.04667302221059799,
0.07733526080846786,
0.14801134169101715,
-0.011920351535081863,
-0.3965812623500824,
0.18311083316802979,
0.016403773799538612,
0.002393558621406555,
-0.283908873796463,
-0.2874854505062103,
-0.17359912395477295,
0.11511752009391785,
-0.05167526751756668,
0.22663246095180511,
0.09732764959335327,
0.14616526663303375,
-0.1276882141828537,
-0.08394322544336319,
0.01752033829689026,
0.08775027841329575,
-0.06572090089321136,
0.39656782150268555,
0.3393172323703766,
-0.3135196566581726,
-0.12800821661949158,
0.13239145278930664,
0.11971370130777359,
0.01097434014081955,
-0.14041410386562347,
0.4049529731273651,
0.2219868004322052,
0.0319916233420372,
-0.13671568036079407,
0.17517277598381042,
0.2696068286895752,
-0.04333247244358063,
0.5080506205558777,
0.01621755212545395,
0.30498185753822327,
0.5331389904022217,
0.0364377461373806,
0.13189929723739624,
-0.14327524602413177,
0.13200479745864868,
0.16620609164237976,
0.2966303527355194,
-0.28222933411598206,
0.09344526380300522,
0.24856573343276978,
0.0942155048251152,
0.05513603612780571,
0.2299279123544693,
0.1871548295021057,
0.08469513058662415,
0.1109357476234436,
-0.13043943047523499,
0.3049079179763794,
-0.4942295551300049,
0.24682632088661194,
0.3790168762207031,
-0.0694417953491211,
0.027155030518770218,
0.3060776889324188,
0.07165149599313736,
0.06851819157600403,
0.3909003734588623,
0.2271907925605774,
0.5443763136863708,
0.27856454253196716,
0.06792286038398743,
0.3333749771118164,
0.09510885179042816,
-0.02244412526488304,
0.33891135454177856,
-0.13128918409347534,
0.21811622381210327,
0.25184446573257446,
-0.03865495324134827,
0.1300685703754425,
-0.19978976249694824,
-0.1038372740149498,
0.4290386140346527,
-0.205400288105011,
0.08879199624061584,
-0.26586657762527466,
-0.06444509327411652,
0.13667576014995575,
-0.27685609459877014,
-0.06329704821109772,
-0.10975143313407898,
0.463569313287735,
0.09020516276359558,
0.07080651819705963,
0.17559541761875153,
0.20308852195739746,
-0.13223901391029358,
0.22480255365371704,
-0.15673395991325378,
-0.1942659467458725,
0.17747722566127777,
-0.010163366794586182,
0.14752663671970367,
0.4574737846851349,
0.22582915425300598,
0.17317377030849457,
-0.4393772780895233,
0.2172543704509735,
-0.3352851867675781,
-0.2082684338092804,
-0.1618865579366684,
0.4071257412433624,
-0.1332310140132904,
0.03228650987148285,
0.18163149058818817,
0.27378708124160767,
-0.15492737293243408,
0.16820046305656433,
-0.01911437138915062,
0.20278429985046387,
-0.20839428901672363,
0.5841745138168335,
0.35287711024284363,
-0.11910364031791687,
-0.11959269642829895,
0.1830764263868332,
-0.10067223012447357,
-0.03531777486205101,
0.4973425567150116,
-0.533572256565094,
-0.010191228240728378,
0.037252262234687805,
0.11499899625778198,
0.08393213152885437,
0.2910141944885254,
0.10345766693353653,
0.14825451374053955,
0.14195847511291504,
-0.03778868913650513,
-0.15654458105564117,
0.0021489933133125305,
0.2513355314731598,
-0.04252354055643082,
-0.1603264957666397,
-0.1410854458808899,
0.06758332252502441,
0.27083802223205566,
-0.02687588334083557,
-0.38742589950561523,
-0.1746879667043686,
0.15469059348106384,
-0.1828954666852951,
0.10269390046596527,
0.11120927333831787,
0.2961474359035492,
0.08961258828639984,
-0.25458675622940063,
-0.07734453678131104,
0.2244991660118103,
0.13737821578979492,
-0.04031720757484436,
0.33288320899009705,
0.13044002652168274,
0.12385589629411697,
0.25488120317459106,
0.20910607278347015,
0.413035124540329,
-0.21546676754951477,
0.34685203433036804,
0.23436662554740906,
-0.18993835151195526,
-0.25912246108055115,
0.24678179621696472,
0.11878816783428192,
-0.03432587534189224,
-0.21980725228786469,
-0.2305334061384201,
0.06521187722682953,
-0.15308772027492523,
0.00557718425989151,
0.12222938984632492,
-0.5944429039955139,
0.016727572306990623,
-0.29751431941986084,
-0.09412962943315506,
-0.00702161667868495,
0.31094104051589966,
-0.0001742839813232422,
-0.10218144208192825,
-0.023492299020290375,
-0.25132185220718384,
0.21580997109413147,
-0.13683725893497467,
-0.46596452593803406,
-0.09298311918973923,
-0.13705706596374512,
-0.305881142616272,
0.15795503556728363,
-0.13814029097557068,
-0.1742241382598877,
0.3162981867790222,
-0.24968987703323364,
0.3183436095714569,
0.217551589012146,
0.022203117609024048,
-0.20631156861782074,
-0.26272353529930115,
0.4805038273334503,
-0.10959034413099289,
-0.0933699682354927,
-0.2571106553077698,
-0.23900224268436432
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Thanks for reply.
What would be the constraints
to have
Dataset —> Dataset consistency ?
Main issue would be
larger than memory dataset and
serialization on disk.
Technically,
one still process at atomic level
and try to wrap the full results
into Dataset…. (!)
What would you think ?
> On Jul 7, 2021, at 16:51, Quentin Lhoest ***@***.***> wrote:
>
>
> I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.
>
> I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 155 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Thanks for reply.
What would be the constraints
to have
Dataset —> Dataset consistency ?
Main issue would be
larger than memory dataset and
serialization on disk.
Technically,
one still process at atomic level
and try to wrap the full results
into Dataset…. (!)
What would you think ?
> On Jul 7, 2021, at 16:51, Quentin Lhoest ***@***.***> wrote:
>
>
> I can imagine that this would be a useful API to implement processing pipelines as transforms. They could be used to perform higher level transforms compared to the atomic transforms allowed by methods like map, filter, etc.
>
> I guess if you find any transform that could be useful for text dataset processing, image dataset processing etc. we could definitely start having such transforms :)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| [
-0.4273890256881714,
0.20382335782051086,
-0.08927126228809357,
0.06771744042634964,
0.522381067276001,
-0.134012371301651,
0.3225378096103668,
0.19111184775829315,
0.01309226080775261,
0.06153802201151848,
0.22661881148815155,
0.350603848695755,
-0.410344660282135,
0.29846781492233276,
0.013341536745429039,
-0.054273925721645355,
-0.03888622671365738,
0.2965456247329712,
-0.5386682748794556,
-0.07398605346679688,
-0.16742369532585144,
-0.22617632150650024,
-0.0746392235159874,
-0.11888150870800018,
-0.07012075185775757,
-0.056086450815200806,
-0.16320322453975677,
-0.4052655100822449,
-0.31355422735214233,
-0.06573662161827087,
0.525324285030365,
0.2762763500213623,
0.022316429764032364,
0.4755655527114868,
-0.00011431797611294314,
-0.163105770945549,
0.23986592888832092,
0.008474363014101982,
-0.11458776891231537,
-0.4431605339050293,
-0.3388577699661255,
-0.20926137268543243,
-0.08252439647912979,
-0.35102909803390503,
-0.26365336775779724,
0.017398998141288757,
0.053882576525211334,
-0.31006959080696106,
0.49179160594940186,
-0.04070637747645378,
0.14106687903404236,
-0.3664945065975189,
0.006174780428409576,
0.03957519680261612,
-0.2592405676841736,
0.4160125255584717,
-0.18950732052326202,
-0.26592785120010376,
0.27929556369781494,
0.2837563157081604,
-0.10736126452684402,
-0.027985941618680954,
-0.047001831233501434,
-0.2350814789533615,
0.6600615978240967,
-0.19433720409870148,
0.004330754280090332,
-0.5277867317199707,
-0.046531230211257935,
0.3039249777793884,
0.6490062475204468,
-0.39817866683006287,
-0.42641741037368774,
-0.19456234574317932,
-0.03832767531275749,
0.1389341950416565,
-0.04986041039228439,
0.24435946345329285,
0.01765555515885353,
0.38496866822242737,
-0.29074928164482117,
-0.2940438389778137,
-0.42228302359580994,
0.02566976100206375,
-0.3817661702632904,
0.14516247808933258,
-0.004739326424896717,
-0.0499584823846817,
-0.03843207284808159,
0.13080909848213196,
0.3123416304588318,
-0.11270138621330261,
0.2272324562072754,
0.06862441450357437,
-0.16265711188316345,
-0.5328316688537598,
-0.3075411319732666,
0.09869380295276642,
0.0344528928399086,
0.10205546766519547,
-0.056150585412979126,
0.037679560482501984,
-0.06473980844020844,
0.012117858976125717,
0.13775897026062012,
0.26555928587913513,
-0.017764702439308167,
0.11452456563711166,
0.19950106739997864,
-0.38724711537361145,
0.03047584369778633,
0.22867730259895325,
0.008876785635948181,
-0.059366125613451004,
0.11556999385356903,
0.14833205938339233,
0.04887896031141281,
-0.05836394056677818,
0.06967639178037643,
-0.13578687608242035,
0.04417422413825989,
-0.04550984129309654,
-0.20641760528087616,
-0.0037699490785598755,
0.21029751002788544,
0.4288650155067444,
0.2672247290611267,
0.1521553099155426,
0.20641732215881348,
-0.24881501495838165,
0.0779285654425621,
0.02250211127102375,
-0.3289780616760254,
-0.07786109298467636,
0.04613812640309334,
0.05874963477253914,
-0.31087204813957214,
0.1111932322382927,
-0.16365864872932434,
0.41830363869667053,
0.13643677532672882,
-0.291319340467453,
0.16368433833122253,
0.17840734124183655,
-0.36460423469543457,
-0.02932317554950714,
-0.04573659226298332,
0.025066480040550232,
-0.2207821011543274,
0.40008974075317383,
0.00811336562037468,
0.05467933788895607,
0.1735200732946396,
0.17611421644687653,
-0.0178803950548172,
0.13666588068008423,
-0.28485560417175293,
0.29278630018234253,
0.16203191876411438,
-0.063412606716156,
0.11343929916620255,
-0.4430205225944519,
-0.18596749007701874,
-0.19987769424915314,
-0.1033182293176651,
0.01720067858695984,
-0.6279919147491455,
-0.24537138640880585,
-0.13628186285495758,
0.10939310491085052,
0.036539554595947266,
0.28484925627708435,
-0.12137536704540253,
0.22522810101509094,
-0.15341003239154816,
-0.2330719381570816,
0.5798248052597046,
-0.09703914076089859,
-0.24546599388122559,
0.22896352410316467,
-0.3728941082954407,
-0.13948629796504974,
0.1957407295703888,
0.2967514097690582,
0.46054548025131226,
-0.23935739696025848,
-0.49085626006126404,
0.2818577289581299,
-0.06483832001686096,
-0.11804568767547607,
0.012663714587688446,
-0.25418004393577576,
0.3696833848953247,
-0.06920650601387024,
0.2602420449256897,
0.19972939789295197,
0.004315517842769623,
0.32010895013809204,
-0.026031330227851868,
-0.44737496972084045,
0.36031800508499146,
-0.006686992943286896,
0.4549992084503174,
0.05674545839428902,
0.05858326330780983,
-0.3478063642978668,
-0.034172721207141876,
0.05309110879898071,
-0.04736743122339249,
0.24668747186660767,
0.3147393465042114,
-0.009118247777223587,
0.18413197994232178,
-0.1566162258386612,
0.03342132270336151,
-0.1146247535943985,
0.11161971092224121,
-0.34076356887817383,
0.2966473400592804,
-0.14154189825057983,
-0.2600739300251007,
0.5447849631309509,
0.0473787784576416,
0.12054856866598129,
-0.5010403394699097,
0.33264800906181335,
0.050078846514225006,
0.16719111800193787,
-0.15015871822834015,
0.05978219956159592,
-0.344549298286438,
-0.19233961403369904,
0.021027585491538048,
-0.16293486952781677,
0.1314265877008438,
0.07726972550153732,
-0.04948344826698303,
0.606602668762207,
0.4095850884914398,
-0.17006267607212067,
0.47391477227211,
0.05108073353767395,
0.1334010809659958,
-0.119486004114151,
-0.12700355052947998,
0.49279630184173584,
-0.09844048321247101,
0.21285824477672577,
-0.08143238723278046,
-0.004413038492202759,
0.2524285912513733,
-0.29853662848472595,
-0.3720681667327881,
-0.09597545862197876,
0.10433245450258255,
-0.013754017651081085,
0.22531406581401825,
0.21280795335769653,
0.0153646320104599,
0.012465111911296844,
0.15733179450035095,
-0.07550554722547531,
0.14214423298835754,
0.3831191956996918,
-0.1746157705783844,
0.22057625651359558,
-0.20043019950389862,
0.4899602234363556,
0.5510017275810242,
0.1705225557088852,
-0.24515029788017273,
0.1599910706281662,
0.1105063408613205,
-0.06508618593215942,
0.2228184938430786,
0.05257431045174599,
0.38054969906806946,
0.22481834888458252,
-0.029850268736481667,
0.18787594139575958,
0.03492619842290878,
-0.38467517495155334,
-0.0897410437464714,
-0.06985805183649063,
-0.05283524468541145,
0.01596570946276188,
-0.2960266172885895,
-0.22277423739433289,
-0.4385726749897003,
-0.08189922571182251,
0.04922953248023987,
-0.025558091700077057,
-0.04040950536727905,
-0.042443353682756424,
0.23822557926177979,
0.11598269641399384,
-0.10455280542373657,
0.39316195249557495,
0.11400195956230164,
-0.134783536195755,
-0.14029718935489655,
-0.08848389238119125,
0.005335371941328049,
0.03955951705574989,
0.09504122287034988,
0.016657736152410507,
0.43652573227882385,
-0.1513853669166565,
0.1293429434299469,
-0.07607084512710571,
-0.5865781307220459,
0.07192421704530716,
0.0726543664932251,
0.1306542158126831,
0.28498661518096924,
0.07182257622480392,
0.14271193742752075,
0.05458288639783859,
0.03404659777879715,
-0.19979263842105865,
-0.3182961344718933,
-0.06812585145235062,
-0.02699984796345234,
-0.05617358908057213,
-0.006238766014575958,
-0.12701818346977234,
-0.36569973826408386,
-0.1590500921010971,
0.26043373346328735,
-0.037067607045173645,
0.022502362728118896,
-0.1918991655111313,
0.03664059564471245,
-0.16758300364017487,
0.039267078042030334,
0.14887817203998566,
-0.11302110552787781,
-0.011831067502498627,
0.26236313581466675,
0.06927989423274994,
-0.26764360070228577,
-0.2812868058681488,
-0.3509054183959961,
0.1491185873746872,
0.2953973412513733,
-0.2414921671152115,
0.011001133359968662,
-0.18527723848819733,
0.047468919306993484,
0.006226107478141785,
-0.053040266036987305,
0.644025444984436,
0.135254368185997,
-0.009084142744541168,
-0.16667026281356812,
-0.01239923108369112,
-0.07241026312112808,
0.09611985087394714,
0.17596544325351715,
0.36266377568244934,
0.4776420295238495,
0.1353178322315216,
0.452847957611084,
-0.03098912164568901,
-0.5186716914176941,
-0.2558550238609314,
0.2427676022052765,
-0.010979566723108292,
0.0308997742831707,
-0.46944743394851685,
0.209697887301445,
-0.0902995765209198,
-0.4066222906112671,
-0.10129158198833466,
-0.0884547084569931,
-0.20111434161663055,
-0.14992767572402954,
-0.005767317488789558,
-0.10171918570995331,
-0.13210442662239075,
0.17234671115875244,
-0.16243550181388855,
0.12463763356208801,
-0.0637589693069458,
-0.03381510451436043,
0.07959860563278198,
-0.03446478024125099,
0.17255260050296783,
0.43234139680862427,
0.08138411492109299,
-0.062054593116045,
-0.058633703738451004,
0.031067484989762306,
-0.03840595483779907,
0.08968950062990189,
-0.12391173094511032,
0.01691371388733387,
0.08031617105007172,
0.04982003569602966,
-0.14094328880310059,
-0.04801947623491287,
0.9176005125045776,
-0.10543618351221085,
0.07518336176872253,
-0.05286277458071709,
-0.40789809823036194,
-0.160627543926239,
0.05552314594388008,
-0.2564142644405365,
-0.2815263271331787,
0.1257942020893097,
0.16075360774993896,
-0.17366963624954224,
-0.046767253428697586,
-0.16748900711536407,
0.1465185582637787,
-0.360606849193573,
-0.36810463666915894,
0.13732224702835083,
0.019704490900039673,
-0.18515247106552124,
-0.13516715168952942,
0.060341596603393555,
-0.09393222630023956,
-0.3234587609767914,
-0.160289466381073,
-0.34615886211395264,
-0.1559460461139679,
0.3014023005962372,
-0.40908297896385193,
-0.18053597211837769,
-0.2664680778980255,
0.3182808458805084,
-0.015643753111362457,
0.24021948873996735,
0.3277970850467682,
0.08345166593790054,
0.09673547744750977,
-0.4447585344314575,
0.11288213729858398,
0.09164171665906906,
0.158023864030838,
-0.003663972020149231,
0.13135088980197906,
-0.25200578570365906,
0.10545974224805832,
0.053769879043102264,
-0.560413658618927,
-0.06054243817925453,
-0.0197844710201025,
0.18371763825416565,
-0.4386499226093292,
-0.5073025226593018,
0.2810857594013214,
0.37227103114128113,
-0.043757133185863495,
0.13409192860126495,
-0.08832657337188721,
-0.5383082032203674,
0.3317030668258667,
0.5413071513175964,
1.0115052461624146,
0.035308774560689926,
0.09510833024978638,
-0.16181915998458862,
-0.2940164804458618,
0.4121870994567871,
-0.25512462854385376,
0.13746586441993713,
-0.40250667929649353,
-0.3175670802593231,
-0.3263968229293823,
-0.30398353934288025,
0.4266262352466583,
0.3661130666732788,
-0.4697667360305786,
0.2520805597305298,
0.06604796648025513,
-0.16980917751789093,
0.1787825971841812,
0.3193563222885132,
-0.01307385228574276,
-0.41833359003067017,
0.07111567258834839,
0.14107894897460938,
-0.04155402630567551,
0.19631969928741455,
-0.04622357711195946,
-0.272369921207428,
-0.20796747505664825,
0.22087867558002472,
-0.3255506157875061,
-0.11736954748630524,
-0.32213422656059265,
-0.007234374061226845,
-0.1927802711725235,
-0.2832832634449005,
0.5923356413841248,
0.19044971466064453,
0.24292097985744476,
0.21275317668914795,
-0.09053438901901245,
-0.10155874490737915,
-0.04858524352312088,
0.25039374828338623,
0.13083073496818542,
-0.2683895230293274,
0.5263615846633911,
0.00363289937376976,
0.05600550025701523,
-0.13352921605110168,
0.017461370676755905,
-0.1048344224691391,
0.09183304011821747,
-0.34024643898010254,
0.07997389137744904,
-0.4458630681037903,
-0.03235575929284096,
0.0731363296508789,
0.0000028945505619049072,
0.03375672921538353,
0.11412405967712402,
0.2982447147369385,
-0.005326439626514912,
0.541486918926239,
0.24115344882011414,
-0.12543706595897675,
-0.08806352317333221,
0.2546871304512024,
0.32917100191116333,
0.08570195734500885,
0.04398280382156372,
-0.24233882129192352,
-0.3445207476615906,
-0.22693288326263428,
0.2997031509876251,
-0.09330890327692032,
-0.17675742506980896,
0.2913905382156372,
-0.04919779673218727,
-0.07354626059532166,
-0.07078908383846283,
-0.24977907538414001,
0.369614839553833,
0.14451870322227478,
-0.30724313855171204,
-0.49296995997428894,
-0.22347159683704376,
0.14687052369117737,
0.027237994596362114,
0.2472437024116516,
-0.056998420506715775,
0.22503894567489624,
0.1465998739004135,
0.0512826070189476,
-0.32496652007102966,
-0.15635813772678375,
0.1272396296262741,
0.03786870837211609,
0.0823531299829483,
-0.12065399438142776,
-0.46543052792549133,
0.02437450736761093,
-0.04101724177598953,
-0.022377047687768936,
-0.25151994824409485,
-0.17958056926727295,
0.002503056079149246,
0.17601419985294342,
0.029017774388194084,
0.3748074769973755,
-0.06231191009283066,
-0.042920321226119995,
0.025281887501478195,
0.0009242277592420578,
-0.11335432529449463,
0.1886109709739685,
-0.12126076221466064,
0.3817112147808075,
0.355500191450119,
-0.24820151925086975,
-0.3381785750389099,
0.2174444943666458,
0.11947199702262878,
0.07223750650882721,
-0.024797717109322548,
0.4353024959564209,
0.173755943775177,
0.08687277138233185,
-0.4525143802165985,
0.11676055192947388,
0.1905517876148224,
-0.126123309135437,
0.4027771055698395,
-0.16676564514636993,
0.34284061193466187,
0.5249504446983337,
0.346102237701416,
0.3309939205646515,
-0.24207031726837158,
-0.01786845177412033,
0.1920127272605896,
0.16847071051597595,
-0.2243758589029312,
0.18294303119182587,
0.24875479936599731,
0.03333594650030136,
-0.07616442441940308,
0.35996705293655396,
0.19591884315013885,
-0.013687960803508759,
-0.09759475290775299,
-0.005923260934650898,
0.5347857475280762,
-0.5172251462936401,
0.28313595056533813,
0.4529385268688202,
-0.05782013013958931,
0.13005226850509644,
0.3954427242279053,
0.11734510958194733,
0.04067006707191467,
0.3292231559753418,
0.1746826171875,
0.4738544821739197,
0.26456671953201294,
0.02435218170285225,
0.3100908100605011,
0.1382424533367157,
-0.039708252996206284,
0.5465514063835144,
-0.05787649750709534,
-0.04617868363857269,
0.1481502652168274,
-0.05532044917345047,
0.1089123785495758,
-0.3581898510456085,
-0.03748641535639763,
0.2535938024520874,
-0.2680293619632721,
0.24177786707878113,
-0.23995862901210785,
-0.12680520117282867,
0.1208413690328598,
-0.2076500952243805,
-0.15611609816551208,
-0.18414482474327087,
0.4952988624572754,
0.1778952181339264,
0.0020785704255104065,
-0.008686069399118423,
0.20540380477905273,
-0.1518825888633728,
0.08134263008832932,
-0.13581472635269165,
-0.04785574972629547,
0.14612999558448792,
0.05624553561210632,
0.08462554216384888,
0.6115331649780273,
0.2377927601337433,
0.32048720121383667,
-0.2992596924304962,
0.13916383683681488,
-0.23919962346553802,
-0.27488845586776733,
0.003513827919960022,
0.41705936193466187,
-0.22620922327041626,
-0.1757851243019104,
0.28709670901298523,
0.17123019695281982,
-0.055743131786584854,
0.3106929659843445,
0.04558088630437851,
0.24013730883598328,
-0.2947987914085388,
0.5732992887496948,
0.41698282957077026,
-0.0019924938678741455,
-0.00440274178981781,
0.10763572156429291,
-0.2917105257511139,
-0.07115497440099716,
0.5056438446044922,
-0.5531602501869202,
-0.07428981363773346,
0.005825186148285866,
0.07136587798595428,
0.057574596256017685,
0.10993477702140808,
0.15494947135448456,
0.05505776405334473,
0.052235983312129974,
-0.0616665780544281,
-0.19317838549613953,
0.0594416968524456,
0.1810072362422943,
-0.06204546242952347,
-0.3174685537815094,
-0.004277615807950497,
0.11447106301784515,
0.38692641258239746,
0.09391595423221588,
-0.2907920479774475,
-0.29406556487083435,
0.35181257128715515,
-0.11160200834274292,
0.13894595205783844,
0.13810233771800995,
0.3081416189670563,
0.05597183108329773,
-0.2472730278968811,
0.0599425733089447,
0.2529640197753906,
-0.003880821168422699,
0.09388184547424316,
0.38104048371315,
0.1513930708169937,
0.17399832606315613,
0.15882030129432678,
0.26286789774894714,
0.4578677713871002,
-0.08033762872219086,
0.20290683209896088,
0.32546958327293396,
0.019690290093421936,
-0.29894888401031494,
0.43373802304267883,
0.16880935430526733,
-0.07580254971981049,
-0.43235069513320923,
-0.20015065371990204,
0.046230535954236984,
-0.1567065715789795,
-0.002827245742082596,
0.08781694620847702,
-0.7870506644248962,
-0.10791708528995514,
-0.226678729057312,
-0.018589995801448822,
0.01977365091443062,
0.2365134358406067,
0.0901065543293953,
0.100443534553051,
-0.19077318906784058,
-0.20956940948963165,
0.18084083497524261,
-0.1625894457101822,
-0.3482757806777954,
-0.203956738114357,
-0.237382173538208,
-0.32001134753227234,
0.06704241782426834,
-0.32714682817459106,
-0.0818445235490799,
0.38452577590942383,
-0.14798703789710999,
0.33480510115623474,
0.2760920524597168,
0.07171984016895294,
-0.0876513347029686,
-0.2140059620141983,
0.5781515836715698,
-0.18064069747924805,
-0.0973055511713028,
-0.27068519592285156,
-0.07910750806331635
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | We can be pretty flexible and not impose any constraints for transforms.
Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like `map` work in a batched fashion to not fill up your RAM. So this shouldn't be an issue | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 59 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
We can be pretty flexible and not impose any constraints for transforms.
Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like `map` work in a batched fashion to not fill up your RAM. So this shouldn't be an issue | [
-0.5401789546012878,
-0.018992722034454346,
-0.14400839805603027,
0.1232815533876419,
0.4372488856315613,
-0.21700534224510193,
0.24531231820583344,
0.19366037845611572,
0.21922782063484192,
0.13049167394638062,
0.06151556968688965,
0.18776820600032806,
-0.2603258788585663,
0.07238703966140747,
0.04819217696785927,
-0.011597812175750732,
-0.07829267531633377,
0.25257664918899536,
-0.555722713470459,
-0.057362720370292664,
-0.37139350175857544,
-0.15737007558345795,
0.013566017150878906,
-0.1440853476524353,
-0.03289373964071274,
-0.24287715554237366,
0.07152115553617477,
-0.013766579329967499,
-0.1378084272146225,
0.06725920736789703,
0.3069251477718353,
0.13950930535793304,
-0.13080787658691406,
0.34379443526268005,
-0.0000978967291302979,
-0.03233550861477852,
0.038695357739925385,
-0.1293639987707138,
0.0463976114988327,
0.12445571273565292,
-0.13100335001945496,
-0.11048516631126404,
-0.10950852930545807,
-0.36120250821113586,
-0.24680721759796143,
0.04237930849194527,
0.028395995497703552,
-0.3146081864833832,
0.22957831621170044,
0.1305740773677826,
0.35437339544296265,
-0.16992750763893127,
-0.1962246298789978,
-0.05397398769855499,
0.2161228358745575,
0.1079377830028534,
-0.08900138735771179,
-0.1663474440574646,
0.26657265424728394,
0.24562647938728333,
-0.31213265657424927,
0.23566794395446777,
-0.04619485139846802,
0.006583794951438904,
0.5308226943016052,
-0.14778631925582886,
0.0746074691414833,
-0.18837207555770874,
-0.043959371745586395,
0.21119162440299988,
0.30240678787231445,
-0.3585547208786011,
-0.14957769215106964,
-0.1898481249809265,
-0.06427948921918869,
0.18071237206459045,
0.1255580335855484,
0.09108690172433853,
-0.11629699170589447,
0.1236250251531601,
-0.2932359278202057,
-0.21588703989982605,
-0.18586891889572144,
0.024688132107257843,
-0.3864726722240448,
0.08438914269208908,
0.08105532079935074,
-0.019889064133167267,
0.23208506405353546,
-0.12199370563030243,
0.06409590691328049,
0.23339904844760895,
0.03155661001801491,
0.036205410957336426,
-0.10758447647094727,
-0.4280068874359131,
-0.31648150086402893,
-0.010485291481018066,
0.14048856496810913,
-0.07699104398488998,
0.03052721545100212,
0.21469497680664062,
0.06849920004606247,
0.040478505194187164,
0.06837045401334763,
0.21329964697360992,
-0.35771310329437256,
0.06293892115354538,
0.3471938371658325,
-0.29592904448509216,
-0.0947280079126358,
0.14219354093074799,
0.17776544392108917,
-0.19199100136756897,
-0.03746770694851875,
-0.18786835670471191,
-0.1458267718553543,
-0.11188221722841263,
0.039255671203136444,
-0.14975517988204956,
0.24101704359054565,
0.2816522419452667,
-0.05489518865942955,
0.37972840666770935,
0.016487296670675278,
0.12259290367364883,
0.415870726108551,
-0.07043049484491348,
-0.1016625240445137,
-0.02678884193301201,
-0.12345155328512192,
0.1682247817516327,
-0.23923033475875854,
-0.11781703680753708,
0.1755445897579193,
0.2547558844089508,
-0.009012699127197266,
-0.13932643830776215,
-0.0014685839414596558,
0.4502183794975281,
0.14545072615146637,
-0.16329987347126007,
0.3711446225643158,
0.321521133184433,
-0.3073899447917938,
-0.23121680319309235,
-0.18242941796779633,
0.13556385040283203,
-0.22487187385559082,
0.25742781162261963,
-0.010025560855865479,
-0.06018272042274475,
0.2163718044757843,
0.336597740650177,
-0.09654116630554199,
0.08898193389177322,
-0.016476549208164215,
0.14122478663921356,
0.05782061815261841,
-0.21000945568084717,
0.022372208535671234,
-0.18442490696907043,
-0.15611109137535095,
-0.13073985278606415,
0.004221664741635323,
0.023484528064727783,
-0.3599255383014679,
-0.196546733379364,
-0.01617990806698799,
0.02994309738278389,
0.03936407342553139,
0.23557084798812866,
-0.25842365622520447,
-0.06666996330022812,
-0.15185219049453735,
-0.0959845632314682,
0.54362553358078,
-0.08736351132392883,
-0.5102757215499878,
0.17167244851589203,
-0.3071720004081726,
-0.20669938623905182,
0.03922172635793686,
0.5570352077484131,
0.3030112087726593,
-0.06066171079874039,
-0.27798232436180115,
0.43898534774780273,
-0.012084061279892921,
0.23935511708259583,
-0.1522185057401657,
-0.38072359561920166,
0.2241465449333191,
0.09997452795505524,
0.435804158449173,
0.06959445029497147,
-0.004208095371723175,
0.44793641567230225,
0.019199039787054062,
-0.32470735907554626,
0.22872784733772278,
0.09036706387996674,
0.2029694765806198,
-0.17580023407936096,
0.05148033797740936,
-0.38815969228744507,
-0.029957197606563568,
-0.019490517675876617,
-0.12316424399614334,
0.17464891076087952,
0.31214988231658936,
-0.06333143264055252,
0.09396947920322418,
-0.24061284959316254,
0.06624186784029007,
0.05239349231123924,
0.33781760931015015,
-0.05064849555492401,
0.25609347224235535,
-0.37894269824028015,
0.0967586487531662,
0.3695107698440552,
-0.035923659801483154,
0.0900140106678009,
-0.40978747606277466,
0.09305226802825928,
0.0395771786570549,
0.04112724959850311,
0.017440546303987503,
-0.08580509573221207,
-0.15946874022483826,
-0.12140186131000519,
0.08887962251901627,
0.08844485878944397,
0.1423342525959015,
-0.08315059542655945,
-0.2251529097557068,
0.3935471773147583,
0.2967001497745514,
-0.0864643007516861,
0.4523480236530304,
0.22502286732196808,
0.11646853387355804,
-0.054058849811553955,
-0.23264175653457642,
0.3532533645629883,
0.06752196699380875,
0.11760465055704117,
0.08946071565151215,
-0.03545092046260834,
0.3178417682647705,
-0.21058817207813263,
-0.09168744087219238,
-0.23917333781719208,
-0.08038198947906494,
0.14627346396446228,
0.27226126194000244,
0.24180622398853302,
-0.14347100257873535,
-0.1761658787727356,
0.25740543007850647,
0.09557226300239563,
0.2356151044368744,
0.2567685842514038,
-0.19858428835868835,
0.16877901554107666,
-0.02305852435529232,
0.39290377497673035,
0.45367032289505005,
0.37728312611579895,
-0.03214571252465248,
0.05706379562616348,
-0.03348004072904587,
-0.1285068690776825,
0.17434872686862946,
-0.06117117404937744,
0.21450836956501007,
-0.007574856281280518,
0.022481009364128113,
-0.08485241234302521,
-0.3140362501144409,
-0.2202805131673813,
0.07882388681173325,
-0.004088785499334335,
-0.12856966257095337,
-0.0825883150100708,
-0.21044112741947174,
-0.20823711156845093,
-0.10027879476547241,
0.17740242183208466,
-0.10651949048042297,
0.13378478586673737,
0.14695565402507782,
0.08701297640800476,
-0.1986062079668045,
0.18122637271881104,
0.06172902509570122,
0.30599668622016907,
0.14939551055431366,
-0.23431794345378876,
-0.010339636355638504,
0.04423457756638527,
-0.02093486487865448,
0.2839322090148926,
0.0812600702047348,
0.030154762789607048,
0.3573116958141327,
-0.03251361846923828,
0.015915751457214355,
-0.10756707936525345,
-0.41707199811935425,
0.021991480141878128,
0.05086753889918327,
0.1327095627784729,
0.22428838908672333,
0.15502837300300598,
0.12645834684371948,
0.054544560611248016,
0.022377818822860718,
-0.27908650040626526,
-0.31491872668266296,
-0.02492254041135311,
-0.059201259166002274,
0.1274021416902542,
-0.2830106019973755,
-0.2389223873615265,
-0.0929965078830719,
-0.5055263042449951,
0.2309703230857849,
0.14517496526241302,
0.057342637330293655,
0.0028790892101824284,
0.2555828392505646,
-0.1754458248615265,
0.1253504455089569,
0.1729651689529419,
-0.2668440341949463,
0.023113299161195755,
0.4328381419181824,
-0.055615972727537155,
-0.2987731397151947,
-0.18642760813236237,
-0.2419084906578064,
0.21637535095214844,
0.5209236741065979,
-0.4316139221191406,
-0.011605354957282543,
-0.2875872254371643,
-0.010451279580593109,
0.010865364223718643,
-0.04552857577800751,
0.5706766843795776,
0.04710710048675537,
-0.2182013988494873,
-0.07783534377813339,
-0.11069287359714508,
0.05975557863712311,
0.15066400170326233,
0.016526319086551666,
-0.01338537409901619,
0.2726943790912628,
0.02095191925764084,
0.23720933496952057,
-0.4598439335823059,
-0.37912407517433167,
-0.03705283999443054,
0.17541751265525818,
0.13233886659145355,
-0.01767411082983017,
-0.11200694739818573,
0.15405547618865967,
0.11469411849975586,
-0.16316841542720795,
0.1865585744380951,
-0.041488636285066605,
-0.43852338194847107,
-0.14495542645454407,
-0.132894366979599,
0.002860628068447113,
-0.25132590532302856,
0.39978858828544617,
0.06627113372087479,
-0.06507980078458786,
-0.07679314911365509,
0.11904145032167435,
-0.1788245290517807,
-0.043198809027671814,
0.1782180815935135,
0.11425979435443878,
-0.008726246654987335,
-0.07354065775871277,
-0.031092708930373192,
0.1208595260977745,
-0.10726376622915268,
0.1333223432302475,
-0.1606767624616623,
0.003568246029317379,
-0.07281813770532608,
-0.299620121717453,
-0.11835832893848419,
-0.16536805033683777,
0.5815536379814148,
0.05004960671067238,
0.07156559824943542,
0.1510833501815796,
-0.368004709482193,
-0.36924049258232117,
0.1909375786781311,
-0.2953854203224182,
-0.19158706068992615,
0.02020980231463909,
0.23346658051013947,
-0.19361244142055511,
-0.031203407794237137,
-0.05042736977338791,
0.19129736721515656,
-0.35801035165786743,
-0.19481849670410156,
-0.015485953539609909,
-0.1780783236026764,
-0.38720041513442993,
0.1539224088191986,
0.10014220327138901,
-0.09083189070224762,
0.0161033533513546,
-0.24377410113811493,
-0.3259716033935547,
-0.3354437053203583,
0.24591144919395447,
0.012738531455397606,
0.09448082745075226,
-0.12804527580738068,
0.1640540510416031,
-0.18070551753044128,
0.35547444224357605,
0.20750251412391663,
0.06697775423526764,
0.1276005655527115,
-0.03317081928253174,
0.1978539228439331,
0.004381328821182251,
0.07370564341545105,
0.1707671880722046,
0.051265742629766464,
-0.0757456049323082,
-0.1046154797077179,
0.22454378008842468,
-0.5025939345359802,
0.22693757712841034,
-0.11761538684368134,
-0.03720353543758392,
-0.13970334827899933,
-0.30469226837158203,
0.33264610171318054,
0.1389250010251999,
-0.21940408647060394,
0.09529367834329605,
-0.11296790838241577,
-0.5864391922950745,
0.2940359115600586,
0.661721408367157,
0.982502281665802,
-0.09684571623802185,
0.18302400410175323,
0.023618798702955246,
-0.09514985978603363,
0.24895219504833221,
-0.33414363861083984,
0.19136475026607513,
-0.2713860273361206,
-0.34560999274253845,
0.039246439933776855,
-0.07263575494289398,
0.09038560837507248,
0.22182677686214447,
-0.40112563967704773,
0.023028550669550896,
0.034658536314964294,
-0.2270577847957611,
-0.1472184807062149,
0.22605815529823303,
0.08166572451591492,
-0.5389626026153564,
-0.19047248363494873,
0.34006690979003906,
0.010083507746458054,
-0.0979929268360138,
-0.06798218935728073,
-0.12522108852863312,
-0.08387850224971771,
0.07220593839883804,
-0.05111975222826004,
-0.1457974910736084,
-0.39101773500442505,
-0.026933759450912476,
-0.4349457323551178,
-0.09616928547620773,
0.2528389096260071,
0.14953643083572388,
0.010297060012817383,
0.41060808300971985,
-0.08137460052967072,
0.14458592236042023,
-0.1695798933506012,
0.2668819725513458,
-0.04442932456731796,
-0.08626892417669296,
0.42586150765419006,
-0.10750897973775864,
-0.017609335482120514,
-0.08913328498601913,
-0.05587296560406685,
-0.2663671672344208,
0.21188044548034668,
-0.13304436206817627,
0.12361278384923935,
-0.33392277359962463,
-0.030627625063061714,
0.037690043449401855,
-0.1858455389738083,
0.02362603321671486,
0.297259658575058,
0.09537290036678314,
-0.10949505865573883,
0.4886614680290222,
0.37428927421569824,
-0.26714396476745605,
-0.2493676394224167,
0.3068588972091675,
0.4510119557380676,
0.16796858608722687,
0.06819862127304077,
-0.2079342007637024,
-0.32899773120880127,
-0.46133723855018616,
-0.03863414376974106,
0.14755313098430634,
-0.15660342574119568,
0.33107683062553406,
0.0176409799605608,
-0.4553512930870056,
-0.03629477694630623,
-0.011230569332838058,
0.26099681854248047,
0.10425800085067749,
-0.2485150545835495,
-0.11956116557121277,
-0.5757898688316345,
0.11667335778474808,
0.06003952398896217,
0.3340652585029602,
-0.07173465937376022,
-0.02918974682688713,
0.040915220975875854,
0.13098488748073578,
-0.5081637501716614,
-0.06182907521724701,
-0.17017561197280884,
0.23920577764511108,
-0.09061940759420395,
0.040187232196331024,
-0.199550598859787,
0.11647924780845642,
0.17862263321876526,
0.19872118532657623,
-0.34157222509384155,
-0.35610586404800415,
0.026503264904022217,
0.0729614719748497,
-0.08510152995586395,
0.038108065724372864,
-0.005790247581899166,
-0.11367188394069672,
-0.1005759984254837,
-0.17480309307575226,
0.23226049542427063,
0.07570376992225647,
-0.13587602972984314,
0.16171182692050934,
0.3516886830329895,
-0.19042831659317017,
-0.10613883286714554,
0.256458580493927,
-0.02298889309167862,
0.12878814339637756,
-0.07622777670621872,
0.2248428910970688,
0.12898945808410645,
-0.075550377368927,
-0.037039194256067276,
0.16136273741722107,
0.10920587182044983,
0.01616244576871395,
0.24293875694274902,
0.08721505850553513,
0.02962953969836235,
0.6459552049636841,
0.2213810533285141,
0.1402517855167389,
-0.07334279268980026,
-0.11044977605342865,
0.21139022707939148,
0.4208185374736786,
-0.3107750415802002,
-0.14776504039764404,
0.1610407680273056,
-0.18490208685398102,
0.2987510859966278,
0.36148303747177124,
0.059765685349702835,
-0.10970734059810638,
0.11339951306581497,
0.05971188098192215,
0.2657986879348755,
-0.23696164786815643,
0.15152284502983093,
0.29135891795158386,
-0.12587957084178925,
-0.1349877566099167,
0.3201216757297516,
0.20689433813095093,
0.21801134943962097,
0.43879127502441406,
0.03762228041887283,
0.3958044946193695,
0.07724791765213013,
0.07233471423387527,
0.007184147834777832,
-0.05938996374607086,
0.08403897285461426,
0.5973981618881226,
-0.013415560126304626,
0.13843029737472534,
0.11932921409606934,
-0.07740884274244308,
0.11040004342794418,
-0.29573050141334534,
-0.16415584087371826,
-0.014917682856321335,
-0.41330012679100037,
0.237309992313385,
0.010764997452497482,
-0.19971714913845062,
-0.10879117250442505,
0.08601289987564087,
-0.08463005721569061,
-0.2840930223464966,
0.5777487754821777,
0.0436369962990284,
0.06987025588750839,
0.2187255322933197,
0.26417142152786255,
-0.12875065207481384,
-0.0955839678645134,
-0.25542572140693665,
0.04368646442890167,
0.16520603001117706,
0.002794429659843445,
0.29317766427993774,
0.3171935975551605,
0.024732908234000206,
0.2477012425661087,
-0.1783776581287384,
0.15878404676914215,
-0.022343862801790237,
-0.14739583432674408,
-0.4861268997192383,
0.13078144192695618,
0.013043388724327087,
0.12222649157047272,
0.33298081159591675,
0.3580690026283264,
-0.27238792181015015,
0.05734524503350258,
0.08220076560974121,
-0.030632536858320236,
-0.09871277213096619,
0.15745601058006287,
0.33582279086112976,
-0.19052907824516296,
-0.11321525275707245,
-0.10253775864839554,
-0.18730387091636658,
-0.07118313759565353,
0.25274989008903503,
-0.6251533031463623,
0.17332664132118225,
0.10617681592702866,
0.16275879740715027,
0.06768599897623062,
0.5246928334236145,
-0.15590885281562805,
-0.0697745606303215,
-0.037201669067144394,
-0.21995116770267487,
-0.3036785125732422,
0.16219142079353333,
0.01765190251171589,
0.09076764434576035,
-0.26038146018981934,
0.14547455310821533,
0.14556515216827393,
0.08338379859924316,
-0.027917489409446716,
-0.2130618840456009,
-0.14231905341148376,
0.0992484837770462,
-0.18222151696681976,
0.049541834741830826,
0.043881721794605255,
0.12559087574481964,
0.21526876091957092,
-0.3644394278526306,
0.05706508830189705,
0.012061559595167637,
0.3014872372150421,
-0.01248675212264061,
0.24679017066955566,
-0.05445726960897446,
0.3218405544757843,
0.4679383337497711,
0.1505185067653656,
0.4137203097343445,
-0.16253525018692017,
0.12292657047510147,
0.1877686083316803,
0.04707649350166321,
-0.32085371017456055,
-0.058447740972042084,
0.302486389875412,
0.09491077065467834,
-0.15681269764900208,
0.023870179429650307,
0.005528765730559826,
0.049562033265829086,
0.028037630021572113,
0.17764826118946075,
-0.34752658009529114,
0.1490112990140915,
-0.03082720749080181,
-0.02138974517583847,
-0.09298194199800491,
0.2472132444381714,
0.007918287068605423,
-0.21081046760082245,
-0.1649530678987503,
-0.4143648147583008,
0.2555772662162781,
0.009373250417411327,
-0.2656220495700836,
-0.11676643043756485,
0.012865446507930756,
-0.16652703285217285,
0.0643492043018341,
-0.41844460368156433,
0.05682317167520523,
0.17240101099014282,
-0.14450153708457947,
0.0484212301671505,
0.08564302325248718,
-0.1510888785123825,
-0.26061487197875977,
-0.31299248337745667,
0.46904829144477844,
-0.03363112360239029,
-0.1514236330986023,
-0.254089891910553,
-0.2887405753135681
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | Ok thanks.
But, Dataset has various flavors.
In current design of Dataset,
how the serialization on disk is done (?)
The main issue is serialization
of newdataset= Transform(Dataset)
(ie thats why am referring to Out Of memory dataset…):
Should be part of Transform or part of dataset ?
Maybe, not, since the output is aimed to feed model in memory (?)
> On Jul 7, 2021, at 18:04, Quentin Lhoest ***@***.***> wrote:
>
>
> We can be pretty flexible and not impose any constraints for transforms.
>
> Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like map work in a batched fashion to not fill up your RAM. So this shouldn't be an issue
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 162 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
Ok thanks.
But, Dataset has various flavors.
In current design of Dataset,
how the serialization on disk is done (?)
The main issue is serialization
of newdataset= Transform(Dataset)
(ie thats why am referring to Out Of memory dataset…):
Should be part of Transform or part of dataset ?
Maybe, not, since the output is aimed to feed model in memory (?)
> On Jul 7, 2021, at 18:04, Quentin Lhoest ***@***.***> wrote:
>
>
> We can be pretty flexible and not impose any constraints for transforms.
>
> Moreover, this library is designed to support datasets bigger than memory. The datasets are loaded from the disk via memory mapping, without filling up RAM. Even processing functions like map work in a batched fashion to not fill up your RAM. So this shouldn't be an issue
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or unsubscribe.
| [
-0.30282890796661377,
-0.07524702697992325,
-0.05204997956752777,
0.25686150789260864,
0.49631959199905396,
0.033300817012786865,
0.34648051857948303,
0.1359567493200302,
0.10846985876560211,
-0.04890847206115723,
0.1433255523443222,
0.18079490959644318,
-0.2497083693742752,
0.09951943904161453,
0.14334961771965027,
0.029433805495500565,
-0.036758698523044586,
0.20827575027942657,
-0.6057529449462891,
-0.11037824302911758,
-0.2944287359714508,
-0.15425792336463928,
-0.10568910837173462,
-0.113609179854393,
-0.0622638501226902,
-0.19962534308433533,
-0.15818718075752258,
-0.12624198198318481,
-0.25691428780555725,
-0.07501213997602463,
0.4201376438140869,
0.09897028654813766,
0.11094745993614197,
0.5628955364227295,
-0.00010495314927538857,
-0.19800929725170135,
0.06296682357788086,
-0.1417292356491089,
-0.04164111614227295,
-0.12714777886867523,
-0.11059027910232544,
-0.1241355836391449,
-0.09146342426538467,
-0.3788447678089142,
-0.25158801674842834,
-0.012631974183022976,
0.04266609624028206,
-0.16326403617858887,
0.26733046770095825,
0.18912406265735626,
0.28772592544555664,
-0.2571982145309448,
0.06131582334637642,
-0.11599453538656235,
-0.0906340554356575,
0.498060405254364,
-0.21321795880794525,
-0.1317685842514038,
0.16394241154193878,
0.29511919617652893,
-0.17686191201210022,
0.11949098110198975,
0.03161569684743881,
-0.06239868327975273,
0.6949883699417114,
-0.11448989063501358,
0.16475331783294678,
-0.34164831042289734,
-0.0474904328584671,
0.17702755331993103,
0.6858400106430054,
-0.4208049774169922,
-0.29260537028312683,
-0.19781184196472168,
0.04135363921523094,
0.11255800724029541,
0.0736285075545311,
0.2918526530265808,
-0.10238948464393616,
0.42282834649086,
-0.2906351387500763,
-0.15785765647888184,
-0.21226556599140167,
-0.027361109852790833,
-0.3538384735584259,
-0.027297675609588623,
-0.04856930673122406,
0.07043635100126266,
-0.028069984167814255,
-0.08964108675718307,
0.1152464896440506,
0.06874234974384308,
0.08594178408384323,
0.005337708629667759,
-0.04710088297724724,
-0.4889361262321472,
-0.24929562211036682,
-0.10576226562261581,
0.17702913284301758,
0.020616596564650536,
-0.10555389523506165,
-0.08250568062067032,
0.06632933020591736,
-0.08804377168416977,
0.1752181500196457,
0.3654628098011017,
-0.15504419803619385,
0.1602374166250229,
0.07138348370790482,
-0.3452307879924774,
-0.04997499659657478,
0.004470229148864746,
-0.02365855872631073,
0.03802087530493736,
0.20027625560760498,
-0.01010972075164318,
-0.009433658793568611,
-0.07412361353635788,
0.10057774931192398,
-0.21992932260036469,
0.18858826160430908,
0.14360405504703522,
-0.16446392238140106,
0.25628310441970825,
0.13431629538536072,
0.23641371726989746,
0.28789395093917847,
-0.06082244962453842,
0.07285462319850922,
-0.1835627406835556,
-0.09207462519407272,
0.2097073644399643,
-0.3946238160133362,
-0.031681329011917114,
0.061486195772886276,
0.26250410079956055,
-0.09842667728662491,
-0.16312259435653687,
-0.10270537436008453,
0.2932373285293579,
0.04500896483659744,
-0.28850653767585754,
0.37007734179496765,
0.2936211824417114,
-0.5175169706344604,
0.003423798829317093,
-0.00823114812374115,
0.09082652628421783,
-0.23883646726608276,
0.3887876570224762,
-0.08082955330610275,
-0.056878238916397095,
0.12324824929237366,
0.2654302716255188,
-0.05680219084024429,
0.13044534623622894,
-0.2425503432750702,
0.2334427386522293,
0.23551446199417114,
-0.1140490174293518,
0.05234643816947937,
-0.2796909809112549,
-0.014557186514139175,
-0.22482550144195557,
0.001918148249387741,
0.13082513213157654,
-0.5505943298339844,
-0.13714179396629333,
-0.09296386688947678,
0.005478842183947563,
0.22571909427642822,
0.253805547952652,
-0.23892681300640106,
0.21124330163002014,
-0.2781810462474823,
-0.15985623002052307,
0.5308236479759216,
-0.07172930240631104,
-0.36874231696128845,
0.2272961437702179,
-0.3469462990760803,
-0.23166747391223907,
0.139682799577713,
0.3911382853984833,
0.39101845026016235,
-0.0739194005727768,
-0.31697219610214233,
0.32556891441345215,
-0.15475992858409882,
0.017296185716986656,
-0.18261244893074036,
-0.29834747314453125,
0.4146900773048401,
0.004398476332426071,
0.3740960657596588,
0.317222535610199,
-0.08999206870794296,
0.554475724697113,
0.036176010966300964,
-0.16427423059940338,
0.2736387848854065,
0.03950890153646469,
0.3699333369731903,
-0.21873484551906586,
0.06695471704006195,
-0.3890498876571655,
-0.13238149881362915,
-0.01647190935909748,
0.07169568538665771,
0.23841002583503723,
0.1521548181772232,
0.04256778955459595,
-0.03513792157173157,
-0.18842358887195587,
0.10059364140033722,
-0.14410418272018433,
0.2575832009315491,
-0.06822270154953003,
0.2908603847026825,
-0.3608986735343933,
-0.12019364535808563,
0.3291369676589966,
0.01695886068046093,
0.09972985833883286,
-0.4722501039505005,
0.1352912038564682,
-0.10374803096055984,
0.06371983140707016,
-0.13348278403282166,
-0.1195380911231041,
-0.14710161089897156,
-0.20590534806251526,
0.027680616825819016,
0.04559982195496559,
0.10069617629051208,
-0.07277730107307434,
-0.136966735124588,
0.440784215927124,
0.3833368718624115,
-0.22134645283222198,
0.4104958474636078,
0.17535153031349182,
0.19718220829963684,
-0.15817448496818542,
-0.15636342763900757,
0.3225996494293213,
0.05918782204389572,
0.05396246910095215,
-0.004589211195707321,
-0.044409871101379395,
0.274935781955719,
-0.1846640557050705,
-0.1495000571012497,
-0.22131037712097168,
-0.09303903579711914,
0.15289054811000824,
0.20645862817764282,
0.26720842719078064,
-0.018021799623966217,
-0.0872325673699379,
0.27590736746788025,
-0.09933052957057953,
0.1754235029220581,
0.2399032711982727,
-0.23638415336608887,
0.09679865837097168,
-0.1155925840139389,
0.33688053488731384,
0.4515935182571411,
0.26883646845817566,
-0.017209623008966446,
0.09940680861473083,
0.2248307764530182,
-0.13741876184940338,
0.21065682172775269,
-0.010123461484909058,
0.3061111271381378,
0.09286552667617798,
-0.0435665138065815,
0.014841199852526188,
-0.1426321268081665,
-0.27317649126052856,
0.20114615559577942,
0.10526099056005478,
-0.08680963516235352,
-0.08278747648000717,
-0.07911717891693115,
-0.05861837416887283,
-0.3210168480873108,
0.11395139247179031,
0.001253059133887291,
0.13549542427062988,
-0.04518096148967743,
0.0133059062063694,
0.06787143647670746,
0.15480434894561768,
-0.025890085846185684,
0.22858858108520508,
0.14031918346881866,
-0.022201960906386375,
-0.00160125270485878,
0.07191615551710129,
-0.012956492602825165,
0.18600673973560333,
0.008258123882114887,
-0.05231999233365059,
0.36329010128974915,
0.023741988465189934,
0.0723288357257843,
-0.09935906529426575,
-0.3952197730541229,
0.1007988452911377,
-0.03920497000217438,
0.1362581104040146,
0.24870170652866364,
0.15830758213996887,
0.06384790688753128,
0.07395841181278229,
0.10033836960792542,
-0.1901114135980606,
-0.2742714285850525,
0.03831256926059723,
-0.08366184681653976,
0.169539675116539,
-0.1737305223941803,
-0.3793555200099945,
-0.2794139087200165,
-0.3382391929626465,
0.18880349397659302,
0.023864198476076126,
0.00393880158662796,
0.10180781781673431,
0.08514855057001114,
-0.16377684473991394,
0.11679664999246597,
0.13599953055381775,
-0.20133079588413239,
0.008922506123781204,
0.3245038688182831,
0.09603141993284225,
-0.3421611189842224,
-0.1381978988647461,
-0.15438182651996613,
0.010208308696746826,
0.38897794485092163,
-0.3169547915458679,
-0.03138366714119911,
-0.21512681245803833,
-0.028546754270792007,
-0.0322711318731308,
-0.17379604279994965,
0.625002384185791,
-0.00791223719716072,
-0.1444295048713684,
-0.04022769629955292,
-0.11250661313533783,
-0.07561739534139633,
0.18653619289398193,
0.12700459361076355,
0.05392859876155853,
0.4150846004486084,
0.15489111840724945,
0.17842194437980652,
-0.23134930431842804,
-0.34818723797798157,
-0.1597617119550705,
0.21638980507850647,
0.020848706364631653,
-0.0015367493033409119,
-0.2815902531147003,
0.298626184463501,
0.08677675575017929,
-0.5257763266563416,
0.06358005106449127,
-0.14337515830993652,
-0.3126089870929718,
-0.09387382864952087,
0.04159930720925331,
-0.059174131602048874,
-0.10236518085002899,
0.30855268239974976,
-0.06289106607437134,
-0.001625850796699524,
-0.09560437500476837,
0.08324963599443436,
-0.09036926925182343,
-0.0007780087180435658,
0.13650691509246826,
0.17920662462711334,
0.04480232670903206,
-0.08239572495222092,
-0.27907082438468933,
0.03333631902933121,
-0.17547520995140076,
-0.06888112425804138,
-0.24276094138622284,
0.10187261551618576,
-0.036837853491306305,
-0.20866665244102478,
-0.04482845962047577,
-0.04717079550027847,
0.8162034153938293,
0.11398545652627945,
0.030603067949414253,
0.08672462403774261,
-0.36285200715065,
-0.3229174315929413,
0.0645703673362732,
-0.3020891845226288,
-0.21201948821544647,
-0.05345356836915016,
0.2099130004644394,
-0.21980828046798706,
-0.08174382895231247,
-0.06451714783906937,
0.3001193702220917,
-0.34403637051582336,
-0.30839741230010986,
0.08771246671676636,
-0.2214547097682953,
-0.3976365327835083,
0.009579554200172424,
0.1840386986732483,
-0.02455572597682476,
0.011909074150025845,
-0.1444052755832672,
-0.22010283172130585,
-0.1155397817492485,
0.2485000044107437,
-0.1722967028617859,
0.017751730978488922,
-0.11200757324695587,
0.1586957573890686,
-0.13538514077663422,
0.36284008622169495,
0.41069814562797546,
0.04947343468666077,
0.18060095608234406,
-0.23035979270935059,
0.21157217025756836,
-0.008222291246056557,
0.12885431945323944,
0.031181447207927704,
0.042793598026037216,
-0.21189573407173157,
0.07505828142166138,
0.14926815032958984,
-0.6959338188171387,
0.059315335005521774,
-0.10672824084758759,
-0.1500363051891327,
-0.29438045620918274,
-0.44527116417884827,
0.2117900848388672,
0.12461714446544647,
-0.18429797887802124,
-0.0401221439242363,
-0.06349381804466248,
-0.6139562726020813,
0.3885995149612427,
0.6128240823745728,
1.1169228553771973,
-0.18429020047187805,
0.16694052517414093,
-0.0168992280960083,
-0.0058914050459861755,
0.3774912357330322,
-0.2371504306793213,
0.19982163608074188,
-0.35508260130882263,
-0.3183296322822571,
-0.10029922425746918,
-0.14181920886039734,
0.1677485853433609,
0.3499811291694641,
-0.45124977827072144,
0.03924886882305145,
-0.030631855130195618,
-0.030270766466856003,
-0.05527970939874649,
0.24154895544052124,
0.19534249603748322,
-0.5374815464019775,
-0.1339254379272461,
0.28827762603759766,
-0.12082268297672272,
-0.034762825816869736,
-0.04533642902970314,
-0.15340293943881989,
-0.09329400956630707,
0.19074809551239014,
-0.15087026357650757,
-0.0672856867313385,
-0.32109105587005615,
0.05566724017262459,
-0.4634639322757721,
-0.19976112246513367,
0.3177562355995178,
0.2684040069580078,
0.150151327252388,
0.2492232471704483,
-0.022403759881854057,
0.025525005534291267,
-0.2658388614654541,
0.2352413684129715,
-0.08592204749584198,
-0.07096632570028305,
0.5328395366668701,
-0.0623411163687706,
-0.05184464156627655,
-0.034850358963012695,
-0.06884489208459854,
-0.1706681251525879,
0.12751197814941406,
-0.2459345906972885,
0.13420119881629944,
-0.5031848549842834,
-0.1402989625930786,
0.031262755393981934,
-0.13254781067371368,
0.014352776110172272,
0.24225963652133942,
0.2745443880558014,
-0.1834607869386673,
0.42807692289352417,
0.26326531171798706,
-0.2569596767425537,
-0.2040160447359085,
0.2488781213760376,
0.5733272433280945,
0.1230110228061676,
0.23742395639419556,
-0.11569081246852875,
-0.37989872694015503,
-0.41025805473327637,
0.17692232131958008,
0.2932382822036743,
-0.20354172587394714,
0.3463568389415741,
0.0076654208824038506,
-0.16944022476673126,
-0.001732697943225503,
-0.05737360939383507,
0.39998090267181396,
0.08334866911172867,
-0.3539370894432068,
-0.14498381316661835,
-0.5922734141349792,
0.08759623765945435,
0.008169673383235931,
0.1891021877527237,
-0.05838831514120102,
0.09692983329296112,
0.12700144946575165,
0.05520857870578766,
-0.47727227210998535,
-0.17861226201057434,
-0.1551111340522766,
0.20889346301555634,
-0.09171178191900253,
-0.056557945907115936,
-0.2293170988559723,
0.019699765369296074,
0.11210097372531891,
0.03073238395154476,
-0.2857632637023926,
-0.2874864637851715,
0.14817821979522705,
0.10521354526281357,
0.15820130705833435,
0.11437977105379105,
-0.19880633056163788,
-0.1584189385175705,
-0.10515731573104858,
-0.15567541122436523,
0.11667928099632263,
0.16720864176750183,
-0.02693164348602295,
0.3737907111644745,
0.39212334156036377,
-0.19732126593589783,
-0.36327624320983887,
0.03817050904035568,
0.07368304580450058,
0.13354536890983582,
-0.00879628024995327,
0.22207355499267578,
0.20705707371234894,
0.014372356235980988,
-0.570589005947113,
0.23229455947875977,
0.14670251309871674,
0.07009370625019073,
0.35553187131881714,
-0.08428837358951569,
0.2152726948261261,
0.7550534605979919,
0.23473644256591797,
0.014571156352758408,
-0.0752270296216011,
-0.0008537024259567261,
0.167828768491745,
0.32098907232284546,
-0.2092948853969574,
0.08897102624177933,
0.14555732905864716,
-0.20118136703968048,
0.08743102848529816,
0.265213280916214,
-0.03766929730772972,
0.07385605573654175,
-0.09938284754753113,
-0.021686511114239693,
0.6841111183166504,
-0.3670734167098999,
0.18091550469398499,
0.46502408385276794,
-0.04276767745614052,
0.016202330589294434,
0.4952475428581238,
0.26278015971183777,
0.14232821762561798,
0.4545312523841858,
0.1572260707616806,
0.3794998824596405,
0.24662131071090698,
0.0828617662191391,
0.20417356491088867,
0.043772805482149124,
0.07978612929582596,
0.6636741161346436,
0.03796343505382538,
-0.0697580948472023,
0.040778737515211105,
-0.17900002002716064,
-0.06015131250023842,
-0.41617462038993835,
-0.13537828624248505,
-0.013503767549991608,
-0.4005991816520691,
0.29154643416404724,
-0.11248734593391418,
-0.06841039657592773,
0.05789744853973389,
-0.0972619354724884,
-0.1537030041217804,
-0.26735037565231323,
0.4747748374938965,
0.046213485300540924,
-0.12058450281620026,
0.19518017768859863,
0.15475395321846008,
-0.07557176798582077,
0.01013597846031189,
-0.28842100501060486,
-0.0650603249669075,
0.17355531454086304,
0.060565728694200516,
0.09867879748344421,
0.5237454771995544,
0.026367222890257835,
0.2559473514556885,
-0.08224207162857056,
0.0629139393568039,
-0.050879914313554764,
-0.25417569279670715,
-0.24533474445343018,
0.3532664179801941,
-0.12960289418697357,
0.1875944286584854,
0.13010135293006897,
0.29764896631240845,
-0.1622903048992157,
0.16548651456832886,
0.27389276027679443,
0.06770867854356766,
-0.1761021912097931,
0.2827882468700409,
0.18297766149044037,
-0.2444877326488495,
0.017565375193953514,
0.04094705730676651,
-0.30126336216926575,
0.12065732479095459,
0.4616488516330719,
-0.6105461120605469,
0.10435222834348679,
0.10443499684333801,
0.1269514262676239,
0.061511650681495667,
0.2328920215368271,
0.1164085865020752,
-0.13346847891807556,
-0.08792557567358017,
-0.0016164258122444153,
-0.21383284032344818,
0.22222405672073364,
0.07224379479885101,
0.031086983159184456,
-0.21699614822864532,
0.23037785291671753,
0.22440731525421143,
0.12648510932922363,
-0.25056666135787964,
-0.3092600107192993,
-0.2979169487953186,
0.207153782248497,
-0.095466248691082,
-0.007639098912477493,
0.05728021636605263,
0.37794625759124756,
0.05388133227825165,
-0.27262964844703674,
0.12606221437454224,
0.19396758079528809,
0.11596298962831497,
-0.00367916002869606,
0.2997324466705322,
0.03361387550830841,
0.24569132924079895,
0.3860704004764557,
0.18191012740135193,
0.4176522493362427,
-0.04008888453245163,
-0.00887388363480568,
0.24401183426380157,
-0.08188768476247787,
-0.21225455403327942,
0.20550435781478882,
0.21146045625209808,
0.19556060433387756,
-0.28269585967063904,
0.02308695763349533,
-0.06552401930093765,
-0.10573654621839523,
-0.14790531992912292,
-0.040379758924245834,
-0.6305209398269653,
0.030213503167033195,
-0.12641851603984833,
-0.20301800966262817,
0.08731440454721451,
0.20185017585754395,
0.0949389785528183,
-0.07171794027090073,
-0.1438319981098175,
-0.38443124294281006,
0.2091498076915741,
-0.0003152173012495041,
-0.35488471388816833,
-0.12941721081733704,
-0.10198138654232025,
-0.18537262082099915,
0.08687084168195724,
-0.5133612155914307,
0.12843051552772522,
0.3005838990211487,
-0.01065870001912117,
0.09924505650997162,
0.10676386952400208,
0.008075786754488945,
-0.14577670395374298,
-0.20620223879814148,
0.7358551025390625,
-0.21721628308296204,
-0.192462757229805,
-0.26944684982299805,
-0.12811695039272308
] |
https://github.com/huggingface/datasets/issues/2596 | Transformer Class on dataset | I'm not sure I understand, could you elaborate a bit more please ?
Each dataset is a wrapper of a PyArrow Table that contains all the data. The table is loaded from an arrow file on the disk.
We have an ArrowWriter and ArrowReader class to write/read arrow tables on disk or in in-memory buffers. | Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
| 55 | Transformer Class on dataset
Just wondering if you have intenttion to create
TransformerClass :
dataset --> dataset
and make determnistic transformation (ie not fit).
I'm not sure I understand, could you elaborate a bit more please ?
Each dataset is a wrapper of a PyArrow Table that contains all the data. The table is loaded from an arrow file on the disk.
We have an ArrowWriter and ArrowReader class to write/read arrow tables on disk or in in-memory buffers. | [
-0.3604479730129242,
-0.056125372648239136,
0.011653229594230652,
0.2704985439777374,
0.3946075439453125,
-0.09719665348529816,
0.35086268186569214,
0.04822303354740143,
-0.10002796351909637,
-0.16110984981060028,
0.13179318606853485,
0.3815641403198242,
-0.3154992163181305,
-0.08339178562164307,
0.25427940487861633,
-0.23259028792381287,
0.01829516887664795,
0.4430125951766968,
-0.3059169054031372,
-0.15378952026367188,
-0.20243148505687714,
-0.2975790202617645,
-0.14110113680362701,
0.15635450184345245,
-0.10866192728281021,
-0.1525418758392334,
-0.1539612114429474,
-0.36308756470680237,
-0.3081539571285248,
-0.15665824711322784,
0.6911970376968384,
0.05112883448600769,
0.023532379418611526,
0.5484083294868469,
-0.00012985581997781992,
-0.023574311286211014,
0.07271520048379898,
-0.14338015019893646,
0.12989045679569244,
-0.19231198728084564,
-0.22106188535690308,
-0.033828750252723694,
0.18111394345760345,
-0.3892243206501007,
-0.38047993183135986,
-0.2979852855205536,
-0.004093831405043602,
0.05152870714664459,
0.5385868549346924,
0.19422054290771484,
0.0866091176867485,
-0.3026255965232849,
0.055164825171232224,
0.10685142129659653,
0.21609044075012207,
0.38616275787353516,
-0.20140299201011658,
0.017513815313577652,
0.15157508850097656,
0.282232403755188,
-0.15152817964553833,
-0.13187550008296967,
-0.17619222402572632,
-0.027273520827293396,
0.8690381646156311,
0.02444089949131012,
0.150945246219635,
-0.3632720112800598,
-0.20435932278633118,
0.2908259928226471,
0.7759710550308228,
-0.523678183555603,
-0.15506291389465332,
-0.06795131415128708,
0.18380433320999146,
0.15509042143821716,
0.008391030132770538,
0.2853403389453888,
-0.10652472078800201,
0.2195320874452591,
-0.11103852838277817,
-0.2603000998497009,
-0.5028030872344971,
0.10280291736125946,
-0.5214717388153076,
0.14578770101070404,
-0.0008760783821344376,
0.1302555948495865,
-0.052323054522275925,
0.07414385676383972,
0.420174241065979,
0.025979219004511833,
0.07699067890644073,
0.20101331174373627,
-0.10597114264965057,
-0.42575863003730774,
-0.428672194480896,
0.12167443335056305,
-0.05182751268148422,
0.07064439356327057,
-0.052082814276218414,
-0.24724224209785461,
0.16689981520175934,
0.02989964187145233,
-0.043488699942827225,
0.2679726779460907,
-0.027597755193710327,
0.3352459669113159,
0.06586320698261261,
-0.3162092864513397,
-0.15339581668376923,
0.13827958703041077,
-0.06098006293177605,
-0.25586163997650146,
0.2248508483171463,
0.05470689758658409,
0.14567707479000092,
-0.09029021859169006,
0.1243000403046608,
-0.22159546613693237,
-0.08310094475746155,
-0.14539620280265808,
-0.20766447484493256,
0.15421836078166962,
0.2172248363494873,
0.02673276700079441,
0.24015586078166962,
0.2879987955093384,
0.1310451477766037,
-0.2053757905960083,
0.08024550974369049,
0.2888299226760864,
-0.4228096604347229,
-0.12896955013275146,
0.06845338642597198,
0.1690237671136856,
-0.3287160396575928,
0.05849478393793106,
-0.20533479750156403,
0.26385965943336487,
0.0007688477635383606,
-0.3211144804954529,
0.251339316368103,
0.3396930694580078,
-0.47041815519332886,
-0.15400339663028717,
0.15388159453868866,
-0.13037440180778503,
-0.21961307525634766,
0.6994741559028625,
-0.19401481747627258,
-0.010155878961086273,
0.07224713265895844,
0.07581015676259995,
-0.00024171173572540283,
0.0676920935511589,
-0.24309739470481873,
0.16696178913116455,
0.2110143005847931,
-0.18988129496574402,
0.3288918733596802,
-0.3618773818016052,
0.1388181895017624,
-0.2993890345096588,
-0.08878607302904129,
0.11976022273302078,
-0.79070645570755,
-0.20190800726413727,
-0.014581339433789253,
-0.08888587355613708,
0.18475176393985748,
0.21061033010482788,
-0.31403347849845886,
0.3180660903453827,
-0.11911118775606155,
-0.055880315601825714,
0.7501412034034729,
0.07907518744468689,
-0.3657931685447693,
0.14100947976112366,
-0.46551281213760376,
-0.3085193336009979,
0.26501378417015076,
0.4832538068294525,
0.24254848062992096,
-0.09040282666683197,
-0.5927639007568359,
0.17444616556167603,
0.0494946613907814,
-0.1906798928976059,
0.01655184105038643,
-0.16020309925079346,
0.46720337867736816,
0.027599386870861053,
0.28900840878486633,
0.2277740240097046,
0.16618892550468445,
0.14607587456703186,
-0.03015456348657608,
-0.35294705629348755,
0.28814685344696045,
0.02170497179031372,
0.38008344173431396,
-0.0008915960788726807,
0.04297977685928345,
-0.2651749849319458,
-0.04655863344669342,
-0.11685489863157272,
-0.21437786519527435,
0.16267278790473938,
0.12546072900295258,
-0.08599378168582916,
0.04017341509461403,
-0.21850301325321198,
-0.2053409069776535,
-0.1495809108018875,
0.02750948816537857,
-0.3762699365615845,
0.34538212418556213,
-0.32319822907447815,
-0.20457617938518524,
0.36233213543891907,
0.032749295234680176,
0.20752854645252228,
-0.42998072504997253,
0.44976094365119934,
-0.08518422394990921,
0.05894440785050392,
-0.20498347282409668,
-0.12240009754896164,
-0.04879605025053024,
-0.16319461166858673,
-0.018509583547711372,
-0.0753685012459755,
0.022638820111751556,
-0.22531838715076447,
-0.07449909299612045,
0.37950268387794495,
0.24430325627326965,
-0.691070556640625,
0.635995626449585,
-0.07142603397369385,
0.144814133644104,
-0.2594786584377289,
-0.16143187880516052,
0.4715093970298767,
-0.06781469285488129,
0.22638192772865295,
-0.2780798673629761,
-0.012620626017451286,
0.11199688911437988,
-0.33359065651893616,
-0.10630765557289124,
0.10667699575424194,
-0.06788931787014008,
0.11178921163082123,
0.23807717859745026,
0.25747090578079224,
0.06498868763446808,
-0.18648898601531982,
0.1255377233028412,
-0.15977230668067932,
0.23512426018714905,
0.46625587344169617,
-0.2535715103149414,
0.20551517605781555,
-0.17916858196258545,
0.39582592248916626,
0.6401338577270508,
0.1718728393316269,
-0.3124702572822571,
0.23813417553901672,
0.03875840827822685,
-0.040556833148002625,
0.2972998321056366,
-0.07220304012298584,
0.3564675748348236,
0.008707836270332336,
-0.19429972767829895,
0.1325376033782959,
-0.04671777784824371,
-0.297856867313385,
0.09133674949407578,
0.16494980454444885,
-0.22846446931362152,
0.07945739477872849,
-0.07083113491535187,
-0.17091935873031616,
-0.4144060015678406,
-0.0693013146519661,
0.007886135950684547,
0.2818390429019928,
-0.08630023151636124,
-0.1729278415441513,
0.31152281165122986,
0.05735844373703003,
-0.15731704235076904,
0.19888991117477417,
0.23252268135547638,
-0.1714354157447815,
-0.1934320032596588,
-0.13233739137649536,
-0.02628030627965927,
0.04997876659035683,
-0.06615758687257767,
0.09928541630506516,
0.22948315739631653,
-0.29769861698150635,
0.2404407113790512,
-0.06809891015291214,
-0.2947515547275543,
0.020056188106536865,
-0.06145833432674408,
0.022762078791856766,
0.2964044511318207,
0.2587549686431885,
-0.1494285762310028,
-0.10049396753311157,
0.1512507200241089,
-0.10104075819253922,
-0.36087965965270996,
0.1753016710281372,
-0.2611690163612366,
0.08574417233467102,
0.17930513620376587,
-0.19491061568260193,
-0.2642943561077118,
-0.016240250319242477,
0.16387557983398438,
0.1531161516904831,
0.04318998381495476,
-0.1628803312778473,
0.1258716583251953,
-0.07525946944952011,
-0.0013599968515336514,
0.10074331611394882,
0.03349405527114868,
0.17174018919467926,
0.36317768692970276,
0.16205979883670807,
-0.18930856883525848,
-0.050323646515607834,
-0.29946786165237427,
0.029903791844844818,
0.3481302261352539,
-0.43286097049713135,
0.0511922724545002,
-0.1269657164812088,
0.12689274549484253,
-0.14789392054080963,
-0.013433659449219704,
0.6234859228134155,
0.18280577659606934,
0.03863581269979477,
-0.036139704287052155,
-0.04359034448862076,
-0.06367377191781998,
0.01672261767089367,
0.1787308305501938,
0.13270938396453857,
0.4253961145877838,
-0.12833724915981293,
0.458335280418396,
-0.33257514238357544,
-0.3514343798160553,
-0.1117643266916275,
0.10256026685237885,
-0.030140470713377,
0.13163748383522034,
-0.30310696363449097,
0.04689749702811241,
0.14951835572719574,
-0.32504838705062866,
-0.03670835494995117,
-0.2300456166267395,
-0.3270393908023834,
-0.12541629374027252,
-0.16804800927639008,
-0.09726030379533768,
-0.07463254034519196,
0.24532510340213776,
-0.1871756613254547,
-0.04183020442724228,
-0.3286379873752594,
-0.04220586642622948,
0.09856131672859192,
-0.04026494175195694,
0.07083365321159363,
0.49729782342910767,
-0.019449137151241302,
0.01593729853630066,
-0.010600801557302475,
-0.03617100045084953,
0.15080948173999786,
0.011837847530841827,
-0.2517889142036438,
0.08916286379098892,
0.020746607333421707,
0.08582992106676102,
0.17049339413642883,
-0.004848178941756487,
0.7906419038772583,
0.10830342769622803,
0.11971553415060043,
0.23357093334197998,
-0.12137691676616669,
-0.40226009488105774,
-0.019828973338007927,
-0.305126816034317,
-0.10827354341745377,
-0.1983739733695984,
-0.13387031853199005,
-0.2571399509906769,
-0.08098141103982925,
0.08344333618879318,
0.26127734780311584,
-0.3665663003921509,
-0.46196088194847107,
-0.036326996982097626,
-0.11902537941932678,
-0.2458915412425995,
0.1944989264011383,
0.07999667525291443,
-0.1093367412686348,
-0.03936592489480972,
-0.023013485595583916,
-0.26470747590065,
-0.14442911744117737,
0.19122260808944702,
-0.14425155520439148,
0.012875610962510109,
-0.19096793234348297,
0.07574759423732758,
-0.10494919121265411,
0.22070007026195526,
0.2764218747615814,
0.18941687047481537,
0.12285858392715454,
-0.4357859492301941,
-0.007248912006616592,
0.017894964665174484,
0.4148279130458832,
-0.16934385895729065,
-0.01732463762164116,
0.0359383262693882,
-0.05276170372962952,
0.11646676063537598,
-0.13067017495632172,
-0.07858390361070633,
-0.015579329803586006,
-0.033043455332517624,
-0.23130859434604645,
-0.3976016044616699,
0.3808099031448364,
0.1818302720785141,
-0.14066638052463531,
0.1326078176498413,
0.19002020359039307,
-0.4119349420070648,
0.29648780822753906,
0.6284173130989075,
1.2970553636550903,
-0.013190306723117828,
0.18642695248126984,
0.0619840994477272,
-0.21028749644756317,
0.33731457591056824,
-0.15188995003700256,
-0.03849247470498085,
-0.4181605875492096,
-0.27540385723114014,
-0.24382485449314117,
-0.4449940025806427,
0.3696981370449066,
0.4542195200920105,
-0.5083640813827515,
0.12583476305007935,
-0.3970276713371277,
-0.18942539393901825,
0.23024284839630127,
-0.05159838870167732,
0.3095284402370453,
-0.26070690155029297,
-0.05563381314277649,
0.009316947311162949,
-0.17617212235927582,
0.1614350974559784,
-0.0317939892411232,
-0.18214750289916992,
-0.2313041090965271,
0.1159125566482544,
-0.07073706388473511,
-0.13435856997966766,
-0.5251281261444092,
-0.10500630736351013,
-0.25741562247276306,
-0.451754093170166,
0.6619151830673218,
0.3650531768798828,
0.00851709395647049,
0.0933767631649971,
-0.0914669781923294,
0.013674821704626083,
0.032089393585920334,
0.1699226349592209,
-0.042056530714035034,
-0.22484347224235535,
0.4818059504032135,
-0.1197163313627243,
-0.1550893783569336,
0.11497335135936737,
-0.11057711392641068,
-0.1878632754087448,
0.3535501956939697,
-0.13959036767482758,
0.2810422480106354,
-0.4471845328807831,
-0.0013263076543807983,
-0.0551857054233551,
-0.062359876930713654,
0.039394233375787735,
0.052231986075639725,
0.3158755600452423,
-0.006200841628015041,
0.393951416015625,
0.2616305649280548,
-0.3410567343235016,
0.0032761339098215103,
0.11494382470846176,
0.6427354216575623,
0.1686147302389145,
0.2632625102996826,
-0.27075764536857605,
-0.37660419940948486,
-0.2814810872077942,
0.17837706208229065,
0.23879683017730713,
-0.5504463911056519,
0.07654043287038803,
0.10079090297222137,
0.1389278620481491,
-0.02523064613342285,
-0.25553223490715027,
0.47373414039611816,
0.32424357533454895,
-0.4022260010242462,
-0.4078066349029541,
-0.4356185495853424,
-0.03404920548200607,
0.18719881772994995,
0.09443657100200653,
0.021251749247312546,
0.24630466103553772,
0.45922136306762695,
0.18947188556194305,
-0.20774799585342407,
0.002355878707021475,
0.01915905810892582,
0.14194506406784058,
-0.005998564884066582,
0.07664128392934799,
-0.3780403435230255,
0.1673591434955597,
-0.0596420094370842,
-0.07411154359579086,
-0.19743359088897705,
-0.09400638192892075,
0.029308371245861053,
0.2297697216272354,
0.14798668026924133,
0.17310839891433716,
-0.250061959028244,
-0.08831992745399475,
0.03477092832326889,
0.15025831758975983,
-0.0807119756937027,
0.13474085927009583,
-0.16259494423866272,
0.3228531777858734,
0.650287926197052,
-0.2357778549194336,
-0.7550698518753052,
0.07381048798561096,
-0.034631505608558655,
0.07322600483894348,
-0.12032734602689743,
0.2173369824886322,
0.11602047830820084,
-0.013732843101024628,
-0.40530848503112793,
0.10187524557113647,
0.13811266422271729,
-0.031445130705833435,
0.3276546001434326,
-0.1083853542804718,
0.3197028934955597,
0.18077552318572998,
0.07967904955148697,
0.3073897957801819,
-0.18532563745975494,
-0.010396993719041348,
0.20379680395126343,
0.06236529350280762,
-0.3804176449775696,
0.08896350860595703,
0.20936793088912964,
0.03413238748908043,
-0.12007193267345428,
0.2622230350971222,
-0.06077146530151367,
0.03688553720712662,
-0.1232183575630188,
-0.010791021399199963,
0.37704482674598694,
-0.20253556966781616,
0.09982503950595856,
0.7080126404762268,
-0.24380891025066376,
0.020061664283275604,
0.655642569065094,
0.19762767851352692,
-0.11393368989229202,
0.1668040156364441,
0.07048524171113968,
0.3836418092250824,
0.1070646420121193,
-0.12091152369976044,
0.2517763674259186,
0.1935071349143982,
-0.029895205050706863,
0.5973745584487915,
0.18243420124053955,
-0.3034852147102356,
0.16539692878723145,
0.0709734857082367,
0.20928891003131866,
-0.31644901633262634,
0.05879860371351242,
0.08309127390384674,
-0.2280346155166626,
0.4133179783821106,
-0.32336968183517456,
-0.10605588555335999,
0.14563535153865814,
-0.2937207818031311,
-0.21352985501289368,
-0.23871897161006927,
0.34173309803009033,
0.2120063602924347,
0.0011804550886154175,
0.1860441416501999,
0.3911278545856476,
0.06054126098752022,
0.030132755637168884,
-0.14636236429214478,
0.07614469528198242,
0.1960955560207367,
0.15214282274246216,
0.1496305912733078,
0.3942972421646118,
0.1632649302482605,
0.2761092782020569,
-0.15174640715122223,
0.07235848903656006,
-0.08456508815288544,
-0.27772581577301025,
0.028279542922973633,
0.21366284787654877,
-0.08708252012729645,
-0.09669286012649536,
0.25098085403442383,
0.14308136701583862,
-0.0689423531293869,
0.29801610112190247,
0.09755079448223114,
0.19082218408584595,
-0.04137665405869484,
0.3700009882450104,
0.1667378842830658,
-0.4476439356803894,
-0.010499373078346252,
0.09617085754871368,
-0.18858599662780762,
0.09038340300321579,
0.4336322844028473,
-0.5003529191017151,
-0.06198291853070259,
-0.053299251943826675,
-0.029284358024597168,
0.2192307561635971,
0.34030041098594666,
0.13010716438293457,
0.3010829985141754,
-0.2303793728351593,
-0.06879492849111557,
-0.398102343082428,
0.21001505851745605,
0.10483061522245407,
-0.13262896239757538,
-0.016534708440303802,
-0.1178213506937027,
0.1112494021654129,
0.25308704376220703,
0.13876470923423767,
-0.04644223675131798,
-0.2062128335237503,
0.391412615776062,
-0.12013323605060577,
0.06493423134088516,
0.2923530340194702,
0.4736352860927582,
-0.06789856404066086,
-0.21382787823677063,
0.09619408845901489,
0.31864824891090393,
-0.05268740653991699,
-0.061486855149269104,
0.29396986961364746,
0.1828927993774414,
0.4395690858364105,
0.33217331767082214,
0.00505480170249939,
0.8048738241195679,
0.007444676011800766,
0.40482088923454285,
0.5635287165641785,
0.08195671439170837,
-0.2770859897136688,
0.3589542508125305,
0.2951972782611847,
-0.14199061691761017,
-0.22971566021442413,
-0.10507956147193909,
-0.02724078670144081,
-0.21226295828819275,
-0.07600739598274231,
0.221027672290802,
-0.7341037392616272,
0.04972431808710098,
-0.1359987109899521,
-0.1535840630531311,
0.10583745688199997,
-0.047543905675411224,
0.11449694633483887,
-0.05525750666856766,
-0.23822902143001556,
-0.1923132985830307,
0.35825061798095703,
-0.06860918551683426,
-0.29093047976493835,
0.061748504638671875,
-0.04949632287025452,
-0.14805841445922852,
0.17917321622371674,
-0.25674477219581604,
0.05073549598455429,
0.49113625288009644,
-0.08878189325332642,
0.23916104435920715,
-0.00449887290596962,
-0.10329851508140564,
0.011300835758447647,
-0.18643365800380707,
0.8142259120941162,
-0.32969364523887634,
0.02036925218999386,
-0.4875223934650421,
-0.2599976658821106
] |
https://github.com/huggingface/datasets/issues/2595 | ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets | Hi @profsatwinder.
It looks like you are using an old version of `datasets`. Please update it with `pip install -U datasets` and indicate if the problem persists. | Error traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-a7b592d3bca0> in <module>()
1 from datasets import load_dataset, load_metric
2
----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation")
4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test")
9 frames
/root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>()
19
20 import datasets
---> 21 from datasets.tasks import AutomaticSpeechRecognition
22
23
ModuleNotFoundError: No module named 'datasets.tasks' | 27 | ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets
Error traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-a7b592d3bca0> in <module>()
1 from datasets import load_dataset, load_metric
2
----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation")
4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test")
9 frames
/root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>()
19
20 import datasets
---> 21 from datasets.tasks import AutomaticSpeechRecognition
22
23
ModuleNotFoundError: No module named 'datasets.tasks'
Hi @profsatwinder.
It looks like you are using an old version of `datasets`. Please update it with `pip install -U datasets` and indicate if the problem persists. | [
-0.46804797649383545,
-0.26218217611312866,
-0.042259253561496735,
-0.12496721744537354,
0.20410186052322388,
0.14506205916404724,
0.44024351239204407,
0.2543094754219055,
0.22203567624092102,
0.1348179578781128,
-0.21102020144462585,
0.20888687670230865,
-0.2797667682170868,
-0.07806102186441422,
0.08124485611915588,
-0.05570835620164871,
0.042319271713495255,
0.2207898199558258,
0.004247128963470459,
-0.19110459089279175,
-0.03197406977415085,
0.17828941345214844,
-0.3306010961532593,
0.20550130307674408,
-0.3548144996166229,
-0.21809490025043488,
0.07793708890676498,
0.04236718267202377,
-0.04224558174610138,
-0.2439001500606537,
0.15008312463760376,
-0.014650993049144745,
0.07050013542175293,
0.4818689525127411,
-0.0001044993769028224,
0.046450160443782806,
0.35436904430389404,
-0.050302423536777496,
-0.3212517201900482,
-0.4222038984298706,
-0.3318464159965515,
0.034828782081604004,
-0.04613794386386871,
-0.1579175442457199,
0.10334386676549911,
0.13190603256225586,
0.12634611129760742,
-0.13682585954666138,
0.5385987162590027,
0.3482385277748108,
0.28406068682670593,
0.41315457224845886,
0.15671409666538239,
-0.12671470642089844,
0.01978946477174759,
0.24982278048992157,
-0.040308427065610886,
0.2972654402256012,
0.08955756574869156,
-0.19310620427131653,
0.3447539508342743,
0.2893807888031006,
-0.23903565108776093,
0.06366671621799469,
0.07982353866100311,
-0.04652391001582146,
-0.041495852172374725,
-0.495299369096756,
0.0744471549987793,
0.13219298422336578,
0.3183717131614685,
-0.41038861870765686,
-0.19299963116645813,
-0.2050776183605194,
0.11013173311948776,
-0.27230170369148254,
0.0004310309886932373,
-0.018203191459178925,
-0.13237938284873962,
0.10622859001159668,
0.11628454923629761,
-0.1884775161743164,
0.022916071116924286,
0.026892367750406265,
-0.0017297491431236267,
-0.03278105705976486,
-0.05793588608503342,
-0.13116341829299927,
0.24403925240039825,
-0.19135840237140656,
-0.12213947623968124,
0.23690259456634521,
0.1770545393228531,
0.5055810213088989,
-0.4833753705024719,
-0.172385573387146,
0.22301164269447327,
-0.2537677586078644,
0.0828389897942543,
0.01214568316936493,
0.026048900559544563,
0.10746071487665176,
-0.192977637052536,
0.2938082814216614,
0.1571601778268814,
0.20555919408798218,
0.24076032638549805,
0.308076947927475,
0.27054059505462646,
0.19832991063594818,
-0.052923861891031265,
0.10624822974205017,
-0.27316442131996155,
-0.16814206540584564,
0.2600202262401581,
-0.05166143923997879,
0.49453628063201904,
-0.17212402820587158,
-0.5520045161247253,
0.06451579928398132,
-0.18060141801834106,
-0.09731697291135788,
0.04375942423939705,
0.27258166670799255,
-0.05976894870400429,
0.268212229013443,
0.09926792979240417,
0.09802154451608658,
-0.3125722110271454,
-0.08398164808750153,
-0.20834559202194214,
0.12046726047992706,
-0.13398896157741547,
0.03754021227359772,
0.1968415081501007,
-0.1620708554983139,
0.1611408293247223,
0.02629738301038742,
0.12542137503623962,
-0.09945565462112427,
0.06077702343463898,
-0.08042703568935394,
-0.3314158618450165,
0.16535337269306183,
-0.05826250836253166,
-0.01408734917640686,
0.04459476098418236,
0.02539665251970291,
-0.1504642218351364,
0.08688972890377045,
-0.32891854643821716,
-0.1916428506374359,
0.0417400486767292,
0.2643730640411377,
-0.0014750733971595764,
-0.25926169753074646,
-0.18522486090660095,
0.019564718008041382,
-0.011283203959465027,
-0.370993971824646,
-0.13091176748275757,
-0.3607829213142395,
0.06614738702774048,
0.11084717512130737,
0.30373623967170715,
0.2592233419418335,
-0.08037340641021729,
-0.25423485040664673,
-0.16399629414081573,
-0.18258187174797058,
0.013343602418899536,
0.3237013518810272,
-0.008494612760841846,
0.14059914648532867,
-0.06374068558216095,
0.4380917549133301,
0.24729877710342407,
-0.45269447565078735,
-0.24913755059242249,
0.1340446025133133,
0.09614627063274384,
0.06780572235584259,
-0.1399039626121521,
-0.21476034820079803,
0.13728849589824677,
-0.011143611744046211,
0.3468579053878784,
0.1733134388923645,
-0.013389868661761284,
-0.10767800360918045,
-0.05891456454992294,
-0.14396116137504578,
0.131951242685318,
0.23438574373722076,
0.004960045218467712,
-0.04832225292921066,
-0.04276812821626663,
0.19296593964099884,
0.12696495652198792,
-0.1789565533399582,
0.03870505839586258,
0.2070477157831192,
0.43562933802604675,
0.06957294791936874,
-0.08904889971017838,
-0.4199826121330261,
-0.17451849579811096,
0.03763292729854584,
0.02121608704328537,
0.25850749015808105,
-0.23170532286167145,
-0.09896523505449295,
-0.40541642904281616,
-0.10512326657772064,
-0.3773026764392853,
0.12027356028556824,
0.16697458922863007,
0.09908294677734375,
-0.06108791381120682,
0.006682850420475006,
-0.2997959852218628,
0.37572765350341797,
-0.13137783110141754,
0.09442370384931564,
-0.3323700428009033,
0.37362268567085266,
-0.23770923912525177,
-0.2670731544494629,
0.24095049500465393,
0.4113723337650299,
-0.004160642623901367,
0.06251581013202667,
-0.11709397286176682,
0.2125418782234192,
-0.007690526079386473,
0.17219778895378113,
-0.27363526821136475,
-0.075166717171669,
0.06570344418287277,
-0.3961907923221588,
0.033885788172483444,
0.11104723811149597,
0.0426308698952198,
-0.0886901244521141,
0.028557274490594864,
0.1296466439962387,
0.15375638008117676,
0.10633584856987,
0.11651071906089783,
0.08684280514717102,
0.16825200617313385,
-0.06831067055463791,
-0.22810539603233337,
-0.03617522120475769,
0.2848303020000458,
-0.18528322875499725,
0.40313369035720825,
-0.03813248127698898,
-0.6622069478034973,
-0.3254408538341522,
0.4939151406288147,
-0.02316439524292946,
0.26339229941368103,
0.08828191459178925,
-0.22325420379638672,
0.20043283700942993,
0.12878569960594177,
-0.182439386844635,
0.4371808171272278,
0.25298088788986206,
-0.11841000616550446,
0.2785462737083435,
-0.1213829293847084,
-0.014824851416051388,
-0.002135433256626129,
0.03763681650161743,
0.0944894403219223,
0.1906546950340271,
0.05395844206213951,
0.1309289038181305,
-0.44329628348350525,
-0.24921706318855286,
-0.22485238313674927,
0.17233581840991974,
-0.3543299436569214,
-0.03415606915950775,
-0.27806198596954346,
-0.04838798567652702,
-0.18973642587661743,
-0.09766220301389694,
-0.2422441840171814,
-0.0885603278875351,
-0.018589764833450317,
0.13715027272701263,
0.13539184629917145,
0.43190592527389526,
-0.044179145246744156,
-0.06195174157619476,
0.046909891068935394,
-0.455549955368042,
-0.16737134754657745,
-0.16925914585590363,
-0.09829557687044144,
0.1030319482088089,
0.3574746549129486,
0.015302259474992752,
0.26740291714668274,
-0.21922339498996735,
-0.004659873433411121,
0.049544379115104675,
-0.36381393671035767,
-0.004420779645442963,
-0.24710442125797272,
0.1006779596209526,
0.028097152709960938,
0.19446426630020142,
-0.08778168261051178,
-0.27165019512176514,
0.2568019926548004,
-0.2902957499027252,
-0.3031888008117676,
0.008494159206748009,
-0.07151024043560028,
-0.21795712411403656,
-0.10560610890388489,
-0.67923903465271,
-0.4916079640388489,
-0.3824005722999573,
0.18915721774101257,
-0.0043242089450359344,
-0.0504474937915802,
0.5760879516601562,
-0.003848643973469734,
0.16622531414031982,
-0.0396021269261837,
0.2001398503780365,
-0.18552003800868988,
-0.0014179572463035583,
0.3684048056602478,
-0.17622621357440948,
-0.1984473317861557,
0.06507262587547302,
-0.20732943713665009,
0.6107488870620728,
-0.1771797388792038,
-0.17900970578193665,
-0.09921480715274811,
-0.11539922654628754,
0.20721375942230225,
-0.14265590906143188,
0.19877314567565918,
0.2562190890312195,
0.22437120974063873,
-0.06652247160673141,
-0.038542650640010834,
-0.22909174859523773,
-0.08922433108091354,
0.544023334980011,
0.12367464601993561,
0.02992354705929756,
0.36961230635643005,
-0.23376940190792084,
0.7312172055244446,
0.2542465925216675,
0.052971869707107544,
0.2250744104385376,
-0.17877468466758728,
0.2573377192020416,
-0.23298874497413635,
-0.4067520201206207,
0.22507594525814056,
0.05233336240053177,
0.12402558326721191,
0.18903836607933044,
-0.07551728188991547,
-0.17171326279640198,
-0.30857154726982117,
-0.1609126776456833,
-0.2336978316307068,
-0.24393099546432495,
-0.11221495270729065,
-0.21183672547340393,
0.33279964327812195,
0.1365729123353958,
0.07790011912584305,
-0.17173856496810913,
-0.062317878007888794,
0.1407051533460617,
0.13144069910049438,
-0.06792984157800674,
0.06768443435430527,
-0.31492921710014343,
-0.09492987394332886,
-0.26110267639160156,
0.13216622173786163,
-0.06716377288103104,
0.3845614790916443,
-0.3105471730232239,
-0.005371293053030968,
-0.09060849249362946,
0.10611919313669205,
-0.026804357767105103,
0.0510297492146492,
-0.16778072714805603,
0.1527026891708374,
0.2210831642150879,
-0.15672145783901215,
-0.08592844009399414,
-0.1342545747756958,
0.012280570343136787,
0.1434633880853653,
0.15306974947452545,
-0.29735979437828064,
0.012723427265882492,
0.33862221240997314,
0.3727739751338959,
0.03774852678179741,
-0.09411729872226715,
-0.26681044697761536,
-0.3024871051311493,
-0.4897356629371643,
0.12073621153831482,
0.19835329055786133,
0.0963844284415245,
-0.19931474328041077,
0.16699449717998505,
0.2083151936531067,
-0.10862415283918381,
0.4872298240661621,
0.110152468085289,
0.17201164364814758,
-0.0501771979033947,
0.34568455815315247,
0.5056828260421753,
0.13421295583248138,
0.29061055183410645,
0.6657869815826416,
-0.022306356579065323,
-0.5903891324996948,
-0.12387468665838242,
-0.06292884796857834,
0.3958953619003296,
0.08724890649318695,
0.1059042289853096,
-0.04795599728822708,
0.32122519612312317,
-0.026496820151805878,
-0.048416346311569214,
0.15254469215869904,
0.5146483778953552,
0.39276590943336487,
-0.33947885036468506,
-0.41184425354003906,
0.09500625729560852,
0.18550193309783936,
0.08756211400032043,
0.06814597547054291,
-0.10430175065994263,
-0.16130980849266052,
-0.035601578652858734,
-0.48421555757522583,
0.7982993721961975,
0.32789337635040283,
0.04450612887740135,
0.22525793313980103,
-0.030371783301234245,
0.0399949885904789,
-0.10184326767921448,
0.08847814798355103,
-0.13249024748802185,
0.05868418887257576,
-0.005945261567831039,
-0.11153887212276459,
0.2056119740009308,
0.08895562589168549,
-0.40666019916534424,
0.4010348320007324,
0.08365969359874725,
-0.02075463905930519,
0.03823370486497879,
0.28026121854782104,
0.021472258493304253,
-0.14099691808223724,
-0.11784258484840393,
0.239181250333786,
-0.15853969752788544,
0.5873637199401855,
0.09033109247684479,
-0.09470261633396149,
-0.0624559223651886,
-0.307658851146698,
-0.11904938519001007,
0.2365185022354126,
-0.176317498087883,
0.18999747931957245,
0.31967079639434814,
-0.07804695516824722,
0.34001630544662476,
0.02436857856810093,
0.011200711131095886,
-0.019650954753160477,
-0.24279549717903137,
0.0951932743191719,
0.12175610661506653,
0.014033107087016106,
-0.04628044739365578,
0.018566954880952835,
0.5849069356918335,
-0.10096415877342224,
-0.4325723350048065,
0.14550302922725677,
-0.05509375408291817,
0.039062730967998505,
-0.2691906690597534,
0.04983849078416824,
0.28393375873565674,
-0.175094336271286,
-0.22184015810489655,
0.12232518196105957,
0.21920940279960632,
-0.02719951793551445,
0.2155410796403885,
0.06490759551525116,
-0.12252379953861237,
0.3755877912044525,
0.039561737328767776,
0.07220432162284851,
-0.040856506675481796,
0.25159016251564026,
-0.018733233213424683,
-0.3264913856983185,
0.612921953201294,
-0.07504205405712128,
-0.16170528531074524,
-0.30275487899780273,
0.07314541190862656,
0.11651372164487839,
-0.23528289794921875,
-0.05641236528754234,
0.11712932586669922,
0.09034821391105652,
0.029194600880146027,
0.1955385059118271,
-0.017713814973831177,
-0.24864733219146729,
-0.06443566828966141,
-0.14120054244995117,
-0.39831236004829407,
0.22892820835113525,
0.11194486916065216,
0.300100713968277,
-0.1009245440363884,
0.3502112329006195,
0.2470611035823822,
-0.020484590902924538,
-0.40862998366355896,
-0.017280690371990204,
-0.15061503648757935,
0.22977323830127716,
0.38677698373794556,
-0.21386048197746277,
0.07955745607614517,
0.004547890275716782,
0.2706662118434906,
0.06811107695102692,
-0.15413914620876312,
-0.2902039885520935,
-0.1380583494901657,
0.07492740452289581,
0.10811999440193176,
-0.04617629200220108,
0.1655641794204712,
0.030689705163240433,
-0.09279793500900269,
-0.16296708583831787,
-0.024024656042456627,
0.07060864567756653,
-0.1004459410905838,
0.26117265224456787,
0.019956503063440323,
-0.009459316730499268,
0.2462322860956192,
0.1467527598142624,
-0.024072572588920593,
0.1554419994354248,
-0.022889958694577217,
0.08983252942562103,
0.14845554530620575,
0.07804550230503082,
-0.22698740661144257,
0.09271377325057983,
0.36525988578796387,
-0.20797818899154663,
0.09195209294557571,
-0.41460758447647095,
-0.18692418932914734,
0.0035453825257718563,
0.27474445104599,
0.29395899176597595,
-0.21621520817279816,
0.06637044996023178,
0.3227999210357666,
0.291908860206604,
-0.4339708685874939,
0.21760237216949463,
0.334488183259964,
0.003923147451132536,
0.10138852894306183,
-0.010827578604221344,
0.03846416994929314,
0.04702429473400116,
0.17537355422973633,
0.1658094823360443,
0.10263871401548386,
-0.3446679711341858,
0.37641966342926025,
0.050674840807914734,
0.07587248086929321,
-0.14639630913734436,
0.3820580244064331,
-0.03017910197377205,
0.10450287163257599,
0.5094951391220093,
-0.4414913058280945,
0.16829007863998413,
0.011564448475837708,
0.15429705381393433,
0.27671152353286743,
-0.3233610987663269,
-0.20222996175289154,
-0.11390024423599243,
-0.05365949869155884,
0.0028548911213874817,
-0.06264625489711761,
0.6269558668136597,
-0.38853228092193604,
-0.1094074696302414,
-0.1444597989320755,
0.13545411825180054,
-0.3061715364456177,
0.07008156180381775,
0.034068427979946136,
-0.18399657309055328,
-0.17918595671653748,
-0.22477521002292633,
0.1355302631855011,
-0.08245624601840973,
0.41528546810150146,
0.09843941032886505,
-0.17800424993038177,
-0.2695995271205902,
-0.19876495003700256,
0.21051588654518127,
0.06253814697265625,
-0.08520928025245667,
0.3057463467121124,
-0.03830567002296448,
-0.13220347464084625,
0.0668964833021164,
0.5210753679275513,
0.5806877017021179,
0.17117096483707428,
-0.07287101447582245,
0.1826118677854538,
-0.08557271957397461,
-0.07937192171812057,
0.09434835612773895,
0.1167583242058754,
0.038212500512599945,
0.32082894444465637,
0.12354931235313416,
0.224359393119812,
-0.2264111191034317,
-0.049290675669908524,
-0.11673085391521454,
-0.24440637230873108,
-0.44651204347610474,
0.38510873913764954,
-0.26685431599617004,
-0.11445890367031097,
-0.38674238324165344,
-0.03103792667388916,
-0.5898921489715576,
-0.037240348756313324,
0.49321261048316956,
0.2721068263053894,
-0.10287414491176605,
-0.38332635164260864,
0.11201007664203644,
-0.24033311009407043,
0.14378945529460907,
0.3910233676433563,
0.21618208289146423,
0.02667585387825966,
0.019500605762004852,
-0.694598376750946,
0.12061814963817596,
-0.07248668372631073,
-0.015479649417102337,
-0.04865170642733574,
-0.0889655351638794,
0.04673895239830017,
0.13187849521636963,
0.11820926517248154,
-0.2654317617416382,
-0.21650344133377075,
-0.2908383309841156,
-0.3041946589946747,
0.014307046309113503,
0.09561222046613693,
0.044563569128513336,
0.1643175184726715,
-0.292555034160614,
-0.08717994391918182,
-0.3029634654521942,
0.07162947952747345,
-0.19858534634113312,
0.013823531568050385,
-0.022037167102098465,
0.15483835339546204,
0.3778550922870636,
0.07075189054012299,
0.7247419357299805,
-0.12190943211317062,
-0.014916553162038326,
0.08846310526132584,
-0.3524927794933319,
-0.1980542093515396,
0.14283894002437592,
0.040092792361974716,
0.4865877330303192,
-0.16568110883235931,
-0.14661632478237152,
-0.2866223156452179,
0.013492783531546593,
0.0952577292919159,
-0.33680015802383423,
-0.08147113025188446,
0.10757572948932648,
-0.0959656834602356,
0.23801305890083313,
-0.05681265518069267,
0.03838019445538521,
-0.18237310647964478,
-0.000693492591381073,
-0.31663423776626587,
-0.41836702823638916,
0.6252814531326294,
-0.09947746992111206,
-0.4117873013019562,
-0.46220511198043823,
0.24393069744110107,
-0.13915011286735535,
-0.21284887194633484,
-0.45718586444854736,
0.17436236143112183,
0.3370923101902008,
-0.04778975993394852,
-0.08681337535381317,
0.25770649313926697,
0.06953222304582596,
-0.004733361303806305,
0.02950376644730568,
0.29872170090675354,
0.049353133887052536,
-0.026866724714636803,
0.29871076345443726,
-0.1521715223789215
] |
https://github.com/huggingface/datasets/issues/2595 | ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets | @albertvillanova Thanks for the information. I updated it to 1.9.0 and the issue is resolved. Thanks again. | Error traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-a7b592d3bca0> in <module>()
1 from datasets import load_dataset, load_metric
2
----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation")
4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test")
9 frames
/root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>()
19
20 import datasets
---> 21 from datasets.tasks import AutomaticSpeechRecognition
22
23
ModuleNotFoundError: No module named 'datasets.tasks' | 17 | ModuleNotFoundError: No module named 'datasets.tasks' while importing common voice datasets
Error traceback:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-8-a7b592d3bca0> in <module>()
1 from datasets import load_dataset, load_metric
2
----> 3 common_voice_train = load_dataset("common_voice", "pa-IN", split="train+validation")
4 common_voice_test = load_dataset("common_voice", "pa-IN", split="test")
9 frames
/root/.cache/huggingface/modules/datasets_modules/datasets/common_voice/078d412587e9efeb0ae2e574da99c31e18844c496008d53dc5c60f4159ed639b/common_voice.py in <module>()
19
20 import datasets
---> 21 from datasets.tasks import AutomaticSpeechRecognition
22
23
ModuleNotFoundError: No module named 'datasets.tasks'
@albertvillanova Thanks for the information. I updated it to 1.9.0 and the issue is resolved. Thanks again. | [
-0.36360597610473633,
-0.3833417594432831,
-0.018118051812052727,
-0.13243761658668518,
0.15852531790733337,
0.17342951893806458,
0.4083125591278076,
0.2774200141429901,
0.19420108199119568,
0.09595776349306107,
-0.19620512425899506,
0.2137218862771988,
-0.2857513129711151,
-0.03076731599867344,
0.120933398604393,
0.024329477921128273,
0.05258376896381378,
0.17853692173957825,
0.06399554014205933,
-0.22893781960010529,
-0.08301772177219391,
0.17989708483219147,
-0.37905973196029663,
0.2335021048784256,
-0.35158851742744446,
-0.19421251118183136,
0.008990911766886711,
0.04729870706796646,
-0.05942836403846741,
-0.261959433555603,
0.15848028659820557,
-0.024439986795186996,
0.02479211613535881,
0.535466730594635,
-0.00010722183651523665,
0.013081148266792297,
0.3887683153152466,
-0.09515728801488876,
-0.3423593044281006,
-0.48122596740722656,
-0.5180738568305969,
-0.019877858459949493,
-0.03788987547159195,
-0.15682968497276306,
0.1432601809501648,
0.09318028390407562,
0.13676297664642334,
-0.021138891577720642,
0.5184743404388428,
0.3234178125858307,
0.276093453168869,
0.43967515230178833,
0.17584483325481415,
-0.12855467200279236,
-0.09198904782533646,
0.32004761695861816,
-0.031203344464302063,
0.3851698040962219,
0.07189441472291946,
-0.24818576872348785,
0.3491154909133911,
0.3169422447681427,
-0.24839839339256287,
-0.03980438783764839,
0.20997151732444763,
-0.0704432874917984,
-0.08641832321882248,
-0.5517332553863525,
0.16126742959022522,
0.1745324581861496,
0.3149977922439575,
-0.4002380073070526,
-0.24455967545509338,
-0.18676036596298218,
0.14506903290748596,
-0.2974837124347687,
0.02112177014350891,
0.05815359950065613,
-0.11663664877414703,
0.04854560270905495,
0.08849203586578369,
-0.21538428962230682,
0.03249861299991608,
-0.00989408791065216,
0.037946946918964386,
0.06954268366098404,
-0.07145130634307861,
-0.12441650778055191,
0.22390931844711304,
-0.17291168868541718,
-0.21985264122486115,
0.1894754320383072,
0.18762898445129395,
0.5041462779045105,
-0.47485411167144775,
-0.1837356686592102,
0.22598037123680115,
-0.27478015422821045,
0.059249721467494965,
-0.1257467269897461,
0.06968288123607635,
0.09724907577037811,
-0.1417372077703476,
0.2598148584365845,
0.23289602994918823,
0.265730619430542,
0.3367701470851898,
0.3275890648365021,
0.31529080867767334,
0.320507675409317,
-0.03191617503762245,
0.09618408977985382,
-0.26679152250289917,
-0.11197429150342941,
0.27430295944213867,
-0.007211422547698021,
0.5157476663589478,
-0.14452296495437622,
-0.4783936142921448,
0.026843585073947906,
-0.15860164165496826,
-0.049117110669612885,
0.04592299088835716,
0.31506091356277466,
-0.07190094143152237,
0.20491981506347656,
0.11407369375228882,
0.07078815996646881,
-0.3394894599914551,
-0.02072496898472309,
-0.20565232634544373,
0.1439722180366516,
-0.1351424604654312,
0.03909338265657425,
0.16692259907722473,
-0.236996591091156,
0.24267978966236115,
-0.03844807296991348,
0.12716633081436157,
-0.1646120548248291,
-0.0026617413386702538,
0.03504278510808945,
-0.285361647605896,
0.2188849151134491,
-0.05775785818696022,
-0.025066431611776352,
-0.006532374769449234,
0.05940394848585129,
-0.15075579285621643,
0.14884187281131744,
-0.3855994641780853,
-0.24888285994529724,
0.03539208322763443,
0.245174840092659,
0.0019521843641996384,
-0.20128551125526428,
-0.20436641573905945,
0.11030854284763336,
-0.019995398819446564,
-0.3280108571052551,
-0.11376894265413284,
-0.3114466071128845,
-0.01839578151702881,
0.08322282880544662,
0.3140051066875458,
0.2145242691040039,
-0.09572282433509827,
-0.26083749532699585,
-0.13863486051559448,
-0.18144744634628296,
-0.014655075967311859,
0.2992725968360901,
-0.02832379750907421,
0.11036854237318039,
-0.06790462881326675,
0.5170902609825134,
0.13058531284332275,
-0.40234294533729553,
-0.21302984654903412,
0.08117309212684631,
0.06159166991710663,
0.0784977525472641,
-0.1494666337966919,
-0.2262280136346817,
0.12173620611429214,
-0.005358265712857246,
0.28950247168540955,
0.21896719932556152,
0.023291073739528656,
-0.06668710708618164,
-0.07012709975242615,
-0.16010552644729614,
0.07318343222141266,
0.147726908326149,
0.04379821568727493,
-0.016552790999412537,
-0.08379483968019485,
0.19447855651378632,
0.18074491620063782,
-0.20129498839378357,
0.037375085055828094,
0.20824314653873444,
0.4772295355796814,
0.061002738773822784,
0.0018084184266626835,
-0.289980411529541,
-0.24396735429763794,
0.09068431705236435,
-0.049024660140275955,
0.3566182851791382,
-0.30791813135147095,
-0.182497039437294,
-0.3866804540157318,
-0.05277562886476517,
-0.3918944001197815,
0.05598325654864311,
0.16655418276786804,
0.03537905588746071,
-0.14001385867595673,
0.01619700714945793,
-0.34512344002723694,
0.26487019658088684,
-0.030972592532634735,
0.12270087003707886,
-0.3519035279750824,
0.38530418276786804,
-0.191465362906456,
-0.30862465500831604,
0.21476387977600098,
0.4524839520454407,
-0.007953770458698273,
0.06205379590392113,
-0.13688018918037415,
0.16456055641174316,
-0.0686158612370491,
0.20830221474170685,
-0.2534759044647217,
-0.11359356343746185,
0.12041858583688736,
-0.36861738562583923,
-0.03355275094509125,
0.15603294968605042,
0.13389217853546143,
-0.10231463611125946,
0.060193173587322235,
0.19254803657531738,
0.2630727291107178,
0.08724881708621979,
0.16275176405906677,
0.0740884467959404,
0.058326356112957,
-0.07030393183231354,
-0.1851867437362671,
-0.05718111991882324,
0.2701917886734009,
-0.17461635172367096,
0.37561318278312683,
-0.025840910151600838,
-0.6040564775466919,
-0.3535902500152588,
0.48494717478752136,
-0.07826370000839233,
0.22361063957214355,
0.055629830807447433,
-0.2568134069442749,
0.11592768877744675,
0.17055727541446686,
-0.3374952971935272,
0.3594597578048706,
0.1739272028207779,
-0.10838066041469574,
0.34826669096946716,
-0.08417854458093643,
0.0032754018902778625,
-0.012649081647396088,
0.11011406034231186,
0.05214311182498932,
0.17743022739887238,
0.09458094090223312,
0.05033322423696518,
-0.44964197278022766,
-0.2656063437461853,
-0.18631574511528015,
0.18643048405647278,
-0.3769983649253845,
-0.06127862632274628,
-0.25363436341285706,
-0.0062754712998867035,
-0.12109021842479706,
-0.13089115917682648,
-0.29107457399368286,
-0.1262819766998291,
-0.02853047475218773,
0.14201763272285461,
0.11648726463317871,
0.41190454363822937,
0.056270431727170944,
-0.04286952316761017,
0.056648850440979004,
-0.35793131589889526,
-0.21574270725250244,
-0.2365887463092804,
-0.05441446602344513,
0.06168841943144798,
0.37867701053619385,
0.038375239819288254,
0.16991837322711945,
-0.181299090385437,
-0.00006450898945331573,
0.10454604774713516,
-0.43503859639167786,
-0.006325632333755493,
-0.23352225124835968,
0.06339651346206665,
0.0017650648951530457,
0.19683456420898438,
-0.09752430766820908,
-0.3132137358188629,
0.2633448541164398,
-0.27208778262138367,
-0.2986536920070648,
0.0646648183465004,
-0.08016067743301392,
-0.21361777186393738,
-0.12002676725387573,
-0.5569186210632324,
-0.4403795003890991,
-0.3566890358924866,
0.1819925159215927,
-0.07728724181652069,
-0.043180912733078,
0.6514201760292053,
0.029371194541454315,
0.23777523636817932,
-0.10743322968482971,
0.1617148071527481,
-0.10488283634185791,
0.05394556745886803,
0.33763059973716736,
-0.17017929255962372,
-0.1958734542131424,
0.1166849285364151,
-0.257216215133667,
0.6778267025947571,
-0.19400863349437714,
-0.20128534734249115,
-0.07281658798456192,
-0.05090722441673279,
0.2408652901649475,
-0.13469785451889038,
0.15935415029525757,
0.20595042407512665,
0.1566210389137268,
-0.05543036758899689,
-0.0127725750207901,
-0.2480049878358841,
-0.09728754311800003,
0.5820991396903992,
0.09441904723644257,
0.060019128024578094,
0.34719979763031006,
-0.2486722469329834,
0.7864292860031128,
0.2308712601661682,
0.11074492335319519,
0.21900339424610138,
-0.09828733652830124,
0.26743918657302856,
-0.21084299683570862,
-0.4376782178878784,
0.22268927097320557,
0.0914880558848381,
0.11182263493537903,
0.25042062997817993,
-0.032657623291015625,
-0.12136856466531754,
-0.35565194487571716,
-0.32548287510871887,
-0.1687038242816925,
-0.2966781556606293,
-0.11674022674560547,
-0.08178055286407471,
0.32216623425483704,
0.1697283387184143,
0.1055971011519432,
-0.2187424600124359,
-0.06542669236660004,
0.1467372179031372,
0.2421666532754898,
-0.09705580025911331,
0.06538279354572296,
-0.3066471219062805,
-0.14836955070495605,
-0.3405384421348572,
0.13686692714691162,
-0.05175913870334625,
0.45581987500190735,
-0.21435511112213135,
0.021049167960882187,
-0.07816086709499359,
0.11874625086784363,
0.002604551613330841,
0.10940129309892654,
-0.17142587900161743,
0.12667407095432281,
0.08906872570514679,
-0.12004200369119644,
-0.10462802648544312,
-0.06604710221290588,
0.05938481539487839,
0.14509060978889465,
0.26956284046173096,
-0.30268433690071106,
0.01771819032728672,
0.3039088249206543,
0.3760615885257721,
0.08053937554359436,
-0.1350097507238388,
-0.37702977657318115,
-0.35067877173423767,
-0.4728807806968689,
0.142903134226799,
0.17243525385856628,
0.09702301025390625,
-0.12717294692993164,
0.16323252022266388,
0.21967095136642456,
-0.1573038399219513,
0.4420211911201477,
0.12187030911445618,
0.1329144835472107,
-0.02862938493490219,
0.34017130732536316,
0.4768112599849701,
0.06646232306957245,
0.23751236498355865,
0.6372550129890442,
-0.02367546781897545,
-0.7577482461929321,
-0.19796332716941833,
-0.12012270838022232,
0.3438257575035095,
0.11216291785240173,
0.09019242972135544,
0.027692798525094986,
0.4193371534347534,
-0.008079394698143005,
-0.00764185655862093,
0.113189198076725,
0.48464229702949524,
0.41132664680480957,
-0.401898056268692,
-0.33835628628730774,
0.0783471092581749,
0.1432872712612152,
0.1592216044664383,
0.1371796727180481,
-0.09608721733093262,
-0.2214958816766739,
-0.02484939433634281,
-0.5586664080619812,
0.7840054035186768,
0.32275569438934326,
0.061239853501319885,
0.2629365026950836,
-0.0033963285386562347,
0.07993972301483154,
0.045301295816898346,
0.16852226853370667,
-0.1381043642759323,
-0.016007699072360992,
0.011967329308390617,
-0.09744203090667725,
0.22062185406684875,
0.07796477526426315,
-0.4101424217224121,
0.4231620132923126,
0.07149307429790497,
0.04687110334634781,
0.007526022847741842,
0.2793130576610565,
0.10801992565393448,
-0.13982073962688446,
-0.14610755443572998,
0.19996051490306854,
-0.1303395926952362,
0.6326069235801697,
0.10155946761369705,
-0.12584036588668823,
-0.030548492446541786,
-0.31491005420684814,
-0.10650302469730377,
0.20049700140953064,
-0.22000405192375183,
0.22504585981369019,
0.3635547459125519,
-0.07407605648040771,
0.307026743888855,
-0.09080308675765991,
-0.06724436581134796,
0.012437935918569565,
-0.28762248158454895,
0.08296578377485275,
0.11729233711957932,
0.06740882247686386,
-0.09600716084241867,
0.031805746257305145,
0.6111603379249573,
-0.11104059219360352,
-0.42293447256088257,
0.1673184633255005,
-0.09541689604520798,
0.10453008115291595,
-0.23546592891216278,
0.026772145181894302,
0.22497394680976868,
-0.09808886051177979,
-0.22557106614112854,
0.10455534607172012,
0.2335183322429657,
-0.060801319777965546,
0.19466589391231537,
0.04839589446783066,
-0.14517460763454437,
0.3375958502292633,
0.05211583897471428,
0.005513697862625122,
-0.0695338100194931,
0.2893538475036621,
-0.0004024393856525421,
-0.3251853585243225,
0.6093982458114624,
-0.09398852288722992,
-0.17701119184494019,
-0.25211936235427856,
0.032192885875701904,
0.21301093697547913,
-0.2881558835506439,
0.02639363706111908,
0.1457323580980301,
0.09586596488952637,
0.00915928091853857,
0.2715733051300049,
-0.03579191118478775,
-0.23377397656440735,
-0.08702680468559265,
-0.11457499861717224,
-0.4128246009349823,
0.27966445684432983,
0.11660894751548767,
0.26428985595703125,
-0.12911128997802734,
0.41322997212409973,
0.33128634095191956,
-0.046970516443252563,
-0.37690386176109314,
-0.01292581669986248,
-0.19945527613162994,
0.1677207350730896,
0.36695343255996704,
-0.19355207681655884,
0.09035692363977432,
0.08348625898361206,
0.2580675780773163,
0.08665536344051361,
-0.12997831404209137,
-0.2424425482749939,
-0.122883141040802,
0.08765038847923279,
0.1171843633055687,
-0.03285909444093704,
0.179656520485878,
0.011978846043348312,
-0.14750565588474274,
-0.1580750048160553,
0.021080512553453445,
0.07147491723299026,
-0.11939561367034912,
0.1821637749671936,
0.07641378790140152,
-0.00719982385635376,
0.25960415601730347,
0.21251125633716583,
0.04110734909772873,
0.12991498410701752,
0.00731732277199626,
0.025597253814339638,
0.13584496080875397,
0.11087256669998169,
-0.1450430154800415,
0.09272465109825134,
0.2530208230018616,
-0.20151880383491516,
0.08517724275588989,
-0.37758511304855347,
-0.15252436697483063,
0.0016041318885982037,
0.2083032876253128,
0.3257991373538971,
-0.14626024663448334,
0.09955044090747833,
0.31645306944847107,
0.25488072633743286,
-0.4426313042640686,
0.24021974205970764,
0.33233773708343506,
0.04457138106226921,
0.09072341024875641,
-0.014009930193424225,
0.03408544883131981,
0.050594329833984375,
0.19294455647468567,
0.14503613114356995,
0.001135289203375578,
-0.2689982056617737,
0.385049968957901,
-0.009509991854429245,
0.04656989499926567,
-0.08081547915935516,
0.3681246042251587,
-0.02089373767375946,
0.09746040403842926,
0.3820575475692749,
-0.43788832426071167,
0.24195033311843872,
0.03158564120531082,
0.14592245221138,
0.2872115969657898,
-0.3768293261528015,
-0.26746535301208496,
-0.11295336484909058,
-0.01589708775281906,
0.021188203245401382,
-0.07385390996932983,
0.6236790418624878,
-0.48653000593185425,
-0.06269124895334244,
-0.07762356102466583,
0.1505676656961441,
-0.3340911269187927,
0.12476587295532227,
0.04123014956712723,
-0.16655036807060242,
-0.15295934677124023,
-0.2408023327589035,
0.13427796959877014,
-0.0620049387216568,
0.3735049068927765,
0.08240309357643127,
-0.15662585198879242,
-0.20836760103702545,
-0.28441697359085083,
0.21982571482658386,
0.02885998785495758,
-0.09742437303066254,
0.2185850441455841,
-0.00917235016822815,
-0.0740261822938919,
0.08732452988624573,
0.5061697959899902,
0.5795966386795044,
0.23848581314086914,
-0.033130429685115814,
0.10495109111070633,
-0.016866672784090042,
-0.06025537848472595,
0.12997089326381683,
0.07002595067024231,
0.13685622811317444,
0.41413772106170654,
0.09768897294998169,
0.1724713146686554,
-0.19979144632816315,
-0.05299156531691551,
-0.0429147444665432,
-0.21572740375995636,
-0.4559641182422638,
0.2976953089237213,
-0.3128185570240021,
-0.13894084095954895,
-0.38227012753486633,
-0.03458375483751297,
-0.5582607984542847,
0.0663030818104744,
0.46723583340644836,
0.2679561674594879,
-0.16786429286003113,
-0.3979562819004059,
0.08951608836650848,
-0.2667337656021118,
0.14801627397537231,
0.40193015336990356,
0.18182148039340973,
-0.019209519028663635,
0.047144532203674316,
-0.679826021194458,
0.1862466037273407,
-0.013390440493822098,
-0.07089123129844666,
-0.04275732859969139,
-0.15619491040706635,
-0.02450728416442871,
0.01669657975435257,
0.08771474659442902,
-0.3457701802253723,
-0.17320683598518372,
-0.3885885179042816,
-0.3407890200614929,
-0.03838155046105385,
0.08905626088380814,
-0.028440596535801888,
0.19616656005382538,
-0.2559453248977661,
-0.02158162370324135,
-0.2670929729938507,
0.03971538692712784,
-0.1974104642868042,
-0.009619712829589844,
-0.029337571933865547,
0.23622572422027588,
0.32016071677207947,
-0.043614067137241364,
0.6852192878723145,
-0.09797175973653793,
-0.06327587366104126,
0.05460208281874657,
-0.2957470417022705,
-0.23357056081295013,
0.18203745782375336,
0.09987980127334595,
0.4836901128292084,
-0.13162320852279663,
-0.08214476704597473,
-0.28389304876327515,
-0.0038021765649318695,
0.05100994557142258,
-0.3323512375354767,
-0.0647723525762558,
0.19637802243232727,
-0.061784081161022186,
0.23275691270828247,
0.00008552242070436478,
0.03978468105196953,
-0.20827597379684448,
-0.05687724053859711,
-0.3205329179763794,
-0.42500993609428406,
0.6887364387512207,
-0.11748267710208893,
-0.4332183003425598,
-0.48823070526123047,
0.22156229615211487,
-0.1690739393234253,
-0.25081175565719604,
-0.4525447487831116,
0.1826772391796112,
0.3078407347202301,
-0.0280831977725029,
-0.10325160622596741,
0.20853327214717865,
0.028330765664577484,
0.055933061987161636,
-0.020306194201111794,
0.2545560598373413,
0.10182046890258789,
-0.08721403777599335,
0.29263103008270264,
-0.1661277860403061
] |
https://github.com/huggingface/datasets/issues/2591 | Cached dataset overflowing disk space | I'm using the datasets concatenate dataset to combine the datasets and then train.
train_dataset = concatenate_datasets([dataset1, dataset2, common_voice_train])
| I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
| 18 | Cached dataset overflowing disk space
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
I'm using the datasets concatenate dataset to combine the datasets and then train.
train_dataset = concatenate_datasets([dataset1, dataset2, common_voice_train])
| [
0.03755858168005943,
-0.42221277952194214,
0.0985904335975647,
0.45147621631622314,
0.10117340832948685,
0.2050558626651764,
0.0744851678609848,
0.14190451800823212,
0.14452898502349854,
0.055636756122112274,
0.4010789394378662,
-0.22804181277751923,
-0.12429945915937424,
0.11271964758634567,
0.14668940007686615,
0.06868910044431686,
0.25914686918258667,
-0.24585962295532227,
-0.06104955077171326,
0.10608945786952972,
-0.1954934448003769,
0.2656949758529663,
0.023638121783733368,
-0.12528938055038452,
-0.2641811668872833,
-0.1312519907951355,
0.11149042844772339,
0.0915546864271164,
0.11699394881725311,
-0.22152070701122284,
0.645517110824585,
-0.037543099373579025,
0.2969847619533539,
0.3342040181159973,
-0.000127111459732987,
-0.21884086728096008,
0.09154050052165985,
-0.18159358203411102,
-0.09225800633430481,
0.5504888892173767,
0.1914418637752533,
-0.3445691764354706,
-0.052295975387096405,
0.012889236211776733,
-0.19401636719703674,
0.1352991759777069,
-0.09690786898136139,
-0.43021300435066223,
0.24485176801681519,
0.07248511165380478,
0.04803004115819931,
-0.0077620213851332664,
-0.1181676834821701,
0.17080157995224,
-0.10923586040735245,
-0.0044048503041267395,
-0.24837245047092438,
0.19986942410469055,
0.24984554946422577,
-0.16989392042160034,
-0.11372096091508865,
0.5557486414909363,
-0.05901440232992172,
-0.0844298005104065,
0.5253400206565857,
0.08338119834661484,
-0.35629725456237793,
-0.11066320538520813,
0.38137900829315186,
-0.08013596385717392,
0.31446316838264465,
-0.4211869239807129,
-0.0359753742814064,
-0.5416673421859741,
0.12429271638393402,
-0.408481240272522,
0.491779625415802,
0.14393137395381927,
-0.3081754446029663,
0.20550782978534698,
-0.2643947899341583,
-0.46216875314712524,
-0.2639662027359009,
-0.12115147709846497,
-0.05101426690816879,
-0.16925927996635437,
-0.17792965471744537,
0.003887619823217392,
0.49818864464759827,
-0.12435244023799896,
-0.01805553212761879,
-0.11482825875282288,
-0.1485932469367981,
0.166488915681839,
-0.47040611505508423,
-0.16016298532485962,
-0.15975648164749146,
0.4838778078556061,
0.17781603336334229,
0.03436843305826187,
0.05801427736878395,
-0.2219776213169098,
0.013550552539527416,
-0.05450733006000519,
0.03849096596240997,
0.6338202357292175,
-0.4302011728286743,
0.14798606932163239,
0.026061709970235825,
-0.10047561675310135,
-0.06649613380432129,
-0.08406519144773483,
-0.006119045428931713,
-0.3888671100139618,
0.24311815202236176,
-0.30944669246673584,
0.036606475710868835,
-0.26600438356399536,
-0.13297808170318604,
0.10960038006305695,
0.18775686621665955,
0.14078259468078613,
0.25145095586776733,
0.38644394278526306,
0.18210580945014954,
0.30511486530303955,
-0.32284557819366455,
0.22181056439876556,
-0.2443428784608841,
-0.11928889900445938,
-0.04407389461994171,
-0.08466437458992004,
0.04949904605746269,
0.3295775353908539,
0.32801491022109985,
-0.11582422256469727,
-0.043828584253787994,
-0.1668727695941925,
0.2368198186159134,
-0.026421912014484406,
0.03099931590259075,
-0.2585935890674591,
0.28684473037719727,
0.11232449859380722,
-0.3598533272743225,
0.2251686006784439,
0.24257713556289673,
0.3989662528038025,
-0.24110397696495056,
0.12478333711624146,
-0.35504525899887085,
-0.25183868408203125,
0.148078054189682,
-0.014269680716097355,
-0.18318051099777222,
-0.0969630628824234,
-0.42974671721458435,
0.21908219158649445,
0.40135160088539124,
-0.2894100844860077,
0.046061355620622635,
0.016729483380913734,
-0.45551249384880066,
-0.1271669864654541,
0.2183413803577423,
0.39054983854293823,
-0.18444496393203735,
-0.0037568993866443634,
0.08714383840560913,
0.4355635344982147,
0.04852448031306267,
0.6233546733856201,
-0.14133717119693756,
0.02243870496749878,
-0.3221298158168793,
-0.21304845809936523,
-0.03465304523706436,
-0.5695789456367493,
-0.7795038819313049,
0.015956582501530647,
0.0507364496588707,
0.2829301655292511,
0.3464263677597046,
0.18545810878276825,
0.0370451956987381,
-0.11738628149032593,
-0.12995216250419617,
0.21605753898620605,
-0.004505498334765434,
-0.05586417764425278,
-0.32315710186958313,
-0.5304924249649048,
0.28534650802612305,
-0.11478026211261749,
0.046649735420942307,
0.10060334950685501,
-0.28222277760505676,
0.0011675544083118439,
0.19732579588890076,
-0.03163799270987511,
0.2541683316230774,
0.3844377398490906,
0.2930670976638794,
-0.3115617632865906,
-0.06635883450508118,
0.004258204251527786,
-0.45750558376312256,
0.19509512186050415,
0.1783725619316101,
-0.37532052397727966,
0.12458311021327972,
-0.10039153695106506,
0.014406437054276466,
-0.22644612193107605,
-0.13395214080810547,
-0.21682706475257874,
-0.1374632716178894,
-0.03394453227519989,
0.40037795901298523,
-0.17632855474948883,
-0.2991099953651428,
0.340055376291275,
0.0025749634951353073,
-0.040632400661706924,
-0.3259866237640381,
-0.0154319042339921,
0.14475584030151367,
-0.01706879585981369,
-0.25984036922454834,
0.1888260841369629,
0.06481921672821045,
-0.03552816063165665,
0.036864273250103,
0.2335701286792755,
0.02266818843781948,
0.3187163472175598,
0.3493313491344452,
0.3796342611312866,
0.21287024021148682,
-0.09152288734912872,
0.2820817828178406,
0.2902061343193054,
-0.0620255284011364,
0.05246187746524811,
-0.3751494288444519,
0.2003803253173828,
0.07106508314609528,
0.19506141543388367,
-0.1139809861779213,
-0.23688280582427979,
0.2514113485813141,
0.13606081902980804,
0.0944540947675705,
-0.12162674963474274,
0.2244887351989746,
0.0017589740455150604,
0.39250901341438293,
0.047658421099185944,
-0.04161134362220764,
0.2306874394416809,
0.38178184628486633,
0.23128202557563782,
0.07951179146766663,
0.3927406668663025,
-0.12577730417251587,
-0.2583569884300232,
0.10781519114971161,
0.34005117416381836,
0.5201392769813538,
0.1659969985485077,
0.19271165132522583,
-0.0825788602232933,
0.03340732306241989,
-0.024867122992873192,
0.14059418439865112,
-0.2922542095184326,
-0.1662440299987793,
0.09999160468578339,
0.17856784164905548,
-0.1703333556652069,
-0.1151011660695076,
0.20650918781757355,
-0.007210379000753164,
0.03747037053108215,
-0.12302879989147186,
0.2915503978729248,
-0.005188021808862686,
0.0669611245393753,
-0.3004227876663208,
0.20180469751358032,
-0.40097737312316895,
-0.006392760202288628,
0.13575682044029236,
0.5235962867736816,
0.09591205418109894,
0.02317565307021141,
-0.1968858540058136,
0.7337726354598999,
-0.07811559736728668,
-0.25689834356307983,
0.08064925670623779,
-0.01200873777270317,
-0.18147912621498108,
-0.1487005054950714,
0.3093962073326111,
-0.5017914175987244,
0.09717801958322525,
0.17247378826141357,
-0.08517388254404068,
-0.29793813824653625,
0.10572011023759842,
-0.07112856209278107,
0.17247402667999268,
0.026217442005872726,
-0.30232763290405273,
0.317168653011322,
0.008635763078927994,
-0.09089339524507523,
-0.08609148859977722,
-0.1090204119682312,
-0.08055045455694199,
-0.11614379286766052,
0.050007980316877365,
0.40381401777267456,
0.14031663537025452,
0.038803208619356155,
-0.26064878702163696,
-0.23034796118736267,
0.27583909034729004,
-0.15369391441345215,
-0.04329405725002289,
0.08113981783390045,
0.011299253441393375,
-0.13151556253433228,
-0.12341928482055664,
-0.28817564249038696,
-0.25257575511932373,
-0.7670420408248901,
0.31757599115371704,
0.06598077714443207,
-0.07368800044059753,
0.1482885479927063,
0.22149960696697235,
0.35197320580482483,
0.1975892037153244,
-0.5262953042984009,
-0.108043372631073,
-0.19273027777671814,
0.2778542935848236,
-0.2042677253484726,
-0.2437511831521988,
0.3360216021537781,
-0.12538683414459229,
0.19100773334503174,
0.043910980224609375,
-0.1972717046737671,
0.2947354316711426,
0.26082080602645874,
0.34925034642219543,
-0.07572431862354279,
-0.059926122426986694,
0.08637621998786926,
0.9180580377578735,
0.036647386848926544,
0.11798833310604095,
0.2343277782201767,
0.2871667146682739,
0.4486355185508728,
-0.18619707226753235,
-0.2464790940284729,
0.05115238204598427,
-0.1345730721950531,
-0.2713450789451599,
0.10462518036365509,
0.30827412009239197,
0.14662595093250275,
0.16312922537326813,
-0.06892210245132446,
0.21875309944152832,
-0.2138776183128357,
0.3311525583267212,
-0.14019285142421722,
0.32646575570106506,
0.02809758111834526,
0.08923833817243576,
-0.3383791446685791,
-0.22780507802963257,
0.003012934699654579,
0.12780237197875977,
0.38505539298057556,
0.2612074613571167,
-0.278920441865921,
-0.2433251291513443,
-0.4827181100845337,
0.19565506279468536,
-0.03849378228187561,
0.04034073278307915,
-0.37854546308517456,
-0.2253625988960266,
0.1297903060913086,
0.02033401094377041,
0.9234849810600281,
0.046456389129161835,
0.18212518095970154,
-0.25684911012649536,
-0.09680703282356262,
-0.07583030313253403,
0.002239704132080078,
0.2907460331916809,
-0.21749168634414673,
-0.1467922180891037,
0.4098927080631256,
0.037876106798648834,
-0.08720732480287552,
-0.32016521692276,
0.36399751901626587,
-0.45757317543029785,
0.006599533371627331,
-0.2253919243812561,
-0.05376413092017174,
-0.06250103563070297,
0.15161985158920288,
0.13378913700580597,
0.12305901199579239,
0.09344186633825302,
0.13201020658016205,
-0.17027154564857483,
-0.04276682436466217,
-0.055593833327293396,
0.020094752311706543,
0.5271499156951904,
0.11927302181720734,
0.04087485000491142,
0.23633010685443878,
0.2522953748703003,
0.1998601108789444,
0.2740607261657715,
0.09328655898571014,
-0.02580278366804123,
-0.021449565887451172,
0.05113622173666954,
0.11866383254528046,
0.4327239990234375,
-0.22887352108955383,
0.2974848449230194,
0.09995876252651215,
0.1264849603176117,
-0.7642993330955505,
0.07686605304479599,
0.2269214391708374,
0.3894956707954407,
-0.047136250883340836,
-0.38556966185569763,
0.3176097571849823,
0.016765914857387543,
-0.014085724949836731,
0.24370910227298737,
0.11867402493953705,
-0.5224876999855042,
0.0029739029705524445,
0.016698390245437622,
1.0220948457717896,
-0.00527258962392807,
0.5250904560089111,
0.010606419295072556,
0.08383141458034515,
0.40280935168266296,
-0.5466371774673462,
0.3585670590400696,
0.05777125433087349,
-0.25588658452033997,
-0.035482365638017654,
0.0891319066286087,
-0.008490316569805145,
-0.07289201021194458,
-0.15172544121742249,
0.38956859707832336,
-0.09464855492115021,
0.21417900919914246,
-0.41838958859443665,
-0.08630818128585815,
-0.011762958019971848,
-0.22539019584655762,
-0.5132781267166138,
0.05454861372709274,
-0.27421241998672485,
0.10352687537670135,
-0.050834644585847855,
0.031906452029943466,
0.16359293460845947,
-0.02100258320569992,
-0.3381103575229645,
-0.20945331454277039,
-0.2528519928455353,
-0.02589675411581993,
-0.0363922081887722,
-0.3285651206970215,
-0.016561277210712433,
0.2719007432460785,
0.33186018466949463,
0.09051409363746643,
-0.36411383748054504,
0.11960239708423615,
-0.1798488199710846,
0.06281237304210663,
-0.2151515781879425,
-0.09834614396095276,
-0.16750012338161469,
-0.05480187386274338,
0.017498470842838287,
0.0707685649394989,
0.03378552198410034,
-0.4108774662017822,
0.017511457204818726,
0.03225738927721977,
-0.13307398557662964,
-0.09009605646133423,
-0.20876924693584442,
0.14244331419467926,
0.03193799778819084,
-0.06901681423187256,
0.04544614255428314,
0.2176920771598816,
-0.3403005003929138,
0.12044008076190948,
-0.21364612877368927,
-0.24093225598335266,
-0.03804897889494896,
0.47746706008911133,
0.02896040305495262,
-0.292124480009079,
0.522064208984375,
-0.01141524687409401,
0.053945690393447876,
-0.18834984302520752,
0.14020150899887085,
0.17015084624290466,
-0.1835627555847168,
-0.05351308360695839,
0.02811463735997677,
-0.2855754494667053,
-0.20573565363883972,
-0.20290228724479675,
0.49248820543289185,
-0.2519826292991638,
-0.3050518035888672,
-0.14498859643936157,
-0.4076456129550934,
-0.02088971436023712,
-0.27629202604293823,
-0.025776546448469162,
-0.09619081020355225,
-0.29876425862312317,
-0.019885148853063583,
0.19164277613162994,
-0.14317087829113007,
0.014227570034563541,
-0.00012236274778842926,
-0.16733630001544952,
0.10388116538524628,
0.02745595946907997,
0.48546332120895386,
-0.06346917152404785,
-0.1909932792186737,
-0.15952421724796295,
-0.0006296820938587189,
-0.0392892025411129,
-0.06181425228714943,
0.1540684551000595,
-0.16109290719032288,
-0.01241874136030674,
-0.018556632101535797,
-0.22995229065418243,
0.044407919049263,
-0.32965418696403503,
0.1573793590068817,
0.21430182456970215,
0.2089235931634903,
-0.021631192415952682,
-0.3265135586261749,
0.0002108365297317505,
0.003243744373321533,
0.11961552500724792,
0.28255966305732727,
-0.10582298040390015,
0.0820925161242485,
0.1894635558128357,
-0.01951720006763935,
-0.07181376218795776,
-0.1082029864192009,
0.24002867937088013,
0.03034607321023941,
-0.10756031423807144,
0.002385079860687256,
-0.03746490925550461,
-0.014393163844943047,
0.3485839366912842,
0.13812561333179474,
0.19012419879436493,
-0.03175094723701477,
-0.010206262581050396,
0.32908955216407776,
0.03244329243898392,
-0.06292299181222916,
-0.30293285846710205,
0.13967721164226532,
-0.10798893123865128,
-0.09744841605424881,
0.35205894708633423,
0.02701718732714653,
-0.21388724446296692,
0.08610179275274277,
0.14734339714050293,
0.4955656826496124,
-0.29766786098480225,
0.3628249168395996,
0.19309760630130768,
0.21265862882137299,
0.10369639098644257,
0.29051053524017334,
0.32934558391571045,
0.23671117424964905,
0.5512287020683289,
-0.03360681235790253,
0.1553395688533783,
0.28774183988571167,
0.00977158173918724,
-0.2069416046142578,
-0.3993995487689972,
-0.4862818121910095,
0.2589118182659149,
-0.21330970525741577,
0.22736063599586487,
-0.13360947370529175,
0.1467946469783783,
-0.04144874960184097,
-0.6776145100593567,
-0.3064131736755371,
-0.07123371958732605,
-0.24339675903320312,
-0.34788915514945984,
0.28027915954589844,
-0.05674406513571739,
0.28443247079849243,
0.2872742712497711,
0.07969255745410919,
-0.23314879834651947,
0.48158228397369385,
-0.05466647446155548,
-0.018018566071987152,
0.17536063492298126,
0.0876787006855011,
0.2863031327724457,
0.11032859981060028,
-0.15479904413223267,
0.2614777684211731,
-0.01742088794708252,
-0.12979193031787872,
0.027695059776306152,
0.1919705718755722,
0.2432429939508438,
0.10014544427394867,
-0.042350657284259796,
0.20729444921016693,
0.08171705901622772,
0.17870603501796722,
-0.3429941236972809,
0.15291425585746765,
-0.1525605320930481,
0.07531070709228516,
0.03375200182199478,
-0.031990282237529755,
0.11957424879074097,
0.2038121372461319,
-0.11085817217826843,
0.23483137786388397,
-0.46391046047210693,
-0.04969941824674606,
-0.2446766495704651,
0.0765303298830986,
-0.2179708480834961,
0.28006765246391296,
-0.2816492021083832,
0.19422633945941925,
0.5648451447486877,
-0.0442584864795208,
0.3497544229030609,
0.1905336081981659,
-0.011787880212068558,
-0.011269565671682358,
0.7627530694007874,
0.10878625512123108,
-0.30315911769866943,
-0.3050417900085449,
0.0308539941906929,
-0.4886031150817871,
0.0807436853647232,
-0.31528106331825256,
0.2396731972694397,
-0.20807833969593048,
0.10565023869276047,
0.06698715686798096,
-0.018933743238449097,
-0.07729984819889069,
-0.09755311906337738,
0.051275067031383514,
0.04653194546699524,
-0.345073401927948,
-0.09465132653713226,
0.17580880224704742,
0.22806516289710999,
0.08666227012872696,
-0.39954739809036255,
0.21151995658874512,
0.1642501801252365,
-0.15866413712501526,
0.4196970462799072,
0.1869819462299347,
-0.49183788895606995,
0.25795865058898926,
-0.12856702506542206,
0.19052425026893616,
0.11105123907327652,
0.23452681303024292,
0.03124156780540943,
-0.48960191011428833,
-0.0348949059844017,
-0.23273228108882904,
-0.04416864365339279,
-0.12012314796447754,
0.20552435517311096,
-0.5847105383872986,
0.03876578062772751,
-0.3769589960575104,
0.20367936789989471,
0.3197949528694153,
-0.16381318867206573,
0.09265603870153427,
-0.01253150962293148,
0.18605726957321167,
0.09033247828483582,
0.4170553684234619,
0.41981983184814453,
-0.06857188045978546,
0.06421518325805664,
-0.34390366077423096,
0.1352635622024536,
0.22307345271110535,
-0.34712082147598267,
-0.3600994646549225,
0.25707998871803284,
0.39462172985076904,
0.5234392285346985,
-0.3522127866744995,
-0.345950722694397,
0.11524482816457748,
0.033307429403066635,
0.0821378231048584,
-0.1448383927345276,
0.20114384591579437,
-0.28637591004371643,
-0.25332850217819214,
0.1424974948167801,
0.3100414276123047,
0.30020642280578613,
-0.16755442321300507,
0.2714891731739044,
-0.3209959864616394
] |
https://github.com/huggingface/datasets/issues/2591 | Cached dataset overflowing disk space | Hi @BirgerMoell.
You have several options:
- to set caching to be stored on a different path location, other than the default one (`~/.cache/huggingface/datasets`):
- either setting the environment variable `HF_DATASETS_CACHE` with the path to the new cache location
- or by passing it with the parameter `cache_dir` when loading each of the datasets: `dataset = load_dataset(..., cache_dir=your_new_location)`
You can get all the information in the docs: https://huggingface.co/docs/datasets/loading_datasets.html#cache-directory
- I wouldn't recommend disabling caching, because current implementation generates cache files anyway, although in a temporary directory and they are deleted when the session closes. See details here: https://huggingface.co/docs/datasets/processing.html#enable-or-disable-caching
- You could alternatively load the datasets in streaming mode. This is a new feature which allows loading the datasets without downloading the entire files. More information here: https://huggingface.co/docs/datasets/dataset_streaming.html | I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
| 127 | Cached dataset overflowing disk space
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
Hi @BirgerMoell.
You have several options:
- to set caching to be stored on a different path location, other than the default one (`~/.cache/huggingface/datasets`):
- either setting the environment variable `HF_DATASETS_CACHE` with the path to the new cache location
- or by passing it with the parameter `cache_dir` when loading each of the datasets: `dataset = load_dataset(..., cache_dir=your_new_location)`
You can get all the information in the docs: https://huggingface.co/docs/datasets/loading_datasets.html#cache-directory
- I wouldn't recommend disabling caching, because current implementation generates cache files anyway, although in a temporary directory and they are deleted when the session closes. See details here: https://huggingface.co/docs/datasets/processing.html#enable-or-disable-caching
- You could alternatively load the datasets in streaming mode. This is a new feature which allows loading the datasets without downloading the entire files. More information here: https://huggingface.co/docs/datasets/dataset_streaming.html | [
0.03755858168005943,
-0.42221277952194214,
0.0985904335975647,
0.45147621631622314,
0.10117340832948685,
0.2050558626651764,
0.0744851678609848,
0.14190451800823212,
0.14452898502349854,
0.055636756122112274,
0.4010789394378662,
-0.22804181277751923,
-0.12429945915937424,
0.11271964758634567,
0.14668940007686615,
0.06868910044431686,
0.25914686918258667,
-0.24585962295532227,
-0.06104955077171326,
0.10608945786952972,
-0.1954934448003769,
0.2656949758529663,
0.023638121783733368,
-0.12528938055038452,
-0.2641811668872833,
-0.1312519907951355,
0.11149042844772339,
0.0915546864271164,
0.11699394881725311,
-0.22152070701122284,
0.645517110824585,
-0.037543099373579025,
0.2969847619533539,
0.3342040181159973,
-0.000127111459732987,
-0.21884086728096008,
0.09154050052165985,
-0.18159358203411102,
-0.09225800633430481,
0.5504888892173767,
0.1914418637752533,
-0.3445691764354706,
-0.052295975387096405,
0.012889236211776733,
-0.19401636719703674,
0.1352991759777069,
-0.09690786898136139,
-0.43021300435066223,
0.24485176801681519,
0.07248511165380478,
0.04803004115819931,
-0.0077620213851332664,
-0.1181676834821701,
0.17080157995224,
-0.10923586040735245,
-0.0044048503041267395,
-0.24837245047092438,
0.19986942410469055,
0.24984554946422577,
-0.16989392042160034,
-0.11372096091508865,
0.5557486414909363,
-0.05901440232992172,
-0.0844298005104065,
0.5253400206565857,
0.08338119834661484,
-0.35629725456237793,
-0.11066320538520813,
0.38137900829315186,
-0.08013596385717392,
0.31446316838264465,
-0.4211869239807129,
-0.0359753742814064,
-0.5416673421859741,
0.12429271638393402,
-0.408481240272522,
0.491779625415802,
0.14393137395381927,
-0.3081754446029663,
0.20550782978534698,
-0.2643947899341583,
-0.46216875314712524,
-0.2639662027359009,
-0.12115147709846497,
-0.05101426690816879,
-0.16925927996635437,
-0.17792965471744537,
0.003887619823217392,
0.49818864464759827,
-0.12435244023799896,
-0.01805553212761879,
-0.11482825875282288,
-0.1485932469367981,
0.166488915681839,
-0.47040611505508423,
-0.16016298532485962,
-0.15975648164749146,
0.4838778078556061,
0.17781603336334229,
0.03436843305826187,
0.05801427736878395,
-0.2219776213169098,
0.013550552539527416,
-0.05450733006000519,
0.03849096596240997,
0.6338202357292175,
-0.4302011728286743,
0.14798606932163239,
0.026061709970235825,
-0.10047561675310135,
-0.06649613380432129,
-0.08406519144773483,
-0.006119045428931713,
-0.3888671100139618,
0.24311815202236176,
-0.30944669246673584,
0.036606475710868835,
-0.26600438356399536,
-0.13297808170318604,
0.10960038006305695,
0.18775686621665955,
0.14078259468078613,
0.25145095586776733,
0.38644394278526306,
0.18210580945014954,
0.30511486530303955,
-0.32284557819366455,
0.22181056439876556,
-0.2443428784608841,
-0.11928889900445938,
-0.04407389461994171,
-0.08466437458992004,
0.04949904605746269,
0.3295775353908539,
0.32801491022109985,
-0.11582422256469727,
-0.043828584253787994,
-0.1668727695941925,
0.2368198186159134,
-0.026421912014484406,
0.03099931590259075,
-0.2585935890674591,
0.28684473037719727,
0.11232449859380722,
-0.3598533272743225,
0.2251686006784439,
0.24257713556289673,
0.3989662528038025,
-0.24110397696495056,
0.12478333711624146,
-0.35504525899887085,
-0.25183868408203125,
0.148078054189682,
-0.014269680716097355,
-0.18318051099777222,
-0.0969630628824234,
-0.42974671721458435,
0.21908219158649445,
0.40135160088539124,
-0.2894100844860077,
0.046061355620622635,
0.016729483380913734,
-0.45551249384880066,
-0.1271669864654541,
0.2183413803577423,
0.39054983854293823,
-0.18444496393203735,
-0.0037568993866443634,
0.08714383840560913,
0.4355635344982147,
0.04852448031306267,
0.6233546733856201,
-0.14133717119693756,
0.02243870496749878,
-0.3221298158168793,
-0.21304845809936523,
-0.03465304523706436,
-0.5695789456367493,
-0.7795038819313049,
0.015956582501530647,
0.0507364496588707,
0.2829301655292511,
0.3464263677597046,
0.18545810878276825,
0.0370451956987381,
-0.11738628149032593,
-0.12995216250419617,
0.21605753898620605,
-0.004505498334765434,
-0.05586417764425278,
-0.32315710186958313,
-0.5304924249649048,
0.28534650802612305,
-0.11478026211261749,
0.046649735420942307,
0.10060334950685501,
-0.28222277760505676,
0.0011675544083118439,
0.19732579588890076,
-0.03163799270987511,
0.2541683316230774,
0.3844377398490906,
0.2930670976638794,
-0.3115617632865906,
-0.06635883450508118,
0.004258204251527786,
-0.45750558376312256,
0.19509512186050415,
0.1783725619316101,
-0.37532052397727966,
0.12458311021327972,
-0.10039153695106506,
0.014406437054276466,
-0.22644612193107605,
-0.13395214080810547,
-0.21682706475257874,
-0.1374632716178894,
-0.03394453227519989,
0.40037795901298523,
-0.17632855474948883,
-0.2991099953651428,
0.340055376291275,
0.0025749634951353073,
-0.040632400661706924,
-0.3259866237640381,
-0.0154319042339921,
0.14475584030151367,
-0.01706879585981369,
-0.25984036922454834,
0.1888260841369629,
0.06481921672821045,
-0.03552816063165665,
0.036864273250103,
0.2335701286792755,
0.02266818843781948,
0.3187163472175598,
0.3493313491344452,
0.3796342611312866,
0.21287024021148682,
-0.09152288734912872,
0.2820817828178406,
0.2902061343193054,
-0.0620255284011364,
0.05246187746524811,
-0.3751494288444519,
0.2003803253173828,
0.07106508314609528,
0.19506141543388367,
-0.1139809861779213,
-0.23688280582427979,
0.2514113485813141,
0.13606081902980804,
0.0944540947675705,
-0.12162674963474274,
0.2244887351989746,
0.0017589740455150604,
0.39250901341438293,
0.047658421099185944,
-0.04161134362220764,
0.2306874394416809,
0.38178184628486633,
0.23128202557563782,
0.07951179146766663,
0.3927406668663025,
-0.12577730417251587,
-0.2583569884300232,
0.10781519114971161,
0.34005117416381836,
0.5201392769813538,
0.1659969985485077,
0.19271165132522583,
-0.0825788602232933,
0.03340732306241989,
-0.024867122992873192,
0.14059418439865112,
-0.2922542095184326,
-0.1662440299987793,
0.09999160468578339,
0.17856784164905548,
-0.1703333556652069,
-0.1151011660695076,
0.20650918781757355,
-0.007210379000753164,
0.03747037053108215,
-0.12302879989147186,
0.2915503978729248,
-0.005188021808862686,
0.0669611245393753,
-0.3004227876663208,
0.20180469751358032,
-0.40097737312316895,
-0.006392760202288628,
0.13575682044029236,
0.5235962867736816,
0.09591205418109894,
0.02317565307021141,
-0.1968858540058136,
0.7337726354598999,
-0.07811559736728668,
-0.25689834356307983,
0.08064925670623779,
-0.01200873777270317,
-0.18147912621498108,
-0.1487005054950714,
0.3093962073326111,
-0.5017914175987244,
0.09717801958322525,
0.17247378826141357,
-0.08517388254404068,
-0.29793813824653625,
0.10572011023759842,
-0.07112856209278107,
0.17247402667999268,
0.026217442005872726,
-0.30232763290405273,
0.317168653011322,
0.008635763078927994,
-0.09089339524507523,
-0.08609148859977722,
-0.1090204119682312,
-0.08055045455694199,
-0.11614379286766052,
0.050007980316877365,
0.40381401777267456,
0.14031663537025452,
0.038803208619356155,
-0.26064878702163696,
-0.23034796118736267,
0.27583909034729004,
-0.15369391441345215,
-0.04329405725002289,
0.08113981783390045,
0.011299253441393375,
-0.13151556253433228,
-0.12341928482055664,
-0.28817564249038696,
-0.25257575511932373,
-0.7670420408248901,
0.31757599115371704,
0.06598077714443207,
-0.07368800044059753,
0.1482885479927063,
0.22149960696697235,
0.35197320580482483,
0.1975892037153244,
-0.5262953042984009,
-0.108043372631073,
-0.19273027777671814,
0.2778542935848236,
-0.2042677253484726,
-0.2437511831521988,
0.3360216021537781,
-0.12538683414459229,
0.19100773334503174,
0.043910980224609375,
-0.1972717046737671,
0.2947354316711426,
0.26082080602645874,
0.34925034642219543,
-0.07572431862354279,
-0.059926122426986694,
0.08637621998786926,
0.9180580377578735,
0.036647386848926544,
0.11798833310604095,
0.2343277782201767,
0.2871667146682739,
0.4486355185508728,
-0.18619707226753235,
-0.2464790940284729,
0.05115238204598427,
-0.1345730721950531,
-0.2713450789451599,
0.10462518036365509,
0.30827412009239197,
0.14662595093250275,
0.16312922537326813,
-0.06892210245132446,
0.21875309944152832,
-0.2138776183128357,
0.3311525583267212,
-0.14019285142421722,
0.32646575570106506,
0.02809758111834526,
0.08923833817243576,
-0.3383791446685791,
-0.22780507802963257,
0.003012934699654579,
0.12780237197875977,
0.38505539298057556,
0.2612074613571167,
-0.278920441865921,
-0.2433251291513443,
-0.4827181100845337,
0.19565506279468536,
-0.03849378228187561,
0.04034073278307915,
-0.37854546308517456,
-0.2253625988960266,
0.1297903060913086,
0.02033401094377041,
0.9234849810600281,
0.046456389129161835,
0.18212518095970154,
-0.25684911012649536,
-0.09680703282356262,
-0.07583030313253403,
0.002239704132080078,
0.2907460331916809,
-0.21749168634414673,
-0.1467922180891037,
0.4098927080631256,
0.037876106798648834,
-0.08720732480287552,
-0.32016521692276,
0.36399751901626587,
-0.45757317543029785,
0.006599533371627331,
-0.2253919243812561,
-0.05376413092017174,
-0.06250103563070297,
0.15161985158920288,
0.13378913700580597,
0.12305901199579239,
0.09344186633825302,
0.13201020658016205,
-0.17027154564857483,
-0.04276682436466217,
-0.055593833327293396,
0.020094752311706543,
0.5271499156951904,
0.11927302181720734,
0.04087485000491142,
0.23633010685443878,
0.2522953748703003,
0.1998601108789444,
0.2740607261657715,
0.09328655898571014,
-0.02580278366804123,
-0.021449565887451172,
0.05113622173666954,
0.11866383254528046,
0.4327239990234375,
-0.22887352108955383,
0.2974848449230194,
0.09995876252651215,
0.1264849603176117,
-0.7642993330955505,
0.07686605304479599,
0.2269214391708374,
0.3894956707954407,
-0.047136250883340836,
-0.38556966185569763,
0.3176097571849823,
0.016765914857387543,
-0.014085724949836731,
0.24370910227298737,
0.11867402493953705,
-0.5224876999855042,
0.0029739029705524445,
0.016698390245437622,
1.0220948457717896,
-0.00527258962392807,
0.5250904560089111,
0.010606419295072556,
0.08383141458034515,
0.40280935168266296,
-0.5466371774673462,
0.3585670590400696,
0.05777125433087349,
-0.25588658452033997,
-0.035482365638017654,
0.0891319066286087,
-0.008490316569805145,
-0.07289201021194458,
-0.15172544121742249,
0.38956859707832336,
-0.09464855492115021,
0.21417900919914246,
-0.41838958859443665,
-0.08630818128585815,
-0.011762958019971848,
-0.22539019584655762,
-0.5132781267166138,
0.05454861372709274,
-0.27421241998672485,
0.10352687537670135,
-0.050834644585847855,
0.031906452029943466,
0.16359293460845947,
-0.02100258320569992,
-0.3381103575229645,
-0.20945331454277039,
-0.2528519928455353,
-0.02589675411581993,
-0.0363922081887722,
-0.3285651206970215,
-0.016561277210712433,
0.2719007432460785,
0.33186018466949463,
0.09051409363746643,
-0.36411383748054504,
0.11960239708423615,
-0.1798488199710846,
0.06281237304210663,
-0.2151515781879425,
-0.09834614396095276,
-0.16750012338161469,
-0.05480187386274338,
0.017498470842838287,
0.0707685649394989,
0.03378552198410034,
-0.4108774662017822,
0.017511457204818726,
0.03225738927721977,
-0.13307398557662964,
-0.09009605646133423,
-0.20876924693584442,
0.14244331419467926,
0.03193799778819084,
-0.06901681423187256,
0.04544614255428314,
0.2176920771598816,
-0.3403005003929138,
0.12044008076190948,
-0.21364612877368927,
-0.24093225598335266,
-0.03804897889494896,
0.47746706008911133,
0.02896040305495262,
-0.292124480009079,
0.522064208984375,
-0.01141524687409401,
0.053945690393447876,
-0.18834984302520752,
0.14020150899887085,
0.17015084624290466,
-0.1835627555847168,
-0.05351308360695839,
0.02811463735997677,
-0.2855754494667053,
-0.20573565363883972,
-0.20290228724479675,
0.49248820543289185,
-0.2519826292991638,
-0.3050518035888672,
-0.14498859643936157,
-0.4076456129550934,
-0.02088971436023712,
-0.27629202604293823,
-0.025776546448469162,
-0.09619081020355225,
-0.29876425862312317,
-0.019885148853063583,
0.19164277613162994,
-0.14317087829113007,
0.014227570034563541,
-0.00012236274778842926,
-0.16733630001544952,
0.10388116538524628,
0.02745595946907997,
0.48546332120895386,
-0.06346917152404785,
-0.1909932792186737,
-0.15952421724796295,
-0.0006296820938587189,
-0.0392892025411129,
-0.06181425228714943,
0.1540684551000595,
-0.16109290719032288,
-0.01241874136030674,
-0.018556632101535797,
-0.22995229065418243,
0.044407919049263,
-0.32965418696403503,
0.1573793590068817,
0.21430182456970215,
0.2089235931634903,
-0.021631192415952682,
-0.3265135586261749,
0.0002108365297317505,
0.003243744373321533,
0.11961552500724792,
0.28255966305732727,
-0.10582298040390015,
0.0820925161242485,
0.1894635558128357,
-0.01951720006763935,
-0.07181376218795776,
-0.1082029864192009,
0.24002867937088013,
0.03034607321023941,
-0.10756031423807144,
0.002385079860687256,
-0.03746490925550461,
-0.014393163844943047,
0.3485839366912842,
0.13812561333179474,
0.19012419879436493,
-0.03175094723701477,
-0.010206262581050396,
0.32908955216407776,
0.03244329243898392,
-0.06292299181222916,
-0.30293285846710205,
0.13967721164226532,
-0.10798893123865128,
-0.09744841605424881,
0.35205894708633423,
0.02701718732714653,
-0.21388724446296692,
0.08610179275274277,
0.14734339714050293,
0.4955656826496124,
-0.29766786098480225,
0.3628249168395996,
0.19309760630130768,
0.21265862882137299,
0.10369639098644257,
0.29051053524017334,
0.32934558391571045,
0.23671117424964905,
0.5512287020683289,
-0.03360681235790253,
0.1553395688533783,
0.28774183988571167,
0.00977158173918724,
-0.2069416046142578,
-0.3993995487689972,
-0.4862818121910095,
0.2589118182659149,
-0.21330970525741577,
0.22736063599586487,
-0.13360947370529175,
0.1467946469783783,
-0.04144874960184097,
-0.6776145100593567,
-0.3064131736755371,
-0.07123371958732605,
-0.24339675903320312,
-0.34788915514945984,
0.28027915954589844,
-0.05674406513571739,
0.28443247079849243,
0.2872742712497711,
0.07969255745410919,
-0.23314879834651947,
0.48158228397369385,
-0.05466647446155548,
-0.018018566071987152,
0.17536063492298126,
0.0876787006855011,
0.2863031327724457,
0.11032859981060028,
-0.15479904413223267,
0.2614777684211731,
-0.01742088794708252,
-0.12979193031787872,
0.027695059776306152,
0.1919705718755722,
0.2432429939508438,
0.10014544427394867,
-0.042350657284259796,
0.20729444921016693,
0.08171705901622772,
0.17870603501796722,
-0.3429941236972809,
0.15291425585746765,
-0.1525605320930481,
0.07531070709228516,
0.03375200182199478,
-0.031990282237529755,
0.11957424879074097,
0.2038121372461319,
-0.11085817217826843,
0.23483137786388397,
-0.46391046047210693,
-0.04969941824674606,
-0.2446766495704651,
0.0765303298830986,
-0.2179708480834961,
0.28006765246391296,
-0.2816492021083832,
0.19422633945941925,
0.5648451447486877,
-0.0442584864795208,
0.3497544229030609,
0.1905336081981659,
-0.011787880212068558,
-0.011269565671682358,
0.7627530694007874,
0.10878625512123108,
-0.30315911769866943,
-0.3050417900085449,
0.0308539941906929,
-0.4886031150817871,
0.0807436853647232,
-0.31528106331825256,
0.2396731972694397,
-0.20807833969593048,
0.10565023869276047,
0.06698715686798096,
-0.018933743238449097,
-0.07729984819889069,
-0.09755311906337738,
0.051275067031383514,
0.04653194546699524,
-0.345073401927948,
-0.09465132653713226,
0.17580880224704742,
0.22806516289710999,
0.08666227012872696,
-0.39954739809036255,
0.21151995658874512,
0.1642501801252365,
-0.15866413712501526,
0.4196970462799072,
0.1869819462299347,
-0.49183788895606995,
0.25795865058898926,
-0.12856702506542206,
0.19052425026893616,
0.11105123907327652,
0.23452681303024292,
0.03124156780540943,
-0.48960191011428833,
-0.0348949059844017,
-0.23273228108882904,
-0.04416864365339279,
-0.12012314796447754,
0.20552435517311096,
-0.5847105383872986,
0.03876578062772751,
-0.3769589960575104,
0.20367936789989471,
0.3197949528694153,
-0.16381318867206573,
0.09265603870153427,
-0.01253150962293148,
0.18605726957321167,
0.09033247828483582,
0.4170553684234619,
0.41981983184814453,
-0.06857188045978546,
0.06421518325805664,
-0.34390366077423096,
0.1352635622024536,
0.22307345271110535,
-0.34712082147598267,
-0.3600994646549225,
0.25707998871803284,
0.39462172985076904,
0.5234392285346985,
-0.3522127866744995,
-0.345950722694397,
0.11524482816457748,
0.033307429403066635,
0.0821378231048584,
-0.1448383927345276,
0.20114384591579437,
-0.28637591004371643,
-0.25332850217819214,
0.1424974948167801,
0.3100414276123047,
0.30020642280578613,
-0.16755442321300507,
0.2714891731739044,
-0.3209959864616394
] |
https://github.com/huggingface/datasets/issues/2591 | Cached dataset overflowing disk space | Hi @BirgerMoell,
We are planning to add a new feature to datasets, which could be interesting in your case: Add the option to delete temporary files (decompressed files) from the cache directory (see: #2481, #2604).
We will ping you once this feature is implemented, so that the size of your cache directory will be considerably reduced. | I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
| 56 | Cached dataset overflowing disk space
I'm training a Swedish Wav2vec2 model on a Linux GPU and having issues that the huggingface cached dataset folder is completely filling up my disk space (I'm training on a dataset of around 500 gb).
The cache folder is 500gb (and now my disk space is full).
Is there a way to toggle caching or set the caching to be stored on a different device (I have another drive with 4 tb that could hold the caching files).
This might not technically be a bug, but I was unsure and I felt that the bug was the closest one.
Traceback (most recent call last):
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 186, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/fingerprint.py", line 397, in wrapper
out = func(self, *args, **kwargs)
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1983, in _map_single
writer.finalize()
File "/home/birger/miniconda3/envs/wav2vec2/lib/python3.7/site-packages/datasets/arrow_writer.py", line 418, in finalize
self.pa_writer.close()
File "pyarrow/ipc.pxi", line 402, in pyarrow.lib._CRecordBatchWriter.close
File "pyarrow/error.pxi", line 97, in pyarrow.lib.check_status
OSError: [Errno 28] Error writing bytes to file. Detail: [errno 28] No space left on device
"""
The above exception was the direct cause of the following exception:
Hi @BirgerMoell,
We are planning to add a new feature to datasets, which could be interesting in your case: Add the option to delete temporary files (decompressed files) from the cache directory (see: #2481, #2604).
We will ping you once this feature is implemented, so that the size of your cache directory will be considerably reduced. | [
0.03755858168005943,
-0.42221277952194214,
0.0985904335975647,
0.45147621631622314,
0.10117340832948685,
0.2050558626651764,
0.0744851678609848,
0.14190451800823212,
0.14452898502349854,
0.055636756122112274,
0.4010789394378662,
-0.22804181277751923,
-0.12429945915937424,
0.11271964758634567,
0.14668940007686615,
0.06868910044431686,
0.25914686918258667,
-0.24585962295532227,
-0.06104955077171326,
0.10608945786952972,
-0.1954934448003769,
0.2656949758529663,
0.023638121783733368,
-0.12528938055038452,
-0.2641811668872833,
-0.1312519907951355,
0.11149042844772339,
0.0915546864271164,
0.11699394881725311,
-0.22152070701122284,
0.645517110824585,
-0.037543099373579025,
0.2969847619533539,
0.3342040181159973,
-0.000127111459732987,
-0.21884086728096008,
0.09154050052165985,
-0.18159358203411102,
-0.09225800633430481,
0.5504888892173767,
0.1914418637752533,
-0.3445691764354706,
-0.052295975387096405,
0.012889236211776733,
-0.19401636719703674,
0.1352991759777069,
-0.09690786898136139,
-0.43021300435066223,
0.24485176801681519,
0.07248511165380478,
0.04803004115819931,
-0.0077620213851332664,
-0.1181676834821701,
0.17080157995224,
-0.10923586040735245,
-0.0044048503041267395,
-0.24837245047092438,
0.19986942410469055,
0.24984554946422577,
-0.16989392042160034,
-0.11372096091508865,
0.5557486414909363,
-0.05901440232992172,
-0.0844298005104065,
0.5253400206565857,
0.08338119834661484,
-0.35629725456237793,
-0.11066320538520813,
0.38137900829315186,
-0.08013596385717392,
0.31446316838264465,
-0.4211869239807129,
-0.0359753742814064,
-0.5416673421859741,
0.12429271638393402,
-0.408481240272522,
0.491779625415802,
0.14393137395381927,
-0.3081754446029663,
0.20550782978534698,
-0.2643947899341583,
-0.46216875314712524,
-0.2639662027359009,
-0.12115147709846497,
-0.05101426690816879,
-0.16925927996635437,
-0.17792965471744537,
0.003887619823217392,
0.49818864464759827,
-0.12435244023799896,
-0.01805553212761879,
-0.11482825875282288,
-0.1485932469367981,
0.166488915681839,
-0.47040611505508423,
-0.16016298532485962,
-0.15975648164749146,
0.4838778078556061,
0.17781603336334229,
0.03436843305826187,
0.05801427736878395,
-0.2219776213169098,
0.013550552539527416,
-0.05450733006000519,
0.03849096596240997,
0.6338202357292175,
-0.4302011728286743,
0.14798606932163239,
0.026061709970235825,
-0.10047561675310135,
-0.06649613380432129,
-0.08406519144773483,
-0.006119045428931713,
-0.3888671100139618,
0.24311815202236176,
-0.30944669246673584,
0.036606475710868835,
-0.26600438356399536,
-0.13297808170318604,
0.10960038006305695,
0.18775686621665955,
0.14078259468078613,
0.25145095586776733,
0.38644394278526306,
0.18210580945014954,
0.30511486530303955,
-0.32284557819366455,
0.22181056439876556,
-0.2443428784608841,
-0.11928889900445938,
-0.04407389461994171,
-0.08466437458992004,
0.04949904605746269,
0.3295775353908539,
0.32801491022109985,
-0.11582422256469727,
-0.043828584253787994,
-0.1668727695941925,
0.2368198186159134,
-0.026421912014484406,
0.03099931590259075,
-0.2585935890674591,
0.28684473037719727,
0.11232449859380722,
-0.3598533272743225,
0.2251686006784439,
0.24257713556289673,
0.3989662528038025,
-0.24110397696495056,
0.12478333711624146,
-0.35504525899887085,
-0.25183868408203125,
0.148078054189682,
-0.014269680716097355,
-0.18318051099777222,
-0.0969630628824234,
-0.42974671721458435,
0.21908219158649445,
0.40135160088539124,
-0.2894100844860077,
0.046061355620622635,
0.016729483380913734,
-0.45551249384880066,
-0.1271669864654541,
0.2183413803577423,
0.39054983854293823,
-0.18444496393203735,
-0.0037568993866443634,
0.08714383840560913,
0.4355635344982147,
0.04852448031306267,
0.6233546733856201,
-0.14133717119693756,
0.02243870496749878,
-0.3221298158168793,
-0.21304845809936523,
-0.03465304523706436,
-0.5695789456367493,
-0.7795038819313049,
0.015956582501530647,
0.0507364496588707,
0.2829301655292511,
0.3464263677597046,
0.18545810878276825,
0.0370451956987381,
-0.11738628149032593,
-0.12995216250419617,
0.21605753898620605,
-0.004505498334765434,
-0.05586417764425278,
-0.32315710186958313,
-0.5304924249649048,
0.28534650802612305,
-0.11478026211261749,
0.046649735420942307,
0.10060334950685501,
-0.28222277760505676,
0.0011675544083118439,
0.19732579588890076,
-0.03163799270987511,
0.2541683316230774,
0.3844377398490906,
0.2930670976638794,
-0.3115617632865906,
-0.06635883450508118,
0.004258204251527786,
-0.45750558376312256,
0.19509512186050415,
0.1783725619316101,
-0.37532052397727966,
0.12458311021327972,
-0.10039153695106506,
0.014406437054276466,
-0.22644612193107605,
-0.13395214080810547,
-0.21682706475257874,
-0.1374632716178894,
-0.03394453227519989,
0.40037795901298523,
-0.17632855474948883,
-0.2991099953651428,
0.340055376291275,
0.0025749634951353073,
-0.040632400661706924,
-0.3259866237640381,
-0.0154319042339921,
0.14475584030151367,
-0.01706879585981369,
-0.25984036922454834,
0.1888260841369629,
0.06481921672821045,
-0.03552816063165665,
0.036864273250103,
0.2335701286792755,
0.02266818843781948,
0.3187163472175598,
0.3493313491344452,
0.3796342611312866,
0.21287024021148682,
-0.09152288734912872,
0.2820817828178406,
0.2902061343193054,
-0.0620255284011364,
0.05246187746524811,
-0.3751494288444519,
0.2003803253173828,
0.07106508314609528,
0.19506141543388367,
-0.1139809861779213,
-0.23688280582427979,
0.2514113485813141,
0.13606081902980804,
0.0944540947675705,
-0.12162674963474274,
0.2244887351989746,
0.0017589740455150604,
0.39250901341438293,
0.047658421099185944,
-0.04161134362220764,
0.2306874394416809,
0.38178184628486633,
0.23128202557563782,
0.07951179146766663,
0.3927406668663025,
-0.12577730417251587,
-0.2583569884300232,
0.10781519114971161,
0.34005117416381836,
0.5201392769813538,
0.1659969985485077,
0.19271165132522583,
-0.0825788602232933,
0.03340732306241989,
-0.024867122992873192,
0.14059418439865112,
-0.2922542095184326,
-0.1662440299987793,
0.09999160468578339,
0.17856784164905548,
-0.1703333556652069,
-0.1151011660695076,
0.20650918781757355,
-0.007210379000753164,
0.03747037053108215,
-0.12302879989147186,
0.2915503978729248,
-0.005188021808862686,
0.0669611245393753,
-0.3004227876663208,
0.20180469751358032,
-0.40097737312316895,
-0.006392760202288628,
0.13575682044029236,
0.5235962867736816,
0.09591205418109894,
0.02317565307021141,
-0.1968858540058136,
0.7337726354598999,
-0.07811559736728668,
-0.25689834356307983,
0.08064925670623779,
-0.01200873777270317,
-0.18147912621498108,
-0.1487005054950714,
0.3093962073326111,
-0.5017914175987244,
0.09717801958322525,
0.17247378826141357,
-0.08517388254404068,
-0.29793813824653625,
0.10572011023759842,
-0.07112856209278107,
0.17247402667999268,
0.026217442005872726,
-0.30232763290405273,
0.317168653011322,
0.008635763078927994,
-0.09089339524507523,
-0.08609148859977722,
-0.1090204119682312,
-0.08055045455694199,
-0.11614379286766052,
0.050007980316877365,
0.40381401777267456,
0.14031663537025452,
0.038803208619356155,
-0.26064878702163696,
-0.23034796118736267,
0.27583909034729004,
-0.15369391441345215,
-0.04329405725002289,
0.08113981783390045,
0.011299253441393375,
-0.13151556253433228,
-0.12341928482055664,
-0.28817564249038696,
-0.25257575511932373,
-0.7670420408248901,
0.31757599115371704,
0.06598077714443207,
-0.07368800044059753,
0.1482885479927063,
0.22149960696697235,
0.35197320580482483,
0.1975892037153244,
-0.5262953042984009,
-0.108043372631073,
-0.19273027777671814,
0.2778542935848236,
-0.2042677253484726,
-0.2437511831521988,
0.3360216021537781,
-0.12538683414459229,
0.19100773334503174,
0.043910980224609375,
-0.1972717046737671,
0.2947354316711426,
0.26082080602645874,
0.34925034642219543,
-0.07572431862354279,
-0.059926122426986694,
0.08637621998786926,
0.9180580377578735,
0.036647386848926544,
0.11798833310604095,
0.2343277782201767,
0.2871667146682739,
0.4486355185508728,
-0.18619707226753235,
-0.2464790940284729,
0.05115238204598427,
-0.1345730721950531,
-0.2713450789451599,
0.10462518036365509,
0.30827412009239197,
0.14662595093250275,
0.16312922537326813,
-0.06892210245132446,
0.21875309944152832,
-0.2138776183128357,
0.3311525583267212,
-0.14019285142421722,
0.32646575570106506,
0.02809758111834526,
0.08923833817243576,
-0.3383791446685791,
-0.22780507802963257,
0.003012934699654579,
0.12780237197875977,
0.38505539298057556,
0.2612074613571167,
-0.278920441865921,
-0.2433251291513443,
-0.4827181100845337,
0.19565506279468536,
-0.03849378228187561,
0.04034073278307915,
-0.37854546308517456,
-0.2253625988960266,
0.1297903060913086,
0.02033401094377041,
0.9234849810600281,
0.046456389129161835,
0.18212518095970154,
-0.25684911012649536,
-0.09680703282356262,
-0.07583030313253403,
0.002239704132080078,
0.2907460331916809,
-0.21749168634414673,
-0.1467922180891037,
0.4098927080631256,
0.037876106798648834,
-0.08720732480287552,
-0.32016521692276,
0.36399751901626587,
-0.45757317543029785,
0.006599533371627331,
-0.2253919243812561,
-0.05376413092017174,
-0.06250103563070297,
0.15161985158920288,
0.13378913700580597,
0.12305901199579239,
0.09344186633825302,
0.13201020658016205,
-0.17027154564857483,
-0.04276682436466217,
-0.055593833327293396,
0.020094752311706543,
0.5271499156951904,
0.11927302181720734,
0.04087485000491142,
0.23633010685443878,
0.2522953748703003,
0.1998601108789444,
0.2740607261657715,
0.09328655898571014,
-0.02580278366804123,
-0.021449565887451172,
0.05113622173666954,
0.11866383254528046,
0.4327239990234375,
-0.22887352108955383,
0.2974848449230194,
0.09995876252651215,
0.1264849603176117,
-0.7642993330955505,
0.07686605304479599,
0.2269214391708374,
0.3894956707954407,
-0.047136250883340836,
-0.38556966185569763,
0.3176097571849823,
0.016765914857387543,
-0.014085724949836731,
0.24370910227298737,
0.11867402493953705,
-0.5224876999855042,
0.0029739029705524445,
0.016698390245437622,
1.0220948457717896,
-0.00527258962392807,
0.5250904560089111,
0.010606419295072556,
0.08383141458034515,
0.40280935168266296,
-0.5466371774673462,
0.3585670590400696,
0.05777125433087349,
-0.25588658452033997,
-0.035482365638017654,
0.0891319066286087,
-0.008490316569805145,
-0.07289201021194458,
-0.15172544121742249,
0.38956859707832336,
-0.09464855492115021,
0.21417900919914246,
-0.41838958859443665,
-0.08630818128585815,
-0.011762958019971848,
-0.22539019584655762,
-0.5132781267166138,
0.05454861372709274,
-0.27421241998672485,
0.10352687537670135,
-0.050834644585847855,
0.031906452029943466,
0.16359293460845947,
-0.02100258320569992,
-0.3381103575229645,
-0.20945331454277039,
-0.2528519928455353,
-0.02589675411581993,
-0.0363922081887722,
-0.3285651206970215,
-0.016561277210712433,
0.2719007432460785,
0.33186018466949463,
0.09051409363746643,
-0.36411383748054504,
0.11960239708423615,
-0.1798488199710846,
0.06281237304210663,
-0.2151515781879425,
-0.09834614396095276,
-0.16750012338161469,
-0.05480187386274338,
0.017498470842838287,
0.0707685649394989,
0.03378552198410034,
-0.4108774662017822,
0.017511457204818726,
0.03225738927721977,
-0.13307398557662964,
-0.09009605646133423,
-0.20876924693584442,
0.14244331419467926,
0.03193799778819084,
-0.06901681423187256,
0.04544614255428314,
0.2176920771598816,
-0.3403005003929138,
0.12044008076190948,
-0.21364612877368927,
-0.24093225598335266,
-0.03804897889494896,
0.47746706008911133,
0.02896040305495262,
-0.292124480009079,
0.522064208984375,
-0.01141524687409401,
0.053945690393447876,
-0.18834984302520752,
0.14020150899887085,
0.17015084624290466,
-0.1835627555847168,
-0.05351308360695839,
0.02811463735997677,
-0.2855754494667053,
-0.20573565363883972,
-0.20290228724479675,
0.49248820543289185,
-0.2519826292991638,
-0.3050518035888672,
-0.14498859643936157,
-0.4076456129550934,
-0.02088971436023712,
-0.27629202604293823,
-0.025776546448469162,
-0.09619081020355225,
-0.29876425862312317,
-0.019885148853063583,
0.19164277613162994,
-0.14317087829113007,
0.014227570034563541,
-0.00012236274778842926,
-0.16733630001544952,
0.10388116538524628,
0.02745595946907997,
0.48546332120895386,
-0.06346917152404785,
-0.1909932792186737,
-0.15952421724796295,
-0.0006296820938587189,
-0.0392892025411129,
-0.06181425228714943,
0.1540684551000595,
-0.16109290719032288,
-0.01241874136030674,
-0.018556632101535797,
-0.22995229065418243,
0.044407919049263,
-0.32965418696403503,
0.1573793590068817,
0.21430182456970215,
0.2089235931634903,
-0.021631192415952682,
-0.3265135586261749,
0.0002108365297317505,
0.003243744373321533,
0.11961552500724792,
0.28255966305732727,
-0.10582298040390015,
0.0820925161242485,
0.1894635558128357,
-0.01951720006763935,
-0.07181376218795776,
-0.1082029864192009,
0.24002867937088013,
0.03034607321023941,
-0.10756031423807144,
0.002385079860687256,
-0.03746490925550461,
-0.014393163844943047,
0.3485839366912842,
0.13812561333179474,
0.19012419879436493,
-0.03175094723701477,
-0.010206262581050396,
0.32908955216407776,
0.03244329243898392,
-0.06292299181222916,
-0.30293285846710205,
0.13967721164226532,
-0.10798893123865128,
-0.09744841605424881,
0.35205894708633423,
0.02701718732714653,
-0.21388724446296692,
0.08610179275274277,
0.14734339714050293,
0.4955656826496124,
-0.29766786098480225,
0.3628249168395996,
0.19309760630130768,
0.21265862882137299,
0.10369639098644257,
0.29051053524017334,
0.32934558391571045,
0.23671117424964905,
0.5512287020683289,
-0.03360681235790253,
0.1553395688533783,
0.28774183988571167,
0.00977158173918724,
-0.2069416046142578,
-0.3993995487689972,
-0.4862818121910095,
0.2589118182659149,
-0.21330970525741577,
0.22736063599586487,
-0.13360947370529175,
0.1467946469783783,
-0.04144874960184097,
-0.6776145100593567,
-0.3064131736755371,
-0.07123371958732605,
-0.24339675903320312,
-0.34788915514945984,
0.28027915954589844,
-0.05674406513571739,
0.28443247079849243,
0.2872742712497711,
0.07969255745410919,
-0.23314879834651947,
0.48158228397369385,
-0.05466647446155548,
-0.018018566071987152,
0.17536063492298126,
0.0876787006855011,
0.2863031327724457,
0.11032859981060028,
-0.15479904413223267,
0.2614777684211731,
-0.01742088794708252,
-0.12979193031787872,
0.027695059776306152,
0.1919705718755722,
0.2432429939508438,
0.10014544427394867,
-0.042350657284259796,
0.20729444921016693,
0.08171705901622772,
0.17870603501796722,
-0.3429941236972809,
0.15291425585746765,
-0.1525605320930481,
0.07531070709228516,
0.03375200182199478,
-0.031990282237529755,
0.11957424879074097,
0.2038121372461319,
-0.11085817217826843,
0.23483137786388397,
-0.46391046047210693,
-0.04969941824674606,
-0.2446766495704651,
0.0765303298830986,
-0.2179708480834961,
0.28006765246391296,
-0.2816492021083832,
0.19422633945941925,
0.5648451447486877,
-0.0442584864795208,
0.3497544229030609,
0.1905336081981659,
-0.011787880212068558,
-0.011269565671682358,
0.7627530694007874,
0.10878625512123108,
-0.30315911769866943,
-0.3050417900085449,
0.0308539941906929,
-0.4886031150817871,
0.0807436853647232,
-0.31528106331825256,
0.2396731972694397,
-0.20807833969593048,
0.10565023869276047,
0.06698715686798096,
-0.018933743238449097,
-0.07729984819889069,
-0.09755311906337738,
0.051275067031383514,
0.04653194546699524,
-0.345073401927948,
-0.09465132653713226,
0.17580880224704742,
0.22806516289710999,
0.08666227012872696,
-0.39954739809036255,
0.21151995658874512,
0.1642501801252365,
-0.15866413712501526,
0.4196970462799072,
0.1869819462299347,
-0.49183788895606995,
0.25795865058898926,
-0.12856702506542206,
0.19052425026893616,
0.11105123907327652,
0.23452681303024292,
0.03124156780540943,
-0.48960191011428833,
-0.0348949059844017,
-0.23273228108882904,
-0.04416864365339279,
-0.12012314796447754,
0.20552435517311096,
-0.5847105383872986,
0.03876578062772751,
-0.3769589960575104,
0.20367936789989471,
0.3197949528694153,
-0.16381318867206573,
0.09265603870153427,
-0.01253150962293148,
0.18605726957321167,
0.09033247828483582,
0.4170553684234619,
0.41981983184814453,
-0.06857188045978546,
0.06421518325805664,
-0.34390366077423096,
0.1352635622024536,
0.22307345271110535,
-0.34712082147598267,
-0.3600994646549225,
0.25707998871803284,
0.39462172985076904,
0.5234392285346985,
-0.3522127866744995,
-0.345950722694397,
0.11524482816457748,
0.033307429403066635,
0.0821378231048584,
-0.1448383927345276,
0.20114384591579437,
-0.28637591004371643,
-0.25332850217819214,
0.1424974948167801,
0.3100414276123047,
0.30020642280578613,
-0.16755442321300507,
0.2714891731739044,
-0.3209959864616394
] |
https://github.com/huggingface/datasets/issues/2585 | sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index | Hi @mmajurski, thanks for reporting this issue.
Indeed this misalignment arises because the source dataset context field contains leading blank spaces (and these are counted within the answer_start), while our datasets loading script removes these leading blank spaces.
I'm going to fix our script so that all leading blank spaces in the source dataset are kept, and there is no misalignment between the answer text and the answer_start within the context. | ## Describe the bug
The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start'].
For example:
id = '56d1f453e7d4791d009025bd'
answers = {'text': ['Pure Land'], 'answer_start': [146]}
However the actual text in context at location 146 is 'ure Land,'
Which is an off-by-one error from the correct answer.
## Steps to reproduce the bug
```python
import datasets
def check_context_answer_alignment(example):
for a_idx in range(len(example['answers']['text'])):
# check raw dataset for answer consistency between context and answer
answer_text = example['answers']['text'][a_idx]
a_st_idx = example['answers']['answer_start'][a_idx]
a_end_idx = a_st_idx + len(example['answers']['text'][a_idx])
answer_text_from_context = example['context'][a_st_idx:a_end_idx]
if answer_text != answer_text_from_context:
#print(example['id'])
return False
return True
dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True)
start_len = len(dataset)
dataset = dataset.filter(check_context_answer_alignment,
num_proc=1,
keep_in_memory=True)
end_len = len(dataset)
print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len))
```
## Expected results
This code should result in 0 rows being filtered out from the dataset.
## Actual results
This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location.
This code will reproduce the problem and produce the following count:
"258 instances contain mis-alignment between the answer text and answer index."
## Environment info
Steps to rebuilt the Conda environment:
```
# create a virtual environment to stuff all these packages into
conda create -n round8 python=3.8 -y
# activate the virtual environment
conda activate round8
# install pytorch (best done through conda to handle cuda dependencies)
conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install jsonpickle transformers datasets matplotlib
```
OS: Ubuntu 20.04
Python 3.8
Result of `conda env export`:
```
name: round8
channels:
- pytorch-lts
- nvidia
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py38h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2021.5.25=h06a4308_1
- certifi=2021.5.30=py38h06a4308_0
- cffi=1.14.5=py38h261ae71_0
- chardet=4.0.0=py38h06a4308_1003
- cryptography=3.4.7=py38hd23ed53_0
- cudatoolkit=11.1.74=h6bb024c_0
- ffmpeg=4.2.2=h20bf706_0
- freetype=2.10.4=h5ab3b9f_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=2.10=pyhd3eb1b0_0
- intel-openmp=2021.2.0=h06a4308_610
- jpeg=9b=h024ee3a_2
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libidn2=2.3.1=h27cfd23_0
- libopus=1.3.1=h7b6447c_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.3.0=hd4cf53a_17
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h85742a9_0
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libvpx=1.7.0=h439df22_0
- libwebp-base=1.2.0=h27cfd23_0
- lz4-c=1.9.3=h2531618_0
- mkl=2021.2.0=h06a4308_296
- mkl-service=2.3.0=py38h27cfd23_1
- mkl_fft=1.3.0=py38h42c9631_2
- mkl_random=1.2.1=py38ha9443f7_2
- ncurses=6.2=he6710b0_1
- nettle=3.7.3=hbbd107a_1
- ninja=1.10.2=hff7bd54_1
- numpy=1.20.2=py38h2d18471_0
- numpy-base=1.20.2=py38hfae3a4d_0
- olefile=0.46=py_0
- openh264=2.1.0=hd408876_0
- openssl=1.1.1k=h27cfd23_0
- pillow=8.2.0=py38he98fc37_0
- pip=21.1.2=py38h06a4308_0
- pycparser=2.20=py_2
- pyopenssl=20.0.1=pyhd3eb1b0_1
- pysocks=1.7.1=py38h06a4308_0
- python=3.8.10=h12debd9_8
- pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0
- readline=8.1=h27cfd23_0
- requests=2.25.1=pyhd3eb1b0_0
- setuptools=52.0.0=py38h06a4308_0
- six=1.16.0=pyhd3eb1b0_0
- sqlite=3.35.4=hdfb4753_0
- tk=8.6.10=hbc83047_0
- torchtext=0.9.1=py38
- torchvision=0.9.1=py38_cu111
- typing_extensions=3.7.4.3=pyha847dfd_0
- urllib3=1.26.4=pyhd3eb1b0_0
- wheel=0.36.2=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- zstd=1.4.9=haebb681_0
- pip:
- click==8.0.1
- cycler==0.10.0
- datasets==1.8.0
- dill==0.3.4
- filelock==3.0.12
- fsspec==2021.6.0
- huggingface-hub==0.0.8
- joblib==1.0.1
- jsonpickle==2.0.0
- kiwisolver==1.3.1
- matplotlib==3.4.2
- multiprocess==0.70.12.2
- packaging==20.9
- pandas==1.2.4
- pyarrow==3.0.0
- pyparsing==2.4.7
- python-dateutil==2.8.1
- pytz==2021.1
- regex==2021.4.4
- sacremoses==0.0.45
- tokenizers==0.10.3
- tqdm==4.49.0
- transformers==4.6.1
- xxhash==2.0.2
prefix: /home/mmajurski/anaconda3/envs/round8
```
| 71 | sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index
## Describe the bug
The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start'].
For example:
id = '56d1f453e7d4791d009025bd'
answers = {'text': ['Pure Land'], 'answer_start': [146]}
However the actual text in context at location 146 is 'ure Land,'
Which is an off-by-one error from the correct answer.
## Steps to reproduce the bug
```python
import datasets
def check_context_answer_alignment(example):
for a_idx in range(len(example['answers']['text'])):
# check raw dataset for answer consistency between context and answer
answer_text = example['answers']['text'][a_idx]
a_st_idx = example['answers']['answer_start'][a_idx]
a_end_idx = a_st_idx + len(example['answers']['text'][a_idx])
answer_text_from_context = example['context'][a_st_idx:a_end_idx]
if answer_text != answer_text_from_context:
#print(example['id'])
return False
return True
dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True)
start_len = len(dataset)
dataset = dataset.filter(check_context_answer_alignment,
num_proc=1,
keep_in_memory=True)
end_len = len(dataset)
print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len))
```
## Expected results
This code should result in 0 rows being filtered out from the dataset.
## Actual results
This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location.
This code will reproduce the problem and produce the following count:
"258 instances contain mis-alignment between the answer text and answer index."
## Environment info
Steps to rebuilt the Conda environment:
```
# create a virtual environment to stuff all these packages into
conda create -n round8 python=3.8 -y
# activate the virtual environment
conda activate round8
# install pytorch (best done through conda to handle cuda dependencies)
conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install jsonpickle transformers datasets matplotlib
```
OS: Ubuntu 20.04
Python 3.8
Result of `conda env export`:
```
name: round8
channels:
- pytorch-lts
- nvidia
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py38h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2021.5.25=h06a4308_1
- certifi=2021.5.30=py38h06a4308_0
- cffi=1.14.5=py38h261ae71_0
- chardet=4.0.0=py38h06a4308_1003
- cryptography=3.4.7=py38hd23ed53_0
- cudatoolkit=11.1.74=h6bb024c_0
- ffmpeg=4.2.2=h20bf706_0
- freetype=2.10.4=h5ab3b9f_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=2.10=pyhd3eb1b0_0
- intel-openmp=2021.2.0=h06a4308_610
- jpeg=9b=h024ee3a_2
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libidn2=2.3.1=h27cfd23_0
- libopus=1.3.1=h7b6447c_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.3.0=hd4cf53a_17
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h85742a9_0
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libvpx=1.7.0=h439df22_0
- libwebp-base=1.2.0=h27cfd23_0
- lz4-c=1.9.3=h2531618_0
- mkl=2021.2.0=h06a4308_296
- mkl-service=2.3.0=py38h27cfd23_1
- mkl_fft=1.3.0=py38h42c9631_2
- mkl_random=1.2.1=py38ha9443f7_2
- ncurses=6.2=he6710b0_1
- nettle=3.7.3=hbbd107a_1
- ninja=1.10.2=hff7bd54_1
- numpy=1.20.2=py38h2d18471_0
- numpy-base=1.20.2=py38hfae3a4d_0
- olefile=0.46=py_0
- openh264=2.1.0=hd408876_0
- openssl=1.1.1k=h27cfd23_0
- pillow=8.2.0=py38he98fc37_0
- pip=21.1.2=py38h06a4308_0
- pycparser=2.20=py_2
- pyopenssl=20.0.1=pyhd3eb1b0_1
- pysocks=1.7.1=py38h06a4308_0
- python=3.8.10=h12debd9_8
- pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0
- readline=8.1=h27cfd23_0
- requests=2.25.1=pyhd3eb1b0_0
- setuptools=52.0.0=py38h06a4308_0
- six=1.16.0=pyhd3eb1b0_0
- sqlite=3.35.4=hdfb4753_0
- tk=8.6.10=hbc83047_0
- torchtext=0.9.1=py38
- torchvision=0.9.1=py38_cu111
- typing_extensions=3.7.4.3=pyha847dfd_0
- urllib3=1.26.4=pyhd3eb1b0_0
- wheel=0.36.2=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- zstd=1.4.9=haebb681_0
- pip:
- click==8.0.1
- cycler==0.10.0
- datasets==1.8.0
- dill==0.3.4
- filelock==3.0.12
- fsspec==2021.6.0
- huggingface-hub==0.0.8
- joblib==1.0.1
- jsonpickle==2.0.0
- kiwisolver==1.3.1
- matplotlib==3.4.2
- multiprocess==0.70.12.2
- packaging==20.9
- pandas==1.2.4
- pyarrow==3.0.0
- pyparsing==2.4.7
- python-dateutil==2.8.1
- pytz==2021.1
- regex==2021.4.4
- sacremoses==0.0.45
- tokenizers==0.10.3
- tqdm==4.49.0
- transformers==4.6.1
- xxhash==2.0.2
prefix: /home/mmajurski/anaconda3/envs/round8
```
Hi @mmajurski, thanks for reporting this issue.
Indeed this misalignment arises because the source dataset context field contains leading blank spaces (and these are counted within the answer_start), while our datasets loading script removes these leading blank spaces.
I'm going to fix our script so that all leading blank spaces in the source dataset are kept, and there is no misalignment between the answer text and the answer_start within the context. | [
-0.23303036391735077,
-0.3295373022556305,
-0.04410994052886963,
0.37493646144866943,
0.08782248198986053,
-0.07634205371141434,
0.10575644671916962,
0.22790293395519257,
-0.2927470803260803,
0.15778295695781708,
-0.08416327089071274,
0.04506898298859596,
0.3250356614589691,
0.06854546070098877,
-0.09260915964841843,
0.15236420929431915,
0.17563319206237793,
0.010424189269542694,
0.009945422410964966,
-0.1725039780139923,
-0.2248988151550293,
0.29913851618766785,
-0.29803234338760376,
0.030030854046344757,
-0.34256502985954285,
-0.01024857722222805,
0.03642476350069046,
0.11318318545818329,
-0.11750812083482742,
-0.41593921184539795,
0.2125023901462555,
-0.09367842972278595,
0.0077116116881370544,
0.26386380195617676,
-0.00011653106048470363,
-0.17062486708164215,
0.07283779233694077,
-0.09732924401760101,
-0.2682832181453705,
0.0041918158531188965,
-0.04355856403708458,
-0.12169064581394196,
-0.12988999485969543,
-0.10584232211112976,
-0.23903214931488037,
0.27175572514533997,
-0.06732358038425446,
-0.2866252064704895,
0.6096693277359009,
0.24432265758514404,
0.14513708651065826,
0.2883637249469757,
0.010926689952611923,
-0.06473775207996368,
0.17868731915950775,
-0.1235726922750473,
0.07569508254528046,
0.11912718415260315,
0.14563260972499847,
0.10793726146221161,
-0.03469889611005783,
0.4713858366012573,
-0.13435271382331848,
-0.0318916030228138,
-0.0061448439955711365,
0.29044991731643677,
0.2066178321838379,
-0.12783151865005493,
0.09985722601413727,
0.13117466866970062,
0.2598811089992523,
-0.2484472095966339,
-0.42480820417404175,
-0.45694655179977417,
-0.035827863961458206,
-0.12240571528673172,
0.33175063133239746,
0.039454441517591476,
-0.031152252107858658,
0.36478886008262634,
-0.13653257489204407,
0.07102756202220917,
-0.08574996143579483,
0.12714022397994995,
-0.08769184350967407,
0.2383434772491455,
-0.12194901704788208,
0.14922186732292175,
-0.26770415902137756,
-0.1386350691318512,
-0.06311660259962082,
-0.13759848475456238,
-0.10523451864719391,
0.41718554496765137,
-0.5139366984367371,
-0.10134841501712799,
-0.16793853044509888,
0.09079331159591675,
0.2361777126789093,
0.06949412822723389,
-0.06991682946681976,
0.00152498297393322,
0.26592132449150085,
0.06135217472910881,
0.3417295813560486,
0.2773297429084778,
-0.1180533692240715,
0.255628764629364,
0.10205723345279694,
0.14744628965854645,
0.04146390035748482,
0.10346745699644089,
0.19961701333522797,
-0.18415701389312744,
-0.10824625194072723,
-0.15475398302078247,
0.1684667021036148,
-0.18874835968017578,
-0.5222852230072021,
0.4338446855545044,
-0.6319305896759033,
0.27567148208618164,
-0.02143532782793045,
0.34829723834991455,
-0.22168442606925964,
0.2669161856174469,
0.3325083255767822,
0.24428404867649078,
-0.0650031641125679,
-0.18516787886619568,
-0.13308459520339966,
-0.09697970747947693,
-0.014406111091375351,
-0.034458741545677185,
0.0072183385491371155,
-0.12937356531620026,
0.22713059186935425,
0.29610559344291687,
0.21281930804252625,
-0.22059281170368195,
-0.3132040202617645,
-0.16487348079681396,
0.141058087348938,
0.03068544901907444,
0.02710527554154396,
0.18765470385551453,
0.18730071187019348,
-0.2884292006492615,
0.07319527119398117,
0.09300702810287476,
-0.23830613493919373,
0.07687297463417053,
-0.09920461475849152,
0.22451996803283691,
-0.16600331664085388,
-0.05642576515674591,
0.04659925773739815,
0.24566388130187988,
0.29665881395339966,
-0.2863123118877411,
0.26838037371635437,
-0.20382587611675262,
-0.3300083875656128,
-0.08812463283538818,
0.3650224208831787,
0.29203739762306213,
-0.19854560494422913,
-0.06592586636543274,
-0.05613969638943672,
0.15631738305091858,
0.026587538421154022,
0.23752611875534058,
0.27301231026649475,
0.2942626178264618,
-0.4212450385093689,
0.26740574836730957,
0.10373447090387344,
-0.8540113568305969,
-0.5590245127677917,
-0.17422010004520416,
-0.11635041236877441,
0.22510956227779388,
-0.10361617058515549,
0.07286020368337631,
0.43427857756614685,
0.15434370934963226,
0.27352750301361084,
0.5391802787780762,
0.06792531162500381,
0.11893708258867264,
-0.37401819229125977,
0.04329170286655426,
-0.0926683098077774,
0.12352597713470459,
-0.24775774776935577,
-0.17437687516212463,
0.053098537027835846,
-0.18347401916980743,
0.1845177561044693,
0.1049058809876442,
0.07000723481178284,
0.24240818619728088,
0.3292448818683624,
0.12075729668140411,
0.1795458346605301,
-0.5024951696395874,
-0.48402833938598633,
0.0933743342757225,
-0.09920433163642883,
0.05972101539373398,
-0.06249655783176422,
-0.13606679439544678,
-0.3975333571434021,
-0.03617621585726738,
-0.35202881693840027,
-0.30077165365219116,
0.09093007445335388,
0.008328951895236969,
0.17425690591335297,
0.11252342164516449,
-0.1105436235666275,
0.6274502277374268,
-0.20270943641662598,
0.257442444562912,
-0.06485430896282196,
0.18380345404148102,
-0.03699234873056412,
0.019787650555372238,
0.025743141770362854,
0.42654532194137573,
-0.03663458675146103,
0.08658803254365921,
-0.24530068039894104,
0.5439851880073547,
0.23543134331703186,
0.19751770794391632,
-0.2265355885028839,
-0.0887756496667862,
0.22654515504837036,
-0.4291591942310333,
-0.2648877799510956,
0.2957112491130829,
0.15490610897541046,
0.11389229446649551,
-0.31173208355903625,
0.5959978699684143,
0.06861237436532974,
0.08495965600013733,
-0.22454440593719482,
-0.0018044821918010712,
0.2800178825855255,
-0.12427258491516113,
-0.11357630789279938,
-0.23090051114559174,
0.2905324399471283,
0.14321236312389374,
0.5214194059371948,
0.10394519567489624,
-0.3891158103942871,
0.10012958198785782,
0.26721617579460144,
-0.16954681277275085,
0.07944507896900177,
0.11687684059143066,
0.04127614200115204,
-0.08224336057901382,
0.024764470756053925,
0.22095398604869843,
0.28996503353118896,
0.20445309579372406,
-0.340902179479599,
0.319985955953598,
-0.0366528145968914,
0.14616557955741882,
0.21443918347358704,
-0.17298512160778046,
-0.04003690183162689,
0.4994865655899048,
0.37250739336013794,
0.24275816977024078,
-0.18430739641189575,
0.17241865396499634,
-0.39707863330841064,
0.15252381563186646,
-0.5550441145896912,
-0.02135195955634117,
-0.14968430995941162,
-0.07359020411968231,
-0.19930103421211243,
-0.01921437308192253,
-0.2774988114833832,
-0.11243729293346405,
0.24843354523181915,
0.1559062898159027,
-0.0537630170583725,
0.27692654728889465,
0.0002659335732460022,
0.4594172239303589,
0.09787759184837341,
-0.19885390996932983,
-0.05862334743142128,
-0.06503954529762268,
-0.1624031662940979,
-0.009098300710320473,
0.015626464039087296,
0.1998782902956009,
0.14580588042736053,
-0.48266419768333435,
-0.3008008599281311,
-0.2854563295841217,
-0.34530606865882874,
0.21016888320446014,
-0.06863559782505035,
0.36132118105888367,
0.16641613841056824,
-0.01869860291481018,
-0.3620549440383911,
-0.2030526101589203,
0.1645021140575409,
-0.02913501486182213,
-0.47738710045814514,
-0.05247557908296585,
0.055691901594400406,
-0.20533210039138794,
-0.04128805547952652,
-0.45631781220436096,
-0.09893925487995148,
-0.27093636989593506,
0.016228143125772476,
-0.1817270964384079,
0.0823792964220047,
0.24365678429603577,
-0.1389109194278717,
0.03481035679578781,
-0.2918562591075897,
0.12605929374694824,
-0.5039401054382324,
-0.04728863388299942,
0.09391418099403381,
0.04301907867193222,
-0.3436333239078522,
-0.288729190826416,
-0.23202405869960785,
-0.1749057173728943,
-0.035087812691926956,
-0.13758473098278046,
-0.22584138810634613,
-0.1793825626373291,
0.2166626751422882,
-0.22682687640190125,
0.24351945519447327,
0.22654618322849274,
-0.18087412416934967,
0.08801054209470749,
-0.22812429070472717,
-0.44549793004989624,
0.1523832082748413,
0.3971559405326843,
0.2353450357913971,
-0.11179601401090622,
0.3300129175186157,
-0.024653742089867592,
0.6546522378921509,
0.40532436966896057,
0.22661742568016052,
0.10227067768573761,
-0.2168855369091034,
0.3332626223564148,
-0.20545247197151184,
-0.21879447996616364,
0.3126906752586365,
0.12877357006072998,
-0.3271474242210388,
0.32847970724105835,
0.039798080921173096,
0.17491227388381958,
0.015510641038417816,
0.19428449869155884,
-0.5804231762886047,
-0.18751150369644165,
-0.2166331559419632,
0.04989321902394295,
0.16470575332641602,
0.09028758108615875,
-0.07233982533216476,
0.14949627220630646,
-0.10614410042762756,
-0.052444688975811005,
0.1069309338927269,
-0.044245682656764984,
0.23647044599056244,
-0.8369113802909851,
-0.2997898757457733,
0.043308157473802567,
0.22586292028427124,
0.39950719475746155,
0.38158172369003296,
-0.013444602489471436,
-0.09399233013391495,
0.19683769345283508,
0.09238265454769135,
0.7246228456497192,
0.015939999371767044,
0.08295279741287231,
-0.2899780869483948,
0.18532736599445343,
-0.43817609548568726,
-0.23490533232688904,
-0.1948947161436081,
0.13776947557926178,
0.2811792492866516,
0.16984790563583374,
-0.22085040807724,
-0.04087090492248535,
0.191101536154747,
0.06463173776865005,
-0.09848341345787048,
-0.00939030572772026,
-0.2653487026691437,
-0.14907371997833252,
-0.34381136298179626,
0.28513258695602417,
0.4409756660461426,
0.2931806743144989,
0.4785468578338623,
-0.06088583916425705,
0.19115667045116425,
0.15684127807617188,
-0.11838892102241516,
0.24441580474376678,
0.5145236253738403,
-0.13947437703609467,
0.02023167535662651,
0.20985352993011475,
-0.047285035252571106,
0.035084545612335205,
0.5318820476531982,
-0.09855465590953827,
-0.32096433639526367,
-0.03559402376413345,
-0.04234978184103966,
0.3858829736709595,
0.34095650911331177,
0.027156241238117218,
0.007218688726425171,
-0.042327553033828735,
0.17052337527275085,
-0.2394709289073944,
-0.11459418386220932,
0.38380736112594604,
0.5305989384651184,
-0.07233093678951263,
-0.24324612319469452,
0.22699499130249023,
-0.14598920941352844,
0.03043893724679947,
0.09295648336410522,
0.5290960073471069,
-0.2636905014514923,
0.45205360651016235,
-0.10958700627088547,
1.0020312070846558,
0.32818931341171265,
0.11342546343803406,
0.4978843927383423,
-0.04720137268304825,
0.35786172747612,
-0.07541034370660782,
0.2748134732246399,
-0.4139470160007477,
0.311021625995636,
-0.03776523098349571,
-0.11987386643886566,
-0.11781486123800278,
-0.16986827552318573,
-0.22657044231891632,
0.2860627770423889,
-0.15264682471752167,
0.23116379976272583,
-0.06266183406114578,
-0.00852230191230774,
-0.203414648771286,
-0.033529944717884064,
-0.4369693994522095,
0.09323049336671829,
0.014677368104457855,
0.2703949809074402,
-0.1487714648246765,
0.17500093579292297,
-0.33909866213798523,
-0.37423354387283325,
-0.6190105676651001,
-0.02997484616935253,
-0.4763568043708801,
0.004797124303877354,
0.44992077350616455,
-0.08977561444044113,
-0.036416590213775635,
0.4331655204296112,
0.30170688033103943,
0.06793445348739624,
-0.036910317838191986,
0.18586263060569763,
-0.0765424594283104,
0.37628409266471863,
0.4295192360877991,
-0.05190686881542206,
0.15741020441055298,
-0.037490054965019226,
-0.39921027421951294,
-0.1864612102508545,
0.014257452450692654,
-0.21475471556186676,
0.07059361040592194,
0.1132238507270813,
0.011674962937831879,
-0.18065595626831055,
-0.37972292304039,
-0.12185674905776978,
0.288859099149704,
-0.21521423757076263,
0.12182240188121796,
-0.10446527600288391,
-0.18339256942272186,
0.16808897256851196,
0.23020873963832855,
-0.38283222913742065,
-0.029356002807617188,
0.45915666222572327,
-0.24474135041236877,
0.044634200632572174,
0.43615877628326416,
0.012649577111005783,
-0.10209202766418457,
-0.12105528265237808,
0.18574416637420654,
-0.08986609429121017,
-0.11957909166812897,
0.020980341359972954,
-0.14428602159023285,
-0.3595213294029236,
-0.21373805403709412,
0.33839958906173706,
0.38391655683517456,
-0.11619099229574203,
-0.0502924770116806,
-0.695736825466156,
-0.02355232462286949,
0.253073126077652,
0.04387805983424187,
-0.04511820152401924,
0.36282968521118164,
0.08016426861286163,
-0.17540055513381958,
-0.07035685330629349,
-0.3165866732597351,
-0.0696844533085823,
-0.2544344663619995,
0.13788768649101257,
-0.0004854295402765274,
-0.05490417033433914,
0.22773674130439758,
-0.25084275007247925,
0.09738291800022125,
-0.00252600759267807,
-0.1287059187889099,
-0.21573993563652039,
-0.10593652725219727,
0.15164804458618164,
0.09583654254674911,
-0.23682306706905365,
-0.1105898767709732,
-0.07676562666893005,
0.1523081362247467,
-0.19047704339027405,
0.12856537103652954,
0.49132031202316284,
0.15181627869606018,
0.19984982907772064,
-0.5185196995735168,
-0.1265326738357544,
0.030970588326454163,
0.023483291268348694,
-0.0831899642944336,
-0.3460221290588379,
0.11455812305212021,
0.2857738733291626,
-0.25416359305381775,
-0.0568227618932724,
0.2504388689994812,
0.19712668657302856,
0.1563536673784256,
0.10799165815114975,
0.1915990114212036,
-0.09822008013725281,
-0.019018370658159256,
0.18339228630065918,
0.22719524800777435,
0.3787540793418884,
-0.4000135362148285,
-0.045251235365867615,
-0.0354740209877491,
0.19838643074035645,
-0.3783814311027527,
-0.0351046659052372,
0.21720555424690247,
-0.18826891481876373,
-0.020509112626314163,
0.2156234085559845,
0.1364917755126953,
-0.2648780345916748,
-0.06507198512554169,
0.23251593112945557,
0.5807170271873474,
-0.08882857114076614,
0.011357201263308525,
0.14765222370624542,
0.027406763285398483,
0.21495230495929718,
0.31767866015434265,
-0.11529581248760223,
0.20218367874622345,
0.1865382194519043,
-0.15203526616096497,
0.04398301988840103,
-0.20522570610046387,
0.15206308662891388,
0.1444452404975891,
0.04668634757399559,
0.38284751772880554,
0.3497185707092285,
-0.4396217465400696,
0.011120222508907318,
0.1317221224308014,
0.4576253592967987,
-0.11604800075292587,
-0.23841439187526703,
-0.2936193346977234,
-0.08832341432571411,
-0.23818618059158325,
-0.05786338448524475,
-0.0807044580578804,
-0.1052347868680954,
-0.1390683501958847,
-0.09896555542945862,
-0.06288065016269684,
-0.2211407572031021,
0.15798020362854004,
0.16819226741790771,
-0.2182735651731491,
-0.349271297454834,
-0.27466264367103577,
0.2447262406349182,
0.18391716480255127,
-0.17134593427181244,
0.3410632014274597,
0.0664089098572731,
0.009408418089151382,
0.30501213669776917,
0.5498549342155457,
0.5111482739448547,
0.2144206464290619,
-0.15680396556854248,
0.19623056054115295,
-0.17397579550743103,
-0.02778686210513115,
0.011249683797359467,
0.11021431535482407,
-0.2986118495464325,
-0.494800865650177,
0.09193763136863708,
0.21478725969791412,
-0.18767230212688446,
0.013915248215198517,
0.06137039139866829,
0.11291712522506714,
-0.3813638687133789,
-0.22478261590003967,
-0.331112265586853,
0.3151141405105591,
-0.18177661299705505,
0.1097346767783165,
-0.14958339929580688,
-0.025889039039611816,
0.14152708649635315,
-0.16162525117397308,
0.202558696269989,
0.07868475466966629,
0.0715651586651802,
0.19094333052635193,
0.04452779144048691,
0.6243493556976318,
-0.20134130120277405,
-0.06818998605012894,
-0.05787886306643486,
-0.5805673003196716,
0.1312071830034256,
0.031045693904161453,
-0.1154964342713356,
0.2015237808227539,
0.21466360986232758,
-0.15989360213279724,
0.22095826268196106,
0.43349266052246094,
0.06170818582177162,
-0.19035233557224274,
0.011297982186079025,
-0.21445517241954803,
0.07673788070678711,
-0.20317529141902924,
0.11044448614120483,
-0.006818236783146858,
-0.2531493306159973,
0.2053179293870926,
0.1481131613254547,
-0.05777216702699661,
0.18853166699409485,
0.15271006524562836,
-0.0800267681479454,
-0.4327373504638672,
-0.12943632900714874,
0.3209768831729889,
0.22017987072467804,
-0.23549482226371765,
0.1969354897737503,
-0.06646378338336945,
-0.16120578348636627,
-0.5237137675285339,
0.14058703184127808,
-0.392633855342865,
0.2938772141933441,
-0.04632290452718735,
-0.3050650656223297,
0.04753218963742256,
0.23760394752025604,
0.35413658618927,
-0.2929821312427521,
-0.4807339310646057,
0.1937253624200821,
-0.15002979338169098,
0.23154783248901367,
-0.08737538754940033,
0.19338387250900269,
-0.08013895153999329,
0.4570735991001129,
-0.33873456716537476,
-0.3580104410648346,
0.32382315397262573,
-0.3490350544452667,
-0.11896289885044098,
0.014101189561188221,
0.3399590849876404,
0.28182539343833923,
-0.14852719008922577,
-0.5053994059562683,
-0.1532173752784729,
0.26604604721069336,
-0.00043537095189094543,
-0.21644216775894165,
0.11160421371459961,
-0.05062929913401604,
-0.058732327073812485,
0.029928836971521378,
0.04772424325346947,
0.3681153357028961,
-0.10838660597801208,
0.2889883816242218,
-0.35079848766326904
] |
https://github.com/huggingface/datasets/issues/2585 | sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index | If you are going to be altering the data cleaning from the source Squad dataset, here is one thing to consider.
There are occasional double spaces separating words which it might be nice to get rid of.
Either way, thank you. | ## Describe the bug
The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start'].
For example:
id = '56d1f453e7d4791d009025bd'
answers = {'text': ['Pure Land'], 'answer_start': [146]}
However the actual text in context at location 146 is 'ure Land,'
Which is an off-by-one error from the correct answer.
## Steps to reproduce the bug
```python
import datasets
def check_context_answer_alignment(example):
for a_idx in range(len(example['answers']['text'])):
# check raw dataset for answer consistency between context and answer
answer_text = example['answers']['text'][a_idx]
a_st_idx = example['answers']['answer_start'][a_idx]
a_end_idx = a_st_idx + len(example['answers']['text'][a_idx])
answer_text_from_context = example['context'][a_st_idx:a_end_idx]
if answer_text != answer_text_from_context:
#print(example['id'])
return False
return True
dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True)
start_len = len(dataset)
dataset = dataset.filter(check_context_answer_alignment,
num_proc=1,
keep_in_memory=True)
end_len = len(dataset)
print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len))
```
## Expected results
This code should result in 0 rows being filtered out from the dataset.
## Actual results
This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location.
This code will reproduce the problem and produce the following count:
"258 instances contain mis-alignment between the answer text and answer index."
## Environment info
Steps to rebuilt the Conda environment:
```
# create a virtual environment to stuff all these packages into
conda create -n round8 python=3.8 -y
# activate the virtual environment
conda activate round8
# install pytorch (best done through conda to handle cuda dependencies)
conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install jsonpickle transformers datasets matplotlib
```
OS: Ubuntu 20.04
Python 3.8
Result of `conda env export`:
```
name: round8
channels:
- pytorch-lts
- nvidia
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py38h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2021.5.25=h06a4308_1
- certifi=2021.5.30=py38h06a4308_0
- cffi=1.14.5=py38h261ae71_0
- chardet=4.0.0=py38h06a4308_1003
- cryptography=3.4.7=py38hd23ed53_0
- cudatoolkit=11.1.74=h6bb024c_0
- ffmpeg=4.2.2=h20bf706_0
- freetype=2.10.4=h5ab3b9f_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=2.10=pyhd3eb1b0_0
- intel-openmp=2021.2.0=h06a4308_610
- jpeg=9b=h024ee3a_2
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libidn2=2.3.1=h27cfd23_0
- libopus=1.3.1=h7b6447c_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.3.0=hd4cf53a_17
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h85742a9_0
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libvpx=1.7.0=h439df22_0
- libwebp-base=1.2.0=h27cfd23_0
- lz4-c=1.9.3=h2531618_0
- mkl=2021.2.0=h06a4308_296
- mkl-service=2.3.0=py38h27cfd23_1
- mkl_fft=1.3.0=py38h42c9631_2
- mkl_random=1.2.1=py38ha9443f7_2
- ncurses=6.2=he6710b0_1
- nettle=3.7.3=hbbd107a_1
- ninja=1.10.2=hff7bd54_1
- numpy=1.20.2=py38h2d18471_0
- numpy-base=1.20.2=py38hfae3a4d_0
- olefile=0.46=py_0
- openh264=2.1.0=hd408876_0
- openssl=1.1.1k=h27cfd23_0
- pillow=8.2.0=py38he98fc37_0
- pip=21.1.2=py38h06a4308_0
- pycparser=2.20=py_2
- pyopenssl=20.0.1=pyhd3eb1b0_1
- pysocks=1.7.1=py38h06a4308_0
- python=3.8.10=h12debd9_8
- pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0
- readline=8.1=h27cfd23_0
- requests=2.25.1=pyhd3eb1b0_0
- setuptools=52.0.0=py38h06a4308_0
- six=1.16.0=pyhd3eb1b0_0
- sqlite=3.35.4=hdfb4753_0
- tk=8.6.10=hbc83047_0
- torchtext=0.9.1=py38
- torchvision=0.9.1=py38_cu111
- typing_extensions=3.7.4.3=pyha847dfd_0
- urllib3=1.26.4=pyhd3eb1b0_0
- wheel=0.36.2=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- zstd=1.4.9=haebb681_0
- pip:
- click==8.0.1
- cycler==0.10.0
- datasets==1.8.0
- dill==0.3.4
- filelock==3.0.12
- fsspec==2021.6.0
- huggingface-hub==0.0.8
- joblib==1.0.1
- jsonpickle==2.0.0
- kiwisolver==1.3.1
- matplotlib==3.4.2
- multiprocess==0.70.12.2
- packaging==20.9
- pandas==1.2.4
- pyarrow==3.0.0
- pyparsing==2.4.7
- python-dateutil==2.8.1
- pytz==2021.1
- regex==2021.4.4
- sacremoses==0.0.45
- tokenizers==0.10.3
- tqdm==4.49.0
- transformers==4.6.1
- xxhash==2.0.2
prefix: /home/mmajurski/anaconda3/envs/round8
```
| 41 | sqaud_v2 dataset contains misalignment between the answer text and the context value at the answer index
## Describe the bug
The built in huggingface squad_v2 dataset that you can access via datasets.load_dataset contains mis-alignment between the answers['text'] and the characters in the context at the location specified by answers['answer_start'].
For example:
id = '56d1f453e7d4791d009025bd'
answers = {'text': ['Pure Land'], 'answer_start': [146]}
However the actual text in context at location 146 is 'ure Land,'
Which is an off-by-one error from the correct answer.
## Steps to reproduce the bug
```python
import datasets
def check_context_answer_alignment(example):
for a_idx in range(len(example['answers']['text'])):
# check raw dataset for answer consistency between context and answer
answer_text = example['answers']['text'][a_idx]
a_st_idx = example['answers']['answer_start'][a_idx]
a_end_idx = a_st_idx + len(example['answers']['text'][a_idx])
answer_text_from_context = example['context'][a_st_idx:a_end_idx]
if answer_text != answer_text_from_context:
#print(example['id'])
return False
return True
dataset = datasets.load_dataset('squad_v2', split='train', keep_in_memory=True)
start_len = len(dataset)
dataset = dataset.filter(check_context_answer_alignment,
num_proc=1,
keep_in_memory=True)
end_len = len(dataset)
print('{} instances contain mis-alignment between the answer text and answer index.'.format(start_len - end_len))
```
## Expected results
This code should result in 0 rows being filtered out from the dataset.
## Actual results
This filter command results in 258 rows being flagged as containing a discrepancy between the text contained within answers['text'] and the text in example['context'] at the answers['answer_start'] location.
This code will reproduce the problem and produce the following count:
"258 instances contain mis-alignment between the answer text and answer index."
## Environment info
Steps to rebuilt the Conda environment:
```
# create a virtual environment to stuff all these packages into
conda create -n round8 python=3.8 -y
# activate the virtual environment
conda activate round8
# install pytorch (best done through conda to handle cuda dependencies)
conda install pytorch torchvision torchtext cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install jsonpickle transformers datasets matplotlib
```
OS: Ubuntu 20.04
Python 3.8
Result of `conda env export`:
```
name: round8
channels:
- pytorch-lts
- nvidia
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py38h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- ca-certificates=2021.5.25=h06a4308_1
- certifi=2021.5.30=py38h06a4308_0
- cffi=1.14.5=py38h261ae71_0
- chardet=4.0.0=py38h06a4308_1003
- cryptography=3.4.7=py38hd23ed53_0
- cudatoolkit=11.1.74=h6bb024c_0
- ffmpeg=4.2.2=h20bf706_0
- freetype=2.10.4=h5ab3b9f_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=2.10=pyhd3eb1b0_0
- intel-openmp=2021.2.0=h06a4308_610
- jpeg=9b=h024ee3a_2
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libidn2=2.3.1=h27cfd23_0
- libopus=1.3.1=h7b6447c_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=9.3.0=hd4cf53a_17
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h85742a9_0
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libvpx=1.7.0=h439df22_0
- libwebp-base=1.2.0=h27cfd23_0
- lz4-c=1.9.3=h2531618_0
- mkl=2021.2.0=h06a4308_296
- mkl-service=2.3.0=py38h27cfd23_1
- mkl_fft=1.3.0=py38h42c9631_2
- mkl_random=1.2.1=py38ha9443f7_2
- ncurses=6.2=he6710b0_1
- nettle=3.7.3=hbbd107a_1
- ninja=1.10.2=hff7bd54_1
- numpy=1.20.2=py38h2d18471_0
- numpy-base=1.20.2=py38hfae3a4d_0
- olefile=0.46=py_0
- openh264=2.1.0=hd408876_0
- openssl=1.1.1k=h27cfd23_0
- pillow=8.2.0=py38he98fc37_0
- pip=21.1.2=py38h06a4308_0
- pycparser=2.20=py_2
- pyopenssl=20.0.1=pyhd3eb1b0_1
- pysocks=1.7.1=py38h06a4308_0
- python=3.8.10=h12debd9_8
- pytorch=1.8.1=py3.8_cuda11.1_cudnn8.0.5_0
- readline=8.1=h27cfd23_0
- requests=2.25.1=pyhd3eb1b0_0
- setuptools=52.0.0=py38h06a4308_0
- six=1.16.0=pyhd3eb1b0_0
- sqlite=3.35.4=hdfb4753_0
- tk=8.6.10=hbc83047_0
- torchtext=0.9.1=py38
- torchvision=0.9.1=py38_cu111
- typing_extensions=3.7.4.3=pyha847dfd_0
- urllib3=1.26.4=pyhd3eb1b0_0
- wheel=0.36.2=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7b6447c_3
- zstd=1.4.9=haebb681_0
- pip:
- click==8.0.1
- cycler==0.10.0
- datasets==1.8.0
- dill==0.3.4
- filelock==3.0.12
- fsspec==2021.6.0
- huggingface-hub==0.0.8
- joblib==1.0.1
- jsonpickle==2.0.0
- kiwisolver==1.3.1
- matplotlib==3.4.2
- multiprocess==0.70.12.2
- packaging==20.9
- pandas==1.2.4
- pyarrow==3.0.0
- pyparsing==2.4.7
- python-dateutil==2.8.1
- pytz==2021.1
- regex==2021.4.4
- sacremoses==0.0.45
- tokenizers==0.10.3
- tqdm==4.49.0
- transformers==4.6.1
- xxhash==2.0.2
prefix: /home/mmajurski/anaconda3/envs/round8
```
If you are going to be altering the data cleaning from the source Squad dataset, here is one thing to consider.
There are occasional double spaces separating words which it might be nice to get rid of.
Either way, thank you. | [
-0.23303036391735077,
-0.3295373022556305,
-0.04410994052886963,
0.37493646144866943,
0.08782248198986053,
-0.07634205371141434,
0.10575644671916962,
0.22790293395519257,
-0.2927470803260803,
0.15778295695781708,
-0.08416327089071274,
0.04506898298859596,
0.3250356614589691,
0.06854546070098877,
-0.09260915964841843,
0.15236420929431915,
0.17563319206237793,
0.010424189269542694,
0.009945422410964966,
-0.1725039780139923,
-0.2248988151550293,
0.29913851618766785,
-0.29803234338760376,
0.030030854046344757,
-0.34256502985954285,
-0.01024857722222805,
0.03642476350069046,
0.11318318545818329,
-0.11750812083482742,
-0.41593921184539795,
0.2125023901462555,
-0.09367842972278595,
0.0077116116881370544,
0.26386380195617676,
-0.00011653106048470363,
-0.17062486708164215,
0.07283779233694077,
-0.09732924401760101,
-0.2682832181453705,
0.0041918158531188965,
-0.04355856403708458,
-0.12169064581394196,
-0.12988999485969543,
-0.10584232211112976,
-0.23903214931488037,
0.27175572514533997,
-0.06732358038425446,
-0.2866252064704895,
0.6096693277359009,
0.24432265758514404,
0.14513708651065826,
0.2883637249469757,
0.010926689952611923,
-0.06473775207996368,
0.17868731915950775,
-0.1235726922750473,
0.07569508254528046,
0.11912718415260315,
0.14563260972499847,
0.10793726146221161,
-0.03469889611005783,
0.4713858366012573,
-0.13435271382331848,
-0.0318916030228138,
-0.0061448439955711365,
0.29044991731643677,
0.2066178321838379,
-0.12783151865005493,
0.09985722601413727,
0.13117466866970062,
0.2598811089992523,
-0.2484472095966339,
-0.42480820417404175,
-0.45694655179977417,
-0.035827863961458206,
-0.12240571528673172,
0.33175063133239746,
0.039454441517591476,
-0.031152252107858658,
0.36478886008262634,
-0.13653257489204407,
0.07102756202220917,
-0.08574996143579483,
0.12714022397994995,
-0.08769184350967407,
0.2383434772491455,
-0.12194901704788208,
0.14922186732292175,
-0.26770415902137756,
-0.1386350691318512,
-0.06311660259962082,
-0.13759848475456238,
-0.10523451864719391,
0.41718554496765137,
-0.5139366984367371,
-0.10134841501712799,
-0.16793853044509888,
0.09079331159591675,
0.2361777126789093,
0.06949412822723389,
-0.06991682946681976,
0.00152498297393322,
0.26592132449150085,
0.06135217472910881,
0.3417295813560486,
0.2773297429084778,
-0.1180533692240715,
0.255628764629364,
0.10205723345279694,
0.14744628965854645,
0.04146390035748482,
0.10346745699644089,
0.19961701333522797,
-0.18415701389312744,
-0.10824625194072723,
-0.15475398302078247,
0.1684667021036148,
-0.18874835968017578,
-0.5222852230072021,
0.4338446855545044,
-0.6319305896759033,
0.27567148208618164,
-0.02143532782793045,
0.34829723834991455,
-0.22168442606925964,
0.2669161856174469,
0.3325083255767822,
0.24428404867649078,
-0.0650031641125679,
-0.18516787886619568,
-0.13308459520339966,
-0.09697970747947693,
-0.014406111091375351,
-0.034458741545677185,
0.0072183385491371155,
-0.12937356531620026,
0.22713059186935425,
0.29610559344291687,
0.21281930804252625,
-0.22059281170368195,
-0.3132040202617645,
-0.16487348079681396,
0.141058087348938,
0.03068544901907444,
0.02710527554154396,
0.18765470385551453,
0.18730071187019348,
-0.2884292006492615,
0.07319527119398117,
0.09300702810287476,
-0.23830613493919373,
0.07687297463417053,
-0.09920461475849152,
0.22451996803283691,
-0.16600331664085388,
-0.05642576515674591,
0.04659925773739815,
0.24566388130187988,
0.29665881395339966,
-0.2863123118877411,
0.26838037371635437,
-0.20382587611675262,
-0.3300083875656128,
-0.08812463283538818,
0.3650224208831787,
0.29203739762306213,
-0.19854560494422913,
-0.06592586636543274,
-0.05613969638943672,
0.15631738305091858,
0.026587538421154022,
0.23752611875534058,
0.27301231026649475,
0.2942626178264618,
-0.4212450385093689,
0.26740574836730957,
0.10373447090387344,
-0.8540113568305969,
-0.5590245127677917,
-0.17422010004520416,
-0.11635041236877441,
0.22510956227779388,
-0.10361617058515549,
0.07286020368337631,
0.43427857756614685,
0.15434370934963226,
0.27352750301361084,
0.5391802787780762,
0.06792531162500381,
0.11893708258867264,
-0.37401819229125977,
0.04329170286655426,
-0.0926683098077774,
0.12352597713470459,
-0.24775774776935577,
-0.17437687516212463,
0.053098537027835846,
-0.18347401916980743,
0.1845177561044693,
0.1049058809876442,
0.07000723481178284,
0.24240818619728088,
0.3292448818683624,
0.12075729668140411,
0.1795458346605301,
-0.5024951696395874,
-0.48402833938598633,
0.0933743342757225,
-0.09920433163642883,
0.05972101539373398,
-0.06249655783176422,
-0.13606679439544678,
-0.3975333571434021,
-0.03617621585726738,
-0.35202881693840027,
-0.30077165365219116,
0.09093007445335388,
0.008328951895236969,
0.17425690591335297,
0.11252342164516449,
-0.1105436235666275,
0.6274502277374268,
-0.20270943641662598,
0.257442444562912,
-0.06485430896282196,
0.18380345404148102,
-0.03699234873056412,
0.019787650555372238,
0.025743141770362854,
0.42654532194137573,
-0.03663458675146103,
0.08658803254365921,
-0.24530068039894104,
0.5439851880073547,
0.23543134331703186,
0.19751770794391632,
-0.2265355885028839,
-0.0887756496667862,
0.22654515504837036,
-0.4291591942310333,
-0.2648877799510956,
0.2957112491130829,
0.15490610897541046,
0.11389229446649551,
-0.31173208355903625,
0.5959978699684143,
0.06861237436532974,
0.08495965600013733,
-0.22454440593719482,
-0.0018044821918010712,
0.2800178825855255,
-0.12427258491516113,
-0.11357630789279938,
-0.23090051114559174,
0.2905324399471283,
0.14321236312389374,
0.5214194059371948,
0.10394519567489624,
-0.3891158103942871,
0.10012958198785782,
0.26721617579460144,
-0.16954681277275085,
0.07944507896900177,
0.11687684059143066,
0.04127614200115204,
-0.08224336057901382,
0.024764470756053925,
0.22095398604869843,
0.28996503353118896,
0.20445309579372406,
-0.340902179479599,
0.319985955953598,
-0.0366528145968914,
0.14616557955741882,
0.21443918347358704,
-0.17298512160778046,
-0.04003690183162689,
0.4994865655899048,
0.37250739336013794,
0.24275816977024078,
-0.18430739641189575,
0.17241865396499634,
-0.39707863330841064,
0.15252381563186646,
-0.5550441145896912,
-0.02135195955634117,
-0.14968430995941162,
-0.07359020411968231,
-0.19930103421211243,
-0.01921437308192253,
-0.2774988114833832,
-0.11243729293346405,
0.24843354523181915,
0.1559062898159027,
-0.0537630170583725,
0.27692654728889465,
0.0002659335732460022,
0.4594172239303589,
0.09787759184837341,
-0.19885390996932983,
-0.05862334743142128,
-0.06503954529762268,
-0.1624031662940979,
-0.009098300710320473,
0.015626464039087296,
0.1998782902956009,
0.14580588042736053,
-0.48266419768333435,
-0.3008008599281311,
-0.2854563295841217,
-0.34530606865882874,
0.21016888320446014,
-0.06863559782505035,
0.36132118105888367,
0.16641613841056824,
-0.01869860291481018,
-0.3620549440383911,
-0.2030526101589203,
0.1645021140575409,
-0.02913501486182213,
-0.47738710045814514,
-0.05247557908296585,
0.055691901594400406,
-0.20533210039138794,
-0.04128805547952652,
-0.45631781220436096,
-0.09893925487995148,
-0.27093636989593506,
0.016228143125772476,
-0.1817270964384079,
0.0823792964220047,
0.24365678429603577,
-0.1389109194278717,
0.03481035679578781,
-0.2918562591075897,
0.12605929374694824,
-0.5039401054382324,
-0.04728863388299942,
0.09391418099403381,
0.04301907867193222,
-0.3436333239078522,
-0.288729190826416,
-0.23202405869960785,
-0.1749057173728943,
-0.035087812691926956,
-0.13758473098278046,
-0.22584138810634613,
-0.1793825626373291,
0.2166626751422882,
-0.22682687640190125,
0.24351945519447327,
0.22654618322849274,
-0.18087412416934967,
0.08801054209470749,
-0.22812429070472717,
-0.44549793004989624,
0.1523832082748413,
0.3971559405326843,
0.2353450357913971,
-0.11179601401090622,
0.3300129175186157,
-0.024653742089867592,
0.6546522378921509,
0.40532436966896057,
0.22661742568016052,
0.10227067768573761,
-0.2168855369091034,
0.3332626223564148,
-0.20545247197151184,
-0.21879447996616364,
0.3126906752586365,
0.12877357006072998,
-0.3271474242210388,
0.32847970724105835,
0.039798080921173096,
0.17491227388381958,
0.015510641038417816,
0.19428449869155884,
-0.5804231762886047,
-0.18751150369644165,
-0.2166331559419632,
0.04989321902394295,
0.16470575332641602,
0.09028758108615875,
-0.07233982533216476,
0.14949627220630646,
-0.10614410042762756,
-0.052444688975811005,
0.1069309338927269,
-0.044245682656764984,
0.23647044599056244,
-0.8369113802909851,
-0.2997898757457733,
0.043308157473802567,
0.22586292028427124,
0.39950719475746155,
0.38158172369003296,
-0.013444602489471436,
-0.09399233013391495,
0.19683769345283508,
0.09238265454769135,
0.7246228456497192,
0.015939999371767044,
0.08295279741287231,
-0.2899780869483948,
0.18532736599445343,
-0.43817609548568726,
-0.23490533232688904,
-0.1948947161436081,
0.13776947557926178,
0.2811792492866516,
0.16984790563583374,
-0.22085040807724,
-0.04087090492248535,
0.191101536154747,
0.06463173776865005,
-0.09848341345787048,
-0.00939030572772026,
-0.2653487026691437,
-0.14907371997833252,
-0.34381136298179626,
0.28513258695602417,
0.4409756660461426,
0.2931806743144989,
0.4785468578338623,
-0.06088583916425705,
0.19115667045116425,
0.15684127807617188,
-0.11838892102241516,
0.24441580474376678,
0.5145236253738403,
-0.13947437703609467,
0.02023167535662651,
0.20985352993011475,
-0.047285035252571106,
0.035084545612335205,
0.5318820476531982,
-0.09855465590953827,
-0.32096433639526367,
-0.03559402376413345,
-0.04234978184103966,
0.3858829736709595,
0.34095650911331177,
0.027156241238117218,
0.007218688726425171,
-0.042327553033828735,
0.17052337527275085,
-0.2394709289073944,
-0.11459418386220932,
0.38380736112594604,
0.5305989384651184,
-0.07233093678951263,
-0.24324612319469452,
0.22699499130249023,
-0.14598920941352844,
0.03043893724679947,
0.09295648336410522,
0.5290960073471069,
-0.2636905014514923,
0.45205360651016235,
-0.10958700627088547,
1.0020312070846558,
0.32818931341171265,
0.11342546343803406,
0.4978843927383423,
-0.04720137268304825,
0.35786172747612,
-0.07541034370660782,
0.2748134732246399,
-0.4139470160007477,
0.311021625995636,
-0.03776523098349571,
-0.11987386643886566,
-0.11781486123800278,
-0.16986827552318573,
-0.22657044231891632,
0.2860627770423889,
-0.15264682471752167,
0.23116379976272583,
-0.06266183406114578,
-0.00852230191230774,
-0.203414648771286,
-0.033529944717884064,
-0.4369693994522095,
0.09323049336671829,
0.014677368104457855,
0.2703949809074402,
-0.1487714648246765,
0.17500093579292297,
-0.33909866213798523,
-0.37423354387283325,
-0.6190105676651001,
-0.02997484616935253,
-0.4763568043708801,
0.004797124303877354,
0.44992077350616455,
-0.08977561444044113,
-0.036416590213775635,
0.4331655204296112,
0.30170688033103943,
0.06793445348739624,
-0.036910317838191986,
0.18586263060569763,
-0.0765424594283104,
0.37628409266471863,
0.4295192360877991,
-0.05190686881542206,
0.15741020441055298,
-0.037490054965019226,
-0.39921027421951294,
-0.1864612102508545,
0.014257452450692654,
-0.21475471556186676,
0.07059361040592194,
0.1132238507270813,
0.011674962937831879,
-0.18065595626831055,
-0.37972292304039,
-0.12185674905776978,
0.288859099149704,
-0.21521423757076263,
0.12182240188121796,
-0.10446527600288391,
-0.18339256942272186,
0.16808897256851196,
0.23020873963832855,
-0.38283222913742065,
-0.029356002807617188,
0.45915666222572327,
-0.24474135041236877,
0.044634200632572174,
0.43615877628326416,
0.012649577111005783,
-0.10209202766418457,
-0.12105528265237808,
0.18574416637420654,
-0.08986609429121017,
-0.11957909166812897,
0.020980341359972954,
-0.14428602159023285,
-0.3595213294029236,
-0.21373805403709412,
0.33839958906173706,
0.38391655683517456,
-0.11619099229574203,
-0.0502924770116806,
-0.695736825466156,
-0.02355232462286949,
0.253073126077652,
0.04387805983424187,
-0.04511820152401924,
0.36282968521118164,
0.08016426861286163,
-0.17540055513381958,
-0.07035685330629349,
-0.3165866732597351,
-0.0696844533085823,
-0.2544344663619995,
0.13788768649101257,
-0.0004854295402765274,
-0.05490417033433914,
0.22773674130439758,
-0.25084275007247925,
0.09738291800022125,
-0.00252600759267807,
-0.1287059187889099,
-0.21573993563652039,
-0.10593652725219727,
0.15164804458618164,
0.09583654254674911,
-0.23682306706905365,
-0.1105898767709732,
-0.07676562666893005,
0.1523081362247467,
-0.19047704339027405,
0.12856537103652954,
0.49132031202316284,
0.15181627869606018,
0.19984982907772064,
-0.5185196995735168,
-0.1265326738357544,
0.030970588326454163,
0.023483291268348694,
-0.0831899642944336,
-0.3460221290588379,
0.11455812305212021,
0.2857738733291626,
-0.25416359305381775,
-0.0568227618932724,
0.2504388689994812,
0.19712668657302856,
0.1563536673784256,
0.10799165815114975,
0.1915990114212036,
-0.09822008013725281,
-0.019018370658159256,
0.18339228630065918,
0.22719524800777435,
0.3787540793418884,
-0.4000135362148285,
-0.045251235365867615,
-0.0354740209877491,
0.19838643074035645,
-0.3783814311027527,
-0.0351046659052372,
0.21720555424690247,
-0.18826891481876373,
-0.020509112626314163,
0.2156234085559845,
0.1364917755126953,
-0.2648780345916748,
-0.06507198512554169,
0.23251593112945557,
0.5807170271873474,
-0.08882857114076614,
0.011357201263308525,
0.14765222370624542,
0.027406763285398483,
0.21495230495929718,
0.31767866015434265,
-0.11529581248760223,
0.20218367874622345,
0.1865382194519043,
-0.15203526616096497,
0.04398301988840103,
-0.20522570610046387,
0.15206308662891388,
0.1444452404975891,
0.04668634757399559,
0.38284751772880554,
0.3497185707092285,
-0.4396217465400696,
0.011120222508907318,
0.1317221224308014,
0.4576253592967987,
-0.11604800075292587,
-0.23841439187526703,
-0.2936193346977234,
-0.08832341432571411,
-0.23818618059158325,
-0.05786338448524475,
-0.0807044580578804,
-0.1052347868680954,
-0.1390683501958847,
-0.09896555542945862,
-0.06288065016269684,
-0.2211407572031021,
0.15798020362854004,
0.16819226741790771,
-0.2182735651731491,
-0.349271297454834,
-0.27466264367103577,
0.2447262406349182,
0.18391716480255127,
-0.17134593427181244,
0.3410632014274597,
0.0664089098572731,
0.009408418089151382,
0.30501213669776917,
0.5498549342155457,
0.5111482739448547,
0.2144206464290619,
-0.15680396556854248,
0.19623056054115295,
-0.17397579550743103,
-0.02778686210513115,
0.011249683797359467,
0.11021431535482407,
-0.2986118495464325,
-0.494800865650177,
0.09193763136863708,
0.21478725969791412,
-0.18767230212688446,
0.013915248215198517,
0.06137039139866829,
0.11291712522506714,
-0.3813638687133789,
-0.22478261590003967,
-0.331112265586853,
0.3151141405105591,
-0.18177661299705505,
0.1097346767783165,
-0.14958339929580688,
-0.025889039039611816,
0.14152708649635315,
-0.16162525117397308,
0.202558696269989,
0.07868475466966629,
0.0715651586651802,
0.19094333052635193,
0.04452779144048691,
0.6243493556976318,
-0.20134130120277405,
-0.06818998605012894,
-0.05787886306643486,
-0.5805673003196716,
0.1312071830034256,
0.031045693904161453,
-0.1154964342713356,
0.2015237808227539,
0.21466360986232758,
-0.15989360213279724,
0.22095826268196106,
0.43349266052246094,
0.06170818582177162,
-0.19035233557224274,
0.011297982186079025,
-0.21445517241954803,
0.07673788070678711,
-0.20317529141902924,
0.11044448614120483,
-0.006818236783146858,
-0.2531493306159973,
0.2053179293870926,
0.1481131613254547,
-0.05777216702699661,
0.18853166699409485,
0.15271006524562836,
-0.0800267681479454,
-0.4327373504638672,
-0.12943632900714874,
0.3209768831729889,
0.22017987072467804,
-0.23549482226371765,
0.1969354897737503,
-0.06646378338336945,
-0.16120578348636627,
-0.5237137675285339,
0.14058703184127808,
-0.392633855342865,
0.2938772141933441,
-0.04632290452718735,
-0.3050650656223297,
0.04753218963742256,
0.23760394752025604,
0.35413658618927,
-0.2929821312427521,
-0.4807339310646057,
0.1937253624200821,
-0.15002979338169098,
0.23154783248901367,
-0.08737538754940033,
0.19338387250900269,
-0.08013895153999329,
0.4570735991001129,
-0.33873456716537476,
-0.3580104410648346,
0.32382315397262573,
-0.3490350544452667,
-0.11896289885044098,
0.014101189561188221,
0.3399590849876404,
0.28182539343833923,
-0.14852719008922577,
-0.5053994059562683,
-0.1532173752784729,
0.26604604721069336,
-0.00043537095189094543,
-0.21644216775894165,
0.11160421371459961,
-0.05062929913401604,
-0.058732327073812485,
0.029928836971521378,
0.04772424325346947,
0.3681153357028961,
-0.10838660597801208,
0.2889883816242218,
-0.35079848766326904
] |
https://github.com/huggingface/datasets/issues/2583 | Error iteration over IterableDataset using Torch DataLoader | Hi ! This is because you first need to format the dataset for pytorch:
```python
>>> import torch
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> torch_iterable_dataset = dataset.with_format("torch")
>>> assert isinstance(torch_iterable_dataset, torch.utils.data.IterableDataset)
>>> dataloader = torch.utils.data.DataLoader(torch_iterable_dataset, batch_size=4)
>>> next(iter(dataloader))
{'id': tensor([0, 1, 2, 3]), 'text': ['Mtendere Village was inspired...]}
```
This is because the pytorch dataloader expects a subclass of `torch.utils.data.IterableDataset`. Since you can't pass an arbitrary iterable to a pytorch dataloader, you first need to build an object that inherits from `torch.utils.data.IterableDataset` using `with_format("torch")` for example.
| ## Describe the bug
I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler.
I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me.
## Steps to reproduce the bug
1. Does not work.
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4)
>>> dataloader.sampler
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
>>> for batch in dataloader:
... print(batch)
```
2. Works.
```python
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
class CustomIterableDataset(IterableDataset):
'Characterizes a dataset for PyTorch'
def __init__(self, data):
'Initialization'
self.data = data
def __iter__(self):
return iter(self.data)
data = list(range(12))
dataset = CustomIterableDataset(data)
dataloader = DataLoader(dataset, batch_size=4)
print("dataloader: ", dataloader.sampler)
for batch in dataloader:
print(batch)
```
## Expected results
To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different.
dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50>
tensor([0, 1, 2, 3])
tensor([4, 5, 6, 7])
tensor([ 8, 9, 10, 11])
## Actual results
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data
index = self._next_index() # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__
for idx in self.sampler:
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__
return iter(range(len(self.data_source)))
TypeError: object of type 'IterableDataset' has no len()
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: '1.8.1.dev0'
- Platform: Linux
- Python version: Python 3.6.8
- PyArrow version: '3.0.0'
| 93 | Error iteration over IterableDataset using Torch DataLoader
## Describe the bug
I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler.
I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me.
## Steps to reproduce the bug
1. Does not work.
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4)
>>> dataloader.sampler
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
>>> for batch in dataloader:
... print(batch)
```
2. Works.
```python
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
class CustomIterableDataset(IterableDataset):
'Characterizes a dataset for PyTorch'
def __init__(self, data):
'Initialization'
self.data = data
def __iter__(self):
return iter(self.data)
data = list(range(12))
dataset = CustomIterableDataset(data)
dataloader = DataLoader(dataset, batch_size=4)
print("dataloader: ", dataloader.sampler)
for batch in dataloader:
print(batch)
```
## Expected results
To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different.
dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50>
tensor([0, 1, 2, 3])
tensor([4, 5, 6, 7])
tensor([ 8, 9, 10, 11])
## Actual results
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data
index = self._next_index() # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__
for idx in self.sampler:
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__
return iter(range(len(self.data_source)))
TypeError: object of type 'IterableDataset' has no len()
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: '1.8.1.dev0'
- Platform: Linux
- Python version: Python 3.6.8
- PyArrow version: '3.0.0'
Hi ! This is because you first need to format the dataset for pytorch:
```python
>>> import torch
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> torch_iterable_dataset = dataset.with_format("torch")
>>> assert isinstance(torch_iterable_dataset, torch.utils.data.IterableDataset)
>>> dataloader = torch.utils.data.DataLoader(torch_iterable_dataset, batch_size=4)
>>> next(iter(dataloader))
{'id': tensor([0, 1, 2, 3]), 'text': ['Mtendere Village was inspired...]}
```
This is because the pytorch dataloader expects a subclass of `torch.utils.data.IterableDataset`. Since you can't pass an arbitrary iterable to a pytorch dataloader, you first need to build an object that inherits from `torch.utils.data.IterableDataset` using `with_format("torch")` for example.
| [
-0.17598877847194672,
-0.3325835168361664,
-0.012141265906393528,
0.23658576607704163,
0.1552741825580597,
0.020412109792232513,
0.43117475509643555,
0.0018044430762529373,
-0.1689603328704834,
0.24600963294506073,
0.0963444635272026,
0.2442096471786499,
-0.33548107743263245,
-0.4065967798233032,
-0.24957749247550964,
-0.21472787857055664,
0.0861797034740448,
-0.217219740152359,
-0.22791942954063416,
-0.08439421653747559,
-0.15839530527591705,
-0.031495608389377594,
-0.23817692697048187,
-0.03344671428203583,
-0.02135106362402439,
-0.024418188259005547,
-0.12059879302978516,
0.009426776319742203,
0.08263277262449265,
-0.5168218016624451,
0.4132378399372101,
0.07846742123365402,
0.5836477279663086,
0.5928806662559509,
-0.00012130137474741787,
0.08044059574604034,
0.5695524215698242,
-0.14884807169437408,
-0.340674489736557,
0.03398250788450241,
0.1853100061416626,
0.12311235070228577,
0.18922944366931915,
-0.25030452013015747,
0.008563447743654251,
-0.13734573125839233,
0.041332654654979706,
-0.4429117441177368,
0.027744926512241364,
0.09113842248916626,
0.12735101580619812,
0.1404469758272171,
-0.21520991623401642,
-0.15519478917121887,
0.08733934909105301,
0.0838441476225853,
-0.06600581109523773,
0.36763861775398254,
0.6034703254699707,
0.14620371162891388,
-0.2805480659008026,
0.10235297679901123,
-0.05157231166958809,
0.14463292062282562,
0.20253339409828186,
-0.2065141648054123,
-0.15180742740631104,
-0.14113156497478485,
0.01658504642546177,
0.13772636651992798,
0.4296509027481079,
-0.3647225797176361,
-0.2566855549812317,
-0.21343320608139038,
-0.09083734452724457,
-0.008176375180482864,
-0.05156225711107254,
0.24559493362903595,
-0.2517600655555725,
-0.10191342234611511,
-0.105351522564888,
0.29457563161849976,
-0.29351890087127686,
0.15060469508171082,
0.12089315056800842,
0.06075724959373474,
-0.06054241955280304,
0.41814643144607544,
-0.02580951526761055,
-0.04967757314443588,
0.4104277491569519,
-0.14660683274269104,
0.11397993564605713,
0.17912732064723969,
-0.40981337428092957,
0.12157332897186279,
-0.07459399849176407,
0.034386590123176575,
0.10905873030424118,
0.22854283452033997,
0.19129860401153564,
-0.07218073308467865,
0.21480664610862732,
-0.07588311284780502,
0.2809821367263794,
0.21040146052837372,
0.1607048362493515,
0.13090331852436066,
-0.04843641817569733,
0.12946347892284393,
0.12071441113948822,
-0.04315745830535889,
-0.013119811192154884,
-0.27825483679771423,
0.331511527299881,
0.22974446415901184,
0.24273781478405,
0.021872472018003464,
-0.2630295157432556,
-0.06715558469295502,
-0.3772144019603729,
-0.04647763818502426,
0.09215199202299118,
0.03120969980955124,
-0.06635437905788422,
-0.018240302801132202,
0.026031039655208588,
0.21941488981246948,
0.001959552988409996,
-0.13634848594665527,
-0.044967472553253174,
-0.06343159079551697,
-0.2369840443134308,
0.1653113216161728,
0.013812422752380371,
-0.5259139537811279,
0.21787697076797485,
0.07432003319263458,
0.12404203414916992,
0.09819003939628601,
0.14075757563114166,
-0.1538320928812027,
0.08765202015638351,
-0.188678577542305,
0.10858334600925446,
0.2937150001525879,
0.090966135263443,
0.37019985914230347,
0.1703479290008545,
0.3358141779899597,
-0.21395134925842285,
-0.4311695396900177,
-0.004115289077162743,
0.13150562345981598,
-0.13494133949279785,
0.14840108156204224,
-0.16619330644607544,
0.013972079381346703,
0.3592302203178406,
-0.08629903942346573,
0.25636038184165955,
-0.3309456706047058,
0.08548890054225922,
-0.30741024017333984,
-0.15668357908725739,
0.3201500177383423,
-0.5023240447044373,
-0.009421303868293762,
0.09441041946411133,
-0.12423184514045715,
0.45208537578582764,
0.16446684300899506,
-0.3807600736618042,
0.359685480594635,
-0.45633700489997864,
-0.0022487416863441467,
0.003713734447956085,
-0.44845956563949585,
-0.43538668751716614,
0.25472286343574524,
0.060069113969802856,
0.29165711998939514,
0.17571565508842468,
0.04435940086841583,
0.4281606376171112,
-0.32416123151779175,
0.1788831353187561,
0.01816062070429325,
-0.2364022433757782,
-0.1766928732395172,
-0.30590030550956726,
0.06542939692735672,
0.32229262590408325,
0.12153781950473785,
0.07876459509134293,
0.21131101250648499,
-0.0018342062830924988,
0.03645295649766922,
0.25590264797210693,
-0.1622602641582489,
0.1733241081237793,
0.27126798033714294,
-0.022152815014123917,
0.10625125467777252,
0.18770715594291687,
-0.06390553712844849,
-0.38269227743148804,
0.19025415182113647,
-0.03414532169699669,
0.025288233533501625,
0.024826057255268097,
-0.03579685464501381,
0.07464232295751572,
0.1515565663576126,
-0.40891650319099426,
-0.1956712305545807,
0.020700417459011078,
0.3267154395580292,
0.24016380310058594,
-0.34108641743659973,
0.05102596804499626,
0.1779325157403946,
-0.3679129183292389,
-0.09054170548915863,
-0.6530370712280273,
-0.015754666179418564,
0.1605350375175476,
-0.25725433230400085,
0.006690364331007004,
0.007864922285079956,
0.20896625518798828,
-0.20636774599552155,
-0.09491914510726929,
0.21479341387748718,
-0.12380571663379669,
-0.1281566470861435,
-0.1784876585006714,
-0.010512679815292358,
0.0613335520029068,
-0.2036600410938263,
-0.0033431928604841232,
0.381186306476593,
0.22065576910972595,
-0.16431502997875214,
0.15714143216609955,
0.43301230669021606,
-0.13789820671081543,
0.48387402296066284,
-0.07346595823764801,
-0.0011865589767694473,
0.05471328645944595,
0.2082163393497467,
-0.4597419202327728,
0.14478588104248047,
0.2501409649848938,
-0.0622137077152729,
0.4288066029548645,
-0.19781556725502014,
-0.36332130432128906,
0.09644503891468048,
-0.06512318551540375,
-0.016503583639860153,
-0.13323268294334412,
0.1762126088142395,
-0.2831248342990875,
0.08376103639602661,
0.13753752410411835,
-0.015925448387861252,
0.6980902552604675,
0.004886719863861799,
0.02115568518638611,
-0.10675875097513199,
0.12121720612049103,
-0.0663992315530777,
0.017251640558242798,
0.23966369032859802,
0.08117974549531937,
0.1726081669330597,
0.09104983508586884,
-0.12290432304143906,
-0.05047691613435745,
-0.4383982717990875,
-0.13120503723621368,
0.19988936185836792,
-0.08025720715522766,
0.3007243275642395,
0.09545578807592392,
-0.1390557885169983,
-0.38064634799957275,
-0.5877682566642761,
0.018513895571231842,
-0.2711990773677826,
-0.2329491525888443,
0.5140378475189209,
0.07633274793624878,
0.11004135012626648,
0.043805431574583054,
0.12408552318811417,
0.3323761224746704,
-0.10419788211584091,
-0.01592940464615822,
-0.03921139985322952,
-0.36596012115478516,
-0.0314609669148922,
-0.02366991527378559,
-0.6017315983772278,
0.37040483951568604,
0.13439106941223145,
0.040474165230989456,
-0.4792018234729767,
0.142361581325531,
0.047359175980091095,
-0.0661911889910698,
0.07064656168222427,
0.4086323380470276,
-0.05046284198760986,
0.2938429117202759,
-0.2023874968290329,
0.30721867084503174,
-0.0948527455329895,
0.0008260142058134079,
0.0853472575545311,
-0.09316734969615936,
-0.002608763985335827,
0.14635805785655975,
-0.03688715398311615,
-0.23986969888210297,
-0.20745888352394104,
-0.08613397181034088,
0.07318004965782166,
-0.00819569081068039,
0.16517974436283112,
0.024237051606178284,
0.09530296921730042,
0.455251544713974,
-0.15042422711849213,
-0.06395993381738663,
-0.41666409373283386,
0.19386990368366241,
-0.3335472047328949,
-0.28590962290763855,
-0.22673311829566956,
-0.22947987914085388,
0.24978113174438477,
0.37177401781082153,
-0.305622935295105,
-0.1961059719324112,
-0.060211896896362305,
0.225277841091156,
-0.08177095651626587,
-0.04250358045101166,
0.2050265371799469,
-0.1281113624572754,
0.08895304799079895,
-0.14572098851203918,
-0.1033758819103241,
0.06909558922052383,
-0.242573082447052,
0.35439929366111755,
0.2895658314228058,
0.559561550617218,
0.13785044848918915,
0.9526196718215942,
0.46254509687423706,
-0.15118812024593353,
0.2041904181241989,
0.00801086239516735,
-0.13840927183628082,
-0.08577532321214676,
-0.38426482677459717,
0.2152830809354782,
-0.21003815531730652,
-0.31230413913726807,
0.1660802960395813,
-0.21497032046318054,
-0.10470382124185562,
0.08273144066333771,
0.09725312888622284,
-0.008991621434688568,
-0.10375015437602997,
0.17559707164764404,
-0.5570774078369141,
0.1904158592224121,
-0.14686040580272675,
0.24267196655273438,
-0.28692254424095154,
-0.12588267028331757,
-0.036965880542993546,
0.042445216327905655,
0.24592119455337524,
0.05157425254583359,
-0.18931061029434204,
0.019086681306362152,
-0.6127873063087463,
0.375447154045105,
0.17678643763065338,
0.6406627893447876,
0.1874258816242218,
-0.11556372791528702,
0.1879224181175232,
0.004915849305689335,
0.77994704246521,
-0.10748756676912308,
-0.23983897268772125,
-0.0036271940916776657,
-0.16696445643901825,
-0.716399073600769,
-0.4133673906326294,
-0.14693979918956757,
0.7751925587654114,
0.15553900599479675,
-0.07514557242393494,
-0.13946323096752167,
-0.033180590718984604,
0.19412249326705933,
0.07339342683553696,
-0.2068859189748764,
-0.16901437938213348,
-0.11875569820404053,
-0.37932831048965454,
-0.0894922986626625,
-0.2840985059738159,
0.051699765026569366,
0.1906181126832962,
-0.0854412168264389,
0.061272699385881424,
-0.2614085376262665,
-0.014388690702617168,
0.058354027569293976,
-0.0894988626241684,
0.16433897614479065,
-0.21373075246810913,
0.21244367957115173,
-0.012211430817842484,
0.2840591073036194,
0.48792564868927,
0.28323066234588623,
-0.0035634860396385193,
-0.5100491046905518,
0.28874078392982483,
-0.1830689013004303,
0.03784862160682678,
0.20618319511413574,
-0.18861036002635956,
0.08036187291145325,
-0.10132241249084473,
-0.02139560878276825,
-0.21097205579280853,
-0.09348896890878677,
0.30206331610679626,
0.05301293358206749,
-0.630801260471344,
-0.5626423954963684,
0.17281171679496765,
0.2680610418319702,
0.052680402994155884,
0.6681526303291321,
-0.398510217666626,
-0.271595299243927,
0.2777000665664673,
0.08388388156890869,
0.7267507910728455,
0.1485256850719452,
-0.05574839189648628,
0.23261481523513794,
0.2090155929327011,
0.01867671124637127,
0.31156283617019653,
0.23696669936180115,
-0.3453318774700165,
-0.22724512219429016,
-0.02699155919253826,
-0.1897989958524704,
0.12217864394187927,
0.18264338374137878,
-0.06328245997428894,
0.331824392080307,
-0.14366012811660767,
0.045979663729667664,
0.12700742483139038,
-0.1268922984600067,
-0.21297454833984375,
-0.13387912511825562,
0.09565135836601257,
0.08511858433485031,
0.005766041576862335,
0.2564908564090729,
-0.1728527843952179,
-0.09265751391649246,
0.06688013672828674,
-0.15552449226379395,
-0.26183897256851196,
0.04438962787389755,
-0.22300025820732117,
0.09858538210391998,
0.2456180453300476,
-0.523253858089447,
0.05012264475226402,
0.21589511632919312,
0.3522292971611023,
-0.36277249455451965,
-0.002662060782313347,
-0.029419895261526108,
0.1182432696223259,
-0.023342566564679146,
-0.2029048204421997,
-0.20772284269332886,
0.48709702491760254,
0.04055124521255493,
0.09955065697431564,
0.3205986022949219,
0.07133432477712631,
-0.4681001901626587,
-0.22823864221572876,
0.2966572642326355,
0.4771992564201355,
-0.539290726184845,
-0.23197031021118164,
-0.2508279085159302,
-0.2199196219444275,
-0.23634271323680878,
0.01044510118663311,
0.020688582211732864,
-0.2876826822757721,
0.1941118836402893,
-0.17438213527202606,
-0.12590768933296204,
0.09192598611116409,
0.5244773626327515,
0.3316218852996826,
-0.04920782893896103,
0.46102166175842285,
0.12727805972099304,
-0.07801924645900726,
0.01729956641793251,
-0.033795520663261414,
0.2742285430431366,
-0.6039995551109314,
0.3320970833301544,
-0.3019651174545288,
0.5657230615615845,
-0.0477755144238472,
0.32334062457084656,
0.01458146795630455,
0.06453482806682587,
-0.3575257956981659,
-0.2525315284729004,
-0.2616008520126343,
-0.10557268559932709,
0.01830972172319889,
0.26057830452919006,
0.052443727850914,
0.12131467461585999,
0.07276536524295807,
-0.08296569436788559,
-0.19599342346191406,
-0.1801847368478775,
-0.020596403628587723,
0.1617279052734375,
0.15081828832626343,
0.06201871857047081,
-0.10457339137792587,
0.33127525448799133,
-0.05368271470069885,
0.4063279628753662,
0.019925948232412338,
-0.15047311782836914,
-0.02763283997774124,
0.16993463039398193,
0.06052137166261673,
-0.10470755398273468,
-0.1692231297492981,
-0.20600154995918274,
0.0063546765595674515,
-0.06021157652139664,
0.289499968290329,
0.2464597523212433,
0.03991066664457321,
0.1423623412847519,
0.3173564374446869,
0.043183065950870514,
-0.08609621226787567,
0.09589485824108124,
0.10156158357858658,
0.3374262750148773,
0.17747999727725983,
0.13566836714744568,
0.1120503768324852,
-0.17338088154792786,
-0.32013294100761414,
0.12381044030189514,
0.2855205535888672,
0.2208065390586853,
-0.06243301182985306,
-0.5807867050170898,
0.12318310141563416,
0.02367234230041504,
0.18754145503044128,
0.3630831241607666,
-0.36317014694213867,
-0.10949893295764923,
0.09908908605575562,
0.055639155209064484,
0.05120840668678284,
-0.07024819403886795,
-0.18324796855449677,
0.03339734673500061,
0.022657189518213272,
0.26856154203414917,
-0.08713915199041367,
-0.22718378901481628,
0.16491255164146423,
-0.011057740077376366,
0.34742864966392517,
-0.13776054978370667,
0.10774897038936615,
0.36730876564979553,
0.15318796038627625,
0.019503679126501083,
0.3287830650806427,
0.07383757829666138,
0.06217610836029053,
0.4536159634590149,
0.04338487610220909,
0.626399576663971,
0.31339555978775024,
-0.2698841094970703,
0.10481736063957214,
-0.3597237169742584,
-0.13157646358013153,
-0.06444601714611053,
0.14289329946041107,
0.298435777425766,
0.07192455977201462,
0.4628482460975647,
-0.17626382410526276,
-0.3152376115322113,
0.048758894205093384,
-0.24236290156841278,
-0.08563830703496933,
-0.1142403781414032,
-0.39307892322540283,
-0.19821122288703918,
0.2366156280040741,
-0.02772677130997181,
-0.09085848927497864,
-0.01206505298614502,
0.1886202096939087,
-0.10143105685710907,
-0.2059578150510788,
-0.5857425332069397,
-0.17343756556510925,
0.2839129567146301,
-0.06240171939134598,
-0.12222988903522491,
0.15278378129005432,
0.12455027550458908,
0.15628226101398468,
0.15071968734264374,
0.3055027425289154,
0.4985910952091217,
0.5325033664703369,
-0.10812865197658539,
0.10503143817186356,
-0.1505066305398941,
-0.06871183961629868,
-0.015781644731760025,
0.1756817102432251,
-0.12522153556346893,
-0.14410020411014557,
0.40513643622398376,
0.06611470878124237,
-0.0606728233397007,
0.39414605498313904,
0.3221777677536011,
0.04345700889825821,
-0.23415403068065643,
0.1143152266740799,
-0.12785935401916504,
0.06544703990221024,
-0.13820314407348633,
0.015658199787139893,
-0.3902928829193115,
-0.05954161286354065,
0.3030414283275604,
-0.3966251313686371,
0.11297633498907089,
-0.03893229737877846,
0.026305414736270905,
-0.41967034339904785,
0.37585902214050293,
0.32213935256004333,
0.17387884855270386,
-0.2213015854358673,
-0.14026831090450287,
-0.10099606215953827,
0.17925885319709778,
-0.2492871880531311,
0.11362674832344055,
-0.04607975482940674,
0.31027400493621826,
-0.10726020485162735,
0.13170045614242554,
0.19803069531917572,
0.0027525518089532852,
-0.06394848227500916,
0.7769207954406738,
-0.20236623287200928,
-0.40614059567451477,
0.0042581707239151,
0.08911844342947006,
0.06590450555086136,
-0.48697689175605774,
-0.06339000165462494,
-0.09672978520393372,
0.03900202363729477,
-0.10394398868083954,
-0.25709831714630127,
0.27014395594596863,
-0.010822959244251251,
0.3218625485897064,
0.1759914606809616,
0.08218343555927277,
0.047204434871673584,
-0.03934633359313011,
-0.4764394164085388,
-0.03581363707780838,
-0.09212049096822739,
0.11862193048000336,
0.09736506640911102,
0.2948981821537018,
0.013729546219110489,
-0.133866548538208,
-0.2598080039024353,
0.35526832938194275,
0.37222999334335327,
0.06365044414997101,
-0.34397438168525696,
0.29255732893943787,
-0.40092048048973083,
0.1828521341085434,
0.01691935583949089,
0.32568907737731934,
0.2241050750017166,
0.36912253499031067,
-0.28926557302474976,
-0.3230036497116089,
0.5461325645446777,
-0.8041616082191467,
-0.35816535353660583,
0.01871420070528984,
-0.12052182853221893,
-0.007167555391788483,
-0.08189362287521362,
-0.37053993344306946,
0.08379033952951431,
0.37559548020362854,
-0.10939642041921616,
0.03163214400410652,
0.07405014336109161,
0.08921808004379272,
0.18290190398693085,
-0.08855541050434113,
0.1710422933101654,
0.20660614967346191,
-0.08259204030036926,
0.28093674778938293,
-0.32310426235198975
] |
https://github.com/huggingface/datasets/issues/2583 | Error iteration over IterableDataset using Torch DataLoader | Thank you for that and the example!
What you said makes total sense; I just somehow missed that and assumed HF IterableDataset was a subclass of Torch IterableDataset. | ## Describe the bug
I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler.
I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me.
## Steps to reproduce the bug
1. Does not work.
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4)
>>> dataloader.sampler
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
>>> for batch in dataloader:
... print(batch)
```
2. Works.
```python
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
class CustomIterableDataset(IterableDataset):
'Characterizes a dataset for PyTorch'
def __init__(self, data):
'Initialization'
self.data = data
def __iter__(self):
return iter(self.data)
data = list(range(12))
dataset = CustomIterableDataset(data)
dataloader = DataLoader(dataset, batch_size=4)
print("dataloader: ", dataloader.sampler)
for batch in dataloader:
print(batch)
```
## Expected results
To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different.
dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50>
tensor([0, 1, 2, 3])
tensor([4, 5, 6, 7])
tensor([ 8, 9, 10, 11])
## Actual results
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data
index = self._next_index() # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__
for idx in self.sampler:
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__
return iter(range(len(self.data_source)))
TypeError: object of type 'IterableDataset' has no len()
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: '1.8.1.dev0'
- Platform: Linux
- Python version: Python 3.6.8
- PyArrow version: '3.0.0'
| 28 | Error iteration over IterableDataset using Torch DataLoader
## Describe the bug
I have an IterableDataset (created using streaming=True) and I am trying to create batches using Torch DataLoader class by passing this IterableDataset to it. This throws error which is pasted below. I can do the same by using Torch IterableDataset. One thing I noticed is that in the former case when I look at the dataloader.sampler class I get torch.utils.data.sampler.SequentialSampler while the latter one gives torch.utils.data.dataloader._InfiniteConstantSampler.
I am not sure if this is how it is meant to be used, but that's what seemed reasonable to me.
## Steps to reproduce the bug
1. Does not work.
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
>>> dataloader = torch.utils.data.DataLoader(dataset, batch_size=4)
>>> dataloader.sampler
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
>>> for batch in dataloader:
... print(batch)
```
2. Works.
```python
import torch
from torch.utils.data import Dataset, IterableDataset, DataLoader
class CustomIterableDataset(IterableDataset):
'Characterizes a dataset for PyTorch'
def __init__(self, data):
'Initialization'
self.data = data
def __iter__(self):
return iter(self.data)
data = list(range(12))
dataset = CustomIterableDataset(data)
dataloader = DataLoader(dataset, batch_size=4)
print("dataloader: ", dataloader.sampler)
for batch in dataloader:
print(batch)
```
## Expected results
To get batches of data with the batch size as 4. Output from the latter one (2) though Datasource is different here so actual data is different.
dataloader: <torch.utils.data.dataloader._InfiniteConstantSampler object at 0x7f1cc29e2c50>
tensor([0, 1, 2, 3])
tensor([4, 5, 6, 7])
tensor([ 8, 9, 10, 11])
## Actual results
<torch.utils.data.sampler.SequentialSampler object at 0x7f245a510208>
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 474, in _next_data
index = self._next_index() # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 427, in _next_index
return next(self._sampler_iter) # may raise StopIteration
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 227, in __iter__
for idx in self.sampler:
File "/data/leshekha/lib/HFDatasets/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 67, in __iter__
return iter(range(len(self.data_source)))
TypeError: object of type 'IterableDataset' has no len()
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: '1.8.1.dev0'
- Platform: Linux
- Python version: Python 3.6.8
- PyArrow version: '3.0.0'
Thank you for that and the example!
What you said makes total sense; I just somehow missed that and assumed HF IterableDataset was a subclass of Torch IterableDataset. | [
-0.17598877847194672,
-0.3325835168361664,
-0.012141265906393528,
0.23658576607704163,
0.1552741825580597,
0.020412109792232513,
0.43117475509643555,
0.0018044430762529373,
-0.1689603328704834,
0.24600963294506073,
0.0963444635272026,
0.2442096471786499,
-0.33548107743263245,
-0.4065967798233032,
-0.24957749247550964,
-0.21472787857055664,
0.0861797034740448,
-0.217219740152359,
-0.22791942954063416,
-0.08439421653747559,
-0.15839530527591705,
-0.031495608389377594,
-0.23817692697048187,
-0.03344671428203583,
-0.02135106362402439,
-0.024418188259005547,
-0.12059879302978516,
0.009426776319742203,
0.08263277262449265,
-0.5168218016624451,
0.4132378399372101,
0.07846742123365402,
0.5836477279663086,
0.5928806662559509,
-0.00012130137474741787,
0.08044059574604034,
0.5695524215698242,
-0.14884807169437408,
-0.340674489736557,
0.03398250788450241,
0.1853100061416626,
0.12311235070228577,
0.18922944366931915,
-0.25030452013015747,
0.008563447743654251,
-0.13734573125839233,
0.041332654654979706,
-0.4429117441177368,
0.027744926512241364,
0.09113842248916626,
0.12735101580619812,
0.1404469758272171,
-0.21520991623401642,
-0.15519478917121887,
0.08733934909105301,
0.0838441476225853,
-0.06600581109523773,
0.36763861775398254,
0.6034703254699707,
0.14620371162891388,
-0.2805480659008026,
0.10235297679901123,
-0.05157231166958809,
0.14463292062282562,
0.20253339409828186,
-0.2065141648054123,
-0.15180742740631104,
-0.14113156497478485,
0.01658504642546177,
0.13772636651992798,
0.4296509027481079,
-0.3647225797176361,
-0.2566855549812317,
-0.21343320608139038,
-0.09083734452724457,
-0.008176375180482864,
-0.05156225711107254,
0.24559493362903595,
-0.2517600655555725,
-0.10191342234611511,
-0.105351522564888,
0.29457563161849976,
-0.29351890087127686,
0.15060469508171082,
0.12089315056800842,
0.06075724959373474,
-0.06054241955280304,
0.41814643144607544,
-0.02580951526761055,
-0.04967757314443588,
0.4104277491569519,
-0.14660683274269104,
0.11397993564605713,
0.17912732064723969,
-0.40981337428092957,
0.12157332897186279,
-0.07459399849176407,
0.034386590123176575,
0.10905873030424118,
0.22854283452033997,
0.19129860401153564,
-0.07218073308467865,
0.21480664610862732,
-0.07588311284780502,
0.2809821367263794,
0.21040146052837372,
0.1607048362493515,
0.13090331852436066,
-0.04843641817569733,
0.12946347892284393,
0.12071441113948822,
-0.04315745830535889,
-0.013119811192154884,
-0.27825483679771423,
0.331511527299881,
0.22974446415901184,
0.24273781478405,
0.021872472018003464,
-0.2630295157432556,
-0.06715558469295502,
-0.3772144019603729,
-0.04647763818502426,
0.09215199202299118,
0.03120969980955124,
-0.06635437905788422,
-0.018240302801132202,
0.026031039655208588,
0.21941488981246948,
0.001959552988409996,
-0.13634848594665527,
-0.044967472553253174,
-0.06343159079551697,
-0.2369840443134308,
0.1653113216161728,
0.013812422752380371,
-0.5259139537811279,
0.21787697076797485,
0.07432003319263458,
0.12404203414916992,
0.09819003939628601,
0.14075757563114166,
-0.1538320928812027,
0.08765202015638351,
-0.188678577542305,
0.10858334600925446,
0.2937150001525879,
0.090966135263443,
0.37019985914230347,
0.1703479290008545,
0.3358141779899597,
-0.21395134925842285,
-0.4311695396900177,
-0.004115289077162743,
0.13150562345981598,
-0.13494133949279785,
0.14840108156204224,
-0.16619330644607544,
0.013972079381346703,
0.3592302203178406,
-0.08629903942346573,
0.25636038184165955,
-0.3309456706047058,
0.08548890054225922,
-0.30741024017333984,
-0.15668357908725739,
0.3201500177383423,
-0.5023240447044373,
-0.009421303868293762,
0.09441041946411133,
-0.12423184514045715,
0.45208537578582764,
0.16446684300899506,
-0.3807600736618042,
0.359685480594635,
-0.45633700489997864,
-0.0022487416863441467,
0.003713734447956085,
-0.44845956563949585,
-0.43538668751716614,
0.25472286343574524,
0.060069113969802856,
0.29165711998939514,
0.17571565508842468,
0.04435940086841583,
0.4281606376171112,
-0.32416123151779175,
0.1788831353187561,
0.01816062070429325,
-0.2364022433757782,
-0.1766928732395172,
-0.30590030550956726,
0.06542939692735672,
0.32229262590408325,
0.12153781950473785,
0.07876459509134293,
0.21131101250648499,
-0.0018342062830924988,
0.03645295649766922,
0.25590264797210693,
-0.1622602641582489,
0.1733241081237793,
0.27126798033714294,
-0.022152815014123917,
0.10625125467777252,
0.18770715594291687,
-0.06390553712844849,
-0.38269227743148804,
0.19025415182113647,
-0.03414532169699669,
0.025288233533501625,
0.024826057255268097,
-0.03579685464501381,
0.07464232295751572,
0.1515565663576126,
-0.40891650319099426,
-0.1956712305545807,
0.020700417459011078,
0.3267154395580292,
0.24016380310058594,
-0.34108641743659973,
0.05102596804499626,
0.1779325157403946,
-0.3679129183292389,
-0.09054170548915863,
-0.6530370712280273,
-0.015754666179418564,
0.1605350375175476,
-0.25725433230400085,
0.006690364331007004,
0.007864922285079956,
0.20896625518798828,
-0.20636774599552155,
-0.09491914510726929,
0.21479341387748718,
-0.12380571663379669,
-0.1281566470861435,
-0.1784876585006714,
-0.010512679815292358,
0.0613335520029068,
-0.2036600410938263,
-0.0033431928604841232,
0.381186306476593,
0.22065576910972595,
-0.16431502997875214,
0.15714143216609955,
0.43301230669021606,
-0.13789820671081543,
0.48387402296066284,
-0.07346595823764801,
-0.0011865589767694473,
0.05471328645944595,
0.2082163393497467,
-0.4597419202327728,
0.14478588104248047,
0.2501409649848938,
-0.0622137077152729,
0.4288066029548645,
-0.19781556725502014,
-0.36332130432128906,
0.09644503891468048,
-0.06512318551540375,
-0.016503583639860153,
-0.13323268294334412,
0.1762126088142395,
-0.2831248342990875,
0.08376103639602661,
0.13753752410411835,
-0.015925448387861252,
0.6980902552604675,
0.004886719863861799,
0.02115568518638611,
-0.10675875097513199,
0.12121720612049103,
-0.0663992315530777,
0.017251640558242798,
0.23966369032859802,
0.08117974549531937,
0.1726081669330597,
0.09104983508586884,
-0.12290432304143906,
-0.05047691613435745,
-0.4383982717990875,
-0.13120503723621368,
0.19988936185836792,
-0.08025720715522766,
0.3007243275642395,
0.09545578807592392,
-0.1390557885169983,
-0.38064634799957275,
-0.5877682566642761,
0.018513895571231842,
-0.2711990773677826,
-0.2329491525888443,
0.5140378475189209,
0.07633274793624878,
0.11004135012626648,
0.043805431574583054,
0.12408552318811417,
0.3323761224746704,
-0.10419788211584091,
-0.01592940464615822,
-0.03921139985322952,
-0.36596012115478516,
-0.0314609669148922,
-0.02366991527378559,
-0.6017315983772278,
0.37040483951568604,
0.13439106941223145,
0.040474165230989456,
-0.4792018234729767,
0.142361581325531,
0.047359175980091095,
-0.0661911889910698,
0.07064656168222427,
0.4086323380470276,
-0.05046284198760986,
0.2938429117202759,
-0.2023874968290329,
0.30721867084503174,
-0.0948527455329895,
0.0008260142058134079,
0.0853472575545311,
-0.09316734969615936,
-0.002608763985335827,
0.14635805785655975,
-0.03688715398311615,
-0.23986969888210297,
-0.20745888352394104,
-0.08613397181034088,
0.07318004965782166,
-0.00819569081068039,
0.16517974436283112,
0.024237051606178284,
0.09530296921730042,
0.455251544713974,
-0.15042422711849213,
-0.06395993381738663,
-0.41666409373283386,
0.19386990368366241,
-0.3335472047328949,
-0.28590962290763855,
-0.22673311829566956,
-0.22947987914085388,
0.24978113174438477,
0.37177401781082153,
-0.305622935295105,
-0.1961059719324112,
-0.060211896896362305,
0.225277841091156,
-0.08177095651626587,
-0.04250358045101166,
0.2050265371799469,
-0.1281113624572754,
0.08895304799079895,
-0.14572098851203918,
-0.1033758819103241,
0.06909558922052383,
-0.242573082447052,
0.35439929366111755,
0.2895658314228058,
0.559561550617218,
0.13785044848918915,
0.9526196718215942,
0.46254509687423706,
-0.15118812024593353,
0.2041904181241989,
0.00801086239516735,
-0.13840927183628082,
-0.08577532321214676,
-0.38426482677459717,
0.2152830809354782,
-0.21003815531730652,
-0.31230413913726807,
0.1660802960395813,
-0.21497032046318054,
-0.10470382124185562,
0.08273144066333771,
0.09725312888622284,
-0.008991621434688568,
-0.10375015437602997,
0.17559707164764404,
-0.5570774078369141,
0.1904158592224121,
-0.14686040580272675,
0.24267196655273438,
-0.28692254424095154,
-0.12588267028331757,
-0.036965880542993546,
0.042445216327905655,
0.24592119455337524,
0.05157425254583359,
-0.18931061029434204,
0.019086681306362152,
-0.6127873063087463,
0.375447154045105,
0.17678643763065338,
0.6406627893447876,
0.1874258816242218,
-0.11556372791528702,
0.1879224181175232,
0.004915849305689335,
0.77994704246521,
-0.10748756676912308,
-0.23983897268772125,
-0.0036271940916776657,
-0.16696445643901825,
-0.716399073600769,
-0.4133673906326294,
-0.14693979918956757,
0.7751925587654114,
0.15553900599479675,
-0.07514557242393494,
-0.13946323096752167,
-0.033180590718984604,
0.19412249326705933,
0.07339342683553696,
-0.2068859189748764,
-0.16901437938213348,
-0.11875569820404053,
-0.37932831048965454,
-0.0894922986626625,
-0.2840985059738159,
0.051699765026569366,
0.1906181126832962,
-0.0854412168264389,
0.061272699385881424,
-0.2614085376262665,
-0.014388690702617168,
0.058354027569293976,
-0.0894988626241684,
0.16433897614479065,
-0.21373075246810913,
0.21244367957115173,
-0.012211430817842484,
0.2840591073036194,
0.48792564868927,
0.28323066234588623,
-0.0035634860396385193,
-0.5100491046905518,
0.28874078392982483,
-0.1830689013004303,
0.03784862160682678,
0.20618319511413574,
-0.18861036002635956,
0.08036187291145325,
-0.10132241249084473,
-0.02139560878276825,
-0.21097205579280853,
-0.09348896890878677,
0.30206331610679626,
0.05301293358206749,
-0.630801260471344,
-0.5626423954963684,
0.17281171679496765,
0.2680610418319702,
0.052680402994155884,
0.6681526303291321,
-0.398510217666626,
-0.271595299243927,
0.2777000665664673,
0.08388388156890869,
0.7267507910728455,
0.1485256850719452,
-0.05574839189648628,
0.23261481523513794,
0.2090155929327011,
0.01867671124637127,
0.31156283617019653,
0.23696669936180115,
-0.3453318774700165,
-0.22724512219429016,
-0.02699155919253826,
-0.1897989958524704,
0.12217864394187927,
0.18264338374137878,
-0.06328245997428894,
0.331824392080307,
-0.14366012811660767,
0.045979663729667664,
0.12700742483139038,
-0.1268922984600067,
-0.21297454833984375,
-0.13387912511825562,
0.09565135836601257,
0.08511858433485031,
0.005766041576862335,
0.2564908564090729,
-0.1728527843952179,
-0.09265751391649246,
0.06688013672828674,
-0.15552449226379395,
-0.26183897256851196,
0.04438962787389755,
-0.22300025820732117,
0.09858538210391998,
0.2456180453300476,
-0.523253858089447,
0.05012264475226402,
0.21589511632919312,
0.3522292971611023,
-0.36277249455451965,
-0.002662060782313347,
-0.029419895261526108,
0.1182432696223259,
-0.023342566564679146,
-0.2029048204421997,
-0.20772284269332886,
0.48709702491760254,
0.04055124521255493,
0.09955065697431564,
0.3205986022949219,
0.07133432477712631,
-0.4681001901626587,
-0.22823864221572876,
0.2966572642326355,
0.4771992564201355,
-0.539290726184845,
-0.23197031021118164,
-0.2508279085159302,
-0.2199196219444275,
-0.23634271323680878,
0.01044510118663311,
0.020688582211732864,
-0.2876826822757721,
0.1941118836402893,
-0.17438213527202606,
-0.12590768933296204,
0.09192598611116409,
0.5244773626327515,
0.3316218852996826,
-0.04920782893896103,
0.46102166175842285,
0.12727805972099304,
-0.07801924645900726,
0.01729956641793251,
-0.033795520663261414,
0.2742285430431366,
-0.6039995551109314,
0.3320970833301544,
-0.3019651174545288,
0.5657230615615845,
-0.0477755144238472,
0.32334062457084656,
0.01458146795630455,
0.06453482806682587,
-0.3575257956981659,
-0.2525315284729004,
-0.2616008520126343,
-0.10557268559932709,
0.01830972172319889,
0.26057830452919006,
0.052443727850914,
0.12131467461585999,
0.07276536524295807,
-0.08296569436788559,
-0.19599342346191406,
-0.1801847368478775,
-0.020596403628587723,
0.1617279052734375,
0.15081828832626343,
0.06201871857047081,
-0.10457339137792587,
0.33127525448799133,
-0.05368271470069885,
0.4063279628753662,
0.019925948232412338,
-0.15047311782836914,
-0.02763283997774124,
0.16993463039398193,
0.06052137166261673,
-0.10470755398273468,
-0.1692231297492981,
-0.20600154995918274,
0.0063546765595674515,
-0.06021157652139664,
0.289499968290329,
0.2464597523212433,
0.03991066664457321,
0.1423623412847519,
0.3173564374446869,
0.043183065950870514,
-0.08609621226787567,
0.09589485824108124,
0.10156158357858658,
0.3374262750148773,
0.17747999727725983,
0.13566836714744568,
0.1120503768324852,
-0.17338088154792786,
-0.32013294100761414,
0.12381044030189514,
0.2855205535888672,
0.2208065390586853,
-0.06243301182985306,
-0.5807867050170898,
0.12318310141563416,
0.02367234230041504,
0.18754145503044128,
0.3630831241607666,
-0.36317014694213867,
-0.10949893295764923,
0.09908908605575562,
0.055639155209064484,
0.05120840668678284,
-0.07024819403886795,
-0.18324796855449677,
0.03339734673500061,
0.022657189518213272,
0.26856154203414917,
-0.08713915199041367,
-0.22718378901481628,
0.16491255164146423,
-0.011057740077376366,
0.34742864966392517,
-0.13776054978370667,
0.10774897038936615,
0.36730876564979553,
0.15318796038627625,
0.019503679126501083,
0.3287830650806427,
0.07383757829666138,
0.06217610836029053,
0.4536159634590149,
0.04338487610220909,
0.626399576663971,
0.31339555978775024,
-0.2698841094970703,
0.10481736063957214,
-0.3597237169742584,
-0.13157646358013153,
-0.06444601714611053,
0.14289329946041107,
0.298435777425766,
0.07192455977201462,
0.4628482460975647,
-0.17626382410526276,
-0.3152376115322113,
0.048758894205093384,
-0.24236290156841278,
-0.08563830703496933,
-0.1142403781414032,
-0.39307892322540283,
-0.19821122288703918,
0.2366156280040741,
-0.02772677130997181,
-0.09085848927497864,
-0.01206505298614502,
0.1886202096939087,
-0.10143105685710907,
-0.2059578150510788,
-0.5857425332069397,
-0.17343756556510925,
0.2839129567146301,
-0.06240171939134598,
-0.12222988903522491,
0.15278378129005432,
0.12455027550458908,
0.15628226101398468,
0.15071968734264374,
0.3055027425289154,
0.4985910952091217,
0.5325033664703369,
-0.10812865197658539,
0.10503143817186356,
-0.1505066305398941,
-0.06871183961629868,
-0.015781644731760025,
0.1756817102432251,
-0.12522153556346893,
-0.14410020411014557,
0.40513643622398376,
0.06611470878124237,
-0.0606728233397007,
0.39414605498313904,
0.3221777677536011,
0.04345700889825821,
-0.23415403068065643,
0.1143152266740799,
-0.12785935401916504,
0.06544703990221024,
-0.13820314407348633,
0.015658199787139893,
-0.3902928829193115,
-0.05954161286354065,
0.3030414283275604,
-0.3966251313686371,
0.11297633498907089,
-0.03893229737877846,
0.026305414736270905,
-0.41967034339904785,
0.37585902214050293,
0.32213935256004333,
0.17387884855270386,
-0.2213015854358673,
-0.14026831090450287,
-0.10099606215953827,
0.17925885319709778,
-0.2492871880531311,
0.11362674832344055,
-0.04607975482940674,
0.31027400493621826,
-0.10726020485162735,
0.13170045614242554,
0.19803069531917572,
0.0027525518089532852,
-0.06394848227500916,
0.7769207954406738,
-0.20236623287200928,
-0.40614059567451477,
0.0042581707239151,
0.08911844342947006,
0.06590450555086136,
-0.48697689175605774,
-0.06339000165462494,
-0.09672978520393372,
0.03900202363729477,
-0.10394398868083954,
-0.25709831714630127,
0.27014395594596863,
-0.010822959244251251,
0.3218625485897064,
0.1759914606809616,
0.08218343555927277,
0.047204434871673584,
-0.03934633359313011,
-0.4764394164085388,
-0.03581363707780838,
-0.09212049096822739,
0.11862193048000336,
0.09736506640911102,
0.2948981821537018,
0.013729546219110489,
-0.133866548538208,
-0.2598080039024353,
0.35526832938194275,
0.37222999334335327,
0.06365044414997101,
-0.34397438168525696,
0.29255732893943787,
-0.40092048048973083,
0.1828521341085434,
0.01691935583949089,
0.32568907737731934,
0.2241050750017166,
0.36912253499031067,
-0.28926557302474976,
-0.3230036497116089,
0.5461325645446777,
-0.8041616082191467,
-0.35816535353660583,
0.01871420070528984,
-0.12052182853221893,
-0.007167555391788483,
-0.08189362287521362,
-0.37053993344306946,
0.08379033952951431,
0.37559548020362854,
-0.10939642041921616,
0.03163214400410652,
0.07405014336109161,
0.08921808004379272,
0.18290190398693085,
-0.08855541050434113,
0.1710422933101654,
0.20660614967346191,
-0.08259204030036926,
0.28093674778938293,
-0.32310426235198975
] |
https://github.com/huggingface/datasets/issues/2573 | Finding right block-size with JSON loading difficult for user | This was actually a second error arising from a too small block-size in the json reader.
Finding the right block size is difficult for the layman user | As reported by @thomwolf, while loading a JSON Lines file with "json" loading script, he gets
> json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 383)
| 27 | Finding right block-size with JSON loading difficult for user
As reported by @thomwolf, while loading a JSON Lines file with "json" loading script, he gets
> json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 383)
This was actually a second error arising from a too small block-size in the json reader.
Finding the right block size is difficult for the layman user | [
0.09560725092887878,
0.0020223259925842285,
-0.22474908828735352,
0.40687352418899536,
0.13413304090499878,
-0.08703840523958206,
0.35157835483551025,
0.395969957113266,
0.5053701400756836,
0.4565082788467407,
0.26593396067619324,
-0.09846646338701248,
0.022460846230387688,
-0.06383896619081497,
-0.03797750174999237,
-0.2568936049938202,
-0.2618597149848938,
0.23197436332702637,
0.1568872183561325,
0.30399006605148315,
-0.1997619867324829,
0.2665426433086395,
0.10622778534889221,
-0.16090983152389526,
0.22362340986728668,
0.05875157564878464,
0.09143234044313431,
0.09598559141159058,
-0.071193166077137,
-0.4359498620033264,
-0.04470911622047424,
-0.11516904830932617,
-0.07432733476161957,
0.4498322904109955,
-0.00009959172894014046,
0.024989590048789978,
0.3473544716835022,
-0.0728498324751854,
-0.4421043395996094,
-0.12001188099384308,
-0.06039996072649956,
-0.5030123591423035,
0.20351624488830566,
-0.1993369460105896,
-0.0218435637652874,
-0.13103237748146057,
-0.06684189289808273,
-0.10651186853647232,
0.46291112899780273,
0.12208766490221024,
0.37151992321014404,
-0.23770123720169067,
0.04564516618847847,
0.03615366294980049,
0.23812147974967957,
0.06372150778770447,
0.04116780310869217,
0.37815845012664795,
0.35164177417755127,
0.5234606266021729,
0.1095334067940712,
0.06754341721534729,
-0.07116906344890594,
-0.029821932315826416,
0.082914799451828,
-0.31869468092918396,
0.28172528743743896,
-0.048503972589969635,
0.19416776299476624,
0.242982417345047,
0.48658987879753113,
0.4166167080402374,
-0.04745625704526901,
-0.32421544194221497,
0.03228534385561943,
0.1813371479511261,
0.30770397186279297,
0.07953823357820511,
-0.253692626953125,
-0.02264242246747017,
-0.2651888430118561,
-0.06480760127305984,
-0.026416126638650894,
-0.03692597895860672,
-0.04856821894645691,
-0.09895157814025879,
-0.17258861660957336,
-0.03409448266029358,
0.15244729816913605,
-0.18617792427539825,
-0.02815241366624832,
-0.10803897678852081,
-0.3090922236442566,
-0.06386616080999374,
0.04730163514614105,
-0.17213287949562073,
0.172392800450325,
-0.4616990387439728,
0.07376053184270859,
0.01646173931658268,
0.529698371887207,
0.13096418976783752,
0.12423290312290192,
0.08389502763748169,
0.17763668298721313,
-0.008173059672117233,
-0.03590906411409378,
-0.19537708163261414,
0.14943213760852814,
0.2763276994228363,
0.1767868846654892,
-0.09238093346357346,
-0.27317574620246887,
-0.2625054121017456,
-0.23824568092823029,
0.042429253458976746,
-0.08535551279783249,
-0.13233016431331635,
-0.0086915772408247,
0.22002200782299042,
-0.4293975532054901,
-0.055188681930303574,
0.06492963433265686,
0.17276513576507568,
0.0687270238995552,
0.2640407979488373,
0.2109944373369217,
-0.03500743210315704,
-0.10697908699512482,
-0.07966647297143936,
-0.14545568823814392,
0.09867912530899048,
0.11205972731113434,
-0.19248424470424652,
0.21744103729724884,
0.14878368377685547,
0.14837096631526947,
-0.1516091376543045,
-0.3099976181983948,
-0.3423234224319458,
0.14623935520648956,
0.06353051960468292,
-0.13485875725746155,
0.2650138735771179,
0.18641218543052673,
-0.10658445954322815,
-0.23690687119960785,
-0.12289343029260635,
-0.18005681037902832,
0.25562378764152527,
-0.22079557180404663,
-0.1268773376941681,
0.024280119687318802,
0.34630271792411804,
0.024234067648649216,
0.14293181896209717,
-0.1664893925189972,
-0.06882159411907196,
0.0027222856879234314,
-0.17324292659759521,
0.07765834033489227,
-0.22820504009723663,
0.04481175169348717,
-0.20763739943504333,
-0.12216179072856903,
0.16344068944454193,
-0.3751141130924225,
-0.11200696229934692,
0.19691695272922516,
-0.05364799126982689,
0.059499066323041916,
0.3059166669845581,
-0.2070634961128235,
0.28041523694992065,
-0.08690183609724045,
-0.11960161477327347,
0.29146608710289,
0.1173437088727951,
-0.2984393835067749,
0.5185749530792236,
-0.1299729347229004,
0.24125359952449799,
0.20934775471687317,
-0.029225407168269157,
0.12712107598781586,
0.005695631727576256,
0.38845404982566833,
0.286380410194397,
0.14388000965118408,
0.2596040666103363,
-0.3090473413467407,
-0.11996534466743469,
0.0019170641899108887,
0.14288008213043213,
-0.024880308657884598,
-0.2754836678504944,
-0.09846334904432297,
-0.007682965602725744,
0.12415742129087448,
-0.2261897325515747,
-0.08081748336553574,
0.2229844629764557,
-0.006350725889205933,
-0.19714747369289398,
0.18225163221359253,
0.2619442343711853,
-0.16770926117897034,
0.02420659363269806,
-0.050612032413482666,
-0.2076396346092224,
0.0557602122426033,
0.012183550745248795,
-0.072480708360672,
-0.14528010785579681,
0.1470716893672943,
0.20623506605625153,
0.3015974462032318,
0.11803235113620758,
0.12322339415550232,
-0.21879799664020538,
0.1007843166589737,
0.06694748997688293,
0.07898006588220596,
0.046017955988645554,
-0.2172987312078476,
0.040930576622486115,
-0.05687544494867325,
-0.09332019090652466,
0.26060429215431213,
-0.08125912398099899,
-0.02841261774301529,
-0.3079864978790283,
-0.20693975687026978,
0.0034047402441501617,
0.14636023342609406,
-0.0012325495481491089,
-0.16605490446090698,
-0.1716950684785843,
-0.014264164492487907,
0.45215198397636414,
0.16409632563591003,
0.34256836771965027,
0.048831913620233536,
-0.10352752357721329,
-0.019207634031772614,
0.3329327702522278,
-0.15278519690036774,
0.09345511347055435,
-0.01455104723572731,
-0.2997951805591583,
0.40192022919654846,
0.041382815688848495,
0.12225367873907089,
-0.032162800431251526,
0.39969006180763245,
0.5543022155761719,
-0.04446231946349144,
-0.026263603940606117,
-0.16007813811302185,
-0.048927731812000275,
0.457338809967041,
-0.22589465975761414,
0.007173798978328705,
0.3564731776714325,
0.13435344398021698,
-0.1963520646095276,
-0.10522244870662689,
0.11822529137134552,
0.1299028843641281,
0.18883009254932404,
-0.06106836721301079,
-0.14877267181873322,
0.4033786952495575,
-0.47651493549346924,
0.1759028434753418,
-0.05827943980693817,
0.19233010709285736,
0.2282368540763855,
0.16661719977855682,
-0.12964309751987457,
-0.17034107446670532,
-0.29195383191108704,
-0.15980111062526703,
0.1414601355791092,
-0.21601137518882751,
-0.03839123249053955,
-0.1749049872159958,
0.017143800854682922,
0.11600735038518906,
-0.19411629438400269,
0.06344792246818542,
-0.27645373344421387,
0.18648412823677063,
0.08579982817173004,
-0.3864557445049286,
-0.2314617782831192,
-0.13422411680221558,
0.46295806765556335,
-0.12043704092502594,
0.3889085352420807,
-0.2953089475631714,
-0.08413778990507126,
-0.22624990344047546,
0.25328677892684937,
0.45521828532218933,
-0.09191206097602844,
0.0816132128238678,
-0.27492108941078186,
0.046179380267858505,
0.3471112549304962,
-0.08169658482074738,
-0.010790497064590454,
0.022842038422822952,
-0.06004954129457474,
0.0560302771627903,
0.4496859908103943,
0.08361025899648666,
0.030221179127693176,
-0.15001286566257477,
-0.07448319345712662,
-0.296172559261322,
0.2650221884250641,
-0.0021043955348432064,
-0.10489877313375473,
-0.33839473128318787,
-0.20610365271568298,
0.10786836594343185,
-0.39751216769218445,
0.4412339925765991,
0.232157364487648,
0.21205240488052368,
-0.3862468898296356,
0.21985885500907898,
0.15081650018692017,
0.18895244598388672,
0.3159153163433075,
-0.20857131481170654,
-0.4334503412246704,
0.1112232506275177,
-0.23296666145324707,
-0.42280492186546326,
0.1300276815891266,
0.13399045169353485,
0.04986141249537468,
-0.2667626738548279,
-0.48913633823394775,
0.3003758192062378,
-0.05215722322463989,
-0.2767084538936615,
-0.18896222114562988,
-0.197844460606575,
0.2448013722896576,
0.008174135349690914,
-0.19183127582073212,
0.015229664742946625,
-0.2356637418270111,
0.006149597465991974,
0.14233949780464172,
0.1480254828929901,
-0.18868353962898254,
0.6826393008232117,
-0.010388344526290894,
0.04462326318025589,
0.13030757009983063,
0.07064484804868698,
0.06574643403291702,
0.31564706563949585,
0.02407526597380638,
-0.2853398323059082,
0.3214402496814728,
0.19704630970954895,
0.1434590369462967,
-0.08170017600059509,
0.28952765464782715,
0.03715318813920021,
-0.21428212523460388,
-0.14105360209941864,
-0.4289245903491974,
-0.27347442507743835,
-0.2403487265110016,
0.36846092343330383,
-0.05897997319698334,
-0.396816611289978,
-0.2104891538619995,
0.20315128564834595,
-0.1731850504875183,
0.0008150069043040276,
-0.11522521078586578,
0.13869187235832214,
0.19254957139492035,
-0.005892868619412184,
-0.17098242044448853,
-0.07648947834968567,
-0.2906215488910675,
0.5571375489234924,
0.08538954704999924,
0.05335494503378868,
-0.0164593867957592,
-0.06851257383823395,
0.17355412244796753,
-0.31878310441970825,
0.35565680265426636,
0.057548291981220245,
-0.07625789940357208,
0.04245385900139809,
0.04486526548862457,
-0.2691234350204468,
-0.0734236016869545,
0.07145103812217712,
0.06392780691385269,
0.3373167812824249,
0.09444673359394073,
-0.33519840240478516,
0.043435920029878616,
0.07787395268678665,
0.0335208959877491,
-0.09207664430141449,
-0.4355369806289673,
-0.19809886813163757,
-0.3307770788669586,
-0.35833773016929626,
0.028831779956817627,
-0.1152268648147583,
0.18731026351451874,
0.09755700826644897,
-0.4058392643928528,
0.26246178150177,
-0.1972237229347229,
-0.059740692377090454,
0.20774906873703003,
-0.09002703428268433,
-0.14619071781635284,
0.06064600124955177,
0.0556645467877388,
0.21915490925312042,
0.4232972264289856,
0.5937586426734924,
0.36189284920692444,
0.14258697628974915,
0.3213869631290436,
-0.20365968346595764,
0.2121599167585373,
0.28896230459213257,
0.12376725673675537,
-0.0542602613568306,
-0.02534811943769455,
0.3709651827812195,
0.1296098530292511,
-0.2740961015224457,
0.08584972470998764,
-0.030942395329475403,
-0.11933715641498566,
-0.16538356244564056,
0.24414941668510437,
-0.2641581892967224,
0.1816568225622177,
0.19782020151615143,
-0.26163721084594727,
-0.1393805295228958,
0.39201581478118896,
0.012142851948738098,
0.951680600643158,
0.011781547218561172,
-0.040724921971559525,
0.20595645904541016,
-0.6339956521987915,
0.27034178376197815,
-0.5762805342674255,
0.09212041646242142,
-0.2677563726902008,
0.4031214118003845,
0.09431073814630508,
-0.10345527529716492,
0.04419213905930519,
0.05012910068035126,
-0.2925867438316345,
-0.0953403040766716,
-0.25732696056365967,
-0.19213947653770447,
-0.3197349011898041,
0.37545132637023926,
-0.3018941283226013,
-0.09327337145805359,
-0.2033962458372116,
0.29149386286735535,
-0.13134312629699707,
0.005947839468717575,
-0.10167580842971802,
-0.09612960368394852,
-0.2755260169506073,
-0.30083513259887695,
-0.25411325693130493,
0.18009471893310547,
0.07812278717756271,
0.0260462686419487,
0.19262662529945374,
-0.0724613294005394,
-0.011842389591038227,
-0.3353951871395111,
-0.08610838651657104,
0.14241211116313934,
-0.07682857662439346,
0.2569773495197296,
-0.24752914905548096,
-0.10778705775737762,
0.003348181489855051,
0.20063923299312592,
0.16158783435821533,
-0.3208278715610504,
-0.18109658360481262,
0.07098852097988129,
-0.11862406879663467,
-0.1217607706785202,
-0.14463336765766144,
-0.00398535281419754,
-0.4416053295135498,
-0.3048270642757416,
-0.3690401315689087,
-0.14542372524738312,
-0.06766647100448608,
0.017794951796531677,
0.31722524762153625,
0.16013991832733154,
0.06667515635490417,
-0.23746678233146667,
0.1774478256702423,
-0.2549627423286438,
-0.2523486614227295,
-0.0809461697936058,
0.23650112748146057,
-0.027906397357583046,
0.36305946111679077,
0.01311207190155983,
-0.2868364453315735,
-0.30171695351600647,
0.05834934115409851,
0.30814898014068604,
-0.0034958869218826294,
0.1487829089164734,
-0.08472845703363419,
-0.16034086048603058,
0.09760420024394989,
0.09242510795593262,
0.13856381177902222,
0.06123996153473854,
0.2169470638036728,
-0.32123953104019165,
-0.24780185520648956,
0.20879067480564117,
0.013716582208871841,
0.21620652079582214,
0.007368914783000946,
-0.04637110233306885,
-0.09441926330327988,
0.21173307299613953,
-0.41288602352142334,
-0.0015193107537925243,
-0.13172931969165802,
-0.05688852071762085,
-0.3676459789276123,
-0.0979960635304451,
-0.12117038667201996,
0.0854506641626358,
0.2758597433567047,
0.3163309693336487,
-0.1931314766407013,
-0.3425486385822296,
-0.045851558446884155,
0.023578643798828125,
0.05985777825117111,
0.019914139062166214,
-0.08805680274963379,
0.004692971706390381,
-0.03128298372030258,
-0.0007752161473035812,
0.16499505937099457,
-0.20546793937683105,
-0.07883709669113159,
-0.07329680025577545,
0.09964950382709503,
0.01627388596534729,
-0.051150113344192505,
0.2448522299528122,
-0.13587400317192078,
0.6824113130569458,
-0.08615744113922119,
0.04785923659801483,
-0.06142563372850418,
0.1209924966096878,
-0.23351401090621948,
0.29434385895729065,
0.05738944932818413,
0.2390204668045044,
0.34253647923469543,
-0.08673490583896637,
0.2997988760471344,
-0.1794268637895584,
-0.136396124958992,
0.35002437233924866,
-0.23319539427757263,
0.18836639821529388,
-0.14897853136062622,
0.3308042883872986,
0.03687775135040283,
-0.03386048600077629,
0.06003629043698311,
-0.0045380135998129845,
-0.19606241583824158,
0.08690205216407776,
-0.04631020501255989,
-0.20426109433174133,
-0.03843700885772705,
0.1573483943939209,
0.11589576303958893,
-0.0035343151539564133,
-0.2411174774169922,
0.03615983948111534,
-0.3862701952457428,
-0.18311719596385956,
0.13989312946796417,
-0.08151133358478546,
0.3740170896053314,
0.05272884666919708,
-0.041746266186237335,
-0.14098848402500153,
0.1649288833141327,
0.3472921848297119,
-0.22075620293617249,
-0.3389635980129242,
0.3110889792442322,
0.3915054202079773,
-0.11169713735580444,
0.2904820442199707,
0.39676761627197266,
-0.2645711600780487,
0.005297694355249405,
0.30958786606788635,
-0.44202858209609985,
0.06611035764217377,
-0.29671111702919006,
-0.04673906788229942,
-0.3116159439086914,
-0.12246072292327881,
-0.2448616325855255,
0.16460895538330078,
-0.06350745260715485,
-0.026844210922718048,
-0.23675945401191711,
0.2867298722267151,
-0.23560933768749237,
0.08392291516065598,
0.08723311126232147,
-0.3086813688278198,
0.09866895526647568,
-0.38152366876602173,
0.1971350461244583,
0.27082788944244385,
-0.11814761161804199,
0.25438156723976135,
-0.1871209293603897,
0.3644882142543793,
0.2129339724779129,
-0.01978146657347679,
-0.07838331907987595,
-0.07133740186691284,
-0.1270238608121872,
-0.17732778191566467,
0.4721388816833496,
0.4094122350215912,
0.08813285827636719,
0.12953072786331177,
0.3142966628074646,
-0.3490208387374878,
0.19093839824199677,
0.12903587520122528,
0.01876802369952202,
-0.14864569902420044,
0.05498536303639412,
-0.25352126359939575,
-0.1547025889158249,
-0.2582298219203949,
-0.33179932832717896,
-0.36162492632865906,
-0.35570046305656433,
-0.21504977345466614,
0.024076376110315323,
0.07568775862455368,
-0.056570615619421005,
0.1521945595741272,
-0.011787030845880508,
0.40910226106643677,
0.08521731197834015,
-0.11887329071760178,
0.19340035319328308,
-0.0815611481666565,
-0.04504866898059845,
0.17816287279129028,
-0.3505961000919342,
0.039382316172122955,
-0.014667483046650887,
0.1155027449131012,
0.17725498974323273,
-0.013780981302261353,
0.19609956443309784,
0.3159482181072235,
-0.05884808674454689,
-0.04660319536924362,
-0.23276348412036896,
0.0024326294660568237,
0.4833308458328247,
-0.15353518724441528,
-0.051349010318517685,
-0.08875959366559982,
0.2628231644630432,
-0.2804346978664398,
0.273272305727005,
-0.07505303621292114,
0.020909570157527924,
0.05706336721777916,
0.2809637784957886,
0.293718159198761,
0.05457448959350586,
0.34087425470352173,
-0.11816427111625671,
-0.20743101835250854,
0.014820512384176254,
-0.048255447298288345,
0.09121602773666382,
0.345508873462677,
0.11855082213878632,
0.3530789017677307,
-0.011294130235910416,
0.09725460410118103,
-0.06529006361961365,
0.10413359105587006,
-0.5952882766723633,
0.07623124122619629,
-0.15693700313568115,
-0.10087244212627411,
-0.14793425798416138,
0.21448391675949097,
0.1892668455839157,
0.07806853204965591,
0.03988557681441307,
-0.22508130967617035,
-0.2369154393672943,
0.12933187186717987,
0.23316773772239685,
0.10529279708862305,
-0.18173687160015106,
0.2494724839925766,
0.01622609794139862,
-0.24580106139183044,
-0.007424214854836464,
-0.43582597374916077,
0.23348531126976013,
0.27247485518455505,
-0.07109133154153824,
0.03120018169283867,
0.2523406147956848,
0.03913305699825287,
-0.024858221411705017,
-0.10256321728229523,
0.3251880705356598,
0.1013382226228714,
0.03392833471298218,
-0.19108383357524872,
-0.186894491314888
] |
https://github.com/huggingface/datasets/issues/2569 | Weights of model checkpoint not initialized for RobertaModel for Bertscore | Hi @suzyahyah, thanks for reporting.
The message you get is indeed not an error message, but a warning coming from Hugging Face `transformers`. The complete warning message is:
```
Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.dense.weight', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.bias', 'lm_head.layer_norm.weight']
- This IS expected if you are initializing RobertaModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing RobertaModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
```
In this case, this behavior IS expected and you can safely ignore the warning message.
The reason is that you are just using RoBERTa to get the contextual embeddings of the input sentences/tokens, thus leaving away its head layer, whose weights are ignored.
Feel free to reopen this issue if you need further explanations. | When applying bertscore out of the box,
```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']```
Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html
```
from datasets import load_metric
metric = load_metric('bertscore')
# Example of typical usage
for batch in dataset:
inputs, references = batch
predictions = model(inputs)
metric.add_batch(predictions=predictions, references=references)
score = metric.compute(lang="en")
#score = metric.compute(model_type="roberta-large") # gives the same error
```
I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo....
## Environment info
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27
- Python version: 3.9.5
- PyArrow version: 3.0.0
| 167 | Weights of model checkpoint not initialized for RobertaModel for Bertscore
When applying bertscore out of the box,
```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']```
Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html
```
from datasets import load_metric
metric = load_metric('bertscore')
# Example of typical usage
for batch in dataset:
inputs, references = batch
predictions = model(inputs)
metric.add_batch(predictions=predictions, references=references)
score = metric.compute(lang="en")
#score = metric.compute(model_type="roberta-large") # gives the same error
```
I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo....
## Environment info
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27
- Python version: 3.9.5
- PyArrow version: 3.0.0
Hi @suzyahyah, thanks for reporting.
The message you get is indeed not an error message, but a warning coming from Hugging Face `transformers`. The complete warning message is:
```
Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.dense.weight', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.bias', 'lm_head.layer_norm.weight']
- This IS expected if you are initializing RobertaModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing RobertaModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
```
In this case, this behavior IS expected and you can safely ignore the warning message.
The reason is that you are just using RoBERTa to get the contextual embeddings of the input sentences/tokens, thus leaving away its head layer, whose weights are ignored.
Feel free to reopen this issue if you need further explanations. | [
-0.05955140292644501,
-0.3645302355289459,
0.09010997414588928,
0.1289699673652649,
0.4273757338523865,
0.07482657581567764,
0.2718195915222168,
0.12423455715179443,
0.12511079013347626,
0.13339732587337494,
-0.1491389274597168,
0.2172146588563919,
-0.14552871882915497,
-0.06434860080480576,
-0.07166080176830292,
-0.21964922547340393,
0.14321884512901306,
-0.04994417726993561,
-0.20941650867462158,
-0.1764126420021057,
-0.1302686184644699,
0.18646523356437683,
-0.2054329365491867,
0.12439940869808197,
-0.35857656598091125,
0.17077316343784332,
0.028424782678484917,
0.39523351192474365,
0.05667651444673538,
-0.4421781003475189,
0.4252820312976837,
-0.0705895870923996,
0.1829729676246643,
0.48779913783073425,
-0.00012287140998523682,
0.006460756063461304,
0.22131913900375366,
-0.054087381809949875,
-0.03130949288606644,
-0.17736004292964935,
0.09162794798612595,
-0.24075442552566528,
0.12993764877319336,
-0.08467623591423035,
0.08507244288921356,
0.1098492369055748,
-0.09713150560855865,
-0.09177754819393158,
0.4431147575378418,
-0.020381294190883636,
0.07553434371948242,
0.6024707555770874,
0.07637347280979156,
-0.14947229623794556,
0.04606715962290764,
-0.13142773509025574,
0.031353652477264404,
0.7358220219612122,
-0.15314440429210663,
-0.02085312083363533,
-0.09856771677732468,
0.3127399981021881,
0.10292738676071167,
0.32584884762763977,
0.2433316707611084,
-0.0050741033628582954,
0.08904896676540375,
-0.02166866883635521,
-0.31730949878692627,
0.3472052216529846,
-0.09817170351743698,
-0.1046694740653038,
-0.21882419288158417,
-0.2243627905845642,
0.08870193362236023,
-0.24747005105018616,
0.1257457733154297,
-0.0246978048235178,
0.03812595456838608,
0.17200355231761932,
-0.2667010724544525,
-0.06690725684165955,
0.06769482791423798,
-0.08495323359966278,
0.12942209839820862,
-0.10388302803039551,
-0.33123674988746643,
0.04944988712668419,
0.559544026851654,
0.01940656080842018,
-0.4946099519729614,
-0.03328171744942665,
0.00935111939907074,
0.12921516597270966,
-0.19817449152469635,
0.025222353637218475,
0.25621235370635986,
0.3080790042877197,
0.20156094431877136,
-0.04417020082473755,
0.09021959453821182,
0.04756583645939827,
-0.1666264533996582,
0.022741902619600296,
0.0656774640083313,
0.3708825409412384,
-0.1095074936747551,
-0.0424453541636467,
0.1951092630624771,
0.45218074321746826,
0.25142842531204224,
-0.12598177790641785,
-0.20472246408462524,
-0.12008661031723022,
0.07826551795005798,
-0.11536750942468643,
0.06222093850374222,
-0.15270018577575684,
-0.43660885095596313,
-0.024324137717485428,
-0.04797295853495598,
-0.2746995687484741,
0.45817580819129944,
0.24768665432929993,
-0.03650083765387535,
0.20260915160179138,
-0.14513269066810608,
0.32586342096328735,
-0.19851650297641754,
0.0236697755753994,
-0.19167053699493408,
0.035991597920656204,
-0.5499856472015381,
0.11294037848711014,
0.15253962576389313,
-0.5149904489517212,
0.3871532380580902,
0.012197564356029034,
0.48986369371414185,
0.04773084819316864,
-0.13632513582706451,
-0.06477668881416321,
0.07563839107751846,
0.30327850580215454,
-0.055581897497177124,
0.3049110174179077,
0.3483041226863861,
0.24838046729564667,
-0.1436178833246231,
-0.112742118537426,
-0.3222939968109131,
-0.4240390658378601,
0.3303534984588623,
-0.024922102689743042,
-0.20130163431167603,
-0.0021150074899196625,
-0.6301633715629578,
0.14430983364582062,
0.061641138046979904,
0.038633961230516434,
-0.08295058459043503,
0.13722804188728333,
-0.10973237454891205,
0.033897798508405685,
0.46194928884506226,
0.591276228427887,
-0.45593559741973877,
-0.38315585255622864,
0.017559897154569626,
-0.03730707988142967,
0.2624935805797577,
0.5404413342475891,
-0.26629671454429626,
0.24907705187797546,
-0.11831523478031158,
-0.13417033851146698,
-0.09093310683965683,
-0.29906269907951355,
-0.19871249794960022,
-0.11494602262973785,
0.18600089848041534,
0.03293786942958832,
0.10318822413682938,
-0.38802576065063477,
-0.5773240327835083,
-0.1748376190662384,
0.07779352366924286,
-0.1614881008863449,
0.0580873116850853,
0.03551904112100601,
-0.20556685328483582,
-0.23086704313755035,
0.026876017451286316,
0.28113025426864624,
-0.14028501510620117,
0.09050948172807693,
-0.2136240005493164,
0.1375383585691452,
-0.08840758353471756,
-0.15370573103427887,
-0.04066240042448044,
-0.04370596259832382,
0.12335562705993652,
-0.14139866828918457,
0.05598350241780281,
0.19833984971046448,
-0.07951018959283829,
0.2182411551475525,
0.08722687512636185,
0.03308985382318497,
0.17453014850616455,
0.08005565404891968,
-0.27939102053642273,
-0.09997095167636871,
-0.050696488469839096,
-0.08245451748371124,
-0.08761833608150482,
0.07344690710306168,
0.04358309134840965,
-0.032528460025787354,
-0.4597764313220978,
-0.15592488646507263,
-0.3609878420829773,
0.1635390818119049,
-0.16091933846473694,
0.051407039165496826,
-0.03611350804567337,
0.0468633770942688,
0.029903605580329895,
0.3188657760620117,
-0.0681629404425621,
-0.2337535172700882,
-0.006347754970192909,
0.3686251938343048,
0.03997809812426567,
-0.0959596335887909,
0.27410492300987244,
-0.003535822033882141,
0.17286252975463867,
-0.1739954799413681,
-0.11879285424947739,
-0.11496584117412567,
0.04766344651579857,
0.0078631192445755,
-0.16236063838005066,
0.3741193413734436,
-0.03987046703696251,
0.12987644970417023,
0.12235213816165924,
-0.0840320736169815,
0.1379925161600113,
0.04202276095747948,
-0.09508002549409866,
-0.21517549455165863,
0.12944835424423218,
0.1283428966999054,
0.5055880546569824,
-0.14933347702026367,
-0.10570299625396729,
-0.5590156316757202,
-0.010148253291845322,
0.023932330310344696,
-0.02594834566116333,
0.22203615307807922,
-0.2602648138999939,
0.07511543482542038,
-0.16238093376159668,
-0.3754821717739105,
0.3970051407814026,
0.04896431043744087,
0.0447651632130146,
-0.0641901046037674,
0.09653817862272263,
-0.166230708360672,
-0.1341758370399475,
0.40337419509887695,
-0.13831475377082825,
0.05579909309744835,
-0.04708658903837204,
0.00685442890971899,
-0.23365500569343567,
0.057777080684900284,
-0.010369284078478813,
0.04811633750796318,
-0.5006844997406006,
0.24514444172382355,
0.09582320600748062,
0.21314847469329834,
-0.23105676472187042,
-0.6032777428627014,
-0.2174273580312729,
-0.12178727239370346,
0.0403476282954216,
-0.07381319999694824,
0.07247155904769897,
0.27598628401756287,
0.3919840455055237,
0.6198561191558838,
-0.05383539944887161,
0.16589683294296265,
-0.3506980240345001,
0.03073892742395401,
-0.0841744989156723,
0.0006196890026330948,
0.02819564938545227,
-0.2045590877532959,
-0.10483287274837494,
-0.39256832003593445,
-0.031824372708797455,
0.15363232791423798,
-0.34455162286758423,
0.18958769738674164,
-0.34014272689819336,
0.3981803357601166,
0.317383348941803,
-0.060804128646850586,
-0.14565587043762207,
-0.2803351581096649,
0.37739142775535583,
-0.1592208296060562,
-0.0017577223479747772,
-0.018114151433110237,
-0.13464099168777466,
-0.02191932685673237,
-0.036118242889642715,
0.0024105533957481384,
-0.04666265845298767,
-0.120004802942276,
0.24882273375988007,
0.27807408571243286,
-0.13491405546665192,
-0.008103319443762302,
0.1877330094575882,
0.3090739846229553,
-0.2970650792121887,
-0.10219930857419968,
-0.15301702916622162,
-0.6735306978225708,
0.4321499466896057,
-0.100626640021801,
-0.2623511552810669,
-0.16792437434196472,
0.03182853385806084,
0.39105135202407837,
-0.4273378849029541,
-0.277667760848999,
-0.3598834276199341,
-0.14452150464057922,
-0.0678405612707138,
0.13984476029872894,
0.3970991373062134,
-0.07788373529911041,
-0.14324833452701569,
0.022399956360459328,
-0.09999968856573105,
-0.13302430510520935,
0.09726019203662872,
-0.1907605528831482,
0.3079792559146881,
-0.3312952220439911,
0.23096901178359985,
-0.3256835341453552,
0.9833396673202515,
0.20836882293224335,
-0.23818136751651764,
0.5505985021591187,
0.1054869145154953,
0.37765225768089294,
-0.17890086770057678,
-0.1699354350566864,
0.025700511410832405,
-0.0011682361364364624,
0.27715814113616943,
0.18564286828041077,
0.11748303472995758,
0.25268641114234924,
-0.15811321139335632,
-0.22270682454109192,
-0.05869881436228752,
-0.184590145945549,
-0.09227503836154938,
0.1744086891412735,
0.04045150429010391,
0.04340629652142525,
-0.10814003646373749,
-0.1012125015258789,
-0.060181085020303726,
0.2614690959453583,
0.33916550874710083,
0.21639423072338104,
-0.15307262539863586,
-0.1500357836484909,
0.0009442383889108896,
-0.5353906750679016,
0.23430591821670532,
-0.1653892695903778,
-0.10559749603271484,
0.20815835893154144,
-0.34111472964286804,
0.14828792214393616,
0.11747664213180542,
0.4149765372276306,
0.29353976249694824,
0.00046374276280403137,
-0.23370707035064697,
-0.0740325078368187,
-0.25775420665740967,
-0.02457834966480732,
-0.29152917861938477,
-0.16116461157798767,
0.5257952809333801,
0.4730904996395111,
-0.431652694940567,
-0.08333144336938858,
0.1507505476474762,
-0.011032210662961006,
-0.06403624266386032,
-0.19303856790065765,
-0.5834471583366394,
0.024098753929138184,
-0.18103745579719543,
0.16330495476722717,
-0.010339304804801941,
0.14439231157302856,
-0.05863383412361145,
0.3244636058807373,
-0.036930449306964874,
-0.20634117722511292,
0.2530866861343384,
0.36826053261756897,
0.18761932849884033,
0.07788973301649094,
0.2066570669412613,
0.553992509841919,
-0.00008788332343101501,
0.5046095848083496,
0.6657981872558594,
-0.16011330485343933,
-0.37936607003211975,
0.17520949244499207,
0.2613638639450073,
0.17795711755752563,
0.24542012810707092,
-0.07183675467967987,
-0.14522463083267212,
0.2186291217803955,
0.38470959663391113,
-0.41839349269866943,
0.24986796081066132,
0.35491153597831726,
0.15096086263656616,
-0.19044595956802368,
-0.17206445336341858,
0.4522174596786499,
0.04339464381337166,
-0.011008471250534058,
-0.05590435862541199,
0.39447981119155884,
0.0250465776771307,
0.19341321289539337,
0.13150690495967865,
0.9412789344787598,
-0.14044423401355743,
0.2894340753555298,
0.2644689083099365,
0.38199687004089355,
0.4347309172153473,
0.07802621275186539,
-0.04741808772087097,
-0.11103066802024841,
0.009981011040508747,
0.003928078338503838,
-0.08043184876441956,
0.17722943425178528,
0.033002179116010666,
-0.14410531520843506,
0.3068508505821228,
-0.19445621967315674,
0.000601939857006073,
-0.2966683804988861,
-0.022542769089341164,
-0.05082888901233673,
-0.2607228755950928,
-0.30465051531791687,
-0.03994327411055565,
0.20541346073150635,
0.43038469552993774,
-0.040381863713264465,
-0.053184181451797485,
0.0336158312857151,
-0.3173627257347107,
-0.042304929345846176,
0.10695300251245499,
-0.02350160852074623,
-0.11785876750946045,
0.43491166830062866,
0.0037766695022583008,
0.24928441643714905,
0.06360611319541931,
0.650044322013855,
0.054843075573444366,
-0.2759629786014557,
0.3410859704017639,
-0.02605830878019333,
-0.02719954028725624,
-0.15030740201473236,
0.0005940059199929237,
0.2195635288953781,
0.09232116490602493,
-0.1672549545764923,
-0.003106720745563507,
-0.07321704179048538,
-0.003441985696554184,
-0.260165274143219,
0.019946493208408356,
0.19876182079315186,
-0.36437052488327026,
0.08521360158920288,
0.16905342042446136,
0.1256234347820282,
-0.09792909026145935,
0.015878694131970406,
0.007337629795074463,
-0.08042291551828384,
0.08515499532222748,
0.14134524762630463,
-0.255751371383667,
-0.15326695144176483,
0.4424974322319031,
-0.3505527377128601,
0.07702634483575821,
0.4665476083755493,
-0.15390245616436005,
-0.12734481692314148,
0.0990455374121666,
-0.27186647057533264,
0.7606886625289917,
-0.8098618984222412,
-0.006165522150695324,
0.4467019736766815,
0.16769932210445404,
0.15875135362148285,
0.4819999635219574,
0.48682284355163574,
-0.17039906978607178,
-0.0927320346236229,
-0.13184787333011627,
-0.286713570356369,
0.13729849457740784,
-0.1310381293296814,
0.009123887866735458,
-0.07411445677280426,
0.15044108033180237,
0.07577462494373322,
0.3769203722476959,
-0.16603133082389832,
0.13142280280590057,
0.04327206313610077,
-0.10043708980083466,
-0.06263567507266998,
-0.024275466799736023,
0.5027930736541748,
0.07487152516841888,
-0.02758965454995632,
0.023712698370218277,
-0.21352015435695648,
-0.05192733556032181,
-0.38965266942977905,
0.16085396707057953,
0.014339256100356579,
-0.24315202236175537,
0.031434059143066406,
0.09870056062936783,
-0.02994035929441452,
-0.2585272490978241,
-0.015944983810186386,
-0.07647819817066193,
0.09711840748786926,
-0.11209550499916077,
0.51112961769104,
0.008967924863100052,
-0.06620225310325623,
-0.14083436131477356,
0.14277231693267822,
0.0031536519527435303,
0.23349393904209137,
-0.17554683983325958,
-0.12018759548664093,
-0.04540792480111122,
0.11871591210365295,
0.05546994507312775,
0.377325177192688,
0.039818596094846725,
-0.00469689816236496,
0.047022923827171326,
-0.010890442878007889,
-0.11050047725439072,
0.355895459651947,
0.3031347692012787,
-0.08427745848894119,
-0.2095184028148651,
0.22649505734443665,
0.044575389474630356,
-0.2369074523448944,
-0.09327079355716705,
-0.1619817167520523,
0.26364797353744507,
-0.00856931135058403,
0.2554124891757965,
0.17255401611328125,
0.30137839913368225,
0.09277933090925217,
-0.03704610466957092,
0.056147102266550064,
0.03793353959918022,
-0.06547321379184723,
0.20983438193798065,
-0.16697122156620026,
0.21814033389091492,
0.7928681373596191,
0.2075888216495514,
0.2908729612827301,
0.1803370714187622,
-0.16503414511680603,
0.4212493300437927,
-0.43395325541496277,
0.149448424577713,
-0.24490973353385925,
-0.5602256655693054,
-0.09037856757640839,
0.16664069890975952,
0.1425822377204895,
-0.15244102478027344,
-0.19337105751037598,
0.7876691818237305,
-0.08484601974487305,
0.0509212352335453,
-0.1816953718662262,
0.20015354454517365,
0.07819166779518127,
-0.5429611206054688,
-0.06517333537340164,
-0.12709370255470276,
0.023091092705726624,
-0.05504743754863739,
0.025203745812177658,
-0.11963145434856415,
0.3264276385307312,
-0.05051284283399582,
-0.05696474015712738,
-0.1790408194065094,
-0.6971861124038696,
0.23219099640846252,
0.2278519570827484,
-0.05209185928106308,
0.07362018525600433,
0.34924858808517456,
-0.14551547169685364,
0.26863983273506165,
0.4473612606525421,
0.4319790303707123,
0.12885916233062744,
0.22525818645954132,
-0.05701408162713051,
0.05038592591881752,
0.18688660860061646,
-0.1474190056324005,
0.4391912519931793,
0.23233452439308167,
0.16571597754955292,
0.04753577336668968,
0.052257075905799866,
-0.17269021272659302,
0.14416520297527313,
-0.3620408773422241,
0.4175059497356415,
-0.26809272170066833,
0.47268983721733093,
-0.2722770571708679,
0.13673725724220276,
-0.3582395017147064,
0.15176068246364594,
-0.3563917279243469,
0.6355627775192261,
0.15263168513774872,
-0.0697699710726738,
-0.09933894127607346,
-0.15458287298679352,
-0.014133702032268047,
0.1526898592710495,
0.5159003138542175,
0.3221854865550995,
-0.12461980432271957,
-0.5601328015327454,
-0.06785660982131958,
-0.5862095355987549,
0.1026226207613945,
-0.03933930769562721,
0.3152090609073639,
-0.040727607905864716,
0.02827237732708454,
-0.07196108251810074,
0.15203610062599182,
-0.01688563823699951,
-0.39003220200538635,
-0.2657366693019867,
-0.15659858286380768,
-0.126996248960495,
0.08411186933517456,
-0.5294074416160583,
-0.03484450280666351,
-0.00589769147336483,
0.06179489940404892,
0.09427671134471893,
0.04563755914568901,
-0.15669167041778564,
-0.01668238267302513,
-0.06487401574850082,
-0.07052382826805115,
0.35788848996162415,
0.18269288539886475,
0.008709940128028393,
0.3180009126663208,
0.014898799359798431,
-0.037020813673734665,
-0.11539468169212341,
-0.24762414395809174,
-0.140077143907547,
-0.08103495091199875,
-0.1806665062904358,
0.0882517397403717,
-0.36460062861442566,
-0.21000711619853973,
-0.4426749348640442,
0.08655043691396713,
0.2546905279159546,
-0.27440914511680603,
-0.37571027874946594,
0.010777434334158897,
-0.029531899839639664,
-0.13683271408081055,
0.09297079592943192,
0.3709932565689087,
0.040709711611270905,
0.30607810616493225,
-0.27776575088500977,
0.009957125410437584,
0.744199812412262,
-0.5834292769432068,
0.09641857445240021,
-0.11244174093008041,
0.04880644381046295,
0.2738860249519348,
-0.4745754301548004,
-0.9858576059341431,
0.23803585767745972,
0.26440903544425964,
0.1279466450214386,
-0.44003409147262573,
0.14393888413906097,
-0.25242146849632263,
0.09903962910175323,
-0.1626119166612625,
0.2319546341896057,
-0.017027579247951508,
-0.22710256278514862,
0.03104277327656746,
-0.19647040963172913
] |
https://github.com/huggingface/datasets/issues/2569 | Weights of model checkpoint not initialized for RobertaModel for Bertscore | Hi @suzyahyah, I have created a Pull Request to filter out that warning message in this specific case, since the behavior is as expected and the warning message can only cause confusion for users (as in your case). | When applying bertscore out of the box,
```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']```
Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html
```
from datasets import load_metric
metric = load_metric('bertscore')
# Example of typical usage
for batch in dataset:
inputs, references = batch
predictions = model(inputs)
metric.add_batch(predictions=predictions, references=references)
score = metric.compute(lang="en")
#score = metric.compute(model_type="roberta-large") # gives the same error
```
I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo....
## Environment info
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27
- Python version: 3.9.5
- PyArrow version: 3.0.0
| 38 | Weights of model checkpoint not initialized for RobertaModel for Bertscore
When applying bertscore out of the box,
```Some weights of the model checkpoint at roberta-large were not used when initializing RobertaModel: ['lm_head.decoder.weight', 'lm_head.bias', 'lm_head.dense.bias', 'lm_head.layer_norm.bias', 'lm_head.dense.weight', 'lm_head.layer_norm.weight']```
Following the typical usage from https://huggingface.co/docs/datasets/loading_metrics.html
```
from datasets import load_metric
metric = load_metric('bertscore')
# Example of typical usage
for batch in dataset:
inputs, references = batch
predictions = model(inputs)
metric.add_batch(predictions=predictions, references=references)
score = metric.compute(lang="en")
#score = metric.compute(model_type="roberta-large") # gives the same error
```
I am concerned about this because my usage shouldn't require any further fine-tuning and most people would expect to use BertScore out of the box? I realised the huggingface code is a wrapper around https://github.com/Tiiiger/bert_score, but I think this repo is anyway relying on the model code and weights from huggingface repo....
## Environment info
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1041-aws-x86_64-with-glibc2.27
- Python version: 3.9.5
- PyArrow version: 3.0.0
Hi @suzyahyah, I have created a Pull Request to filter out that warning message in this specific case, since the behavior is as expected and the warning message can only cause confusion for users (as in your case). | [
-0.1506316214799881,
-0.2975349724292755,
0.07905331254005432,
0.051351696252822876,
0.464754581451416,
0.04057648777961731,
0.19793567061424255,
0.19078664481639862,
0.1385853886604309,
0.20844943821430206,
-0.13037778437137604,
0.28699275851249695,
-0.12756748497486115,
-0.08662085980176926,
-0.12382170557975769,
-0.19499941170215607,
0.11293122917413712,
-0.09181924164295197,
-0.20666277408599854,
-0.17726212739944458,
-0.16807231307029724,
0.10757885128259659,
-0.2270771563053131,
0.0877477154135704,
-0.26475536823272705,
0.11802419275045395,
0.11581724882125854,
0.3999866843223572,
-0.02794363535940647,
-0.549696683883667,
0.41295236349105835,
-0.10248126089572906,
0.183232381939888,
0.43219736218452454,
-0.0001184049979201518,
-0.035061754286289215,
0.23120276629924774,
-0.06429608166217804,
-0.027249617502093315,
-0.1799435168504715,
0.07141540944576263,
-0.21532617509365082,
0.19079017639160156,
-0.0851074755191803,
0.09625095874071121,
0.1106516569852829,
-0.06385165452957153,
-0.09772821515798569,
0.2969878911972046,
0.014701285399496555,
0.1060963124036789,
0.5801311731338501,
0.09152504801750183,
-0.20335853099822998,
0.05621509253978729,
-0.24340559542179108,
-0.010716453194618225,
0.7996889352798462,
-0.11941343545913696,
0.021115237846970558,
-0.1755492091178894,
0.3603534400463104,
0.04700004309415817,
0.4131554961204529,
0.2314976155757904,
-0.045054588466882706,
0.14585983753204346,
-0.014076359570026398,
-0.28619110584259033,
0.3633509874343872,
-0.04959333688020706,
-0.09925466030836105,
-0.14347681403160095,
-0.1704602986574173,
0.1701112538576126,
-0.32355305552482605,
0.1518208384513855,
-0.020736681297421455,
-0.004941013641655445,
0.17676599323749542,
-0.18568064272403717,
-0.009638691321015358,
0.03920622169971466,
-0.025586359202861786,
0.11223436892032623,
-0.10806407034397125,
-0.30888211727142334,
0.07158028334379196,
0.5233253836631775,
0.021915599703788757,
-0.5161133408546448,
0.04425158351659775,
-0.015839334577322006,
0.1050252690911293,
-0.22155608236789703,
0.03718769550323486,
0.27684834599494934,
0.35564038157463074,
0.29213589429855347,
-0.05160990357398987,
0.13288216292858124,
0.049579620361328125,
-0.1677485704421997,
0.07359765470027924,
0.06192958354949951,
0.32985666394233704,
-0.09365703910589218,
-0.15041865408420563,
0.18545134365558624,
0.48186811804771423,
0.20261618494987488,
-0.14685726165771484,
-0.15227101743221283,
-0.15163631737232208,
0.1331302374601364,
-0.01340978592634201,
0.05158648639917374,
-0.15035735070705414,
-0.4884822964668274,
0.029398083686828613,
-0.08619652688503265,
-0.23257796466350555,
0.4540863037109375,
0.24001234769821167,
-0.028797660022974014,
0.1914045214653015,
-0.21952828764915466,
0.3667706847190857,
-0.16752462089061737,
-0.0024104369804263115,
-0.21218343079090118,
0.02009555883705616,
-0.5994917154312134,
0.04519117996096611,
0.16704058647155762,
-0.5211142897605896,
0.4407995045185089,
0.08610215038061142,
0.46163588762283325,
0.04390506446361542,
-0.11341234296560287,
-0.12419074773788452,
0.10503287613391876,
0.3450685739517212,
0.027523476630449295,
0.2916049659252167,
0.33216437697410583,
0.25062888860702515,
-0.1550838202238083,
-0.08651157468557358,
-0.3208601474761963,
-0.4442726969718933,
0.3166167736053467,
0.01276505459100008,
-0.1209733635187149,
-0.05385671555995941,
-0.6307355165481567,
0.16847628355026245,
0.061226289719343185,
0.0587100051343441,
-0.06801312416791916,
0.11154074221849442,
-0.1867167353630066,
-0.014587990939617157,
0.37140709161758423,
0.523841917514801,
-0.5235705971717834,
-0.29534071683883667,
0.02248840406537056,
-0.05665929988026619,
0.31467387080192566,
0.4856603741645813,
-0.2403755486011505,
0.2253073751926422,
-0.11065562069416046,
-0.13080236315727234,
-0.005188576877117157,
-0.32406389713287354,
-0.19947881996631622,
-0.055203136056661606,
0.16294331848621368,
0.002975029870867729,
0.13018077611923218,
-0.4134730398654938,
-0.5584429502487183,
-0.19730301201343536,
0.1586216390132904,
-0.19746088981628418,
0.07872305065393448,
0.02563689462840557,
-0.2331426739692688,
-0.20446932315826416,
0.014170147478580475,
0.2407866269350052,
-0.11708679795265198,
0.034644223749637604,
-0.15646323561668396,
0.04613107070326805,
-0.05783180147409439,
-0.11703966557979584,
-0.01203268114477396,
-0.10535523295402527,
0.13017478585243225,
-0.16963429749011993,
0.0152138601988554,
0.1239435002207756,
-0.06218794733285904,
0.2335905134677887,
0.14634205400943756,
0.0846133902668953,
0.2386503368616104,
0.06924734264612198,
-0.2949140965938568,
-0.08956422656774521,
-0.05793556198477745,
-0.011746030300855637,
-0.04916578158736229,
0.0096052885055542,
0.014750458300113678,
0.043158967047929764,
-0.42498892545700073,
-0.26009657979011536,
-0.4469793140888214,
0.14926093816757202,
-0.06187636777758598,
-0.050742898136377335,
-0.05950687825679779,
0.02496003732085228,
0.06140443682670593,
0.2770499289035797,
-0.02010483294725418,
-0.11347296833992004,
-0.016294993460178375,
0.3425477147102356,
0.07042603194713593,
-0.12815384566783905,
0.2877129316329956,
-0.004189714789390564,
0.1435244232416153,
-0.07786130905151367,
-0.08908943086862564,
-0.15505321323871613,
0.057450130581855774,
0.01662338525056839,
-0.11317110806703568,
0.373473584651947,
0.02006453461945057,
0.09969919919967651,
0.07357276976108551,
-0.06869887560606003,
0.18849915266036987,
0.030555639415979385,
0.00903446227312088,
-0.27397167682647705,
0.15525731444358826,
0.13753129541873932,
0.4346502125263214,
-0.1644020676612854,
-0.14818096160888672,
-0.48366910219192505,
0.009010609239339828,
0.07189865410327911,
0.03095468506217003,
0.206699401140213,
-0.21378600597381592,
0.03227916359901428,
-0.15400616824626923,
-0.3394293785095215,
0.44184595346450806,
0.07573853433132172,
0.13170798122882843,
-0.06684663146734238,
0.056590486317873,
-0.2283734530210495,
-0.09160052984952927,
0.3643069863319397,
-0.08370985835790634,
0.12232312560081482,
-0.014459751546382904,
0.005025273188948631,
-0.27437543869018555,
0.11039941012859344,
0.05333171784877777,
0.11160137504339218,
-0.48862820863723755,
0.21119512617588043,
0.016064370051026344,
0.20750692486763,
-0.2277435064315796,
-0.5473065972328186,
-0.19786494970321655,
-0.16741323471069336,
0.11088743060827255,
0.0035508349537849426,
0.015551820397377014,
0.24583469331264496,
0.35198771953582764,
0.576365053653717,
-0.010538928210735321,
0.18207992613315582,
-0.325235515832901,
0.03795111924409866,
-0.0824354887008667,
0.03481544926762581,
0.021281298249959946,
-0.13955216109752655,
-0.03698568046092987,
-0.28425952792167664,
-0.06856998801231384,
0.13538655638694763,
-0.3167823553085327,
0.16295164823532104,
-0.32254910469055176,
0.43492090702056885,
0.3414088487625122,
-0.07392716407775879,
-0.13793016970157623,
-0.241278737783432,
0.3552577793598175,
-0.17376774549484253,
-0.01422033179551363,
-0.045967940241098404,
-0.16854798793792725,
-0.0038154630456119776,
-0.041597191244363785,
-0.05529191344976425,
-0.048706553876399994,
-0.15754951536655426,
0.1859249770641327,
0.289116233587265,
-0.10520677268505096,
-0.11520426720380783,
0.18896953761577606,
0.23628215491771698,
-0.30059048533439636,
-0.1001724973320961,
-0.2634640038013458,
-0.711925208568573,
0.3826662003993988,
-0.13973096013069153,
-0.25675666332244873,
-0.10221082717180252,
0.08988644927740097,
0.41234636306762695,
-0.4059275984764099,
-0.32054901123046875,
-0.4146130681037903,
-0.08388295024633408,
-0.010426700115203857,
0.11211168020963669,
0.3206903338432312,
-0.1259184330701828,
-0.16577306389808655,
-0.04244347661733627,
-0.16631636023521423,
-0.05977984145283699,
0.08706355839967728,
-0.28373414278030396,
0.314317524433136,
-0.3372654616832733,
0.22766020894050598,
-0.2759477198123932,
0.9847338795661926,
0.28848040103912354,
-0.23261012136936188,
0.607163667678833,
0.12879496812820435,
0.33562707901000977,
-0.24866726994514465,
-0.1645040065050125,
0.08057213574647903,
-0.0062943994998931885,
0.3026961088180542,
0.21066397428512573,
0.03295580670237541,
0.2064090222120285,
-0.12477536499500275,
-0.28305813670158386,
-0.017948102205991745,
-0.21005100011825562,
-0.05149573087692261,
0.11634088307619095,
-0.04076638072729111,
0.049487899988889694,
-0.1192309707403183,
-0.08300121128559113,
-0.09481235593557358,
0.24191778898239136,
0.38547074794769287,
0.15101955831050873,
-0.1535044014453888,
-0.17041926085948944,
0.041296202689409256,
-0.6059465408325195,
0.23025019466876984,
-0.1467319130897522,
-0.06992379575967789,
0.18003788590431213,
-0.2958258390426636,
0.16277086734771729,
0.15405897796154022,
0.32482826709747314,
0.1494271606206894,
0.043198224157094955,
-0.22968219220638275,
0.04390735179185867,
-0.19998720288276672,
-0.00903284177184105,
-0.27974507212638855,
-0.09043209999799728,
0.551863431930542,
0.3548363745212555,
-0.43180617690086365,
-0.12618720531463623,
0.15287251770496368,
-0.061085738241672516,
-0.021894197911024094,
-0.21798241138458252,
-0.5934873819351196,
0.027805306017398834,
-0.18543270230293274,
0.2032904475927353,
0.035157427191734314,
0.189344584941864,
-0.09607137739658356,
0.2732435166835785,
-0.018780136480927467,
-0.14088110625743866,
0.2616766393184662,
0.29278531670570374,
0.1352362036705017,
0.14937441051006317,
0.24913698434829712,
0.45053982734680176,
0.08211493492126465,
0.594964325428009,
0.632904052734375,
-0.14012503623962402,
-0.3148519694805145,
0.15954211354255676,
0.2627013623714447,
0.17856380343437195,
0.23281589150428772,
-0.07307610660791397,
-0.05642271786928177,
0.142825186252594,
0.36626094579696655,
-0.3818340599536896,
0.23719894886016846,
0.32047176361083984,
0.12419309467077255,
-0.16494490206241608,
-0.15844789147377014,
0.4748927354812622,
0.045446936041116714,
-0.06170360743999481,
0.008301358669996262,
0.3129749894142151,
-0.008952172473073006,
0.18397140502929688,
0.14597761631011963,
0.8244395852088928,
-0.06994232535362244,
0.23991571366786957,
0.3293834924697876,
0.4202502369880676,
0.3364502191543579,
0.05605574697256088,
-0.0588703379034996,
-0.12747256457805634,
0.027772951871156693,
0.01963827945291996,
-0.06799551099538803,
0.17381921410560608,
0.0013333521783351898,
-0.14545057713985443,
0.3617594838142395,
-0.21765543520450592,
-0.057737451046705246,
-0.2969799339771271,
-0.03126540035009384,
-0.17563393712043762,
-0.27348625659942627,
-0.32899200916290283,
-0.010720564052462578,
0.19909833371639252,
0.40059390664100647,
-0.03054726868867874,
-0.052618421614170074,
0.08237935602664948,
-0.29891645908355713,
-0.0793272852897644,
0.05630151182413101,
-0.0462605282664299,
-0.11336736381053925,
0.3503371775150299,
0.004677906632423401,
0.2855460047721863,
0.02081983909010887,
0.6671983003616333,
0.09813813865184784,
-0.2601703703403473,
0.39240729808807373,
0.05117987468838692,
-0.04576726630330086,
-0.13840970396995544,
-0.0449971929192543,
0.2247893214225769,
0.027337215840816498,
-0.19691377878189087,
-0.028254196047782898,
-0.0863884910941124,
0.007014118134975433,
-0.22059236466884613,
-0.03070583939552307,
0.21827231347560883,
-0.4100440442562103,
0.03995909169316292,
0.18024498224258423,
0.202548086643219,
-0.11378614604473114,
0.03801550716161728,
0.07324018329381943,
-0.05057552456855774,
0.12691690027713776,
0.10357815027236938,
-0.24438871443271637,
-0.14628717303276062,
0.4675118923187256,
-0.32120564579963684,
0.05447189509868622,
0.4901285767555237,
-0.17038041353225708,
-0.1374821811914444,
0.05774136632680893,
-0.21695739030838013,
0.7585753202438354,
-0.7254887819290161,
-0.009794090874493122,
0.44981250166893005,
0.17673592269420624,
0.20234766602516174,
0.4736376106739044,
0.4459115266799927,
-0.1422865390777588,
-0.032617583870887756,
-0.22696280479431152,
-0.2666095197200775,
0.12686195969581604,
-0.17526677250862122,
-0.02242710068821907,
-0.10893645137548447,
0.1597595512866974,
0.0577913299202919,
0.3241826891899109,
-0.20593884587287903,
0.17099101841449738,
0.04637092351913452,
-0.08932210505008698,
-0.12593963742256165,
-0.015321895480155945,
0.5025225281715393,
0.1386452466249466,
0.0006156489253044128,
0.02898944728076458,
-0.26843512058258057,
-0.08923403918743134,
-0.40548601746559143,
0.15715666115283966,
-0.0036498233675956726,
-0.20235218107700348,
0.025734957307577133,
0.038717031478881836,
-0.09073807299137115,
-0.20822666585445404,
-0.02701610140502453,
-0.11161688715219498,
0.07859210669994354,
-0.12361913174390793,
0.5146756768226624,
0.062330298125743866,
0.008662771433591843,
-0.14307166635990143,
0.09945110976696014,
0.009098604321479797,
0.1324455738067627,
-0.24533262848854065,
-0.13301116228103638,
-0.08140049129724503,
0.11605223268270493,
0.03455551341176033,
0.2790314853191376,
0.08901402354240417,
-0.041472963988780975,
0.07576675713062286,
-0.04282193258404732,
-0.11399728059768677,
0.3317839801311493,
0.27642661333084106,
-0.11337932199239731,
-0.2586691677570343,
0.2536022663116455,
0.09402894973754883,
-0.2695654630661011,
-0.09590359777212143,
-0.16076010465621948,
0.33032503724098206,
0.007852975279092789,
0.1831614375114441,
0.17742954194545746,
0.27016159892082214,
0.07475106418132782,
-0.03773520886898041,
-0.07858168333768845,
-0.0005337931215763092,
-0.08521750569343567,
0.14700843393802643,
-0.16242803633213043,
0.19458641111850739,
0.7594565749168396,
0.20291176438331604,
0.3006834387779236,
0.27626699209213257,
-0.1481093466281891,
0.4754825830459595,
-0.33610999584198,
0.07573471963405609,
-0.2649819850921631,
-0.6027314066886902,
-0.09621980786323547,
0.2004271149635315,
0.04495765268802643,
-0.151236891746521,
-0.09511305391788483,
0.7941792011260986,
-0.1164683923125267,
0.009147899225354195,
-0.2164340317249298,
0.16907235980033875,
0.02327810227870941,
-0.5665188431739807,
-0.19220049679279327,
-0.146543949842453,
0.09816762804985046,
-0.026694724336266518,
0.033683180809020996,
-0.03543126583099365,
0.32626214623451233,
-0.03254060447216034,
-0.07000941038131714,
-0.2572215795516968,
-0.6853571534156799,
0.24403154850006104,
0.24126657843589783,
-0.04172540456056595,
0.06308615952730179,
0.37632834911346436,
-0.15489739179611206,
0.24609772861003876,
0.40703773498535156,
0.4606934189796448,
0.15351805090904236,
0.21554920077323914,
-0.16599321365356445,
0.06587827205657959,
0.1538672000169754,
-0.16544751822948456,
0.426115483045578,
0.34038907289505005,
0.18151214718818665,
0.12959831953048706,
0.05116170644760132,
-0.19312553107738495,
0.19738849997520447,
-0.2678559720516205,
0.44262903928756714,
-0.2131008356809616,
0.44830557703971863,
-0.24371832609176636,
0.19489753246307373,
-0.3682038187980652,
0.167911097407341,
-0.34695106744766235,
0.688755452632904,
0.199506476521492,
-0.03171616420149803,
-0.045759864151477814,
-0.25366634130477905,
0.01530817523598671,
0.16025473177433014,
0.5332733988761902,
0.2655237317085266,
-0.19024264812469482,
-0.6655275821685791,
-0.028383158147335052,
-0.623775839805603,
0.14663498103618622,
-0.08071541786193848,
0.3106878697872162,
-0.0688108578324318,
0.07193960249423981,
-0.0749497041106224,
0.2002551555633545,
0.003236420452594757,
-0.407113641500473,
-0.19277195632457733,
-0.08978031575679779,
-0.2040933519601822,
0.05719584599137306,
-0.5257996916770935,
-0.08846268802881241,
0.010854080319404602,
0.00792662799358368,
0.12539885938167572,
-0.056891441345214844,
-0.09773494303226471,
-0.05926934629678726,
-0.05063982680439949,
-0.02463620901107788,
0.41306188702583313,
0.25290387868881226,
0.033422186970710754,
0.34235548973083496,
0.0045937299728393555,
-0.02141690067946911,
-0.12098480761051178,
-0.2568945288658142,
-0.14870339632034302,
-0.05933184176683426,
-0.15645812451839447,
0.09707581251859665,
-0.2969249486923218,
-0.14128859341144562,
-0.40156662464141846,
0.10560008883476257,
0.17893606424331665,
-0.2523517310619354,
-0.3688315749168396,
0.0523611381649971,
0.04182794690132141,
-0.09569526463747025,
0.03657432273030281,
0.36071184277534485,
0.06723449379205704,
0.34355640411376953,
-0.30301111936569214,
-0.0911937728524208,
0.757012128829956,
-0.5725845694541931,
0.07906386256217957,
-0.13141165673732758,
0.07408446818590164,
0.28225380182266235,
-0.4676651358604431,
-1.083158016204834,
0.2719729244709015,
0.2745971381664276,
0.12630169093608856,
-0.45211172103881836,
0.1626853197813034,
-0.2787552773952484,
0.10433316230773926,
-0.14924189448356628,
0.209695965051651,
-0.009847883135080338,
-0.35212430357933044,
0.02441076561808586,
-0.22663334012031555
] |
https://github.com/huggingface/datasets/issues/2561 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` | Hi ! I just tried to reproduce what you said:
- create a local builder class
- use `load_dataset`
- update the builder class code
- use `load_dataset` again (with or without `ignore_verifications=True`)
And it creates a new cache, as expected.
What modifications did you do to your builder's code ? | ## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
| 51 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
Hi ! I just tried to reproduce what you said:
- create a local builder class
- use `load_dataset`
- update the builder class code
- use `load_dataset` again (with or without `ignore_verifications=True`)
And it creates a new cache, as expected.
What modifications did you do to your builder's code ? | [
-0.38048219680786133,
0.48865777254104614,
0.03263238072395325,
0.19356444478034973,
0.14466345310211182,
0.15072527527809143,
0.31927046179771423,
0.3748844265937805,
0.1290484517812729,
0.21833159029483795,
0.21495960652828217,
0.36303800344467163,
0.11989150196313858,
-0.2817016839981079,
0.051093004643917084,
0.2790057063102722,
0.116343192756176,
0.14349520206451416,
0.21445302665233612,
-0.07715623080730438,
-0.02827899158000946,
-0.08005920797586441,
-0.04013783112168312,
-0.2102082222700119,
-0.45055508613586426,
0.1976117044687271,
0.052868492901325226,
0.08538294583559036,
-0.04055187106132507,
-0.4662301540374756,
0.39087948203086853,
0.2441876381635666,
-0.05622653663158417,
0.2653210461139679,
-0.0001090661171474494,
0.1760651022195816,
0.3208664655685425,
0.05264369398355484,
-0.39786815643310547,
0.13890910148620605,
-0.34742382168769836,
-0.46066224575042725,
0.022390417754650116,
-0.0884898230433464,
-0.2164720594882965,
-0.2490847259759903,
-0.14072653651237488,
-0.1915905624628067,
0.30356648564338684,
0.056486185640096664,
0.2780434191226959,
0.07508733868598938,
-0.10233907401561737,
-0.01686781831085682,
0.11995592713356018,
-0.05077575892210007,
-0.05361528694629669,
0.1609930843114853,
0.22537057101726532,
0.036166466772556305,
-0.43048298358917236,
0.3174598217010498,
-0.18966753780841827,
0.22037693858146667,
0.43030494451522827,
-0.09732791036367416,
0.16110292077064514,
-0.009329628199338913,
0.3773484528064728,
0.04149843007326126,
0.5871430039405823,
-0.3299916088581085,
-0.2986131012439728,
-0.2611514925956726,
-0.19443663954734802,
-0.01557124499231577,
0.2321200668811798,
-0.18326830863952637,
-0.29924100637435913,
0.17350409924983978,
-0.41386678814888,
-0.2707403302192688,
0.06783300638198853,
-0.1559705287218094,
0.05288112163543701,
-0.25111785531044006,
0.09921512007713318,
-0.09261106699705124,
-0.08937795460224152,
0.16885128617286682,
0.43493250012397766,
-0.4686087667942047,
-0.0739741176366806,
0.2702963352203369,
-0.49891602993011475,
0.021963216364383698,
0.3845898509025574,
0.3972640633583069,
0.23840981721878052,
0.30228978395462036,
-0.18992678821086884,
0.2409280240535736,
0.18605151772499084,
0.09683869779109955,
-0.08260315656661987,
0.306730717420578,
0.04100780934095383,
-0.01096639595925808,
0.2831633687019348,
0.2031201720237732,
-0.5477041006088257,
-0.013798609375953674,
0.06386283785104752,
-0.2574616074562073,
0.5983979105949402,
-0.08989560604095459,
0.06806724518537521,
-0.32887205481529236,
-0.03164955601096153,
0.18898078799247742,
-0.0006040371954441071,
-0.14732259511947632,
0.22394685447216034,
0.25703898072242737,
-0.12948569655418396,
0.08504483103752136,
-0.2500116229057312,
-0.21275945007801056,
-0.34650760889053345,
-0.35446587204933167,
-0.39889636635780334,
-0.2386137992143631,
0.020139630883932114,
0.367938369512558,
0.4855266511440277,
-0.5491023659706116,
0.3118246793746948,
0.24011348187923431,
-0.06151136755943298,
0.0796840637922287,
0.17534871399402618,
-0.13617177307605743,
0.17918851971626282,
0.22023533284664154,
-0.2889444828033447,
0.06605920940637589,
-0.024998750537633896,
-0.1994282305240631,
-0.07210664451122284,
0.34082961082458496,
-0.11442802101373672,
-0.798107922077179,
0.009357143193483353,
0.17451107501983643,
-0.23409594595432281,
0.051830194890499115,
0.2836395800113678,
0.11555494368076324,
0.41948172450065613,
-0.3065299689769745,
-0.13026389479637146,
-0.047908201813697815,
-0.299350380897522,
-0.12702099978923798,
0.4868239462375641,
0.6713582277297974,
-0.43007615208625793,
0.09464134275913239,
-0.12422505021095276,
0.08808004856109619,
0.004569754004478455,
0.15418878197669983,
-0.3215012550354004,
0.41640469431877136,
-0.2850264012813568,
-0.44847333431243896,
0.20192332565784454,
-0.29746121168136597,
-0.8293771147727966,
0.2752145230770111,
0.1786656230688095,
0.21410633623600006,
0.1349744200706482,
0.039904315024614334,
-0.08562108874320984,
-0.1601599007844925,
0.0979907363653183,
0.2460227906703949,
-0.20044200122356415,
0.023659957572817802,
-0.43086180090904236,
-0.19392725825309753,
0.06404831260442734,
0.07403318583965302,
0.008976947516202927,
0.24230870604515076,
0.0550844743847847,
0.11324302107095718,
0.028503693640232086,
0.008790165185928345,
0.1342497318983078,
0.38346660137176514,
0.14008508622646332,
-0.12905143201351166,
0.20518560707569122,
-0.11185942590236664,
-0.454425573348999,
0.41900205612182617,
-0.2235337346792221,
-0.13059772551059723,
0.049847301095724106,
-0.29963433742523193,
-0.12568220496177673,
-0.08230865001678467,
-0.41731029748916626,
-0.22513872385025024,
0.1377798467874527,
0.17336267232894897,
0.4545220732688904,
-0.06848099827766418,
-0.1343207210302353,
0.27442795038223267,
-0.1714830845594406,
0.15988491475582123,
-0.022831931710243225,
-0.06998220831155777,
-0.0787656307220459,
-0.06929680705070496,
-0.313826322555542,
0.04108627513051033,
0.1141757220029831,
-0.059282101690769196,
-0.2225731909275055,
0.27926769852638245,
0.017024625092744827,
0.09435746818780899,
0.001386050134897232,
0.19832202792167664,
0.04601478576660156,
0.16521315276622772,
0.1288752555847168,
-0.12507539987564087,
0.0781465694308281,
-0.09837786853313446,
-0.052701763808727264,
0.07265901565551758,
0.20213469862937927,
0.17243005335330963,
-0.22499817609786987,
-0.31495553255081177,
0.2511093020439148,
-0.14765210449695587,
0.0871008113026619,
-0.08845186233520508,
-0.042674917727708817,
0.06562670320272446,
0.4767363667488098,
0.22853624820709229,
-0.016482073813676834,
0.16827014088630676,
0.48842689394950867,
0.20007142424583435,
-0.2914828360080719,
0.022124258801341057,
-0.13314858078956604,
-0.21338337659835815,
0.17117094993591309,
0.33443135023117065,
0.3634791672229767,
0.17346903681755066,
0.20993191003799438,
0.06610894203186035,
-0.03271240368485451,
-0.16340744495391846,
0.06135750189423561,
-0.11185820400714874,
-0.1488310545682907,
0.411239355802536,
0.32441645860671997,
0.15361613035202026,
-0.3777533769607544,
0.2912771999835968,
0.1497386395931244,
0.15186238288879395,
-0.013389520347118378,
0.17342941462993622,
-0.4750731885433197,
-0.11180742084980011,
-0.1549556702375412,
0.15575139224529266,
-0.3087690472602844,
-0.18502765893936157,
0.14129093289375305,
0.10243470221757889,
-0.004461806267499924,
0.22996917366981506,
-0.05963054299354553,
0.31493404507637024,
0.0060206931084394455,
-0.530479907989502,
-0.30739185214042664,
-0.054143767803907394,
-0.4707736372947693,
-0.01234620064496994,
0.46099939942359924,
-0.2426983267068863,
0.29196667671203613,
-0.22423511743545532,
-0.08389878273010254,
-0.20262698829174042,
-0.21203291416168213,
0.09530613571405411,
0.10663711279630661,
0.412384569644928,
-0.17880821228027344,
-0.008273251354694366,
-0.043816763907670975,
0.02970128133893013,
0.2912229895591736,
-0.1716902107000351,
-0.17859110236167908,
-0.11132976412773132,
-0.08835300803184509,
0.14944986999034882,
-0.2810598909854889,
-0.20274889469146729,
0.011469390243291855,
-0.3783388137817383,
-0.12076975405216217,
0.14151078462600708,
0.06318645924329758,
0.1967851221561432,
-0.05823307856917381,
0.17488475143909454,
0.02058221399784088,
0.14833948016166687,
-0.26693809032440186,
-0.6465252041816711,
0.22831101715564728,
-0.24305497109889984,
-0.06688903272151947,
0.0384102426469326,
-0.30158722400665283,
0.11779135465621948,
-0.08158305287361145,
-0.49134361743927,
-0.010553060099482536,
-0.4558912217617035,
0.3086249530315399,
-0.07159790396690369,
0.04447605460882187,
0.4206594228744507,
-0.0024625388905406,
-0.033600494265556335,
-0.19086283445358276,
-0.31502994894981384,
0.1238768920302391,
-0.15814027190208435,
0.32997187972068787,
0.05419334024190903,
-0.042785823345184326,
0.13222447037696838,
0.5684080123901367,
0.14535486698150635,
-0.08034135401248932,
0.31596052646636963,
0.11882872879505157,
0.4034338891506195,
-0.30242282152175903,
-0.20682813227176666,
0.05617980659008026,
-0.048052459955215454,
-0.2586318254470825,
0.017970211803913116,
0.0922226756811142,
0.015352723188698292,
-0.13237766921520233,
-0.02414095029234886,
0.022135891020298004,
-0.2735554873943329,
0.0025215744972229004,
-0.3864322304725647,
0.20150673389434814,
0.44155120849609375,
0.1765916347503662,
-0.18885581195354462,
-0.141699880361557,
0.14989235997200012,
0.22547706961631775,
0.16013628244400024,
-0.045687802135944366,
0.06595626473426819,
0.23514558374881744,
-0.37018537521362305,
0.10267756134271622,
0.09848104417324066,
-0.06827519088983536,
0.07201555371284485,
0.0008164048194885254,
0.27459853887557983,
-0.07707957923412323,
0.27907395362854004,
-0.4338400065898895,
0.023402167484164238,
0.20773117244243622,
-0.04490174353122711,
0.04469349980354309,
-0.2526714503765106,
0.2096979022026062,
0.29862818121910095,
-0.15040116012096405,
0.27864164113998413,
-0.04007194936275482,
-0.2590218484401703,
0.06440997123718262,
0.37876951694488525,
-0.15122753381729126,
-0.40953749418258667,
-0.2608671188354492,
0.008098382502794266,
-0.16226708889007568,
0.0933765172958374,
-0.18087325990200043,
0.29143384099006653,
-0.009764475747942924,
-0.03580716624855995,
-0.10100729763507843,
0.32680585980415344,
-0.17036451399326324,
0.010959649458527565,
0.28110405802726746,
-0.14580470323562622,
0.3419133722782135,
0.060425661504268646,
0.06402143090963364,
0.17099085450172424,
0.4756251275539398,
-0.0876842588186264,
-0.20817381143569946,
-0.16588574647903442,
-0.025295961648225784,
-0.08273658901453018,
0.23406796157360077,
-0.08051774650812149,
-0.160711407661438,
0.2102656215429306,
-0.08688551187515259,
-0.09371595829725266,
-0.08704102039337158,
0.012891983613371849,
-0.02368636429309845,
0.08386483043432236,
-0.47132694721221924,
0.16764405369758606,
0.12420380115509033,
-0.05180531367659569,
0.379041850566864,
-0.21872858703136444,
0.02752353996038437,
0.20062462985515594,
0.11424948275089264,
0.6171649694442749,
0.1221160888671875,
-0.07267506420612335,
0.002937864512205124,
-0.24529212713241577,
0.34150487184524536,
-0.34622901678085327,
0.2468889057636261,
-0.2816818356513977,
-0.2803460359573364,
0.1727064698934555,
-0.19245848059654236,
0.23646435141563416,
0.08977318555116653,
-0.0701676681637764,
0.13362152874469757,
-0.08850695937871933,
0.28170812129974365,
-0.010707292705774307,
0.22855275869369507,
-0.1176186129450798,
-0.14447927474975586,
-0.01957143470644951,
0.21384687721729279,
0.012484986335039139,
0.3353188931941986,
-0.05826064571738243,
0.015901193022727966,
0.18015344440937042,
-0.08082260191440582,
-0.1948031485080719,
-0.12313319742679596,
-0.11868274211883545,
0.0012888554483652115,
0.2840408980846405,
-0.20372383296489716,
0.015155896544456482,
0.06492646038532257,
0.22967387735843658,
0.11147350072860718,
-0.18713246285915375,
0.16029717028141022,
0.13677096366882324,
0.3419640362262726,
-0.12301074713468552,
-0.29722312092781067,
0.3527773320674896,
-0.06826025992631912,
-0.16472896933555603,
-0.19539415836334229,
-0.5220223665237427,
-0.4138988256454468,
0.2600614130496979,
0.1896185278892517,
0.31219905614852905,
0.0780329704284668,
0.10040771961212158,
-0.014093443751335144,
0.28694233298301697,
-0.20698723196983337,
0.21226593852043152,
0.10766944289207458,
-0.16703756153583527,
0.14764708280563354,
-0.3399030566215515,
-0.2350500524044037,
-0.052067067474126816,
0.3169322907924652,
0.22469794750213623,
-0.13402530550956726,
0.44365283846855164,
-0.2458900511264801,
-0.09586001932621002,
-0.13396026194095612,
-0.02814522758126259,
0.15622466802597046,
-0.2629680931568146,
-0.03575510531663895,
0.0425802506506443,
0.06248641014099121,
0.16572564840316772,
-0.04006577655673027,
0.06009066477417946,
0.05448801815509796,
-0.3269215524196625,
-0.1526605486869812,
-0.3810040056705475,
-0.2966785430908203,
-0.10818667709827423,
0.03353044390678406,
0.004142284393310547,
-0.01332397572696209,
0.29013872146606445,
0.3709752559661865,
-0.34794867038726807,
-0.07775510847568512,
-0.2537527084350586,
0.10065973550081253,
-0.32025381922721863,
0.16991689801216125,
0.07372287660837173,
-0.058309417217969894,
-0.016535650938749313,
0.09428250789642334,
-0.30262166261672974,
-0.2772941589355469,
-0.01297049317508936,
0.11272333562374115,
0.0548069030046463,
0.2695969343185425,
-0.10764813423156738,
0.04047439992427826,
0.023292964324355125,
-0.048197291791439056,
0.21926449239253998,
-0.13497965037822723,
-0.13807302713394165,
0.22050680220127106,
0.15995125472545624,
0.3212186098098755,
-0.09972618520259857,
-0.08777036517858505,
-0.1191570907831192,
0.23506389558315277,
0.03358520567417145,
0.023946672677993774,
0.03686269372701645,
-0.01751057803630829,
0.1461351364850998,
-0.029881246387958527,
-0.15135248005390167,
0.15052784979343414,
0.2623208165168762,
-0.259943425655365,
0.0070395395159721375,
0.31973281502723694,
0.2233685404062271,
0.10864962637424469,
0.0006463428726419806,
-0.136417955160141,
0.3405468463897705,
0.25842517614364624,
-0.1966739445924759,
-0.23782660067081451,
0.3885470926761627,
-0.050806935876607895,
0.08533601462841034,
-0.014569588005542755,
0.4374086558818817,
-0.21116501092910767,
0.2243066132068634,
0.14987173676490784,
0.2936810255050659,
-0.4318622350692749,
0.012743450701236725,
0.37477484345436096,
0.1390727311372757,
0.06218305975198746,
0.28758782148361206,
0.0013999715447425842,
0.006158679723739624,
0.5597168207168579,
-0.07446982711553574,
0.142511785030365,
0.004276692867279053,
0.25714901089668274,
-0.1812981367111206,
-0.554417610168457,
0.4394102692604065,
0.1259934902191162,
-0.11689181625843048,
-0.19938084483146667,
-0.2302350401878357,
0.2791211009025574,
0.1457987278699875,
-0.23195891082286835,
-0.1967094987630844,
0.1830412745475769,
-0.321651816368103,
0.07360462844371796,
0.06732547283172607,
-0.06098925322294235,
0.14295288920402527,
0.11177250742912292,
0.16911013424396515,
0.16479316353797913,
0.2556162178516388,
-0.1488608419895172,
-0.13409246504306793,
-0.24879144132137299,
0.12850823998451233,
-0.015501223504543304,
0.016144484281539917,
-0.08737608045339584,
0.2900005280971527,
0.0014368817210197449,
-0.1904771625995636,
0.017769595608115196,
0.4018317461013794,
0.24719522893428802,
0.290938138961792,
-0.05285649374127388,
0.1229538768529892,
-0.20086778700351715,
0.01747134141623974,
-0.4287211000919342,
0.37786969542503357,
-0.2583727538585663,
-0.291631817817688,
0.2562723457813263,
0.06820102781057358,
-0.18241368234157562,
-0.0073568932712078094,
-0.1421470046043396,
0.14147239923477173,
-0.5035191178321838,
0.3143913149833679,
0.32482069730758667,
-0.03797421604394913,
-0.0030621029436588287,
0.17792275547981262,
-0.1650944948196411,
-0.18603593111038208,
0.4572030007839203,
-0.07097182422876358,
0.020945802330970764,
-0.3190408945083618,
0.11923621594905853,
-0.22459568083286285,
0.5049157738685608,
0.2660604417324066,
0.06460581719875336,
-0.29512086510658264,
-0.1944381594657898,
-0.715931236743927,
0.21835997700691223,
-0.08524914085865021,
0.28580060601234436,
0.13961529731750488,
0.2323765605688095,
-0.1937204897403717,
0.16791824996471405,
0.0035754963755607605,
-0.054243505001068115,
0.24181142449378967,
0.04083433374762535,
-0.2626483142375946,
0.15869826078414917,
-0.0982365757226944,
-0.28932321071624756,
-0.012039244174957275,
-0.3866192698478699,
0.41662150621414185,
-0.17469872534275055,
0.1220313236117363,
0.23819482326507568,
-0.1944960057735443,
0.41567665338516235,
0.27635443210601807,
0.3133000135421753,
0.26990076899528503,
0.08338085561990738,
0.14883923530578613,
0.07221809029579163,
-0.18366177380084991,
0.2596634328365326,
-0.2895088493824005,
0.1402832567691803,
-0.25100159645080566,
0.0963064432144165,
-0.40657147765159607,
-0.18255585432052612,
-0.3155360221862793,
0.3408098816871643,
0.09819445013999939,
-0.04474784806370735,
-0.082154780626297,
-0.15061919391155243,
-0.2725706398487091,
0.39561760425567627,
0.28496018052101135,
0.04117145389318466,
0.07600431144237518,
0.09994889795780182,
-0.48429954051971436,
-0.04231330007314682,
0.3631959855556488,
-0.3208838701248169,
-0.2423742711544037,
-0.273334264755249,
0.33206456899642944,
-0.02759195864200592,
-0.3213028311729431,
-0.1497497260570526,
0.014292903244495392,
0.36614692211151123,
-0.0442022830247879,
0.0851748138666153,
0.28462493419647217,
-0.10384757816791534,
0.46371325850486755,
-0.09502844512462616,
-0.17614853382110596,
0.04146600142121315,
0.1291506290435791,
-0.0996752604842186,
-0.14629298448562622
] |
https://github.com/huggingface/datasets/issues/2561 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` | Hi @lhoestq. Thanks for your reply. I just did minor modifications for which it should not regenerate cache (for e.g. Adding a print statement). Overall, regardless of cache miss, there should be an explicit option to allow reuse of existing cache if author knows cache shouldn't be affected. | ## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
| 48 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
Hi @lhoestq. Thanks for your reply. I just did minor modifications for which it should not regenerate cache (for e.g. Adding a print statement). Overall, regardless of cache miss, there should be an explicit option to allow reuse of existing cache if author knows cache shouldn't be affected. | [
-0.2966102361679077,
0.4845609664916992,
0.049707505851984024,
0.18488621711730957,
0.08039214462041855,
0.21865510940551758,
0.2824619710445404,
0.3745066523551941,
0.19491204619407654,
0.17794597148895264,
0.27538883686065674,
0.35447055101394653,
0.08641032874584198,
-0.25142088532447815,
-0.004439882002770901,
0.2905791401863098,
0.058053091168403625,
0.14535191655158997,
0.18567173182964325,
-0.006389599293470383,
-0.061895448714494705,
-0.0590817928314209,
-0.047250837087631226,
-0.26550906896591187,
-0.42177656292915344,
0.1886303573846817,
0.08113057911396027,
-0.0028489232063293457,
-0.0397527813911438,
-0.4942781627178192,
0.41738176345825195,
0.25959718227386475,
0.041010357439517975,
0.17198306322097778,
-0.0001097419808502309,
0.1775737851858139,
0.2939721643924713,
0.020425202324986458,
-0.39158520102500916,
0.12808670103549957,
-0.31835412979125977,
-0.3609198033809662,
-0.015063311904668808,
-0.11680854856967926,
-0.14706909656524658,
-0.2058146446943283,
-0.07596530020236969,
-0.313814640045166,
0.3438758850097656,
0.033967941999435425,
0.25794678926467896,
0.07272962480783463,
-0.177789106965065,
0.00515481224283576,
0.06328272819519043,
-0.060098081827163696,
-0.03180038928985596,
0.15500766038894653,
0.3051297068595886,
0.04620874673128128,
-0.3910079598426819,
0.40457475185394287,
-0.20282788574695587,
0.10222405195236206,
0.4206955134868622,
-0.23426540195941925,
0.12391681224107742,
-0.0326370969414711,
0.3514980673789978,
0.08830861002206802,
0.6280640363693237,
-0.36159467697143555,
-0.2906777560710907,
-0.28044357895851135,
-0.18892180919647217,
0.008939670398831367,
0.17075064778327942,
-0.2470240592956543,
-0.16977204382419586,
0.282519668340683,
-0.41029441356658936,
-0.39945927262306213,
0.020543448626995087,
-0.16175958514213562,
0.20467638969421387,
-0.2736319899559021,
0.08416376262903214,
-0.09003417938947678,
-0.17392994463443756,
0.22215867042541504,
0.45344942808151245,
-0.45667895674705505,
-0.057121191173791885,
0.24589715898036957,
-0.48981696367263794,
0.041476719081401825,
0.3280722498893738,
0.3956184685230255,
0.270419716835022,
0.3395017981529236,
-0.08733836561441422,
0.23068353533744812,
0.14289362728595734,
0.13237157464027405,
-0.07609440386295319,
0.3461058735847473,
0.04492872208356857,
-0.004785066936165094,
0.2342415750026703,
0.21244804561138153,
-0.46094128489494324,
-0.0363113209605217,
0.0972762405872345,
-0.21084238588809967,
0.5844731330871582,
-0.05535976588726044,
0.01816479116678238,
-0.3203701674938202,
-0.0643920972943306,
0.23629197478294373,
-0.03523565083742142,
-0.15522709488868713,
0.18383370339870453,
0.18088719248771667,
-0.02782679721713066,
0.21972402930259705,
-0.1585138738155365,
-0.1871972233057022,
-0.23853933811187744,
-0.4174991846084595,
-0.3815184235572815,
-0.20567408204078674,
0.0255202017724514,
0.33343809843063354,
0.4631288945674896,
-0.49868160486221313,
0.32896965742111206,
0.2453937977552414,
-0.08094599843025208,
0.03827298432588577,
0.20303131639957428,
-0.06756523251533508,
0.19071948528289795,
0.22641584277153015,
-0.3242380917072296,
0.046667344868183136,
0.013849571347236633,
-0.14220723509788513,
-0.06838877499103546,
0.37748587131500244,
-0.10553994029760361,
-0.7720671892166138,
0.057720884680747986,
0.14674346148967743,
-0.23083056509494781,
0.05977727100253105,
0.29506805539131165,
0.09414176642894745,
0.4354889988899231,
-0.3047124743461609,
-0.07149744778871536,
-0.03992848843336105,
-0.2986982464790344,
-0.17110824584960938,
0.4547204375267029,
0.7276172637939453,
-0.4251801073551178,
0.05801992118358612,
-0.09661806374788284,
0.09036917984485626,
-0.004739910364151001,
0.18978148698806763,
-0.27601486444473267,
0.3597530126571655,
-0.3368421196937561,
-0.44994616508483887,
0.19377866387367249,
-0.3304951786994934,
-0.7936917543411255,
0.23643669486045837,
0.23611731827259064,
0.2683822810649872,
0.15077659487724304,
0.09128487855195999,
-0.13035748898983002,
-0.17219389975070953,
0.07605398446321487,
0.20313356816768646,
-0.21563704311847687,
-0.06704329699277878,
-0.4511631727218628,
-0.28897759318351746,
0.053578659892082214,
0.013158779591321945,
0.08855326473712921,
0.30962133407592773,
0.05859510973095894,
0.11829335242509842,
0.0537007674574852,
-0.0029379986226558685,
0.1418866217136383,
0.2921992540359497,
0.1424282193183899,
-0.18628476560115814,
0.18636925518512726,
-0.11509472876787186,
-0.4901276230812073,
0.42683538794517517,
-0.25123071670532227,
-0.235285222530365,
0.04205102473497391,
-0.3022153973579407,
-0.10987164825201035,
-0.1406942903995514,
-0.38295188546180725,
-0.20341302454471588,
0.123508021235466,
0.20318271219730377,
0.41704508662223816,
-0.0460977703332901,
-0.1830376386642456,
0.3019639253616333,
-0.2747030556201935,
0.17614535987377167,
-0.06561051309108734,
-0.134408637881279,
-0.09138461202383041,
0.00577011052519083,
-0.32303714752197266,
0.039635710418224335,
0.147455096244812,
-0.09760604798793793,
-0.17095988988876343,
0.2789713740348816,
0.008625824935734272,
0.13685095310211182,
-0.012912333011627197,
0.2477172166109085,
0.04812382534146309,
0.13322797417640686,
0.08038286864757538,
-0.19500850141048431,
0.07641353458166122,
-0.07524846494197845,
-0.022190101444721222,
0.05554285645484924,
0.10952329635620117,
0.051984433084726334,
-0.22651781141757965,
-0.3205176293849945,
0.21705520153045654,
-0.20789013803005219,
0.06228119879961014,
-0.14898799359798431,
-0.07197970151901245,
0.08992794156074524,
0.4432959258556366,
0.17691977322101593,
-0.0288119837641716,
0.15143926441669464,
0.376135915517807,
0.23063695430755615,
-0.26518139243125916,
-0.058427587151527405,
-0.03249797970056534,
-0.20066678524017334,
0.20520265400409698,
0.43386003375053406,
0.266470730304718,
0.1773047149181366,
0.23734216392040253,
0.057374246418476105,
0.00241941399872303,
-0.15755534172058105,
0.043173402547836304,
-0.17919354140758514,
-0.17148876190185547,
0.44724538922309875,
0.26466941833496094,
0.22568421065807343,
-0.36574631929397583,
0.3604898452758789,
0.1917821317911148,
0.17415550351142883,
0.006833188235759735,
0.14424632489681244,
-0.47833627462387085,
-0.11799825727939606,
-0.17821528017520905,
0.23909255862236023,
-0.24556270241737366,
-0.20180313289165497,
0.13038647174835205,
0.11227194964885712,
-0.06414556503295898,
0.19655568897724152,
-0.16863609850406647,
0.367715060710907,
-0.08148011565208435,
-0.5583731532096863,
-0.34593963623046875,
0.0020707352086901665,
-0.4155196249485016,
0.004473920911550522,
0.4792739450931549,
-0.3283112645149231,
0.3057937026023865,
-0.2684013843536377,
-0.10867416858673096,
-0.23059600591659546,
-0.24363204836845398,
0.08330780267715454,
0.18052168190479279,
0.31124451756477356,
-0.26693564653396606,
-0.05699297785758972,
-0.07042013853788376,
0.10756636410951614,
0.11304579675197601,
-0.1787519007921219,
-0.1501234620809555,
-0.1828022450208664,
-0.06436331570148468,
0.1532531976699829,
-0.35326018929481506,
-0.2649867832660675,
0.020894905552268028,
-0.3403117060661316,
-0.05386483669281006,
0.05466161295771599,
0.012882459908723831,
0.215465247631073,
-0.13870595395565033,
0.1285952627658844,
0.02746882103383541,
0.17157167196273804,
-0.30665457248687744,
-0.6944126486778259,
0.21792136132717133,
-0.17042973637580872,
-0.026472080498933792,
0.0731140524148941,
-0.28894680738449097,
0.14353099465370178,
0.01994803547859192,
-0.5505862236022949,
-0.030402224510908127,
-0.37967225909233093,
0.2839168608188629,
-0.13020329177379608,
-0.007641961798071861,
0.44336697459220886,
0.002188747515901923,
0.013911055400967598,
-0.22556686401367188,
-0.23004600405693054,
0.1580529361963272,
-0.17090776562690735,
0.3343121409416199,
0.09296523779630661,
-0.1266634464263916,
0.2586098611354828,
0.5497055053710938,
0.2341133952140808,
-0.018924783915281296,
0.3620271682739258,
0.20535165071487427,
0.5025866627693176,
-0.24352535605430603,
-0.11638537049293518,
0.06307847797870636,
-0.10858216881752014,
-0.2857509255409241,
-0.06777481734752655,
0.08947978913784027,
0.05600414425134659,
-0.1363670974969864,
0.010467063635587692,
-0.01875936985015869,
-0.2934158444404602,
-0.06427209079265594,
-0.4409799575805664,
0.26867708563804626,
0.4563600420951843,
0.13016504049301147,
-0.10318006575107574,
-0.10591575503349304,
0.17893294990062714,
0.31603676080703735,
0.2749316096305847,
0.05546240136027336,
0.0449783094227314,
0.2654488682746887,
-0.3704788386821747,
0.13032737374305725,
0.09830745309591293,
0.060029055923223495,
0.08491246402263641,
0.03113214671611786,
0.185244619846344,
-0.0033053853549063206,
0.2500496506690979,
-0.5590511560440063,
0.02356175146996975,
0.13754108548164368,
0.004395771771669388,
0.18345923721790314,
-0.2239951193332672,
0.2630486786365509,
0.23458322882652283,
-0.12395170331001282,
0.22703351080417633,
0.052904464304447174,
-0.19900694489479065,
0.018715377897024155,
0.38928717374801636,
-0.1164693683385849,
-0.40543463826179504,
-0.18742187321186066,
0.04910718649625778,
-0.17122900485992432,
0.07847145199775696,
-0.05900155007839203,
0.15182608366012573,
-0.002143995137885213,
0.022861149162054062,
-0.14532208442687988,
0.36001765727996826,
-0.15977300703525543,
-0.0199760552495718,
0.26208606362342834,
-0.0905345007777214,
0.32676559686660767,
0.07064111530780792,
0.030550071969628334,
0.20732976496219635,
0.5026630163192749,
-0.20050449669361115,
-0.17890289425849915,
-0.1821710169315338,
-0.032557737082242966,
-0.08924371749162674,
0.2249552607536316,
-0.09737582504749298,
-0.19545391201972961,
0.22671738266944885,
-0.17405597865581512,
-0.08463572710752487,
-0.11701656877994537,
-0.044593676924705505,
-0.028484132140874863,
0.042311105877161026,
-0.4739627540111542,
0.11511362344026566,
0.1791701763868332,
-0.05623577907681465,
0.34881138801574707,
-0.2945675253868103,
-0.019916776567697525,
0.18366380035877228,
0.04580418020486832,
0.584921658039093,
0.09381482750177383,
-0.10630838572978973,
-0.11293207854032516,
-0.2617775797843933,
0.39568817615509033,
-0.33509117364883423,
0.26829850673675537,
-0.24489043653011322,
-0.27297458052635193,
0.15062113106250763,
-0.16872835159301758,
0.2396327257156372,
0.10266220569610596,
-0.06055475026369095,
0.20226126909255981,
-0.0745358020067215,
0.2639932334423065,
0.038240984082221985,
0.22787639498710632,
-0.13517402112483978,
-0.06604814529418945,
0.09564905613660812,
0.1695219725370407,
-0.004630398005247116,
0.3136823773384094,
-0.13434401154518127,
0.02605951949954033,
0.27400416135787964,
-0.09832276403903961,
-0.24545226991176605,
-0.13507771492004395,
-0.14139969646930695,
0.010864810086786747,
0.19764766097068787,
-0.142438605427742,
0.0825919657945633,
0.11559732258319855,
0.273648202419281,
0.107454314827919,
-0.16140878200531006,
0.1261478215456009,
0.12745769321918488,
0.2821272611618042,
-0.17284910380840302,
-0.22045952081680298,
0.3994208574295044,
-0.004801355302333832,
-0.12511102855205536,
-0.21569082140922546,
-0.5188757181167603,
-0.43459993600845337,
0.23536014556884766,
0.1876213103532791,
0.31333160400390625,
0.08224349468946457,
0.044638603925704956,
0.050663888454437256,
0.28566062450408936,
-0.22073370218276978,
0.18870846927165985,
0.12948544323444366,
-0.11029250174760818,
0.18522021174430847,
-0.4093116521835327,
-0.25120699405670166,
-0.05825132504105568,
0.28181955218315125,
0.2550126910209656,
-0.23354002833366394,
0.33604323863983154,
-0.26736167073249817,
-0.0726706013083458,
-0.11859667301177979,
-0.056689709424972534,
0.06481163203716278,
-0.21454086899757385,
-0.0365525521337986,
0.035026319324970245,
0.06481850147247314,
0.1371728479862213,
-0.08903375267982483,
0.10724171251058578,
0.06262403726577759,
-0.3028647005558014,
-0.19942334294319153,
-0.36945563554763794,
-0.2732173204421997,
-0.11600442230701447,
0.11177046597003937,
0.015584591776132584,
-0.04421877861022949,
0.2239627093076706,
0.29317405819892883,
-0.32685229182243347,
-0.0356396809220314,
-0.20118865370750427,
0.07786324620246887,
-0.31650060415267944,
0.21159133315086365,
0.07819020748138428,
-0.12657751142978668,
-0.06210458278656006,
0.12340816110372543,
-0.32848790287971497,
-0.23652884364128113,
-0.0045450106263160706,
0.12967902421951294,
0.10192692279815674,
0.26762720942497253,
-0.1630527228116989,
-0.03431645408272743,
0.05065655708312988,
0.017090849578380585,
0.17996926605701447,
-0.03156556934118271,
-0.08698132634162903,
0.34480568766593933,
0.09508153796195984,
0.34688839316368103,
-0.08900099992752075,
-0.07349646091461182,
-0.12033064663410187,
0.19327086210250854,
0.02150406688451767,
0.09285949915647507,
0.022420501336455345,
0.015366889536380768,
0.10913392901420593,
-0.05466931313276291,
-0.1389501392841339,
0.1786765456199646,
0.17558296024799347,
-0.2113986760377884,
-0.007110580801963806,
0.30651742219924927,
0.1843283772468567,
0.07514107972383499,
-0.01447688601911068,
-0.15491445362567902,
0.36586958169937134,
0.23364843428134918,
-0.25629162788391113,
-0.24566522240638733,
0.3817504346370697,
0.04604269936680794,
0.05810573324561119,
0.06724503636360168,
0.5152274370193481,
-0.29259541630744934,
0.318565309047699,
0.1348704695701599,
0.27336832880973816,
-0.48031187057495117,
0.11807702481746674,
0.3190510869026184,
0.17847321927547455,
0.014569669961929321,
0.24047665297985077,
0.07970838993787766,
0.05315402150154114,
0.48554086685180664,
-0.08296976238489151,
0.14100228250026703,
-0.010190971195697784,
0.3159426748752594,
-0.183517187833786,
-0.5806634426116943,
0.4861345887184143,
0.1387699395418167,
-0.15313801169395447,
-0.057571567595005035,
-0.2067171037197113,
0.2538541853427887,
0.17924393713474274,
-0.22170878946781158,
-0.16570690274238586,
0.11094078421592712,
-0.3387538194656372,
0.06919783353805542,
0.14418481290340424,
-0.13346579670906067,
0.13948269188404083,
0.08604557812213898,
0.19330532848834991,
0.19970367848873138,
0.30721545219421387,
-0.15257975459098816,
-0.17209111154079437,
-0.17579156160354614,
0.13467074930667877,
0.023248901590704918,
0.07330073416233063,
-0.11885018646717072,
0.23485113680362701,
-0.030356019735336304,
-0.2272111475467682,
0.002851128578186035,
0.4154132604598999,
0.19968490302562714,
0.19920097291469574,
0.012223418802022934,
0.13011746108531952,
-0.20288020372390747,
0.10176306962966919,
-0.4308285713195801,
0.4320877194404602,
-0.25027915835380554,
-0.3689311444759369,
0.28017082810401917,
0.026697980239987373,
-0.11334486305713654,
0.09111684560775757,
-0.16850391030311584,
0.11270759999752045,
-0.5603564977645874,
0.30349671840667725,
0.34996747970581055,
-0.012325413525104523,
0.048785578459501266,
0.22303196787834167,
-0.14272603392601013,
-0.1782521903514862,
0.4750250279903412,
-0.11033850908279419,
0.026491157710552216,
-0.2779120206832886,
0.12596268951892853,
-0.18487712740898132,
0.37839409708976746,
0.3177623748779297,
-0.06036803871393204,
-0.27192503213882446,
-0.16750045120716095,
-0.7562373876571655,
0.2122107893228531,
-0.04883867874741554,
0.3328855633735657,
0.20078524947166443,
0.15938934683799744,
-0.1959916651248932,
0.14066095650196075,
-0.05183728039264679,
-0.03799836337566376,
0.23168253898620605,
0.011109430342912674,
-0.20351088047027588,
0.10858049988746643,
-0.06873644888401031,
-0.32805949449539185,
0.03589704632759094,
-0.3965868055820465,
0.3446274697780609,
-0.136516273021698,
0.08435659855604172,
0.20756804943084717,
-0.19354435801506042,
0.3796270191669464,
0.2734096944332123,
0.33786001801490784,
0.35908523201942444,
0.01531265676021576,
0.13035017251968384,
0.018846580758690834,
-0.1475563794374466,
0.2175378054380417,
-0.25286436080932617,
0.14264218509197235,
-0.25022777915000916,
0.05008276551961899,
-0.5288491249084473,
-0.20591707527637482,
-0.31604915857315063,
0.3023277223110199,
0.1304202377796173,
-0.05675632134079933,
-0.13215272128582,
-0.12842507660388947,
-0.3266010284423828,
0.46131032705307007,
0.2988033592700958,
0.07991842180490494,
0.07405301928520203,
0.13412372767925262,
-0.46891045570373535,
-0.04011280834674835,
0.3417389392852783,
-0.3154909312725067,
-0.15340416133403778,
-0.3065924644470215,
0.3315870761871338,
-0.06307908147573471,
-0.32817426323890686,
-0.23686617612838745,
0.010855637490749359,
0.3737572133541107,
-0.06342539936304092,
0.12177786231040955,
0.3035767674446106,
-0.1761273592710495,
0.470082551240921,
-0.05235238000750542,
-0.07079818844795227,
0.11523035168647766,
0.09132007509469986,
-0.05544921010732651,
-0.18460409343242645
] |
https://github.com/huggingface/datasets/issues/2561 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` | The cache is based on the hash of the dataset builder's code, so changing the code makes it recompute the cache.
You could still rename the cache directory of your previous computation to the new expected cache directory if you want to avoid having to recompute it and if you're sure that it would generate the exact same result.
The verifications are data integrity verifications: it checks the checksums of the downloaded files, as well as the size of the generated splits. | ## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
| 82 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
The cache is based on the hash of the dataset builder's code, so changing the code makes it recompute the cache.
You could still rename the cache directory of your previous computation to the new expected cache directory if you want to avoid having to recompute it and if you're sure that it would generate the exact same result.
The verifications are data integrity verifications: it checks the checksums of the downloaded files, as well as the size of the generated splits. | [
-0.38098806142807007,
0.43865954875946045,
-0.0031962208449840546,
0.17506998777389526,
0.09501989185810089,
0.1552421748638153,
0.23175203800201416,
0.41996946930885315,
0.15906137228012085,
0.309204638004303,
0.16211460530757904,
0.2830122113227844,
0.11000144481658936,
-0.20820723474025726,
-0.03214116767048836,
0.2218119502067566,
0.06826530396938324,
0.1848924607038498,
0.15041813254356384,
-0.01821938157081604,
-0.10427530109882355,
-0.03407031297683716,
-0.009553350508213043,
-0.24195392429828644,
-0.4294946491718292,
0.08296038210391998,
0.06355635821819305,
0.16019585728645325,
-0.08795838803052902,
-0.46990206837654114,
0.30210259556770325,
0.24755723774433136,
-0.1526564508676529,
0.2725527286529541,
-0.00010499650670681149,
0.1780283898115158,
0.3562345504760742,
0.05685099959373474,
-0.47117966413497925,
0.24163222312927246,
-0.367404043674469,
-0.44357359409332275,
-0.1549159735441208,
-0.15375426411628723,
-0.018380289897322655,
-0.19410109519958496,
-0.11457271873950958,
-0.2818763852119446,
0.35089266300201416,
0.07161085307598114,
0.28270426392555237,
0.1405947357416153,
-0.20494814217090607,
-0.015573306009173393,
0.19997094571590424,
-0.014821916818618774,
-0.02813325636088848,
0.15250687301158905,
0.18520626425743103,
0.09824030846357346,
-0.401155561208725,
0.3540203869342804,
-0.20523516833782196,
0.1669318526983261,
0.35239529609680176,
-0.19471123814582825,
0.04733336344361305,
-0.0936717838048935,
0.3847610056400299,
0.12607353925704956,
0.5368211269378662,
-0.2587721049785614,
-0.3534722626209259,
-0.24964195489883423,
-0.2884819209575653,
-0.01498178020119667,
0.2838676869869232,
-0.1221725344657898,
-0.19459770619869232,
0.15720871090888977,
-0.4552605450153351,
-0.23259447515010834,
0.08083434402942657,
-0.22290639579296112,
0.06297522038221359,
-0.22959932684898376,
0.14359158277511597,
-0.08748085051774979,
0.04411730170249939,
0.22348816692829132,
0.3453528583049774,
-0.47246068716049194,
-0.04030078276991844,
0.25108620524406433,
-0.4561108946800232,
-0.07664936035871506,
0.25874093174934387,
0.3883609175682068,
0.26042842864990234,
0.3886112570762634,
-0.19325606524944305,
0.24563413858413696,
0.1801910698413849,
0.0984620749950409,
-0.12473991513252258,
0.3354094922542572,
-0.04900994151830673,
0.004754476249217987,
0.30911749601364136,
0.24272465705871582,
-0.3884599208831787,
0.006637090817093849,
0.12575052678585052,
-0.2951217591762543,
0.4921714663505554,
0.026052255183458328,
-0.057825665920972824,
-0.32349857687950134,
-0.08047595620155334,
0.1806788593530655,
0.023397773504257202,
-0.12738728523254395,
0.16676896810531616,
0.19578556716442108,
-0.08267392963171005,
0.13654151558876038,
-0.33650827407836914,
-0.2401607483625412,
-0.34186825156211853,
-0.33353716135025024,
-0.3955496549606323,
-0.15280696749687195,
0.025593582540750504,
0.3271663188934326,
0.4925561845302582,
-0.5260608792304993,
0.3480476438999176,
0.1541675478219986,
-0.05435433238744736,
0.09984834492206573,
0.22373077273368835,
-0.2249775379896164,
0.2071828544139862,
0.35389843583106995,
-0.2637624442577362,
-0.026921529322862625,
-0.008456628769636154,
-0.09124748408794403,
-0.10133575648069382,
0.258948415517807,
-0.12300471216440201,
-0.7289397716522217,
0.1184706911444664,
0.2128460854291916,
-0.2772567868232727,
0.08543326705694199,
0.27860090136528015,
0.07544116675853729,
0.3407643735408783,
-0.32177630066871643,
-0.05565180629491806,
-0.0820496529340744,
-0.2780359089374542,
-0.12905532121658325,
0.44631028175354004,
0.7053072452545166,
-0.4558092951774597,
0.1331191211938858,
-0.16719236969947815,
-0.05536200478672981,
0.009221524000167847,
0.2276040017604828,
-0.23566076159477234,
0.30703896284103394,
-0.3199962377548218,
-0.25366875529289246,
0.18785470724105835,
-0.2249671369791031,
-0.8255178332328796,
0.26866671442985535,
0.1492612659931183,
0.19010066986083984,
0.21136122941970825,
0.0449058897793293,
0.02535509131848812,
-0.22500884532928467,
0.00020923465490341187,
0.24080955982208252,
-0.2048727124929428,
0.07763440161943436,
-0.471550315618515,
-0.2308916300535202,
0.04945013299584389,
0.030416619032621384,
0.06501521915197372,
0.13325870037078857,
0.12750881910324097,
0.14798317849636078,
0.002820253372192383,
-0.028234709054231644,
0.12792560458183289,
0.2897249460220337,
0.07259973883628845,
-0.1606547236442566,
0.23414352536201477,
-0.1299557089805603,
-0.4772046208381653,
0.426870733499527,
-0.24302183091640472,
-0.16127169132232666,
-0.0033582597970962524,
-0.3678760528564453,
-0.13158556818962097,
-0.0959358960390091,
-0.3227367103099823,
-0.17618340253829956,
0.1626996546983719,
0.22173725068569183,
0.4972631335258484,
-0.08636579662561417,
-0.09216050803661346,
0.23643434047698975,
-0.2325896918773651,
0.15639068186283112,
-0.04374758154153824,
-0.06195272505283356,
-0.0965532436966896,
-0.003733205609023571,
-0.2672519385814667,
0.063712939620018,
0.06128319725394249,
-0.1438024640083313,
-0.21191290020942688,
0.38131025433540344,
0.18241837620735168,
0.14830616116523743,
0.10388167202472687,
0.20735999941825867,
0.045435551553964615,
0.09153534471988678,
0.20940668880939484,
-0.1386992335319519,
0.08829356729984283,
-0.06921958923339844,
-0.10168450325727463,
0.09413457661867142,
-0.0026228800415992737,
0.1150357574224472,
-0.09741197526454926,
-0.32730066776275635,
0.2436905801296234,
-0.09792275726795197,
0.04821714758872986,
-0.15211212635040283,
-0.022417519241571426,
0.10892412066459656,
0.47052401304244995,
0.24945968389511108,
0.09593433141708374,
0.13081325590610504,
0.5666046142578125,
0.09511281549930573,
-0.30639922618865967,
0.008478455245494843,
-0.092088483273983,
-0.26525482535362244,
0.08583556115627289,
0.45673444867134094,
0.37056267261505127,
0.18728403747081757,
0.2971365749835968,
0.043376728892326355,
0.025068242102861404,
-0.19818027317523956,
0.0852612853050232,
-0.049864426255226135,
-0.20390257239341736,
0.37126535177230835,
0.22855474054813385,
0.16485434770584106,
-0.40264973044395447,
0.24532046914100647,
0.18850108981132507,
0.1817779541015625,
0.007612172514200211,
0.21014977991580963,
-0.4117994010448456,
-0.1393774002790451,
-0.19304239749908447,
0.15589366853237152,
-0.30651819705963135,
-0.29439935088157654,
0.17033782601356506,
-0.0018872134387493134,
-0.11349186301231384,
0.21636627614498138,
-0.04385342448949814,
0.37271779775619507,
-0.014458907768130302,
-0.5106043219566345,
-0.35189688205718994,
-0.02048882469534874,
-0.4219547510147095,
0.06384707987308502,
0.4755045771598816,
-0.2497100532054901,
0.3643747866153717,
-0.3301580250263214,
-0.14672797918319702,
-0.17759190499782562,
-0.2530398666858673,
0.057176388800144196,
0.002379484474658966,
0.24410445988178253,
-0.11946126818656921,
0.009494379162788391,
0.0901724249124527,
0.07311248034238815,
0.13421142101287842,
-0.1966598778963089,
-0.21621616184711456,
-0.12328549474477768,
0.0012069842778146267,
0.16173946857452393,
-0.4055027663707733,
-0.2719641923904419,
0.0034307455644011497,
-0.35676103830337524,
0.0014948770403862,
0.10710108280181885,
0.05387357994914055,
0.15467128157615662,
-0.13956771790981293,
0.2075209766626358,
0.035873014479875565,
0.09462917596101761,
-0.33719712495803833,
-0.5732306838035583,
0.198599711060524,
-0.17972999811172485,
-0.08404389023780823,
0.08579781651496887,
-0.2623574733734131,
0.09238256514072418,
0.024668771773576736,
-0.5293716192245483,
0.008980928920209408,
-0.5315983295440674,
0.2878871560096741,
-0.12230867147445679,
0.013755314983427525,
0.44148385524749756,
0.019804809242486954,
-0.10300403833389282,
-0.20688939094543457,
-0.20043069124221802,
0.08415702730417252,
-0.27014073729515076,
0.2128930240869522,
-0.061431609094142914,
-0.09049306064844131,
0.1922159343957901,
0.6441389322280884,
0.17056962847709656,
-0.026124123483896255,
0.2631533741950989,
0.23550225794315338,
0.5081667900085449,
-0.30464068055152893,
-0.1536637544631958,
0.17517372965812683,
-0.11243411898612976,
-0.28074175119400024,
0.09429085999727249,
0.0032020239159464836,
-0.076058030128479,
-0.10717836022377014,
0.005422409623861313,
0.07173619419336319,
-0.21134458482265472,
0.017479699105024338,
-0.37708139419555664,
0.1748269945383072,
0.38059693574905396,
0.21627920866012573,
-0.14430348575115204,
-0.11608247458934784,
0.1850568801164627,
0.29572969675064087,
0.1747494637966156,
0.018111178651452065,
0.01321067288517952,
0.20206399261951447,
-0.3103519082069397,
0.12603755295276642,
0.1875198930501938,
-0.04210754856467247,
0.03420419618487358,
-0.07160429656505585,
0.23431165516376495,
-0.05025263875722885,
0.31095778942108154,
-0.46990376710891724,
0.03963450342416763,
0.1316845417022705,
0.0003007464110851288,
0.19482262432575226,
-0.26030510663986206,
0.09652580320835114,
0.21915729343891144,
-0.017804842442274094,
0.32814821600914,
-0.06143106147646904,
-0.17609210312366486,
0.09454642236232758,
0.3984558880329132,
-0.08204391598701477,
-0.32541483640670776,
-0.32350683212280273,
0.03693011403083801,
-0.19154693186283112,
0.14253836870193481,
-0.10919248312711716,
0.18120987713336945,
-0.1364022046327591,
-0.0018459223210811615,
-0.08896789699792862,
0.23006084561347961,
-0.14548718929290771,
0.03936903178691864,
0.23797675967216492,
-0.12252387404441833,
0.2264849841594696,
0.06669051200151443,
0.09995130449533463,
0.22872914373874664,
0.4857911467552185,
-0.19692571461200714,
-0.15247133374214172,
-0.14136675000190735,
-0.05938408151268959,
-0.13902020454406738,
0.2855292558670044,
-0.0680384710431099,
-0.2639184594154358,
0.2175973802804947,
-0.004712298512458801,
-0.12727004289627075,
-0.013720663264393806,
0.04221269488334656,
-0.025455433875322342,
0.03494618460536003,
-0.44420093297958374,
0.16181164979934692,
0.18684686720371246,
-0.0335102342069149,
0.278107225894928,
-0.15211135149002075,
0.07958264648914337,
0.13301193714141846,
0.1249544695019722,
0.6822169423103333,
0.13621124625205994,
-0.1145956814289093,
0.00020752474665641785,
-0.2710431218147278,
0.37847399711608887,
-0.36291223764419556,
0.24405595660209656,
-0.19738954305648804,
-0.34953418374061584,
0.13364695012569427,
-0.16395026445388794,
0.28525614738464355,
0.030786411836743355,
-0.14365838468074799,
0.18676157295703888,
-0.02879541739821434,
0.19450445473194122,
0.009615857154130936,
0.30095988512039185,
-0.17344453930854797,
-0.1199181079864502,
0.10387364774942398,
0.2350698709487915,
0.02058897539973259,
0.2723829746246338,
-0.07777031511068344,
0.03245383873581886,
0.1645318567752838,
-0.06915921717882156,
-0.28809115290641785,
-0.15450438857078552,
-0.08715806901454926,
0.04424230009317398,
0.11702780425548553,
-0.10488860309123993,
-0.027732999995350838,
0.0329480916261673,
0.2732405662536621,
0.18823690712451935,
-0.1695493757724762,
0.19028519093990326,
0.10607455670833588,
0.31678545475006104,
-0.05975860357284546,
-0.24416537582874298,
0.4073328375816345,
-0.08082835376262665,
-0.11480319499969482,
-0.2614191770553589,
-0.5250526070594788,
-0.33272290229797363,
0.3132186830043793,
0.10880836844444275,
0.2869952917098999,
0.043615199625492096,
0.14057724177837372,
-0.04388657212257385,
0.1577400416135788,
-0.21743161976337433,
0.20912809669971466,
0.04274623841047287,
-0.10724598914384842,
0.14308789372444153,
-0.32176145911216736,
-0.3278847932815552,
-0.11947326362133026,
0.27786630392074585,
0.17663508653640747,
-0.12318950891494751,
0.3894490599632263,
-0.2933327555656433,
-0.17935217916965485,
-0.1765350103378296,
-0.040274836122989655,
-0.04116309434175491,
-0.26974210143089294,
0.007538617588579655,
-0.040174197405576706,
0.005067378282546997,
0.10451773554086685,
-0.07125478982925415,
0.12293165177106857,
0.14393720030784607,
-0.3369540274143219,
-0.24676749110221863,
-0.3537616431713104,
-0.26538997888565063,
-0.14808517694473267,
0.13091740012168884,
-0.03454834595322609,
-0.012208987027406693,
0.22499075531959534,
0.38297581672668457,
-0.3870069980621338,
-0.04686713218688965,
-0.2649422585964203,
0.08123311400413513,
-0.3280067443847656,
0.050666000694036484,
0.09092990309000015,
-0.07474607229232788,
0.009002873674035072,
0.1508883833885193,
-0.3463093936443329,
-0.29398709535598755,
0.05402703210711479,
0.10594363510608673,
-0.04690661281347275,
0.1963614821434021,
-0.119975246489048,
0.11902385950088501,
-0.0014977604150772095,
-0.04913492128252983,
0.21239537000656128,
-0.21606320142745972,
-0.15637263655662537,
0.2548009753227234,
0.17078058421611786,
0.3533971607685089,
-0.079933762550354,
-0.02746572345495224,
-0.18303802609443665,
0.1936134546995163,
-0.04375769942998886,
0.13206614553928375,
-0.04508557915687561,
-0.08736024796962738,
0.11323141306638718,
-0.03149870038032532,
-0.03363886475563049,
0.13848526775836945,
0.2454381287097931,
-0.16365227103233337,
-0.0036885030567646027,
0.22537463903427124,
0.22107547521591187,
0.1636664867401123,
0.07177866250276566,
-0.2607775032520294,
0.31724846363067627,
0.2696537971496582,
-0.1820490062236786,
-0.20110169053077698,
0.337192177772522,
-0.02472560852766037,
0.13180094957351685,
0.034198202192783356,
0.443209707736969,
-0.16719885170459747,
0.2255139797925949,
0.154445081949234,
0.343415230512619,
-0.35366547107696533,
0.041746944189071655,
0.4806291162967682,
0.14291904866695404,
0.09763568639755249,
0.21863634884357452,
-0.03597087040543556,
0.05621523782610893,
0.49861305952072144,
-0.12540477514266968,
0.31066182255744934,
-0.06867842376232147,
0.2836298942565918,
-0.20625627040863037,
-0.5564455389976501,
0.401871919631958,
0.1693209558725357,
-0.13160943984985352,
-0.11216152459383011,
-0.1635001003742218,
0.2880297303199768,
0.029241636395454407,
-0.21761395037174225,
-0.25864583253860474,
0.15242928266525269,
-0.2848621904850006,
0.0762699693441391,
0.08214256167411804,
-0.08519832789897919,
0.05541859567165375,
0.13261692225933075,
0.1994865983724594,
0.22656244039535522,
0.34739869832992554,
-0.09897451102733612,
-0.1429738700389862,
-0.08778098970651627,
0.12336082756519318,
-0.09859570115804672,
0.07120528072118759,
-0.14799658954143524,
0.18240754306316376,
0.09585873037576675,
-0.1535419225692749,
0.06405812501907349,
0.3616480231285095,
0.250695139169693,
0.21237823367118835,
-0.09893523156642914,
0.025959879159927368,
-0.17115390300750732,
0.018797757104039192,
-0.37251681089401245,
0.4313400685787201,
-0.29850777983665466,
-0.28172892332077026,
0.34235644340515137,
0.08575604856014252,
-0.19491668045520782,
0.0019103586673736572,
-0.22042639553546906,
0.027450311928987503,
-0.4845620393753052,
0.3101215362548828,
0.3515850305557251,
-0.030931971967220306,
-0.09049511700868607,
0.2066887617111206,
-0.20653164386749268,
-0.20101065933704376,
0.2995296120643616,
-0.11960362643003464,
0.0717514380812645,
-0.2509056627750397,
0.13034498691558838,
-0.2079915851354599,
0.6261109709739685,
0.35181304812431335,
0.028196260333061218,
-0.2392156422138214,
-0.17702093720436096,
-0.6708558797836304,
0.2010461986064911,
-0.0954013466835022,
0.18959645926952362,
0.0860060378909111,
0.2077534943819046,
-0.14472299814224243,
0.1590956151485443,
-0.0037623941898345947,
0.06489814817905426,
0.21737778186798096,
-0.005004875361919403,
-0.2826896905899048,
0.1956050843000412,
-0.14736823737621307,
-0.352796345949173,
0.005521554499864578,
-0.44279804825782776,
0.43738287687301636,
-0.15149925649166107,
0.12826192378997803,
0.33310192823410034,
-0.1716023087501526,
0.4262599050998688,
0.27266809344291687,
0.25247395038604736,
0.31810247898101807,
0.12002494186162949,
0.08992642909288406,
0.021541500464081764,
-0.1689336895942688,
0.3327588737010956,
-0.29008761048316956,
0.14658422768115997,
-0.20024947822093964,
0.06940311938524246,
-0.3555555045604706,
-0.0972994714975357,
-0.2597147226333618,
0.4706435799598694,
0.16529208421707153,
0.05769285187125206,
-0.09768184274435043,
-0.20625092089176178,
-0.27869805693626404,
0.40573933720588684,
0.35903406143188477,
0.08325700461864471,
0.13411185145378113,
0.06535587459802628,
-0.4515417218208313,
-0.10348941385746002,
0.3416597843170166,
-0.23799441754817963,
-0.18308058381080627,
-0.33907198905944824,
0.390135258436203,
0.0657893493771553,
-0.2984901964664459,
-0.1949421763420105,
0.03997529298067093,
0.3311706483364105,
-0.06268446147441864,
0.006986312568187714,
0.3112778663635254,
-0.1424298882484436,
0.38587111234664917,
-0.09996823966503143,
-0.11952964961528778,
0.007080560550093651,
0.0974019467830658,
-0.017712866887450218,
-0.152521014213562
] |
https://github.com/huggingface/datasets/issues/2561 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True` | Hi @apsdehal,
If you decide to follow @lhoestq's suggestion to rename the cache directory of your previous computation to the new expected cache directory, you can do the following to get the name of the new expected cache directory once #2500 is merged:
```python
from datasets import load_dataset_builder
dataset_builder = load_dataset_builder("path/to/your/dataset")
print(dataset_builder.cache_dir)
```
This way, you don't have to recompute the hash of the dataset script yourself each time you modify the script. | ## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
| 73 | Existing cache for local dataset builder file updates is ignored with `ignore_verifications=True`
## Describe the bug
If i have local file defining a dataset builder class and I load it using `load_dataset` functionality, the existing cache is ignored whenever the file is update even with `ignore_verifications=True`. This slows down debugging and cache generator for very large datasets.
## Steps to reproduce the bug
- Create a local dataset builder class
- load the local builder class file using `load_dataset` and let the cache build
- update the file's content
- The cache should rebuilt.
## Expected results
With `ignore_verifications=True`, `load_dataset` should pick up existing cache.
## Actual results
Creates new cache.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
Hi @apsdehal,
If you decide to follow @lhoestq's suggestion to rename the cache directory of your previous computation to the new expected cache directory, you can do the following to get the name of the new expected cache directory once #2500 is merged:
```python
from datasets import load_dataset_builder
dataset_builder = load_dataset_builder("path/to/your/dataset")
print(dataset_builder.cache_dir)
```
This way, you don't have to recompute the hash of the dataset script yourself each time you modify the script. | [
-0.4378633201122284,
0.4782150387763977,
-0.007668433710932732,
0.11805297434329987,
0.1569269895553589,
0.18813124299049377,
0.29603269696235657,
0.4827197194099426,
0.17503690719604492,
0.34378138184547424,
0.22528445720672607,
0.31124749779701233,
0.06439578533172607,
-0.19516727328300476,
0.026697883382439613,
0.3226768970489502,
0.04570692405104637,
0.1662348359823227,
0.0950697660446167,
0.005610235035419464,
-0.1577250361442566,
-0.04805412143468857,
-0.04327509179711342,
-0.2891945242881775,
-0.3779675364494324,
0.14614331722259521,
0.12889884412288666,
0.10294240713119507,
0.04186023026704788,
-0.500504195690155,
0.34779906272888184,
0.2545362412929535,
-0.07903442531824112,
0.32210573554039,
-0.0001039051276165992,
0.14509417116641998,
0.3499031662940979,
0.029226457700133324,
-0.4508448541164398,
0.1350852996110916,
-0.3023410439491272,
-0.3922794759273529,
-0.0445118322968483,
-0.1520199030637741,
-0.14975260198116302,
-0.1942983716726303,
-0.09285707026720047,
-0.33355972170829773,
0.23689556121826172,
0.06958795338869095,
0.3009345233440399,
0.11463642120361328,
-0.17482596635818481,
-0.05584999918937683,
0.13335853815078735,
-0.07269157469272614,
-0.033904384821653366,
0.15258483588695526,
0.17158496379852295,
-0.02666596882045269,
-0.3792468011379242,
0.405272901058197,
-0.20344991981983185,
0.13348916172981262,
0.3996662497520447,
-0.14778846502304077,
0.08123188465833664,
-0.030795514583587646,
0.38420140743255615,
0.008894853293895721,
0.5154055953025818,
-0.3620010316371918,
-0.36488771438598633,
-0.21128979325294495,
-0.23110932111740112,
-0.1044788807630539,
0.22093573212623596,
-0.1983414888381958,
-0.23475144803524017,
0.17361614108085632,
-0.39272019267082214,
-0.2276473492383957,
0.04179514944553375,
-0.18095245957374573,
0.08807611465454102,
-0.22500118613243103,
0.1053650826215744,
-0.13724440336227417,
-0.12547674775123596,
0.145220547914505,
0.3674777150154114,
-0.39485448598861694,
-0.021529164165258408,
0.22896917164325714,
-0.46127015352249146,
-0.023996975272893906,
0.39443519711494446,
0.314005970954895,
0.23737627267837524,
0.34741270542144775,
-0.10953231155872345,
0.2829095721244812,
0.17503906786441803,
0.09150955080986023,
-0.13570527732372284,
0.35067039728164673,
-0.034068815410137177,
-0.052787426859140396,
0.3768596649169922,
0.2751905024051666,
-0.4690764844417572,
0.005692111328244209,
0.10602511465549469,
-0.3259640634059906,
0.580010712146759,
0.0720464214682579,
0.052425235509872437,
-0.31299683451652527,
-0.047572165727615356,
0.24539512395858765,
0.06364122778177261,
-0.09618070721626282,
0.21225933730602264,
0.2610960006713867,
-0.10543622076511383,
0.23113977909088135,
-0.17333519458770752,
-0.21530093252658844,
-0.3223363161087036,
-0.28026238083839417,
-0.4096829295158386,
-0.15373125672340393,
0.0119255930185318,
0.30561715364456177,
0.48294660449028015,
-0.4689617455005646,
0.31612399220466614,
0.16185711324214935,
0.011893894523382187,
0.10071216523647308,
0.1903783529996872,
-0.1322096884250641,
0.2143103927373886,
0.2632400095462799,
-0.21326813101768494,
0.010251807048916817,
0.031310733407735825,
-0.11755554378032684,
-0.10584141314029694,
0.223122239112854,
-0.03176160901784897,
-0.7341611981391907,
0.08890754729509354,
0.23304383456707,
-0.2381562441587448,
0.04748881980776787,
0.26363131403923035,
0.03360556438565254,
0.382975697517395,
-0.25035688281059265,
-0.12225926667451859,
-0.09429477155208588,
-0.3573612570762634,
-0.17592166364192963,
0.49802467226982117,
0.7052143216133118,
-0.39968886971473694,
0.15282854437828064,
-0.11566223204135895,
0.07751475274562836,
-0.06655281037092209,
0.15918417274951935,
-0.2795012295246124,
0.33397847414016724,
-0.2976713180541992,
-0.4289454221725464,
0.17984667420387268,
-0.38471314311027527,
-0.7887800931930542,
0.22515824437141418,
0.14575977623462677,
0.14913763105869293,
0.18185125291347504,
0.03961069509387016,
-0.016945982351899147,
-0.21841605007648468,
0.16150282323360443,
0.2312607318162918,
-0.16344992816448212,
0.09834829717874527,
-0.4349820017814636,
-0.2086123824119568,
0.008962083607912064,
0.06883420050144196,
0.08701252937316895,
0.16958464682102203,
0.05681556463241577,
0.08296104520559311,
0.026787307113409042,
-0.04965366795659065,
0.14023086428642273,
0.37368613481521606,
0.11329589784145355,
-0.11593438684940338,
0.22034136950969696,
-0.16550639271736145,
-0.4990052580833435,
0.41170018911361694,
-0.1820979118347168,
-0.14473167061805725,
-0.053116291761398315,
-0.3227127194404602,
-0.13382884860038757,
-0.08751477301120758,
-0.33759981393814087,
-0.13919919729232788,
0.18845652043819427,
0.24964499473571777,
0.44609397649765015,
-0.07711188495159149,
-0.15816590189933777,
0.2838538587093353,
-0.16407285630702972,
0.08997362852096558,
-0.13269871473312378,
-0.140947625041008,
-0.07001344859600067,
-0.09916523844003677,
-0.19540397822856903,
0.05743294954299927,
0.13530221581459045,
-0.06671039760112762,
-0.26080983877182007,
0.302492618560791,
0.0793658122420311,
0.11478398740291595,
0.07111603766679764,
0.27902910113334656,
-0.03507532924413681,
0.18580828607082367,
0.17453445494174957,
-0.07905726134777069,
0.14262188971042633,
-0.038448430597782135,
-0.041347287595272064,
0.13542884588241577,
0.04639801010489464,
0.11259140074253082,
-0.1388842761516571,
-0.3127250075340271,
0.29537084698677063,
-0.12457187473773956,
0.06334563344717026,
-0.14818310737609863,
-0.005784396082162857,
0.07488392293453217,
0.4566464126110077,
0.17716750502586365,
0.0018894374370574951,
0.2123991996049881,
0.48041418194770813,
0.16495563089847565,
-0.24868559837341309,
-0.011734187602996826,
-0.0944049283862114,
-0.2098720371723175,
0.07300776243209839,
0.3972228765487671,
0.3072854280471802,
0.22163501381874084,
0.21928824484348297,
0.057241976261138916,
-0.006848636083304882,
-0.15892058610916138,
0.09115110337734222,
-0.07537521421909332,
-0.15504968166351318,
0.3534369468688965,
0.2896518111228943,
0.1620253175497055,
-0.3402827978134155,
0.17171506583690643,
0.10149139165878296,
0.17742086946964264,
-0.01994127407670021,
0.14800873398780823,
-0.4374258816242218,
-0.1086440458893776,
-0.17473439872264862,
0.20599164068698883,
-0.18123799562454224,
-0.2643582224845886,
0.0996612161397934,
0.10138316452503204,
-0.11854249238967896,
0.21668078005313873,
-0.12252968549728394,
0.30181318521499634,
0.0229900274425745,
-0.4956263303756714,
-0.2863641679286957,
-0.036214981228113174,
-0.3606928288936615,
0.031658023595809937,
0.457174688577652,
-0.25708726048469543,
0.34143349528312683,
-0.27530625462532043,
-0.11610381305217743,
-0.20356106758117676,
-0.22706207633018494,
0.0009946487843990326,
0.03113909438252449,
0.30045098066329956,
-0.12477420270442963,
0.004838988184928894,
0.05451575666666031,
0.061621420085430145,
0.1966448277235031,
-0.2101590782403946,
-0.1613980233669281,
-0.09595244377851486,
-0.0007324990583583713,
0.09841946512460709,
-0.3548957407474518,
-0.3140835464000702,
0.016634687781333923,
-0.4324190318584442,
-0.08865803480148315,
0.1247776448726654,
0.016799844801425934,
0.18204514682292938,
-0.11769010871648788,
0.14047391712665558,
0.0436914786696434,
0.16501487791538239,
-0.2781701982021332,
-0.6232039928436279,
0.2709967792034149,
-0.25065872073173523,
-0.09444749355316162,
0.06155441328883171,
-0.3288156986236572,
0.11375600099563599,
-0.021015042439103127,
-0.4772721529006958,
-0.08005942404270172,
-0.5147488117218018,
0.2753634750843048,
-0.16549894213676453,
0.031568001955747604,
0.4313964545726776,
0.07924669235944748,
-0.11370772123336792,
-0.23643913865089417,
-0.28834035992622375,
0.07907611131668091,
-0.2812064588069916,
0.19446036219596863,
0.005679503083229065,
0.014072829857468605,
0.18723249435424805,
0.5367400050163269,
0.195055291056633,
-0.09024955332279205,
0.29413944482803345,
0.16394151747226715,
0.45426660776138306,
-0.31494730710983276,
-0.20426581799983978,
0.05301628261804581,
-0.07576011121273041,
-0.27867645025253296,
0.04898704215884209,
0.0071320729330182076,
0.000013988465070724487,
-0.14133058488368988,
-0.04135264828801155,
-0.046301744878292084,
-0.3057076036930084,
0.059057265520095825,
-0.45346319675445557,
0.19547784328460693,
0.3803460896015167,
0.17413592338562012,
-0.2321109175682068,
-0.10065335780382156,
0.16467943787574768,
0.246306374669075,
0.16826361417770386,
-0.04572506248950958,
0.03513609245419502,
0.2795370817184448,
-0.4036785662174225,
0.16203664243221283,
0.12889796495437622,
-0.008364197798073292,
0.09306563436985016,
-0.057227566838264465,
0.11773592233657837,
-0.0911329984664917,
0.2825436592102051,
-0.5072567462921143,
0.09113239496946335,
0.20383484661579132,
-0.11256859451532364,
0.06277553737163544,
-0.19892661273479462,
0.15047338604927063,
0.2622157335281372,
-0.0879826694726944,
0.2507496774196625,
-0.0011118128895759583,
-0.23511312901973724,
0.12535366415977478,
0.3870457410812378,
-0.11976397037506104,
-0.33446893095970154,
-0.2623533308506012,
-0.02773859165608883,
-0.15919163823127747,
0.05658583715558052,
-0.08125476539134979,
0.24006418883800507,
-0.030811632052063942,
-0.027897832915186882,
-0.135231152176857,
0.23703041672706604,
-0.10840335488319397,
0.018076997250318527,
0.26286768913269043,
-0.08442685008049011,
0.3803785443305969,
0.025201737880706787,
0.030218318104743958,
0.2365128993988037,
0.46476349234580994,
-0.12505830824375153,
-0.2326640784740448,
-0.19479992985725403,
0.0530398003757,
-0.04490887373685837,
0.2518121004104614,
-0.11614871770143509,
-0.20820876955986023,
0.1460895836353302,
-0.010290846228599548,
-0.14743848145008087,
-0.03047664277255535,
-0.020569955930113792,
-0.003465583547949791,
0.0006034002872183919,
-0.49130913615226746,
0.204158753156662,
0.18955861032009125,
-0.04498415067791939,
0.3198818564414978,
-0.2744067311286926,
-0.02813120372593403,
0.25543761253356934,
0.10068826377391815,
0.6605779528617859,
0.09649389982223511,
-0.035350535064935684,
-0.003620237112045288,
-0.2316717952489853,
0.3259824216365814,
-0.30809611082077026,
0.24570348858833313,
-0.27950459718704224,
-0.3074897229671478,
0.17358091473579407,
-0.19253523647785187,
0.18910086154937744,
0.03482849523425102,
-0.1240578293800354,
0.22530816495418549,
-0.11510385572910309,
0.19125598669052124,
-0.04584107547998428,
0.31504887342453003,
-0.18686220049858093,
-0.17457887530326843,
-0.027451202273368835,
0.25397223234176636,
0.04697771742939949,
0.2461565136909485,
-0.08152739703655243,
0.01877709850668907,
0.1505827009677887,
-0.08085213601589203,
-0.2379859983921051,
-0.06659837067127228,
-0.10748142004013062,
0.060203421860933304,
0.12139038741588593,
-0.10676950216293335,
-0.043612681329250336,
0.05763385072350502,
0.3026900291442871,
0.25052541494369507,
-0.15882612764835358,
0.14854344725608826,
0.05607539042830467,
0.3196140229701996,
-0.06584358960390091,
-0.21281348168849945,
0.4055592119693756,
-0.061763010919094086,
-0.15896925330162048,
-0.2594932019710541,
-0.4273686707019806,
-0.3726552724838257,
0.268048495054245,
0.14602097868919373,
0.2779165506362915,
0.05331100523471832,
0.07710321247577667,
-0.0018374696373939514,
0.17348574101924896,
-0.23060478270053864,
0.2520277798175812,
0.1348029226064682,
-0.1515701562166214,
0.18913328647613525,
-0.3363288342952728,
-0.2991268038749695,
-0.06736999750137329,
0.31145620346069336,
0.15954750776290894,
-0.15176595747470856,
0.4051167964935303,
-0.2083999365568161,
-0.14193126559257507,
-0.18530040979385376,
-0.04755226522684097,
0.0767182856798172,
-0.23267555236816406,
0.06878440082073212,
0.04050016403198242,
0.04310378432273865,
0.1582067608833313,
-0.060867492109537125,
0.03956417739391327,
0.024533182382583618,
-0.3133842647075653,
-0.22254496812820435,
-0.428566038608551,
-0.219331756234169,
-0.0632845014333725,
0.12238527834415436,
-0.001228228211402893,
-0.02672908455133438,
0.1503123641014099,
0.27602216601371765,
-0.41421985626220703,
-0.056600622832775116,
-0.2791689336299896,
0.10241284966468811,
-0.2881477475166321,
0.09848734736442566,
0.11464577913284302,
-0.07665549218654633,
0.06322958320379257,
0.13050252199172974,
-0.3284512460231781,
-0.32287731766700745,
0.024200521409511566,
0.0945780798792839,
-0.01660693809390068,
0.22320392727851868,
-0.1147036999464035,
0.07946702837944031,
0.018437696620821953,
-0.0887310653924942,
0.20977389812469482,
-0.01784253679215908,
-0.11041419208049774,
0.2679860591888428,
0.12212362885475159,
0.3223755359649658,
-0.009902048856019974,
-0.04306240379810333,
-0.1550920307636261,
0.21931947767734528,
-0.04333694651722908,
0.10869456827640533,
-0.05448690056800842,
-0.07055755704641342,
0.13292983174324036,
-0.05702447146177292,
-0.1508283019065857,
0.19239723682403564,
0.22233614325523376,
-0.1864931881427765,
-0.06023072823882103,
0.321834921836853,
0.240019291639328,
0.09073957800865173,
-0.005447641015052795,
-0.19576600193977356,
0.30035701394081116,
0.28325867652893066,
-0.21940867602825165,
-0.17066043615341187,
0.2801477313041687,
-0.013227674178779125,
0.15952816605567932,
0.06501216441392899,
0.35554397106170654,
-0.19909405708312988,
0.233709916472435,
0.13219985365867615,
0.3232167661190033,
-0.4168408513069153,
0.08626994490623474,
0.28539684414863586,
0.1657530963420868,
0.008256696164608002,
0.2053164392709732,
0.06719501316547394,
0.09719057381153107,
0.6143574714660645,
-0.02835194766521454,
0.21895568072795868,
-0.02856476604938507,
0.21014894545078278,
-0.2261810600757599,
-0.5105989575386047,
0.43658962845802307,
0.15501953661441803,
-0.1180955022573471,
-0.10576290637254715,
-0.16101311147212982,
0.22955188155174255,
0.10730589181184769,
-0.12929341197013855,
-0.19494245946407318,
0.14979282021522522,
-0.2843477129936218,
0.03437670320272446,
0.12218807637691498,
-0.024143729358911514,
0.13868200778961182,
0.10233704745769501,
0.2187940925359726,
0.17567846179008484,
0.28151023387908936,
-0.05672857165336609,
-0.10321564972400665,
-0.09501553326845169,
0.19167187809944153,
-0.04509139806032181,
0.119456447660923,
-0.11412227153778076,
0.18233846127986908,
0.10998494178056717,
-0.14821048080921173,
-0.007616516202688217,
0.38535091280937195,
0.31953784823417664,
0.278994083404541,
-0.07871954143047333,
0.1248614564538002,
-0.17495620250701904,
-0.0083580631762743,
-0.4222162365913391,
0.3339468240737915,
-0.3401614725589752,
-0.22747676074504852,
0.32490071654319763,
0.12725558876991272,
-0.20514626801013947,
0.018234292045235634,
-0.14528679847717285,
0.06907417625188828,
-0.4051766097545624,
0.33609750866889954,
0.3596471846103668,
-0.015595607459545135,
-0.10136479139328003,
0.23766928911209106,
-0.23261725902557373,
-0.25243258476257324,
0.43499866127967834,
-0.06043833866715431,
0.0878380537033081,
-0.30280250310897827,
0.14567533135414124,
-0.1554863005876541,
0.4844500422477722,
0.2788090705871582,
-0.0002208426594734192,
-0.2452319860458374,
-0.14205679297447205,
-0.6544248461723328,
0.2114127278327942,
-0.051895204931497574,
0.21119290590286255,
0.049699295312166214,
0.23269249498844147,
-0.1671125888824463,
0.11673734337091446,
0.05904494225978851,
-0.016742123290896416,
0.1796308010816574,
0.03288688510656357,
-0.29916372895240784,
0.15670160949230194,
-0.1595659703016281,
-0.33941689133644104,
0.08945374190807343,
-0.4561435878276825,
0.31971386075019836,
-0.21778233349323273,
0.18501931428909302,
0.2190605252981186,
-0.15686088800430298,
0.3673102557659149,
0.2313750833272934,
0.3429597318172455,
0.25605830550193787,
0.10626968741416931,
0.029454149305820465,
-0.016391325742006302,
-0.2015935182571411,
0.2178555130958557,
-0.3097856640815735,
0.19812601804733276,
-0.22019237279891968,
0.09758862853050232,
-0.4092786908149719,
-0.17605753242969513,
-0.2828540503978729,
0.34628963470458984,
0.08793880045413971,
-0.005147583317011595,
-0.06528554856777191,
-0.0974268689751625,
-0.2284770905971527,
0.4050360321998596,
0.27156302332878113,
0.07124607264995575,
0.0581013448536396,
0.18293404579162598,
-0.4816672205924988,
-0.17423750460147858,
0.41951635479927063,
-0.2215423434972763,
-0.28119397163391113,
-0.26820409297943115,
0.3721104562282562,
-0.09363733977079391,
-0.2679519057273865,
-0.22218307852745056,
0.09803099185228348,
0.31290772557258606,
-0.003539595752954483,
0.00035019591450691223,
0.337786465883255,
-0.15323586761951447,
0.36768296360969543,
-0.06706589460372925,
-0.137729212641716,
0.0599396750330925,
0.13958430290222168,
-0.10613080859184265,
-0.15507060289382935
] |
https://github.com/huggingface/datasets/issues/2559 | Memory usage consistently increases when processing a dataset with `.map` | Hi ! Can you share the function you pass to `map` ?
I know you mentioned it would be hard to share some code but this would really help to understand what happened | ## Describe the bug
I have a HF dataset with image paths stored in it and I am trying to load those image paths using `.map` with `num_proc=80`. I am noticing that the memory usage consistently keeps on increasing with time. I tried using `DEFAULT_WRITER_BATCH_SIZE=10` in the builder to decrease arrow writer's batch size but that doesn't seem to help.
## Steps to reproduce the bug
Providing code as it is would be hard. I can provide a MVP if that helps.
## Expected results
Memory usage should become consistent after some time following the launch of processing.
## Actual results
Memory usage keeps on increasing.
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0 | 33 | Memory usage consistently increases when processing a dataset with `.map`
## Describe the bug
I have a HF dataset with image paths stored in it and I am trying to load those image paths using `.map` with `num_proc=80`. I am noticing that the memory usage consistently keeps on increasing with time. I tried using `DEFAULT_WRITER_BATCH_SIZE=10` in the builder to decrease arrow writer's batch size but that doesn't seem to help.
## Steps to reproduce the bug
Providing code as it is would be hard. I can provide a MVP if that helps.
## Expected results
Memory usage should become consistent after some time following the launch of processing.
## Actual results
Memory usage keeps on increasing.
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-5.4.0-52-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.7.7
- PyArrow version: 3.0.0
Hi ! Can you share the function you pass to `map` ?
I know you mentioned it would be hard to share some code but this would really help to understand what happened | [
-0.15703585743904114,
-0.12911354005336761,
0.007089387625455856,
0.42114007472991943,
0.1809346079826355,
-0.006408214569091797,
0.05896887555718422,
0.11856123805046082,
0.21514923870563507,
0.13143667578697205,
0.40360885858535767,
0.5179609060287476,
-0.18737487494945526,
-0.03429931774735451,
-0.07754793018102646,
0.07395098358392715,
0.10070905834436417,
0.06218571215867996,
-0.0024843811988830566,
0.08143186569213867,
-0.2891266942024231,
0.14853671193122864,
-0.26389196515083313,
-0.016957685351371765,
-0.3848567008972168,
-0.23752960562705994,
0.028359120711684227,
0.15950986742973328,
0.27121707797050476,
-0.4738776385784149,
-0.12402159720659256,
-0.005695335566997528,
0.10056599229574203,
0.5225359797477722,
-0.00012555292050819844,
-0.030560936778783798,
0.4019312858581543,
-0.011966755613684654,
-0.01485008466988802,
0.12461728602647781,
-0.3412509858608246,
-0.14958348870277405,
0.019317690283060074,
-0.09838570654392242,
0.23450326919555664,
-0.028218239545822144,
-0.014443458989262581,
-0.40912970900535583,
0.28773054480552673,
0.07451025396585464,
0.10728643834590912,
-0.04049982503056526,
0.04021361842751503,
0.20158900320529938,
0.348773330450058,
0.3877718448638916,
0.07708247005939484,
0.11276175081729889,
0.0478493757545948,
-0.26278284192085266,
-0.41363221406936646,
0.2883906364440918,
-0.02369864284992218,
0.18979127705097198,
0.5099977254867554,
-0.013492000289261341,
0.33115658164024353,
-0.3816518187522888,
0.4529598355293274,
-0.10678627341985703,
0.1417185515165329,
-0.23964151740074158,
0.23092567920684814,
-0.2007984220981598,
-0.32405903935432434,
-0.07238440960645676,
0.257768839597702,
0.18404728174209595,
-0.33460313081741333,
-0.09821528196334839,
-0.2691873013973236,
-0.23709918558597565,
-0.13937515020370483,
0.1706351637840271,
0.1292579025030136,
-0.3141840994358063,
-0.02010071650147438,
0.25195929408073425,
0.3842778503894806,
-0.1438477635383606,
0.04550730809569359,
-0.39026588201522827,
-0.06031392142176628,
0.20515860617160797,
-0.21770407259464264,
0.36166226863861084,
0.1598571538925171,
-0.1390429437160492,
0.1860155463218689,
-0.4799714684486389,
0.047115229070186615,
0.04938951134681702,
-0.07072634994983673,
0.3078667223453522,
0.5049353241920471,
0.007135873660445213,
0.03393986448645592,
0.3567736744880676,
0.14456042647361755,
0.07390209287405014,
-0.4335693418979645,
-0.09687306731939316,
-0.025475475937128067,
-0.1504221260547638,
0.5621692538261414,
-0.4341059625148773,
-0.008951611816883087,
-0.016201436519622803,
0.08388620615005493,
0.14404073357582092,
-0.2474452257156372,
-0.11926708370447159,
-0.10693144798278809,
0.2773069441318512,
0.16082796454429626,
0.21248754858970642,
0.07982504367828369,
-0.1200265884399414,
-0.2981453835964203,
0.10349816828966141,
-0.06179593503475189,
-0.22472523152828217,
-0.4726647436618805,
0.281933069229126,
-0.11379368603229523,
-0.023724529892206192,
0.07998551428318024,
0.08393260836601257,
-0.1809534728527069,
-0.43114081025123596,
0.21903188526630402,
-0.3097911477088928,
0.30813300609588623,
0.13379396498203278,
-0.27124378085136414,
0.16610780358314514,
-0.25650733709335327,
0.2414974421262741,
0.0015330836176872253,
0.6213243007659912,
-0.4938792586326599,
-0.24637450277805328,
0.0666976049542427,
-0.05544738844037056,
0.1610044687986374,
0.23729924857616425,
-0.28904008865356445,
0.08027245849370956,
0.4135127067565918,
-0.12287801504135132,
-0.054127030074596405,
-0.15086986124515533,
-0.36378800868988037,
-0.35680174827575684,
0.07449027895927429,
0.5120195150375366,
-0.2421153336763382,
-0.05709492042660713,
-0.06980124115943909,
0.13619937002658844,
0.394027978181839,
0.33940818905830383,
-0.14521987736225128,
0.2179718017578125,
-0.2710811197757721,
-0.009268850088119507,
0.05358216166496277,
-0.13539966940879822,
-0.46031537652015686,
0.162618950009346,
0.03542545437812805,
0.044116318225860596,
-0.16762715578079224,
0.09172419458627701,
0.11362162232398987,
-0.020612241700291634,
0.08106627315282822,
0.23995524644851685,
0.06728454679250717,
0.21780766546726227,
-0.3566504716873169,
-0.3306136727333069,
-0.16026780009269714,
-0.06863640248775482,
0.0161733515560627,
-0.15257561206817627,
0.09987740218639374,
-0.33163201808929443,
0.4156739115715027,
-0.17261821031570435,
0.19960300624370575,
0.38734614849090576,
0.32808950543403625,
0.07157053798437119,
0.08201499283313751,
-0.03712040185928345,
0.021824713796377182,
0.06859278678894043,
-0.5524815320968628,
-0.4697284698486328,
-0.08928753435611725,
0.059528812766075134,
0.17691347002983093,
0.2053639143705368,
-0.09544612467288971,
-0.08835524320602417,
-0.07365557551383972,
-0.11792875826358795,
-0.30362915992736816,
-0.024729140102863312,
0.14441244304180145,
0.15267306566238403,
0.06563518941402435,
-0.04426058381795883,
0.027166057378053665,
0.2399711161851883,
0.07523620873689651,
-0.20474353432655334,
-0.201455220580101,
0.06568445265293121,
0.06613393127918243,
0.06542027741670609,
-0.26189106702804565,
0.15133559703826904,
0.2842336595058441,
0.10639612376689911,
-0.07418281584978104,
0.07390233129262924,
0.3849375545978546,
-0.14978927373886108,
0.21341820061206818,
-0.06418003141880035,
0.10574741661548615,
-0.06672077625989914,
0.12133139371871948,
-0.23301111161708832,
0.32696422934532166,
0.3512515127658844,
-0.05820725858211517,
-0.15333044528961182,
-0.02107084169983864,
-0.019961241632699966,
0.4386908710002899,
-0.15396201610565186,
-0.14737790822982788,
0.08735811710357666,
0.26505279541015625,
0.2884356677532196,
0.05703654885292053,
0.06768545508384705,
0.48354512453079224,
0.18636253476142883,
-0.09078491479158401,
0.4215967357158661,
-0.4808892011642456,
-0.1382148563861847,
0.24033984541893005,
-0.014124274253845215,
0.19930067658424377,
0.03444186598062515,
-0.17491918802261353,
0.05505390092730522,
0.0971425324678421,
-0.012740151025354862,
0.10647362470626831,
0.20500130951404572,
0.5473663210868835,
0.11843477189540863,
0.26934298872947693,
-0.010612648911774158,
-0.10872291773557663,
-0.06343938410282135,
0.020494526252150536,
0.022230954840779305,
-0.2989655137062073,
0.2088729292154312,
-0.24584253132343292,
0.16146957874298096,
-0.11524833738803864,
0.1659802496433258,
-0.26645296812057495,
-0.0865108072757721,
-0.19480043649673462,
0.2522463798522949,
-0.02385098859667778,
0.052924640476703644,
0.03733903542160988,
0.13349542021751404,
0.24251888692378998,
-0.2201695591211319,
-0.13351714611053467,
-0.26350241899490356,
-0.37343403697013855,
-0.18667735159397125,
0.3813978135585785,
-0.18527334928512573,
0.3777768015861511,
0.14968274533748627,
0.11761537194252014,
-0.20895707607269287,
-0.12447258830070496,
-0.0028933845460414886,
0.3083299994468689,
0.217301607131958,
-0.09699136018753052,
0.17687121033668518,
-0.10497764497995377,
0.09705737978219986,
0.18644782900810242,
-0.47873711585998535,
0.06665604561567307,
0.13967183232307434,
-0.11923681944608688,
-0.20645380020141602,
-0.017283383756875992,
0.06377804279327393,
0.049852341413497925,
-0.2209957242012024,
0.23917922377586365,
0.08815327286720276,
0.3557169437408447,
0.23300503194332123,
0.42339980602264404,
0.22553399205207825,
-0.22169487178325653,
-0.24988782405853271,
-0.13885951042175293,
-0.05413686856627464,
0.03147321194410324,
-0.08526802808046341,
-0.02355872094631195,
0.0020439065992832184,
-0.04981075972318649,
0.12985850870609283,
0.35872673988342285,
-0.6982624530792236,
0.03016570582985878,
-0.2623223066329956,
0.2872712016105652,
-0.15402428805828094,
0.23278789222240448,
0.1900486797094345,
0.25225016474723816,
0.006876649335026741,
-0.11991467326879501,
-0.3412646949291229,
0.22694528102874756,
0.10213227570056915,
0.26220354437828064,
0.4573044776916504,
0.23408499360084534,
0.17237985134124756,
0.6430391073226929,
0.36811184883117676,
-0.12705914676189423,
0.5097687244415283,
-0.10937150567770004,
0.1468425691127777,
-0.1853078305721283,
-0.08029547333717346,
-0.14674998819828033,
-0.3551236093044281,
-0.10134527087211609,
0.056473348289728165,
0.15981313586235046,
-0.3769485652446747,
0.30075371265411377,
-0.2385738343000412,
-0.014685049653053284,
-0.3792770206928253,
0.3319382667541504,
-0.08863641321659088,
0.41318923234939575,
0.03187267854809761,
-0.09615622460842133,
-0.42142730951309204,
-0.44054269790649414,
0.13516198098659515,
-0.40026599168777466,
0.17805373668670654,
-0.03969879448413849,
-0.04011603444814682,
-0.013843556866049767,
-0.5272113084793091,
0.30674511194229126,
0.039046138525009155,
0.26212722063064575,
-0.02972477860748768,
0.04919943958520889,
0.29869544506073,
-0.07603009790182114,
0.5504159927368164,
-0.034713029861450195,
0.052316900342702866,
-0.0892779678106308,
0.021284934133291245,
-0.47564712166786194,
0.05521724000573158,
-0.0031110569834709167,
0.3808136284351349,
0.09405067563056946,
0.3508792221546173,
0.06972474604845047,
-0.18757939338684082,
0.013252513483166695,
0.04215816408395767,
-0.23547302186489105,
-0.4961811602115631,
-0.13254612684249878,
-0.18410900235176086,
-0.43044430017471313,
0.010923683643341064,
-0.04656878113746643,
0.03360266983509064,
0.31650781631469727,
-0.3026179373264313,
0.12140095233917236,
0.13581159710884094,
0.0017402693629264832,
-0.23510544002056122,
0.5520073771476746,
-0.0232513677328825,
0.03322922810912132,
0.3382858335971832,
-0.19803860783576965,
0.28348660469055176,
0.4085788130760193,
-0.20609703660011292,
0.11846578121185303,
-0.130234956741333,
-0.1976926475763321,
0.26860886812210083,
0.27232784032821655,
0.05603343993425369,
-0.027152903378009796,
-0.04408196359872818,
0.24031196534633636,
-0.3981286585330963,
0.023661889135837555,
0.4464385211467743,
0.15398657321929932,
-0.15112216770648956,
-0.40742626786231995,
0.3398570716381073,
0.3760678172111511,
-0.1697613000869751,
0.8557538390159607,
-0.3192201852798462,
-0.274861603975296,
0.4450089931488037,
0.4598819315433502,
0.7785282135009766,
-0.3535763621330261,
0.3509231507778168,
-0.11296849697828293,
-0.40275365114212036,
-0.34583938121795654,
-0.19956490397453308,
0.08182261139154434,
-0.48454561829566956,
0.0333419106900692,
0.09101282805204391,
-0.24878931045532227,
0.21007472276687622,
0.37345027923583984,
-0.025714542716741562,
0.049720656126737595,
-0.12066242098808289,
0.1924775242805481,
0.049334846436977386,
0.002394571900367737,
0.21570034325122833,
-0.20184379816055298,
0.12367378920316696,
0.015334568917751312,
0.06751185655593872,
-0.18633686006069183,
-0.03636236861348152,
0.05344239994883537,
0.2349967658519745,
-0.16999907791614532,
-0.23454277217388153,
-0.11184722930192947,
-0.5601989030838013,
0.27675461769104004,
-0.039670806378126144,
0.29623377323150635,
0.027737386524677277,
0.055903319269418716,
-0.46463674306869507,
0.12996536493301392,
0.04356769472360611,
0.08328211307525635,
0.46696388721466064,
0.26425254344940186,
0.15064574778079987,
0.013683673925697803,
0.08413507789373398,
-0.01854361966252327,
-0.31307271122932434,
0.10033594071865082,
-0.23818331956863403,
-0.2365969717502594,
-0.43852078914642334,
0.32233235239982605,
0.23017852008342743,
0.07998067885637283,
-0.28597313165664673,
-0.08775891363620758,
-0.14979660511016846,
0.14726482331752777,
0.025474000722169876,
0.1634952872991562,
0.010421817190945148,
0.778664231300354,
-0.21519894897937775,
-0.34801995754241943,
0.04236983135342598,
0.14962226152420044,
-0.027683086693286896,
0.13804922997951508,
0.26218467950820923,
0.02684556320309639,
-0.10493865609169006,
-0.03782979026436806,
0.24247220158576965,
0.07396581023931503,
-0.2794209122657776,
0.16985470056533813,
0.042033325880765915,
-0.16161702573299408,
-0.09632890671491623,
-0.16691960394382477,
-0.12375597655773163,
-0.2514383792877197,
-0.23424860835075378,
-0.11395528167486191,
-0.5196934342384338,
-0.16515769064426422,
-0.2643457353115082,
0.24413621425628662,
0.05326640605926514,
-0.4230462312698364,
0.11318603157997131,
0.46446654200553894,
-0.11002688109874725,
0.16839781403541565,
0.13391798734664917,
0.1894153207540512,
-0.02444342151284218,
0.09713628888130188,
0.19883672893047333,
-0.18795150518417358,
-0.10958962142467499,
0.23689773678779602,
-0.2532464563846588,
-0.08616042137145996,
-0.21980617940425873,
0.23328499495983124,
-0.19534766674041748,
-0.2172616571187973,
0.04408476874232292,
-0.29314035177230835,
0.13562491536140442,
-0.34914159774780273,
0.2578805685043335,
0.08388976007699966,
-0.232819601893425,
0.03730190545320511,
0.23881569504737854,
-0.3311483860015869,
0.2201012521982193,
0.45457446575164795,
-0.04256151616573334,
0.4388754963874817,
0.16431824862957,
0.1744069755077362,
0.18100517988204956,
-0.08329953998327255,
-0.16071322560310364,
-0.05588153749704361,
0.1490999162197113,
0.003074776381254196,
0.23419052362442017,
-0.27458494901657104,
0.013263113796710968,
0.08008063584566116,
0.0003390870988368988,
0.18821093440055847,
-0.2667367160320282,
-0.1475638598203659,
0.04929265379905701,
0.07828091830015182,
0.013443253934383392,
-0.25281357765197754,
0.4869854748249054,
0.11273189634084702,
-0.2317199558019638,
0.13654287159442902,
0.2346687614917755,
-0.12237688899040222,
-0.20933489501476288,
0.20053794980049133,
0.07215666025876999,
-0.5397236943244934,
0.028127696365118027,
0.16198879480361938,
0.014795374125242233,
0.02105453610420227,
0.23595641553401947,
0.2058275043964386,
0.21016329526901245,
0.5615078210830688,
0.30886346101760864,
0.09746742248535156,
0.3279836177825928,
0.08735669404268265,
-0.12920349836349487,
-0.5117120742797852,
-0.07551510632038116,
0.6525532603263855,
-0.2939631938934326,
0.37012267112731934,
0.05294103920459747,
0.39673909544944763,
0.3359207212924957,
-0.5242996215820312,
-0.07255499809980392,
0.3195105791091919,
-0.16160520911216736,
-0.16438248753547668,
0.24009746313095093,
0.006177648901939392,
-0.10969915241003036,
0.15314045548439026,
0.1216992735862732,
-0.12378884851932526,
0.7778651714324951,
0.28353995084762573,
-0.08757494390010834,
-0.1889847218990326,
-0.12796562910079956,
0.2420140504837036,
0.3362991511821747,
-0.26567646861076355,
0.23355090618133545,
-0.20376543700695038,
0.0624333918094635,
-0.10593752562999725,
-0.052924200892448425,
0.44865772128105164,
0.4429365396499634,
-0.20175278186798096,
0.13369615375995636,
-0.04504382982850075,
0.15854792296886444,
-0.13562366366386414,
0.23301494121551514,
-0.03457418829202652,
0.11345522105693817,
-0.039415258914232254,
-0.08562856912612915,
0.0248609259724617,
-0.2527591288089752,
0.23645050823688507,
0.4464542865753174,
-0.19280697405338287,
0.2965647876262665,
0.0010082311928272247,
-0.2750471830368042,
0.13025662302970886,
-0.2167002558708191,
-0.17029641568660736,
-0.025326110422611237,
0.6866880655288696,
-0.6103768348693848,
0.17354825139045715,
-0.24397315084934235,
-0.019573844969272614,
-0.2057761549949646,
0.5154138803482056,
0.021263260394334793,
0.11832210421562195,
-0.2750028371810913,
-0.09613635390996933,
-0.44558143615722656,
0.03837261348962784,
-0.4475417137145996,
0.024120153859257698,
0.22090889513492584,
-0.020583685487508774,
-0.4118458330631256,
-0.1685495525598526,
0.4470598101615906,
-0.15554994344711304,
0.10676112025976181,
0.20955334603786469,
-0.4646930396556854,
0.10162031650543213,
-0.10603436827659607,
0.064597949385643,
0.048924438655376434,
-0.5800876617431641,
0.3102754056453705,
-0.2063932716846466,
-0.0724288746714592,
-0.21616503596305847,
-0.12797510623931885,
0.08319592475891113,
0.1493733823299408,
0.7480964660644531,
0.15447641909122467,
0.093358613550663,
-0.10137204080820084,
-0.16620567440986633,
-0.23866501450538635,
-0.009288344532251358,
-0.10826569050550461,
-0.3007635474205017,
0.04824033007025719,
0.21315261721611023,
-0.4186703562736511,
-0.31624510884284973,
-0.09584736824035645,
-0.09732598066329956,
-0.012664064764976501,
-0.1017913892865181,
-0.03130420297384262,
-0.03766114264726639,
-0.07186027616262436,
0.2585255205631256,
-0.04725862294435501,
0.44197407364845276,
0.006575290113687515,
0.1275050789117813,
-0.20608963072299957,
-0.17019537091255188,
0.30514758825302124,
-0.5047954320907593,
-0.5666653513908386,
0.24868379533290863,
0.2222006916999817,
-0.2913554012775421,
-0.41328364610671997,
-0.40882524847984314,
-0.3057338297367096,
0.3120824694633484,
0.11087637394666672,
-0.309854656457901,
0.09576049447059631,
-0.2816902697086334,
0.09548568725585938,
-0.055178042501211166,
0.38529500365257263,
0.05106738209724426,
-0.1666000336408615,
0.22196677327156067,
-0.13969649374485016
] |
https://github.com/huggingface/datasets/issues/2554 | Multilabel metrics not supported | Hi @GuillemGSubies, thanks for reporting.
I have made a PR to fix this issue and allow metrics to be computed also for multilabel classification problems. | When I try to use a metric like F1 macro I get the following error:
```
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'
```
There is an explicit casting here:
https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/src/datasets/features.py#L274
And looks like this is because here
https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/metrics/f1/f1.py#L88
the features can only be integers, so we cannot use that F1 for multilabel. Instead, if I create the following F1 (ints replaced with sequence of ints), it will work:
```python
class F1(datasets.Metric):
def _info(self):
return datasets.MetricInfo(
description=_DESCRIPTION,
citation=_CITATION,
inputs_description=_KWARGS_DESCRIPTION,
features=datasets.Features(
{
"predictions": datasets.Sequence(datasets.Value("int32")),
"references": datasets.Sequence(datasets.Value("int32")),
}
),
reference_urls=["https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html"],
)
def _compute(self, predictions, references, labels=None, pos_label=1, average="binary", sample_weight=None):
return {
"f1": f1_score(
references,
predictions,
labels=labels,
pos_label=pos_label,
average=average,
sample_weight=sample_weight,
),
}
```
| 25 | Multilabel metrics not supported
When I try to use a metric like F1 macro I get the following error:
```
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'
```
There is an explicit casting here:
https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/src/datasets/features.py#L274
And looks like this is because here
https://github.com/huggingface/datasets/blob/fc79f61cbbcfa0e8c68b28c0a8257f17e768a075/metrics/f1/f1.py#L88
the features can only be integers, so we cannot use that F1 for multilabel. Instead, if I create the following F1 (ints replaced with sequence of ints), it will work:
```python
class F1(datasets.Metric):
def _info(self):
return datasets.MetricInfo(
description=_DESCRIPTION,
citation=_CITATION,
inputs_description=_KWARGS_DESCRIPTION,
features=datasets.Features(
{
"predictions": datasets.Sequence(datasets.Value("int32")),
"references": datasets.Sequence(datasets.Value("int32")),
}
),
reference_urls=["https://scikit-learn.org/stable/modules/generated/sklearn.metrics.f1_score.html"],
)
def _compute(self, predictions, references, labels=None, pos_label=1, average="binary", sample_weight=None):
return {
"f1": f1_score(
references,
predictions,
labels=labels,
pos_label=pos_label,
average=average,
sample_weight=sample_weight,
),
}
```
Hi @GuillemGSubies, thanks for reporting.
I have made a PR to fix this issue and allow metrics to be computed also for multilabel classification problems. | [
-0.22126559913158417,
-0.178848534822464,
0.004477284848690033,
0.3008999228477478,
0.6725273728370667,
-0.13599026203155518,
0.4806849956512451,
-0.10233473777770996,
0.22830823063850403,
0.3166791498661041,
-0.12407580763101578,
0.2981930077075958,
-0.28084975481033325,
0.40463337302207947,
-0.25088170170783997,
-0.17612139880657196,
-0.21697357296943665,
-0.3327275812625885,
-0.05999074876308441,
0.10591879487037659,
-0.4245598018169403,
0.03595595061779022,
-0.3928984999656677,
-0.04741726815700531,
-0.2053828239440918,
0.06821548938751221,
0.11611506342887878,
-0.11355596035718918,
-0.27876436710357666,
-0.3295217752456665,
0.03608629107475281,
-0.018557492643594742,
-0.0064592305570840836,
0.43385761976242065,
-0.00011618384451139718,
-0.11235733330249786,
0.23134616017341614,
0.0006340071558952332,
-0.12151028215885162,
-0.23886708915233612,
0.1006876602768898,
-0.12417583912611008,
0.03922317177057266,
-0.24910110235214233,
0.015185084193944931,
0.06347827613353729,
-0.3937753438949585,
-0.11045894026756287,
-0.029122725129127502,
0.32883724570274353,
0.12586505711078644,
-0.06296078115701675,
0.4294290840625763,
-0.09712175279855728,
-0.15651962161064148,
-0.01515120267868042,
-0.22597657144069672,
0.24361935257911682,
0.006711654365062714,
0.18932922184467316,
0.19932571053504944,
0.36789825558662415,
0.055172428488731384,
0.09671029448509216,
0.3370929956436157,
-0.0944952443242073,
0.1595989316701889,
-0.16806690394878387,
-0.16020825505256653,
0.2209850549697876,
-0.06162338703870773,
-0.06681918352842331,
-0.5924563407897949,
-0.07293770462274551,
0.09925527125597,
-0.8592519164085388,
0.10269209742546082,
-0.14334039390087128,
-0.005415924824774265,
-0.194372296333313,
-0.4583283066749573,
-0.12448231130838394,
-0.11096353828907013,
0.20195209980010986,
-0.18106374144554138,
0.4406162202358246,
-0.1584271937608719,
0.23743608593940735,
0.3454507291316986,
-0.15185429155826569,
-0.20528444647789001,
0.008173370733857155,
0.0583251528441906,
0.20561040937900543,
-0.35685473680496216,
0.10931110382080078,
-0.1768304407596588,
0.0013991370797157288,
0.18428781628608704,
-0.16339553892612457,
-0.23855750262737274,
0.14221183955669403,
-0.3320722281932831,
0.06418021023273468,
0.12255275249481201,
0.3998173177242279,
0.2546086311340332,
0.16083066165447235,
0.07207942754030228,
0.14232315123081207,
-0.140144482254982,
-0.15678182244300842,
-0.06989330798387527,
-0.36560460925102234,
0.2567170262336731,
0.34897613525390625,
-0.20150773227214813,
0.013522651046514511,
-0.3946034610271454,
-0.044817470014095306,
-0.07124535739421844,
0.008279277011752129,
0.6896382570266724,
0.09171969443559647,
-0.03180913254618645,
0.22143271565437317,
0.11534766852855682,
0.4436764717102051,
0.06879645586013794,
-0.20914340019226074,
-0.02141267992556095,
0.04797986149787903,
-0.33398208022117615,
0.04826834052801132,
0.18069031834602356,
-0.0014866571873426437,
0.053955741226673126,
0.13877396285533905,
0.4493703842163086,
-0.2276763767004013,
-0.14830945432186127,
-0.2939905822277069,
-0.20853590965270996,
0.16550908982753754,
-0.01904117316007614,
0.1512502133846283,
0.3160668611526489,
-0.23029594123363495,
0.03577021509408951,
0.06692376732826233,
-0.41163933277130127,
0.038243863731622696,
-0.06661959737539291,
0.07122809439897537,
0.048375338315963745,
0.10256493091583252,
-0.2543007433414459,
0.22135980427265167,
-0.13259634375572205,
-0.06657581031322479,
-0.0036143362522125244,
-0.40388768911361694,
-0.2503197193145752,
-0.11253837496042252,
0.28829288482666016,
-0.1103668361902237,
0.20296825468540192,
-0.14162176847457886,
0.005730840843170881,
0.18879562616348267,
0.06681093573570251,
0.1195802241563797,
-0.06409747898578644,
0.03594214469194412,
0.05204302817583084,
-0.05022518336772919,
0.5578504204750061,
-0.7724622488021851,
0.02215537056326866,
-0.11105407029390335,
0.16226054728031158,
-0.19108666479587555,
0.17725366353988647,
0.05778750032186508,
-0.04041959345340729,
-0.21975186467170715,
0.4865643084049225,
0.07276704907417297,
0.06166958808898926,
-0.14289721846580505,
-0.08956688642501831,
-0.15691280364990234,
-0.04443266987800598,
0.03779809549450874,
0.3760761022567749,
-0.05719653517007828,
0.10411486029624939,
0.38044634461402893,
-0.11731217056512833,
-0.21535107493400574,
0.021781235933303833,
0.23938924074172974,
-0.1084282398223877,
-0.20375774800777435,
-0.021731454879045486,
-0.5195303559303284,
-0.2728659212589264,
0.20561620593070984,
0.013040311634540558,
0.10008062422275543,
0.3230231702327728,
-0.10542630404233932,
-0.2257857322692871,
0.14387108385562897,
0.06504601985216141,
0.14935219287872314,
0.04010699689388275,
-0.0796513706445694,
-0.09361600875854492,
-0.005691193044185638,
-0.13184325397014618,
-0.06274690479040146,
0.1535234898328781,
0.15771816670894623,
0.35163959860801697,
-0.07047636061906815,
-0.008763203397393227,
-0.08259829878807068,
0.09730316698551178,
0.35178935527801514,
0.43476638197898865,
0.1407409906387329,
-0.030636027455329895,
0.394717276096344,
0.2970738708972931,
-0.5094217658042908,
0.18060815334320068,
0.3879392743110657,
0.36073631048202515,
-0.07303526997566223,
-0.15067079663276672,
-0.050465602427721024,
0.2503892183303833,
-0.21855098009109497,
-0.14619258046150208,
0.3504965007305145,
-0.3115270137786865,
0.3024231493473053,
0.14302068948745728,
0.35088735818862915,
0.29610130190849304,
0.15460927784442902,
-0.2565428614616394,
-0.3138020634651184,
0.16299287974834442,
-0.29915952682495117,
-0.10053606331348419,
-0.10967619717121124,
-0.3435277044773102,
-0.0732419565320015,
0.44917207956314087,
0.22496134042739868,
0.3339294195175171,
0.13072440028190613,
-0.04566921293735504,
0.10115835815668106,
-0.2851282060146332,
-0.46233612298965454,
0.36909493803977966,
0.03253212943673134,
-0.03240400180220604,
-0.005894849076867104,
-0.27009832859039307,
-0.1267910599708557,
0.3215005695819855,
0.02402464672923088,
0.020160919055342674,
0.058368757367134094,
0.07774116098880768,
0.012755339033901691,
0.0487489327788353,
-0.07387475669384003,
0.15376251935958862,
0.014945220202207565,
-0.36297667026519775,
0.05829179286956787,
-0.24534852802753448,
-0.046333346515893936,
-0.09350928664207458,
-0.7585219740867615,
-0.17618192732334137,
-0.334689199924469,
-0.04030665010213852,
0.23866119980812073,
0.22907033562660217,
0.21972255408763885,
0.15514038503170013,
0.2061377614736557,
0.12413287162780762,
0.13012152910232544,
-0.0368100181221962,
-0.14144888520240784,
-0.10461018234491348,
-0.03050253540277481,
0.12732841074466705,
-0.0723782330751419,
0.08290164172649384,
0.18744111061096191,
0.240244522690773,
-0.2738419473171234,
-0.5661293864250183,
-0.031667813658714294,
-0.0450717955827713,
0.630604088306427,
0.24905116856098175,
-0.35934609174728394,
-0.3242061734199524,
0.23131781816482544,
0.5897353887557983,
-0.04271777719259262,
0.22548644244670868,
0.3594716787338257,
-0.08597394824028015,
-0.22067248821258545,
-0.3616170883178711,
0.3093794882297516,
-0.032762184739112854,
-0.2078433334827423,
0.2410564124584198,
0.2146814912557602,
-0.10380731523036957,
0.3323216438293457,
0.06377430260181427,
0.1596950739622116,
0.33333462476730347,
-0.05838236212730408,
-0.22033770382404327,
0.11703415215015411,
0.12109697610139847,
-0.2581457793712616,
-0.2353104203939438,
-0.06850751489400864,
0.21084749698638916,
0.1027473509311676,
0.08350012451410294,
-0.08771250396966934,
-0.6157519221305847,
0.04330851137638092,
-0.10995124280452728,
0.09626118838787079,
0.35325130820274353,
-0.02369484305381775,
-0.023614514619112015,
-0.005030479282140732,
-0.29542434215545654,
-0.24399502575397491,
0.13757672905921936,
-0.21491432189941406,
0.15143024921417236,
-0.0051479339599609375,
0.12474881857633591,
0.17198587954044342,
0.19462603330612183,
0.35390734672546387,
0.09507952630519867,
0.415937602519989,
0.017634492367506027,
0.20281535387039185,
-0.12274085730314255,
-0.49601417779922485,
0.2217462956905365,
-0.09357389807701111,
0.07301805913448334,
0.06442438066005707,
0.02488134056329727,
0.2972833812236786,
-0.2300759255886078,
0.405312180519104,
-0.4326801002025604,
-0.23994071781635284,
-0.12160477042198181,
-0.06792088598012924,
-0.05996137112379074,
0.006850916892290115,
-0.06868001818656921,
-0.45388826727867126,
-0.01749897189438343,
-0.019769545644521713,
0.06182098761200905,
-0.0652211531996727,
-0.0690511092543602,
-0.19122551381587982,
-0.5020269751548767,
-0.08778982609510422,
0.3013485372066498,
0.10332248359918594,
0.3473796248435974,
-0.013906169682741165,
0.46032261848449707,
-0.09228111803531647,
0.06990298628807068,
0.44868171215057373,
-0.378030389547348,
-0.16489216685295105,
0.4228249490261078,
0.012890074402093887,
-0.3764899671077728,
-0.049226805567741394,
-0.3481474220752716,
0.15043148398399353,
0.21734873950481415,
0.5315405130386353,
-0.3542807996273041,
-0.10138607770204544,
0.297542542219162,
0.06511978060007095,
-0.07052294909954071,
0.04108946770429611,
-0.16711023449897766,
-0.2446792721748352,
-0.0693650171160698,
-0.10139528661966324,
0.15437310934066772,
0.4377838671207428,
0.11572468280792236,
0.2029925435781479,
-0.4573974013328552,
-0.18739262223243713,
0.18590182065963745,
-0.19368858635425568,
0.010494396090507507,
0.10937560349702835,
0.04299626126885414,
-0.1465340554714203,
-0.247869610786438,
-0.01529250480234623,
0.32113614678382874,
-0.03844824060797691,
-0.6306102871894836,
0.035804200917482376,
-0.25603654980659485,
0.3225225508213043,
0.05269426852464676,
-0.21525543928146362,
0.05281757935881615,
-0.31377118825912476,
0.45787614583969116,
-0.07798754423856735,
0.07488899677991867,
0.42354026436805725,
0.0654168352484703,
-0.19055305421352386,
-0.11974623054265976,
0.4245312213897705,
0.2586823105812073,
-0.11115224659442902,
0.5211770534515381,
0.043051689863204956,
-0.3598255217075348,
-0.07596594095230103,
0.5890727043151855,
0.6976006031036377,
-0.22261177003383636,
-0.2586015462875366,
0.1672007441520691,
0.08235301077365875,
0.5033926963806152,
0.19303856790065765,
0.12688863277435303,
-0.04749993979930878,
-0.14266367256641388,
-0.011538578197360039,
0.017642084509134293,
0.029198724776506424,
-0.08124658465385437,
-0.2721320688724518,
0.4355114996433258,
-0.32331210374832153,
-0.11925961077213287,
-0.050903014838695526,
0.021295718848705292,
0.10173553973436356,
-0.33183810114860535,
0.08440521359443665,
0.10857747495174408,
-0.0523189902305603,
-0.09023387730121613,
-0.1292126625776291,
-0.04447721317410469,
0.08807307481765747,
-0.07835017144680023,
-0.3915773630142212,
-0.22251003980636597,
-0.23791296780109406,
-0.022987011820077896,
0.17375095188617706,
0.2766943573951721,
-0.04616646096110344,
0.37172460556030273,
0.8833097219467163,
-0.08970125019550323,
-0.2677643597126007,
0.0498960018157959,
-0.41897597908973694,
0.10672219842672348,
-0.16139160096645355,
-0.05617426335811615,
0.31692853569984436,
0.0474143922328949,
0.11929809302091599,
0.1314161717891693,
0.18532821536064148,
-0.09219962358474731,
0.0002040565013885498,
0.009138204157352448,
-0.1528535634279251,
-0.03970468044281006,
0.13441531360149384,
-0.14658254384994507,
0.16961322724819183,
-0.2701961398124695,
0.03099478781223297,
-0.0420931875705719,
0.014612633734941483,
0.33567944169044495,
-0.15731701254844666,
0.013187862932682037,
0.12775734066963196,
0.05601043626666069,
-0.013466022908687592,
-0.11976102739572525,
-0.003981638699769974,
0.11321565508842468,
-0.009625609964132309,
-0.055326275527477264,
0.006684437394142151,
-0.10567645728588104,
-0.20564821362495422,
0.44666582345962524,
0.24190625548362732,
-0.1288338452577591,
0.21511192619800568,
0.7306467294692993,
0.017122752964496613,
0.19846397638320923,
0.0083933025598526,
-0.4410926103591919,
0.06962496787309647,
0.2799542546272278,
-0.3629089891910553,
-0.2672874629497528,
-0.3785533308982849,
0.26722729206085205,
0.06350719183683395,
0.08192048221826553,
-0.22874978184700012,
-0.05125255882740021,
-0.35221728682518005,
-0.012072082608938217,
0.06625989824533463,
-0.12351278215646744,
-0.08766204118728638,
0.24277915060520172,
0.02344774641096592,
-0.05900902301073074,
-0.11831732094287872,
-0.0645190179347992,
-0.35973042249679565,
0.15032215416431427,
0.19567060470581055,
0.08650030195713043,
-0.061237119138240814,
-0.18525835871696472,
-0.26486727595329285,
-0.29530391097068787,
-0.24208109080791473,
0.3174172341823578,
-0.1273348331451416,
0.13425813615322113,
-0.20866580307483673,
0.4146328866481781,
0.20629674196243286,
0.010061176493763924,
0.273476243019104,
0.25794559717178345,
-0.10878849774599075,
0.17875775694847107,
0.20474591851234436,
0.032422080636024475,
-0.395473837852478,
-0.05991873890161514,
-0.01245717704296112,
-0.09959801286458969,
0.22618019580841064,
-0.15810485184192657,
0.25501444935798645,
0.3032352328300476,
0.29876211285591125,
0.09897109866142273,
-0.1419445127248764,
0.03778032958507538,
-0.04529076814651489,
0.08280310779809952,
-0.09075038135051727,
-0.34201234579086304,
-0.16651801764965057,
0.11570176482200623,
0.10419712960720062,
0.4284949004650116,
0.2192295491695404,
0.14106914401054382,
0.1890285611152649,
-0.2953188419342041,
0.20037253201007843,
-0.15828579664230347,
-0.15351711213588715,
0.23033586144447327,
0.21609698235988617,
0.11021436750888824,
0.5138726830482483,
0.09700609743595123,
0.3311567008495331,
0.5222989916801453,
-0.25085076689720154,
0.18690820038318634,
-0.08416115492582321,
0.07252853363752365,
0.030389443039894104,
0.09473201632499695,
0.16011656820774078,
0.09579485654830933,
-0.2019711136817932,
-0.021473534405231476,
-0.47335290908813477,
0.07676562666893005,
-0.7301220893859863,
-0.20375590026378632,
-0.3301919102668762,
0.41487544775009155,
0.09141102433204651,
-0.22771313786506653,
-0.3952125608921051,
-0.1649128645658493,
-0.11751633882522583,
-0.14009715616703033,
-0.17647677659988403,
0.28611740469932556,
0.3323249816894531,
-0.03802396357059479,
0.17974688112735748,
-0.2377055138349533,
-0.7110536694526672,
0.4802889823913574,
0.28045812249183655,
-0.1638120859861374,
0.23551179468631744,
0.25110310316085815,
0.12855401635169983,
0.10145559906959534,
0.6210406422615051,
0.4934695065021515,
0.33996251225471497,
-0.1255110204219818,
-0.21917076408863068,
-0.256669282913208,
-0.18119315803050995,
-0.0969047024846077,
0.19628752768039703,
0.4486639201641083,
0.07679116725921631,
0.13827106356620789,
0.041511647403240204,
-0.16041618585586548,
0.32341456413269043,
-0.31067007780075073,
0.18606097996234894,
-0.2885328233242035,
0.2526652216911316,
-0.09161005169153214,
0.018186956644058228,
0.06827868521213531,
-0.12381839007139206,
-0.3758455216884613,
-0.06211975961923599,
0.2017788290977478,
-0.04914703220129013,
0.24223345518112183,
-0.061436157673597336,
0.037075795233249664,
0.27044564485549927,
0.29748469591140747,
0.013661161065101624,
-0.016382485628128052,
-0.20510002970695496,
0.0752953290939331,
-0.5276015996932983,
-0.15790367126464844,
0.18761681020259857,
-0.04030565172433853,
0.26825806498527527,
0.035616956651210785,
-0.05185713618993759,
0.2787480652332306,
0.25363069772720337,
-0.09347706288099289,
0.39224258065223694,
0.11862529814243317,
-0.3982813060283661,
0.16055883467197418,
0.17943847179412842,
-0.113318532705307,
0.06049680709838867,
-0.23995941877365112,
0.1822284758090973,
-0.35012054443359375,
0.021892212331295013,
-0.22423268854618073,
0.21882334351539612,
0.08377671241760254,
0.2790897488594055,
0.24344685673713684,
0.2892826497554779,
0.46004679799079895,
0.19185379147529602,
-0.027339430525898933,
0.0433686226606369,
0.07583456486463547,
0.11638292670249939,
0.09131517261266708,
-0.1747366487979889,
0.30087894201278687,
-0.33202165365219116,
0.00739944726228714,
-0.19842439889907837,
0.08256924897432327,
0.06646468490362167,
-0.17217878997325897,
-0.24621297419071198,
0.26923686265945435,
-0.3208704888820648,
-0.09518890827894211,
0.33455535769462585,
0.4876786470413208,
-0.03523685038089752,
0.4263417422771454,
0.03007383644580841,
-0.35200944542884827,
0.3873312175273895,
-0.20401909947395325,
-0.3546745777130127,
-0.13903768360614777,
0.25847727060317993,
0.06701016426086426,
-0.10505665093660355,
-0.6502364873886108,
-0.12259233742952347,
0.2604495882987976,
0.28964418172836304,
-0.5856112837791443,
0.29498881101608276,
-0.19049641489982605,
-0.14745819568634033,
0.013612773269414902,
-0.388781875371933,
-0.09530424326658249,
0.03168962895870209,
0.133505716919899,
0.26479506492614746
] |
https://github.com/huggingface/datasets/issues/2553 | load_dataset("web_nlg") NonMatchingChecksumError | Hi ! Thanks for reporting. This is due to the WebNLG repository that got updated today.
I just pushed a fix at #2558 - this shouldn't happen anymore in the future. | Hi! It seems the WebNLG dataset gives a NonMatchingChecksumError.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('web_nlg', name="release_v3.0_en", split="dev")
```
Gives
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://gitlab.com/shimorina/webnlg-dataset/-/archive/master/webnlg-dataset-master.zip']
```
## Environment info
- `datasets` version: 1.8.0
- Platform: macOS-11.3.1-x86_64-i386-64bit
- Python version: 3.9.4
- PyArrow version: 3.0.0
Also tested on Linux, with python 3.6.8 | 31 | load_dataset("web_nlg") NonMatchingChecksumError
Hi! It seems the WebNLG dataset gives a NonMatchingChecksumError.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('web_nlg', name="release_v3.0_en", split="dev")
```
Gives
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://gitlab.com/shimorina/webnlg-dataset/-/archive/master/webnlg-dataset-master.zip']
```
## Environment info
- `datasets` version: 1.8.0
- Platform: macOS-11.3.1-x86_64-i386-64bit
- Python version: 3.9.4
- PyArrow version: 3.0.0
Also tested on Linux, with python 3.6.8
Hi ! Thanks for reporting. This is due to the WebNLG repository that got updated today.
I just pushed a fix at #2558 - this shouldn't happen anymore in the future. | [
-0.1927950382232666,
0.12983959913253784,
-0.13637612760066986,
0.04064246267080307,
0.26515689492225647,
0.008678443729877472,
0.13199792802333832,
0.4511449635028839,
0.2963724732398987,
0.08619619905948639,
-0.06551361829042435,
0.2723967730998993,
0.022088514640927315,
-0.025521887466311455,
-0.2154664397239685,
0.5214447975158691,
0.07555122673511505,
0.01624441146850586,
-0.1093696653842926,
-0.14617842435836792,
-0.206671342253685,
0.11847172677516937,
-0.07337403297424316,
-0.10032066702842712,
0.06361418217420578,
0.22365498542785645,
0.24991771578788757,
0.2134232223033905,
-0.12483226507902145,
-0.26283252239227295,
0.323280394077301,
-0.049547161906957626,
-0.08511129021644592,
0.22110365331172943,
-0.00010712478979257867,
0.15157584846019745,
0.325653076171875,
-0.025643927976489067,
-0.42830127477645874,
0.06415251642465591,
-0.514838457107544,
-0.506580114364624,
-0.018827233463525772,
-0.20065516233444214,
-0.003536045551300049,
0.24381427466869354,
0.09486743062734604,
-0.1746019721031189,
0.12219525128602982,
0.15834064781665802,
0.2839373052120209,
0.5558202266693115,
-0.0055374689400196075,
0.13018937408924103,
0.039027489721775055,
-0.11251562833786011,
-0.14016763865947723,
0.21859110891819,
0.08098243921995163,
-0.13056892156600952,
-0.3386830687522888,
0.17254360020160675,
-0.2540835738182068,
0.2696690559387207,
0.11475715041160583,
-0.0982413962483406,
0.23154670000076294,
-0.0817008838057518,
0.16343912482261658,
0.38822072744369507,
0.16148284077644348,
-0.21116092801094055,
-0.21119804680347443,
-0.14158131182193756,
-0.09774079918861389,
-0.06480816751718521,
0.2398226261138916,
0.37237727642059326,
-0.26392167806625366,
-0.08065998554229736,
-0.38242053985595703,
0.24063588678836823,
0.1303236037492752,
0.1618119776248932,
0.09316949546337128,
0.24580779671669006,
0.05263984575867653,
-0.01703428477048874,
-0.011707399040460587,
-0.20155103504657745,
0.17082259058952332,
-0.41769084334373474,
-0.16169938445091248,
0.06880466639995575,
-0.5657446384429932,
-0.12346509844064713,
0.24199789762496948,
0.5164665579795837,
0.39479532837867737,
0.4451560378074646,
0.2517733871936798,
0.24481961131095886,
-0.2092452496290207,
0.12714853882789612,
-0.04403301700949669,
0.1494942158460617,
0.21719440817832947,
-0.08376053720712662,
0.32541555166244507,
0.002420992124825716,
0.026335421949625015,
0.23408782482147217,
0.1602003425359726,
-0.14985647797584534,
0.5749763250350952,
0.0011795442551374435,
0.185893714427948,
-0.1588820070028305,
-0.2398216873407364,
0.2297271341085434,
0.11528515070676804,
-0.1611861288547516,
0.05089906230568886,
0.36723676323890686,
-0.15734627842903137,
0.20449000597000122,
-0.08393517136573792,
0.17328627407550812,
-0.1468554437160492,
-0.29987120628356934,
-0.28783294558525085,
-0.20221874117851257,
-0.059631556272506714,
-0.029689332470297813,
0.20521405339241028,
-0.06021914258599281,
0.32273897528648376,
0.12609337270259857,
0.015206560492515564,
-0.039838921278715134,
0.17059791088104248,
0.1035451740026474,
-0.08059068769216537,
0.29385632276535034,
0.048957038670778275,
0.11088214069604874,
0.2325153350830078,
0.08429129421710968,
-0.15139183402061462,
0.0721653401851654,
-0.11991750448942184,
-0.21067090332508087,
0.058168068528175354,
0.2775706350803375,
-0.38275396823883057,
-0.14130693674087524,
-0.01957216113805771,
-0.4089502990245819,
0.28659501671791077,
-0.09168539941310883,
0.06419141590595245,
-0.24044500291347504,
-0.14413221180438995,
-0.2984172999858856,
-0.10503064095973969,
0.16966933012008667,
0.23770034313201904,
-0.02962261065840721,
-0.17844660580158234,
-0.13163872063159943,
0.314843088388443,
0.378268837928772,
-0.10697825998067856,
-0.1547892987728119,
-0.23937658965587616,
0.13313111662864685,
0.5495237112045288,
-0.14879325032234192,
-0.4355505108833313,
0.14574643969535828,
-0.01228322833776474,
0.27301472425460815,
-0.10011639446020126,
0.24682419002056122,
-0.4284129738807678,
0.020671971142292023,
-0.28520479798316956,
0.28632575273513794,
0.012360868975520134,
0.2956218719482422,
-0.24429866671562195,
-0.23574289679527283,
0.5397990942001343,
0.07658745348453522,
-0.04109419509768486,
-0.012748032808303833,
0.14153438806533813,
-0.24479882419109344,
0.32843875885009766,
-0.28727906942367554,
-0.06170661002397537,
0.07392072677612305,
0.2371894270181656,
0.020666588097810745,
0.010072123259305954,
-0.012223752215504646,
-0.5249136090278625,
0.26441311836242676,
-0.10441724956035614,
0.04275190085172653,
-0.024929672479629517,
-0.07072050869464874,
-0.1582033634185791,
0.03002271242439747,
-0.14339853823184967,
0.034606967121362686,
0.17069412767887115,
0.5151417851448059,
0.2642630934715271,
0.0445595420897007,
0.02404884621500969,
0.28355634212493896,
-0.3699100911617279,
0.000020740029867738485,
-0.5306881666183472,
0.27238380908966064,
-0.08840185403823853,
-0.09013155847787857,
0.08434712886810303,
-0.044149093329906464,
-0.05752941966056824,
0.10413523763418198,
-0.22342738509178162,
0.3572005331516266,
0.052773527801036835,
-0.03788682818412781,
0.07283411920070648,
0.3291745185852051,
-0.1157856211066246,
-0.26377204060554504,
-0.07209484279155731,
0.6472367644309998,
0.12139159440994263,
-0.10788854956626892,
-0.16842645406723022,
0.5147509574890137,
-0.12856541574001312,
0.16891679167747498,
-0.01759844645857811,
0.13985532522201538,
0.2636684775352478,
-0.1620631366968155,
-0.20841437578201294,
-0.115979865193367,
0.2796025276184082,
-0.18193426728248596,
0.20425492525100708,
0.13519009947776794,
-0.2331165075302124,
0.014666743576526642,
0.40841391682624817,
-0.16457287967205048,
0.22195154428482056,
0.1339527666568756,
0.23644572496414185,
-0.24542883038520813,
-0.009847642853856087,
0.1951204389333725,
0.3664528727531433,
0.15310239791870117,
0.04234674572944641,
0.05991378426551819,
-0.28928765654563904,
-0.2328205704689026,
0.030001387000083923,
0.021676186472177505,
0.22927884757518768,
0.2969283163547516,
0.29055023193359375,
-0.29664066433906555,
-0.45139047503471375,
-0.10664089024066925,
-0.08665689826011658,
0.23819978535175323,
-0.30058348178863525,
-0.06912344694137573,
-0.31293967366218567,
-0.27740907669067383,
-0.2933870851993561,
-0.31663069128990173,
-0.49511581659317017,
-0.5132745504379272,
-0.009108077734708786,
0.056307584047317505,
-0.18291236460208893,
0.33837249875068665,
-0.44505637884140015,
0.037730440497398376,
0.1850382685661316,
0.086944080889225,
-0.03774606063961983,
-0.12096279859542847,
-0.08764127641916275,
0.0553465373814106,
0.37754079699516296,
0.011563567444682121,
0.3231651484966278,
-0.3149304986000061,
-0.07581168413162231,
-0.33809590339660645,
-0.22872692346572876,
0.026402615010738373,
-0.09509065747261047,
0.09998979419469833,
0.21304170787334442,
0.23595963418483734,
-0.006554368883371353,
-0.19095799326896667,
0.34537121653556824,
-0.23210294544696808,
-0.4061719477176666,
0.33268117904663086,
-0.02458404190838337,
-0.025682667270302773,
0.012629270553588867,
-0.08882930129766464,
-0.09776241332292557,
-0.27155184745788574,
-0.055588990449905396,
0.17483757436275482,
0.21740387380123138,
0.2924058735370636,
-0.08285319060087204,
-0.07498010247945786,
0.11266651749610901,
0.4408070743083954,
-0.3611869812011719,
-0.5222992897033691,
0.42444169521331787,
0.046633828431367874,
-0.35147684812545776,
-0.1904103308916092,
-0.0677131861448288,
0.23866713047027588,
-0.008748060092329979,
-0.423761785030365,
-0.1579841524362564,
-0.37700334191322327,
0.22113710641860962,
0.18551181256771088,
-0.03176622837781906,
0.16369469463825226,
0.0585971400141716,
-0.12098214775323868,
-0.30271226167678833,
-0.07903169095516205,
0.18297865986824036,
-0.26584121584892273,
0.26076948642730713,
-0.13615953922271729,
0.2820151746273041,
-0.0035262219607830048,
0.2051805704832077,
0.40788793563842773,
0.013267621397972107,
0.012967415153980255,
-0.0036066100001335144,
0.3086508512496948,
-0.04454142600297928,
-0.24727393686771393,
-0.13899804651737213,
0.02742207795381546,
0.06407752633094788,
0.27048566937446594,
-0.013738185167312622,
-0.1399647444486618,
-0.057654209434986115,
0.07027800381183624,
-0.1378273367881775,
-0.20344547927379608,
0.06696875393390656,
-0.061593376100063324,
0.12629522383213043,
0.18689893186092377,
0.11679808050394058,
-0.22751681506633759,
-0.38982871174812317,
0.02722802385687828,
0.27893197536468506,
-0.20992478728294373,
-0.05086702108383179,
-0.3776344954967499,
0.07200583070516586,
-0.09770724922418594,
0.31769007444381714,
0.14396251738071442,
0.4831462502479553,
0.21757663786411285,
-0.4104093909263611,
-0.009487390518188477,
-0.16123291850090027,
0.12950848042964935,
-0.48097485303878784,
0.3939148187637329,
0.018296457827091217,
0.12029898166656494,
-0.46626368165016174,
-0.12577307224273682,
0.024009060114622116,
-0.23703402280807495,
0.5430132746696472,
0.003123335540294647,
-0.15673919022083282,
0.006920455954968929,
0.0016440767794847488,
0.36306214332580566,
-0.195106640458107,
-0.26246458292007446,
-0.45722493529319763,
-0.04251808673143387,
-0.3031882643699646,
-0.08496225625276566,
-0.2918834686279297,
0.11517136543989182,
-0.09525095671415329,
0.1547551453113556,
-0.03636060655117035,
-0.05993093177676201,
0.2802991271018982,
0.11408816277980804,
0.09190651774406433,
0.06815356016159058,
0.2160036265850067,
-0.3673730790615082,
0.17429758608341217,
-0.09506786614656448,
0.6290801167488098,
-0.0904095321893692,
-0.4050767719745636,
-0.020080141723155975,
-0.11386702209711075,
-0.2192779779434204,
0.10241876542568207,
0.07123391330242157,
-0.021134309470653534,
0.31802406907081604,
-0.02922501415014267,
-0.1321374922990799,
-0.0529642328619957,
-0.06548388302326202,
0.05684342980384827,
-0.31348204612731934,
-0.23225218057632446,
0.24389436841011047,
0.02492779865860939,
-0.09232817590236664,
0.30969473719596863,
-0.31698429584503174,
0.0038187778554856777,
0.1991739720106125,
0.23151156306266785,
0.8551762700080872,
0.09463008493185043,
0.05240190774202347,
0.26039835810661316,
-0.2381092756986618,
0.04610733687877655,
-0.22183842957019806,
0.12226231396198273,
-0.38472244143486023,
-0.1620902568101883,
0.02962948940694332,
-0.23975491523742676,
0.11046817898750305,
0.13083280622959137,
0.0456576906144619,
0.3157443106174469,
0.0824446827173233,
0.265435129404068,
0.02678532898426056,
0.26266977190971375,
-0.1982167363166809,
-0.007739190012216568,
-0.17839552462100983,
0.27999064326286316,
-0.10963386297225952,
0.28391093015670776,
-0.024588407948613167,
-0.0027100099250674248,
-0.0680273026227951,
-0.12033926695585251,
-0.3087732791900635,
0.35785073041915894,
0.29868096113204956,
0.34992289543151855,
0.310976505279541,
-0.030148550868034363,
-0.44353342056274414,
0.23089168965816498,
0.32045626640319824,
0.1709212362766266,
-0.2796054780483246,
0.10427489876747131,
0.3298262357711792,
0.3211556673049927,
-0.05693065747618675,
0.03603508695960045,
0.2986278533935547,
-0.034252215176820755,
-0.1673179417848587,
-0.011326789855957031,
-0.0020909737795591354,
-0.4932832717895508,
-0.0464099645614624,
-0.04548192769289017,
-0.3058381676673889,
-0.25408726930618286,
0.06050293520092964,
0.019603967666625977,
0.1603303849697113,
-0.20267555117607117,
0.19304512441158295,
0.2711468040943146,
-0.15881378948688507,
0.2549835741519928,
0.06089755892753601,
-0.3740057647228241,
-0.20733705163002014,
0.5218608379364014,
0.14861425757408142,
0.06977436691522598,
0.3076378107070923,
0.06543153524398804,
-0.22386552393436432,
-0.27674758434295654,
0.010302945971488953,
0.08175849914550781,
-0.2700177729129791,
0.08665245771408081,
-0.2723049819469452,
0.16384245455265045,
0.01752026192843914,
0.4179406762123108,
0.19809259474277496,
0.28341156244277954,
0.13011372089385986,
-0.4619598984718323,
-0.11999165266752243,
-0.19624067842960358,
0.22074732184410095,
0.23354120552539825,
-0.31029728055000305,
0.029104242101311684,
-0.06884671002626419,
-0.06427371501922607,
-0.40178054571151733,
-0.11795973777770996,
-0.3063421845436096,
0.04543840512633324,
-0.03781485557556152,
-0.08232154697179794,
0.014069855213165283,
0.01977265253663063,
0.2036685198545456,
-0.1700204312801361,
-0.3156561255455017,
-0.2876892685890198,
0.008588641881942749,
0.08341200649738312,
0.05856267735362053,
-0.18697553873062134,
0.061514873057603836,
-0.0504394993185997,
-0.0372772216796875,
-0.16536259651184082,
-0.006280520930886269,
0.05598122626543045,
-0.12455479800701141,
0.23158681392669678,
0.030283048748970032,
-0.05458620935678482,
0.1691431999206543,
-0.1704314798116684,
-0.4853295385837555,
0.0937882736325264,
0.026177670806646347,
0.018859297037124634,
0.16634482145309448,
0.04162256419658661,
0.22095637023448944,
0.13706371188163757,
-0.04573114216327667,
-0.07300673425197601,
0.30506086349487305,
-0.3060210347175598,
-0.09133735299110413,
0.3514886498451233,
0.2890291213989258,
0.24220135807991028,
-0.3309827446937561,
-0.097454734146595,
0.11712479591369629,
0.31087881326675415,
-0.37071317434310913,
-0.043404802680015564,
0.2625824511051178,
0.15523013472557068,
0.13602136075496674,
0.09857754409313202,
0.07001045346260071,
-0.3690324127674103,
0.5197031497955322,
0.02530946210026741,
0.16972212493419647,
-0.4504544734954834,
0.16518732905387878,
0.3777584135532379,
-0.07523944973945618,
-0.11581100523471832,
0.17552661895751953,
-0.22763365507125854,
-0.003060668706893921,
-0.022471487522125244,
-0.04679656773805618,
0.3226107060909271,
-0.19822099804878235,
0.15862815082073212,
-0.2886130213737488,
-0.4204317629337311,
0.4601879417896271,
0.21647192537784576,
-0.1307116448879242,
0.021112438291311264,
0.3001399338245392,
0.24066808819770813,
0.00031473953276872635,
0.2337663620710373,
-0.5237202048301697,
0.21977806091308594,
-0.16609534621238708,
-0.12398435175418854,
-0.17668817937374115,
-0.13082283735275269,
0.022597365081310272,
0.3250637948513031,
-0.03984187915921211,
0.0951623022556305,
0.008148275315761566,
0.17559397220611572,
-0.15042899549007416,
-0.6300578117370605,
0.03776070103049278,
-0.030166037380695343,
-0.07506980746984482,
-0.25218331813812256,
0.12748630344867706,
0.30729204416275024,
-0.17018043994903564,
0.042411450296640396,
0.34885963797569275,
0.34623411297798157,
0.3489655554294586,
0.2465878576040268,
0.012971030548214912,
-0.023269828408956528,
-0.029877467080950737,
-0.30376869440078735,
0.7039051651954651,
0.05581139773130417,
0.016437368467450142,
0.36522069573402405,
0.18725766241550446,
-0.1858244687318802,
0.056977950036525726,
-0.12071159482002258,
-0.19570256769657135,
-0.028100522235035896,
0.501901388168335,
0.023770548403263092,
0.14742377400398254,
-0.3337138891220093,
0.2036663293838501,
-0.3072102963924408,
0.08721186220645905,
0.10411334037780762,
0.21707329154014587,
0.16621538996696472,
-0.25206559896469116,
0.12901389598846436,
-0.12721915543079376,
0.4657265841960907,
0.1348121017217636,
-0.09193446487188339,
-0.04465300962328911,
-0.38442909717559814,
-0.5979174375534058,
0.2705078125,
-0.2651819586753845,
-0.04662824422121048,
-0.08240693062543869,
0.27281588315963745,
-0.051436446607112885,
0.1950720250606537,
0.1734677106142044,
-0.046184293925762177,
-0.18691453337669373,
0.06279973685741425,
-0.2228793054819107,
0.02213445119559765,
0.0849633514881134,
-0.20451630651950836,
-0.04531606659293175,
-0.2967483103275299,
0.24866977334022522,
0.03419623151421547,
0.20291337370872498,
-0.09038880467414856,
-0.04345396161079407,
-0.050929829478263855,
0.2771996855735779,
0.23989979922771454,
0.31353822350502014,
0.5241897106170654,
-0.0809629037976265,
-0.15977169573307037,
-0.24264058470726013,
-0.19349922239780426,
-0.12480150163173676,
0.34274259209632874,
-0.13327276706695557,
0.28962260484695435,
-0.04877118766307831,
-0.16103796660900116,
-0.2663969099521637,
0.2788797914981842,
0.14207608997821808,
-0.22439365088939667,
-0.125995472073555,
0.07907900959253311,
-0.23879006505012512,
0.0993523895740509,
-0.2077052742242813,
-0.08647116273641586,
0.17357781529426575,
0.4444510042667389,
-0.13182738423347473,
-0.22260542213916779,
0.4384514093399048,
-0.0963423028588295,
-0.22031104564666748,
-0.2880282700061798,
0.19758091866970062,
-0.17422661185264587,
-0.23280709981918335,
-0.6331058740615845,
0.06925331801176071,
0.34894445538520813,
0.14092110097408295,
-0.09394288063049316,
0.20526398718357086,
-0.17683696746826172,
0.2215220183134079,
-0.05070687457919121,
0.20846302807331085,
0.10359795391559601,
-0.33445990085601807,
0.05407739803195,
-0.16850575804710388
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | Two questions:
- with `datasets-cli env` we don't have any information on the dataset script version used. Should we give access to this somehow? Either as a note in the Error message or as an argument with the name of the dataset to `datasets-cli env`?
- I don't really understand why the id is duplicated in the code of `code_search_net`, how can I debug this actually? | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 66 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
Two questions:
- with `datasets-cli env` we don't have any information on the dataset script version used. Should we give access to this somehow? Either as a note in the Error message or as an argument with the name of the dataset to `datasets-cli env`?
- I don't really understand why the id is duplicated in the code of `code_search_net`, how can I debug this actually? | [
-0.009493295103311539,
0.004908144474029541,
-0.1037805825471878,
0.3735049366950989,
0.046930089592933655,
-0.05958186462521553,
0.2355322241783142,
0.2376774549484253,
0.058069948107004166,
0.042098693549633026,
-0.0894138514995575,
0.40720927715301514,
-0.15770046412944794,
0.10433865338563919,
0.16285927593708038,
0.0670308917760849,
0.014338448643684387,
0.15045127272605896,
0.12020201981067657,
-0.12889903783798218,
-0.32790806889533997,
0.22176727652549744,
-0.24978986382484436,
0.050549864768981934,
-0.23361019790172577,
-0.13893309235572815,
-0.21910949051380157,
0.2946088910102844,
-0.17181240022182465,
-0.6023651957511902,
0.23651434481143951,
0.24690745770931244,
-0.30475425720214844,
0.34852614998817444,
-0.00011295881267869845,
0.14549928903579712,
0.3868987560272217,
-0.011275596916675568,
-0.24606719613075256,
-0.19642601907253265,
-0.1086808294057846,
-0.11410974711179733,
0.09371720254421234,
-0.31640058755874634,
0.018459055572748184,
-0.15016986429691315,
-0.11318419873714447,
-0.502325177192688,
0.8769923448562622,
0.21019843220710754,
0.25716453790664673,
0.23031780123710632,
0.31212612986564636,
-0.22142665088176727,
0.2857815623283386,
-0.14498092234134674,
-0.04080799221992493,
0.4033096432685852,
0.1780676394701004,
-0.05045204609632492,
-0.0015697479248046875,
0.2535574436187744,
0.1491452008485794,
-0.09222766757011414,
0.4889204800128937,
0.004279026295989752,
0.05236165598034859,
-0.3802718222141266,
0.1833045482635498,
0.08421751856803894,
0.139986053109169,
-0.29376715421676636,
-0.2534065246582031,
-0.28524070978164673,
-0.0006018893327564001,
-0.238312765955925,
0.35817980766296387,
0.11302974075078964,
-0.18320901691913605,
0.10096980631351471,
-0.023433148860931396,
-0.2443877011537552,
-0.020940419286489487,
-0.06697919964790344,
-0.002474825829267502,
0.00014486908912658691,
-0.04068044573068619,
0.17414870858192444,
0.14366386830806732,
-0.030949808657169342,
0.294206827878952,
-0.13356955349445343,
0.10886065661907196,
0.2196425497531891,
-0.48743075132369995,
0.10885180532932281,
-0.04173818975687027,
-0.06662408262491226,
0.25262850522994995,
0.05010665953159332,
0.15865306556224823,
-0.13832330703735352,
0.058278944343328476,
0.036546140909194946,
0.13621070981025696,
0.11763906478881836,
0.024738356471061707,
0.23959209024906158,
0.19721858203411102,
-0.2188262939453125,
-0.27112752199172974,
-0.05646609514951706,
-0.17859210073947906,
-0.15166300535202026,
0.4401814937591553,
0.08090823888778687,
0.5045521259307861,
0.05163686349987984,
-0.19577263295650482,
0.17987042665481567,
-0.1808786690235138,
-0.1719260811805725,
0.07397181540727615,
0.3315836489200592,
0.18269170820713043,
-0.3608234226703644,
0.08121390640735626,
0.23049534857273102,
-0.1570228934288025,
-0.2011745423078537,
-0.3156382441520691,
-0.14958719909191132,
-0.07725287228822708,
-0.12676651775836945,
0.21542604267597198,
-0.5755319595336914,
0.29173433780670166,
0.27760833501815796,
-0.07649016380310059,
-0.4185141921043396,
-0.010601500049233437,
0.06612740457057953,
-0.21158471703529358,
0.10408104956150055,
-0.039696455001831055,
0.09296444058418274,
-0.08532457053661346,
-0.23814378678798676,
-0.08662024140357971,
0.20180150866508484,
-0.2155357301235199,
-0.3841590881347656,
-0.011382153257727623,
0.27001839876174927,
0.0460587814450264,
0.12732449173927307,
0.017266295850276947,
0.034430209547281265,
0.22378286719322205,
0.1911887526512146,
0.03742180019617081,
-0.033689796924591064,
-0.024473953992128372,
-0.3202991485595703,
0.23071429133415222,
0.6258882284164429,
-0.1388688087463379,
-0.0994991660118103,
-0.1661592274904251,
-0.033792342990636826,
0.0866965800523758,
0.39924493432044983,
-0.23786035180091858,
0.4269876480102539,
-0.31613874435424805,
0.21032623946666718,
0.7068002223968506,
-0.20626592636108398,
-0.3250540792942047,
0.1362052708864212,
-0.2523123025894165,
-0.14977049827575684,
0.10353558510541916,
0.026996908709406853,
0.18629847466945648,
0.09564638882875443,
0.1519925445318222,
-0.07510018348693848,
0.07339368015527725,
-0.09793543815612793,
-0.38469114899635315,
-0.3182416260242462,
0.13996809720993042,
-0.07881179451942444,
0.1862504780292511,
-0.1908341646194458,
0.26999640464782715,
-0.1556694060564041,
0.058212120085954666,
-0.13123470544815063,
-0.12055996805429459,
0.0026755686849355698,
0.27146077156066895,
0.040804632008075714,
0.08875163644552231,
-0.008645439520478249,
-0.4823818802833557,
0.37476375699043274,
-0.3360314667224884,
-0.2697589695453644,
-0.19592972099781036,
-0.3034651279449463,
-0.35152944922447205,
0.14388208091259003,
-0.5467953085899353,
0.014295073226094246,
0.20605339109897614,
-0.06631442904472351,
0.21715684235095978,
0.10206413269042969,
-0.1769392043352127,
0.15948060154914856,
0.05423852056264877,
0.11003493517637253,
-0.20681995153427124,
0.25098860263824463,
-0.4732958674430847,
-0.04282642528414726,
0.058891281485557556,
0.2304437756538391,
0.348660409450531,
-0.12667085230350494,
-0.1688680648803711,
0.4440189599990845,
-0.21932648122310638,
0.05115802213549614,
-0.016334623098373413,
-0.08885036408901215,
0.13984224200248718,
-0.38150832056999207,
0.21653665602207184,
0.25002628564834595,
0.17342035472393036,
-0.17316249012947083,
-0.078718401491642,
0.36034315824508667,
-0.11168016493320465,
0.09486375749111176,
-0.041366804391145706,
-0.08704732358455658,
0.0792679712176323,
-0.11977910995483398,
0.16312167048454285,
-0.10418440401554108,
0.2782200276851654,
-0.3106924593448639,
0.38906189799308777,
0.17473949491977692,
-0.24437983334064484,
0.12069480121135712,
0.23138213157653809,
-0.04080560803413391,
0.10529445111751556,
0.012036193162202835,
0.03238387405872345,
-0.1912027895450592,
-0.2877427637577057,
0.2358514815568924,
0.3477751612663269,
0.15417668223381042,
-0.05847453698515892,
0.2757796347141266,
-0.011302861385047436,
-0.2352377325296402,
0.39303159713745117,
-0.12189413607120514,
-0.14291703701019287,
0.39764389395713806,
0.10854258388280869,
0.04897710680961609,
-0.3879256844520569,
-0.12170068919658661,
0.17144733667373657,
0.07672065496444702,
-0.2829774022102356,
0.012573892250657082,
-0.1297808587551117,
-0.08319488912820816,
-0.45653942227363586,
0.5397930145263672,
-0.11587251722812653,
-0.11273671686649323,
0.25203442573547363,
0.017057452350854874,
0.09759242832660675,
0.12043947726488113,
-0.23072393238544464,
0.18067660927772522,
-0.014884836971759796,
0.11465258151292801,
-0.23557381331920624,
-0.11242678016424179,
-0.07719103246927261,
0.03742801025509834,
0.3936972916126251,
-0.06055067852139473,
0.5720286965370178,
-0.18892785906791687,
0.1064830869436264,
-0.17756709456443787,
-0.3476797342300415,
-0.013159260153770447,
-0.00410345196723938,
0.16645875573158264,
0.050531093031167984,
-0.10588052868843079,
-0.03533542901277542,
-0.3789185583591461,
0.29001253843307495,
-0.3102476894855499,
-0.40681129693984985,
-0.054296743124723434,
0.03987618535757065,
-0.0646376684308052,
-0.21492493152618408,
-0.527354896068573,
-0.2650473415851593,
-0.24305404722690582,
0.316980242729187,
-0.09621463716030121,
0.12793175876140594,
0.33795708417892456,
-0.1227712333202362,
-0.010192055255174637,
-0.005926916841417551,
0.2016511857509613,
-0.35942330956459045,
0.048056844621896744,
0.08746589720249176,
-0.0509013831615448,
-0.3533070683479309,
-0.06889309734106064,
-0.14486125111579895,
0.15145400166511536,
-0.0905509889125824,
-0.3825453519821167,
0.2584373652935028,
-0.2310805767774582,
0.4560713768005371,
-0.16079413890838623,
0.33051419258117676,
0.22429654002189636,
0.25995558500289917,
-0.15050439536571503,
-0.18581923842430115,
-0.053172290325164795,
0.1141129732131958,
-0.1253996193408966,
0.06859397143125534,
0.14049339294433594,
0.28819069266319275,
-0.3000929653644562,
0.8568356037139893,
0.6044376492500305,
0.0024751275777816772,
0.20318806171417236,
-0.1734146624803543,
0.3541761636734009,
-0.23690277338027954,
-0.4189767837524414,
-0.2487494945526123,
0.07403147220611572,
0.02482454478740692,
0.11660400032997131,
-0.07401414960622787,
-0.09495776891708374,
0.13374602794647217,
-0.16915996372699738,
-0.624600887298584,
-0.3106156587600708,
0.050894856452941895,
-0.22327464818954468,
0.15039241313934326,
0.05520012602210045,
0.007974594831466675,
0.052907589823007584,
0.06543868780136108,
-0.02478623390197754,
0.23863480985164642,
0.027816325426101685,
0.03209772706031799,
-0.18559741973876953,
-0.17130175232887268,
-0.39484575390815735,
0.10872901976108551,
-0.1418868899345398,
0.1687629520893097,
-0.007476676255464554,
0.14032241702079773,
0.41627615690231323,
-0.1948326975107193,
0.6553744673728943,
-0.08205357193946838,
0.11870166659355164,
0.11391940712928772,
0.16004744172096252,
-0.09184142202138901,
-0.12160681188106537,
-0.0004833042621612549,
0.4200717806816101,
0.12143194675445557,
0.08286769688129425,
-0.28634974360466003,
0.03288566693663597,
-0.06184527277946472,
0.29357239603996277,
-0.34942078590393066,
-0.41818705201148987,
-0.10620975494384766,
-0.3285917341709137,
-0.5123437643051147,
-0.000369928777217865,
-0.03325461596250534,
0.2004815936088562,
-0.06389695405960083,
-0.0373949259519577,
-0.1862735003232956,
-0.21587088704109192,
0.04503418132662773,
0.2135528326034546,
0.27689358592033386,
0.05401657521724701,
0.5974949598312378,
0.4390262961387634,
-0.15270689129829407,
0.013895025476813316,
0.7316982746124268,
-0.03127070143818855,
0.008835099637508392,
-0.360228568315506,
-0.21456378698349,
-0.15163177251815796,
0.30031347274780273,
-0.17225080728530884,
0.14545658230781555,
0.06430938839912415,
-0.005577027797698975,
0.0442829355597496,
-0.2298395335674286,
0.16673287749290466,
-0.20308205485343933,
-0.19674275815486908,
-0.3953794836997986,
0.29216891527175903,
-0.12114785611629486,
-0.3467513918876648,
0.27005720138549805,
0.14201147854328156,
-0.19104565680027008,
0.39296954870224,
-0.2961888909339905,
0.9225982427597046,
-0.27705198526382446,
-0.035418491810560226,
-0.12047892063856125,
-0.3473209738731384,
0.25888773798942566,
-0.08521226048469543,
-0.06641820818185806,
-0.500607430934906,
0.0952884703874588,
0.1400979608297348,
-0.09750780463218689,
-0.07516131550073624,
-0.008912436664104462,
-0.3079712688922882,
0.17834389209747314,
-0.05324866622686386,
0.03159380704164505,
-0.14958523213863373,
0.32730966806411743,
-0.003050912171602249,
0.22653251886367798,
-0.04216841235756874,
0.100089430809021,
0.18198809027671814,
0.29400256276130676,
-0.06903533637523651,
-0.014677193015813828,
0.1485513150691986,
-0.5788792967796326,
-0.2620588541030884,
0.04558534175157547,
-0.3623947501182556,
0.4910864233970642,
0.02040809765458107,
-0.2879948019981384,
0.2039714753627777,
0.025669192895293236,
0.2825468182563782,
0.15512700378894806,
-0.03303338587284088,
0.09750276803970337,
0.31196296215057373,
0.152837872505188,
-0.1907728761434555,
-0.05418533459305763,
-0.06687969714403152,
-0.019112905487418175,
-0.3339552581310272,
-0.06384993344545364,
-0.09815216809511185,
-0.38549256324768066,
-0.1896451711654663,
0.2295132726430893,
-0.20251862704753876,
-0.02923397347331047,
0.18317511677742004,
-0.02610916644334793,
-0.11397947371006012,
-0.28729456663131714,
0.15066546201705933,
0.19377639889717102,
0.028156617656350136,
0.16749350726604462,
-0.12792786955833435,
-0.15945929288864136,
0.04277148097753525,
0.15847845375537872,
0.37797123193740845,
0.06918050348758698,
0.4716700613498688,
-0.2742195129394531,
-0.05766938626766205,
-0.22294747829437256,
0.09077247232198715,
0.07511814683675766,
-0.6839037537574768,
0.22684898972511292,
-0.33025941252708435,
0.22168134152889252,
0.04924117773771286,
0.4456794261932373,
0.3728160858154297,
0.26417025923728943,
0.044709596782922745,
-0.1884462535381317,
-0.12315411120653152,
-0.024940796196460724,
0.055701375007629395,
0.2507336139678955,
0.03276432305574417,
0.15455608069896698,
-0.05789961665868759,
0.22854948043823242,
-0.3535397946834564,
0.2854169011116028,
-0.06280681490898132,
0.11876475811004639,
-0.004163531586527824,
-0.11939185112714767,
-0.10672971606254578,
-0.058432433754205704,
0.1639813929796219,
0.07692500948905945,
-0.20239059627056122,
-0.24687379598617554,
-0.051581814885139465,
0.13135823607444763,
-0.005644230172038078,
0.08209915459156036,
-0.23496150970458984,
-0.22091533243656158,
0.2747100591659546,
-0.015355678275227547,
0.20102965831756592,
-0.12150853872299194,
0.1296391785144806,
0.037145089358091354,
0.13333790004253387,
0.12746015191078186,
-0.2856590151786804,
0.22581864893436432,
-0.2711217999458313,
0.36479681730270386,
-0.02042435295879841,
0.1812969446182251,
-0.055941302329301834,
-0.0842084214091301,
-0.3009372651576996,
0.06596341729164124,
-0.19194157421588898,
0.12324817478656769,
0.17861154675483704,
-0.2007998377084732,
-0.15158841013908386,
0.37359485030174255,
0.1895236223936081,
0.5776070952415466,
-0.3747794032096863,
0.12332132458686829,
0.0016053570434451103,
0.2342488318681717,
-0.327057808637619,
-0.12329810112714767,
0.01410389132797718,
0.021993085741996765,
0.24655064940452576,
0.40261122584342957,
0.33251890540122986,
-0.20412442088127136,
-0.10005921125411987,
0.07733316719532013,
0.4145544767379761,
0.043195612728595734,
0.3692271113395691,
0.4215739965438843,
0.22497300803661346,
-0.14583814144134521,
0.31781792640686035,
-0.00885751098394394,
0.053255096077919006,
0.5327886343002319,
-0.5467888116836548,
0.13358892500400543,
0.007310925051569939,
0.2482730746269226,
0.26679378747940063,
-0.1006898283958435,
0.40650084614753723,
0.06374456733465195,
-0.06161583960056305,
0.023221321403980255,
0.0591033473610878,
0.16418308019638062,
-0.1535835862159729,
-0.09861700236797333,
-0.06751266121864319,
0.09404227137565613,
-0.1425427794456482,
-0.11540476977825165,
-0.1221378892660141,
-0.28593969345092773,
-0.23999707400798798,
0.11653211712837219,
-0.0442253015935421,
0.030431292951107025,
0.1857382357120514,
-0.005570456385612488,
-0.32095420360565186,
-0.395937442779541,
0.24868139624595642,
0.24779203534126282,
0.36036017537117004,
-0.3663312494754791,
0.3189532160758972,
0.5262148976325989,
-0.09187497198581696,
0.18580758571624756,
0.5166120529174805,
0.6797182559967041,
0.22972959280014038,
-0.18708060681819916,
0.26326534152030945,
0.10307708382606506,
-0.14979422092437744,
-0.17142590880393982,
0.10479987412691116,
-0.09495773911476135,
0.15284524857997894,
0.14194811880588531,
0.09637585282325745,
-0.1254534125328064,
-0.05556363984942436,
0.2238541841506958,
0.09781073033809662,
-0.09991775453090668,
0.23345947265625,
-0.17853201925754547,
-0.1811486929655075,
0.09593035280704498,
0.19799306988716125,
-0.35874152183532715,
-0.005801675841212273,
0.31785401701927185,
0.24641962349414825,
0.13595986366271973,
-0.19891409575939178,
0.13014084100723267,
0.05042720586061478,
0.335568904876709,
0.20148348808288574,
0.09953242540359497,
-0.2653709650039673,
-0.029946904629468918,
-0.7278293967247009,
0.05788274109363556,
-0.44354909658432007,
-0.030901102349162102,
0.20305512845516205,
0.36284929513931274,
-0.2993829846382141,
0.04978220537304878,
0.3716846704483032,
0.04440416768193245,
0.014873615466058254,
0.21856416761875153,
-0.17056967318058014,
-0.00047808513045310974,
0.433876633644104,
-0.2329913079738617,
0.09710106253623962,
-0.35714903473854065,
0.3673858642578125,
-0.37471532821655273,
0.022320128977298737,
-0.17118142545223236,
0.06421855092048645,
0.18930937349796295,
-0.2624626159667969,
0.42243948578834534,
0.1264912337064743,
0.35076332092285156,
0.0014032423496246338,
-0.17009337246418,
-0.20353391766548157,
-0.11241970211267471,
-0.22470074892044067,
0.28665921092033386,
0.47539323568344116,
0.10727629065513611,
-0.014148803427815437,
-0.4560530185699463,
-0.1325494796037674,
0.23713982105255127,
0.05712335556745529,
-0.09285195171833038,
-0.07321960479021072,
0.057773150503635406,
-0.19402289390563965,
0.11423173546791077,
0.03309307619929314,
0.20631927251815796,
-0.10235549509525299,
0.17809922993183136,
-0.2683047652244568,
-0.6693453192710876,
0.41637569665908813,
-0.16041943430900574,
-0.06921039521694183,
-0.15805459022521973,
0.3268052041530609,
0.25503918528556824,
0.11887580156326294,
-0.6650718450546265,
0.18001997470855713,
0.5570529699325562,
-0.2718781530857086,
-0.03802841156721115,
0.15058666467666626,
-0.10346958041191101,
-0.02333506941795349,
-0.008342761546373367,
-0.03893628716468811,
-0.016970623284578323,
-0.2956865131855011,
0.21663999557495117,
-0.3160581588745117
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | Thanks for reporting. There was indeed an issue with the keys. The key was the addition of the file id and row id, which resulted in collisions. I just opened a PR to fix this at https://github.com/huggingface/datasets/pull/2555
To help users debug this kind of errors we could try to show a message like this
```python
DuplicateKeysError: both 42th and 1337th examples have the same keys `48`.
Please fix the dataset script at <path/to/the/dataset/script>
```
This way users who what to look for if they want to debug this issue. I opened an issue to track this: https://github.com/huggingface/datasets/issues/2556 | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 97 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
Thanks for reporting. There was indeed an issue with the keys. The key was the addition of the file id and row id, which resulted in collisions. I just opened a PR to fix this at https://github.com/huggingface/datasets/pull/2555
To help users debug this kind of errors we could try to show a message like this
```python
DuplicateKeysError: both 42th and 1337th examples have the same keys `48`.
Please fix the dataset script at <path/to/the/dataset/script>
```
This way users who what to look for if they want to debug this issue. I opened an issue to track this: https://github.com/huggingface/datasets/issues/2556 | [
-0.03939129784703255,
-0.014792069792747498,
-0.09282355010509491,
0.3366982340812683,
0.08731891214847565,
-0.013940021395683289,
0.2003900706768036,
0.27122190594673157,
0.08827292919158936,
0.06673925369977951,
-0.08620032668113708,
0.39345017075538635,
-0.16239209473133087,
0.13293962180614471,
0.1347278207540512,
0.09150494635105133,
-0.042892567813396454,
0.18986883759498596,
0.11818884313106537,
-0.056120503693819046,
-0.3183740973472595,
0.2934974730014801,
-0.22281648218631744,
0.03282925859093666,
-0.2074054628610611,
-0.12978951632976532,
-0.18502846360206604,
0.23940244317054749,
-0.169512540102005,
-0.627575695514679,
0.2506465017795563,
0.22042334079742432,
-0.3045644462108612,
0.3702601194381714,
-0.00011187337804585695,
0.17764414846897125,
0.389007568359375,
-0.011913617141544819,
-0.2631480395793915,
-0.1894608587026596,
-0.09327313303947449,
-0.0726642981171608,
0.09867437928915024,
-0.25973400473594666,
-0.06125009432435036,
-0.14250214397907257,
-0.10621467232704163,
-0.525935173034668,
0.8551865816116333,
0.22494301199913025,
0.26146507263183594,
0.19248726963996887,
0.34303170442581177,
-0.25819703936576843,
0.24358558654785156,
-0.17720408737659454,
-0.05678107589483261,
0.3766365051269531,
0.20654025673866272,
-0.052828967571258545,
0.01483578234910965,
0.28837621212005615,
0.15086673200130463,
-0.10998345911502838,
0.4550980031490326,
-0.04613183066248894,
0.05629563704133034,
-0.34456077218055725,
0.20294225215911865,
0.08504302054643631,
0.09339380264282227,
-0.29722797870635986,
-0.21181926131248474,
-0.2630220055580139,
0.043652378022670746,
-0.24514882266521454,
0.3421132266521454,
0.13948014378547668,
-0.21775148808956146,
0.1649513989686966,
-0.01737125776708126,
-0.25810176134109497,
0.004423119127750397,
-0.04699055850505829,
-0.012422099709510803,
-0.017424792051315308,
-0.04727216437458992,
0.14450086653232574,
0.19043105840682983,
-0.02945469319820404,
0.2612513303756714,
-0.07703674584627151,
0.03196830302476883,
0.1867051124572754,
-0.5232821106910706,
0.10693398118019104,
-0.052802398800849915,
-0.10803914815187454,
0.22106796503067017,
0.04155835881829262,
0.1781432330608368,
-0.09878889471292496,
0.06307835876941681,
0.004616718739271164,
0.11861075460910797,
0.11133250594139099,
0.05107145756483078,
0.24794737994670868,
0.20898675918579102,
-0.17993450164794922,
-0.25216343998908997,
-0.04653259366750717,
-0.20121794939041138,
-0.16858579218387604,
0.3703467547893524,
0.058428049087524414,
0.5287955403327942,
0.07757236063480377,
-0.23168177902698517,
0.12419769167900085,
-0.14559394121170044,
-0.10063908249139786,
0.0610976479947567,
0.3620438277721405,
0.18594376742839813,
-0.35678231716156006,
0.10967183113098145,
0.22568291425704956,
-0.14237630367279053,
-0.19412556290626526,
-0.3171716630458832,
-0.10635893046855927,
-0.0811321884393692,
-0.15681219100952148,
0.24193434417247772,
-0.6133792996406555,
0.2899123728275299,
0.24165455996990204,
-0.1092538982629776,
-0.4836324453353882,
0.023034067824482918,
0.12351387739181519,
-0.19886749982833862,
0.095689557492733,
0.01016518846154213,
0.07785417884588242,
-0.020327866077423096,
-0.2386654168367386,
-0.051251593977212906,
0.18407928943634033,
-0.25368744134902954,
-0.36331477761268616,
-0.06954275816679001,
0.28632470965385437,
0.06703081727027893,
0.08970685303211212,
0.017820172011852264,
0.036975715309381485,
0.20470181107521057,
0.17932450771331787,
0.002221621572971344,
-0.02457135170698166,
-0.07925696671009064,
-0.2655116021633148,
0.2568260431289673,
0.6351627111434937,
-0.09228745102882385,
-0.10679525136947632,
-0.17371457815170288,
-0.0022595319896936417,
0.08134479820728302,
0.3821578621864319,
-0.24293340742588043,
0.39171168208122253,
-0.3513786792755127,
0.17836277186870575,
0.7134476900100708,
-0.19588758051395416,
-0.35439246892929077,
0.18667759001255035,
-0.2593112587928772,
-0.2182953804731369,
0.0873141661286354,
0.025120887905359268,
0.1783074289560318,
0.11538981646299362,
0.15744265913963318,
-0.07603015750646591,
0.058617547154426575,
-0.05195228010416031,
-0.3551417589187622,
-0.35312244296073914,
0.10548879951238632,
-0.07883721590042114,
0.17293129861354828,
-0.159349262714386,
0.2709900736808777,
-0.15264222025871277,
0.11806920915842056,
-0.12138614058494568,
-0.08495914191007614,
0.08233338594436646,
0.23901167511940002,
0.04968751221895218,
0.08244895935058594,
-0.06329345703125,
-0.44615548849105835,
0.3696322441101074,
-0.29722920060157776,
-0.26685991883277893,
-0.23902492225170135,
-0.25052061676979065,
-0.41303274035453796,
0.1440359652042389,
-0.5862921476364136,
-0.01808541640639305,
0.2047824263572693,
-0.03461550921201706,
0.20921827852725983,
0.10340800881385803,
-0.12694315612316132,
0.1520017385482788,
0.05939918011426926,
0.08343395590782166,
-0.1985914260149002,
0.25220710039138794,
-0.445363849401474,
-0.055046260356903076,
0.09480705857276917,
0.22529572248458862,
0.32521936297416687,
-0.09946703910827637,
-0.1627313792705536,
0.4175092279911041,
-0.24108941853046417,
0.018014520406723022,
-0.000723663717508316,
-0.12094686925411224,
0.07873257249593735,
-0.39305782318115234,
0.19474121928215027,
0.27127736806869507,
0.17837661504745483,
-0.16656464338302612,
-0.0573367103934288,
0.3320140242576599,
-0.08910524845123291,
0.09553825110197067,
-0.05274586379528046,
-0.03157494589686394,
0.11177824437618256,
-0.12019681930541992,
0.22024419903755188,
-0.11676662415266037,
0.29115986824035645,
-0.3164433240890503,
0.36563655734062195,
0.13195453584194183,
-0.2356603741645813,
0.13142840564250946,
0.30602651834487915,
0.022088538855314255,
0.18824361264705658,
0.014061294496059418,
0.008778534829616547,
-0.15509948134422302,
-0.3161095678806305,
0.2443334013223648,
0.3074198365211487,
0.16282103955745697,
-0.10483554005622864,
0.2712976336479187,
0.02897701784968376,
-0.2005145400762558,
0.3751116096973419,
-0.17696534097194672,
-0.10466677695512772,
0.38296210765838623,
0.10481961816549301,
0.020004142075777054,
-0.41955041885375977,
-0.1060766726732254,
0.16659030318260193,
0.09044838696718216,
-0.24326461553573608,
0.024590352550148964,
-0.15732352435588837,
-0.055004216730594635,
-0.49268078804016113,
0.5171203017234802,
-0.1103605180978775,
-0.1431562304496765,
0.24132470786571503,
0.07236331701278687,
0.13623617589473724,
0.12447258830070496,
-0.23155024647712708,
0.14432959258556366,
0.04025663435459137,
0.09334290772676468,
-0.20830769836902618,
-0.11389417201280594,
-0.07257654517889023,
0.03385387733578682,
0.37839049100875854,
-0.0770845040678978,
0.5647822618484497,
-0.16249415278434753,
0.11646293103694916,
-0.24220845103263855,
-0.3452761769294739,
-0.017884857952594757,
0.007264852523803711,
0.14853762090206146,
0.08054809272289276,
-0.0375983864068985,
-0.02142883837223053,
-0.372631311416626,
0.2817131578922272,
-0.3179248571395874,
-0.41350504755973816,
-0.0009352583438158035,
0.01580047607421875,
-0.03573332354426384,
-0.2129421979188919,
-0.5386604070663452,
-0.2469639629125595,
-0.2665465772151947,
0.31766843795776367,
-0.10624121129512787,
0.08213617652654648,
0.36337700486183167,
-0.05938763916492462,
-0.01683030091226101,
-0.04933825507760048,
0.1703392118215561,
-0.3394075632095337,
0.045024219900369644,
0.04605019837617874,
-0.06310495734214783,
-0.33258256316185,
-0.043032437562942505,
-0.12315377593040466,
0.15626260638237,
-0.11822724342346191,
-0.3490813970565796,
0.2830139398574829,
-0.2649720311164856,
0.41670382022857666,
-0.21162715554237366,
0.29056695103645325,
0.20584122836589813,
0.25612640380859375,
-0.14821869134902954,
-0.17120878398418427,
-0.02909020520746708,
0.10586007684469223,
-0.17159411311149597,
0.060361623764038086,
0.09474373608827591,
0.2958514392375946,
-0.257182776927948,
0.8182145357131958,
0.5736111402511597,
-0.00000449642539024353,
0.19713015854358673,
-0.23205479979515076,
0.35618436336517334,
-0.2597366273403168,
-0.44004666805267334,
-0.2620580196380615,
0.10126134008169174,
0.08239719271659851,
0.10126163065433502,
-0.08907050639390945,
-0.1051115095615387,
0.14807306230068207,
-0.15353138744831085,
-0.5878962278366089,
-0.3327071964740753,
0.06774965673685074,
-0.21548989415168762,
0.12114094197750092,
0.06498406827449799,
0.023682504892349243,
0.023672480136156082,
0.015650099143385887,
-0.011440393514931202,
0.2244059443473816,
-0.042998142540454865,
0.09034282714128494,
-0.1426965594291687,
-0.1601073145866394,
-0.3927227258682251,
0.12695959210395813,
-0.1455417424440384,
0.18795201182365417,
-0.004616577178239822,
0.18190845847129822,
0.38991302251815796,
-0.2039216160774231,
0.6486158967018127,
-0.08424215018749237,
0.14716127514839172,
0.1163160502910614,
0.15495939552783966,
-0.10546757280826569,
-0.10310659557580948,
0.04343992844223976,
0.43346458673477173,
0.11045543849468231,
0.11018173396587372,
-0.2643682360649109,
0.01208870392292738,
-0.04174095392227173,
0.2710542380809784,
-0.356294721364975,
-0.3989872932434082,
-0.17320124804973602,
-0.33623090386390686,
-0.5221712589263916,
0.007049836218357086,
0.013235872611403465,
0.23344820737838745,
-0.05660279840230942,
-0.09641250967979431,
-0.22303743660449982,
-0.20345744490623474,
0.00822611153125763,
0.2019338458776474,
0.26480963826179504,
0.11555984616279602,
0.5737645626068115,
0.3952602446079254,
-0.1276334822177887,
-0.0011026374995708466,
0.7134286165237427,
0.0046026017516851425,
-0.014134950935840607,
-0.30185067653656006,
-0.24544283747673035,
-0.17198780179023743,
0.26885414123535156,
-0.18160778284072876,
0.16813993453979492,
0.07850863039493561,
0.02193840593099594,
0.02920445427298546,
-0.19474051892757416,
0.1829778552055359,
-0.17914631962776184,
-0.21841877698898315,
-0.3810095489025116,
0.28493526577949524,
-0.1403217911720276,
-0.2812660336494446,
0.27804112434387207,
0.15900292992591858,
-0.1447201371192932,
0.3344266414642334,
-0.34546780586242676,
0.8578013777732849,
-0.3358383774757385,
-0.05490255728363991,
-0.1418074667453766,
-0.33292698860168457,
0.24242816865444183,
-0.05552351102232933,
0.020100731402635574,
-0.5142742395401001,
0.04491046443581581,
0.17043645679950714,
-0.0552193857729435,
-0.0848081186413765,
-0.01775437593460083,
-0.3104025721549988,
0.17205078899860382,
-0.047649700194597244,
0.024828404188156128,
-0.1602264940738678,
0.3458872437477112,
-0.002921720966696739,
0.245102196931839,
-0.02350626140832901,
0.12506528198719025,
0.151576429605484,
0.2819952070713043,
-0.03667502477765083,
-0.04485810548067093,
0.19287845492362976,
-0.5627150535583496,
-0.2746264636516571,
0.12140721827745438,
-0.35073962807655334,
0.5328583717346191,
0.012690359726548195,
-0.25848814845085144,
0.24549636244773865,
0.026131521910429,
0.24867571890354156,
0.19197581708431244,
-0.06569672375917435,
0.11848339438438416,
0.28669118881225586,
0.07375765591859818,
-0.22133579850196838,
-0.015549954026937485,
-0.08900374174118042,
-0.0279270950704813,
-0.378276526927948,
-0.05273944139480591,
-0.051792897284030914,
-0.41211748123168945,
-0.1450527012348175,
0.2573256194591522,
-0.18298126757144928,
-0.03940340131521225,
0.19022136926651,
-0.051570698618888855,
-0.10651339590549469,
-0.31052953004837036,
0.15818175673484802,
0.17548513412475586,
0.04202883690595627,
0.09818704426288605,
-0.04941393807530403,
-0.18762674927711487,
0.0787869393825531,
0.16770993173122406,
0.36557796597480774,
0.0784652978181839,
0.5398337841033936,
-0.24159391224384308,
-0.011098338291049004,
-0.2637149393558502,
0.07083588093519211,
0.09149117767810822,
-0.6893443465232849,
0.23056179285049438,
-0.2692224085330963,
0.22638045251369476,
0.13490192592144012,
0.45426061749458313,
0.3118361234664917,
0.2074231207370758,
0.06820911169052124,
-0.18998607993125916,
-0.08340393751859665,
-0.07498706877231598,
0.00790494680404663,
0.23835650086402893,
0.017030909657478333,
0.18543465435504913,
-0.032016679644584656,
0.21380683779716492,
-0.3605460822582245,
0.29814690351486206,
-0.09024911373853683,
0.08792104572057724,
-0.023543942719697952,
-0.1306426227092743,
-0.03513406962156296,
-0.014415742829442024,
0.16856902837753296,
0.10066815465688705,
-0.20773665606975555,
-0.25021278858184814,
-0.06400659680366516,
0.12447118759155273,
-0.042443349957466125,
0.15019169449806213,
-0.22437527775764465,
-0.20867671072483063,
0.23107075691223145,
-0.04126931354403496,
0.22023773193359375,
-0.11250317841768265,
0.14271977543830872,
0.060799095779657364,
0.14830447733402252,
0.10306012630462646,
-0.2411944419145584,
0.1918819695711136,
-0.2597799003124237,
0.32322847843170166,
-0.060883767902851105,
0.1569918990135193,
-0.029760830104351044,
-0.0701463371515274,
-0.30873966217041016,
0.08461986482143402,
-0.16822080314159393,
0.09435553848743439,
0.15492813289165497,
-0.25694525241851807,
-0.16147637367248535,
0.41191771626472473,
0.1723019778728485,
0.5156663656234741,
-0.34254682064056396,
0.12201376259326935,
-0.031457457691431046,
0.2493458390235901,
-0.3464599549770355,
-0.1409696638584137,
0.021881991997361183,
0.023021575063467026,
0.25206491351127625,
0.34629061818122864,
0.2895456552505493,
-0.2067197561264038,
-0.08918771147727966,
0.08854874223470688,
0.4030730724334717,
-0.009805295616388321,
0.3582557141780853,
0.36232855916023254,
0.2651081681251526,
-0.2178720086812973,
0.32886025309562683,
-0.02768925577402115,
0.057313498109579086,
0.5360880494117737,
-0.5569241046905518,
0.1019924059510231,
-0.01976863294839859,
0.22918325662612915,
0.21444839239120483,
-0.1321154534816742,
0.39212408661842346,
0.05363742262125015,
-0.10716085135936737,
-0.016993917524814606,
-0.00081615149974823,
0.1937883198261261,
-0.18507885932922363,
-0.04185308516025543,
-0.10781635344028473,
0.09456253051757812,
-0.17130109667778015,
-0.0954023003578186,
-0.10709821432828903,
-0.22833490371704102,
-0.2598004937171936,
0.11138564348220825,
0.008882027119398117,
0.06507919728755951,
0.1844659000635147,
0.0013829916715621948,
-0.3270098567008972,
-0.39651358127593994,
0.20181787014007568,
0.286968469619751,
0.3742621839046478,
-0.4109542965888977,
0.2661164700984955,
0.46416401863098145,
-0.09210622310638428,
0.1796148270368576,
0.5124382376670837,
0.6277324557304382,
0.2143343985080719,
-0.15460112690925598,
0.2471618801355362,
0.0746888816356659,
-0.16644901037216187,
-0.17760156095027924,
0.07899612933397293,
-0.09692418575286865,
0.1750372052192688,
0.16895775496959686,
0.10145911574363708,
-0.13538280129432678,
-0.10176727175712585,
0.26394954323768616,
0.14370131492614746,
-0.1057981550693512,
0.199899822473526,
-0.19099773466587067,
-0.13769647479057312,
-0.006363190710544586,
0.2526303231716156,
-0.3743944764137268,
0.023257534950971603,
0.3362022638320923,
0.2152959257364273,
0.10369280725717545,
-0.23920060694217682,
0.1387794464826584,
0.046992745250463486,
0.32339566946029663,
0.1746048629283905,
0.05726024881005287,
-0.22748617827892303,
-0.04849253222346306,
-0.6852200031280518,
0.11179105937480927,
-0.44229942560195923,
-0.02067166566848755,
0.18456964194774628,
0.38317567110061646,
-0.3131619691848755,
0.01893441379070282,
0.35426437854766846,
0.06768544763326645,
0.008691963739693165,
0.22287128865718842,
-0.2159973382949829,
0.008205901831388474,
0.4384145140647888,
-0.2551458775997162,
0.13033778965473175,
-0.4026133418083191,
0.3538031280040741,
-0.37601718306541443,
0.05282530188560486,
-0.12282630801200867,
0.051592014729976654,
0.12469960749149323,
-0.2892448306083679,
0.4157176613807678,
0.09776393324136734,
0.326495885848999,
-0.01353401504456997,
-0.20336595177650452,
-0.22985878586769104,
-0.1842004805803299,
-0.22369281947612762,
0.27732130885124207,
0.5202599763870239,
0.1267431378364563,
-0.017321515828371048,
-0.4276796579360962,
-0.1936798393726349,
0.24201825261116028,
0.0435459241271019,
-0.05919012799859047,
-0.06660690158605576,
0.06370266526937485,
-0.1687970757484436,
0.15290199220180511,
0.031058799475431442,
0.20292890071868896,
-0.08353881537914276,
0.16060714423656464,
-0.24916130304336548,
-0.676769495010376,
0.39497020840644836,
-0.15889239311218262,
-0.1128198504447937,
-0.10741476714611053,
0.3577103018760681,
0.23685932159423828,
0.08309217542409897,
-0.6305246949195862,
0.251573383808136,
0.5428168177604675,
-0.2058781087398529,
-0.0201534703373909,
0.14896175265312195,
-0.13893857598304749,
0.032347071915864944,
0.031887952238321304,
-0.0470927432179451,
0.03823753446340561,
-0.277347594499588,
0.24150407314300537,
-0.3176979422569275
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | and are we sure there are not a lot of datasets which are now broken with this change? | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 18 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
and are we sure there are not a lot of datasets which are now broken with this change? | [
-0.04690971225500107,
-0.02715371549129486,
-0.11061199009418488,
0.3490998148918152,
0.08127589523792267,
-0.015619564801454544,
0.18118010461330414,
0.2770848274230957,
0.08159078657627106,
0.054418377578258514,
-0.05990789830684662,
0.3916928768157959,
-0.1846611499786377,
0.1166166439652443,
0.15640434622764587,
0.07851530611515045,
-0.03128447383642197,
0.17281854152679443,
0.11068259179592133,
-0.05424556881189346,
-0.32562410831451416,
0.2887389659881592,
-0.2328311949968338,
0.038952719420194626,
-0.18482506275177002,
-0.1620798110961914,
-0.1911863088607788,
0.25887712836265564,
-0.18450988829135895,
-0.6111862659454346,
0.24181462824344635,
0.2137479931116104,
-0.30185726284980774,
0.3558095395565033,
-0.00011124830052722245,
0.17829465866088867,
0.3963310718536377,
-0.018305333331227303,
-0.24289743602275848,
-0.17859382927417755,
-0.09768305718898773,
-0.08690161257982254,
0.07829034328460693,
-0.2927319407463074,
-0.05229929834604263,
-0.13119368255138397,
-0.10200096666812897,
-0.5351570844650269,
0.8553096652030945,
0.23242716491222382,
0.26803675293922424,
0.1950213760137558,
0.33775779604911804,
-0.23569126427173615,
0.25381019711494446,
-0.18405281007289886,
-0.04789372533559799,
0.3911314904689789,
0.2176293134689331,
-0.04693712294101715,
-0.001858927309513092,
0.3106977343559265,
0.15077856183052063,
-0.12269386649131775,
0.4385911822319031,
-0.03778408467769623,
0.056173987686634064,
-0.3310018479824066,
0.1806352734565735,
0.0725947692990303,
0.10407652705907822,
-0.30622610449790955,
-0.23384861648082733,
-0.26635652780532837,
0.03906548395752907,
-0.2513290047645569,
0.3439498841762543,
0.13357312977313995,
-0.22201228141784668,
0.16398248076438904,
-0.011154087260365486,
-0.2648167908191681,
0.011564187705516815,
-0.04753022640943527,
-0.015426676720380783,
0.017887353897094727,
-0.058989182114601135,
0.13689804077148438,
0.1607932150363922,
-0.04668310284614563,
0.2724984586238861,
-0.08961204439401627,
0.04672897607088089,
0.19412341713905334,
-0.5073844194412231,
0.11134137213230133,
-0.026301458477973938,
-0.087005116045475,
0.23045989871025085,
0.026933910325169563,
0.16489815711975098,
-0.10911262780427933,
0.05962325260043144,
0.00602717325091362,
0.12558360397815704,
0.12209953367710114,
0.022441357374191284,
0.24421794712543488,
0.20857562124729156,
-0.15912304818630219,
-0.24337045848369598,
-0.035091832280159,
-0.17512789368629456,
-0.19181303679943085,
0.3740765452384949,
0.08374491333961487,
0.5239518880844116,
0.08179391920566559,
-0.23966892063617706,
0.13707688450813293,
-0.12990286946296692,
-0.10126478224992752,
0.07003210484981537,
0.36654138565063477,
0.16080771386623383,
-0.3450789749622345,
0.11607338488101959,
0.18533895909786224,
-0.139510840177536,
-0.18908725678920746,
-0.325224906206131,
-0.08167804777622223,
-0.08586085587739944,
-0.16789285838603973,
0.21845118701457977,
-0.5809814929962158,
0.2865801751613617,
0.23056364059448242,
-0.09795162081718445,
-0.4757307171821594,
0.007666841149330139,
0.10496759414672852,
-0.20801526308059692,
0.08405476808547974,
0.0011779442429542542,
0.05926357954740524,
-0.02318238839507103,
-0.22309841215610504,
-0.06815936416387558,
0.17335644364356995,
-0.2561262249946594,
-0.34397774934768677,
-0.08128540217876434,
0.2983010709285736,
0.06877730041742325,
0.09403900802135468,
0.018879249691963196,
0.03600409999489784,
0.21151725947856903,
0.16895492374897003,
0.01931893825531006,
-0.02014806866645813,
-0.0689404085278511,
-0.26223689317703247,
0.27154800295829773,
0.6408407688140869,
-0.08519953489303589,
-0.11437007784843445,
-0.16305604577064514,
-0.011973585933446884,
0.08202259242534637,
0.37357017397880554,
-0.21952521800994873,
0.40989649295806885,
-0.3701930046081543,
0.17024864256381989,
0.7158524394035339,
-0.20983228087425232,
-0.3514036238193512,
0.1768578737974167,
-0.25663673877716064,
-0.19277656078338623,
0.10628565400838852,
0.017745262011885643,
0.17177146673202515,
0.12715356051921844,
0.19199424982070923,
-0.07450023293495178,
0.04964194819331169,
-0.050586309283971786,
-0.3718302845954895,
-0.3530542850494385,
0.10300052165985107,
-0.0865592435002327,
0.19556587934494019,
-0.17175480723381042,
0.2626268267631531,
-0.1302567571401596,
0.11709307134151459,
-0.11451485753059387,
-0.09609049558639526,
0.08498084545135498,
0.24913811683654785,
0.027933970093727112,
0.08144989609718323,
-0.07258817553520203,
-0.4511603116989136,
0.36149153113365173,
-0.29946884512901306,
-0.2637147605419159,
-0.22083629667758942,
-0.2707115709781647,
-0.39517179131507874,
0.14444513618946075,
-0.5617760419845581,
-0.02191026136279106,
0.22653278708457947,
-0.0335865244269371,
0.20180648565292358,
0.08936233818531036,
-0.15094251930713654,
0.17156125605106354,
0.04903168976306915,
0.07803737372159958,
-0.21007737517356873,
0.2596834599971771,
-0.4771125912666321,
-0.06322638690471649,
0.09325970709323883,
0.2274787724018097,
0.31998974084854126,
-0.11606496572494507,
-0.1683148741722107,
0.42714956402778625,
-0.2329927235841751,
0.01581893116235733,
-0.002928268164396286,
-0.13001106679439545,
0.08715041726827621,
-0.3934372663497925,
0.17250269651412964,
0.27510905265808105,
0.16739025712013245,
-0.13462543487548828,
-0.06979943066835403,
0.3326270580291748,
-0.0988815575838089,
0.08166006952524185,
-0.03424248471856117,
-0.05346791446208954,
0.10309718549251556,
-0.1120855063199997,
0.20920242369174957,
-0.12173617631196976,
0.28082624077796936,
-0.3323265612125397,
0.3956887423992157,
0.1194213479757309,
-0.2414899468421936,
0.10921226441860199,
0.2924531102180481,
0.0013851989060640335,
0.19751596450805664,
0.009705934673547745,
0.02889614924788475,
-0.1784738004207611,
-0.29536718130111694,
0.23251394927501678,
0.29916152358055115,
0.17318090796470642,
-0.10863442718982697,
0.27404236793518066,
0.0366743803024292,
-0.17995169758796692,
0.38115838170051575,
-0.1649853140115738,
-0.10443892329931259,
0.39415407180786133,
0.08182378113269806,
0.03420861437916756,
-0.4060651361942291,
-0.14422912895679474,
0.14478114247322083,
0.10745634138584137,
-0.27139878273010254,
0.004004614427685738,
-0.14407755434513092,
-0.081654392182827,
-0.48553982377052307,
0.5519638657569885,
-0.09673187136650085,
-0.13400454819202423,
0.2336674928665161,
0.041737623512744904,
0.12607614696025848,
0.11397292464971542,
-0.23598483204841614,
0.14882642030715942,
0.04324868321418762,
0.10606197267770767,
-0.21049802005290985,
-0.10438136011362076,
-0.07206512987613678,
0.04476463422179222,
0.3772631585597992,
-0.09302932769060135,
0.5541763305664062,
-0.19863364100456238,
0.09969057142734528,
-0.2164844423532486,
-0.3579097092151642,
-0.00403749942779541,
0.020813779905438423,
0.1498844176530838,
0.110070139169693,
-0.04024490714073181,
-0.025681912899017334,
-0.37553563714027405,
0.25600698590278625,
-0.3044041097164154,
-0.4428151249885559,
-0.022543836385011673,
0.018756290897727013,
-0.03953408822417259,
-0.20743155479431152,
-0.5418487787246704,
-0.26627597212791443,
-0.2766753137111664,
0.29266268014907837,
-0.09817680716514587,
0.08146128803491592,
0.372558057308197,
-0.06791740655899048,
0.0038494011387228966,
-0.026974065229296684,
0.1974368393421173,
-0.3267020881175995,
0.03124776855111122,
0.0353546179831028,
-0.05293504148721695,
-0.3246123790740967,
-0.0578346811234951,
-0.14751581847667694,
0.17372633516788483,
-0.12598870694637299,
-0.3620150089263916,
0.26230886578559875,
-0.23891331255435944,
0.4267006814479828,
-0.2036772519350052,
0.30288881063461304,
0.21294774115085602,
0.2573753595352173,
-0.15960443019866943,
-0.1698617935180664,
-0.03147178143262863,
0.08927430212497711,
-0.16778913140296936,
0.05567304790019989,
0.10184207558631897,
0.3043364882469177,
-0.26197516918182373,
0.8216838836669922,
0.5829092264175415,
-0.0059696100652217865,
0.20165283977985382,
-0.21184399724006653,
0.3733586370944977,
-0.24405145645141602,
-0.43553924560546875,
-0.24598489701747894,
0.12854516506195068,
0.040785081684589386,
0.09705081582069397,
-0.09210579842329025,
-0.09746627509593964,
0.13967111706733704,
-0.16152898967266083,
-0.6219161748886108,
-0.3212404251098633,
0.050933677703142166,
-0.22732758522033691,
0.11793145537376404,
0.050858039408922195,
0.008975453674793243,
0.03357148915529251,
0.04447918385267258,
0.0025213053449988365,
0.2345270812511444,
-0.011464253067970276,
0.07593118399381638,
-0.1530272215604782,
-0.15338653326034546,
-0.3725162446498871,
0.1175917387008667,
-0.13971731066703796,
0.19310243427753448,
-0.010523952543735504,
0.1913721263408661,
0.3669946789741516,
-0.2281322330236435,
0.645369827747345,
-0.08401349931955338,
0.1381126046180725,
0.11381374299526215,
0.15911120176315308,
-0.0830506756901741,
-0.10504403710365295,
0.03881872072815895,
0.42682960629463196,
0.1269053965806961,
0.12945955991744995,
-0.27293911576271057,
0.024264955893158913,
-0.023200951516628265,
0.26274555921554565,
-0.3573330342769623,
-0.38126417994499207,
-0.1662820428609848,
-0.3246193528175354,
-0.498903751373291,
0.029087096452713013,
0.0064901020377874374,
0.23114235699176788,
-0.021720433607697487,
-0.0889589861035347,
-0.2271208018064499,
-0.21128946542739868,
0.011180959641933441,
0.2008693963289261,
0.2838086187839508,
0.09307415783405304,
0.5682290196418762,
0.3745235502719879,
-0.12442296743392944,
-0.014536252245306969,
0.7123064398765564,
-0.01034567877650261,
-0.009232401847839355,
-0.30111169815063477,
-0.2046627551317215,
-0.1842919886112213,
0.25736692547798157,
-0.19497144222259521,
0.15131282806396484,
0.08696333318948746,
0.021876614540815353,
0.04571756720542908,
-0.1883665770292282,
0.16706791520118713,
-0.1628587543964386,
-0.2159620225429535,
-0.38046038150787354,
0.2882486879825592,
-0.11842778325080872,
-0.28616347908973694,
0.26850634813308716,
0.15819692611694336,
-0.17775177955627441,
0.36846256256103516,
-0.31768307089805603,
0.8326913714408875,
-0.3146323561668396,
-0.05234632268548012,
-0.12637194991111755,
-0.32595521211624146,
0.25535038113594055,
-0.08594752848148346,
0.00673313345760107,
-0.493908554315567,
0.04646332189440727,
0.15982431173324585,
-0.03805677965283394,
-0.07470228523015976,
-0.026272788643836975,
-0.32916349172592163,
0.19051310420036316,
-0.05923028290271759,
0.026452478021383286,
-0.16300924122333527,
0.33006247878074646,
-0.0007662177085876465,
0.24717402458190918,
-0.047794491052627563,
0.13466636836528778,
0.14359956979751587,
0.27983295917510986,
-0.05141591653227806,
-0.030749868601560593,
0.17943143844604492,
-0.5663871169090271,
-0.2774454355239868,
0.10919121652841568,
-0.3608018457889557,
0.5221958160400391,
0.01835920475423336,
-0.25353777408599854,
0.21146653592586517,
0.031442515552043915,
0.23290012776851654,
0.2051723301410675,
-0.049585603177547455,
0.1088988333940506,
0.2894086241722107,
0.09928320348262787,
-0.20451700687408447,
-0.010202432982623577,
-0.05196312814950943,
-0.02966608852148056,
-0.3613177239894867,
-0.047095030546188354,
-0.062256138771772385,
-0.40157192945480347,
-0.1501968502998352,
0.24813006818294525,
-0.17291675508022308,
-0.03501097112894058,
0.16496947407722473,
-0.02703862637281418,
-0.1076025515794754,
-0.31312260031700134,
0.16624441742897034,
0.18622946739196777,
0.029858741909265518,
0.1124030202627182,
-0.05461679771542549,
-0.16926012933254242,
0.07501927018165588,
0.1694585382938385,
0.3665236532688141,
0.06965618580579758,
0.5085343718528748,
-0.26134032011032104,
-0.03375602886080742,
-0.26124683022499084,
0.08004532009363174,
0.1148141548037529,
-0.6623124480247498,
0.2191942185163498,
-0.29411351680755615,
0.2200988382101059,
0.10730961710214615,
0.42560774087905884,
0.3321911096572876,
0.21347695589065552,
0.05592671409249306,
-0.20562678575515747,
-0.11261169612407684,
-0.0481790155172348,
0.0279098991304636,
0.23625054955482483,
0.03930255025625229,
0.16070115566253662,
-0.04261565953493118,
0.1991042196750641,
-0.37128400802612305,
0.26177412271499634,
-0.11103198677301407,
0.07890993356704712,
-0.01568278670310974,
-0.1059613898396492,
-0.06607158482074738,
-0.029073111712932587,
0.1858227699995041,
0.09874952584505081,
-0.18611939251422882,
-0.25910159945487976,
-0.054543834179639816,
0.11989597976207733,
-0.035845089703798294,
0.14154043793678284,
-0.21573038399219513,
-0.1956246942281723,
0.23092131316661835,
-0.046535465866327286,
0.18756771087646484,
-0.11732739210128784,
0.1464104950428009,
0.060463014990091324,
0.11590792238712311,
0.10601717233657837,
-0.24933160841464996,
0.19738629460334778,
-0.24695506691932678,
0.31110715866088867,
-0.057278286665678024,
0.18151943385601044,
-0.029876407235860825,
-0.07985303550958633,
-0.3063933253288269,
0.08472295105457306,
-0.1822776049375534,
0.10954015702009201,
0.1555233597755432,
-0.24792326986789703,
-0.16758599877357483,
0.42124244570732117,
0.16825270652770996,
0.5145002603530884,
-0.3406186103820801,
0.12709945440292358,
-0.02194736897945404,
0.26091766357421875,
-0.36685770750045776,
-0.123440682888031,
0.0033128373324871063,
0.02534818835556507,
0.2622590959072113,
0.3413481116294861,
0.2693057954311371,
-0.19101959466934204,
-0.08152778446674347,
0.09181290864944458,
0.40022385120391846,
0.0021997131407260895,
0.36566147208213806,
0.37268009781837463,
0.2654097378253937,
-0.20721320807933807,
0.29736199975013733,
-0.04092416539788246,
0.062407735735177994,
0.5390809774398804,
-0.539900004863739,
0.12846367061138153,
-0.02050621435046196,
0.2541925609111786,
0.22578203678131104,
-0.12000428140163422,
0.39969831705093384,
0.05802652984857559,
-0.09984712302684784,
0.00975874811410904,
0.013766936957836151,
0.16290363669395447,
-0.17208331823349,
-0.05549469590187073,
-0.07197066396474838,
0.08462907373905182,
-0.17271441221237183,
-0.10104760527610779,
-0.10957811772823334,
-0.2272491753101349,
-0.2541549801826477,
0.09666392207145691,
0.013863898813724518,
0.059957146644592285,
0.16498693823814392,
0.0004625841975212097,
-0.3333255648612976,
-0.36642977595329285,
0.20156458020210266,
0.29780063033103943,
0.3739050030708313,
-0.4081544578075409,
0.3000585734844208,
0.47554564476013184,
-0.09174959361553192,
0.15092696249485016,
0.5318716764450073,
0.629167377948761,
0.22879941761493683,
-0.1557595282793045,
0.2267467975616455,
0.11051864922046661,
-0.16116158664226532,
-0.1954079568386078,
0.06141994148492813,
-0.11543180048465729,
0.1707039773464203,
0.16170552372932434,
0.11471372842788696,
-0.13986241817474365,
-0.07473120093345642,
0.2652655243873596,
0.10534843802452087,
-0.09005694091320038,
0.20067119598388672,
-0.1858331561088562,
-0.13964441418647766,
0.015624431893229485,
0.250235915184021,
-0.3926050364971161,
0.009776042774319649,
0.32965409755706787,
0.21640115976333618,
0.12182080000638962,
-0.224248468875885,
0.1425647884607315,
0.06736919283866882,
0.31816428899765015,
0.19361191987991333,
0.08309934288263321,
-0.24433556199073792,
-0.03215935081243515,
-0.689531683921814,
0.09274768084287643,
-0.40294787287712097,
-0.05544179677963257,
0.1859174370765686,
0.37221038341522217,
-0.3159913122653961,
0.011731719598174095,
0.35093969106674194,
0.06108103320002556,
0.03174799308180809,
0.2196606695652008,
-0.23211747407913208,
-0.009379420429468155,
0.42605161666870117,
-0.2580842971801758,
0.14161695539951324,
-0.4072994589805603,
0.34203800559043884,
-0.37570273876190186,
0.05647675693035126,
-0.14721687138080597,
0.04221604764461517,
0.13156583905220032,
-0.2852286994457245,
0.41177862882614136,
0.09778996556997299,
0.32198911905288696,
-0.04385271295905113,
-0.20329713821411133,
-0.22576886415481567,
-0.16988177597522736,
-0.23655642569065094,
0.274714857339859,
0.5092763304710388,
0.11630985140800476,
-0.004694937262684107,
-0.4373757243156433,
-0.19293221831321716,
0.23205585777759552,
0.06168658286333084,
-0.07858934998512268,
-0.07529599964618683,
0.07226681709289551,
-0.18344418704509735,
0.12286261469125748,
0.05182304605841637,
0.20251038670539856,
-0.09104567766189575,
0.17573226988315582,
-0.25207942724227905,
-0.6924315094947815,
0.39328715205192566,
-0.1511266678571701,
-0.07832752913236618,
-0.11928156018257141,
0.35619452595710754,
0.2467128038406372,
0.07588706910610199,
-0.6449905633926392,
0.2416945993900299,
0.5567660331726074,
-0.1992715299129486,
-0.007139261811971664,
0.15072011947631836,
-0.12365551292896271,
0.037337776273489,
0.026022758334875107,
-0.041605398058891296,
0.034191299229860306,
-0.27455833554267883,
0.25243881344795227,
-0.323622465133667
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | Thanks to the dummy data, we know for sure that most of them work as expected.
`code_search_net` wasn't caught because the dummy data only have one dummy data file while the dataset script can actually load several of them using `os.listdir`. Let me take a look at all the other datasets that use `os.listdir` to see if the keys are alright | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 61 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
Thanks to the dummy data, we know for sure that most of them work as expected.
`code_search_net` wasn't caught because the dummy data only have one dummy data file while the dataset script can actually load several of them using `os.listdir`. Let me take a look at all the other datasets that use `os.listdir` to see if the keys are alright | [
-0.036427829414606094,
-0.02019602805376053,
-0.09643824398517609,
0.3276674151420593,
0.07617641985416412,
-0.013212434947490692,
0.20809918642044067,
0.2912026643753052,
0.0984984040260315,
0.07118479907512665,
-0.06703805923461914,
0.38355904817581177,
-0.17116574943065643,
0.1364002525806427,
0.12881027162075043,
0.0837995857000351,
-0.04380171746015549,
0.17808744311332703,
0.11996617913246155,
-0.059482015669345856,
-0.31798720359802246,
0.2856633961200714,
-0.2349056750535965,
0.01655767112970352,
-0.20905271172523499,
-0.13764652609825134,
-0.17600654065608978,
0.2507340908050537,
-0.1824113428592682,
-0.5908308029174805,
0.2711944282054901,
0.20933818817138672,
-0.2992360591888428,
0.35086628794670105,
-0.0001107918651541695,
0.19000636041164398,
0.39819079637527466,
-0.025601720437407494,
-0.2827823758125305,
-0.17911912500858307,
-0.07280699163675308,
-0.061218470335006714,
0.08318174630403519,
-0.2482597827911377,
-0.08185635507106781,
-0.12249784916639328,
-0.10497589409351349,
-0.5397640466690063,
0.8384168148040771,
0.2460182011127472,
0.27267158031463623,
0.21126699447631836,
0.32237565517425537,
-0.2598751187324524,
0.24202927947044373,
-0.16143254935741425,
-0.06399080157279968,
0.38287386298179626,
0.18332180380821228,
-0.04798957705497742,
0.0057220906019210815,
0.29819628596305847,
0.1404442936182022,
-0.08750389516353607,
0.418680340051651,
-0.032303743064403534,
0.04687751084566116,
-0.3087761402130127,
0.21462678909301758,
0.10282376408576965,
0.08842770010232925,
-0.31282663345336914,
-0.2070387452840805,
-0.26698794960975647,
0.03625509515404701,
-0.2407454550266266,
0.31803879141807556,
0.13132943212985992,
-0.2028149515390396,
0.1684761643409729,
0.008736328221857548,
-0.23333901166915894,
0.016872301697731018,
-0.03568235784769058,
-0.01205766573548317,
0.007564663887023926,
-0.047777190804481506,
0.14422199130058289,
0.18704761564731598,
-0.030187278985977173,
0.26582229137420654,
-0.10939396917819977,
0.019526677206158638,
0.17904523015022278,
-0.5136678218841553,
0.12301948666572571,
-0.05185721814632416,
-0.0984722450375557,
0.22770506143569946,
0.028717659413814545,
0.16988088190555573,
-0.0687137246131897,
0.06249361112713814,
0.005373481661081314,
0.09051504731178284,
0.11253385245800018,
0.026970189064741135,
0.2809765040874481,
0.20357181131839752,
-0.1502012312412262,
-0.2411472648382187,
-0.03582561016082764,
-0.18146425485610962,
-0.1567704975605011,
0.3382408320903778,
0.07081475853919983,
0.5329921245574951,
0.07598507404327393,
-0.24769258499145508,
0.12774866819381714,
-0.12357775866985321,
-0.07536400109529495,
0.05699199065566063,
0.3604099154472351,
0.15865018963813782,
-0.3382255434989929,
0.11390696465969086,
0.2257111668586731,
-0.15907388925552368,
-0.20250071585178375,
-0.3317088782787323,
-0.11994960904121399,
-0.07043184340000153,
-0.1687157303094864,
0.25537732243537903,
-0.5790086388587952,
0.31429392099380493,
0.24576695263385773,
-0.11949041485786438,
-0.45153820514678955,
0.0783611387014389,
0.1040026843547821,
-0.19531205296516418,
0.08905922621488571,
0.02083626389503479,
0.05830405652523041,
0.0076982975006103516,
-0.23695644736289978,
-0.045337874442338943,
0.16775155067443848,
-0.253196120262146,
-0.3557942807674408,
-0.09430699050426483,
0.3007485866546631,
0.06466568261384964,
0.08033084869384766,
0.016925059258937836,
0.055399853736162186,
0.1994587779045105,
0.15688158571720123,
-0.012706741690635681,
-0.03325539082288742,
-0.10192273557186127,
-0.24832506477832794,
0.2735368311405182,
0.6290319561958313,
-0.1159733384847641,
-0.097900390625,
-0.1622065305709839,
-0.002376629039645195,
0.07973050326108932,
0.3462894558906555,
-0.24124208092689514,
0.3902709186077118,
-0.36548730731010437,
0.1659935861825943,
0.6817968487739563,
-0.20551106333732605,
-0.35524842143058777,
0.15242640674114227,
-0.24773286283016205,
-0.1710260510444641,
0.0933937206864357,
0.031553760170936584,
0.16267600655555725,
0.15226058661937714,
0.1557508409023285,
-0.06676185876131058,
0.05703265964984894,
-0.05156254768371582,
-0.3554733395576477,
-0.3471830189228058,
0.11304730176925659,
-0.06709565222263336,
0.16612963378429413,
-0.1674635112285614,
0.24174755811691284,
-0.13819433748722076,
0.12545675039291382,
-0.11240625381469727,
-0.08025609701871872,
0.09073419868946075,
0.2145913690328598,
0.027268696576356888,
0.09859742224216461,
-0.06436830759048462,
-0.47261226177215576,
0.3678179085254669,
-0.2958675026893616,
-0.2371395230293274,
-0.21571870148181915,
-0.28407859802246094,
-0.4142511487007141,
0.11498662084341049,
-0.5730295181274414,
-0.03259454295039177,
0.2200724184513092,
-0.026793815195560455,
0.2193918228149414,
0.08806478977203369,
-0.12073121964931488,
0.158935084939003,
0.049719102680683136,
0.08768407255411148,
-0.2432178407907486,
0.2517301142215729,
-0.45837119221687317,
-0.06324806809425354,
0.10950362682342529,
0.22771519422531128,
0.3038507401943207,
-0.12214881181716919,
-0.17016249895095825,
0.4219490885734558,
-0.2227296084165573,
0.002072833478450775,
-0.00186992809176445,
-0.14872492849826813,
0.06749802827835083,
-0.38300901651382446,
0.18450701236724854,
0.2993696928024292,
0.17572924494743347,
-0.15666711330413818,
-0.09868978708982468,
0.3583335876464844,
-0.07402479648590088,
0.09074868261814117,
-0.05107135698199272,
-0.036881640553474426,
0.12253047525882721,
-0.1088031679391861,
0.21264874935150146,
-0.12718161940574646,
0.2830671966075897,
-0.31750160455703735,
0.40243902802467346,
0.1329593062400818,
-0.23215189576148987,
0.1211511492729187,
0.2946248948574066,
0.016362585127353668,
0.1883886754512787,
-0.002433810383081436,
-0.021499186754226685,
-0.18302974104881287,
-0.28071603178977966,
0.23426632583141327,
0.29533451795578003,
0.17817042768001556,
-0.11184115707874298,
0.2570246160030365,
0.0040010083466768265,
-0.18719691038131714,
0.37976664304733276,
-0.19415436685085297,
-0.13406996428966522,
0.38468632102012634,
0.08995919674634933,
-0.008662070147693157,
-0.444720983505249,
-0.11100009083747864,
0.1650652140378952,
0.12234777212142944,
-0.24939264357089996,
0.0003664810210466385,
-0.16399350762367249,
-0.06364759057760239,
-0.47976818680763245,
0.5345803499221802,
-0.09948918223381042,
-0.14887838065624237,
0.2435329258441925,
0.08119572699069977,
0.11936607956886292,
0.12789779901504517,
-0.24043168127536774,
0.14989927411079407,
0.05767492949962616,
0.08186520636081696,
-0.22388266026973724,
-0.11080829799175262,
-0.09239941090345383,
0.056167956441640854,
0.36377081274986267,
-0.06526442617177963,
0.5341525077819824,
-0.19019359350204468,
0.09057436138391495,
-0.2226327806711197,
-0.3574889004230499,
-0.012997373938560486,
0.002621881663799286,
0.15803156793117523,
0.11136913299560547,
-0.03470258414745331,
-0.011830039322376251,
-0.3635372519493103,
0.27092990279197693,
-0.31525561213493347,
-0.4279226064682007,
0.01406906172633171,
0.007502011954784393,
-0.030933765694499016,
-0.22946549952030182,
-0.5562417507171631,
-0.25205686688423157,
-0.26433026790618896,
0.27264705300331116,
-0.07574063539505005,
0.07023538649082184,
0.3859764039516449,
-0.03293231874704361,
-0.00932200439274311,
-0.02851143665611744,
0.1671643853187561,
-0.3440152108669281,
0.010918322950601578,
0.05264142155647278,
-0.058413829654455185,
-0.3240548074245453,
-0.0440945066511631,
-0.16821560263633728,
0.1607697308063507,
-0.13156050443649292,
-0.36247140169143677,
0.23761515319347382,
-0.2448987513780594,
0.41996467113494873,
-0.21500393748283386,
0.2762875556945801,
0.21946430206298828,
0.25795018672943115,
-0.15461060404777527,
-0.19461777806282043,
-0.04310765862464905,
0.11911840736865997,
-0.17727220058441162,
0.05795370042324066,
0.07518893480300903,
0.2850075960159302,
-0.24568048119544983,
0.8134379982948303,
0.5724949836730957,
-0.007753137499094009,
0.1956256777048111,
-0.2384265661239624,
0.37819337844848633,
-0.2580960690975189,
-0.4343472421169281,
-0.2718244194984436,
0.12006205320358276,
0.07931723445653915,
0.10621543228626251,
-0.08880048245191574,
-0.0725797489285469,
0.16934871673583984,
-0.13288089632987976,
-0.5772469639778137,
-0.3220956027507782,
0.051615841686725616,
-0.21950054168701172,
0.09358515590429306,
0.08431486785411835,
0.030273571610450745,
0.0016909576952457428,
0.029721997678279877,
-0.005609859246760607,
0.1969582438468933,
-0.040184877812862396,
0.08711323142051697,
-0.16457177698612213,
-0.11214415729045868,
-0.3914946913719177,
0.14287841320037842,
-0.14410802721977234,
0.18394781649112701,
0.01625635102391243,
0.184657484292984,
0.3610936999320984,
-0.19155795872211456,
0.6522558927536011,
-0.09729015827178955,
0.13873539865016937,
0.11521078646183014,
0.172787606716156,
-0.1377713531255722,
-0.10880109667778015,
0.03325924649834633,
0.414242148399353,
0.11149232089519501,
0.13761277496814728,
-0.27534109354019165,
0.013141827657818794,
-0.0005713347345590591,
0.27700263261795044,
-0.3481079936027527,
-0.3533657193183899,
-0.19787836074829102,
-0.3296116888523102,
-0.5215123891830444,
0.004344023764133453,
-0.0022249333560466766,
0.23394908010959625,
-0.031041061505675316,
-0.09864488244056702,
-0.23544879257678986,
-0.22892272472381592,
0.020344726741313934,
0.20964129269123077,
0.2850697636604309,
0.12585660815238953,
0.5712016820907593,
0.3908017575740814,
-0.10342314839363098,
-0.013242034241557121,
0.7329350709915161,
0.007225425913929939,
-0.014144472777843475,
-0.30902788043022156,
-0.22626948356628418,
-0.1921972930431366,
0.2538822293281555,
-0.17472320795059204,
0.17612701654434204,
0.06522864103317261,
0.020188014954328537,
0.03494321182370186,
-0.14363345503807068,
0.16442720592021942,
-0.16918480396270752,
-0.2057051956653595,
-0.38015037775039673,
0.2729167640209198,
-0.12599757313728333,
-0.27615228295326233,
0.26633912324905396,
0.1311987042427063,
-0.16926096379756927,
0.3703281879425049,
-0.33845701813697815,
0.8030845522880554,
-0.32222098112106323,
-0.032364580780267715,
-0.1175391897559166,
-0.319810688495636,
0.23897702991962433,
-0.07109348475933075,
0.01645752228796482,
-0.4927279055118561,
0.05297921597957611,
0.16507600247859955,
-0.038042303174734116,
-0.0772075280547142,
-0.01883336901664734,
-0.3268433213233948,
0.19430960714817047,
-0.04452227056026459,
0.0551319494843483,
-0.1772865206003189,
0.34723082184791565,
-0.014134222641587257,
0.251933753490448,
0.007994280196726322,
0.14879360795021057,
0.1591975837945938,
0.26232296228408813,
-0.023143082857131958,
-0.03138412907719612,
0.16241303086280823,
-0.561202347278595,
-0.24269843101501465,
0.11930950731039047,
-0.3816883862018585,
0.5089941024780273,
-0.011307846754789352,
-0.24303482472896576,
0.1899622231721878,
0.02472855895757675,
0.23850463330745697,
0.21759329736232758,
-0.05999285727739334,
0.1229257881641388,
0.2727581560611725,
0.08999048173427582,
-0.21182440221309662,
-0.027794551104307175,
-0.0924525037407875,
-0.005022671073675156,
-0.36144110560417175,
-0.04881790280342102,
-0.05994454398751259,
-0.4107626676559448,
-0.1464827060699463,
0.2362813502550125,
-0.15620005130767822,
-0.06238044053316116,
0.15882623195648193,
-0.04258333146572113,
-0.10807901620864868,
-0.3281361758708954,
0.17031358182430267,
0.15569043159484863,
0.03443523868918419,
0.09368723630905151,
-0.0587179996073246,
-0.20662042498588562,
0.057510584592819214,
0.17590928077697754,
0.3556896150112152,
0.09734632074832916,
0.5280070900917053,
-0.2695702910423279,
-0.0025806911289691925,
-0.2692102789878845,
0.06591015309095383,
0.13009348511695862,
-0.6779011487960815,
0.24043136835098267,
-0.26337552070617676,
0.1785435825586319,
0.11935564875602722,
0.4354136288166046,
0.3073654770851135,
0.20084118843078613,
0.055754732340574265,
-0.19557511806488037,
-0.12817928194999695,
-0.08453099429607391,
0.04317054897546768,
0.25581687688827515,
0.030447915196418762,
0.1719135195016861,
-0.05925985425710678,
0.2200331687927246,
-0.3742517828941345,
0.28764092922210693,
-0.09201879054307938,
0.11508598923683167,
-0.03603179752826691,
-0.13653385639190674,
-0.04393477365374565,
-0.021715480834245682,
0.1914595514535904,
0.10170075297355652,
-0.20230023562908173,
-0.2717781662940979,
-0.08028866350650787,
0.11368231475353241,
-0.039036303758621216,
0.11213311553001404,
-0.21611739695072174,
-0.1972958892583847,
0.19720803201198578,
-0.055084794759750366,
0.20462478697299957,
-0.11754650622606277,
0.13936366140842438,
0.06412862986326218,
0.11854171752929688,
0.1053290143609047,
-0.23492909967899323,
0.1644866019487381,
-0.2630438506603241,
0.3048250675201416,
-0.06655208021402359,
0.15409067273139954,
-0.03244077041745186,
-0.0691734105348587,
-0.2817688286304474,
0.08593611419200897,
-0.15320850908756256,
0.09072206914424896,
0.14758342504501343,
-0.2426227182149887,
-0.17069952189922333,
0.41718223690986633,
0.17689304053783417,
0.49634528160095215,
-0.3218599855899811,
0.12139706313610077,
-0.022257529199123383,
0.26405078172683716,
-0.37191057205200195,
-0.1372206211090088,
0.04545552656054497,
0.007801420520991087,
0.2777574360370636,
0.32370588183403015,
0.2908857762813568,
-0.1721031367778778,
-0.07587297260761261,
0.07583771646022797,
0.3826349675655365,
0.007085507735610008,
0.3628188669681549,
0.3571457266807556,
0.24452026188373566,
-0.22205565869808197,
0.30685076117515564,
-0.053951989859342575,
0.06392110884189606,
0.5503352284431458,
-0.5318269729614258,
0.13650447130203247,
-0.034737296402454376,
0.23053674399852753,
0.20377245545387268,
-0.1257784366607666,
0.4079783260822296,
0.07306261360645294,
-0.11642184853553772,
0.01589864119887352,
0.03522622585296631,
0.17207491397857666,
-0.21781854331493378,
-0.055747684091329575,
-0.11234989017248154,
0.07308570295572281,
-0.1755266785621643,
-0.11908853054046631,
-0.11768166720867157,
-0.2050512731075287,
-0.2649649977684021,
0.11121104657649994,
0.03444916009902954,
0.062038604170084,
0.16560792922973633,
0.001182064414024353,
-0.335629940032959,
-0.388670951128006,
0.18870967626571655,
0.3114575147628784,
0.3505721390247345,
-0.3815400004386902,
0.27760744094848633,
0.4696757197380066,
-0.10249076783657074,
0.17448438704013824,
0.5233426690101624,
0.6046817302703857,
0.20456212759017944,
-0.16108502447605133,
0.23072992265224457,
0.08594775199890137,
-0.1587415635585785,
-0.2143249809741974,
0.08598822355270386,
-0.11255891621112823,
0.15086086094379425,
0.1863923966884613,
0.119265615940094,
-0.152385413646698,
-0.1243503987789154,
0.2570667862892151,
0.08923430740833282,
-0.1157788634300232,
0.20965683460235596,
-0.1934627741575241,
-0.11912977695465088,
-0.010668635368347168,
0.2577624022960663,
-0.37031036615371704,
0.008772669360041618,
0.3382304906845093,
0.19992771744728088,
0.12144225090742111,
-0.2532489597797394,
0.14326262474060059,
0.036245882511138916,
0.3206444978713989,
0.16745297610759735,
0.07082236558198929,
-0.24967887997627258,
-0.03449659049510956,
-0.690796971321106,
0.11374704539775848,
-0.43485864996910095,
-0.050247691571712494,
0.17793476581573486,
0.37891799211502075,
-0.29521992802619934,
0.024981621652841568,
0.3320702612400055,
0.0711960569024086,
0.0678391382098198,
0.21664388477802277,
-0.21557849645614624,
0.008859708905220032,
0.40264201164245605,
-0.26356014609336853,
0.1491953283548355,
-0.45074814558029175,
0.33494025468826294,
-0.3472180664539337,
0.0670800730586052,
-0.1321842074394226,
0.04370424151420593,
0.14638182520866394,
-0.2922668755054474,
0.43222951889038086,
0.09938628226518631,
0.32415497303009033,
-0.03178060054779053,
-0.18043366074562073,
-0.21886685490608215,
-0.14869637787342072,
-0.24080201983451843,
0.2581392228603363,
0.5101234912872314,
0.13968130946159363,
-0.00009153317660093307,
-0.4157191216945648,
-0.18756112456321716,
0.2462860494852066,
0.08920450508594513,
-0.03880639746785164,
-0.09257293492555618,
0.09676611423492432,
-0.2200201451778412,
0.15125136077404022,
0.026863351464271545,
0.22602704167366028,
-0.08238586783409119,
0.18348363041877747,
-0.22126179933547974,
-0.6726046800613403,
0.38101446628570557,
-0.15736036002635956,
-0.09516821801662445,
-0.1255325824022293,
0.3582265377044678,
0.24553608894348145,
0.0702352449297905,
-0.6323133707046509,
0.25814753770828247,
0.5377963781356812,
-0.20069634914398193,
-0.0005394667387008667,
0.16082331538200378,
-0.10720419883728027,
0.05145132169127464,
0.02281280979514122,
0.0017292499542236328,
0.055416129529476166,
-0.2744811177253723,
0.26202335953712463,
-0.320992648601532
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | I found one issue on `fever` (PR here: https://github.com/huggingface/datasets/pull/2557)
All the other ones seem fine :) | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 16 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
I found one issue on `fever` (PR here: https://github.com/huggingface/datasets/pull/2557)
All the other ones seem fine :) | [
-0.02020949125289917,
0.0007679611444473267,
-0.0907568484544754,
0.3496338725090027,
0.08513621240854263,
-0.024872779846191406,
0.19917897880077362,
0.2581072747707367,
0.09322869777679443,
0.0736750066280365,
-0.09278755635023117,
0.38461270928382874,
-0.17428547143936157,
0.11450939625501633,
0.15799756348133087,
0.0978713184595108,
-0.03220512717962265,
0.18603570759296417,
0.11466313898563385,
-0.06635259091854095,
-0.32205909490585327,
0.27166059613227844,
-0.24977877736091614,
0.005793720483779907,
-0.2198539823293686,
-0.12779441475868225,
-0.18146075308322906,
0.23271989822387695,
-0.15828253328800201,
-0.6227067112922668,
0.2830570340156555,
0.23677799105644226,
-0.3231881856918335,
0.35452306270599365,
-0.0001138885272666812,
0.1849663406610489,
0.39150291681289673,
-0.00824434868991375,
-0.2720435857772827,
-0.19195438921451569,
-0.09738533198833466,
-0.0876455307006836,
0.12209652364253998,
-0.25983190536499023,
-0.040342073887586594,
-0.12674543261528015,
-0.10032504796981812,
-0.5317739248275757,
0.8246196508407593,
0.1936432272195816,
0.24873210489749908,
0.18870221078395844,
0.3378753960132599,
-0.23723052442073822,
0.2439086139202118,
-0.16667091846466064,
-0.055227458477020264,
0.38774439692497253,
0.19859552383422852,
-0.05048954486846924,
0.012190856039524078,
0.28585436940193176,
0.15495629608631134,
-0.11023007333278656,
0.46213749051094055,
-0.052585773169994354,
0.07631412148475647,
-0.3710738718509674,
0.20500007271766663,
0.08927886188030243,
0.0974365621805191,
-0.27615848183631897,
-0.2324373871088028,
-0.27898305654525757,
0.05604507774114609,
-0.213212788105011,
0.3593417704105377,
0.12219569832086563,
-0.20762431621551514,
0.16240355372428894,
-0.01725703291594982,
-0.25775283575057983,
0.012681402266025543,
-0.04407551884651184,
0.007986702024936676,
-0.0301983579993248,
-0.049108587205410004,
0.15414059162139893,
0.16627267003059387,
-0.03205421566963196,
0.279672771692276,
-0.09967953711748123,
0.0411536805331707,
0.2203778475522995,
-0.557258665561676,
0.15093302726745605,
-0.0677151307463646,
-0.09797906130552292,
0.212864488363266,
0.029023386538028717,
0.19949768483638763,
-0.08487685769796371,
0.0650755986571312,
0.01616707816720009,
0.10343874990940094,
0.0965401828289032,
0.03424068167805672,
0.2327071577310562,
0.21909095346927643,
-0.1835644692182541,
-0.2517276406288147,
-0.0357218012213707,
-0.21291930973529816,
-0.17372578382492065,
0.40170717239379883,
0.06110963970422745,
0.5241870880126953,
0.06799265742301941,
-0.22717265784740448,
0.13217192888259888,
-0.15341442823410034,
-0.10085499286651611,
0.08606378734111786,
0.341001957654953,
0.19491925835609436,
-0.33739933371543884,
0.11376400291919708,
0.22903336584568024,
-0.1387770175933838,
-0.20064353942871094,
-0.31021127104759216,
-0.12138310074806213,
-0.05525381490588188,
-0.14548802375793457,
0.2526145577430725,
-0.6270568370819092,
0.26425400376319885,
0.2605431079864502,
-0.10207684338092804,
-0.4912855625152588,
0.0038117747753858566,
0.10236936807632446,
-0.2192976474761963,
0.09431383013725281,
0.015966907143592834,
0.0795726403594017,
-0.047626521438360214,
-0.2335379272699356,
-0.05444320663809776,
0.17800113558769226,
-0.25374117493629456,
-0.3525581657886505,
-0.02270583249628544,
0.2670419216156006,
0.059040166437625885,
0.12520453333854675,
-0.0038174614310264587,
0.038677558302879333,
0.23063108325004578,
0.1851256638765335,
-0.012323826551437378,
-0.03141936659812927,
-0.08888888359069824,
-0.255225270986557,
0.26879820227622986,
0.6540936827659607,
-0.09658436477184296,
-0.1106148362159729,
-0.17602135241031647,
-0.00005849078297615051,
0.106313556432724,
0.3705933392047882,
-0.22211205959320068,
0.4160010516643524,
-0.3452945947647095,
0.159789577126503,
0.7105059027671814,
-0.19338367879390717,
-0.38740015029907227,
0.18393301963806152,
-0.24762815237045288,
-0.1824151575565338,
0.10658841580152512,
0.014433935284614563,
0.1848345249891281,
0.12239506840705872,
0.16344290971755981,
-0.07338692247867584,
0.08130839467048645,
-0.05352366715669632,
-0.3427562117576599,
-0.3470592796802521,
0.12123656272888184,
-0.0639001652598381,
0.18306785821914673,
-0.1579381823539734,
0.27260714769363403,
-0.13734480738639832,
0.08965151757001877,
-0.11776503920555115,
-0.06315995752811432,
0.08188978582620621,
0.21991443634033203,
0.02303389087319374,
0.10415291786193848,
-0.05760939419269562,
-0.46301382780075073,
0.3818473219871521,
-0.2959967255592346,
-0.2730388641357422,
-0.24990059435367584,
-0.24667319655418396,
-0.3670995831489563,
0.15951193869113922,
-0.580384373664856,
0.028735315427184105,
0.18560348451137543,
-0.04434306174516678,
0.22216400504112244,
0.10191220045089722,
-0.1063273698091507,
0.17416073381900787,
0.060968220233917236,
0.07838781177997589,
-0.20480677485466003,
0.2609240412712097,
-0.4255307614803314,
-0.056114934384822845,
0.1025155782699585,
0.23941835761070251,
0.3366996943950653,
-0.11119541525840759,
-0.1904091238975525,
0.40789544582366943,
-0.23928819596767426,
0.022107474505901337,
-0.03482431173324585,
-0.13013578951358795,
0.07923813909292221,
-0.38706260919570923,
0.16358505189418793,
0.27812322974205017,
0.1803101748228073,
-0.15507766604423523,
-0.04121819883584976,
0.3161660432815552,
-0.11222904920578003,
0.11763846129179001,
-0.0673278272151947,
-0.04628486931324005,
0.10961516201496124,
-0.10859173536300659,
0.21488848328590393,
-0.12732097506523132,
0.30924469232559204,
-0.3220936954021454,
0.4101286828517914,
0.14560726284980774,
-0.22843821346759796,
0.11481470614671707,
0.28856441378593445,
0.01296297088265419,
0.17084857821464539,
0.014239557087421417,
0.023122001439332962,
-0.18527492880821228,
-0.3099054992198944,
0.250381737947464,
0.3074394464492798,
0.13689354062080383,
-0.11005359888076782,
0.25771579146385193,
0.027205444872379303,
-0.2018003612756729,
0.3694400191307068,
-0.14716501533985138,
-0.11450281739234924,
0.4094088077545166,
0.12360608577728271,
0.04180599004030228,
-0.4395471215248108,
-0.10312844812870026,
0.2066832333803177,
0.0979183241724968,
-0.24811814725399017,
0.01454521156847477,
-0.16568177938461304,
-0.0346914678812027,
-0.4692347049713135,
0.5736919641494751,
-0.10258723795413971,
-0.11791320145130157,
0.23391109704971313,
0.06879958510398865,
0.15352840721607208,
0.11818547546863556,
-0.22386674582958221,
0.14796839654445648,
0.04001862555742264,
0.09138748049736023,
-0.23323558270931244,
-0.09147683531045914,
-0.08542010188102722,
0.004380416125059128,
0.4014090299606323,
-0.1010466068983078,
0.5399112701416016,
-0.18143349885940552,
0.07940829545259476,
-0.21309973299503326,
-0.3361155390739441,
-0.023754574358463287,
0.038697920739650726,
0.16656699776649475,
0.06583970040082932,
-0.06527119874954224,
-0.028722116723656654,
-0.3721295893192291,
0.2697659432888031,
-0.32849493622779846,
-0.41694656014442444,
0.010150540620088577,
0.005569486878812313,
-0.041373610496520996,
-0.2417517900466919,
-0.5231000185012817,
-0.24583829939365387,
-0.24573488533496857,
0.3262636065483093,
-0.12526991963386536,
0.0861850455403328,
0.32654526829719543,
-0.0873568058013916,
-0.03417590260505676,
-0.03758108243346214,
0.17869412899017334,
-0.3457043468952179,
0.04664074257016182,
0.05059560760855675,
-0.037713054567575455,
-0.34217044711112976,
-0.0582420714199543,
-0.12461899220943451,
0.16845600306987762,
-0.09012053161859512,
-0.36496520042419434,
0.3040495216846466,
-0.24960626661777496,
0.4348337650299072,
-0.2169634997844696,
0.2921917140483856,
0.18885532021522522,
0.2523486614227295,
-0.12353366613388062,
-0.17840075492858887,
-0.018536606803536415,
0.11483782529830933,
-0.17241984605789185,
0.04445178806781769,
0.11567176878452301,
0.2916903495788574,
-0.27082836627960205,
0.8078600168228149,
0.567090630531311,
0.010566748678684235,
0.20996452867984772,
-0.2143363356590271,
0.35730716586112976,
-0.24757817387580872,
-0.43305084109306335,
-0.2656168043613434,
0.1070939376950264,
0.08138435333967209,
0.09569311887025833,
-0.07953880727291107,
-0.08079012483358383,
0.165753573179245,
-0.18090225756168365,
-0.5866474509239197,
-0.31680312752723694,
0.05581532418727875,
-0.24452462792396545,
0.13247212767601013,
0.08510035276412964,
0.02682138979434967,
0.02931377664208412,
-0.009579697623848915,
-0.026589931920170784,
0.23579058051109314,
-0.005634889006614685,
0.07948309928178787,
-0.15795472264289856,
-0.1649990677833557,
-0.3975366950035095,
0.11815018206834793,
-0.12731097638607025,
0.22699469327926636,
0.0055992491543293,
0.2317032814025879,
0.4163609743118286,
-0.20223034918308258,
0.6757402420043945,
-0.06797878444194794,
0.15607282519340515,
0.09368671476840973,
0.1393202245235443,
-0.12316867709159851,
-0.12032116949558258,
0.07331828773021698,
0.44538408517837524,
0.11786197125911713,
0.12181465327739716,
-0.2651022672653198,
0.012544212862849236,
-0.06745275855064392,
0.2935514748096466,
-0.37997567653656006,
-0.4098847210407257,
-0.14482584595680237,
-0.3187570571899414,
-0.5102415084838867,
-0.01928596943616867,
-0.014501242898404598,
0.24962373077869415,
-0.06267216801643372,
-0.08093225955963135,
-0.2437485009431839,
-0.21549448370933533,
0.014569886028766632,
0.21086353063583374,
0.27314293384552,
0.10071941465139389,
0.6041332483291626,
0.4393422305583954,
-0.1413884460926056,
-0.004228005185723305,
0.7062288522720337,
-0.006802409887313843,
-0.02124302089214325,
-0.2818029224872589,
-0.23563402891159058,
-0.19199004769325256,
0.26794660091400146,
-0.20393751561641693,
0.1777370423078537,
0.07932120561599731,
-0.0019117072224617004,
0.0330994687974453,
-0.19607150554656982,
0.1702939122915268,
-0.1882784515619278,
-0.2366938441991806,
-0.387736976146698,
0.3027290403842926,
-0.12718245387077332,
-0.28448486328125,
0.2639060616493225,
0.13047686219215393,
-0.1688387095928192,
0.3598025441169739,
-0.3438873589038849,
0.8287064433097839,
-0.3545677661895752,
-0.052507881075143814,
-0.15254077315330505,
-0.32351016998291016,
0.2501271367073059,
-0.06685175746679306,
0.022804073989391327,
-0.5010058283805847,
0.06305018812417984,
0.16402894258499146,
-0.06110602617263794,
-0.11040506511926651,
0.00018788501620292664,
-0.2942352592945099,
0.1739930361509323,
-0.05445966124534607,
0.020480146631598473,
-0.15344342589378357,
0.3549315929412842,
0.009145149029791355,
0.21883271634578705,
-0.024583492428064346,
0.10504797101020813,
0.1587527096271515,
0.28873082995414734,
-0.03258873149752617,
-0.03559466078877449,
0.18337853252887726,
-0.5770732164382935,
-0.2792331278324127,
0.10728157311677933,
-0.3708569407463074,
0.5369710326194763,
0.01955554634332657,
-0.25757038593292236,
0.24254202842712402,
0.013072706758975983,
0.2327265441417694,
0.20162998139858246,
-0.052686601877212524,
0.12249159812927246,
0.30050230026245117,
0.10070569068193436,
-0.2253260612487793,
-0.021091118454933167,
-0.1039734035730362,
-0.0016908980906009674,
-0.34438931941986084,
-0.07735247164964676,
-0.07948029786348343,
-0.4005852937698364,
-0.16589543223381042,
0.2631044387817383,
-0.1736072450876236,
-0.010527419857680798,
0.17670296132564545,
-0.05212266743183136,
-0.08903881907463074,
-0.3136577308177948,
0.14975138008594513,
0.1800002157688141,
0.04096671938896179,
0.11198712885379791,
-0.07747384905815125,
-0.17475171387195587,
0.08596822619438171,
0.18168705701828003,
0.37234190106391907,
0.08331795036792755,
0.5415467023849487,
-0.2741074562072754,
-0.010431842878460884,
-0.25238028168678284,
0.08366779237985611,
0.09185899794101715,
-0.7165345549583435,
0.23619845509529114,
-0.3014392554759979,
0.2387854903936386,
0.10115980356931686,
0.4325396716594696,
0.30516594648361206,
0.21366703510284424,
0.040687914937734604,
-0.21698664128780365,
-0.0858248919248581,
-0.09690730273723602,
0.030450809746980667,
0.22586718201637268,
0.007245741784572601,
0.16768516600131989,
-0.08454359322786331,
0.22305843234062195,
-0.32885998487472534,
0.27063480019569397,
-0.08113758265972137,
0.08412647247314453,
-0.004770249128341675,
-0.11927088350057602,
-0.052037883549928665,
-0.04612283781170845,
0.15941838920116425,
0.09487892687320709,
-0.17365913093090057,
-0.23261648416519165,
-0.08967705070972443,
0.13318881392478943,
-0.040019311010837555,
0.13290488719940186,
-0.23253776133060455,
-0.2018628567457199,
0.22113539278507233,
-0.061886660754680634,
0.1928781419992447,
-0.12437930703163147,
0.1366807520389557,
0.03726811707019806,
0.1535419225692749,
0.09993656724691391,
-0.2555326819419861,
0.20247748494148254,
-0.2809893786907196,
0.3246922194957733,
-0.04340460151433945,
0.1691109538078308,
-0.01953461393713951,
-0.04079326614737511,
-0.3310745358467102,
0.04570133984088898,
-0.2060297280550003,
0.08934186398983002,
0.15247440338134766,
-0.27314823865890503,
-0.1586359590291977,
0.40627792477607727,
0.1589524745941162,
0.5390255451202393,
-0.3238687217235565,
0.12484079599380493,
-0.03246559947729111,
0.22078460454940796,
-0.35092979669570923,
-0.15090151131153107,
0.042109422385692596,
0.00991387851536274,
0.23707309365272522,
0.3453666567802429,
0.31186729669570923,
-0.22164107859134674,
-0.10294388234615326,
0.06607065349817276,
0.40315762162208557,
0.01298672053962946,
0.37647372484207153,
0.3809964656829834,
0.29306355118751526,
-0.20264051854610443,
0.293702632188797,
-0.040577370673418045,
0.02685978263616562,
0.5647299885749817,
-0.5716761946678162,
0.09701811522245407,
-0.010053273290395737,
0.2584645450115204,
0.2096129059791565,
-0.13181103765964508,
0.3875576853752136,
0.0626460611820221,
-0.11366920173168182,
0.025414053350687027,
-0.0024651437997817993,
0.16818931698799133,
-0.20091284811496735,
-0.05533197149634361,
-0.08879867941141129,
0.09492488950490952,
-0.18221595883369446,
-0.11947055160999298,
-0.10947694629430771,
-0.2381819486618042,
-0.24145621061325073,
0.12669865787029266,
0.02076023630797863,
0.06687353551387787,
0.17967818677425385,
0.02439623698592186,
-0.3266182541847229,
-0.39246535301208496,
0.21195507049560547,
0.3055470883846283,
0.3821726441383362,
-0.4020869731903076,
0.2971876561641693,
0.4687806963920593,
-0.1085190623998642,
0.18106049299240112,
0.4946078658103943,
0.6445363759994507,
0.23672324419021606,
-0.15139538049697876,
0.21442925930023193,
0.09081362187862396,
-0.15453767776489258,
-0.1945609599351883,
0.10614591836929321,
-0.10233543813228607,
0.18144692480564117,
0.1494649350643158,
0.07850367575883865,
-0.11494795233011246,
-0.10567782819271088,
0.27710387110710144,
0.14482009410858154,
-0.09291373193264008,
0.21856501698493958,
-0.1976519525051117,
-0.1344175934791565,
0.021138932555913925,
0.25088027119636536,
-0.3458344638347626,
0.008823718875646591,
0.3492428958415985,
0.24176819622516632,
0.11992096155881882,
-0.23154881596565247,
0.12837928533554077,
0.034570589661598206,
0.33397507667541504,
0.1753884255886078,
0.051489125937223434,
-0.24770408868789673,
-0.03247537836432457,
-0.6966251134872437,
0.09627169370651245,
-0.439821720123291,
-0.024713389575481415,
0.2195529192686081,
0.38552647829055786,
-0.34562140703201294,
-0.009112562984228134,
0.3729907274246216,
0.0727449357509613,
0.027560293674468994,
0.2396109402179718,
-0.22255215048789978,
-0.0010226890444755554,
0.438416063785553,
-0.25543856620788574,
0.11879047751426697,
-0.42891600728034973,
0.36516374349594116,
-0.36693480610847473,
0.028713546693325043,
-0.15102966129779816,
0.06782539188861847,
0.10201402008533478,
-0.27574723958969116,
0.4158657491207123,
0.08896888792514801,
0.33409810066223145,
-0.005750803276896477,
-0.20173771679401398,
-0.23668605089187622,
-0.16308140754699707,
-0.21888186037540436,
0.29594144225120544,
0.5006555914878845,
0.11525668203830719,
-0.020894356071949005,
-0.4221179783344269,
-0.1788979470729828,
0.22491376101970673,
0.03899494558572769,
-0.07184150815010071,
-0.07915345579385757,
0.057876236736774445,
-0.20155131816864014,
0.16071593761444092,
0.024039585143327713,
0.20760419964790344,
-0.08997783064842224,
0.16524161398410797,
-0.23897947371006012,
-0.6555595397949219,
0.3939448595046997,
-0.1794786900281906,
-0.09075818210840225,
-0.13619464635849,
0.3525639474391937,
0.25183191895484924,
0.07717862725257874,
-0.6191425323486328,
0.2389187216758728,
0.5750241279602051,
-0.22884908318519592,
-0.009729346260428429,
0.1533534824848175,
-0.12989738583564758,
0.04729357734322548,
0.017555713653564453,
-0.07611978054046631,
0.030506938695907593,
-0.29468774795532227,
0.25486093759536743,
-0.3082236647605896
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | Hi! Got same error when loading other dataset:
```python3
load_dataset('wikicorpus', 'raw_en')
```
tb:
```pytb
---------------------------------------------------------------------------
DuplicatedKeysError Traceback (most recent call last)
/opt/conda/lib/python3.8/site-packages/datasets/builder.py in _prepare_split(self, split_generator)
1109 example = self.info.features.encode_example(record)
-> 1110 writer.write(example, key)
1111 finally:
/opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in write(self, example, key, writer_batch_size)
341 if self._check_duplicates:
--> 342 self.check_duplicate_keys()
343 # Re-intializing to empty list for next batch
/opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in check_duplicate_keys(self)
352 if hash in tmp_record:
--> 353 raise DuplicatedKeysError(key)
354 else:
DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 519
Keys should be unique and deterministic in nature
```
Version: datasets==1.11.0 | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 91 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
Hi! Got same error when loading other dataset:
```python3
load_dataset('wikicorpus', 'raw_en')
```
tb:
```pytb
---------------------------------------------------------------------------
DuplicatedKeysError Traceback (most recent call last)
/opt/conda/lib/python3.8/site-packages/datasets/builder.py in _prepare_split(self, split_generator)
1109 example = self.info.features.encode_example(record)
-> 1110 writer.write(example, key)
1111 finally:
/opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in write(self, example, key, writer_batch_size)
341 if self._check_duplicates:
--> 342 self.check_duplicate_keys()
343 # Re-intializing to empty list for next batch
/opt/conda/lib/python3.8/site-packages/datasets/arrow_writer.py in check_duplicate_keys(self)
352 if hash in tmp_record:
--> 353 raise DuplicatedKeysError(key)
354 else:
DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 519
Keys should be unique and deterministic in nature
```
Version: datasets==1.11.0 | [
-0.050657641142606735,
-0.026531465351581573,
-0.09670867025852203,
0.33766764402389526,
0.09382623434066772,
-0.0051852017641067505,
0.2096358835697174,
0.2723235487937927,
0.09786626696586609,
0.08467777073383331,
-0.07676756381988525,
0.3797585666179657,
-0.18557706475257874,
0.1312505006790161,
0.13767696917057037,
0.07047873735427856,
-0.04517357796430588,
0.18325945734977722,
0.13118770718574524,
-0.03421574831008911,
-0.3247789144515991,
0.2772054672241211,
-0.22566159069538116,
0.010591037571430206,
-0.21625156700611115,
-0.14123889803886414,
-0.18521350622177124,
0.23770949244499207,
-0.17053914070129395,
-0.6306675672531128,
0.26207587122917175,
0.20496653020381927,
-0.29320228099823,
0.34949424862861633,
-0.00011318140604998916,
0.18479131162166595,
0.3866313099861145,
-0.022092554718255997,
-0.2522614300251007,
-0.19846384227275848,
-0.09951458126306534,
-0.09471708536148071,
0.08449261635541916,
-0.26559266448020935,
-0.06161140650510788,
-0.12183164805173874,
-0.09808477759361267,
-0.56385338306427,
0.838365375995636,
0.2186897099018097,
0.2488027662038803,
0.17807219922542572,
0.3565174639225006,
-0.2654959261417389,
0.23334375023841858,
-0.17705665528774261,
-0.05736345052719116,
0.39108654856681824,
0.21378886699676514,
-0.04617878794670105,
0.01890081912279129,
0.2944650650024414,
0.15495100617408752,
-0.09455934166908264,
0.4434220492839813,
-0.05743318796157837,
0.07486306130886078,
-0.3529258072376251,
0.2176123857498169,
0.0829743966460228,
0.1021125465631485,
-0.2907669246196747,
-0.22445082664489746,
-0.28230738639831543,
0.05067751184105873,
-0.23370037972927094,
0.3289038836956024,
0.1434280425310135,
-0.22585618495941162,
0.16563250124454498,
-0.008575176820158958,
-0.2514269948005676,
0.011714942753314972,
-0.05793753266334534,
0.0218861922621727,
-0.026316195726394653,
-0.052221305668354034,
0.14106367528438568,
0.18785522878170013,
-0.05148825794458389,
0.2746829092502594,
-0.06660230457782745,
0.03523258864879608,
0.19457240402698517,
-0.5258195400238037,
0.12675626575946808,
-0.04443815350532532,
-0.12129984050989151,
0.23488643765449524,
0.03444917872548103,
0.18185843527317047,
-0.11606644839048386,
0.07464288175106049,
0.002227209508419037,
0.09573128819465637,
0.13079236447811127,
0.014150373637676239,
0.2462751418352127,
0.1825144737958908,
-0.15482206642627716,
-0.248956561088562,
-0.055968135595321655,
-0.18998554348945618,
-0.1946258693933487,
0.3649510145187378,
0.08283349126577377,
0.5289830565452576,
0.08616119623184204,
-0.2361941635608673,
0.13378950953483582,
-0.13450190424919128,
-0.09757987409830093,
0.06428655236959457,
0.3334594964981079,
0.19801217317581177,
-0.3291819989681244,
0.1161266565322876,
0.22787126898765564,
-0.12730862200260162,
-0.19554099440574646,
-0.308086633682251,
-0.08577211201190948,
-0.07301311939954758,
-0.14871034026145935,
0.2354016751050949,
-0.6151368618011475,
0.2906044125556946,
0.24765686690807343,
-0.11066552996635437,
-0.5036491751670837,
0.017825810238718987,
0.10398095846176147,
-0.24194487929344177,
0.0784965455532074,
0.023220937699079514,
0.06665580719709396,
-0.02229573205113411,
-0.23037837445735931,
-0.05989307910203934,
0.16670304536819458,
-0.2588897943496704,
-0.3754645884037018,
-0.06665977835655212,
0.27563443779945374,
0.0991152822971344,
0.10026124119758606,
0.024196475744247437,
0.043532948940992355,
0.22546714544296265,
0.17646732926368713,
-0.019403673708438873,
-0.03149157762527466,
-0.08474040776491165,
-0.25604814291000366,
0.261962890625,
0.6545091271400452,
-0.09670083224773407,
-0.09103354811668396,
-0.17273345589637756,
0.016247276216745377,
0.09784429520368576,
0.3790159821510315,
-0.22284148633480072,
0.42252209782600403,
-0.35173964500427246,
0.15071184933185577,
0.7040380239486694,
-0.19038286805152893,
-0.3690502941608429,
0.1839616596698761,
-0.25062501430511475,
-0.2029017060995102,
0.11253687739372253,
0.01125437393784523,
0.16693085432052612,
0.146094411611557,
0.17363835871219635,
-0.08322148770093918,
0.043769270181655884,
-0.04668642580509186,
-0.3396584391593933,
-0.37856563925743103,
0.11581313610076904,
-0.08098652958869934,
0.19277159869670868,
-0.13967585563659668,
0.2820681035518646,
-0.1008901596069336,
0.10651932656764984,
-0.1311342567205429,
-0.08408820629119873,
0.08526086807250977,
0.23586994409561157,
0.03798000141978264,
0.06104416400194168,
-0.09419252723455429,
-0.4492208957672119,
0.3751952052116394,
-0.2969667315483093,
-0.26010310649871826,
-0.22364221513271332,
-0.2457154393196106,
-0.40403828024864197,
0.13048160076141357,
-0.5598602294921875,
-0.012333739548921585,
0.19536231458187103,
-0.026378460228443146,
0.2334791123867035,
0.09467844665050507,
-0.13282661139965057,
0.18248727917671204,
0.06210895627737045,
0.07866065949201584,
-0.2175978720188141,
0.24315594136714935,
-0.45920801162719727,
-0.06291243433952332,
0.09952767193317413,
0.23008403182029724,
0.3229331076145172,
-0.09376393258571625,
-0.17576825618743896,
0.41196954250335693,
-0.2277357578277588,
-0.0013412386178970337,
-0.00005372241139411926,
-0.13392390310764313,
0.06968814879655838,
-0.3773825764656067,
0.18818148970603943,
0.2873407304286957,
0.17587853968143463,
-0.1463003158569336,
-0.046755991876125336,
0.3089577555656433,
-0.09620356559753418,
0.09824179857969284,
-0.055394455790519714,
-0.03795723617076874,
0.1037118136882782,
-0.11514163017272949,
0.23398670554161072,
-0.12828204035758972,
0.3135370910167694,
-0.33609744906425476,
0.39280465245246887,
0.12522996962070465,
-0.2248097062110901,
0.10922025144100189,
0.28420737385749817,
0.02266097441315651,
0.18944817781448364,
0.027358336374163628,
0.04803730919957161,
-0.1708831787109375,
-0.32294344902038574,
0.2553572952747345,
0.302467405796051,
0.14639027416706085,
-0.1326414793729782,
0.2653287947177887,
0.021454891189932823,
-0.18303196132183075,
0.36226481199264526,
-0.17404814064502716,
-0.10034500807523727,
0.4041171669960022,
0.09082553535699844,
0.027112804353237152,
-0.4047192335128784,
-0.13920211791992188,
0.1715621054172516,
0.11385036259889603,
-0.23784513771533966,
0.0071055106818675995,
-0.15289224684238434,
-0.0564410574734211,
-0.49251818656921387,
0.5608192086219788,
-0.10722987353801727,
-0.12463756650686264,
0.2069612443447113,
0.07199519872665405,
0.15260112285614014,
0.100507453083992,
-0.2353818416595459,
0.15930910408496857,
0.055126555263996124,
0.10801275819540024,
-0.19707831740379333,
-0.08667108416557312,
-0.06144700199365616,
0.021470513194799423,
0.37018856406211853,
-0.10351558029651642,
0.5540131330490112,
-0.18825790286064148,
0.10394137352705002,
-0.23969832062721252,
-0.31827449798583984,
-0.038376420736312866,
0.030102262273430824,
0.1602742224931717,
0.08712109923362732,
-0.027178458869457245,
-0.023796504363417625,
-0.38703787326812744,
0.26636990904808044,
-0.2896522581577301,
-0.4052242934703827,
-0.007430797442793846,
-0.002092708833515644,
-0.02751193940639496,
-0.2106698900461197,
-0.5379366278648376,
-0.2609398663043976,
-0.27030470967292786,
0.3129998743534088,
-0.11990495026111603,
0.08808345347642899,
0.35698556900024414,
-0.04809179902076721,
-0.017287522554397583,
-0.021237144246697426,
0.1838790774345398,
-0.32610082626342773,
0.019795197993516922,
0.03387928754091263,
-0.05857668071985245,
-0.31703779101371765,
-0.0742267519235611,
-0.1409894824028015,
0.17567378282546997,
-0.10759701579809189,
-0.3542789816856384,
0.28636279702186584,
-0.27759602665901184,
0.4044710397720337,
-0.2260822355747223,
0.304744154214859,
0.19684527814388275,
0.25640034675598145,
-0.13573148846626282,
-0.16240337491035461,
-0.02878311648964882,
0.10438737273216248,
-0.17428690195083618,
0.07444815337657928,
0.12340358644723892,
0.3143497705459595,
-0.24399422109127045,
0.801508367061615,
0.6011502146720886,
0.002150345593690872,
0.21924465894699097,
-0.2171153873205185,
0.36667609214782715,
-0.2702764868736267,
-0.44787076115608215,
-0.2633076012134552,
0.10359856486320496,
0.06864312291145325,
0.07861487567424774,
-0.09019716829061508,
-0.07772672176361084,
0.15616077184677124,
-0.17077910900115967,
-0.598370373249054,
-0.3052637577056885,
0.06305938959121704,
-0.25403958559036255,
0.1322242021560669,
0.05929240211844444,
0.009504199028015137,
0.014797210693359375,
0.019924838095903397,
-0.024745307862758636,
0.24369846284389496,
-0.01608889549970627,
0.0968092530965805,
-0.1489831656217575,
-0.1618863344192505,
-0.3931613564491272,
0.13127575814723969,
-0.12905527651309967,
0.21168524026870728,
-0.003910798579454422,
0.23569351434707642,
0.3793339133262634,
-0.2040460705757141,
0.645052969455719,
-0.07904740422964096,
0.14704546332359314,
0.10921630263328552,
0.14356544613838196,
-0.09409947693347931,
-0.10587973892688751,
0.068007692694664,
0.4331165552139282,
0.11259636282920837,
0.10720530897378922,
-0.26087772846221924,
0.043325167149305344,
-0.044213324785232544,
0.29626476764678955,
-0.3561614751815796,
-0.3749850392341614,
-0.15645146369934082,
-0.33203551173210144,
-0.5376155972480774,
-0.01137939840555191,
0.005925614386796951,
0.25770774483680725,
-0.012277103960514069,
-0.08733345568180084,
-0.2434147447347641,
-0.2121431529521942,
0.018419906497001648,
0.1975049376487732,
0.2777840197086334,
0.12205766886472702,
0.5724918842315674,
0.4022446572780609,
-0.14940765500068665,
0.003984199836850166,
0.7032376527786255,
-0.01818951591849327,
-0.026869289577007294,
-0.30098214745521545,
-0.2183612734079361,
-0.18410035967826843,
0.25206953287124634,
-0.18203747272491455,
0.168792724609375,
0.08916614949703217,
0.02567288652062416,
0.021567758172750473,
-0.18311940133571625,
0.1712031215429306,
-0.17534588277339935,
-0.2259693592786789,
-0.40793079137802124,
0.2826690971851349,
-0.1292390674352646,
-0.25152409076690674,
0.279896080493927,
0.13007408380508423,
-0.15422283113002777,
0.36323535442352295,
-0.33521202206611633,
0.8218474388122559,
-0.35328108072280884,
-0.06764590740203857,
-0.1762685477733612,
-0.3206613063812256,
0.25790297985076904,
-0.07196103036403656,
0.02930733934044838,
-0.4959406852722168,
0.054187335073947906,
0.1736242026090622,
-0.05994151532649994,
-0.07638899236917496,
-0.010447762906551361,
-0.3085433542728424,
0.19034111499786377,
-0.05999693274497986,
0.001293092966079712,
-0.16727980971336365,
0.3595791757106781,
-0.01231340877711773,
0.2399490475654602,
-0.013555094599723816,
0.11528351902961731,
0.13412626087665558,
0.2973431348800659,
-0.050401799380779266,
-0.028444111347198486,
0.19192466139793396,
-0.5713022947311401,
-0.30500197410583496,
0.11072985082864761,
-0.36812689900398254,
0.5553815364837646,
-0.008169837296009064,
-0.25084781646728516,
0.23778021335601807,
0.03250467777252197,
0.24731920659542084,
0.2280905693769455,
-0.050532855093479156,
0.10291272401809692,
0.2869983911514282,
0.07142575830221176,
-0.2414252609014511,
-0.013943387195467949,
-0.0804188996553421,
-0.012587979435920715,
-0.3690933287143707,
-0.06204073876142502,
-0.07039139419794083,
-0.4344569444656372,
-0.16714069247245789,
0.24648435413837433,
-0.16944946348667145,
-0.03647821396589279,
0.17225274443626404,
-0.0551472008228302,
-0.09886299073696136,
-0.3119078278541565,
0.14641770720481873,
0.17965556681156158,
0.06238783523440361,
0.10580605268478394,
-0.06828184425830841,
-0.18665221333503723,
0.08057233691215515,
0.15473955869674683,
0.3759067952632904,
0.06330254673957825,
0.5445221662521362,
-0.26286551356315613,
-0.007223125547170639,
-0.24901524186134338,
0.08114989846944809,
0.08624988794326782,
-0.6860800981521606,
0.24781812727451324,
-0.2962562143802643,
0.224041149020195,
0.10877231508493423,
0.41428905725479126,
0.33569592237472534,
0.22327938675880432,
0.08195957541465759,
-0.21509487926959991,
-0.12095089256763458,
-0.07531699538230896,
0.01272650621831417,
0.25212082266807556,
0.005137931555509567,
0.18771196901798248,
-0.04971516504883766,
0.21160559356212616,
-0.33932048082351685,
0.28701552748680115,
-0.09370069205760956,
0.07923369109630585,
-0.01189950481057167,
-0.11922549456357956,
-0.060576435178518295,
-0.013702930882573128,
0.15991124510765076,
0.12080983817577362,
-0.18905343115329742,
-0.2317388951778412,
-0.08219257742166519,
0.12983179092407227,
-0.027276579290628433,
0.1483588069677353,
-0.2258433997631073,
-0.22042931616306305,
0.22166147828102112,
-0.05747104436159134,
0.19284817576408386,
-0.09270447492599487,
0.1492188572883606,
0.04309643432497978,
0.14568684995174408,
0.0988428071141243,
-0.2510840892791748,
0.1975163072347641,
-0.25404131412506104,
0.319479763507843,
-0.057866282761096954,
0.17433993518352509,
0.0008011311292648315,
-0.05304107815027237,
-0.34750455617904663,
0.06111523136496544,
-0.1615903228521347,
0.08229856193065643,
0.1322798728942871,
-0.24983040988445282,
-0.153782457113266,
0.42041242122650146,
0.16114458441734314,
0.502593994140625,
-0.3153907060623169,
0.14377985894680023,
-0.023762226104736328,
0.23356686532497406,
-0.35531195998191833,
-0.13314516842365265,
0.0018799956887960434,
0.013497419655323029,
0.24402636289596558,
0.3504200875759125,
0.2872253954410553,
-0.18267734348773956,
-0.103848397731781,
0.07048061490058899,
0.4004674553871155,
0.007783561944961548,
0.38447079062461853,
0.3722212612628937,
0.2784242331981659,
-0.2335226982831955,
0.28747621178627014,
-0.04316141828894615,
0.05002691596746445,
0.5659113526344299,
-0.565317690372467,
0.10772904753684998,
-0.03380531817674637,
0.24465273320674896,
0.20793597400188446,
-0.11937953531742096,
0.38596111536026,
0.057640619575977325,
-0.12049661576747894,
0.00732942670583725,
-0.0034069493412971497,
0.16657805442810059,
-0.20716437697410583,
-0.056743159890174866,
-0.0929071307182312,
0.08416301012039185,
-0.1766609251499176,
-0.10678964853286743,
-0.08232305943965912,
-0.23169022798538208,
-0.26213139295578003,
0.1127241998910904,
0.030534468591213226,
0.07362990826368332,
0.17963933944702148,
-0.007466144859790802,
-0.34811437129974365,
-0.37859049439430237,
0.20021861791610718,
0.32143229246139526,
0.3671279847621918,
-0.4137479364871979,
0.27059605717658997,
0.47447800636291504,
-0.11668911576271057,
0.17050811648368835,
0.5382393002510071,
0.6460705995559692,
0.23550137877464294,
-0.15614406764507294,
0.2338995486497879,
0.09357090294361115,
-0.15183347463607788,
-0.17701022326946259,
0.07927022874355316,
-0.10903261601924896,
0.17498843371868134,
0.16330620646476746,
0.08514034748077393,
-0.12436231225728989,
-0.11418280005455017,
0.2625711262226105,
0.13800393044948578,
-0.10964290797710419,
0.22173669934272766,
-0.19395697116851807,
-0.10941365361213684,
0.023287609219551086,
0.26535117626190186,
-0.38073039054870605,
0.0055849128402769566,
0.34370288252830505,
0.2179347574710846,
0.10090601444244385,
-0.2297046184539795,
0.1310102343559265,
0.04474456608295441,
0.3138362467288971,
0.18473665416240692,
0.04509395360946655,
-0.253465861082077,
-0.03943004086613655,
-0.7021532654762268,
0.08850806951522827,
-0.43661025166511536,
-0.016315393149852753,
0.18161605298519135,
0.3796532154083252,
-0.33871299028396606,
0.01082075759768486,
0.3618091344833374,
0.07118277996778488,
0.023917250335216522,
0.24039217829704285,
-0.21537993848323822,
-0.00841277465224266,
0.4215865135192871,
-0.25740158557891846,
0.14079861342906952,
-0.4249768853187561,
0.34163230657577515,
-0.3546774685382843,
0.04054342955350876,
-0.14331547915935516,
0.05856822431087494,
0.12317681312561035,
-0.3012676239013672,
0.3987598419189453,
0.1030934602022171,
0.3309641480445862,
-0.017794974148273468,
-0.2310405820608139,
-0.23941585421562195,
-0.17231449484825134,
-0.21470925211906433,
0.28920793533325195,
0.5318422317504883,
0.1468506008386612,
-0.02558698132634163,
-0.430685818195343,
-0.2093372642993927,
0.2462722361087799,
0.049548059701919556,
-0.05833100527524948,
-0.0740971788764,
0.0639461800456047,
-0.18390271067619324,
0.14697521924972534,
0.05750561133027077,
0.2097403109073639,
-0.09274928271770477,
0.19257238507270813,
-0.233194500207901,
-0.6767179369926453,
0.3900068402290344,
-0.1394374519586563,
-0.10639069974422455,
-0.11984994262456894,
0.346855103969574,
0.24570265412330627,
0.08567840605974197,
-0.6321529150009155,
0.2525634169578552,
0.5547972321510315,
-0.2041347622871399,
-0.002626921981573105,
0.14261683821678162,
-0.13998545706272125,
0.024155329912900925,
0.031440239399671555,
-0.05704014003276825,
0.03546897694468498,
-0.27953848242759705,
0.272445410490036,
-0.30171018838882446
] |
https://github.com/huggingface/datasets/issues/2552 | Keys should be unique error on code_search_net | The wikicorpus issue has been fixed by https://github.com/huggingface/datasets/pull/2844
We'll do a new release of `datasets` soon :) | ## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
| 17 | Keys should be unique error on code_search_net
## Describe the bug
Loading `code_search_net` seems not possible at the moment.
## Steps to reproduce the bug
```python
>>> load_dataset('code_search_net')
Downloading: 8.50kB [00:00, 3.09MB/s]
Downloading: 19.1kB [00:00, 10.1MB/s]
No config specified, defaulting to: code_search_net/all
Downloading and preparing dataset code_search_net/all (download: 4.77 GiB, generated: 5.99 GiB, post-processed: Unknown size, total: 10.76 GiB) to /Users/thomwolf/.cache/huggingface/datasets/code_search_net/all/1.0.0/b3e8278faf5d67da1d06981efbeac3b76a2900693bd2239bbca7a4a3b0d6e52a...
Traceback (most recent call last):
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/builder.py", line 1067, in _prepare_split
writer.write(example, key)
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 343, in write
self.check_duplicate_keys()
File "/Users/thomwolf/Documents/GitHub/datasets/src/datasets/arrow_writer.py", line 354, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 48
Keys should be unique and deterministic in nature
```
## Environment info
- `datasets` version: 1.8.1.dev0
- Platform: macOS-10.15.7-x86_64-i386-64bit
- Python version: 3.8.5
- PyArrow version: 2.0.0
The wikicorpus issue has been fixed by https://github.com/huggingface/datasets/pull/2844
We'll do a new release of `datasets` soon :) | [
-0.07428199052810669,
-0.03517982363700867,
-0.08668223023414612,
0.3581606149673462,
0.062325626611709595,
-0.03549294173717499,
0.16847488284111023,
0.2639021873474121,
0.09276558458805084,
0.1236143559217453,
-0.04451490193605423,
0.37844130396842957,
-0.15191587805747986,
0.13472330570220947,
0.11378239095211029,
0.0393819585442543,
-0.0278354212641716,
0.19986549019813538,
0.10081009566783905,
-0.034895576536655426,
-0.3487105965614319,
0.32783961296081543,
-0.28470417857170105,
0.062054719775915146,
-0.27312904596328735,
-0.1773473024368286,
-0.1778876930475235,
0.20071956515312195,
-0.21402813494205475,
-0.6042184233665466,
0.26841163635253906,
0.2027055323123932,
-0.22953401505947113,
0.37931424379348755,
-0.00011121763964183629,
0.1849379986524582,
0.3967280983924866,
-0.009995948523283005,
-0.2528946101665497,
-0.13522152602672577,
-0.05935969948768616,
-0.07992714643478394,
0.11422523856163025,
-0.3115125894546509,
-0.0552833117544651,
-0.10503484308719635,
-0.06629393249750137,
-0.48703423142433167,
0.8415833115577698,
0.24766871333122253,
0.26323965191841125,
0.229117751121521,
0.34773439168930054,
-0.20142033696174622,
0.25884947180747986,
-0.2904577851295471,
-0.08240531384944916,
0.3073556423187256,
0.18800276517868042,
-0.07121814787387848,
-0.025993406772613525,
0.3081960082054138,
0.13076983392238617,
-0.07336254417896271,
0.39158546924591064,
-0.015497968532145023,
0.05701872333884239,
-0.3279976546764374,
0.22982075810432434,
0.1004074364900589,
0.10760079324245453,
-0.27573293447494507,
-0.18306685984134674,
-0.2352980673313141,
0.04565161094069481,
-0.2553216814994812,
0.3790769875049591,
0.10813955217599869,
-0.1849621683359146,
0.16183724999427795,
0.018457993865013123,
-0.1499604880809784,
0.0437137708067894,
-0.0016606971621513367,
-0.05117488279938698,
0.17371425032615662,
-0.032306771725416183,
0.14440926909446716,
0.19394055008888245,
-0.05478774756193161,
0.30418774485588074,
-0.08993149548768997,
0.006631258875131607,
0.18313847482204437,
-0.5206640362739563,
0.11904750764369965,
-0.05583614856004715,
-0.029768750071525574,
0.18824318051338196,
-0.02092471718788147,
0.1625705063343048,
-0.09580119699239731,
0.09991008788347244,
0.018139589577913284,
0.1590428501367569,
0.09955188632011414,
0.05601252242922783,
0.26264849305152893,
0.20377691090106964,
-0.14407064020633698,
-0.28741374611854553,
-0.046757131814956665,
-0.15676183998584747,
-0.1744735687971115,
0.342473566532135,
0.020965082570910454,
0.4984282851219177,
0.08778207004070282,
-0.1772671639919281,
0.0851958766579628,
-0.14820943772792816,
-0.1240130141377449,
0.04194851219654083,
0.36182117462158203,
0.1723591536283493,
-0.23168927431106567,
0.1341058760881424,
0.22108690440654755,
-0.16488908231258392,
-0.0792279914021492,
-0.32584744691848755,
-0.07710909843444824,
-0.04486415907740593,
-0.15089289844036102,
0.25842994451522827,
-0.5565133690834045,
0.3257277309894562,
0.21642708778381348,
-0.05759492516517639,
-0.5052268505096436,
0.06626439094543457,
0.14264285564422607,
-0.25436869263648987,
0.1114756166934967,
0.01455666869878769,
0.09538435190916061,
-0.06990303099155426,
-0.26886963844299316,
-0.03345217555761337,
0.18932697176933289,
-0.2687201499938965,
-0.3343845307826996,
-0.12010887265205383,
0.29002735018730164,
0.09643259644508362,
0.09092845767736435,
-0.003809615969657898,
-0.0060250423848629,
0.1928696632385254,
0.12178361415863037,
0.005275823175907135,
-0.05634385347366333,
-0.09655605256557465,
-0.2477230280637741,
0.25578397512435913,
0.5845024585723877,
-0.03469187766313553,
-0.1073499321937561,
-0.14534425735473633,
-0.047123510390520096,
0.097861647605896,
0.3257710039615631,
-0.256754994392395,
0.44727247953414917,
-0.3528083860874176,
0.26333123445510864,
0.6881005764007568,
-0.2446201890707016,
-0.3804994523525238,
0.09337489306926727,
-0.24632476270198822,
-0.18345408141613007,
0.07955795526504517,
0.052353836596012115,
0.18286675214767456,
0.14908884465694427,
0.11435646563768387,
-0.04427771270275116,
0.10398105531930923,
-0.0017017312347888947,
-0.3555276691913605,
-0.40460214018821716,
0.12093645334243774,
-0.06097344309091568,
0.1574060618877411,
-0.185502827167511,
0.2923007607460022,
-0.07624723017215729,
0.16311438381671906,
-0.13231049478054047,
-0.11666946113109589,
0.04975719004869461,
0.17577853798866272,
0.006018280982971191,
0.06919357180595398,
-0.05372157320380211,
-0.46382951736450195,
0.37117862701416016,
-0.31740227341651917,
-0.24417468905448914,
-0.2198592871427536,
-0.25430041551589966,
-0.4006931185722351,
0.16879574954509735,
-0.5710167288780212,
-0.08225561678409576,
0.23777759075164795,
-0.01406591385602951,
0.19303135573863983,
0.07216641306877136,
-0.1365022212266922,
0.13150334358215332,
0.036937415599823,
0.05503952503204346,
-0.20353680849075317,
0.27332860231399536,
-0.4755399227142334,
-0.09012400358915329,
0.10201150178909302,
0.24868443608283997,
0.37095949053764343,
-0.07316531240940094,
-0.18678218126296997,
0.3989810347557068,
-0.19458024203777313,
0.020065605640411377,
0.020925039425492287,
-0.12162457406520844,
0.05859518051147461,
-0.35962486267089844,
0.1598382592201233,
0.26249414682388306,
0.18729883432388306,
-0.20889174938201904,
-0.05402684211730957,
0.3151094317436218,
-0.0689162015914917,
0.12123111635446548,
-0.07566981017589569,
-0.024524368345737457,
0.110841304063797,
-0.13426196575164795,
0.27048975229263306,
-0.1226503998041153,
0.2525305449962616,
-0.30488574504852295,
0.2955523431301117,
0.13028480112552643,
-0.16170156002044678,
0.12039975821971893,
0.2963661253452301,
-0.016450513154268265,
0.19596239924430847,
-0.01384809985756874,
0.017792783677577972,
-0.18330836296081543,
-0.2783830165863037,
0.26255348324775696,
0.2929568290710449,
0.13898751139640808,
-0.08986799418926239,
0.24674412608146667,
0.058050673454999924,
-0.1775524914264679,
0.37877994775772095,
-0.16103960573673248,
-0.13129036128520966,
0.3710983097553253,
0.0966164767742157,
-0.0010821940377354622,
-0.3934870958328247,
-0.08888857066631317,
0.1221458837389946,
0.11923433095216751,
-0.18380537629127502,
-0.047830574214458466,
-0.14797918498516083,
-0.014187965542078018,
-0.48543283343315125,
0.5594298839569092,
-0.11746850609779358,
-0.20910681784152985,
0.2476031631231308,
0.1139005571603775,
0.14755915105342865,
0.13453079760074615,
-0.20555853843688965,
0.14885133504867554,
0.030920473858714104,
0.07778092473745346,
-0.24337513744831085,
-0.14216089248657227,
-0.08067818731069565,
0.04343554005026817,
0.3722391128540039,
-0.005974755622446537,
0.5033734440803528,
-0.17265929281711578,
0.1110556423664093,
-0.2709157168865204,
-0.36227259039878845,
-0.011248297989368439,
0.06304585933685303,
0.17751544713974,
0.10693664103746414,
0.029936298727989197,
-0.04999683424830437,
-0.47204577922821045,
0.24903535842895508,
-0.3231653869152069,
-0.41801631450653076,
-0.04793500900268555,
0.007551725022494793,
-0.04207223653793335,
-0.20852787792682648,
-0.5222274661064148,
-0.27504250407218933,
-0.2573631703853607,
0.2600230574607849,
-0.020687632262706757,
0.08905060589313507,
0.2367376834154129,
-0.02452520839869976,
0.039469655603170395,
-0.07203813642263412,
0.13146986067295074,
-0.3177734613418579,
0.014496352523565292,
0.08669807761907578,
-0.06115192919969559,
-0.32459449768066406,
-0.03705580160021782,
-0.1435469388961792,
0.20854826271533966,
-0.15188029408454895,
-0.4038959741592407,
0.2215210646390915,
-0.26998889446258545,
0.4851074814796448,
-0.17688965797424316,
0.36833837628364563,
0.239950492978096,
0.2866685092449188,
-0.13563035428524017,
-0.18803924322128296,
-0.08898789435625076,
0.08795582503080368,
-0.212537944316864,
0.09454738348722458,
0.09323598444461823,
0.21514278650283813,
-0.3133164942264557,
0.875482439994812,
0.5419557094573975,
0.01031528040766716,
0.16902777552604675,
-0.2494802176952362,
0.30239564180374146,
-0.2638949155807495,
-0.4015090763568878,
-0.17328009009361267,
0.09191938489675522,
0.10004013776779175,
0.16287890076637268,
-0.08171770721673965,
-0.11434433609247208,
0.12915733456611633,
-0.16514351963996887,
-0.6445288062095642,
-0.34703919291496277,
0.045732282102108,
-0.0895160585641861,
0.054388049989938736,
0.05521737411618233,
0.034782811999320984,
-0.017738614231348038,
-0.00845849048346281,
0.014850042760372162,
0.19849511981010437,
-0.09897350519895554,
0.0816231295466423,
-0.11834646761417389,
-0.0773094892501831,
-0.4334524869918823,
0.14881502091884613,
-0.11072487384080887,
0.20573653280735016,
0.06694741547107697,
0.19185245037078857,
0.3870518207550049,
-0.25349095463752747,
0.59793621301651,
-0.09488265961408615,
0.1620706021785736,
0.11026322841644287,
0.1533282995223999,
-0.019609764218330383,
-0.09426575899124146,
0.024173084646463394,
0.3204041123390198,
0.1508590131998062,
0.06562928855419159,
-0.29992178082466125,
0.008090646006166935,
-0.007951784878969193,
0.27043625712394714,
-0.34704259037971497,
-0.3830889165401459,
-0.18175342679023743,
-0.3612966239452362,
-0.5679572820663452,
-0.038894496858119965,
-0.018003394827246666,
0.2908876836299896,
-0.03977857530117035,
-0.09195605665445328,
-0.28389063477516174,
-0.2085035741329193,
-0.023392193019390106,
0.2433042973279953,
0.2719506323337555,
0.13032788038253784,
0.5048878788948059,
0.37543344497680664,
-0.13174395263195038,
-0.121536985039711,
0.6549915671348572,
0.013014240190386772,
0.07370655983686447,
-0.31995445489883423,
-0.21836210787296295,
-0.17773941159248352,
0.2366454303264618,
-0.20965039730072021,
0.2116488814353943,
0.059678852558135986,
0.03543191775679588,
0.052526481449604034,
-0.13548843562602997,
0.20418183505535126,
-0.15217867493629456,
-0.18117620050907135,
-0.31688183546066284,
0.32768014073371887,
-0.07978576421737671,
-0.2935812175273895,
0.32044726610183716,
0.18301889300346375,
-0.1361525058746338,
0.3454623222351074,
-0.2941657602787018,
0.8646493554115295,
-0.36229509115219116,
-0.011260714381933212,
-0.09502937644720078,
-0.3614700436592102,
0.27833595871925354,
-0.08596144616603851,
0.023506442084908485,
-0.47012025117874146,
0.08905788511037827,
0.15475206077098846,
-0.006573118269443512,
-0.0736728087067604,
-0.01907307654619217,
-0.3405546247959137,
0.16037844121456146,
-0.012533381581306458,
0.06283043324947357,
-0.18613727390766144,
0.33966565132141113,
0.021042179316282272,
0.20697273313999176,
-0.07832182198762894,
0.12335343658924103,
0.10636173188686371,
0.2603197395801544,
-0.06110415607690811,
-0.02623797208070755,
0.21972134709358215,
-0.6053755283355713,
-0.25624486804008484,
0.14158999919891357,
-0.43170562386512756,
0.5209043622016907,
-0.035422150045633316,
-0.19005605578422546,
0.18607380986213684,
0.10642975568771362,
0.20525972545146942,
0.2176424115896225,
-0.07292898744344711,
0.149312362074852,
0.2258947789669037,
0.04728340357542038,
-0.23814982175827026,
0.00044063106179237366,
-0.13662146031856537,
-0.04975409433245659,
-0.38729262351989746,
-0.07264936715364456,
-0.05932052060961723,
-0.43909257650375366,
-0.0948907732963562,
0.3235531449317932,
-0.1323813796043396,
-0.026304662227630615,
0.15091368556022644,
0.020865358412265778,
-0.15813839435577393,
-0.3281894326210022,
0.16401603817939758,
0.14395953714847565,
-0.001902502728626132,
0.10280277580022812,
-0.05737130716443062,
-0.1600804328918457,
0.03994254767894745,
0.20162859559059143,
0.35254549980163574,
-0.02041378617286682,
0.5597220659255981,
-0.22384491562843323,
-0.022203538566827774,
-0.25681763887405396,
0.050539374351501465,
0.07848314940929413,
-0.6631230711936951,
0.19796080887317657,
-0.21696634590625763,
0.1372680813074112,
0.09527022391557693,
0.54434734582901,
0.28491222858428955,
0.23197820782661438,
0.08913418650627136,
-0.23733453452587128,
-0.14456044137477875,
-0.11382395029067993,
0.0212960634380579,
0.28131282329559326,
0.01778475195169449,
0.18478964269161224,
-0.07960577309131622,
0.2442854642868042,
-0.3585904538631439,
0.290946900844574,
-0.15179428458213806,
0.11261683702468872,
0.02358360029757023,
-0.11574804037809372,
-0.04751628264784813,
0.038618091493844986,
0.20428982377052307,
0.13021397590637207,
-0.189231738448143,
-0.25830575823783875,
-0.1250491738319397,
0.11936837434768677,
0.019728027284145355,
0.10222947597503662,
-0.19274093210697174,
-0.19397126138210297,
0.2376624345779419,
-0.09768000990152359,
0.231553316116333,
-0.12627914547920227,
0.12164589762687683,
0.03510672226548195,
0.1617298722267151,
0.13284486532211304,
-0.3004212975502014,
0.13586898148059845,
-0.24065354466438293,
0.31650489568710327,
-0.050689924508333206,
0.13336651027202606,
-0.0060611264780163765,
-0.0459965281188488,
-0.1634320765733719,
0.043340668082237244,
-0.1613435298204422,
0.15626908838748932,
0.13282039761543274,
-0.23505736887454987,
-0.260791152715683,
0.43057823181152344,
0.0915808230638504,
0.5241186022758484,
-0.3124511241912842,
0.07934728264808655,
0.007781016640365124,
0.2575986981391907,
-0.356453537940979,
-0.13531820476055145,
0.12813149392604828,
-0.012900798581540585,
0.24924048781394958,
0.3392423093318939,
0.23726406693458557,
-0.263607382774353,
-0.12545159459114075,
0.07861325144767761,
0.2940695881843567,
-0.1136123389005661,
0.388699471950531,
0.35545146465301514,
0.2433120459318161,
-0.27548837661743164,
0.2628873884677887,
-0.054276566952466965,
0.0325678288936615,
0.5613672733306885,
-0.5922802090644836,
0.20817650854587555,
-0.09405974298715591,
0.2554306983947754,
0.23589059710502625,
-0.09764060378074646,
0.4575885534286499,
0.09535679221153259,
-0.07752393186092377,
0.01879594475030899,
-0.011983588337898254,
0.06843537092208862,
-0.20778028666973114,
-0.015234207734465599,
-0.1346891075372696,
0.0715198665857315,
-0.1995583176612854,
-0.11215518414974213,
-0.0987815111875534,
-0.22263523936271667,
-0.2354942113161087,
0.11056441068649292,
0.0322934091091156,
0.08831459283828735,
0.19896163046360016,
0.026233740150928497,
-0.35412031412124634,
-0.37465107440948486,
0.11732758581638336,
0.2755414545536041,
0.4009861946105957,
-0.396555095911026,
0.26084643602371216,
0.49960774183273315,
-0.10168473422527313,
0.11753241717815399,
0.5371186137199402,
0.605739176273346,
0.24700738489627838,
-0.13427601754665375,
0.21503299474716187,
0.0629090741276741,
-0.14977461099624634,
-0.1834007203578949,
0.10924625396728516,
-0.10839477181434631,
0.18562515079975128,
0.18245136737823486,
0.10806168615818024,
-0.15290963649749756,
-0.1572519838809967,
0.24472638964653015,
0.09841473400592804,
-0.10115773975849152,
0.12194571644067764,
-0.19248747825622559,
-0.1352003514766693,
-0.03995024412870407,
0.29470348358154297,
-0.34553292393684387,
0.07330013811588287,
0.24016554653644562,
0.22332541644573212,
0.14867672324180603,
-0.2627130150794983,
0.13775885105133057,
0.08875538408756256,
0.36421799659729004,
0.18231764435768127,
0.07947461307048798,
-0.2567429840564728,
-0.06625120341777802,
-0.7227296829223633,
0.11547336727380753,
-0.4371536374092102,
-0.05877528339624405,
0.16906359791755676,
0.3498440384864807,
-0.35326799750328064,
0.04509281367063522,
0.35785341262817383,
0.1252625286579132,
0.11363030225038528,
0.20332787930965424,
-0.2470279484987259,
-0.046419668942689896,
0.4598289728164673,
-0.2959713935852051,
0.14752119779586792,
-0.4268786907196045,
0.3193942904472351,
-0.3618772625923157,
0.06441916525363922,
-0.11501546204090118,
0.07191482186317444,
0.06680648028850555,
-0.34835729002952576,
0.3682021498680115,
0.17539441585540771,
0.31024283170700073,
-0.07424916326999664,
-0.18543614447116852,
-0.23999649286270142,
-0.14637696743011475,
-0.23066289722919464,
0.17341628670692444,
0.5155043005943298,
0.18014216423034668,
0.01830640621483326,
-0.34339475631713867,
-0.21217460930347443,
0.19655002653598785,
0.06840071827173233,
-0.005520906765013933,
-0.01965249329805374,
0.059780627489089966,
-0.16449859738349915,
0.14732584357261658,
0.09698653221130371,
0.24170783162117004,
-0.08786818385124207,
0.17695558071136475,
-0.22191926836967468,
-0.6492438912391663,
0.3964179754257202,
-0.22784236073493958,
-0.13658319413661957,
-0.12809407711029053,
0.3268314599990845,
0.20462369918823242,
0.10020623356103897,
-0.6723273396492004,
0.2960066795349121,
0.5039239525794983,
-0.162028968334198,
-0.01901126652956009,
0.14308561384677887,
-0.12363465130329132,
0.008883364498615265,
0.010875392705202103,
-0.02220471203327179,
0.08054085075855255,
-0.25005385279655457,
0.2628275752067566,
-0.3124883770942688
] |
https://github.com/huggingface/datasets/issues/2549 | Handling unlabeled datasets | Hi @nelson-liu,
You can pass the parameter `features` to `load_dataset`: https://huggingface.co/docs/datasets/_modules/datasets/load.html#load_dataset
If you look at the code of the MNLI script you referred in your question (https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py#L62-L77), you can see how the Features were originally specified.
Feel free to use it as a template, customize it and pass it to `load_dataset` using the parameter `features`. | Hi!
Is there a way for datasets to produce unlabeled instances (e.g., the `ClassLabel` can be nullable).
For example, I want to use the MNLI dataset reader ( https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py ) on a file that doesn't have the `gold_label` field. I tried setting `"label": data.get("gold_label")`, but got the following error:
```
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/load.py", line 748, in load_dataset
use_auth_token=use_auth_token,
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 989, in _prepare_split
example = self.info.features.encode_example(record)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 953, in encode_example
return encode_nested_example(self, example)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in encode_nested_example
k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in <dictcomp>
k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 875, in encode_nested_example
return schema.encode_example(obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 653, in encode_example
if not -1 <= example_data < self.num_classes:
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
```
What's the proper way to handle reading unlabeled datasets, especially for downstream usage with Transformers? | 55 | Handling unlabeled datasets
Hi!
Is there a way for datasets to produce unlabeled instances (e.g., the `ClassLabel` can be nullable).
For example, I want to use the MNLI dataset reader ( https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py ) on a file that doesn't have the `gold_label` field. I tried setting `"label": data.get("gold_label")`, but got the following error:
```
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/load.py", line 748, in load_dataset
use_auth_token=use_auth_token,
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/builder.py", line 989, in _prepare_split
example = self.info.features.encode_example(record)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 953, in encode_example
return encode_nested_example(self, example)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in encode_nested_example
k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 848, in <dictcomp>
k: encode_nested_example(sub_schema, sub_obj) for k, (sub_schema, sub_obj) in utils.zip_dict(schema, obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 875, in encode_nested_example
return schema.encode_example(obj)
File "/home/nfliu/miniconda3/envs/debias/lib/python3.7/site-packages/datasets/features.py", line 653, in encode_example
if not -1 <= example_data < self.num_classes:
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
```
What's the proper way to handle reading unlabeled datasets, especially for downstream usage with Transformers?
Hi @nelson-liu,
You can pass the parameter `features` to `load_dataset`: https://huggingface.co/docs/datasets/_modules/datasets/load.html#load_dataset
If you look at the code of the MNLI script you referred in your question (https://github.com/huggingface/datasets/blob/master/datasets/multi_nli/multi_nli.py#L62-L77), you can see how the Features were originally specified.
Feel free to use it as a template, customize it and pass it to `load_dataset` using the parameter `features`. | [
0.05881268158555031,
0.07810084521770477,
0.13162541389465332,
0.327337384223938,
0.250350683927536,
0.13801172375679016,
0.7898841500282288,
-0.15122945606708527,
0.0572318471968174,
0.14990727603435516,
-0.200079083442688,
0.5356737375259399,
-0.26774704456329346,
0.24402286112308502,
-0.16445043683052063,
0.41767314076423645,
-0.1134411171078682,
0.22672808170318604,
0.2766295373439789,
-0.259921133518219,
-0.39652830362319946,
-0.11358895897865295,
-0.32517385482788086,
-0.04578377306461334,
-0.4231288731098175,
-0.23102647066116333,
0.12108080089092255,
-0.01394488662481308,
-0.1970745176076889,
-0.4348157048225403,
0.26062023639678955,
0.26519641280174255,
0.05793658643960953,
0.2684316039085388,
-0.00012031396909151226,
0.005063511431217194,
-0.04861617833375931,
-0.11193075776100159,
-0.41119179129600525,
-0.1604854315519333,
-0.17992162704467773,
-0.11663426458835602,
-0.07564759254455566,
-0.3255850672721863,
-0.17127725481987,
-0.20648425817489624,
-0.007319221273064613,
-0.5275914669036865,
-0.23696373403072357,
0.13000789284706116,
0.02825302816927433,
0.12987935543060303,
-0.2276044636964798,
0.18042506277561188,
0.06623046845197678,
0.11238713562488556,
-0.09830386191606522,
0.042469918727874756,
-0.0031261667609214783,
0.17069920897483826,
0.17617133259773254,
0.456905722618103,
-0.19838464260101318,
0.02518157847225666,
0.23056447505950928,
0.16588963568210602,
-0.2503339350223541,
-0.13525700569152832,
0.045383986085653305,
0.5727463364601135,
0.4895322024822235,
-0.5312574505805969,
-0.8156594634056091,
-0.5682108402252197,
0.5466709136962891,
-0.4145796000957489,
0.009472496807575226,
0.18754978477954865,
0.06129804626107216,
0.20658794045448303,
-0.29481041431427,
-0.06399080157279968,
-0.15351101756095886,
-0.1351511925458908,
-0.21593889594078064,
0.4090191721916199,
0.0057899425737559795,
0.08306810259819031,
0.018688879907131195,
-0.1346999853849411,
0.13504838943481445,
-0.13826178014278412,
-0.047489892691373825,
0.459766685962677,
-0.16651447117328644,
-0.36624836921691895,
-0.18409627676010132,
0.08420845121145248,
0.2371450662612915,
0.1862984448671341,
0.21423006057739258,
-0.11850791424512863,
-0.395049512386322,
0.22885310649871826,
0.46569302678108215,
-0.11148926615715027,
0.2576119005680084,
0.2515024244785309,
0.40256744623184204,
-0.15630629658699036,
-0.10253769159317017,
-0.051096588373184204,
-0.35545510053634644,
0.19819200038909912,
0.30898067355155945,
0.0072211576625704765,
0.013051982969045639,
-0.23791328072547913,
-0.3461008667945862,
0.054075583815574646,
-0.2671501636505127,
0.12011484801769257,
0.06623422354459763,
0.10982722043991089,
0.15512394905090332,
0.1306726336479187,
0.004376251250505447,
0.08551523834466934,
-0.09754763543605804,
-0.5176505446434021,
0.08808384090662003,
-0.037778161466121674,
0.09490028023719788,
0.019529106095433235,
0.11884745955467224,
0.12528951466083527,
0.2857372462749481,
-0.012796883471310139,
0.007732465863227844,
-0.07526431977748871,
0.19773703813552856,
-0.1479921191930771,
0.10008108615875244,
0.10786532610654831,
0.13979125022888184,
0.26051634550094604,
-0.09571288526058197,
-0.5286997556686401,
-0.09421778470277786,
0.20753127336502075,
-0.039046429097652435,
0.011887859553098679,
-0.12860465049743652,
0.0225008986890316,
-0.4288027286529541,
-0.2167237401008606,
-0.03753211349248886,
0.042732324451208115,
-0.024933941662311554,
-0.04784901812672615,
0.145517960190773,
-0.2070300281047821,
0.15218131244182587,
-0.17658878862857819,
0.17796273529529572,
0.39383524656295776,
-0.5988755226135254,
-0.3255685567855835,
-0.010792296379804611,
-0.06817145645618439,
-0.2921350598335266,
-0.023587089031934738,
-0.021993381902575493,
0.1814175844192505,
-0.1385190486907959,
-0.05776901915669441,
0.11283721774816513,
-0.42545443773269653,
-0.24442121386528015,
0.032657135277986526,
0.01700415462255478,
0.027566643431782722,
0.12155972421169281,
0.4517727792263031,
-0.1504073590040207,
0.021428817883133888,
-0.05603089928627014,
0.04555198550224304,
-0.05172024667263031,
-0.362841933965683,
-0.0019084736704826355,
-0.1636175811290741,
0.026848025619983673,
0.13029737770557404,
0.08976824581623077,
0.21372422575950623,
0.09895871579647064,
0.24636714160442352,
0.011098220944404602,
-0.38540467619895935,
0.17423860728740692,
0.3612046241760254,
0.30092883110046387,
0.07717976719141006,
0.08266468346118927,
-0.2592618763446808,
-0.5924980044364929,
0.3575682044029236,
-0.3484366536140442,
0.15436923503875732,
0.07911737263202667,
-0.5093021988868713,
0.16607725620269775,
-0.19756923615932465,
-0.207683727145195,
-0.049188319593667984,
-0.030853206291794777,
-0.05166836082935333,
-0.0010140445083379745,
-0.013430098071694374,
-0.4805208146572113,
-0.2239590734243393,
-0.06846360117197037,
0.18670669198036194,
-0.2691115140914917,
-0.11771152913570404,
0.442250519990921,
-0.015584957785904408,
-0.2933371067047119,
0.36340320110321045,
0.0749591737985611,
-0.04759756103157997,
0.24787291884422302,
0.18064242601394653,
0.07927817851305008,
-0.015622876584529877,
0.10707736015319824,
0.2868713140487671,
0.024186372756958008,
0.10356755554676056,
-0.10186228901147842,
0.0068805888295173645,
0.0740690752863884,
-0.04788203537464142,
-0.37048405408859253,
0.758538544178009,
-0.014359690248966217,
0.2423819601535797,
0.0692150667309761,
-0.03607356175780296,
0.2637822926044464,
-0.10884594172239304,
0.005920654162764549,
-0.3193681538105011,
-0.15114590525627136,
-0.09762279689311981,
0.2514321506023407,
0.26002001762390137,
-0.4639051854610443,
0.07237014919519424,
0.1971781998872757,
-0.03416382521390915,
0.19322049617767334,
-0.2416764795780182,
-0.4811055660247803,
0.4233584702014923,
0.053469836711883545,
0.29502126574516296,
0.20300883054733276,
0.22683921456336975,
0.15597641468048096,
0.08881539106369019,
0.15867258608341217,
-0.020764654502272606,
0.22150297462940216,
0.06502058357000351,
0.16061589121818542,
0.2593626379966736,
-0.07050972431898117,
-0.20326370000839233,
0.02458929270505905,
-0.08984437584877014,
0.12402787059545517,
0.13066232204437256,
-0.30019229650497437,
0.04328002780675888,
-0.4224674701690674,
-0.29374027252197266,
-0.2737036645412445,
0.1452568769454956,
-0.3171307146549225,
0.0007477076724171638,
0.14564085006713867,
0.14954715967178345,
-0.07817794382572174,
0.03619387000799179,
-0.2981939911842346,
0.2971682846546173,
-0.1557236909866333,
-0.22954152524471283,
0.12758389115333557,
-0.1776762306690216,
-0.1574133336544037,
0.01099853590130806,
0.09593363106250763,
-0.22388336062431335,
0.20409442484378815,
0.12711307406425476,
-0.17500954866409302,
-0.08771831542253494,
-0.09407806396484375,
0.13978180289268494,
0.16984237730503082,
0.41882726550102234,
0.33861038088798523,
-0.2351503223180771,
-0.013696981593966484,
0.45739349722862244,
0.16092605888843536,
0.16494926810264587,
0.026714259758591652,
-0.27068397402763367,
-0.0651543140411377,
0.40006789565086365,
-0.1524951308965683,
-0.2732079327106476,
-0.082176573574543,
-0.10397948324680328,
0.16004496812820435,
0.10930703580379486,
0.14936894178390503,
0.1068684533238411,
-0.3497602939605713,
0.13596515357494354,
0.08972061425447464,
-0.23191314935684204,
0.24571166932582855,
-0.3874407410621643,
0.45120126008987427,
-0.12772820889949799,
0.08416207134723663,
0.24347582459449768,
-0.1037120670080185,
0.1409984976053238,
0.11124096065759659,
-0.155796617269516,
0.05341029539704323,
0.45831772685050964,
-0.2154121994972229,
0.15661907196044922,
-0.0838332548737526,
0.018585868179798126,
0.2560117244720459,
0.13519257307052612,
-0.2604406476020813,
0.08819939196109772,
0.11302027106285095,
-0.30009937286376953,
0.01625289022922516,
0.2324886918067932,
-0.23710966110229492,
0.3170672357082367,
0.29865187406539917,
0.29561010003089905,
-0.05841146036982536,
0.034877900034189224,
-0.12118463963270187,
0.31431928277015686,
0.3201858699321747,
0.09341371804475784,
-0.19460642337799072,
0.29618415236473083,
-0.11297409236431122,
0.35180625319480896,
0.1224236860871315,
0.1934313029050827,
-0.08926677703857422,
0.22569993138313293,
-0.3296513855457306,
-0.13330163061618805,
-0.16140718758106232,
-0.09046447277069092,
0.08846268057823181,
-0.009233105927705765,
0.18539348244667053,
-0.12363237142562866,
-0.14744418859481812,
-0.05479525402188301,
-0.02283822000026703,
0.31907472014427185,
0.09619690477848053,
-0.5007603168487549,
-0.3644501268863678,
0.0005033314228057861,
0.18054944276809692,
0.0882222130894661,
0.17232497036457062,
0.11418664455413818,
0.13562196493148804,
0.24447377026081085,
0.2311139851808548,
0.3968508839607239,
-0.8019368648529053,
0.044076647609472275,
0.38825803995132446,
0.06234490126371384,
-0.12986525893211365,
0.16887138783931732,
-0.3431433141231537,
0.057610683143138885,
-0.08606617152690887,
0.3440918028354645,
-0.28485140204429626,
-0.0774766206741333,
0.25390946865081787,
0.11061453074216843,
-0.39143696427345276,
-0.24144397675991058,
-0.0032646581530570984,
-0.008606914430856705,
-0.09261177480220795,
-0.0796569362282753,
-0.10775536298751831,
0.22462962567806244,
-0.21439766883850098,
-0.0325562059879303,
-0.46363574266433716,
0.38664510846138,
0.32308173179626465,
0.05738602951169014,
0.08292047679424286,
-0.09893297404050827,
0.2488308846950531,
0.4137296676635742,
0.29539573192596436,
0.5238579511642456,
0.5176033973693848,
-0.150774285197258,
-0.3284546434879303,
-0.22574594616889954,
-0.05021031200885773,
0.44243282079696655,
-0.09076434373855591,
0.14964918792247772,
0.23192179203033447,
0.10238583385944366,
-0.15363620221614838,
-0.09592390060424805,
-0.10067030042409897,
0.043471187353134155,
-0.09506171196699142,
-0.43509504199028015,
-0.5098009705543518,
0.3801499307155609,
0.13622543215751648,
-0.056705545634031296,
0.2898107171058655,
0.2649095952510834,
-0.4261872470378876,
0.027488820254802704,
0.3192902207374573,
0.7659415602684021,
-0.1236860454082489,
0.0004800930619239807,
-0.21366247534751892,
0.016464203596115112,
0.8572256565093994,
-0.19481374323368073,
0.13718873262405396,
-0.5271185636520386,
0.12725059688091278,
-0.08300308883190155,
0.058412980288267136,
0.278956800699234,
0.6903201937675476,
0.3886287212371826,
0.36880797147750854,
-0.12278565764427185,
0.1099550873041153,
-0.07249879091978073,
-0.012737240642309189,
-0.02764349989593029,
-0.29114657640457153,
-0.03177706152200699,
-0.054518312215805054,
0.028933215886354446,
0.07180353254079819,
-0.19770172238349915,
-0.02074078656733036,
0.03869045898318291,
0.1972527652978897,
0.13418376445770264,
-0.18537822365760803,
-0.2127627283334732,
-0.2364000827074051,
-0.09990860521793365,
-0.24124416708946228,
0.0070269349962472916,
0.5078392028808594,
0.4107731580734253,
0.23004068434238434,
-0.1023254543542862,
0.15624631941318512,
-0.038485489785671234,
0.20107029378414154,
0.08045332878828049,
0.18423086404800415,
0.4358699321746826,
0.19543853402137756,
-0.2531316876411438,
-0.010719344019889832,
0.04840845242142677,
0.13019061088562012,
0.2571742534637451,
-0.19828151166439056,
0.22116106748580933,
-0.04843679443001747,
0.19678270816802979,
-0.261872798204422,
0.21731913089752197,
-0.19286131858825684,
0.0032553207129240036,
0.15397179126739502,
-0.24096271395683289,
0.08613520115613937,
-0.24228106439113617,
-0.20541206002235413,
-0.1147632896900177,
0.38115647435188293,
0.2263907492160797,
0.07088652998209,
0.27347856760025024,
-0.0664193332195282,
-0.09725113958120346,
-0.18722331523895264,
0.47046536207199097,
0.21588134765625,
-0.26480090618133545,
0.36447399854660034,
0.5038290619850159,
0.13767127692699432,
-0.028563879430294037,
-0.002772364765405655,
-0.1975712925195694,
0.05436871945858002,
-0.27843958139419556,
-0.27063512802124023,
-0.1602131873369217,
0.08875624090433121,
-0.023679722100496292,
0.1900789588689804,
0.18556904792785645,
-0.013427229598164558,
-0.13257624208927155,
-0.2978604733943939,
-0.16173604130744934,
-0.05990701913833618,
-0.41927370429039,
0.09813125431537628,
0.2057618498802185,
0.6343888640403748,
-0.026271460577845573,
0.0019228830933570862,
0.012562470510601997,
-0.038064680993556976,
0.20531098544597626,
-0.033573735505342484,
-0.33604559302330017,
0.21074527502059937,
0.2821721136569977,
0.10856197029352188,
0.3158653676509857,
-0.20679116249084473,
-0.15487365424633026,
-0.3689013719558716,
0.248153418302536,
0.24958199262619019,
0.13858196139335632,
0.4728972911834717,
-0.11202171444892883,
0.22983750700950623,
-0.6494522094726562,
0.17177805304527283,
0.14083227515220642,
-0.0035500898957252502,
0.10426253080368042,
0.26186642050743103,
0.20792444050312042,
0.15740394592285156,
0.036341167986392975,
-0.017238885164260864,
0.03673730790615082,
-0.11508803814649582,
0.25086653232574463,
-0.41414427757263184,
0.23393666744232178,
0.3280196785926819,
0.39375919103622437,
-0.055021919310092926,
-0.1032528281211853,
0.04858321696519852,
0.5089668035507202,
0.050813592970371246,
-0.36740240454673767,
-0.17841725051403046,
0.2600318193435669,
-0.17138086259365082,
0.23197013139724731,
0.5777535438537598,
0.2352411448955536,
0.18417230248451233,
-0.266929566860199,
-0.24250903725624084,
0.10802854597568512,
-0.18195849657058716,
0.218917578458786,
0.5804857015609741,
0.05954662337899208,
0.014201384037733078,
0.1537601202726364,
0.20755620300769806,
0.3028896152973175,
0.6620517373085022,
0.07444925606250763,
0.5605970025062561,
0.11121673136949539,
-0.23775625228881836,
0.014271050691604614,
-0.4676462411880493,
0.10253452509641647,
0.013335645198822021,
0.19292885065078735,
0.2917953133583069,
-0.2008618414402008,
0.040089525282382965,
-0.5066403746604919,
-0.11073038727045059,
0.08421966433525085,
0.037196505814790726,
-0.2296023666858673,
-0.13904689252376556,
-0.41249728202819824,
-0.11785198748111725,
0.10286670923233032,
0.05359980836510658,
-0.03898681327700615,
-0.39786702394485474,
-0.21438536047935486,
-0.15252681076526642,
0.08402400463819504,
-0.4460488259792328,
0.12576478719711304,
0.24236133694648743,
0.3388938903808594,
-0.24756251275539398,
-0.1468476951122284,
0.04466783255338669,
0.16136100888252258,
0.33502304553985596,
0.321445107460022,
-0.16340996325016022,
0.06590545922517776,
0.09081046283245087,
-0.02730470523238182,
-0.34063079953193665,
0.006546003744006157,
-0.09651660919189453,
0.005317434668540955,
-0.2625389099121094,
-0.025657646358013153,
0.21667951345443726,
-0.06087178736925125,
-0.026612572371959686,
-0.26950716972351074,
0.3386768698692322,
0.0509655624628067,
-0.31946972012519836,
0.32659369707107544,
-0.08152325451374054,
-0.35622790455818176,
-0.16186755895614624,
-0.03436773270368576,
-0.032683830708265305,
-0.16921862959861755,
0.2405823916196823,
0.1130356714129448,
0.06356006860733032,
0.17488797008991241,
0.02924979105591774,
-0.04388390854001045,
0.15956196188926697,
-0.06912942230701447,
-0.1020607277750969,
-0.09722205996513367,
0.18644003570079803,
-0.7694792151451111,
0.07225926965475082,
-0.040622781962156296,
-0.2358599454164505,
-0.05145949870347977,
0.048080749809741974,
-0.07592643052339554,
-0.1725054681301117,
0.03122926503419876,
0.13078920543193817,
0.39044126868247986,
0.45536988973617554,
-0.19306796789169312,
-0.4410228133201599,
-0.22983981668949127,
-0.12800179421901703,
-0.12298189103603363,
-0.4427226185798645,
-0.12424853444099426,
-0.10683596879243851,
-0.2093498706817627,
0.12406688183546066,
0.20935997366905212,
0.11918091773986816,
-0.03327842801809311,
0.38787779211997986,
0.07908392697572708,
0.4218621551990509,
0.17517685890197754,
0.03342889994382858,
-0.04182370379567146,
0.10801973938941956,
-0.3931533992290497,
0.1997743844985962,
0.05572018772363663,
0.1888764500617981,
-0.3027551770210266,
-0.1966567039489746,
-0.19703876972198486,
-0.001500347862020135,
-0.11536379158496857,
0.12050861865282059,
-0.40371307730674744,
0.17163752019405365,
-0.5385050177574158,
0.2350149005651474,
0.23443782329559326,
0.008413199335336685,
-0.02640470862388611,
0.05647486448287964,
-0.3050256371498108,
-0.10135955363512039,
0.3029196858406067,
-0.44553235173225403,
-0.024037640541791916,
-0.11989620327949524,
0.4738294184207916,
0.35640624165534973,
-0.20600134134292603,
-0.5122573375701904,
0.19805908203125,
0.6573610901832581,
0.0719359815120697,
0.07625821232795715,
-0.170579195022583,
-0.30978474020957947,
-0.08850739896297455,
-0.15108977258205414,
-0.2408013641834259,
0.02443220466375351,
0.010371377691626549,
0.21131953597068787,
-0.13594654202461243
] |
https://github.com/huggingface/datasets/issues/2548 | Field order issue in loading json | Hi @luyug, thanks for reporting.
The good news is that we fixed this issue only 9 days ago: #2507.
The patch is already in the master branch of our repository and it will be included in our next `datasets` release version 1.9.0.
Feel free to reopen the issue if the problem persists. | ## Describe the bug
The `load_dataset` function expects columns in alphabetical order when loading json files.
Similar bug was previously reported for csv in #623 and fixed in #684.
## Steps to reproduce the bug
For a json file `j.json`,
```
{"c":321, "a": 1, "b": 2}
```
Running the following,
```
f= datasets.Features({'a': Value('int32'), 'b': Value('int32'), 'c': Value('int32')})
json_data = datasets.load_dataset('json', data_files='j.json', features=f)
```
## Expected results
A successful load.
## Actual results
```
File "pyarrow/table.pxi", line 1409, in pyarrow.lib.Table.cast
ValueError: Target schema's field names are not matching the table's field names: ['c', 'a', 'b'], ['a', 'b', 'c']
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyArrow version: 3.0.0
| 52 | Field order issue in loading json
## Describe the bug
The `load_dataset` function expects columns in alphabetical order when loading json files.
Similar bug was previously reported for csv in #623 and fixed in #684.
## Steps to reproduce the bug
For a json file `j.json`,
```
{"c":321, "a": 1, "b": 2}
```
Running the following,
```
f= datasets.Features({'a': Value('int32'), 'b': Value('int32'), 'c': Value('int32')})
json_data = datasets.load_dataset('json', data_files='j.json', features=f)
```
## Expected results
A successful load.
## Actual results
```
File "pyarrow/table.pxi", line 1409, in pyarrow.lib.Table.cast
ValueError: Target schema's field names are not matching the table's field names: ['c', 'a', 'b'], ['a', 'b', 'c']
```
## Environment info
- `datasets` version: 1.8.0
- Platform: Linux-3.10.0-957.1.3.el7.x86_64-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyArrow version: 3.0.0
Hi @luyug, thanks for reporting.
The good news is that we fixed this issue only 9 days ago: #2507.
The patch is already in the master branch of our repository and it will be included in our next `datasets` release version 1.9.0.
Feel free to reopen the issue if the problem persists. | [
0.18250931799411774,
0.23169323801994324,
-0.01592763513326645,
0.21059904992580414,
0.3290192484855652,
-0.06300390511751175,
0.22351808845996857,
0.42885416746139526,
0.009034659713506699,
0.02266862988471985,
0.07545331865549088,
0.6574714779853821,
0.3253485858440399,
-0.012466179206967354,
-0.02451043576002121,
-0.10777133703231812,
-0.0028555095195770264,
0.24041375517845154,
-0.09283347427845001,
0.09579335153102875,
-0.35949888825416565,
0.07109860330820084,
-0.16953016817569733,
0.18436969816684723,
0.11274413764476776,
0.20500533282756805,
0.14214955270290375,
0.16889315843582153,
-0.1974489688873291,
-0.4280342757701874,
-0.11631616950035095,
0.16036595404148102,
0.04091281443834305,
0.1538207232952118,
-0.00011294231080682948,
-0.09300289303064346,
0.20570893585681915,
0.04409652203321457,
-0.161719411611557,
-0.4524683952331543,
-0.1871803104877472,
-0.24865657091140747,
0.15464767813682556,
-0.22711873054504395,
-0.03967377915978432,
-0.2239810973405838,
-0.06031157076358795,
0.055517494678497314,
0.1781316101551056,
0.09546744078397751,
0.1913653165102005,
0.12153810262680054,
0.1931038647890091,
0.18931515514850616,
0.5152662396430969,
-0.002020135521888733,
-0.11110907793045044,
0.27563178539276123,
0.18469944596290588,
-0.009423830546438694,
-0.07582540065050125,
0.032488610595464706,
-0.18140177428722382,
0.03186914697289467,
0.15601694583892822,
0.14833872020244598,
-0.04252628982067108,
0.08741337805986404,
-0.0994679257273674,
0.04869468882679939,
0.5981529355049133,
-0.4596152603626251,
-0.2934252619743347,
-0.200738787651062,
0.1998673528432846,
-0.29574769735336304,
0.5075796842575073,
0.15621700882911682,
0.22865909337997437,
0.05136702209711075,
0.014212718233466148,
0.28566697239875793,
-0.18504464626312256,
0.10232499241828918,
-0.15684279799461365,
0.1329464614391327,
0.05154167488217354,
-0.021950744092464447,
-0.1376313418149948,
-0.2529481053352356,
0.363964706659317,
-0.22733160853385925,
-0.1900900900363922,
0.1349729746580124,
-0.34934288263320923,
0.050397150218486786,
0.13581997156143188,
-0.07097060233354568,
0.15239349007606506,
0.111217200756073,
-0.05166751891374588,
0.01568279042840004,
0.02225630357861519,
0.17301902174949646,
0.20251423120498657,
0.17984755337238312,
0.04751715809106827,
-0.0730152279138565,
0.19679386913776398,
0.0729975774884224,
-0.06295868009328842,
-0.0940551683306694,
-0.01236664317548275,
-0.19510182738304138,
-0.010318074375391006,
0.04089607670903206,
0.06091500073671341,
-0.08401018381118774,
-0.2918551564216614,
0.0429290272295475,
-0.12454797327518463,
-0.19080068171024323,
-0.0035286089405417442,
0.31327155232429504,
-0.07519462704658508,
0.09490175545215607,
0.09292930364608765,
0.23631088435649872,
0.013990970328450203,
-0.007100330200046301,
-0.06574015319347382,
-0.1489693820476532,
-0.022936126217246056,
0.11514858156442642,
0.21638374030590057,
0.1122143417596817,
0.13066479563713074,
0.35090988874435425,
0.07153554260730743,
-0.054367780685424805,
-0.04788293316960335,
-0.12655259668827057,
-0.13245025277137756,
0.4157489240169525,
0.054799970239400864,
0.18281958997249603,
-0.08143861591815948,
-0.17506664991378784,
-0.26668083667755127,
0.37418729066848755,
-0.4962206482887268,
-0.10935913771390915,
-0.05799894034862518,
0.2085764855146408,
-0.1713588386774063,
-0.12544940412044525,
-0.6543220281600952,
-0.1421353816986084,
0.029426217079162598,
-0.29143011569976807,
-0.0671941414475441,
-0.14493410289287567,
0.1742362380027771,
-0.24617615342140198,
-0.13340196013450623,
0.031241700053215027,
-0.5555406212806702,
0.08913861215114594,
0.09023822098970413,
0.05204950273036957,
-0.006754651665687561,
-0.04320317879319191,
-0.132981076836586,
0.11145507544279099,
-0.07285584509372711,
0.44256502389907837,
0.08269132673740387,
-0.20958563685417175,
-0.35455143451690674,
0.10031222552061081,
-0.18329012393951416,
0.15646140277385712,
0.08736871927976608,
0.008005247451364994,
0.14736178517341614,
0.059487808495759964,
0.08623960614204407,
0.3296467661857605,
0.12091419845819473,
0.3840731680393219,
-0.14933094382286072,
-0.1144723892211914,
0.17720332741737366,
0.2748941481113434,
-0.37066370248794556,
0.056112129241228104,
0.10174182057380676,
-0.3683662414550781,
0.1644265353679657,
-0.23298940062522888,
-0.2976110875606537,
0.26510104537010193,
0.1385202705860138,
0.10466945171356201,
0.2926071882247925,
0.024906519800424576,
-0.4560874104499817,
0.2608807682991028,
0.02395203337073326,
-0.039832063019275665,
-0.5410386919975281,
-0.11113005876541138,
-0.022123169153928757,
0.03735408931970596,
-0.21534524857997894,
0.43300917744636536,
0.10824060440063477,
0.0037273019552230835,
-0.2064831405878067,
-0.09937387704849243,
-0.00009862333536148071,
0.015966137871146202,
-0.16618195176124573,
0.04724887013435364,
-0.3866337537765503,
0.45441141724586487,
-0.2604229748249054,
-0.14140383899211884,
0.15882721543312073,
0.03246573358774185,
0.2302996814250946,
-0.2600088119506836,
-0.1451413333415985,
0.29565563797950745,
0.28537699580192566,
0.06752466410398483,
-0.2429714798927307,
0.05124315619468689,
-0.014985421672463417,
0.05174766853451729,
-0.14206650853157043,
0.13240982592105865,
0.014406354166567326,
-0.009370185434818268,
-0.08598960191011429,
0.799530565738678,
-0.023749005049467087,
0.21288150548934937,
0.003328099846839905,
-0.367609441280365,
0.3820784389972687,
0.03520115837454796,
0.016442978754639626,
-0.06941579282283783,
0.3017960488796234,
0.5649799108505249,
-0.11086635291576385,
0.2574889659881592,
-0.3607690632343292,
0.10424034297466278,
0.9411554932594299,
-0.12532375752925873,
-0.10560498386621475,
0.07312951236963272,
0.20902878046035767,
0.01626041904091835,
0.09639644622802734,
-0.16287611424922943,
0.37604427337646484,
0.1892881989479065,
-0.6180866360664368,
-0.06494942307472229,
0.011362679302692413,
-0.1525392085313797,
0.073422372341156,
-0.02440747618675232,
0.2099515050649643,
0.3989829421043396,
0.4225432276725769,
0.09752211719751358,
-0.3893832266330719,
-0.17331542074680328,
0.10601459443569183,
0.08761022984981537,
-0.6017727851867676,
0.06339690089225769,
-0.36231163144111633,
0.02378039062023163,
-0.11683641374111176,
-0.2730722725391388,
-0.20274220407009125,
-0.007554568350315094,
0.023827198892831802,
0.26535362005233765,
-0.18599112331867218,
0.2071104496717453,
0.13841024041175842,
0.03891187906265259,
0.07045621424913406,
-0.3349531292915344,
-0.5142762064933777,
-0.07790493965148926,
-0.17774668335914612,
0.013232357800006866,
0.1084141805768013,
0.05679953098297119,
0.016167599707841873,
-0.11167803406715393,
-0.058041322976350784,
0.06246146559715271,
-0.5082747936248779,
-0.020823687314987183,
-0.2801712155342102,
0.059862129390239716,
0.04909256473183632,
0.21726369857788086,
0.07198630273342133,
-0.3592025339603424,
0.28286057710647583,
0.16797417402267456,
-0.42801281809806824,
0.5928491950035095,
-0.17546087503433228,
-0.21203050017356873,
-0.1437625288963318,
-0.4086640179157257,
0.1344606876373291,
-0.18354485929012299,
0.25756600499153137,
0.284777969121933,
0.1752568483352661,
-0.1098794937133789,
-0.10369996726512909,
-0.3340316116809845,
-0.09109898656606674,
0.029377717524766922,
-0.03264613822102547,
-0.0653819739818573,
0.33053773641586304,
-0.14144249260425568,
-0.27825888991355896,
-0.030518699437379837,
-0.057918448001146317,
-0.31052932143211365,
0.05353951081633568,
-0.30148231983184814,
-0.08572303503751755,
-0.09332555532455444,
0.41133686900138855,
0.06182698905467987,
-0.171806201338768,
0.16759809851646423,
0.12542952597141266,
-0.022411203011870384,
-0.023789599537849426,
-0.08579026162624359,
-0.07173224538564682,
0.37144190073013306,
0.11087126284837723,
-0.14004191756248474,
0.6356086134910583,
-0.0889730304479599,
0.28902843594551086,
-0.20675960183143616,
0.06432433426380157,
0.2238408625125885,
-0.14829421043395996,
-0.08798307180404663,
-0.20371407270431519,
0.16536502540111542,
-0.051077280193567276,
-0.08647143840789795,
0.2216326892375946,
0.2641667425632477,
-0.026378057897090912,
-0.053821973502635956,
0.14184518158435822,
0.2738380432128906,
-0.45086413621902466,
-0.0728437677025795,
0.15997126698493958,
-0.006057072430849075,
-0.0755457952618599,
0.12508711218833923,
0.06175415217876434,
-0.18851374089717865,
-0.22364333271980286,
0.06741581857204437,
-0.03343401849269867,
-0.15573084354400635,
-0.25950533151626587,
-0.3962622582912445,
-0.34874242544174194,
0.012231580913066864,
0.006136000156402588,
0.10842588543891907,
0.14936089515686035,
0.26576632261276245,
0.12754109501838684,
0.25149571895599365,
-0.22384682297706604,
0.7247185111045837,
0.16592930257320404,
0.2741289734840393,
0.17980338633060455,
0.26240992546081543,
-0.2966652810573578,
-0.18689335882663727,
-0.1661117672920227,
0.025356054306030273,
0.010843977332115173,
0.5456571578979492,
-0.4508350193500519,
-0.062419820576906204,
0.09055768698453903,
0.15795330703258514,
-0.10830004513263702,
-0.4663443863391876,
-0.454072505235672,
-0.15359856188297272,
-0.022328367456793785,
-0.1013701930642128,
-0.13076747953891754,
0.28077173233032227,
-0.50676029920578,
-0.11199356615543365,
0.2080165445804596,
-0.05728115513920784,
-0.1946278065443039,
0.28852716088294983,
0.2971034049987793,
-0.09225091338157654,
0.19501495361328125,
0.0013467967510223389,
-0.03631505370140076,
0.2976643145084381,
0.4970463514328003,
0.19470560550689697,
-0.528974711894989,
-0.11660096794366837,
-0.27877193689346313,
-0.05884186178445816,
-0.020559415221214294,
-0.11620340496301651,
0.19309639930725098,
-0.24204736948013306,
-0.07853291928768158,
0.01649603433907032,
-0.34320715069770813,
0.634577214717865,
-0.2099698930978775,
-0.13588781654834747,
-0.366328626871109,
0.6602270603179932,
-0.12128646671772003,
-0.056329939514398575,
0.19383595883846283,
0.356173574924469,
-0.3036484718322754,
0.47819334268569946,
0.036438535898923874,
0.6812076568603516,
-0.19656668603420258,
0.08338344842195511,
0.6457628607749939,
-0.29651936888694763,
0.27711737155914307,
-0.5008100271224976,
0.2874606251716614,
-0.7126544713973999,
-0.2874287962913513,
-0.06568500399589539,
-0.1931164413690567,
0.07274571061134338,
0.5663920640945435,
0.0660874992609024,
0.07327955216169357,
-0.2345210313796997,
0.2931249737739563,
0.06992379575967789,
0.16525432467460632,
0.037701316177845,
-0.028970777988433838,
-0.5482334494590759,
0.03735470026731491,
-0.08109520375728607,
-0.25350499153137207,
-0.07669542729854584,
0.06095921993255615,
-0.11178430914878845,
-0.24369290471076965,
0.1308029592037201,
0.3869262933731079,
0.022617429494857788,
0.050802990794181824,
0.28555673360824585,
0.03853350877761841,
0.0888001024723053,
0.21661517024040222,
-0.21589629352092743,
-0.0013299323618412018,
0.0236456748098135,
0.2722308039665222,
0.355379194021225,
0.25487732887268066,
0.09194530546665192,
0.10860706120729446,
0.06119997054338455,
-0.02142707258462906,
-0.1499888002872467,
-0.10362742096185684,
0.0034809019416570663,
-0.20051059126853943,
-0.09099230170249939,
0.21890154480934143,
-0.17509081959724426,
-0.2435912787914276,
-0.13042345643043518,
-0.09962183237075806,
0.34873950481414795,
-0.13987910747528076,
0.18517519533634186,
-0.15177127718925476,
0.10838285088539124,
0.3658825159072876,
-0.33834540843963623,
-0.22809141874313354,
-0.07795403897762299,
0.46076691150665283,
0.023324014618992805,
0.2834368646144867,
0.4499661922454834,
0.2891092300415039,
-0.21895357966423035,
-0.08518561720848083,
-0.040044791996479034,
0.3467135429382324,
-0.5800532698631287,
-0.03135881572961807,
0.05547450855374336,
0.1587134748697281,
0.1733553409576416,
0.3075588643550873,
-0.06804361194372177,
-0.22462469339370728,
0.009391047060489655,
-0.3348070979118347,
0.25954321026802063,
0.2816801071166992,
0.30852821469306946,
-0.21147362887859344,
0.3378099799156189,
0.2253369390964508,
-0.21734315156936646,
-0.07676748931407928,
-0.265439510345459,
0.047725461423397064,
-0.019658943638205528,
0.2062469720840454,
-0.09724567085504532,
0.1512371450662613,
0.09358355402946472,
0.004123522900044918,
0.3094449043273926,
0.013711394742131233,
-0.004411565139889717,
-0.2657625079154968,
-0.0569329559803009,
0.007886484265327454,
0.08333958685398102,
0.17856468260288239,
-0.2587289810180664,
-0.4149526357650757,
-0.10248710215091705,
-0.06851676106452942,
0.04445387050509453,
0.10586410015821457,
0.09968682378530502,
0.17533430457115173,
0.233204647898674,
0.14077502489089966,
-0.0602739043533802,
0.10249870270490646,
-0.4341544210910797,
0.09013375639915466,
0.1616142839193344,
0.3027600646018982,
-0.35990220308303833,
0.20370912551879883,
-0.4562954306602478,
0.07218454033136368,
-0.13249363005161285,
0.23977041244506836,
0.5103180408477783,
-0.578681468963623,
0.1536402702331543,
-0.03459996357560158,
0.4610266089439392,
0.3679768443107605,
-0.3090323507785797,
-0.3603271245956421,
-0.010807134211063385,
0.24463380873203278,
-0.24658530950546265,
-0.4968988001346588,
-0.031464044004678726,
0.05770193040370941,
-0.1892635077238083,
-0.16501745581626892,
0.11618515849113464,
0.0026960372924804688,
0.012900777161121368,
-0.019872620701789856,
0.44211798906326294,
0.09503452479839325,
0.03476991504430771,
0.45802003145217896,
0.033754441887140274,
0.1267140656709671,
0.3582770824432373,
0.25886818766593933,
-0.10640441626310349,
0.19604822993278503,
0.32314708828926086,
-0.10486385226249695,
-0.09397075325250626,
0.0039252713322639465,
-0.16411173343658447,
-0.40306606888771057,
0.06112314760684967,
0.14738330245018005,
0.08297900855541229,
-0.06168831139802933,
0.4316123127937317,
0.07889040559530258,
0.1544601023197174,
-0.04322841390967369,
-0.2516343295574188,
-0.04083789512515068,
0.013743098825216293,
0.08291849493980408,
-0.15070754289627075,
-0.13261203467845917,
-0.018915094435214996,
-0.0031860843300819397,
-0.36239272356033325,
0.09429076313972473,
0.0717235580086708,
0.1786767542362213,
-0.07354532182216644,
-0.6868664026260376,
0.4297240078449249,
-0.05772561579942703,
0.3208506405353546,
-0.026037823408842087,
0.3736404478549957,
-0.03923654556274414,
-0.1635456383228302,
0.20027144253253937,
-0.299674391746521,
0.16985440254211426,
0.34681692719459534,
0.1554795205593109,
-0.33125901222229004,
-0.2791930139064789,
-0.12214051187038422,
0.05155658721923828,
0.27277523279190063,
-0.09425514936447144,
0.1196736991405487,
0.12579599022865295,
0.22504591941833496,
-0.1804126650094986,
-0.00539056584239006,
0.468178927898407,
0.19909115135669708,
0.0463554710149765,
0.17723983526229858,
-0.16580350697040558,
-0.40631821751594543,
0.09086735546588898,
-0.20962220430374146,
-0.024937350302934647,
-0.12110139429569244,
0.004188035614788532,
0.36092409491539,
-0.05961263179779053,
-0.15712681412696838,
0.10158312320709229,
0.13960526883602142,
0.2515598237514496,
0.16188877820968628,
-0.013495519757270813,
-0.2031971514225006,
-0.11239989101886749,
-0.35371747612953186,
0.27089694142341614,
-0.040910061448812485,
-0.023356016725301743,
0.5161081552505493,
0.1403435468673706,
0.05345659330487251,
-0.16253924369812012,
0.008346691727638245,
0.021483082324266434,
-0.21098563075065613,
0.29040247201919556,
-0.2972913980484009,
-0.10692407190799713,
-0.05820377171039581,
0.06542911380529404,
-0.46467500925064087,
-0.1339445263147354,
0.11106473207473755,
0.038788020610809326,
0.09878646582365036,
-0.43767672777175903,
0.12621966004371643,
0.10700330138206482,
-0.03427984565496445,
0.28317803144454956,
-0.12992799282073975,
0.32023629546165466,
-0.03086324967443943,
0.09921037405729294,
0.020931556820869446,
-0.339314728975296,
-0.19142624735832214,
0.3711217939853668,
0.006941791623830795,
0.22370080649852753,
0.2191457599401474,
0.07191798835992813,
-0.23906369507312775,
0.01603003963828087,
-0.3385500907897949,
-0.12055475264787674,
-0.2732459604740143,
0.13037873804569244,
-0.007931746542453766,
0.04923126846551895,
-0.3172142207622528,
-0.04123344272375107,
0.15463769435882568,
0.19628840684890747,
-0.08770880103111267,
-0.27790942788124084,
0.18967588245868683,
-0.13865545392036438,
-0.12064321339130402,
0.26424846053123474,
0.2381526529788971,
-0.23842468857765198,
0.013423794880509377,
-0.22465363144874573,
0.09509400278329849,
0.3887329697608948,
-0.07728040963411331,
-0.12939052283763885,
0.25177404284477234,
0.1122361570596695,
0.11225922405719757,
-0.19919714331626892,
0.15742206573486328,
0.1900290846824646,
-0.22493571043014526,
-0.16818268597126007,
-0.07264521718025208
] |
https://github.com/huggingface/datasets/issues/2547 | Dataset load_from_disk is too slow | Hi ! It looks like an issue with the virtual disk you are using.
We load datasets using memory mapping. In general it makes it possible to load very big files instantaneously since it doesn't have to read the file (it just assigns virtual memory to the file on disk).
However there happens to be issues with virtual disks (for example on spot instances), for which memory mapping does a pass over the entire file, and this takes a while. We are discussing about this issue here: #2252
Memory mapping is something handled by the OS so we can't do much about it, though we're still trying to figure out what's causing this behavior exactly to see what we can do. | @lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. | 121 | Dataset load_from_disk is too slow
@lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
Hi ! It looks like an issue with the virtual disk you are using.
We load datasets using memory mapping. In general it makes it possible to load very big files instantaneously since it doesn't have to read the file (it just assigns virtual memory to the file on disk).
However there happens to be issues with virtual disks (for example on spot instances), for which memory mapping does a pass over the entire file, and this takes a while. We are discussing about this issue here: #2252
Memory mapping is something handled by the OS so we can't do much about it, though we're still trying to figure out what's causing this behavior exactly to see what we can do. | [
-0.4744635224342346,
-0.365212082862854,
-0.09103208780288696,
0.5078073143959045,
0.29496389627456665,
0.07778090983629227,
0.08729466795921326,
0.29411613941192627,
0.5636073350906372,
0.11371617764234543,
0.10302665829658508,
0.3100513219833374,
-0.036494795233011246,
-0.13101860880851746,
-0.05103004723787308,
0.012052327394485474,
0.2169390320777893,
0.034065768122673035,
0.10168368369340897,
-0.1622139811515808,
-0.16796407103538513,
0.1942940205335617,
-0.1397535800933838,
-0.24682678282260895,
-0.26085135340690613,
-0.16752122342586517,
0.03609006851911545,
0.13267460465431213,
0.014111575670540333,
-0.23193688690662384,
0.08277644962072372,
-0.023467209190130234,
0.17471952736377716,
0.475650429725647,
-0.00010661346459528431,
-0.030866969376802444,
0.10141818225383759,
0.06783580780029297,
-0.3980638086795807,
-0.05916139483451843,
0.23691383004188538,
-0.2943417429924011,
0.07696603238582611,
-0.19942280650138855,
-0.08507262915372849,
-0.08455391228199005,
-0.10453809797763824,
-0.4806055724620819,
0.3054247498512268,
0.09953760355710983,
0.24208234250545502,
0.2846265137195587,
-0.2973233461380005,
-0.0019255633233115077,
-0.0428471565246582,
0.05776209011673927,
-0.22703415155410767,
0.2517688274383545,
0.4787027835845947,
0.12495647370815277,
-0.13826453685760498,
0.30566850304603577,
-0.08781033009290695,
0.16498322784900665,
0.4531137943267822,
0.06378223747015,
0.08095773309469223,
-0.20990341901779175,
-0.016359638422727585,
0.16674154996871948,
0.45948535203933716,
0.0003172643482685089,
-0.2677709758281708,
-0.2758021056652069,
0.08704426139593124,
-0.23030562698841095,
0.30207332968711853,
0.2804115414619446,
-0.17326810956001282,
0.14562372863292694,
-0.07252584397792816,
-0.10919239372015,
-0.034735456109046936,
0.1206023097038269,
0.2601851522922516,
0.02205026149749756,
-0.1033075824379921,
0.04192256182432175,
0.3998861014842987,
0.10310661047697067,
0.18367049098014832,
-0.2756839990615845,
0.18134133517742157,
0.4096231162548065,
-0.48171937465667725,
0.022581025958061218,
-0.04202921688556671,
0.17976431548595428,
-0.05536971986293793,
0.1661653369665146,
0.25750312209129333,
0.18785947561264038,
-0.193065345287323,
0.1321936845779419,
0.1726050078868866,
0.25416892766952515,
-0.23104608058929443,
0.06640990078449249,
0.27791011333465576,
0.14570055902004242,
-0.22816678881645203,
-0.009543124586343765,
-0.265900582075119,
-0.14003729820251465,
0.32683730125427246,
-0.2910884916782379,
-0.1571613848209381,
-0.14174063503742218,
-0.06254265457391739,
0.0716492235660553,
0.14597612619400024,
-0.13329240679740906,
0.21466945111751556,
0.30024221539497375,
-0.2892739176750183,
0.5329856276512146,
0.08123455196619034,
-0.15940898656845093,
-0.356136292219162,
-0.071369968354702,
-0.17985215783119202,
0.0125498715788126,
-0.25745660066604614,
0.18223649263381958,
0.20457272231578827,
-0.17472106218338013,
0.16896207630634308,
0.12717896699905396,
0.1787884384393692,
-0.25290030241012573,
0.2386094629764557,
-0.5147588849067688,
-0.07752002030611038,
0.1764654666185379,
-0.0012889951467514038,
0.22294843196868896,
0.06695572286844254,
0.010185815393924713,
-0.3426543176174164,
0.1036742702126503,
-0.38037922978401184,
-0.4763154089450836,
-0.1604788899421692,
0.2296295315027237,
0.0005406178534030914,
0.06434619426727295,
-0.5296051502227783,
0.06339807063341141,
-0.035906799137592316,
0.056739237159490585,
-0.24875330924987793,
-0.08021872490644455,
-0.32711127400398254,
0.004392980132251978,
0.34521573781967163,
0.3170839548110962,
-0.4786143898963928,
0.10886712372303009,
-0.20458798110485077,
0.11258450150489807,
0.32332128286361694,
0.6517837047576904,
-0.3402386009693146,
0.25862231850624084,
-0.20394320785999298,
-0.02414545789361,
0.15270009636878967,
-0.20880113542079926,
-0.34358662366867065,
0.6806859374046326,
0.004990734159946442,
0.0012138094753026962,
0.09863873571157455,
0.30050092935562134,
0.08096134662628174,
-0.04573938995599747,
0.1633220911026001,
0.5188062191009521,
0.11974357068538666,
0.3266191780567169,
-0.397265762090683,
-0.22586141526699066,
0.02333572879433632,
0.5041813850402832,
-0.3286641240119934,
-0.1150420680642128,
-0.05723264068365097,
0.36905887722969055,
0.3817799687385559,
-0.10688313841819763,
-0.04213283956050873,
0.31593650579452515,
0.08266077935695648,
0.03145988658070564,
0.005727745126932859,
-0.04025980457663536,
-0.21359160542488098,
0.36909720301628113,
0.28483256697654724,
0.052323393523693085,
0.11056212335824966,
-0.09593714773654938,
-0.125733882188797,
-0.00450785830616951,
-0.2928828001022339,
0.14055463671684265,
0.025115016847848892,
0.03563135489821434,
0.05813693627715111,
-0.12447348237037659,
-0.2283867746591568,
0.2344726324081421,
-0.34923264384269714,
-0.15043765306472778,
-0.2534070909023285,
0.06838663667440414,
-0.006345735862851143,
0.08378160744905472,
-0.05151967331767082,
-0.07744378596544266,
-0.02247840166091919,
-0.012339763343334198,
-0.250048965215683,
0.33351388573646545,
0.14800287783145905,
0.45007264614105225,
0.17076541483402252,
0.019704699516296387,
0.15391598641872406,
0.15020941197872162,
0.29001492261886597,
0.029065333306789398,
0.3547217845916748,
-0.20860543847084045,
-0.15816524624824524,
0.3160477876663208,
-0.008646246045827866,
0.34581610560417175,
0.1937650740146637,
-0.29844042658805847,
0.3042438328266144,
0.1253899484872818,
-0.020053807646036148,
-0.07657157629728317,
0.4769967794418335,
0.1933385729789734,
0.65968918800354,
0.14807236194610596,
-0.29603859782218933,
-0.15037351846694946,
0.4899025559425354,
0.006529677659273148,
-0.06818761676549911,
0.28153538703918457,
-0.01619429886341095,
-0.29594603180885315,
-0.023628724738955498,
0.1372411847114563,
0.43831199407577515,
0.21627271175384521,
0.02002142369747162,
-0.009543260559439659,
-0.021016310900449753,
-0.1808338165283203,
0.2527487277984619,
-0.040084727108478546,
0.5054359436035156,
0.10154339671134949,
-0.05066867172718048,
-0.010992049239575863,
-0.41746994853019714,
-0.2598709762096405,
-0.0033290134742856026,
0.16301321983337402,
-0.14683552086353302,
0.207366481423378,
-0.09576988965272903,
0.12245302647352219,
-0.3151174783706665,
0.27892518043518066,
-0.03592478111386299,
-0.07289519906044006,
-0.18248958885669708,
0.2659864127635956,
0.10747949779033661,
-0.001978769898414612,
-0.08943766355514526,
0.22492927312850952,
-0.05812722444534302,
-0.28491300344467163,
-0.2735420763492584,
-0.06036685034632683,
-0.33485034108161926,
0.01030280813574791,
0.32521572709083557,
0.07418326288461685,
0.30038225650787354,
-0.08235430717468262,
-0.2148219347000122,
-0.13290011882781982,
0.0521085262298584,
0.01714475080370903,
-0.016598176211118698,
0.26997753977775574,
-0.12106813490390778,
0.19121308624744415,
-0.050545837730169296,
-0.09592732042074203,
0.20414865016937256,
-0.2538374364376068,
-0.03892621397972107,
-0.010282912291586399,
-0.07355552166700363,
-0.003747420385479927,
-0.020795200020074844,
-0.44784221053123474,
-0.3565228581428528,
-0.3237343430519104,
0.02921130508184433,
-0.09339927136898041,
0.12699081003665924,
-0.1361837536096573,
0.10475680977106094,
0.06417911499738693,
0.19652999937534332,
0.14438669383525848,
-0.25231069326400757,
-0.5606967210769653,
0.31107863783836365,
0.020331814885139465,
-0.28038346767425537,
0.026268478482961655,
0.21969912946224213,
0.23572082817554474,
0.03453774005174637,
-0.6052535772323608,
-0.027120742946863174,
-0.3552594780921936,
0.021931204944849014,
-0.34907853603363037,
0.037120528519153595,
0.06306010484695435,
-0.08537723869085312,
-0.07926423102617264,
0.1527564525604248,
-0.16202686727046967,
-0.06915178149938583,
-0.07677274197340012,
0.07748368382453918,
-0.1906050741672516,
0.2672801911830902,
0.04263630881905556,
0.5003504753112793,
0.1409894973039627,
0.10457252711057663,
0.35808664560317993,
0.1680099368095398,
0.11993581801652908,
-0.3736138939857483,
-0.13043011724948883,
0.015423084609210491,
-0.3150404095649719,
-0.3742135167121887,
0.21724936366081238,
0.07678193598985672,
-0.395434707403183,
-0.1745838224887848,
-0.08634263277053833,
-0.17050868272781372,
-0.19272984564304352,
0.1544848084449768,
-0.25395190715789795,
0.16259892284870148,
-0.04123345762491226,
0.13801100850105286,
-0.06795600056648254,
-0.09232699126005173,
-0.03351690620183945,
-0.030599161982536316,
0.09002421796321869,
-0.13374948501586914,
-0.3750218152999878,
0.09864047914743423,
-0.4460468888282776,
0.14257469773292542,
-0.27220651507377625,
0.18620415031909943,
-0.015617579221725464,
0.015772487968206406,
0.23181483149528503,
-0.07275781780481339,
0.7050458788871765,
0.1026805117726326,
0.196691632270813,
0.02611660584807396,
-0.2520483732223511,
-0.4085816740989685,
0.017882179468870163,
-0.10416097939014435,
-0.0642228052020073,
0.008627595379948616,
0.5170795917510986,
-0.14525330066680908,
-0.23413555324077606,
-0.20643535256385803,
0.4217880666255951,
-0.18722929060459137,
-0.32447701692581177,
-0.23217666149139404,
-0.254364013671875,
-0.3492276966571808,
0.16074486076831818,
0.06682645529508591,
0.30567941069602966,
0.10281544178724289,
-0.02734970673918724,
-0.005051044747233391,
0.20196998119354248,
0.21992403268814087,
0.02666512504220009,
0.24809902906417847,
-0.02632731758058071,
0.43351608514785767,
-0.0052605122327804565,
0.0647030845284462,
-0.06649531424045563,
0.5060539841651917,
-0.16399328410625458,
-0.25447019934654236,
0.05452768877148628,
-0.07480276376008987,
0.16980013251304626,
0.4769679307937622,
0.04242706298828125,
-0.06741147488355637,
0.2645462155342102,
0.23759715259075165,
-0.37035509943962097,
0.05037359520792961,
0.3129158020019531,
0.19203248620033264,
-0.1302803009748459,
-0.6680108904838562,
0.38853150606155396,
0.2552740275859833,
0.04419322311878204,
0.11039640009403229,
-0.22651608288288116,
-0.12721873819828033,
0.5779410600662231,
0.2083393633365631,
0.9637527465820312,
-0.13626916706562042,
0.25530725717544556,
-0.0221579410135746,
0.18920773267745972,
0.15440122783184052,
-0.4441033601760864,
-0.040928006172180176,
-0.3033847212791443,
-0.20108288526535034,
0.07737306505441666,
-0.06695672124624252,
0.12987454235553741,
0.4100767970085144,
-0.016233190894126892,
0.3677230477333069,
-0.02046392485499382,
-0.33006998896598816,
-0.3168065547943115,
0.5213736891746521,
-0.3694121241569519,
-0.6282686591148376,
-0.6542029976844788,
0.1649358719587326,
-0.1258346438407898,
0.060487646609544754,
-0.027285471558570862,
0.2899007797241211,
0.13256031274795532,
-0.15721014142036438,
-0.16786330938339233,
0.10888936370611191,
-0.1719556599855423,
0.18888162076473236,
-0.30770012736320496,
-0.20531873404979706,
0.05811011418700218,
0.17949138581752777,
0.02252274751663208,
0.18464542925357819,
-0.03767913579940796,
0.4627089202404022,
-0.1927567720413208,
0.2538876533508301,
0.12080653756856918,
-0.31024307012557983,
0.3044302761554718,
-0.21510040760040283,
-0.13873684406280518,
-0.2026311159133911,
-0.2663213908672333,
-0.20666328072547913,
0.19573989510536194,
0.03614810109138489,
0.12579450011253357,
0.06848150491714478,
-0.6111659407615662,
0.1892084777355194,
-0.023864537477493286,
-0.23184548318386078,
0.182829812169075,
0.24523624777793884,
-0.07738810777664185,
0.39320269227027893,
0.054484765976667404,
-0.3213704824447632,
-0.06956355273723602,
0.35035035014152527,
0.1853974163532257,
-0.14534775912761688,
0.4302152991294861,
0.27950114011764526,
-0.20683826506137848,
-0.25036436319351196,
0.16761887073516846,
0.048313453793525696,
-0.45033183693885803,
0.2712933421134949,
0.13728506863117218,
-0.04824220389127731,
0.025161616504192352,
0.0064539834856987,
0.2230454534292221,
-0.1812034547328949,
-0.13740065693855286,
-0.3095385432243347,
-0.1729569137096405,
-0.03869650512933731,
0.20797127485275269,
0.0943126380443573,
0.1608491837978363,
-0.28599777817726135,
-0.09568557143211365,
0.0522916242480278,
-0.3249436616897583,
0.08491603285074234,
-0.2763925790786743,
-0.022349368780851364,
-0.1640489101409912,
-0.044933728873729706,
0.331989049911499,
-0.010749874636530876,
0.15447333455085754,
0.0064232200384140015,
-0.11990854144096375,
-0.24201104044914246,
-0.2305973619222641,
0.12250542640686035,
-0.13474932312965393,
0.00036720186471939087,
0.13643492758274078,
-0.4455798864364624,
-0.1300944834947586,
-0.3052479922771454,
-0.01214253343641758,
0.06988146156072617,
0.012055106461048126,
-0.10745333880186081,
-0.03724021837115288,
0.08514830470085144,
-0.12631529569625854,
0.13236209750175476,
-0.1252928525209427,
0.31326380372047424,
0.11541327834129333,
0.010453715920448303,
0.3787950277328491,
-0.21014641225337982,
-0.4721021354198456,
-0.14584621787071228,
0.0856340155005455,
0.3004266619682312,
0.22042006254196167,
-0.06822603940963745,
0.10851284861564636,
0.34021419286727905,
0.33846166729927063,
0.2613999843597412,
-0.012101618573069572,
-0.18842363357543945,
0.04016830027103424,
0.24038782715797424,
-0.18580518662929535,
-0.32673725485801697,
-0.12382952868938446,
-0.22682693600654602,
-0.005949873477220535,
0.0884682685136795,
0.0675785094499588,
0.4614373445510864,
-0.2952952980995178,
0.01834593340754509,
0.3483881950378418,
-0.3196529746055603,
0.030764566734433174,
0.23404331505298615,
0.16097491979599,
0.18449753522872925,
0.13749152421951294,
0.06274197995662689,
0.11889316141605377,
0.7941001057624817,
-0.15576571226119995,
0.31409594416618347,
0.16350680589675903,
0.5316992998123169,
-0.2107439637184143,
-0.3584110140800476,
0.16030946373939514,
0.2819749116897583,
-0.20230606198310852,
0.15674366056919098,
-0.07907794415950775,
0.14748933911323547,
-0.3605518043041229,
-0.2502919137477875,
-0.18410752713680267,
0.050141897052526474,
-0.16143596172332764,
-0.0824117362499237,
-0.03449774160981178,
0.08991839736700058,
-0.12240690737962723,
0.32684218883514404,
-0.24614500999450684,
0.06808623671531677,
0.027738511562347412,
0.303902268409729,
0.05800432711839676,
-0.13636715710163116,
-0.026432931423187256,
-0.1593106985092163,
0.27748236060142517,
-0.29186177253723145,
0.08700188249349594,
-0.08175620436668396,
-0.13450071215629578,
-0.13334409892559052,
0.07556966692209244,
0.22740289568901062,
0.4301583766937256,
0.08337792754173279,
0.11080246418714523,
-0.03221553936600685,
0.055505141615867615,
-0.12919308245182037,
0.20676018297672272,
0.15777987241744995,
0.5026847720146179,
0.30847007036209106,
0.08855976164340973,
-0.20332254469394684,
-0.00855422392487526,
-0.17160500586032867,
0.3376588225364685,
-0.3392183780670166,
0.3443560302257538,
0.056485094130039215,
-0.12458498775959015,
-0.44953295588493347,
0.33096563816070557,
-0.2590314745903015,
0.07375118881464005,
0.3909415900707245,
-0.03538241609930992,
-0.05226336792111397,
-0.22038546204566956,
0.09130408614873886,
-0.08589699864387512,
0.7191556692123413,
0.29006120562553406,
0.00012084469199180603,
-0.39547568559646606,
-0.03622680902481079,
-0.7739744782447815,
-0.03078272193670273,
-0.1820884346961975,
0.23030421137809753,
0.049766648560762405,
0.3654824197292328,
0.18567337095737457,
0.22616371512413025,
-0.0912744402885437,
-0.11804722994565964,
-0.17173901200294495,
0.14614534378051758,
-0.19767968356609344,
-0.09005589783191681,
-0.1394370049238205,
0.16515754163265228,
-0.11369310319423676,
-0.5302268266677856,
0.17176534235477448,
0.0819087028503418,
-0.06730203330516815,
-0.1615786999464035,
-0.13358545303344727,
-0.01317748986184597,
0.21431609988212585,
0.49958130717277527,
0.05442696809768677,
0.07352036237716675,
-0.10499747842550278,
-0.10871974378824234,
-0.05190691724419594,
-0.0537874735891819,
-0.09822291880846024,
0.16961413621902466,
0.08414654433727264,
0.283458411693573,
-0.09395696222782135,
0.22069399058818817,
-0.3580944836139679,
0.20068244636058807,
-0.22346289455890656,
-0.30178141593933105,
-0.2503533959388733,
-0.11627278476953506,
0.15126755833625793,
0.08653246611356735,
0.1971617043018341,
0.3609011173248291,
0.029866240918636322,
-0.17828936874866486,
-0.392627477645874,
-0.1595785915851593,
0.2519131004810333,
0.016790371388196945,
-0.20763297379016876,
-0.05530570074915886,
0.2613333463668823,
0.15085747838020325,
-0.06851572543382645,
-0.5005117654800415,
0.0650295540690422,
0.2177358865737915,
-0.024224724620580673,
-0.1970944106578827,
0.3102476894855499,
-0.05168629810214043,
0.03608974441885948,
-0.10815294086933136,
0.3465847373008728,
-0.14728575944900513,
-0.3784307539463043,
0.013874080032110214,
-0.3208799362182617
] |
https://github.com/huggingface/datasets/issues/2547 | Dataset load_from_disk is too slow | Okay, that's exactly my case, with spot instances... Therefore this isn't something we can change in any way to be able to load the dataset faster? I mean, what do you do internally at huggingface for being able to use spot instances with datasets efficiently? | @lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. | 45 | Dataset load_from_disk is too slow
@lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
Okay, that's exactly my case, with spot instances... Therefore this isn't something we can change in any way to be able to load the dataset faster? I mean, what do you do internally at huggingface for being able to use spot instances with datasets efficiently? | [
-0.3196374773979187,
-0.5587570667266846,
-0.062026496976614,
0.5160356760025024,
0.2328595519065857,
0.020378991961479187,
0.1246287077665329,
0.13793540000915527,
0.5566677451133728,
0.11270610243082047,
-0.06148073077201843,
0.3583337366580963,
-0.015342977829277515,
0.21132999658584595,
0.07681871205568314,
-0.08293916285037994,
0.20185397565364838,
0.01747898757457733,
0.09677635133266449,
-0.03347074240446091,
-0.060265589505434036,
0.18477317690849304,
-0.17772239446640015,
-0.18015329539775848,
-0.343254953622818,
-0.1481812745332718,
0.016976749524474144,
0.17570409178733826,
-0.09117330610752106,
-0.34216833114624023,
0.17432408034801483,
0.07797583192586899,
0.13140219449996948,
0.5717472434043884,
-0.00011365364480298012,
-0.04598357528448105,
0.11772355437278748,
0.07482920587062836,
-0.34274619817733765,
0.03683716803789139,
0.03669699281454086,
-0.2794434726238251,
0.15251308679580688,
-0.13235466182231903,
-0.1332796812057495,
0.12935277819633484,
-0.04073431342840195,
-0.33393770456314087,
0.35906535387039185,
-0.015727221965789795,
0.18334829807281494,
0.5802416801452637,
-0.3182554543018341,
-0.06263791024684906,
-0.06806252151727676,
0.08786965161561966,
-0.20418621599674225,
0.2897666096687317,
0.4282694458961487,
0.13751034438610077,
-0.15039905905723572,
0.40812546014785767,
-0.040174342691898346,
0.12905451655387878,
0.5548243522644043,
0.10668010264635086,
-0.09098301082849503,
-0.19065134227275848,
-0.12760546803474426,
0.27461478114128113,
0.4216814339160919,
-0.035946011543273926,
-0.3770553767681122,
-0.4575634002685547,
0.0806802436709404,
-0.3198559284210205,
0.24322062730789185,
0.13894206285476685,
-0.08136194944381714,
0.12381406128406525,
-0.1747925728559494,
-0.14543768763542175,
-0.010641492903232574,
0.011534720659255981,
0.3172805607318878,
0.07209496945142746,
-0.19954249262809753,
0.014346890151500702,
0.47273188829421997,
0.18062010407447815,
-0.16248838603496552,
-0.1308172196149826,
0.18107937276363373,
0.2825069725513458,
-0.5777152180671692,
0.011467047035694122,
0.0010844320058822632,
0.4125030040740967,
0.05183864384889603,
0.2784286141395569,
0.3223155736923218,
0.23586612939834595,
-0.30691710114479065,
0.09113489091396332,
0.23395422101020813,
0.3614220917224884,
-0.056424595415592194,
-0.1344999521970749,
0.30642056465148926,
0.3840126693248749,
-0.11357781291007996,
0.009558839723467827,
-0.23877522349357605,
-0.10692033916711807,
0.12389856576919556,
-0.31296879053115845,
0.014529477804899216,
-0.12447585165500641,
-0.020200220867991447,
-0.10869590938091278,
0.16784438490867615,
-0.15774649381637573,
0.24616654217243195,
0.37666311860084534,
-0.27758336067199707,
0.5177391767501831,
0.12024669349193573,
-0.14257030189037323,
-0.43305471539497375,
-0.13039164245128632,
-0.17328454554080963,
0.08044368028640747,
-0.19500970840454102,
0.2662886679172516,
0.07013480365276337,
-0.4665994644165039,
0.2580045759677887,
0.1210588589310646,
0.2060399055480957,
-0.24203479290008545,
0.014870962128043175,
-0.3456929624080658,
-0.25483962893486023,
0.11205296963453293,
-0.0221587922424078,
0.2393351048231125,
0.003118600696325302,
0.029196932911872864,
-0.3391523063182831,
-0.12429206818342209,
-0.303878515958786,
-0.5340571999549866,
-0.15598168969154358,
0.1528090089559555,
-0.03331819549202919,
0.007050231099128723,
-0.6708774566650391,
0.1752399355173111,
-0.03095293790102005,
0.1613244265317917,
-0.0681564137339592,
0.034920886158943176,
-0.4282578229904175,
0.012933168560266495,
0.4087442457675934,
0.4829118251800537,
-0.3364714980125427,
-0.00926307961344719,
-0.17381516098976135,
0.0008563287556171417,
0.2438313066959381,
0.605517566204071,
-0.26318269968032837,
0.35983413457870483,
-0.19604147970676422,
0.045897647738456726,
0.09752307832241058,
-0.36261802911758423,
-0.18965211510658264,
0.4016989767551422,
-0.04919862747192383,
0.07041113823652267,
0.19530248641967773,
0.2154717594385147,
0.04994206130504608,
-0.0069137136451900005,
0.026423919945955276,
0.4943832755088806,
0.1099172905087471,
0.30775922536849976,
-0.3275247812271118,
-0.23637686669826508,
-0.010648705065250397,
0.4756229519844055,
-0.4628457725048065,
-0.13582268357276917,
-0.18920019268989563,
0.43673014640808105,
0.3493829369544983,
-0.07069185376167297,
-0.0973178893327713,
0.21466650068759918,
0.05436278507113457,
0.1839345097541809,
-0.025847166776657104,
-0.039258308708667755,
-0.37985917925834656,
0.3749345541000366,
0.21929752826690674,
0.20748242735862732,
0.0683707743883133,
-0.1953057497739792,
-0.2741433382034302,
0.0775456354022026,
-0.31433528661727905,
0.015248216688632965,
-0.06859178096055984,
0.07635696232318878,
0.16917778551578522,
-0.09333904087543488,
-0.3474583923816681,
0.24628117680549622,
-0.33578798174858093,
0.0676221176981926,
-0.48041442036628723,
0.007930641993880272,
0.07891426980495453,
0.0794268548488617,
-0.12037953734397888,
0.018169093877077103,
-0.06850893050432205,
-0.09773708134889603,
-0.09156635403633118,
0.39526623487472534,
0.09360682964324951,
0.4953528642654419,
0.19845765829086304,
0.14746741950511932,
0.28366053104400635,
0.17059071362018585,
0.19665974378585815,
-0.10056707262992859,
0.33282193541526794,
-0.1249452531337738,
-0.2328202724456787,
0.3337986469268799,
-0.11161373555660248,
0.2934536039829254,
0.14850813150405884,
-0.2852835953235626,
0.16428957879543304,
0.15100032091140747,
-0.05836961418390274,
-0.0630393773317337,
0.4609434902667999,
0.020466087386012077,
0.600842297077179,
0.2153659164905548,
-0.4440370798110962,
-0.04370447248220444,
0.4861674904823303,
-0.015072150155901909,
-0.05873783677816391,
0.2730802595615387,
0.062417276203632355,
-0.35256335139274597,
0.06953859329223633,
-0.16108500957489014,
0.2996744215488434,
0.13614174723625183,
-0.05436239019036293,
0.060038067400455475,
0.08702389895915985,
-0.14045239984989166,
0.20306828618049622,
-0.01076652854681015,
0.383064329624176,
-0.0683261975646019,
0.0322461798787117,
-0.040148843079805374,
-0.4450126588344574,
-0.17550793290138245,
-0.1217227503657341,
0.11078883707523346,
-0.2857525646686554,
0.14569348096847534,
-0.055750973522663116,
-0.0033405274152755737,
-0.23024879395961761,
0.35593336820602417,
-0.09302857518196106,
-0.08995562046766281,
-0.14060497283935547,
0.36195531487464905,
0.12146149575710297,
0.00189156923443079,
-0.04353385418653488,
0.4041728675365448,
-0.03420986980199814,
-0.17861361801624298,
-0.36529964208602905,
-0.00479209003970027,
-0.1858634054660797,
-0.04852906987071037,
0.293447345495224,
0.15907849371433258,
0.29703187942504883,
-0.20100603997707367,
-0.1913919448852539,
-0.2566905915737152,
-0.011739715933799744,
0.00414956733584404,
-0.05881188064813614,
0.35513514280319214,
0.08719418942928314,
0.2114962935447693,
-0.2618368864059448,
-0.06649210304021835,
0.26151028275489807,
-0.2949221730232239,
-0.1493820697069168,
-0.13076406717300415,
-0.12454506754875183,
0.12209340184926987,
0.028182338923215866,
-0.28256934881210327,
-0.27525290846824646,
-0.30557575821876526,
0.3190351724624634,
-0.09530191123485565,
0.05369400605559349,
-0.14473547041416168,
-0.052921608090400696,
0.13883541524410248,
-0.0915219709277153,
0.11114189028739929,
-0.19335249066352844,
-0.6070049405097961,
0.21689002215862274,
0.024775266647338867,
-0.23858462274074554,
-0.10314872860908508,
0.22351764142513275,
0.11490488052368164,
-0.13131818175315857,
-0.5084910988807678,
-0.33932456374168396,
-0.33506348729133606,
0.09898096323013306,
-0.22539040446281433,
0.15282511711120605,
0.18813791871070862,
-0.13915212452411652,
-0.024983080103993416,
0.1779857575893402,
-0.28474143147468567,
-0.028692446649074554,
0.03485922887921333,
-0.02098829299211502,
-0.03961101174354553,
0.26917076110839844,
-0.00040379539132118225,
0.4684165120124817,
0.19508329033851624,
0.15714508295059204,
0.4356405436992645,
0.1224706843495369,
0.1987559050321579,
-0.40390369296073914,
-0.19743719696998596,
0.02010352537035942,
-0.24729999899864197,
-0.28769367933273315,
0.23330652713775635,
0.11749941110610962,
0.03227706998586655,
-0.1820494532585144,
-0.08950811624526978,
-0.2380458116531372,
-0.18365725874900818,
0.07526863366365433,
0.02693159691989422,
0.058925896883010864,
-0.06422124058008194,
0.08126669377088547,
0.0206652469933033,
-0.05836901441216469,
0.08864662051200867,
0.06639961898326874,
0.1828157901763916,
-0.11100209504365921,
-0.5808103680610657,
0.17466998100280762,
-0.6069725155830383,
0.20172373950481415,
-0.20255441963672638,
0.062496576458215714,
0.05041180178523064,
0.011052381247282028,
0.4005107283592224,
0.0054567549377679825,
0.7247170209884644,
0.09030637890100479,
0.1827915757894516,
-0.053137294948101044,
-0.4591607451438904,
-0.4324053227901459,
0.12066173553466797,
-0.09465761482715607,
-0.11709371954202652,
0.045192718505859375,
0.510940432548523,
-0.31237757205963135,
-0.36355066299438477,
-0.1208670437335968,
0.32899031043052673,
-0.17040883004665375,
-0.16021864116191864,
-0.2254464030265808,
-0.30874747037887573,
-0.2820458710193634,
0.19154579937458038,
0.06228899210691452,
0.3389371335506439,
0.2983134388923645,
0.07045093178749084,
0.01115511916577816,
0.22257089614868164,
0.1877039521932602,
0.05586724355816841,
0.22074630856513977,
0.06306162476539612,
0.2699105143547058,
0.19487054646015167,
-0.04034107178449631,
-0.16282793879508972,
0.5641958117485046,
-0.25018277764320374,
-0.490609347820282,
-0.014696568250656128,
0.12627267837524414,
0.23653745651245117,
0.5669190287590027,
0.04211139678955078,
0.11979672312736511,
0.14438046514987946,
0.3374324440956116,
-0.43587353825569153,
0.08405149728059769,
0.27179065346717834,
0.2514384686946869,
-0.13455326855182648,
-0.5810293555259705,
0.45661813020706177,
0.1905064731836319,
0.04883570969104767,
0.05690878629684448,
0.05133799836039543,
-0.08423737436532974,
0.6181401610374451,
0.06869897246360779,
1.0370110273361206,
-0.28218626976013184,
0.22548508644104004,
0.15227806568145752,
0.21908189356327057,
0.5381293892860413,
-0.4257057309150696,
0.00113598071038723,
-0.2776857316493988,
-0.12133432924747467,
0.06258191168308258,
-0.04624002426862717,
0.09466653317213058,
0.2631700336933136,
0.022684786468744278,
0.45952877402305603,
-0.1524493396282196,
-0.21976059675216675,
-0.3194177448749542,
0.4795188307762146,
-0.2825453579425812,
-0.7124119400978088,
-0.9103111028671265,
0.08631309121847153,
-0.08077539503574371,
0.22994619607925415,
-0.09658804535865784,
0.23740558326244354,
0.1809944063425064,
-0.08959676325321198,
-0.12759533524513245,
-0.03154648840427399,
-0.25075992941856384,
0.0424589104950428,
-0.16387200355529785,
-0.12923146784305573,
0.03110315278172493,
0.3478134870529175,
0.13007721304893494,
0.03611718490719795,
-0.044316284358501434,
0.3795786499977112,
-0.3030947148799896,
0.21240390837192535,
0.09256994724273682,
-0.25420692563056946,
0.264915406703949,
-0.15428736805915833,
-0.08235658705234528,
-0.17558667063713074,
-0.17461933195590973,
-0.3735751509666443,
0.28577131032943726,
0.03876816853880882,
0.03928203135728836,
-0.030412305146455765,
-0.5706748366355896,
0.14153680205345154,
0.13145963847637177,
-0.28440338373184204,
0.0980653315782547,
0.2616693377494812,
-0.08885721117258072,
0.2768687605857849,
0.11338524520397186,
-0.2748240530490875,
-0.06782642006874084,
0.3945199251174927,
-0.0038798637688159943,
-0.1927148550748825,
0.36845657229423523,
0.39338597655296326,
-0.20316165685653687,
-0.1406014859676361,
0.1354217827320099,
0.19842518866062164,
-0.639431357383728,
0.36885809898376465,
0.22520171105861664,
-0.08534053713083267,
-0.03219182789325714,
0.25288835167884827,
0.2513151168823242,
-0.1531391739845276,
-0.06755011528730392,
-0.29457229375839233,
-0.13954202830791473,
0.12950241565704346,
0.17115271091461182,
-0.008723590523004532,
0.23671340942382812,
-0.21578674018383026,
-0.08925095200538635,
0.081484854221344,
-0.2553873062133789,
0.06300197541713715,
-0.3963901698589325,
-0.015443079173564911,
0.13685676455497742,
-0.07034866511821747,
0.47963568568229675,
-0.07045648992061615,
0.07499197125434875,
0.026875926181674004,
-0.2657926678657532,
-0.17250078916549683,
-0.179416686296463,
0.1676754653453827,
-0.18233567476272583,
-0.07064978033304214,
0.16555318236351013,
-0.17046009004116058,
-0.11359401047229767,
-0.36982497572898865,
0.17989198863506317,
0.1990991234779358,
0.054024942219257355,
-0.193340465426445,
-0.007002841681241989,
0.0685846358537674,
-0.2307348996400833,
0.10767760872840881,
0.06361004710197449,
0.19138307869434357,
0.1256127655506134,
-0.09029483795166016,
0.18366214632987976,
-0.20867551863193512,
-0.05627664923667908,
-0.04297981411218643,
0.2864104211330414,
0.1725778877735138,
0.1507643312215805,
-0.02742769569158554,
-0.04525826498866081,
0.33279117941856384,
0.3738406300544739,
0.2403503656387329,
-0.016523975878953934,
-0.13628685474395752,
0.011545486748218536,
0.15019288659095764,
-0.1640740931034088,
-0.24574872851371765,
-0.017364323139190674,
-0.10749755799770355,
-0.051696594804525375,
0.1891133189201355,
0.17656341195106506,
0.5343314409255981,
-0.4159369468688965,
0.0900050476193428,
0.27860385179519653,
-0.25126975774765015,
0.09522710740566254,
0.10142844170331955,
0.051706138998270035,
0.059283748269081116,
0.28397348523139954,
0.15689054131507874,
0.1252661943435669,
0.46632736921310425,
-0.1248374804854393,
0.43654799461364746,
-0.0518169030547142,
0.6817251443862915,
-0.037854187190532684,
-0.4280990958213806,
0.10094188898801804,
0.4241499900817871,
-0.09781655669212341,
0.05482548475265503,
-0.17132878303527832,
0.3906816244125366,
-0.36069491505622864,
-0.30875661969184875,
-0.15851648151874542,
0.18025463819503784,
-0.13678544759750366,
-0.16699115931987762,
0.057269684970378876,
0.024729102849960327,
-0.10005848854780197,
0.3391205966472626,
-0.24647188186645508,
-0.03841767460107803,
0.15254230797290802,
0.13036444783210754,
0.031228117644786835,
-0.22462210059165955,
-0.24861320853233337,
-0.13291215896606445,
0.4031757712364197,
-0.1926611363887787,
0.13215936720371246,
-0.10363231599330902,
-0.14414429664611816,
-0.12136740982532501,
0.3481104075908661,
0.17978741228580475,
0.22193127870559692,
0.20548826456069946,
0.17454735934734344,
-0.15457792580127716,
0.16524434089660645,
-0.005241763778030872,
0.15152373909950256,
0.06998501718044281,
0.3075495660305023,
0.17110073566436768,
0.03843875974416733,
-0.15862013399600983,
-0.035583432763814926,
-0.28714519739151,
0.3118094503879547,
-0.4168596565723419,
0.23282533884048462,
-0.07071685791015625,
-0.042056046426296234,
-0.40768659114837646,
0.35725176334381104,
-0.16674208641052246,
0.13074898719787598,
0.35379746556282043,
-0.028526760637760162,
-0.1019277274608612,
-0.21105360984802246,
0.0544465035200119,
0.022533152252435684,
0.6195701956748962,
0.35934320092201233,
-0.09968600422143936,
-0.31588423252105713,
-0.034532222896814346,
-0.7715907096862793,
-0.08307843655347824,
0.027068275958299637,
0.18212197721004486,
0.21424777805805206,
0.3033531904220581,
0.06852861493825912,
0.27342480421066284,
-0.002446182072162628,
-0.114433154463768,
-0.032249413430690765,
-0.004325877875089645,
-0.14688989520072937,
0.07158371806144714,
-0.27526265382766724,
0.01678876020014286,
-0.05203889682888985,
-0.46499329805374146,
0.2568736672401428,
-0.012740956619381905,
-0.18272334337234497,
-0.09550607204437256,
0.03897362947463989,
-0.05959531292319298,
0.025990720838308334,
0.41705575585365295,
0.05981188267469406,
-0.09621407091617584,
-0.033641476184129715,
-0.16410833597183228,
-0.12545324862003326,
-0.16935881972312927,
-0.11148034036159515,
0.18809160590171814,
-0.08114953339099884,
0.2960057556629181,
-0.12145909667015076,
0.21032965183258057,
-0.40207698941230774,
0.3637864887714386,
-0.13275915384292603,
-0.3278031051158905,
-0.2649249732494354,
-0.0511702224612236,
-0.06750808656215668,
-0.01440056785941124,
0.2698032557964325,
0.3055673837661743,
-0.011731013655662537,
-0.21944712102413177,
-0.32900333404541016,
-0.13303430378437042,
0.44057998061180115,
-0.08632908761501312,
-0.11676967144012451,
-0.04739193245768547,
0.2936118245124817,
0.3169213831424713,
-0.25881680846214294,
-0.6736821532249451,
0.06975912302732468,
0.09826822578907013,
0.12389827519655228,
-0.1412496417760849,
0.3487517535686493,
-0.17227186262607574,
-0.060876861214637756,
-0.17909489572048187,
0.2636471390724182,
-0.133408784866333,
-0.2623071074485779,
0.12870237231254578,
-0.31330394744873047
] |
https://github.com/huggingface/datasets/issues/2547 | Dataset load_from_disk is too slow | There are no solutions yet unfortunately.
We're still trying to figure out a way to make the loading instantaneous on such disks, I'll keep you posted | @lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model. | 26 | Dataset load_from_disk is too slow
@lhoestq
## Describe the bug
It's not normal that I have to wait 7-8 hours for a dataset to be loaded from disk, as there are no preprocessing steps, it's only loading it with load_from_disk. I have 96 cpus, however only 1 is used for this, which is inefficient. Moreover, its usage is at 1%... This is happening in the context of a language model training, therefore I'm wasting 100$ each time I have to load the dataset from disk again (because the spot instance was stopped by aws and I need to relaunch it for example).
## Steps to reproduce the bug
Just get the oscar in spanish (around 150GGB) and try to first save in disk and then load the processed dataset. It's not dependent on the task you're doing, it just depends on the size of the text dataset.
## Expected results
I expect the dataset to be loaded in a normal time, by using the whole machine for loading it, I mean if you store the dataset in multiple files (.arrow) and then load it from multiple files, you can use multiprocessing for that and therefore don't waste so much time.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.8.0
- Platform: Ubuntu 18
- Python version: 3.8
I've seen you're planning to include a streaming mode for load_dataset, but that only saves the downloading and processing time, that's not being a problem for me, you cannot save the pure loading from disk time, therefore that's not a solution for my use case or for anyone who wants to use your library for training a language model.
There are no solutions yet unfortunately.
We're still trying to figure out a way to make the loading instantaneous on such disks, I'll keep you posted | [
-0.46947866678237915,
-0.2423023283481598,
-0.117894247174263,
0.3941161036491394,
0.24218043684959412,
0.052947916090488434,
0.19930502772331238,
0.26577088236808777,
0.4733239710330963,
0.10509949922561646,
0.053387612104415894,
0.4494889974594116,
-0.024475865066051483,
0.01359662227332592,
-0.02667674794793129,
-0.013558834791183472,
0.2004588544368744,
0.051553159952163696,
0.20939286053180695,
-0.12101804465055466,
-0.16607767343521118,
0.25316253304481506,
-0.17681938409805298,
-0.22154103219509125,
-0.2757842242717743,
-0.1387372761964798,
-0.0035660378634929657,
0.04032095894217491,
-0.06866314262151718,
-0.3196170926094055,
0.1828833967447281,
0.12443104386329651,
0.22845816612243652,
0.4482242166996002,
-0.00010555000335443765,
-0.1314770132303238,
0.133609801530838,
0.0169427040964365,
-0.36604952812194824,
-0.11348657310009003,
0.2358435094356537,
-0.24450469017028809,
0.13717858493328094,
-0.22500169277191162,
-0.09726589918136597,
0.025180645287036896,
-0.04600474238395691,
-0.46427157521247864,
0.20520518720149994,
0.10939096659421921,
0.25756096839904785,
0.305184543132782,
-0.30671918392181396,
-0.06366340070962906,
-0.00510956346988678,
0.016165684908628464,
-0.23435726761817932,
0.20388194918632507,
0.4900565445423126,
0.15265895426273346,
-0.13291078805923462,
0.3433518707752228,
-0.0540960431098938,
0.09305660426616669,
0.4101559519767761,
0.007167985197156668,
0.09535793960094452,
-0.2674489915370941,
-0.011626061052083969,
0.20360702276229858,
0.49396151304244995,
-0.05210866779088974,
-0.3432067334651947,
-0.3028441071510315,
0.14752183854579926,
-0.2496158331632614,
0.2738340198993683,
0.24136430025100708,
-0.1156349778175354,
0.1319807916879654,
-0.05376045033335686,
-0.18778017163276672,
-0.06333843618631363,
0.06810103356838226,
0.2679552435874939,
0.22535236179828644,
-0.08739820122718811,
0.010818623006343842,
0.41632208228111267,
0.11478316783905029,
0.21950167417526245,
-0.24328139424324036,
0.1509135365486145,
0.3744640648365021,
-0.5127298831939697,
-0.012459877878427505,
-0.03134438395500183,
0.2573697566986084,
-0.09772641956806183,
0.22905470430850983,
0.1536356657743454,
0.209210604429245,
-0.16614507138729095,
0.16066864132881165,
0.14464429020881653,
0.24595360457897186,
-0.08657104521989822,
-0.040212154388427734,
0.24420960247516632,
0.19768431782722473,
-0.1823558807373047,
-0.0017857812345027924,
-0.2736603915691376,
-0.15544500946998596,
0.2644678056240082,
-0.2677517235279083,
-0.1355288028717041,
-0.12847900390625,
-0.05555282533168793,
0.03888490051031113,
0.17590028047561646,
-0.14763393998146057,
0.19115333259105682,
0.3013441860675812,
-0.2921014726161957,
0.5728597044944763,
0.026015348732471466,
-0.09909948706626892,
-0.328997403383255,
-0.037529684603214264,
-0.16817240417003632,
0.07358505576848984,
-0.24965479969978333,
0.153865784406662,
0.17315979301929474,
-0.2611284852027893,
0.20465020835399628,
0.08704517036676407,
0.1814047396183014,
-0.22194881737232208,
0.2221287339925766,
-0.49225252866744995,
-0.11507133394479752,
0.15652263164520264,
0.04395538195967674,
0.2417900413274765,
0.021833503618836403,
-0.09405314922332764,
-0.37558743357658386,
0.10600357502698898,
-0.3327488303184509,
-0.4518429636955261,
-0.2468847781419754,
0.25985226035118103,
0.0015022177249193192,
-0.04004789888858795,
-0.5704129338264465,
0.11382551491260529,
0.0026699453592300415,
0.08005177974700928,
-0.15645810961723328,
-0.07962433248758316,
-0.2967780530452728,
-0.0024334746412932873,
0.3181248903274536,
0.33461689949035645,
-0.4551328122615814,
0.10217535495758057,
-0.2604033350944519,
0.07497072219848633,
0.34486091136932373,
0.5159249901771545,
-0.3132816255092621,
0.2919732630252838,
-0.14339381456375122,
0.08277302980422974,
0.2209138572216034,
-0.22198401391506195,
-0.267849862575531,
0.6216793060302734,
0.07145507633686066,
-0.07128776609897614,
0.11309126019477844,
0.257185697555542,
0.1772356927394867,
-0.03666699305176735,
0.13371695578098297,
0.5584758520126343,
0.15123720467090607,
0.2853979170322418,
-0.355366051197052,
-0.24081391096115112,
0.022847138345241547,
0.5096571445465088,
-0.2727361023426056,
-0.1557217538356781,
-0.1301405429840088,
0.38534870743751526,
0.3681561350822449,
-0.10200074315071106,
-0.04292565584182739,
0.24489301443099976,
0.14222584664821625,
0.05888524651527405,
-0.02171379141509533,
-0.05221830680966377,
-0.20949089527130127,
0.31549927592277527,
0.3402765393257141,
0.10550922900438309,
0.0518869049847126,
-0.1499325931072235,
-0.20646587014198303,
0.02697579748928547,
-0.33765336871147156,
0.08857472985982895,
0.06511714309453964,
0.07031651586294174,
0.06862114369869232,
-0.05903274193406105,
-0.29923126101493835,
0.22015169262886047,
-0.34181392192840576,
-0.11203547567129135,
-0.2888452708721161,
0.06471628695726395,
-0.0210976954549551,
0.04409967362880707,
-0.006661757826805115,
-0.10893016308546066,
-0.015062190592288971,
-0.02438800036907196,
-0.20345211029052734,
0.3786907196044922,
0.09249761700630188,
0.532304048538208,
0.18403825163841248,
-0.0338040292263031,
0.17848868668079376,
0.18578237295150757,
0.19777897000312805,
0.010507045313715935,
0.36612194776535034,
-0.16605889797210693,
-0.14045456051826477,
0.3742794990539551,
-0.060522060841321945,
0.2691721022129059,
0.20776505768299103,
-0.26578816771507263,
0.32635465264320374,
0.13591572642326355,
-0.09130065888166428,
-0.11024260520935059,
0.4074094295501709,
0.08945918083190918,
0.6007941961288452,
0.13111433386802673,
-0.3572584092617035,
-0.07625237852334976,
0.5789567232131958,
0.045001376420259476,
-0.04189860820770264,
0.30764514207839966,
0.0911252498626709,
-0.3170953392982483,
0.05019504204392433,
0.18756921589374542,
0.43101537227630615,
0.19761402904987335,
-0.004001375287771225,
-0.0328998863697052,
-0.005690552294254303,
-0.2190224528312683,
0.2751501798629761,
-0.07970499992370605,
0.4988177716732025,
0.04670475795865059,
-0.025461217388510704,
-0.006001480855047703,
-0.46274393796920776,
-0.3295347988605499,
-0.05322081595659256,
0.17680901288986206,
-0.08952055871486664,
0.21885190904140472,
-0.07536159455776215,
0.08385751396417618,
-0.25351667404174805,
0.21206942200660706,
-0.02952628955245018,
-0.10370265692472458,
-0.11983087658882141,
0.2843448221683502,
0.12040291726589203,
0.04753512144088745,
-0.15575309097766876,
0.17160508036613464,
-0.10207787156105042,
-0.22001272439956665,
-0.33873721957206726,
-0.09343014657497406,
-0.28687047958374023,
0.03510027751326561,
0.289934903383255,
0.06479194015264511,
0.31397169828414917,
-0.1468580812215805,
-0.1171036884188652,
-0.16014347970485687,
-0.019671104848384857,
-0.02573329210281372,
-0.015937238931655884,
0.17361140251159668,
-0.07210515439510345,
0.1581277996301651,
-0.18027888238430023,
-0.1895723044872284,
0.17624898254871368,
-0.29326528310775757,
0.009589439257979393,
-0.088375985622406,
-0.08601734787225723,
-0.013308977708220482,
-0.05039595812559128,
-0.464872807264328,
-0.3632453680038452,
-0.28910449147224426,
0.019004851579666138,
-0.06710000336170197,
0.1013498306274414,
-0.26160958409309387,
0.00975989643484354,
0.061943504959344864,
0.18451279401779175,
0.10329357534646988,
-0.2362317591905594,
-0.585478663444519,
0.322601854801178,
0.00498381769284606,
-0.2711997926235199,
0.021133411675691605,
0.19478175044059753,
0.26559922099113464,
-0.07991771399974823,
-0.538618266582489,
-0.04617152735590935,
-0.3027789890766144,
0.021212194114923477,
-0.30668172240257263,
0.018114008009433746,
0.10550117492675781,
-0.007771542761474848,
-0.08138812333345413,
0.09916632622480392,
-0.1694822907447815,
-0.014922760426998138,
-0.0797680988907814,
0.08361616730690002,
-0.2301025688648224,
0.2255471646785736,
0.010092459619045258,
0.41757380962371826,
0.05535857751965523,
0.07089455425739288,
0.42426618933677673,
0.24326305091381073,
0.12406119704246521,
-0.3561919033527374,
-0.1205054298043251,
0.0345829576253891,
-0.249847412109375,
-0.2961779832839966,
0.2965635061264038,
0.039026059210300446,
-0.4405567944049835,
-0.23133254051208496,
-0.03574943169951439,
-0.22015434503555298,
-0.17477156221866608,
0.07172589004039764,
-0.20131351053714752,
0.05712957680225372,
-0.048448413610458374,
0.15188482403755188,
-0.006071876734495163,
-0.04908086732029915,
-0.0065015628933906555,
0.021281659603118896,
0.09200325608253479,
-0.1481688916683197,
-0.379025399684906,
0.09609397500753403,
-0.5191193222999573,
0.11567103117704391,
-0.26079773902893066,
0.14703258872032166,
0.04201279953122139,
0.031135164201259613,
0.3150855004787445,
-0.10633201152086258,
0.6286596655845642,
0.03058880940079689,
0.12944215536117554,
0.06503616273403168,
-0.21700426936149597,
-0.4151456654071808,
0.0074844323098659515,
-0.15427783131599426,
-0.08268000185489655,
0.11758790910243988,
0.537797749042511,
-0.209642231464386,
-0.2062813639640808,
-0.21870167553424835,
0.2994833290576935,
-0.20430482923984528,
-0.3161753714084625,
-0.21044757962226868,
-0.34975114464759827,
-0.38885462284088135,
0.19379067420959473,
0.04995126277208328,
0.3467884063720703,
0.09202519804239273,
-0.012594154104590416,
-0.05988869071006775,
0.228976309299469,
0.20436125993728638,
0.07883721590042114,
0.22404271364212036,
0.00718265026807785,
0.3724561631679535,
-0.09220834076404572,
0.0635765939950943,
0.0013739559799432755,
0.4416353404521942,
-0.17141105234622955,
-0.288159042596817,
0.07083190977573395,
-0.08263342082500458,
0.22588536143302917,
0.4218270778656006,
0.023792322725057602,
-0.0086851567029953,
0.12579579651355743,
0.2253561168909073,
-0.2926577627658844,
0.0639965832233429,
0.272192120552063,
0.17819294333457947,
-0.19653432071208954,
-0.6573063135147095,
0.39481669664382935,
0.20694825053215027,
0.004693262279033661,
0.05707200989127159,
-0.18480856716632843,
-0.1417863965034485,
0.6890686750411987,
0.20151595771312714,
1.0291239023208618,
-0.1868835687637329,
0.2222970724105835,
-0.036386653780937195,
0.15556620061397552,
0.2503241300582886,
-0.4073493480682373,
-0.0044399444013834,
-0.35944581031799316,
-0.1366777867078781,
0.08785971999168396,
0.0014560595154762268,
0.13261117041110992,
0.40597325563430786,
-0.14068827033042908,
0.36198699474334717,
-0.01851537823677063,
-0.38257482647895813,
-0.2977786660194397,
0.5117340087890625,
-0.39434462785720825,
-0.6922768950462341,
-0.8247354030609131,
0.16779854893684387,
-0.08104944229125977,
0.11869823932647705,
-0.09032825380563736,
0.26411813497543335,
0.21349245309829712,
-0.13828903436660767,
-0.16505488753318787,
0.12326974421739578,
-0.116884745657444,
0.12141303718090057,
-0.3188130855560303,
-0.21663334965705872,
0.07295022904872894,
0.2318362295627594,
0.130215123295784,
0.18927647173404694,
-0.004162248224020004,
0.4877101182937622,
-0.21950727701187134,
0.21186555922031403,
0.10337785631418228,
-0.28276488184928894,
0.30819565057754517,
-0.2601313292980194,
-0.15534290671348572,
-0.20892441272735596,
-0.16405394673347473,
-0.23615293204784393,
0.30377376079559326,
0.013922829180955887,
0.13380539417266846,
0.06984139233827591,
-0.5948101878166199,
0.18908917903900146,
0.015512596815824509,
-0.2636432647705078,
0.20330509543418884,
0.24564307928085327,
-0.15353508293628693,
0.39580148458480835,
0.0596805103123188,
-0.32714778184890747,
-0.0964699536561966,
0.351558655500412,
0.1941087543964386,
-0.14445173740386963,
0.3934577703475952,
0.31674841046333313,
-0.22433927655220032,
-0.2559328079223633,
0.13723787665367126,
-0.030581049621105194,
-0.5054118037223816,
0.27522173523902893,
0.18057596683502197,
-0.03344882279634476,
-0.000636465847492218,
0.006377466022968292,
0.199187234044075,
-0.1418987214565277,
-0.11744965612888336,
-0.30699780583381653,
-0.12996287643909454,
-0.08634757995605469,
0.1642915904521942,
0.08399192243814468,
0.2119131088256836,
-0.3602118492126465,
-0.07376327365636826,
0.03950568288564682,
-0.3430841267108917,
0.12339870631694794,
-0.3643580973148346,
0.01909792236983776,
-0.12973836064338684,
-0.028014831244945526,
0.2609640657901764,
-0.017677532508969307,
0.15858282148838043,
0.05047030746936798,
-0.08422653377056122,
-0.2597212791442871,
-0.1886478066444397,
0.11824708431959152,
-0.11860207468271255,
0.04477722942829132,
0.15618814527988434,
-0.3250786066055298,
-0.2172200083732605,
-0.2890639305114746,
0.034846819937229156,
0.09805632382631302,
0.010470788925886154,
-0.09390803426504135,
0.05206812173128128,
0.1179293543100357,
-0.16053733229637146,
0.0660490095615387,
-0.08707402646541595,
0.34161466360092163,
0.06509198248386383,
0.04995822533965111,
0.3554006814956665,
-0.19649240374565125,
-0.2897409200668335,
-0.1704980731010437,
0.07359226793050766,
0.3466830551624298,
0.15832754969596863,
-0.08467055857181549,
0.08966179192066193,
0.3591149151325226,
0.33620426058769226,
0.2576811611652374,
0.02161422371864319,
-0.23134855926036835,
0.0998946875333786,
0.250257670879364,
-0.23349955677986145,
-0.29646918177604675,
-0.10218986868858337,
-0.14550921320915222,
-0.03437699005007744,
0.051073551177978516,
0.06365615129470825,
0.4499315023422241,
-0.25927382707595825,
0.08492692559957504,
0.29810830950737,
-0.2808161973953247,
0.11062385141849518,
0.2647833228111267,
0.11842238903045654,
0.18609488010406494,
0.1724984347820282,
0.0764956846833229,
0.08823823928833008,
0.7180641889572144,
-0.16749340295791626,
0.4605654180049896,
0.19905182719230652,
0.5430529713630676,
-0.13019737601280212,
-0.2953583002090454,
0.1088932454586029,
0.22788962721824646,
-0.1638677716255188,
0.1211443766951561,
0.02296125888824463,
0.21024340391159058,
-0.2791336476802826,
-0.2531222701072693,
-0.20780953764915466,
0.07987439632415771,
-0.18579623103141785,
-0.15776272118091583,
-0.05519219487905502,
0.0685933455824852,
-0.10778623074293137,
0.32358524203300476,
-0.2514152526855469,
0.15030238032341003,
0.05855090916156769,
0.29841697216033936,
0.12843093276023865,
-0.1307537704706192,
-0.04837522655725479,
-0.23938557505607605,
0.33012741804122925,
-0.23939235508441925,
0.11045492440462112,
-0.05950154364109039,
-0.13105688989162445,
-0.15046028792858124,
0.12485560029745102,
0.2495143860578537,
0.34172379970550537,
0.08623562753200531,
0.1263657957315445,
-0.11844673752784729,
0.08924618363380432,
-0.059232987463474274,
0.22258102893829346,
0.24902227520942688,
0.42939409613609314,
0.3248227536678314,
0.11821837723255157,
-0.208940327167511,
0.07473650574684143,
-0.14698339998722076,
0.2920452952384949,
-0.29949694871902466,
0.409996896982193,
0.10201516002416611,
-0.11690176278352737,
-0.4516202509403229,
0.355977326631546,
-0.24913713335990906,
0.06354562938213348,
0.39200520515441895,
-0.021529454737901688,
-0.07703965902328491,
-0.3009452521800995,
0.10126873850822449,
-0.0411062054336071,
0.6939364075660706,
0.27137210965156555,
-0.06893669813871384,
-0.293321818113327,
-0.05159448832273483,
-0.7838366031646729,
-0.011074021458625793,
-0.03577518090605736,
0.2923124432563782,
0.058651454746723175,
0.3379098176956177,
0.12905916571617126,
0.2557674050331116,
-0.05406540632247925,
-0.06818638741970062,
-0.11451686173677444,
0.16031105816364288,
-0.23669779300689697,
0.04670987278223038,
-0.15647676587104797,
0.06831126660108566,
-0.13579529523849487,
-0.48217877745628357,
0.1385391503572464,
-0.07249440252780914,
-0.04854588583111763,
-0.1844361275434494,
-0.13354648649692535,
0.008103940635919571,
0.1373855024576187,
0.48660266399383545,
0.038547925651073456,
0.023234806954860687,
-0.14708901941776276,
-0.05425314977765083,
0.0028947703540325165,
-0.04205748438835144,
-0.06616680324077606,
0.1356501281261444,
0.08471508324146271,
0.2798974812030792,
-0.06467704474925995,
0.2580753564834595,
-0.3375319540500641,
0.25990158319473267,
-0.2294948399066925,
-0.3023751378059387,
-0.25813230872154236,
-0.11023729294538498,
0.11255959421396255,
0.0064161550253629684,
0.15016181766986847,
0.3269650936126709,
0.032819632440805435,
-0.16752277314662933,
-0.38374167680740356,
-0.21133075654506683,
0.30554163455963135,
-0.013868838548660278,
-0.24952873587608337,
-0.15429730713367462,
0.20679594576358795,
0.20520877838134766,
-0.07262536883354187,
-0.5406593680381775,
0.15365341305732727,
0.16387268900871277,
0.02829761803150177,
-0.17403991520404816,
0.3224806785583496,
-0.09789225459098816,
0.04422949627041817,
-0.1590590924024582,
0.27378737926483154,
-0.12685269117355347,
-0.31263330578804016,
-0.08277985453605652,
-0.37310707569122314
] |
https://github.com/huggingface/datasets/issues/2543 | switching some low-level log.info's to log.debug? | Hi @stas00, thanks for pointing out this issue with logging.
I agree that `datasets` can sometimes be too verbose... I can create a PR and we could discuss there the choice of the log levels for different parts of the code. | In https://github.com/huggingface/transformers/pull/12276 we are now changing the examples to have `datasets` on the same log level as `transformers`, so that one setting can do a consistent logging across all involved components.
The trouble is that now we get a ton of these:
```
06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 acquired on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock
06/23/2021 12:15:31 - INFO - datasets.arrow_writer - Done writing 50 examples in 12280 bytes /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.
06/23/2021 12:15:31 - INFO - datasets.arrow_dataset - Set __getitem__(key) output type to python objects for no columns (when key is int or slice) and don't output other (un-formatted) columns.
06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 released on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock
```
May I suggest that these can be `log.debug` as it's no informative to the user.
More examples: these are not informative - too much information:
```
06/23/2021 12:14:26 - INFO - datasets.load - Checking /home/stas/.cache/huggingface/datasets/downloads/459933f1fe47711fad2f6ff8110014ff189120b45ad159ef5b8e90ea43a174fa.e23e7d1259a8c6274a82a42a8936dd1b87225302c6dc9b7261beb3bc2daac640.py for additional imports.
06/23/2021 12:14:27 - INFO - datasets.builder - Constructing Dataset for split train, validation, test, from /home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a
```
While these are:
```
06/23/2021 12:14:27 - INFO - datasets.info - Loading Dataset Infos from /home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt16/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a
06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a)
```
I also realize that `transformers` examples don't have do use `info` for `datasets` to let the default `warning` keep logging to less noisy.
But I think currently the log levels are slightly misused and skewed by 1 level. Many `warnings` will better be `info`s and most `info`s be `debug`.
e.g.:
```
06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a)
```
why is this a warning? it is informing me that the cache is used, there is nothing to be worried about. I'd have it as `info`.
Warnings are typically something that's bordering error or the first thing to check when things don't work as expected.
infrequent info is there to inform of the different stages or important events.
Everything else is debug.
At least the way I understand things.
| 41 | switching some low-level log.info's to log.debug?
In https://github.com/huggingface/transformers/pull/12276 we are now changing the examples to have `datasets` on the same log level as `transformers`, so that one setting can do a consistent logging across all involved components.
The trouble is that now we get a ton of these:
```
06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 acquired on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock
06/23/2021 12:15:31 - INFO - datasets.arrow_writer - Done writing 50 examples in 12280 bytes /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.
06/23/2021 12:15:31 - INFO - datasets.arrow_dataset - Set __getitem__(key) output type to python objects for no columns (when key is int or slice) and don't output other (un-formatted) columns.
06/23/2021 12:15:31 - INFO - datasets.utils.filelock - Lock 139627640431136 released on /home/stas/.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow.lock
```
May I suggest that these can be `log.debug` as it's no informative to the user.
More examples: these are not informative - too much information:
```
06/23/2021 12:14:26 - INFO - datasets.load - Checking /home/stas/.cache/huggingface/datasets/downloads/459933f1fe47711fad2f6ff8110014ff189120b45ad159ef5b8e90ea43a174fa.e23e7d1259a8c6274a82a42a8936dd1b87225302c6dc9b7261beb3bc2daac640.py for additional imports.
06/23/2021 12:14:27 - INFO - datasets.builder - Constructing Dataset for split train, validation, test, from /home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a
```
While these are:
```
06/23/2021 12:14:27 - INFO - datasets.info - Loading Dataset Infos from /home/stas/.cache/huggingface/modules/datasets_modules/datasets/wmt16/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a
06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a)
```
I also realize that `transformers` examples don't have do use `info` for `datasets` to let the default `warning` keep logging to less noisy.
But I think currently the log levels are slightly misused and skewed by 1 level. Many `warnings` will better be `info`s and most `info`s be `debug`.
e.g.:
```
06/23/2021 12:14:27 - WARNING - datasets.builder - Reusing dataset wmt16 (/home/stas/.cache/huggingface/datasets/wmt16/ro-en/1.0.0/0d9fb3e814712c785176ad8cdb9f465fbe6479000ee6546725db30ad8a8b5f8a)
```
why is this a warning? it is informing me that the cache is used, there is nothing to be worried about. I'd have it as `info`.
Warnings are typically something that's bordering error or the first thing to check when things don't work as expected.
infrequent info is there to inform of the different stages or important events.
Everything else is debug.
At least the way I understand things.
Hi @stas00, thanks for pointing out this issue with logging.
I agree that `datasets` can sometimes be too verbose... I can create a PR and we could discuss there the choice of the log levels for different parts of the code. | [
0.17252162098884583,
-0.34119725227355957,
0.08715642988681793,
0.20244310796260834,
0.2560836672782898,
0.11248650401830673,
0.5520285964012146,
0.31011271476745605,
-0.07186107337474823,
-0.30187129974365234,
-0.04163770377635956,
0.17572881281375885,
-0.21787182986736298,
0.28082919120788574,
0.050380293279886246,
-0.16351953148841858,
-0.0827341303229332,
-0.011046938598155975,
-0.22705838084220886,
-0.09307298064231873,
-0.021676605567336082,
0.22455066442489624,
-0.04603536054491997,
0.2822228670120239,
-0.4451567828655243,
-0.2340545654296875,
0.18678413331508636,
0.1414615958929062,
0.21268944442272186,
-0.47432267665863037,
0.0037439893931150436,
-0.016443327069282532,
0.04301540553569794,
-0.029056765139102936,
-0.00012339101522229612,
0.18065907061100006,
0.39627373218536377,
-0.040211476385593414,
-0.4393545687198639,
0.09134794026613235,
-0.49993905425071716,
-0.4355214834213257,
0.29871147871017456,
-0.16710016131401062,
0.24135589599609375,
-0.6675630211830139,
0.35597309470176697,
-0.3311724364757538,
0.22117310762405396,
0.20892105996608734,
0.10229182988405228,
0.1760016828775406,
-0.3780127763748169,
0.02496705949306488,
0.4033842086791992,
0.4810088872909546,
-0.1526443362236023,
0.107023224234581,
0.23689594864845276,
0.09213577955961227,
-0.15624359250068665,
0.37860116362571716,
0.012076279148459435,
-0.15976926684379578,
0.34219828248023987,
0.19476103782653809,
0.42853179574012756,
0.04832255840301514,
0.23846971988677979,
0.3680720031261444,
0.09616883844137192,
-0.3306322395801544,
-0.4083084464073181,
-0.6607725620269775,
0.09071025252342224,
-0.10628591477870941,
-0.09579955786466599,
-0.09717845171689987,
-0.18480946123600006,
0.26381412148475647,
-0.14933985471725464,
-0.12741008400917053,
0.03645312041044235,
-0.2127595990896225,
0.21458235383033752,
-0.08870373666286469,
-0.3330811560153961,
0.08591047674417496,
-0.08009539544582367,
-0.24736933410167694,
0.0023986520245671272,
-0.09614650905132294,
-0.19397656619548798,
-0.1913667917251587,
-0.022467460483312607,
-0.1187933087348938,
0.1438094973564148,
0.08722865581512451,
-0.05083133280277252,
0.28794020414352417,
0.03606420382857323,
0.04216273874044418,
0.21655945479869843,
-0.034335941076278687,
0.13425584137439728,
0.13074684143066406,
0.5509588718414307,
0.2441016286611557,
0.207519069314003,
-0.008193502202630043,
0.37904810905456543,
-0.11008169502019882,
-0.07710094004869461,
-0.05461488291621208,
0.08756574988365173,
0.13993313908576965,
0.4767225384712219,
-0.23332767188549042,
-0.17095425724983215,
-0.04309113696217537,
-0.05431241914629936,
0.009957268834114075,
0.0024804454296827316,
0.21849676966667175,
0.45962783694267273,
0.17078417539596558,
0.17125600576400757,
0.18594925105571747,
0.209877148270607,
0.1148032620549202,
-0.06883199512958527,
-0.21835768222808838,
-0.1541643589735031,
0.21629858016967773,
0.0351497046649456,
-0.042030707001686096,
0.2268223762512207,
0.0731881707906723,
0.1887262761592865,
-0.11756784468889236,
0.06996824592351913,
0.2732219994068146,
0.13563568890094757,
0.2352602779865265,
-0.5406375527381897,
0.2473054677248001,
0.15590019524097443,
-0.36067771911621094,
-0.3538209795951843,
0.06262107193470001,
-0.10022412985563278,
-0.3030189573764801,
-0.043927863240242004,
-0.021031834185123444,
-0.30158865451812744,
0.15100383758544922,
-0.031589575111866,
0.3249501883983612,
0.06783957779407501,
0.27033984661102295,
0.39800548553466797,
0.013917949050664902,
0.21479883790016174,
0.023118171840906143,
0.011435354128479958,
0.422102689743042,
-0.03855153173208237,
-0.6235333681106567,
-0.42718347907066345,
-0.05679536238312721,
0.09832929074764252,
0.07234285771846771,
-0.033057406544685364,
0.2198326289653778,
-0.11255709826946259,
-0.05025875195860863,
0.19164499640464783,
-0.3836284875869751,
0.2618418037891388,
0.4828166961669922,
-0.2888582646846771,
0.1380433291196823,
0.44214609265327454,
0.08502842485904694,
-0.07839608937501907,
-0.07494232803583145,
0.18107682466506958,
-0.1197182685136795,
0.033734437078237534,
-0.032699257135391235,
-0.1435084193944931,
-0.3740643560886383,
-0.1517738699913025,
0.004464317113161087,
-0.0677134096622467,
0.2607998549938202,
-0.17339426279067993,
0.3144974410533905,
0.17975345253944397,
-0.11503732204437256,
0.01279184129089117,
0.07812170684337616,
0.24593158066272736,
-0.22558729350566864,
0.09055115282535553,
0.08107325434684753,
-0.5876048803329468,
0.0058918483555316925,
-0.32144612073898315,
0.041676513850688934,
-0.18735580146312714,
-0.48089420795440674,
-0.15566441416740417,
-0.1422928273677826,
0.15969990193843842,
-0.415012925863266,
-0.019260544329881668,
0.12585653364658356,
-0.20733320713043213,
-0.19928231835365295,
-0.4069603979587555,
0.010997038334608078,
-0.09869653731584549,
0.27725204825401306,
-0.35630738735198975,
0.15482932329177856,
0.34437039494514465,
0.1146942600607872,
-0.15310800075531006,
0.07634635269641876,
0.1397605538368225,
-0.06510479748249054,
0.15485280752182007,
0.3248724341392517,
0.017969956621527672,
0.6038204431533813,
0.13064903020858765,
0.41662442684173584,
0.058229684829711914,
0.07673034071922302,
0.14458556473255157,
0.07606677711009979,
-0.14952151477336884,
0.15238046646118164,
-0.0657384917140007,
0.41619545221328735,
0.06369028985500336,
0.28110185265541077,
0.01993776112794876,
0.11841226369142532,
-0.2317800372838974,
-0.17108763754367828,
-0.4485034942626953,
-0.33691564202308655,
0.1558884084224701,
-0.0243380106985569,
0.122560054063797,
0.18303368985652924,
-0.2320762574672699,
0.1382426768541336,
0.4867061674594879,
-0.3173240125179291,
0.02399309352040291,
0.12979672849178314,
-0.26567065715789795,
0.15800711512565613,
0.23224598169326782,
0.3231050670146942,
0.2867383360862732,
0.23946991562843323,
0.06873787194490433,
0.19810174405574799,
0.18020780384540558,
0.023949697613716125,
0.2909262478351593,
0.20729586482048035,
-0.09710343927145004,
0.11773437261581421,
-0.1308978796005249,
-0.14484038949012756,
0.1288962960243225,
0.03788122907280922,
-0.2107934057712555,
0.013221265748143196,
-0.42295530438423157,
0.29869258403778076,
-0.28061625361442566,
-0.2747737765312195,
-0.5732256174087524,
0.1672842651605606,
-0.2866934835910797,
-0.44871804118156433,
0.14929556846618652,
-0.3464493155479431,
-0.3457980155944824,
0.31948503851890564,
-0.03447716683149338,
0.5397184491157532,
-0.10215847939252853,
0.1989438235759735,
-0.4335130453109741,
-0.06863778084516525,
-0.03415001928806305,
-0.03566223382949829,
0.13881175220012665,
0.1156112477183342,
0.0614185631275177,
-0.28356707096099854,
-0.15464739501476288,
-0.22539833188056946,
-0.3233312666416168,
0.16909535229206085,
-0.20620831847190857,
0.2027803361415863,
0.25508320331573486,
-0.02273038774728775,
0.06220318377017975,
-0.3148326277732849,
-0.11034398525953293,
-0.06736782938241959,
-0.05748111754655838,
0.017110224813222885,
-0.07261006534099579,
0.35112908482551575,
-0.2880999743938446,
-0.03999120742082596,
0.1052839532494545,
-0.3069510757923126,
0.7045115828514099,
-0.3959384262561798,
0.12198702991008759,
0.6507042050361633,
-0.2035202831029892,
0.4366969168186188,
-0.08261755853891373,
0.3348899781703949,
0.18824200332164764,
-0.05185479670763016,
0.09564533829689026,
-0.04618489369750023,
0.27138522267341614,
-0.5008629560470581,
-0.10190217941999435,
-0.27135252952575684,
-0.139153853058815,
-0.5069959759712219,
-0.2255192995071411,
-0.4302299916744232,
-0.460437148809433,
0.23047727346420288,
0.0909765213727951,
-0.05869777500629425,
0.17006056010723114,
-0.042184777557849884,
0.13220569491386414,
-0.27192527055740356,
0.15502144396305084,
-0.13301292061805725,
-0.008953094482421875,
0.06388090550899506,
0.13648895919322968,
0.1463650017976761,
0.43435728549957275,
0.39732837677001953,
0.0051053352653980255,
-0.5073901414871216,
0.06412409245967865,
0.31718558073043823,
0.028321340680122375,
-0.24402892589569092,
-0.13859803974628448,
0.020797044038772583,
-0.3648216128349304,
-0.06746675074100494,
0.10585862398147583,
0.17663191258907318,
0.1004243940114975,
0.23104259371757507,
0.011202704161405563,
-0.479942262172699,
0.0750439390540123,
-0.21514278650283813,
-0.11999707669019699,
-0.22614140808582306,
0.38980042934417725,
-0.09578098356723785,
0.054086193442344666,
0.14183157682418823,
0.3962554335594177,
-0.033238597214221954,
-0.05897795036435127,
-0.3074738085269928,
-0.18908892571926117,
-0.5284598469734192,
0.42523419857025146,
-0.08457089960575104,
0.05482710152864456,
-0.17125459015369415,
-0.6365633010864258,
0.022523686289787292,
0.2913701832294464,
-0.07312779128551483,
-0.035255640745162964,
0.06590889394283295,
0.2296977937221527,
0.032777637243270874,
-0.29010796546936035,
-0.09540599584579468,
-0.4920998811721802,
0.45128756761550903,
0.4576258361339569,
0.5969659686088562,
-0.44748544692993164,
-0.3959900736808777,
0.19128647446632385,
-0.24006012082099915,
-0.00761827826499939,
0.20112201571464539,
-0.21852996945381165,
-0.07689973711967468,
-0.10535626858472824,
-0.3052050769329071,
0.1202368214726448,
-0.07214675098657608,
-0.45182403922080994,
0.18429675698280334,
0.045441027730703354,
0.10270047932863235,
0.39308446645736694,
0.10823732614517212,
0.0826006680727005,
-0.022183414548635483,
0.05954429879784584,
0.24802756309509277,
0.19855715334415436,
0.02724204957485199,
0.5696776509284973,
0.03468744829297066,
-0.3558320701122284,
0.010421383194625378,
0.099077008664608,
0.2703762650489807,
0.6357892751693726,
-0.16299335658550262,
0.3763468861579895,
0.25636500120162964,
0.3062865734100342,
-0.3317091166973114,
0.15757860243320465,
0.3540697395801544,
0.22531266510486603,
-0.36838993430137634,
0.0830777958035469,
0.6284781098365784,
0.1544094979763031,
-0.18893060088157654,
0.5192849636077881,
0.5616201758384705,
-0.4118128716945648,
0.26867347955703735,
-0.05771859735250473,
1.0515269041061401,
-0.07872720062732697,
0.22432199120521545,
-0.15755310654640198,
-0.4803355932235718,
0.6950421929359436,
0.24165721237659454,
0.1644822359085083,
-0.3481086492538452,
-0.16831636428833008,
0.112530916929245,
-0.19303767383098602,
0.2504833936691284,
0.01738918572664261,
-0.20886564254760742,
-0.11951159685850143,
-0.2981642484664917,
0.21471071243286133,
-0.19591692090034485,
0.1088661253452301,
-0.29284027218818665,
-0.20476877689361572,
-0.5198531746864319,
-0.07585060596466064,
-0.031085222959518433,
0.10965955257415771,
-0.04274308681488037,
-0.14580143988132477,
-0.012234710156917572,
-0.1332198679447174,
-0.4343959093093872,
-0.4371868073940277,
0.3731704652309418,
0.011754687875509262,
0.4163283705711365,
-0.3817230463027954,
0.030349168926477432,
0.10533791035413742,
0.3178357183933258,
0.07706272602081299,
-0.0895015224814415,
-0.09417259693145752,
-0.17072927951812744,
0.18126729130744934,
0.10490911453962326,
-0.006799823604524136,
0.24358603358268738,
0.22937041521072388,
-0.07940255105495453,
0.1551424264907837,
0.06029418855905533,
-0.19930751621723175,
0.023305490612983704,
-0.2982434034347534,
-0.3991324305534363,
-0.25357115268707275,
0.4907607436180115,
0.2858043909072876,
-0.014448463916778564,
0.026336845010519028,
0.009671291336417198,
0.11967606842517853,
-0.047810137271881104,
-0.026443175971508026,
0.13513940572738647,
-0.5101815462112427,
-0.006517428904771805,
0.20703858137130737,
-0.025046680122613907,
-0.022849921137094498,
0.2854450047016144,
-0.06485466659069061,
-0.11463576555252075,
-0.035361528396606445,
0.41345784068107605,
0.33528128266334534,
-0.47404050827026367,
0.39155423641204834,
-0.0885796919465065,
-0.27428916096687317,
-0.11221236735582352,
0.019424907863140106,
0.22735728323459625,
0.10049495100975037,
-0.3486250936985016,
0.0035253912210464478,
-0.5281167030334473,
0.6595488786697388,
-0.01818615198135376,
0.3323078453540802,
-0.40168964862823486,
0.0708376094698906,
-0.14904570579528809,
-0.09034755825996399,
-0.19158558547496796,
-0.06198345124721527,
-0.2875714898109436,
0.05505089461803436,
0.03138459473848343,
-0.061277441680431366,
0.3700449764728546,
0.12348327040672302,
0.03752794861793518,
-0.22599853575229645,
-0.06903025507926941,
0.022740069776773453,
-0.07921098917722702,
0.16768671572208405,
-0.255517840385437,
-0.2914043962955475,
0.147995725274086,
0.01309717446565628,
0.08951036632061005,
-0.19120731949806213,
0.46581602096557617,
0.478066086769104,
0.19950084388256073,
0.49645745754241943,
-0.30062419176101685,
0.26927727460861206,
0.006998911499977112,
-0.16029077768325806,
0.26435166597366333,
0.25560128688812256,
-0.017801200971007347,
0.17726199328899384,
-0.34852784872055054,
0.07264082133769989,
0.2780471742153168,
0.43252792954444885,
0.03825714439153671,
0.05313459038734436,
0.08974999934434891,
0.17920628190040588,
-0.23109599947929382,
0.12106432020664215,
0.08410941809415817,
0.40485453605651855,
-0.1895448863506317,
0.11147281527519226,
-0.23155155777931213,
0.027310548350214958,
0.0749087780714035,
0.11555775254964828,
-0.1632499396800995,
-0.031542886048555374,
0.005529280751943588,
0.46064409613609314,
-0.1514125019311905,
-0.18613027036190033,
0.510566771030426,
0.027987699955701828,
-0.17617759108543396,
-0.036770425736904144,
0.3669157028198242,
0.2180604636669159,
-0.15188677608966827,
-0.09311237931251526,
0.37154948711395264,
0.11891898512840271,
0.35616573691368103,
-0.18375156819820404,
0.0892961323261261,
0.15747351944446564,
-0.34929367899894714,
0.09682697057723999,
0.1640320122241974,
-0.03518794849514961,
-0.0019461028277873993,
0.36013859510421753,
-0.3140524923801422,
0.07499627768993378,
0.07710658758878708,
0.22599169611930847,
0.07864324748516083,
0.0234907828271389,
-0.06489066779613495,
-0.2727419137954712,
-0.10090888291597366,
-0.36511141061782837,
0.35157185792922974,
-0.04304857552051544,
-0.2642076909542084,
-0.260712206363678,
-0.03272419050335884,
-0.32777339220046997,
0.1657455563545227,
-0.19169627130031586,
-0.008769243955612183,
-0.012379702180624008,
0.0968671515583992,
0.07289829105138779,
0.6242201924324036,
-0.22670792043209076,
-0.11021057516336441,
0.21850648522377014,
0.2157103717327118,
0.4750942587852478,
0.5750283002853394,
0.4337752163410187,
0.019205687567591667,
-0.06542547047138214,
0.18292023241519928,
0.180128276348114,
0.07729031890630722,
0.14164859056472778,
0.4321017265319824,
-0.2179042100906372,
0.018548503518104553,
0.10323025286197662,
0.047598324716091156,
0.05346211791038513,
-0.12792053818702698,
-0.24347899854183197,
-0.0033821333199739456,
-0.3434654474258423,
0.7594905495643616,
-0.19949980080127716,
-0.1174691915512085,
0.13082972168922424,
-0.14526492357254028,
-0.3394356966018677,
-0.5112388134002686,
0.40273943543434143,
0.14485648274421692,
0.030418328940868378,
0.07095960527658463,
0.0536247193813324,
-0.26606571674346924,
0.14133679866790771,
0.32065248489379883,
0.2523713707923889,
-0.008295555599033833,
0.06247138977050781,
-0.09554950892925262,
0.05397099629044533,
0.25192537903785706,
-0.17334198951721191,
0.042926933616399765,
-0.1633804440498352,
0.1606699526309967,
0.14176322519779205,
0.14818331599235535,
-0.26564767956733704,
-0.0633651539683342,
-0.14379914104938507,
-0.2084697186946869,
-0.12320810556411743,
0.034256961196660995,
-0.10477075725793839,
0.11501447856426239,
-0.07542943209409714,
0.1405274122953415,
0.10807424783706665,
-0.11163099110126495,
-0.10779280960559845,
-0.037413790822029114,
0.23068788647651672,
0.26616787910461426,
0.20558203756809235,
0.12155230343341827,
-0.1538720428943634,
0.06118902564048767,
-0.6028903722763062,
-0.18885073065757751,
-0.38939452171325684,
-0.16321401298046112,
0.15789911150932312,
-0.2710791826248169,
-0.030937397852540016,
-0.2790287733078003,
-0.16476106643676758,
-0.20686672627925873,
0.11502038687467575,
0.12343277037143707,
-0.1767788529396057,
-0.20392274856567383,
0.17640390992164612,
-0.21286067366600037,
-0.1381819099187851,
0.05122450366616249,
0.3176153004169464,
0.0969870388507843,
0.09997080266475677,
-0.15032313764095306,
-0.24951449036598206,
0.5768628120422363,
-0.2938450574874878,
-0.09680356085300446,
0.24877463281154633,
0.5207480192184448,
0.13780443370342255,
-0.1285877674818039,
-0.6660386919975281,
-0.15484046936035156,
0.25297635793685913,
-0.3253519833087921,
0.1031189113855362,
0.00393134169280529,
-0.34821054339408875,
-0.12316110730171204,
-0.18256479501724243,
0.2663158178329468,
0.07339657843112946,
0.04313205927610397,
-0.05643016844987869,
-0.3381460905075073
] |
https://github.com/huggingface/datasets/issues/2542 | `datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA` | Hi @VictorSanh, thank you for reporting this issue with duplicated keys.
- The issue with "adversarial_qa" was fixed 23 days ago: #2433. Current version of `datasets` (1.8.0) includes the patch.
- I am investigating the issue with `drop`. I'll ping you to keep you informed. | ## Describe the bug
Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("drop")
load_dataset("adversarial_qa", "adversarialQA")
```
## Expected results
The examples keys should be unique.
## Actual results
```bash
>>> load_dataset("drop")
Using custom data configuration default
Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset
use_auth_token=use_auth_token,
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyArrow version: 3.0.0
| 45 | `datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA`
## Describe the bug
Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("drop")
load_dataset("adversarial_qa", "adversarialQA")
```
## Expected results
The examples keys should be unique.
## Actual results
```bash
>>> load_dataset("drop")
Using custom data configuration default
Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset
use_auth_token=use_auth_token,
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyArrow version: 3.0.0
Hi @VictorSanh, thank you for reporting this issue with duplicated keys.
- The issue with "adversarial_qa" was fixed 23 days ago: #2433. Current version of `datasets` (1.8.0) includes the patch.
- I am investigating the issue with `drop`. I'll ping you to keep you informed. | [
-0.09050922095775604,
-0.11600782722234726,
0.009455222636461258,
0.4709087610244751,
0.08408688753843307,
0.028658263385295868,
0.30280911922454834,
0.23976516723632812,
0.12779779732227325,
0.18143567442893982,
-0.14392246305942535,
0.5057469010353088,
-0.0482957661151886,
0.11989355832338333,
0.026669977232813835,
-0.032785311341285706,
0.0012848153710365295,
0.01367226243019104,
-0.29828009009361267,
-0.07620969414710999,
-0.24264028668403625,
0.38705042004585266,
-0.25591525435447693,
0.10335329174995422,
0.059840645641088486,
-0.10427584499120712,
-0.15724648535251617,
0.3131023347377777,
-0.043365851044654846,
-0.28979501128196716,
0.14072522521018982,
0.01125418022274971,
-0.2836557924747467,
0.4620525538921356,
-0.00010877363092731684,
-0.01796037331223488,
0.1347588449716568,
0.06381097435951233,
-0.4384637475013733,
-0.15688736736774445,
-0.25148576498031616,
-0.0515587255358696,
-0.08784874528646469,
-0.27699756622314453,
0.13033220171928406,
-0.20240220427513123,
-0.31931450963020325,
-0.3765529990196228,
0.7059353590011597,
0.09643091261386871,
0.2584538459777832,
0.29944393038749695,
0.05786709114909172,
-0.2653633654117584,
0.19034378230571747,
0.03764466568827629,
-0.19947932660579681,
0.2062627524137497,
-0.01475638896226883,
-0.06700717657804489,
0.35418596863746643,
0.16036783158779144,
-0.014585207216441631,
-0.05064019188284874,
0.2040342092514038,
0.06789509207010269,
0.012983661144971848,
-0.1696084439754486,
0.3404414653778076,
0.3239113688468933,
0.24727863073349,
-0.5006272792816162,
-0.200029656291008,
-0.2800813615322113,
0.28446680307388306,
-0.08955443650484085,
0.1983645260334015,
0.04119741916656494,
-0.24880799651145935,
0.14263390004634857,
0.06654759496450424,
0.13136279582977295,
0.058746665716171265,
-0.07923673093318939,
0.15524940192699432,
-0.000643610954284668,
0.04973182454705238,
0.08948955684900284,
0.1573435366153717,
-0.17231151461601257,
-0.01850929483771324,
-0.3647032380104065,
0.019966769963502884,
-0.12551504373550415,
-0.5385665893554688,
0.01297680288553238,
-0.06292916089296341,
0.025669895112514496,
0.43645167350769043,
0.07410338521003723,
0.22148628532886505,
-0.09840617328882217,
-0.048247329890728,
0.0024124905467033386,
0.039903368800878525,
0.3961122930049896,
0.17628920078277588,
0.0912107452750206,
0.15046770870685577,
0.1907208412885666,
-0.23070892691612244,
0.16413000226020813,
0.0568988099694252,
-0.1409798264503479,
0.2863468825817108,
0.15518811345100403,
0.6009867787361145,
-0.06930527836084366,
-0.4248119592666626,
0.2033163607120514,
-0.1676325649023056,
-0.12456643581390381,
-0.23273131251335144,
0.11765453219413757,
0.09356663376092911,
-0.02190280333161354,
-0.12567844986915588,
0.20161724090576172,
-0.3297654092311859,
-0.1748305857181549,
-0.26098716259002686,
-0.012508802115917206,
-0.008571211248636246,
-0.07222948968410492,
0.08384160697460175,
-0.18119747936725616,
0.2779172360897064,
0.3087559938430786,
-0.004612363874912262,
-0.13791513442993164,
0.2745805084705353,
0.09290957450866699,
-0.2666790187358856,
0.039834316819906235,
0.17050132155418396,
0.06689628958702087,
0.187930166721344,
-0.36020171642303467,
0.060028158128261566,
0.11222150176763535,
-0.02895195782184601,
-0.12868724763393402,
-0.11769159138202667,
0.31581398844718933,
0.02569347620010376,
0.0972316712141037,
-0.17660671472549438,
0.14941149950027466,
0.1119302362203598,
0.09068112075328827,
-0.004402965307235718,
0.039073094725608826,
-0.15989020466804504,
-0.42874670028686523,
0.2847692370414734,
0.7104173302650452,
-0.32561078667640686,
-0.13195288181304932,
-0.1431189477443695,
0.030178826302289963,
0.14422614872455597,
0.22938235104084015,
-0.17597950994968414,
0.20838063955307007,
-0.30010396242141724,
0.11739243566989899,
0.08310479670763016,
-0.3428846001625061,
-0.49173375964164734,
0.29088062047958374,
-0.35438984632492065,
0.19002637267112732,
0.17368590831756592,
-0.055167246609926224,
0.21536986529827118,
-0.002511346712708473,
0.011650808155536652,
-0.016548283398151398,
-0.09076032787561417,
-0.135310098528862,
-0.3101503252983093,
-0.33662477135658264,
0.17491364479064941,
-0.26377519965171814,
0.028483567759394646,
0.06559865921735764,
0.3573915958404541,
-0.07049848139286041,
0.28687211871147156,
-0.06102394685149193,
0.04679004102945328,
0.0863298699259758,
0.25373491644859314,
-0.06032758951187134,
0.2205081284046173,
-0.019394395872950554,
-0.5272818207740784,
0.3890168070793152,
-0.28561919927597046,
0.038964107632637024,
-0.15008316934108734,
-0.2936633229255676,
-0.5489761233329773,
0.05413760989904404,
-0.4572043716907501,
-0.2501847445964813,
0.24877017736434937,
0.19140979647636414,
-0.02845698408782482,
0.11421270668506622,
-0.06473425775766373,
0.22202633321285248,
0.044939957559108734,
0.04901495575904846,
-0.4242558777332306,
0.2599349617958069,
-0.3817823529243469,
0.05268125236034393,
0.08389703929424286,
0.21358025074005127,
0.4154094457626343,
-0.053219281136989594,
-0.1252104938030243,
0.3929845988750458,
-0.03628501668572426,
0.015139222145080566,
0.20108699798583984,
-0.1390542834997177,
0.2122400850057602,
-0.13536463677883148,
0.2662818133831024,
0.10705898702144623,
0.1830836981534958,
-0.13982409238815308,
-0.012119241058826447,
0.27618101239204407,
-0.18503925204277039,
0.15243873000144958,
-0.05690854787826538,
-0.005315426737070084,
0.13712705671787262,
-0.2301725298166275,
0.1511041224002838,
-0.21829111874103546,
0.0741770938038826,
-0.10675747692584991,
0.17586985230445862,
-0.032506078481674194,
-0.1456291675567627,
0.17780646681785583,
0.1834476739168167,
-0.1542726457118988,
0.1718086302280426,
-0.047923170030117035,
0.03277852386236191,
-0.09463900327682495,
0.025892427191138268,
0.5896530151367188,
0.683296263217926,
0.18402734398841858,
0.09309865534305573,
0.18257738649845123,
0.010152931325137615,
-0.1736520677804947,
0.40181440114974976,
-0.23067738115787506,
-0.18794602155685425,
0.33995547890663147,
0.1338030993938446,
0.09127595275640488,
-0.3779134154319763,
-0.07041890919208527,
0.13940849900245667,
0.2234368622303009,
-0.2576557397842407,
-0.013610977679491043,
-0.415109246969223,
-0.04335921257734299,
-0.14741533994674683,
0.25531062483787537,
-0.016330502927303314,
-0.32888713479042053,
0.10039745271205902,
-0.17009955644607544,
0.03780665621161461,
0.282754123210907,
-0.08029681444168091,
0.21931681036949158,
-0.02551322802901268,
0.311676025390625,
-0.17848211526870728,
0.06612176448106766,
-0.2623884677886963,
0.12386369705200195,
0.08686472475528717,
0.13113074004650116,
0.4407130777835846,
-0.14069896936416626,
-0.3182713985443115,
-0.3026200830936432,
-0.2035520374774933,
0.1379108428955078,
-0.01049896702170372,
0.35646405816078186,
0.38501983880996704,
0.01861260086297989,
-0.1929825246334076,
-0.35720327496528625,
0.2555495500564575,
-0.09539634734392166,
-0.45416396856307983,
0.0896257609128952,
-0.09871333092451096,
0.030876940116286278,
-0.19220107793807983,
-0.5104909539222717,
-0.1726355254650116,
-0.25201019644737244,
0.07736116647720337,
-0.1438826024532318,
0.1406257450580597,
0.33112236857414246,
-0.03031139448285103,
0.14079813659191132,
0.026042243465781212,
0.09881488978862762,
-0.43476518988609314,
-0.18414676189422607,
0.06020423397421837,
-0.2762191593647003,
-0.2974783778190613,
-0.016933444887399673,
-0.12270303815603256,
0.31571444869041443,
-0.11578937619924545,
-0.45640838146209717,
-0.3070780336856842,
-0.24925662577152252,
0.34092918038368225,
-0.18406984210014343,
0.2868573069572449,
0.16756945848464966,
0.1474982053041458,
-0.14265553653240204,
-0.2416715919971466,
-0.05387771129608154,
0.2804364860057831,
-0.2117331624031067,
0.04008002579212189,
0.15095104277133942,
0.5182061791419983,
0.07246732711791992,
0.613350510597229,
0.5002941489219666,
0.08827383071184158,
0.27911826968193054,
-0.09282289445400238,
0.2891694903373718,
-0.17085057497024536,
-0.4779529273509979,
-0.2943902909755707,
0.16617031395435333,
0.20613357424736023,
0.22674331068992615,
-0.1307830810546875,
0.12601466476917267,
0.09188006818294525,
-0.09142698347568512,
-0.49831822514533997,
-0.2809927463531494,
-0.2584253251552582,
-0.20793604850769043,
0.05941671505570412,
0.05599001422524452,
0.09442944079637527,
-0.058903783559799194,
0.15206953883171082,
0.1882857084274292,
0.15231339633464813,
0.025004617869853973,
0.02369157038629055,
-0.3282141089439392,
0.0291180070489645,
-0.4109376072883606,
0.2250794768333435,
-0.20890143513679504,
0.32131415605545044,
-0.11749501526355743,
0.12020639330148697,
0.027809888124465942,
-0.010814817622303963,
0.6370678544044495,
-0.36702272295951843,
0.164679616689682,
0.08423075079917908,
-0.15883785486221313,
-0.1211828961968422,
-0.03015727549791336,
-0.013596851378679276,
0.1148907020688057,
-0.031581953167915344,
0.2285151332616806,
-0.5454475283622742,
0.13114629685878754,
0.20340494811534882,
0.2716735899448395,
-0.17419381439685822,
-0.2394862174987793,
-0.03875144198536873,
-0.4927270710468292,
-0.4985894560813904,
-0.14774322509765625,
0.011749135330319405,
0.2282526195049286,
-0.16526514291763306,
-0.050620853900909424,
0.015709267929196358,
-0.17145749926567078,
0.17753508687019348,
0.14794696867465973,
0.26217132806777954,
0.21577902138233185,
0.6348118782043457,
0.1356799304485321,
-0.15211303532123566,
0.16173985600471497,
0.6787904500961304,
-0.1573689579963684,
-0.21830326318740845,
-0.28060662746429443,
-0.17293204367160797,
-0.22477301955223083,
0.27547210454940796,
-0.14847491681575775,
0.30072182416915894,
-0.14159078896045685,
0.020462386310100555,
0.2139429897069931,
-0.314827561378479,
0.20353151857852936,
-0.16996712982654572,
0.008936280384659767,
-0.3534315824508667,
0.01571226865053177,
-0.058617569506168365,
-0.2973245084285736,
0.1694917380809784,
0.14233961701393127,
-0.22121040523052216,
0.36613303422927856,
-0.191665381193161,
0.8777393698692322,
-0.0657743364572525,
0.0092347152531147,
0.16281980276107788,
-0.22479720413684845,
0.36184099316596985,
0.09007808566093445,
-0.1640418916940689,
-0.46123361587524414,
-0.300560861825943,
0.1581873893737793,
0.05173216387629509,
0.15665844082832336,
0.1095845103263855,
-0.2995372414588928,
0.2086395025253296,
-0.11819273233413696,
0.09699177742004395,
-0.04756685346364975,
0.28759631514549255,
-0.2880069613456726,
0.07010509073734283,
-0.11886999011039734,
0.14614950120449066,
0.0694420337677002,
0.049491748213768005,
0.04896331578493118,
-0.11717869341373444,
0.19886687397956848,
-0.48689717054367065,
-0.20589908957481384,
0.03362574800848961,
-0.39236724376678467,
0.328644335269928,
-0.11808560788631439,
-0.33705630898475647,
0.20586122572422028,
0.43076473474502563,
0.4622993469238281,
0.24825088679790497,
0.018758272752165794,
0.054629117250442505,
-0.0069998204708099365,
0.2869380712509155,
-0.12581844627857208,
-0.23437203466892242,
-0.011666456237435341,
-0.11056119203567505,
-0.3548024296760559,
-0.10906893759965897,
0.15375147759914398,
-0.08207832276821136,
-0.24886178970336914,
0.11522752046585083,
-0.06754450500011444,
-0.12466583400964737,
0.023433171212673187,
-0.14110960066318512,
-0.17765362560749054,
-0.443471223115921,
0.1303863227367401,
0.131235733628273,
-0.17544025182724,
0.22193661332130432,
-0.18838070333003998,
-0.15587621927261353,
-0.0415973998606205,
0.33970147371292114,
0.18831932544708252,
0.24744150042533875,
0.5482302904129028,
0.05515531823039055,
0.042594172060489655,
-0.25317543745040894,
-0.007690757513046265,
0.04062715172767639,
-0.4769056439399719,
0.1915142685174942,
-0.2640382945537567,
0.1442861109972,
0.10886913537979126,
0.3577154874801636,
0.21712316572666168,
0.1366262286901474,
0.16879902780056,
-0.30376431345939636,
-0.12698706984519958,
0.029950693249702454,
0.19083240628242493,
0.21747389435768127,
0.1731238067150116,
-0.01919136568903923,
-0.1452849805355072,
0.32744836807250977,
-0.3689515292644501,
0.23783792555332184,
-0.0046662501990795135,
-0.010238289833068848,
0.0007041934877634048,
-0.11995095759630203,
0.039675649255514145,
0.11998680233955383,
0.20290961861610413,
0.2261534184217453,
-0.055935658514499664,
-0.26797303557395935,
-0.2521996796131134,
0.13160139322280884,
-0.21849817037582397,
-0.16821487247943878,
-0.06940288841724396,
-0.2364598512649536,
-0.05867346003651619,
-0.08391782641410828,
0.4266137480735779,
0.13718321919441223,
0.002995133399963379,
0.15787816047668457,
0.15296731889247894,
0.14564645290374756,
-0.16318055987358093,
0.18801647424697876,
-0.2690671682357788,
0.016333095729351044,
0.14150021970272064,
0.09483471512794495,
-0.01895091123878956,
-0.17155222594738007,
-0.33726733922958374,
0.08269424736499786,
-0.056047648191452026,
0.17796501517295837,
0.27852192521095276,
-0.20525206625461578,
-0.2647087872028351,
0.4296850860118866,
0.2974279820919037,
0.0996672660112381,
-0.19868674874305725,
0.005100809037685394,
0.03359616547822952,
0.27050530910491943,
-0.39920347929000854,
-0.43699291348457336,
0.17191778123378754,
-0.13999778032302856,
0.11391361057758331,
0.3059447407722473,
0.22545874118804932,
-0.3515101671218872,
-0.27867400646209717,
0.11731939762830734,
0.38347434997558594,
-0.08047927916049957,
0.2226230502128601,
0.4485836625099182,
-0.08547058701515198,
-0.07634773850440979,
0.02651718631386757,
-0.12295831739902496,
-0.026120267808437347,
0.32705676555633545,
-0.2358088195323944,
0.3113107681274414,
-0.13896921277046204,
0.07904694229364395,
0.2696986794471741,
-0.3729180097579956,
0.44851794838905334,
0.13819310069084167,
-0.2525953948497772,
0.022935107350349426,
0.15364423394203186,
0.16034486889839172,
-0.08752711117267609,
0.08047360181808472,
-0.21754415333271027,
0.10587266087532043,
-0.17733454704284668,
-0.03966691344976425,
-0.18827271461486816,
-0.2591828405857086,
-0.18296507000923157,
-0.093808114528656,
-0.012097720056772232,
-0.15875080227851868,
0.3571455180644989,
-0.065384641289711,
-0.2649575471878052,
-0.29933032393455505,
0.04473762959241867,
0.29556116461753845,
0.13730427622795105,
-0.424544095993042,
0.006730189546942711,
0.5594315528869629,
-0.08068189024925232,
-0.07908110320568085,
0.2808072865009308,
0.5457741022109985,
0.1270321011543274,
-0.08278509974479675,
0.13831306993961334,
0.19294168055057526,
-0.06373772770166397,
-0.12607572972774506,
0.21439756453037262,
-0.01731320470571518,
0.17054599523544312,
0.22341550886631012,
0.15142600238323212,
-0.21100525557994843,
-0.2321825474500656,
0.4559076130390167,
-0.14533069729804993,
-0.36355724930763245,
0.1920875608921051,
-0.23784059286117554,
-0.03235717490315437,
-0.09697277843952179,
0.36510398983955383,
-0.2949545979499817,
-0.19430455565452576,
0.18723885715007782,
0.23472124338150024,
0.1408715844154358,
-0.4275599420070648,
0.13800840079784393,
-0.15437626838684082,
0.1261254847049713,
0.2467406839132309,
-0.18322929739952087,
-0.385137677192688,
-0.015750251710414886,
-0.7335856556892395,
0.20096664130687714,
-0.15040576457977295,
-0.07076546549797058,
0.07067608833312988,
0.23287661373615265,
-0.013510830700397491,
0.07429453730583191,
0.23220118880271912,
0.22830334305763245,
-0.09368406236171722,
0.4965481460094452,
-0.4009830951690674,
-0.22507451474666595,
0.11375026404857635,
-0.12369900941848755,
0.09055037796497345,
-0.4316612184047699,
0.26439133286476135,
-0.01503102295100689,
0.08417985588312149,
-0.05555439740419388,
0.002656511962413788,
0.3295314908027649,
-0.23907899856567383,
0.2479805052280426,
0.3015711009502411,
0.45594319701194763,
-0.11074294149875641,
-0.2801842987537384,
0.012906167656183243,
-0.03686363250017166,
-0.04112637788057327,
0.28016790747642517,
0.3217189610004425,
0.25563836097717285,
0.10584685951471329,
-0.28852155804634094,
-0.22451943159103394,
0.3387848138809204,
0.21528799831867218,
0.04287026450037956,
-0.31650543212890625,
0.40415000915527344,
-0.044598497450351715,
0.05267864093184471,
0.1392776221036911,
0.32261812686920166,
-0.01963956654071808,
0.27456432580947876,
-0.3327935039997101,
-0.6344319581985474,
0.3417711853981018,
-0.3225764334201813,
-0.17968565225601196,
-0.2740098237991333,
0.3677445650100708,
-0.08316198736429214,
-0.12767480313777924,
-0.21308383345603943,
0.13975495100021362,
0.42954564094543457,
-0.24910178780555725,
0.06518547236919403,
0.3638631999492645,
-0.06338579952716827,
0.12496142089366913,
0.20453587174415588,
0.14474010467529297,
0.12418410927057266,
-0.23645009100437164,
0.5228359699249268,
-0.16280201077461243
] |
https://github.com/huggingface/datasets/issues/2542 | `datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA` | Hi @VictorSanh, the issue is already fixed and merged into master branch and will be included in our next release version 1.9.0. | ## Describe the bug
Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("drop")
load_dataset("adversarial_qa", "adversarialQA")
```
## Expected results
The examples keys should be unique.
## Actual results
```bash
>>> load_dataset("drop")
Using custom data configuration default
Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset
use_auth_token=use_auth_token,
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyArrow version: 3.0.0
| 22 | `datasets.keyhash.DuplicatedKeysError` for `drop` and `adversarial_qa/adversarialQA`
## Describe the bug
Failure to generate the datasets (`drop` and subset `adversarialQA` from `adversarial_qa`) because of duplicate keys.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("drop")
load_dataset("adversarial_qa", "adversarialQA")
```
## Expected results
The examples keys should be unique.
## Actual results
```bash
>>> load_dataset("drop")
Using custom data configuration default
Downloading and preparing dataset drop/default (download: 7.92 MiB, generated: 111.88 MiB, post-processed: Unknown size, total: 119.80 MiB) to /home/hf/.cache/huggingface/datasets/drop/default/0.1.0/7a94f1e2bb26c4b5c75f89857c06982967d7416e5af935a9374b9bccf5068026...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/load.py", line 751, in load_dataset
use_auth_token=use_auth_token,
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 575, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/builder.py", line 992, in _prepare_split
num_examples, num_bytes = writer.finalize()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 409, in finalize
self.check_duplicate_keys()
File "/home/hf/dev/promptsource/.venv/lib/python3.7/site-packages/datasets/arrow_writer.py", line 349, in check_duplicate_keys
raise DuplicatedKeysError(key)
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: 28553293-d719-441b-8f00-ce3dc6df5398
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.7.0
- Platform: Linux-5.4.0-1044-gcp-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.10
- PyArrow version: 3.0.0
Hi @VictorSanh, the issue is already fixed and merged into master branch and will be included in our next release version 1.9.0. | [
-0.09050922095775604,
-0.11600782722234726,
0.009455222636461258,
0.4709087610244751,
0.08408688753843307,
0.028658263385295868,
0.30280911922454834,
0.23976516723632812,
0.12779779732227325,
0.18143567442893982,
-0.14392246305942535,
0.5057469010353088,
-0.0482957661151886,
0.11989355832338333,
0.026669977232813835,
-0.032785311341285706,
0.0012848153710365295,
0.01367226243019104,
-0.29828009009361267,
-0.07620969414710999,
-0.24264028668403625,
0.38705042004585266,
-0.25591525435447693,
0.10335329174995422,
0.059840645641088486,
-0.10427584499120712,
-0.15724648535251617,
0.3131023347377777,
-0.043365851044654846,
-0.28979501128196716,
0.14072522521018982,
0.01125418022274971,
-0.2836557924747467,
0.4620525538921356,
-0.00010877363092731684,
-0.01796037331223488,
0.1347588449716568,
0.06381097435951233,
-0.4384637475013733,
-0.15688736736774445,
-0.25148576498031616,
-0.0515587255358696,
-0.08784874528646469,
-0.27699756622314453,
0.13033220171928406,
-0.20240220427513123,
-0.31931450963020325,
-0.3765529990196228,
0.7059353590011597,
0.09643091261386871,
0.2584538459777832,
0.29944393038749695,
0.05786709114909172,
-0.2653633654117584,
0.19034378230571747,
0.03764466568827629,
-0.19947932660579681,
0.2062627524137497,
-0.01475638896226883,
-0.06700717657804489,
0.35418596863746643,
0.16036783158779144,
-0.014585207216441631,
-0.05064019188284874,
0.2040342092514038,
0.06789509207010269,
0.012983661144971848,
-0.1696084439754486,
0.3404414653778076,
0.3239113688468933,
0.24727863073349,
-0.5006272792816162,
-0.200029656291008,
-0.2800813615322113,
0.28446680307388306,
-0.08955443650484085,
0.1983645260334015,
0.04119741916656494,
-0.24880799651145935,
0.14263390004634857,
0.06654759496450424,
0.13136279582977295,
0.058746665716171265,
-0.07923673093318939,
0.15524940192699432,
-0.000643610954284668,
0.04973182454705238,
0.08948955684900284,
0.1573435366153717,
-0.17231151461601257,
-0.01850929483771324,
-0.3647032380104065,
0.019966769963502884,
-0.12551504373550415,
-0.5385665893554688,
0.01297680288553238,
-0.06292916089296341,
0.025669895112514496,
0.43645167350769043,
0.07410338521003723,
0.22148628532886505,
-0.09840617328882217,
-0.048247329890728,
0.0024124905467033386,
0.039903368800878525,
0.3961122930049896,
0.17628920078277588,
0.0912107452750206,
0.15046770870685577,
0.1907208412885666,
-0.23070892691612244,
0.16413000226020813,
0.0568988099694252,
-0.1409798264503479,
0.2863468825817108,
0.15518811345100403,
0.6009867787361145,
-0.06930527836084366,
-0.4248119592666626,
0.2033163607120514,
-0.1676325649023056,
-0.12456643581390381,
-0.23273131251335144,
0.11765453219413757,
0.09356663376092911,
-0.02190280333161354,
-0.12567844986915588,
0.20161724090576172,
-0.3297654092311859,
-0.1748305857181549,
-0.26098716259002686,
-0.012508802115917206,
-0.008571211248636246,
-0.07222948968410492,
0.08384160697460175,
-0.18119747936725616,
0.2779172360897064,
0.3087559938430786,
-0.004612363874912262,
-0.13791513442993164,
0.2745805084705353,
0.09290957450866699,
-0.2666790187358856,
0.039834316819906235,
0.17050132155418396,
0.06689628958702087,
0.187930166721344,
-0.36020171642303467,
0.060028158128261566,
0.11222150176763535,
-0.02895195782184601,
-0.12868724763393402,
-0.11769159138202667,
0.31581398844718933,
0.02569347620010376,
0.0972316712141037,
-0.17660671472549438,
0.14941149950027466,
0.1119302362203598,
0.09068112075328827,
-0.004402965307235718,
0.039073094725608826,
-0.15989020466804504,
-0.42874670028686523,
0.2847692370414734,
0.7104173302650452,
-0.32561078667640686,
-0.13195288181304932,
-0.1431189477443695,
0.030178826302289963,
0.14422614872455597,
0.22938235104084015,
-0.17597950994968414,
0.20838063955307007,
-0.30010396242141724,
0.11739243566989899,
0.08310479670763016,
-0.3428846001625061,
-0.49173375964164734,
0.29088062047958374,
-0.35438984632492065,
0.19002637267112732,
0.17368590831756592,
-0.055167246609926224,
0.21536986529827118,
-0.002511346712708473,
0.011650808155536652,
-0.016548283398151398,
-0.09076032787561417,
-0.135310098528862,
-0.3101503252983093,
-0.33662477135658264,
0.17491364479064941,
-0.26377519965171814,
0.028483567759394646,
0.06559865921735764,
0.3573915958404541,
-0.07049848139286041,
0.28687211871147156,
-0.06102394685149193,
0.04679004102945328,
0.0863298699259758,
0.25373491644859314,
-0.06032758951187134,
0.2205081284046173,
-0.019394395872950554,
-0.5272818207740784,
0.3890168070793152,
-0.28561919927597046,
0.038964107632637024,
-0.15008316934108734,
-0.2936633229255676,
-0.5489761233329773,
0.05413760989904404,
-0.4572043716907501,
-0.2501847445964813,
0.24877017736434937,
0.19140979647636414,
-0.02845698408782482,
0.11421270668506622,
-0.06473425775766373,
0.22202633321285248,
0.044939957559108734,
0.04901495575904846,
-0.4242558777332306,
0.2599349617958069,
-0.3817823529243469,
0.05268125236034393,
0.08389703929424286,
0.21358025074005127,
0.4154094457626343,
-0.053219281136989594,
-0.1252104938030243,
0.3929845988750458,
-0.03628501668572426,
0.015139222145080566,
0.20108699798583984,
-0.1390542834997177,
0.2122400850057602,
-0.13536463677883148,
0.2662818133831024,
0.10705898702144623,
0.1830836981534958,
-0.13982409238815308,
-0.012119241058826447,
0.27618101239204407,
-0.18503925204277039,
0.15243873000144958,
-0.05690854787826538,
-0.005315426737070084,
0.13712705671787262,
-0.2301725298166275,
0.1511041224002838,
-0.21829111874103546,
0.0741770938038826,
-0.10675747692584991,
0.17586985230445862,
-0.032506078481674194,
-0.1456291675567627,
0.17780646681785583,
0.1834476739168167,
-0.1542726457118988,
0.1718086302280426,
-0.047923170030117035,
0.03277852386236191,
-0.09463900327682495,
0.025892427191138268,
0.5896530151367188,
0.683296263217926,
0.18402734398841858,
0.09309865534305573,
0.18257738649845123,
0.010152931325137615,
-0.1736520677804947,
0.40181440114974976,
-0.23067738115787506,
-0.18794602155685425,
0.33995547890663147,
0.1338030993938446,
0.09127595275640488,
-0.3779134154319763,
-0.07041890919208527,
0.13940849900245667,
0.2234368622303009,
-0.2576557397842407,
-0.013610977679491043,
-0.415109246969223,
-0.04335921257734299,
-0.14741533994674683,
0.25531062483787537,
-0.016330502927303314,
-0.32888713479042053,
0.10039745271205902,
-0.17009955644607544,
0.03780665621161461,
0.282754123210907,
-0.08029681444168091,
0.21931681036949158,
-0.02551322802901268,
0.311676025390625,
-0.17848211526870728,
0.06612176448106766,
-0.2623884677886963,
0.12386369705200195,
0.08686472475528717,
0.13113074004650116,
0.4407130777835846,
-0.14069896936416626,
-0.3182713985443115,
-0.3026200830936432,
-0.2035520374774933,
0.1379108428955078,
-0.01049896702170372,
0.35646405816078186,
0.38501983880996704,
0.01861260086297989,
-0.1929825246334076,
-0.35720327496528625,
0.2555495500564575,
-0.09539634734392166,
-0.45416396856307983,
0.0896257609128952,
-0.09871333092451096,
0.030876940116286278,
-0.19220107793807983,
-0.5104909539222717,
-0.1726355254650116,
-0.25201019644737244,
0.07736116647720337,
-0.1438826024532318,
0.1406257450580597,
0.33112236857414246,
-0.03031139448285103,
0.14079813659191132,
0.026042243465781212,
0.09881488978862762,
-0.43476518988609314,
-0.18414676189422607,
0.06020423397421837,
-0.2762191593647003,
-0.2974783778190613,
-0.016933444887399673,
-0.12270303815603256,
0.31571444869041443,
-0.11578937619924545,
-0.45640838146209717,
-0.3070780336856842,
-0.24925662577152252,
0.34092918038368225,
-0.18406984210014343,
0.2868573069572449,
0.16756945848464966,
0.1474982053041458,
-0.14265553653240204,
-0.2416715919971466,
-0.05387771129608154,
0.2804364860057831,
-0.2117331624031067,
0.04008002579212189,
0.15095104277133942,
0.5182061791419983,
0.07246732711791992,
0.613350510597229,
0.5002941489219666,
0.08827383071184158,
0.27911826968193054,
-0.09282289445400238,
0.2891694903373718,
-0.17085057497024536,
-0.4779529273509979,
-0.2943902909755707,
0.16617031395435333,
0.20613357424736023,
0.22674331068992615,
-0.1307830810546875,
0.12601466476917267,
0.09188006818294525,
-0.09142698347568512,
-0.49831822514533997,
-0.2809927463531494,
-0.2584253251552582,
-0.20793604850769043,
0.05941671505570412,
0.05599001422524452,
0.09442944079637527,
-0.058903783559799194,
0.15206953883171082,
0.1882857084274292,
0.15231339633464813,
0.025004617869853973,
0.02369157038629055,
-0.3282141089439392,
0.0291180070489645,
-0.4109376072883606,
0.2250794768333435,
-0.20890143513679504,
0.32131415605545044,
-0.11749501526355743,
0.12020639330148697,
0.027809888124465942,
-0.010814817622303963,
0.6370678544044495,
-0.36702272295951843,
0.164679616689682,
0.08423075079917908,
-0.15883785486221313,
-0.1211828961968422,
-0.03015727549791336,
-0.013596851378679276,
0.1148907020688057,
-0.031581953167915344,
0.2285151332616806,
-0.5454475283622742,
0.13114629685878754,
0.20340494811534882,
0.2716735899448395,
-0.17419381439685822,
-0.2394862174987793,
-0.03875144198536873,
-0.4927270710468292,
-0.4985894560813904,
-0.14774322509765625,
0.011749135330319405,
0.2282526195049286,
-0.16526514291763306,
-0.050620853900909424,
0.015709267929196358,
-0.17145749926567078,
0.17753508687019348,
0.14794696867465973,
0.26217132806777954,
0.21577902138233185,
0.6348118782043457,
0.1356799304485321,
-0.15211303532123566,
0.16173985600471497,
0.6787904500961304,
-0.1573689579963684,
-0.21830326318740845,
-0.28060662746429443,
-0.17293204367160797,
-0.22477301955223083,
0.27547210454940796,
-0.14847491681575775,
0.30072182416915894,
-0.14159078896045685,
0.020462386310100555,
0.2139429897069931,
-0.314827561378479,
0.20353151857852936,
-0.16996712982654572,
0.008936280384659767,
-0.3534315824508667,
0.01571226865053177,
-0.058617569506168365,
-0.2973245084285736,
0.1694917380809784,
0.14233961701393127,
-0.22121040523052216,
0.36613303422927856,
-0.191665381193161,
0.8777393698692322,
-0.0657743364572525,
0.0092347152531147,
0.16281980276107788,
-0.22479720413684845,
0.36184099316596985,
0.09007808566093445,
-0.1640418916940689,
-0.46123361587524414,
-0.300560861825943,
0.1581873893737793,
0.05173216387629509,
0.15665844082832336,
0.1095845103263855,
-0.2995372414588928,
0.2086395025253296,
-0.11819273233413696,
0.09699177742004395,
-0.04756685346364975,
0.28759631514549255,
-0.2880069613456726,
0.07010509073734283,
-0.11886999011039734,
0.14614950120449066,
0.0694420337677002,
0.049491748213768005,
0.04896331578493118,
-0.11717869341373444,
0.19886687397956848,
-0.48689717054367065,
-0.20589908957481384,
0.03362574800848961,
-0.39236724376678467,
0.328644335269928,
-0.11808560788631439,
-0.33705630898475647,
0.20586122572422028,
0.43076473474502563,
0.4622993469238281,
0.24825088679790497,
0.018758272752165794,
0.054629117250442505,
-0.0069998204708099365,
0.2869380712509155,
-0.12581844627857208,
-0.23437203466892242,
-0.011666456237435341,
-0.11056119203567505,
-0.3548024296760559,
-0.10906893759965897,
0.15375147759914398,
-0.08207832276821136,
-0.24886178970336914,
0.11522752046585083,
-0.06754450500011444,
-0.12466583400964737,
0.023433171212673187,
-0.14110960066318512,
-0.17765362560749054,
-0.443471223115921,
0.1303863227367401,
0.131235733628273,
-0.17544025182724,
0.22193661332130432,
-0.18838070333003998,
-0.15587621927261353,
-0.0415973998606205,
0.33970147371292114,
0.18831932544708252,
0.24744150042533875,
0.5482302904129028,
0.05515531823039055,
0.042594172060489655,
-0.25317543745040894,
-0.007690757513046265,
0.04062715172767639,
-0.4769056439399719,
0.1915142685174942,
-0.2640382945537567,
0.1442861109972,
0.10886913537979126,
0.3577154874801636,
0.21712316572666168,
0.1366262286901474,
0.16879902780056,
-0.30376431345939636,
-0.12698706984519958,
0.029950693249702454,
0.19083240628242493,
0.21747389435768127,
0.1731238067150116,
-0.01919136568903923,
-0.1452849805355072,
0.32744836807250977,
-0.3689515292644501,
0.23783792555332184,
-0.0046662501990795135,
-0.010238289833068848,
0.0007041934877634048,
-0.11995095759630203,
0.039675649255514145,
0.11998680233955383,
0.20290961861610413,
0.2261534184217453,
-0.055935658514499664,
-0.26797303557395935,
-0.2521996796131134,
0.13160139322280884,
-0.21849817037582397,
-0.16821487247943878,
-0.06940288841724396,
-0.2364598512649536,
-0.05867346003651619,
-0.08391782641410828,
0.4266137480735779,
0.13718321919441223,
0.002995133399963379,
0.15787816047668457,
0.15296731889247894,
0.14564645290374756,
-0.16318055987358093,
0.18801647424697876,
-0.2690671682357788,
0.016333095729351044,
0.14150021970272064,
0.09483471512794495,
-0.01895091123878956,
-0.17155222594738007,
-0.33726733922958374,
0.08269424736499786,
-0.056047648191452026,
0.17796501517295837,
0.27852192521095276,
-0.20525206625461578,
-0.2647087872028351,
0.4296850860118866,
0.2974279820919037,
0.0996672660112381,
-0.19868674874305725,
0.005100809037685394,
0.03359616547822952,
0.27050530910491943,
-0.39920347929000854,
-0.43699291348457336,
0.17191778123378754,
-0.13999778032302856,
0.11391361057758331,
0.3059447407722473,
0.22545874118804932,
-0.3515101671218872,
-0.27867400646209717,
0.11731939762830734,
0.38347434997558594,
-0.08047927916049957,
0.2226230502128601,
0.4485836625099182,
-0.08547058701515198,
-0.07634773850440979,
0.02651718631386757,
-0.12295831739902496,
-0.026120267808437347,
0.32705676555633545,
-0.2358088195323944,
0.3113107681274414,
-0.13896921277046204,
0.07904694229364395,
0.2696986794471741,
-0.3729180097579956,
0.44851794838905334,
0.13819310069084167,
-0.2525953948497772,
0.022935107350349426,
0.15364423394203186,
0.16034486889839172,
-0.08752711117267609,
0.08047360181808472,
-0.21754415333271027,
0.10587266087532043,
-0.17733454704284668,
-0.03966691344976425,
-0.18827271461486816,
-0.2591828405857086,
-0.18296507000923157,
-0.093808114528656,
-0.012097720056772232,
-0.15875080227851868,
0.3571455180644989,
-0.065384641289711,
-0.2649575471878052,
-0.29933032393455505,
0.04473762959241867,
0.29556116461753845,
0.13730427622795105,
-0.424544095993042,
0.006730189546942711,
0.5594315528869629,
-0.08068189024925232,
-0.07908110320568085,
0.2808072865009308,
0.5457741022109985,
0.1270321011543274,
-0.08278509974479675,
0.13831306993961334,
0.19294168055057526,
-0.06373772770166397,
-0.12607572972774506,
0.21439756453037262,
-0.01731320470571518,
0.17054599523544312,
0.22341550886631012,
0.15142600238323212,
-0.21100525557994843,
-0.2321825474500656,
0.4559076130390167,
-0.14533069729804993,
-0.36355724930763245,
0.1920875608921051,
-0.23784059286117554,
-0.03235717490315437,
-0.09697277843952179,
0.36510398983955383,
-0.2949545979499817,
-0.19430455565452576,
0.18723885715007782,
0.23472124338150024,
0.1408715844154358,
-0.4275599420070648,
0.13800840079784393,
-0.15437626838684082,
0.1261254847049713,
0.2467406839132309,
-0.18322929739952087,
-0.385137677192688,
-0.015750251710414886,
-0.7335856556892395,
0.20096664130687714,
-0.15040576457977295,
-0.07076546549797058,
0.07067608833312988,
0.23287661373615265,
-0.013510830700397491,
0.07429453730583191,
0.23220118880271912,
0.22830334305763245,
-0.09368406236171722,
0.4965481460094452,
-0.4009830951690674,
-0.22507451474666595,
0.11375026404857635,
-0.12369900941848755,
0.09055037796497345,
-0.4316612184047699,
0.26439133286476135,
-0.01503102295100689,
0.08417985588312149,
-0.05555439740419388,
0.002656511962413788,
0.3295314908027649,
-0.23907899856567383,
0.2479805052280426,
0.3015711009502411,
0.45594319701194763,
-0.11074294149875641,
-0.2801842987537384,
0.012906167656183243,
-0.03686363250017166,
-0.04112637788057327,
0.28016790747642517,
0.3217189610004425,
0.25563836097717285,
0.10584685951471329,
-0.28852155804634094,
-0.22451943159103394,
0.3387848138809204,
0.21528799831867218,
0.04287026450037956,
-0.31650543212890625,
0.40415000915527344,
-0.044598497450351715,
0.05267864093184471,
0.1392776221036911,
0.32261812686920166,
-0.01963956654071808,
0.27456432580947876,
-0.3327935039997101,
-0.6344319581985474,
0.3417711853981018,
-0.3225764334201813,
-0.17968565225601196,
-0.2740098237991333,
0.3677445650100708,
-0.08316198736429214,
-0.12767480313777924,
-0.21308383345603943,
0.13975495100021362,
0.42954564094543457,
-0.24910178780555725,
0.06518547236919403,
0.3638631999492645,
-0.06338579952716827,
0.12496142089366913,
0.20453587174415588,
0.14474010467529297,
0.12418410927057266,
-0.23645009100437164,
0.5228359699249268,
-0.16280201077461243
] |
https://github.com/huggingface/datasets/issues/2538 | Loading partial dataset when debugging | Hi ! `load_dataset` downloads the full dataset once and caches it, so that subsequent calls to `load_dataset` just reloads the dataset from your disk.
Then when you specify a `split` in `load_dataset`, it will just load the requested split from the disk. If your specified split is a sliced split (e.g. `"train[:10]"`), then it will load the 10 first rows of the train split that you have on disk.
Therefore, as long as you don't delete your cache, all your calls to `load_dataset` will be very fast. Except the first call that downloads the dataset of course ^^ | I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks! | 98 | Loading partial dataset when debugging
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks!
Hi ! `load_dataset` downloads the full dataset once and caches it, so that subsequent calls to `load_dataset` just reloads the dataset from your disk.
Then when you specify a `split` in `load_dataset`, it will just load the requested split from the disk. If your specified split is a sliced split (e.g. `"train[:10]"`), then it will load the 10 first rows of the train split that you have on disk.
Therefore, as long as you don't delete your cache, all your calls to `load_dataset` will be very fast. Except the first call that downloads the dataset of course ^^ | [
-0.3671894967556,
-0.14316849410533905,
-0.02160838060081005,
0.36220479011535645,
-0.06753100454807281,
0.2756691575050354,
0.5740370750427246,
0.41680434346199036,
0.2612754702568054,
-0.08351033926010132,
-0.0828448161482811,
0.1403207927942276,
-0.17392057180404663,
0.18208928406238556,
0.0995866060256958,
0.10870681703090668,
-0.1426474153995514,
0.31652241945266724,
0.07343482971191406,
-0.07848548144102097,
0.17070114612579346,
-0.2612391412258148,
-0.1748518943786621,
-0.17879082262516022,
-0.43884044885635376,
0.06583244353532791,
0.07243415713310242,
0.19170650839805603,
0.29212644696235657,
-0.1966117024421692,
0.3809177577495575,
0.12371061742305756,
0.004290873184800148,
0.1477993130683899,
-0.00012503741891123354,
0.04857809096574783,
0.45301610231399536,
-0.11772715300321579,
-0.4413946270942688,
0.07931514084339142,
-0.2372334897518158,
-0.017256075516343117,
0.4449101686477661,
-0.04263800010085106,
-0.053050726652145386,
-0.18753927946090698,
0.005216192454099655,
-0.3129993677139282,
0.282974511384964,
-0.012044970877468586,
0.06675555557012558,
0.0641542375087738,
-0.5506687760353088,
0.1383751779794693,
0.219693124294281,
-0.040089696645736694,
0.0063698869198560715,
0.38395997881889343,
0.41145944595336914,
0.025724025443196297,
-0.31892165541648865,
0.1433296650648117,
-0.13030008971691132,
0.2568039894104004,
0.36516571044921875,
-0.01753314584493637,
0.01699214056134224,
-0.4844473898410797,
0.27796217799186707,
0.3971956670284271,
0.6139981150627136,
0.017797885462641716,
-0.32483136653900146,
-0.5614999532699585,
0.06808400899171829,
-0.10190336406230927,
0.14041030406951904,
-0.032951466739177704,
-0.44043612480163574,
-0.0019111372530460358,
-0.5037769079208374,
-0.17880089581012726,
0.06568440794944763,
0.18152129650115967,
0.07425832748413086,
-0.29635003209114075,
0.06357698142528534,
0.11993834376335144,
0.4592185616493225,
0.2257741391658783,
0.31104567646980286,
-0.05914776772260666,
0.08678227663040161,
0.10405723005533218,
-0.3470105826854706,
0.05521046370267868,
-0.17155590653419495,
-0.09378734976053238,
-0.03601456061005592,
0.5328011512756348,
-0.033563245087862015,
0.4623102843761444,
0.17922566831111908,
0.00489545613527298,
0.5818139910697937,
-0.1044396460056305,
0.13577520847320557,
0.16049513220787048,
0.3302038908004761,
-0.3076433837413788,
-0.056203439831733704,
-0.029139436781406403,
-0.4441230595111847,
-0.14464719593524933,
0.29113996028900146,
-0.033175982534885406,
-0.0609833300113678,
-0.33018603920936584,
-0.0984935462474823,
-0.34577232599258423,
0.1044793352484703,
-0.02772386744618416,
0.23564332723617554,
0.45086708664894104,
0.07714008539915085,
0.05776430666446686,
-0.19051678478717804,
0.09677256643772125,
-0.28608882427215576,
-0.0646088495850563,
-0.12529873847961426,
-0.1794556975364685,
-0.05339725688099861,
0.13431599736213684,
0.3456484079360962,
-0.3430444300174713,
0.30360761284828186,
-0.09187071025371552,
0.4442431926727295,
-0.19420111179351807,
0.15459585189819336,
-0.25423091650009155,
-0.030196376144886017,
0.17747214436531067,
-0.015024816617369652,
0.2808525562286377,
0.11442647874355316,
0.25640803575515747,
-0.30543458461761475,
0.43850356340408325,
-0.11468290537595749,
-0.38743507862091064,
0.06421270966529846,
-0.0014648959040641785,
-0.38823115825653076,
0.2442893385887146,
-0.19810929894447327,
0.2364184856414795,
0.19101408123970032,
-0.23388320207595825,
-0.2300264835357666,
0.0961136668920517,
0.00010013207793235779,
-0.11394564062356949,
0.6939185857772827,
0.380171537399292,
-0.14354491233825684,
-0.2851575016975403,
-0.2555268108844757,
0.03463200852274895,
0.2755744755268097,
0.24220116436481476,
-0.4427696168422699,
0.23244747519493103,
-0.136928990483284,
-0.07506062835454941,
0.5813114643096924,
-0.04587576910853386,
-0.38998064398765564,
0.45926761627197266,
-0.06608618795871735,
0.2072690725326538,
-0.06395768374204636,
0.5403293371200562,
0.22449764609336853,
0.062971331179142,
0.11130647361278534,
0.43230682611465454,
-0.1434762328863144,
0.11651527136564255,
-0.21588464081287384,
-0.15304464101791382,
0.13135474920272827,
0.46650299429893494,
0.03728921711444855,
0.16521790623664856,
-0.03860972076654434,
0.19964179396629333,
0.1884552240371704,
0.00033391639590263367,
-0.0666797086596489,
0.1926489621400833,
-0.10654176771640778,
0.06399921327829361,
0.03716130182147026,
-0.2812868058681488,
-0.5614963173866272,
0.3774625360965729,
0.17464175820350647,
-0.31024807691574097,
-0.08220835030078888,
-0.020522870123386383,
-0.10167460143566132,
-0.1576438695192337,
-0.01804332807660103,
-0.08504986763000488,
-0.18913118541240692,
0.014795646071434021,
-0.07933840155601501,
-0.39698323607444763,
-0.45676881074905396,
0.11842289566993713,
0.02883714996278286,
-0.01626848429441452,
-0.34635600447654724,
0.11181540787220001,
0.36374202370643616,
-0.05649449676275253,
-0.04300256818532944,
-0.08845622092485428,
0.00261823832988739,
-0.26630276441574097,
-0.06606008857488632,
0.3327570855617523,
0.14879804849624634,
0.29042693972587585,
0.04508567601442337,
0.1757797747850418,
-0.01581607572734356,
-0.08042621612548828,
0.363444060087204,
-0.05617447569966316,
0.0023395931348204613,
-0.19306421279907227,
-0.1984039545059204,
0.3541492223739624,
-0.45286762714385986,
0.4073083996772766,
0.0399317741394043,
-0.2771594226360321,
0.13743659853935242,
-0.15656055510044098,
-0.13146717846393585,
-0.08851386606693268,
0.4653712809085846,
-0.25897684693336487,
0.3783656358718872,
0.24758535623550415,
-0.08319289237260818,
-0.10189501196146011,
0.2595183253288269,
-0.03595029190182686,
0.004566539078950882,
0.2960411012172699,
-0.462066650390625,
-0.027833161875605583,
-0.13571982085704803,
-0.18683601915836334,
0.08054441213607788,
0.14114578068256378,
0.17342640459537506,
-0.21359474956989288,
0.24540404975414276,
-0.0822354331612587,
0.1437816023826599,
0.07579107582569122,
0.10593495517969131,
0.14934304356575012,
-0.15923352539539337,
-0.16431543231010437,
-0.15998558700084686,
0.07174345850944519,
0.15879879891872406,
0.15861530601978302,
-0.23622803390026093,
0.10229459404945374,
-0.41828393936157227,
-0.10481759905815125,
0.0990501418709755,
-0.05474775657057762,
-0.04089641943573952,
-0.1226121038198471,
0.047847241163253784,
0.3270421028137207,
0.0698411613702774,
0.205117329955101,
-0.2745983898639679,
0.18118199706077576,
-0.1321084052324295,
-0.37160786986351013,
-0.22930847108364105,
-0.32600075006484985,
-0.08150428533554077,
-0.004744783043861389,
0.4853349030017853,
0.10317540168762207,
0.3148232400417328,
-0.20688676834106445,
-0.25748318433761597,
0.16529987752437592,
-0.043050333857536316,
-0.035823725163936615,
0.253866970539093,
0.21439237892627716,
-0.1287674903869629,
0.34317344427108765,
0.1944272816181183,
-0.36292022466659546,
0.08242150396108627,
-0.1285373419523239,
-0.03365323692560196,
0.08611468225717545,
0.22748354077339172,
0.3637344539165497,
-0.0477726086974144,
-0.13443374633789062,
-0.02988380379974842,
-0.3539547622203827,
0.3215941786766052,
0.029343541711568832,
0.14985159039497375,
0.0673590674996376,
-0.13175001740455627,
-0.16737991571426392,
-0.027437055483460426,
0.14918653666973114,
0.08649060875177383,
-0.33912378549575806,
0.4030125141143799,
0.174745574593544,
-0.0408620722591877,
-0.07522766292095184,
-0.07180412858724594,
-0.15467390418052673,
0.2917636036872864,
-0.6640380620956421,
-0.06682521849870682,
-0.1284804493188858,
-0.004082586616277695,
-0.12102615833282471,
-0.28576716780662537,
-0.0021878331899642944,
-0.11743967980146408,
0.06316220015287399,
0.15985488891601562,
-0.168316051363945,
-0.1388300359249115,
-0.2689244747161865,
0.08197309076786041,
-0.049770064651966095,
0.2759535014629364,
-0.05068887025117874,
0.8458828330039978,
0.04192868992686272,
-0.1853015124797821,
-0.1689159870147705,
-0.1192445382475853,
0.06383281201124191,
-0.3244430422782898,
-0.40141281485557556,
-0.0687761902809143,
-0.1970941126346588,
-0.263364315032959,
0.10771755129098892,
-0.09198230504989624,
-0.3551759123802185,
-0.1895463615655899,
0.02824936807155609,
-0.27457791566848755,
-0.35815104842185974,
0.48243144154548645,
-0.5855873227119446,
-0.14060509204864502,
-0.028272457420825958,
0.2764350175857544,
-0.044917263090610504,
-0.24727919697761536,
0.018132761120796204,
0.0796077772974968,
0.47080186009407043,
-0.2335609793663025,
-0.013949312269687653,
0.17712228000164032,
-0.17793932557106018,
0.1654900461435318,
-0.1226426512002945,
0.14734557271003723,
-0.025699865072965622,
-0.16338324546813965,
0.2757576107978821,
0.17858213186264038,
0.7884395122528076,
0.017075223848223686,
0.13271893560886383,
0.0002023950219154358,
-0.5102224349975586,
-0.2963166832923889,
0.05347427353262901,
0.10029692947864532,
0.5788522958755493,
0.1988789588212967,
0.3522881865501404,
-0.3964134454727173,
-0.08153097331523895,
0.12288515269756317,
0.35062962770462036,
-0.2957374155521393,
-0.11074230819940567,
-0.300719290971756,
0.07920700311660767,
-0.33844414353370667,
0.06021709740161896,
-0.07723457366228104,
-0.16895973682403564,
0.11117909103631973,
-0.13265477120876312,
-0.2855386435985565,
0.05975760519504547,
0.14123870432376862,
0.2928124964237213,
0.25571683049201965,
-0.05180765688419342,
0.5995867252349854,
0.2853754162788391,
-0.08737875521183014,
0.2835310399532318,
0.430895060300827,
0.003938902169466019,
-0.22336170077323914,
0.21279630064964294,
-0.028053753077983856,
0.1954459846019745,
0.46851909160614014,
0.0028094821609556675,
-0.13052460551261902,
0.21682541072368622,
0.1986551582813263,
-0.36617565155029297,
0.12991906702518463,
0.06265180557966232,
-0.07617878168821335,
-0.3292374610900879,
-0.570501983165741,
0.4089975357055664,
-0.07795623689889908,
0.011841244995594025,
0.5679501295089722,
-0.24310238659381866,
-0.005395541898906231,
0.19036869704723358,
0.02035357803106308,
1.0178778171539307,
-0.33301007747650146,
0.02189638279378414,
-0.46500715613365173,
0.09143237769603729,
0.48825374245643616,
-0.2961697578430176,
0.06469768285751343,
-0.36548441648483276,
-0.6286571025848389,
0.07860114425420761,
-0.2877316474914551,
-0.27455517649650574,
0.27682897448539734,
0.25405022501945496,
0.23778972029685974,
-0.4282453656196594,
0.08984901010990143,
-0.09953427314758301,
0.27248597145080566,
0.09064386039972305,
-0.3121679425239563,
-0.03346990793943405,
0.0022575631737709045,
-0.034532248973846436,
0.12555775046348572,
0.06438764184713364,
0.06653553992509842,
-0.0685923621058464,
0.1550927311182022,
-0.3927321434020996,
0.14111846685409546,
-0.13745565712451935,
-0.04288987070322037,
-0.27024808526039124,
-0.39858150482177734,
-0.02548743411898613,
0.13700547814369202,
-0.06832779943943024,
0.08796875923871994,
-0.056187137961387634,
0.3046514391899109,
0.02962319180369377,
0.17377470433712006,
0.021013105288147926,
0.07060215622186661,
-0.050246670842170715,
-0.009301552549004555,
-0.09922747313976288,
-0.13372308015823364,
-0.25537776947021484,
-0.4720457196235657,
0.32337692379951477,
0.23953129351139069,
0.14159083366394043,
-0.06323587149381638,
-0.24862465262413025,
-0.00017709285020828247,
0.17964355647563934,
-0.1793680340051651,
0.029104890301823616,
0.43452155590057373,
-0.06410256028175354,
0.17926982045173645,
0.2324337363243103,
-0.3975850045681,
0.024546358734369278,
0.38097184896469116,
0.1816922426223755,
-0.058333273977041245,
0.4532397389411926,
-0.0917835384607315,
-0.31434500217437744,
-0.08938665688037872,
0.01591286063194275,
0.3293491005897522,
-0.5196859836578369,
-0.00002395082265138626,
-0.16101737320423126,
0.059433549642562866,
-0.1526346355676651,
-0.28479260206222534,
-0.005597919225692749,
0.06897591054439545,
-0.374006986618042,
-0.37330949306488037,
-0.1986035257577896,
0.3582197427749634,
0.025332940742373466,
0.36404457688331604,
-0.2689647078514099,
-0.11130392551422119,
-0.1866380274295807,
0.5100831389427185,
-0.15152569115161896,
-0.11665995419025421,
-0.15062929689884186,
0.3793259263038635,
0.010344273410737514,
0.023071784526109695,
0.3565027713775635,
-0.17199796438217163,
-0.017737146466970444,
0.026342131197452545,
0.13874828815460205,
-0.0877266526222229,
0.08569619059562683,
0.22371771931648254,
-0.21669870615005493,
-0.23188145458698273,
-0.19745425879955292,
-0.12839622795581818,
-0.06370367109775543,
-0.29444068670272827,
0.22013738751411438,
0.16982540488243103,
0.196749746799469,
-0.10603372007608414,
0.41446226835250854,
0.02025730162858963,
-0.4970492124557495,
0.17242170870304108,
-0.29054757952690125,
0.3164813816547394,
-0.09080100804567337,
0.2046426683664322,
0.07211323082447052,
-0.005418121814727783,
-0.011009356938302517,
-0.0986161008477211,
0.3651939630508423,
-0.10532956570386887,
0.14019490778446198,
0.05748604238033295,
0.2886664867401123,
0.06170756369829178,
0.3608939051628113,
0.7714853286743164,
0.03022834286093712,
0.22537969052791595,
0.07882291078567505,
0.03532774746417999,
-0.041549909859895706,
-0.14323434233665466,
0.05483301728963852,
-0.38687819242477417,
-0.02270497940480709,
0.22165502607822418,
-0.22898027300834656,
0.26412758231163025,
-0.0151992067694664,
-0.2538962662220001,
0.2530398666858673,
-0.17237591743469238,
0.017283497378230095,
0.3965556025505066,
-0.2170444279909134,
-0.10603053867816925,
0.08040718734264374,
0.267972856760025,
0.043583646416664124,
0.3496530055999756,
-0.133652001619339,
0.2164209932088852,
0.14095968008041382,
0.1506497859954834,
-0.26772013306617737,
-0.39689403772354126,
0.007603023201227188,
0.5739416480064392,
0.15091407299041748,
0.0038489215075969696,
-0.17681536078453064,
0.06648150086402893,
0.14898669719696045,
-0.2371140569448471,
-0.03113294392824173,
0.04363304376602173,
0.09712957590818405,
-0.07464392483234406,
0.20676112174987793,
-0.17384791374206543,
-0.2689617872238159,
0.11787879467010498,
-0.17308667302131653,
-0.3819597363471985,
-0.07691922783851624,
0.29270392656326294,
0.17245864868164062,
-0.10805057734251022,
0.11925817281007767,
0.020360583439469337,
0.22638338804244995,
-0.3633555471897125,
0.10588817298412323,
-0.11519071459770203,
0.2659332752227783,
0.45201513171195984,
-0.055279068648815155,
0.011352505534887314,
0.14525938034057617,
-0.1387481540441513,
0.053479213267564774,
0.30161648988723755,
-0.03647052124142647,
-0.27819615602493286,
0.31175246834754944,
0.1510302573442459,
0.31667429208755493,
0.03544296324253082,
0.02377445437014103,
-0.08511542528867722,
0.17452922463417053,
-0.22542496025562286,
-0.05485377088189125,
-0.5020071864128113,
0.35727185010910034,
0.09798724204301834,
-0.25677379965782166,
0.02179991826415062,
-0.14606964588165283,
0.164147287607193,
-0.5156946182250977,
0.2081432044506073,
-0.28738704323768616,
-0.029874753206968307,
0.36528098583221436,
0.008169645443558693,
-0.08182884752750397,
0.6307970881462097,
0.08446380496025085,
0.578463613986969,
-0.25188010931015015,
0.04716449975967407,
-0.4567264914512634,
0.08644815534353256,
-0.06382614374160767,
0.006864001974463463,
0.4267880618572235,
0.2150810956954956,
0.35210326313972473,
0.37633657455444336,
0.015649795532226562,
-0.00399282481521368,
0.34731417894363403,
0.302020788192749,
-0.03656066209077835,
-0.007675841450691223,
-0.534640371799469,
0.2176373451948166,
-0.0012324824929237366,
-0.3525681793689728,
0.19200889766216278,
-0.05230551213026047,
-0.15894575417041779,
0.45280444622039795,
-0.4606049656867981,
0.452732115983963,
0.36379140615463257,
0.4324217736721039,
-0.20643560588359833,
0.6541495323181152,
0.03107466548681259,
-0.12995292246341705,
-0.06981495022773743,
-0.525505781173706,
-0.26741287112236023,
0.3101959526538849,
0.1402411013841629,
-0.1344023048877716,
-0.06945908814668655,
0.041976198554039,
-0.34199070930480957,
0.18722853064537048,
-0.12827447056770325,
0.03147398680448532,
-0.04099448025226593,
-0.42785754799842834,
0.12159086018800735,
0.2747300863265991,
0.2673531770706177,
0.1640353500843048,
-0.10899761319160461,
-0.18433929979801178,
-0.17634277045726776,
0.05028233677148819,
0.5359638929367065,
-0.16131936013698578,
-0.026192955672740936,
-0.014375832863152027,
0.38248708844184875,
0.1976982057094574,
0.2183247059583664,
-0.5468693375587463,
-0.03759961947798729,
0.3215596675872803,
-0.2120876908302307,
-0.017228903248906136,
-0.008357672020792961,
0.04108253866434097,
-0.07891609519720078,
-0.24726393818855286,
0.16255103051662445,
0.058135829865932465,
-0.06854818016290665,
-0.3469407260417938,
-0.3269047737121582
] |
https://github.com/huggingface/datasets/issues/2538 | Loading partial dataset when debugging | Hi @reachtarunhere.
Besides the above insights provided by @lhoestq and @thomwolf, there is also a Dataset feature in progress (I plan to finish it this week): #2249, which will allow you, when calling `load_dataset`, to pass the option to download/preprocess/cache only some specific split(s), which will definitely speed up your workflow.
If this feature is interesting for you, I can ping you once it will be merged into the master branch. | I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks! | 71 | Loading partial dataset when debugging
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks!
Hi @reachtarunhere.
Besides the above insights provided by @lhoestq and @thomwolf, there is also a Dataset feature in progress (I plan to finish it this week): #2249, which will allow you, when calling `load_dataset`, to pass the option to download/preprocess/cache only some specific split(s), which will definitely speed up your workflow.
If this feature is interesting for you, I can ping you once it will be merged into the master branch. | [
-0.42554813623428345,
-0.1098930686712265,
-0.03485337644815445,
0.3032796382904053,
-0.07041200995445251,
0.28239238262176514,
0.5759143233299255,
0.43113774061203003,
0.30114316940307617,
-0.08975908160209656,
-0.09464406222105026,
0.1700284779071808,
-0.16752196848392487,
0.23832924664020538,
0.04756849631667137,
0.09985041618347168,
-0.16172528266906738,
0.3242843747138977,
0.03877068683505058,
-0.06606712192296982,
0.12873907387256622,
-0.2229059785604477,
-0.24835142493247986,
-0.21158738434314728,
-0.46599453687667847,
0.029329407960176468,
0.09862641990184784,
0.1705516129732132,
0.3179529309272766,
-0.12683604657649994,
0.3389092981815338,
0.13751715421676636,
-0.008488113060593605,
0.13357239961624146,
-0.0001241956779267639,
-0.010721661150455475,
0.5006645321846008,
-0.09310774505138397,
-0.43629929423332214,
0.07352839410305023,
-0.2374209463596344,
-0.04771478474140167,
0.4577591121196747,
0.027489349246025085,
-0.08342109620571136,
-0.18158365786075592,
0.025319864973425865,
-0.3546507656574249,
0.29714304208755493,
-0.006425029598176479,
0.07370743155479431,
0.1067960262298584,
-0.466145783662796,
0.14421346783638,
0.17943075299263,
-0.050979748368263245,
-0.06999998539686203,
0.3940606415271759,
0.4568609297275543,
-0.03442661464214325,
-0.26196351647377014,
0.14700943231582642,
-0.09070315212011337,
0.33179429173469543,
0.38687238097190857,
-0.031169701367616653,
0.012000571936368942,
-0.5471947193145752,
0.28199201822280884,
0.4399411976337433,
0.6287293434143066,
0.03294738382101059,
-0.3415044844150543,
-0.582824170589447,
0.07576586306095123,
-0.0979444831609726,
0.14900046586990356,
0.0070252553559839725,
-0.42457839846611023,
0.006580319255590439,
-0.48645099997520447,
-0.17785879969596863,
0.04783700406551361,
0.15686143934726715,
0.053184472024440765,
-0.28939762711524963,
0.03689669817686081,
0.09430916607379913,
0.3902568221092224,
0.21983717381954193,
0.3261696696281433,
-0.05730718374252319,
0.07802140712738037,
0.0870085284113884,
-0.38687214255332947,
0.0628545731306076,
-0.19204869866371155,
-0.0946870669722557,
-0.06105036288499832,
0.5311378836631775,
-0.07420988380908966,
0.47884508967399597,
0.20848888158798218,
-0.03581467270851135,
0.5376518368721008,
-0.15025541186332703,
0.1837616115808487,
0.173873633146286,
0.3688545823097229,
-0.35868164896965027,
-0.07993713021278381,
-0.041148923337459564,
-0.38917407393455505,
-0.19401288032531738,
0.26705142855644226,
-0.022362638264894485,
-0.017677247524261475,
-0.35434094071388245,
-0.1577947437763214,
-0.36753952503204346,
0.12218239158391953,
-0.0502622127532959,
0.20322638750076294,
0.4276989996433258,
0.08812437951564789,
0.06535862386226654,
-0.19839458167552948,
0.1510775089263916,
-0.2707570195198059,
-0.10739636421203613,
-0.09710769355297089,
-0.22725830972194672,
-0.01231292262673378,
0.14865785837173462,
0.36505040526390076,
-0.36092400550842285,
0.27934837341308594,
-0.06933506578207016,
0.4252459406852722,
-0.2300674170255661,
0.13991013169288635,
-0.2663927972316742,
-0.025324061512947083,
0.19209608435630798,
0.038091886788606644,
0.27516159415245056,
0.0690239891409874,
0.27011072635650635,
-0.3026750385761261,
0.3971214294433594,
-0.049605511128902435,
-0.3965832591056824,
0.04402371868491173,
-0.002104714512825012,
-0.35729706287384033,
0.24185116589069366,
-0.19393518567085266,
0.24391236901283264,
0.15674012899398804,
-0.14957226812839508,
-0.29702305793762207,
0.07204994559288025,
-0.05048656836152077,
-0.09225922077894211,
0.6279120445251465,
0.3850618600845337,
-0.1324375867843628,
-0.191181942820549,
-0.21317462623119354,
0.042827315628528595,
0.28300708532333374,
0.21118375658988953,
-0.3966243863105774,
0.25199392437934875,
-0.13738779723644257,
-0.11864273995161057,
0.5024482607841492,
-0.07470021396875381,
-0.3204849064350128,
0.5063076019287109,
-0.08707829564809799,
0.18022219836711884,
-0.062212176620960236,
0.46363386511802673,
0.21603301167488098,
0.042014699429273605,
0.051006246358156204,
0.4863911271095276,
-0.14791668951511383,
0.1553371697664261,
-0.2005392462015152,
-0.12234745919704437,
0.10389354079961777,
0.4797149896621704,
0.04562590643763542,
0.18257322907447815,
-0.05006120353937149,
0.1873486489057541,
0.17891649901866913,
-0.020991284400224686,
-0.0779566764831543,
0.19626925885677338,
-0.11762525141239166,
0.042844027280807495,
0.05970534682273865,
-0.2848038971424103,
-0.6154298782348633,
0.35324713587760925,
0.1503707319498062,
-0.32254835963249207,
-0.06311315298080444,
-0.007872967049479485,
-0.06166595220565796,
-0.11725602298974991,
-0.01409802958369255,
-0.08452299237251282,
-0.1754075586795807,
0.01632559299468994,
-0.06331470608711243,
-0.40304943919181824,
-0.45660823583602905,
0.17250598967075348,
0.001413857564330101,
0.007622614502906799,
-0.33402156829833984,
0.11494654417037964,
0.3976430892944336,
-0.05062800273299217,
-0.0025287196040153503,
-0.08045893162488937,
-0.005834370851516724,
-0.26968109607696533,
-0.06570104509592056,
0.3011419475078583,
0.13932068645954132,
0.29792699217796326,
0.11367551237344742,
0.14503315091133118,
-0.03134799003601074,
-0.06815540045499802,
0.392751008272171,
-0.0917418897151947,
-0.007027153857052326,
-0.2175115942955017,
-0.18658319115638733,
0.3615926206111908,
-0.44064798951148987,
0.4426867663860321,
0.033450864255428314,
-0.2793012857437134,
0.11154283583164215,
-0.14442934095859528,
-0.10603976249694824,
-0.09069493412971497,
0.47027021646499634,
-0.2627222537994385,
0.37446990609169006,
0.25155413150787354,
-0.11801281571388245,
-0.04310453683137894,
0.22244040668010712,
-0.01099947839975357,
-0.02648310363292694,
0.30003589391708374,
-0.45675569772720337,
-0.027917012572288513,
-0.16574113070964813,
-0.18823100626468658,
0.11487465351819992,
0.1626734435558319,
0.11605862528085709,
-0.2489050030708313,
0.23451362550258636,
-0.13171103596687317,
0.17068271338939667,
0.11357392370700836,
0.1078629270195961,
0.18012744188308716,
-0.15707506239414215,
-0.17437691986560822,
-0.14152690768241882,
0.10435323417186737,
0.1491670459508896,
0.15525183081626892,
-0.24204735457897186,
0.040989093482494354,
-0.4336852431297302,
-0.09543563425540924,
0.10872490704059601,
0.0012945770286023617,
0.000010553747415542603,
-0.16840150952339172,
0.045546822249889374,
0.3233204782009125,
0.08706818521022797,
0.14288440346717834,
-0.22670917212963104,
0.15259626507759094,
-0.1484455019235611,
-0.37710410356521606,
-0.23462629318237305,
-0.27463823556900024,
-0.03316028416156769,
0.003381159156560898,
0.5305067300796509,
0.14176280796527863,
0.3325967490673065,
-0.21333272755146027,
-0.22711554169654846,
0.08890504390001297,
-0.051953427493572235,
-0.05185134708881378,
0.2499425709247589,
0.2526991665363312,
-0.12633660435676575,
0.30719369649887085,
0.2569517493247986,
-0.3159411549568176,
0.10980439186096191,
-0.10888876020908356,
0.003407090902328491,
0.06769706308841705,
0.16055411100387573,
0.3011195957660675,
0.0053967759013175964,
-0.16980406641960144,
-0.030708657577633858,
-0.3686232268810272,
0.36650919914245605,
0.016428686678409576,
0.11514264345169067,
0.060963500291109085,
-0.15349504351615906,
-0.20318754017353058,
-0.05514097213745117,
0.12407965213060379,
0.13005562126636505,
-0.24881745874881744,
0.3999466300010681,
0.1499371975660324,
-0.06740176677703857,
-0.06261874735355377,
-0.029601652175188065,
-0.15988580882549286,
0.2536572217941284,
-0.6322858333587646,
-0.03309547156095505,
-0.16977807879447937,
0.059150952845811844,
-0.09262508153915405,
-0.33799880743026733,
-0.030604474246501923,
-0.10774485021829605,
0.0659354105591774,
0.17353510856628418,
-0.1705046147108078,
-0.12342669814825058,
-0.3009800910949707,
0.03321707248687744,
0.007506081834435463,
0.2793804109096527,
-0.13134422898292542,
0.7960772514343262,
0.052701178938150406,
-0.1776236742734909,
-0.1590403914451599,
-0.1315191686153412,
0.05263764411211014,
-0.3936484754085541,
-0.3983531892299652,
-0.012133114971220493,
-0.17094916105270386,
-0.19291570782661438,
0.1234547346830368,
-0.056906841695308685,
-0.3607069253921509,
-0.18440720438957214,
-0.024530792608857155,
-0.2462882101535797,
-0.3422319293022156,
0.485838383436203,
-0.5331352353096008,
-0.15085837244987488,
-0.00021891668438911438,
0.2596709132194519,
-0.015386572107672691,
-0.29848581552505493,
-0.0077807046473026276,
0.07231319695711136,
0.5126262307167053,
-0.2478265017271042,
0.0950121134519577,
0.23208506405353546,
-0.23543131351470947,
0.1943081170320511,
-0.15845979750156403,
0.15554898977279663,
-0.04715961962938309,
-0.14702311158180237,
0.31142061948776245,
0.1976335644721985,
0.651682436466217,
0.013133157044649124,
0.12698811292648315,
-0.02564329095184803,
-0.5850499272346497,
-0.27652621269226074,
0.059520263224840164,
0.09031035006046295,
0.5965147614479065,
0.15767180919647217,
0.3528323173522949,
-0.3361721932888031,
-0.1693977415561676,
0.15827582776546478,
0.3369893431663513,
-0.2529733180999756,
-0.15420211851596832,
-0.24787335097789764,
0.10856831818819046,
-0.3825855255126953,
0.06953496485948563,
-0.013652742840349674,
-0.20192477107048035,
0.07567751407623291,
-0.17208659648895264,
-0.3040813207626343,
0.08185585588216782,
0.14047318696975708,
0.29081353545188904,
0.21066898107528687,
-0.11113850772380829,
0.6667954921722412,
0.30496102571487427,
-0.1057518869638443,
0.2823258340358734,
0.388948917388916,
-0.006625942885875702,
-0.26719629764556885,
0.1825743019580841,
-0.11432336270809174,
0.20097896456718445,
0.4967259466648102,
-0.032811373472213745,
-0.18059271574020386,
0.11691702902317047,
0.21658478677272797,
-0.36740612983703613,
0.04258802533149719,
0.10228073596954346,
0.0049077849835157394,
-0.30117231607437134,
-0.5198274254798889,
0.39541664719581604,
-0.0661347508430481,
0.039684683084487915,
0.6187750697135925,
-0.2771739959716797,
-0.008443513885140419,
0.1720665544271469,
0.021292321383953094,
0.9266534447669983,
-0.32377010583877563,
-0.02672583982348442,
-0.47110965847969055,
0.04204750806093216,
0.3918364346027374,
-0.2913416922092438,
0.03272825479507446,
-0.3474794626235962,
-0.6259024143218994,
0.09391651302576065,
-0.25494128465652466,
-0.24244841933250427,
0.30786293745040894,
0.2693953216075897,
0.24445492029190063,
-0.4067322015762329,
0.07542679458856583,
-0.10805158317089081,
0.3130568861961365,
0.052310727536678314,
-0.3572489321231842,
-0.033037081360816956,
0.015045899897813797,
-0.015557192265987396,
0.1669778674840927,
0.07609588652849197,
0.046335265040397644,
-0.043138984590768814,
0.16992969810962677,
-0.4182586669921875,
0.12732064723968506,
-0.11746066063642502,
-0.134280726313591,
-0.22342506051063538,
-0.3589175343513489,
0.08065527677536011,
0.16421180963516235,
-0.06633831560611725,
0.12774641811847687,
-0.07710307836532593,
0.3243991434574127,
0.020370539277791977,
0.167710080742836,
0.05372389778494835,
0.04041033983230591,
-0.06892796605825424,
-0.056078385561704636,
-0.08291716128587723,
-0.23831412196159363,
-0.2540108263492584,
-0.42317986488342285,
0.25562161207199097,
0.2539014518260956,
0.11000034958124161,
-0.03198038786649704,
-0.2888384461402893,
-0.01551191508769989,
0.16552497446537018,
-0.20772197842597961,
0.04955724626779556,
0.44507038593292236,
-0.029083771631121635,
0.20750117301940918,
0.22862625122070312,
-0.44483280181884766,
-0.019374538213014603,
0.3128206431865692,
0.1547844409942627,
-0.024568719789385796,
0.4885365962982178,
-0.02388659678399563,
-0.34825098514556885,
-0.09680044651031494,
0.0324065163731575,
0.3478178381919861,
-0.5323247909545898,
0.04322585090994835,
-0.09543228149414062,
0.07178415358066559,
-0.08557906001806259,
-0.25740692019462585,
-0.08272899687290192,
0.02523021772503853,
-0.37232962250709534,
-0.3997134268283844,
-0.12438184022903442,
0.255515992641449,
-0.0016860514879226685,
0.31688714027404785,
-0.28822124004364014,
-0.13578295707702637,
-0.11567811667919159,
0.4980582594871521,
-0.15065434575080872,
-0.12287654727697372,
-0.11880280822515488,
0.3464043140411377,
0.05294818431138992,
0.025047441944479942,
0.34501543641090393,
-0.12824630737304688,
-0.0013387277722358704,
0.02664203941822052,
0.16036361455917358,
-0.10477949678897858,
0.107430100440979,
0.203257218003273,
-0.24223798513412476,
-0.23293723165988922,
-0.1401110291481018,
-0.1356322169303894,
-0.1378343403339386,
-0.3078644871711731,
0.21517294645309448,
0.16676703095436096,
0.187856525182724,
-0.14241071045398712,
0.426820307970047,
-0.031564727425575256,
-0.41165047883987427,
0.2446378469467163,
-0.28854379057884216,
0.3497883081436157,
-0.14570146799087524,
0.23301982879638672,
0.11680922657251358,
0.013067953288555145,
0.027390355244278908,
-0.16202539205551147,
0.34982746839523315,
-0.0905715748667717,
0.14390815794467926,
0.04983006417751312,
0.2511838972568512,
0.07122182846069336,
0.3635656535625458,
0.7526986002922058,
0.04212946444749832,
0.2309817224740982,
0.03586935997009277,
0.02665753662586212,
-0.04563575237989426,
-0.07973283529281616,
0.08894681930541992,
-0.354572057723999,
-0.036071449518203735,
0.22081628441810608,
-0.18600332736968994,
0.2577248513698578,
-0.02993045002222061,
-0.24127396941184998,
0.24923424422740936,
-0.2294997125864029,
-0.02349209412932396,
0.3386663496494293,
-0.18343615531921387,
-0.07223913073539734,
0.11411108076572418,
0.2787189781665802,
0.00440467894077301,
0.3821214437484741,
-0.10713887959718704,
0.1787780076265335,
0.15787173807621002,
0.18651464581489563,
-0.2052660584449768,
-0.39746418595314026,
-0.007393885403871536,
0.579564094543457,
0.15096578001976013,
0.006389480084180832,
-0.15505149960517883,
0.02977724000811577,
0.15681448578834534,
-0.23019343614578247,
-0.040393028408288956,
0.05574267357587814,
0.10630271583795547,
-0.08712831139564514,
0.24209153652191162,
-0.12436926364898682,
-0.253274142742157,
0.1570650041103363,
-0.18576514720916748,
-0.3671960234642029,
-0.1061079353094101,
0.32317352294921875,
0.22040727734565735,
-0.12150859832763672,
0.15510208904743195,
-0.07876776158809662,
0.2425985038280487,
-0.3389587104320526,
0.13904498517513275,
-0.14756588637828827,
0.32077085971832275,
0.487792432308197,
-0.0260480809956789,
0.0615062415599823,
0.16703687608242035,
-0.12295176088809967,
0.05738094821572304,
0.2521364986896515,
-0.045572955161333084,
-0.2194969207048416,
0.3887048661708832,
0.10532227903604507,
0.3220391571521759,
0.0493757538497448,
0.018255004659295082,
-0.07622749358415604,
0.14854222536087036,
-0.2521016001701355,
-0.04111231118440628,
-0.4598376750946045,
0.3122321367263794,
0.12219180911779404,
-0.2666967511177063,
-0.059816598892211914,
-0.16204026341438293,
0.19326350092887878,
-0.5238357186317444,
0.24195456504821777,
-0.32608672976493835,
-0.07653391361236572,
0.32908910512924194,
0.01786922663450241,
-0.07855358719825745,
0.6179025173187256,
0.09017517417669296,
0.6525300145149231,
-0.24137184023857117,
0.04499487578868866,
-0.4157399833202362,
0.07186013460159302,
-0.08020688593387604,
-0.017930131405591965,
0.43355122208595276,
0.18779753148555756,
0.35946783423423767,
0.3741154670715332,
0.06507425010204315,
-0.013917120173573494,
0.38737955689430237,
0.3575513958930969,
-0.04182836785912514,
0.012162717059254646,
-0.5447232723236084,
0.19337284564971924,
0.0058096908032894135,
-0.3408645689487457,
0.23038659989833832,
0.03536759316921234,
-0.1486154943704605,
0.3801405429840088,
-0.39337027072906494,
0.4711255133152008,
0.3187217116355896,
0.32603883743286133,
-0.22658734023571014,
0.6798650026321411,
0.02504989504814148,
-0.12495432049036026,
-0.06593184173107147,
-0.5260884761810303,
-0.2678968608379364,
0.35941940546035767,
0.14789296686649323,
-0.21176767349243164,
-0.04711464047431946,
0.014473766088485718,
-0.2860053479671478,
0.17873136699199677,
-0.19559702277183533,
0.05164400115609169,
-0.07790079712867737,
-0.42431876063346863,
0.12158339470624924,
0.29159680008888245,
0.265249103307724,
0.14659053087234497,
-0.10060639679431915,
-0.23374135792255402,
-0.17218613624572754,
0.0066245123744010925,
0.510165810585022,
-0.12486304342746735,
-0.047891683876514435,
0.0060922009870409966,
0.33915776014328003,
0.18186044692993164,
0.21796824038028717,
-0.564407467842102,
-0.03709941357374191,
0.266211599111557,
-0.22866693139076233,
0.08096711337566376,
0.0042563145980238914,
0.10769912600517273,
-0.06291504204273224,
-0.2644651532173157,
0.11962264776229858,
0.05840455740690231,
-0.062307924032211304,
-0.37675410509109497,
-0.32122617959976196
] |
https://github.com/huggingface/datasets/issues/2538 | Loading partial dataset when debugging | Thanks all for responding.
Hey @albertvillanova
Thanks. Yes, I would be interested.
@lhoestq I think even if a small split is specified it loads up the full dataset from the disk (please correct me if this is not the case). Because it does seem to be slow to me even on subsequent calls. There is no repeated downloading so it seems that the cache is working.
I am not aware of the streaming feature @thomwolf mentioned. So I might need to read up on it. | I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks! | 85 | Loading partial dataset when debugging
I am using PyTorch Lightning along with datasets (thanks for so many datasets already prepared and the great splits).
Every time I execute load_dataset for the imdb dataset it takes some time even if I specify a split involving very few samples. I guess this due to hashing as per the other issues.
Is there a way to only load part of the dataset on load_dataset? This would really speed up my workflow.
Something like a debug mode would really help. Thanks!
Thanks all for responding.
Hey @albertvillanova
Thanks. Yes, I would be interested.
@lhoestq I think even if a small split is specified it loads up the full dataset from the disk (please correct me if this is not the case). Because it does seem to be slow to me even on subsequent calls. There is no repeated downloading so it seems that the cache is working.
I am not aware of the streaming feature @thomwolf mentioned. So I might need to read up on it. | [
-0.4159128963947296,
-0.14814651012420654,
-0.012523218989372253,
0.3571516275405884,
-0.09925192594528198,
0.27749407291412354,
0.5004053711891174,
0.41252967715263367,
0.3049236536026001,
-0.16910333931446075,
-0.09666997194290161,
0.12072709947824478,
-0.11352915316820145,
0.2518864572048187,
0.12172917276620865,
0.06238380819559097,
-0.1812783181667328,
0.3625117540359497,
0.05583025515079498,
-0.12074318528175354,
0.17328359186649323,
-0.20111827552318573,
-0.22024886310100555,
-0.21686069667339325,
-0.38894954323768616,
0.07649622857570648,
0.10064053535461426,
0.15147706866264343,
0.2842654883861542,
-0.1781845986843109,
0.3325760066509247,
0.1009301245212555,
0.043035268783569336,
0.15291088819503784,
-0.0001255008246516809,
0.003987669944763184,
0.5047402381896973,
-0.1904088705778122,
-0.4295719563961029,
0.08613744378089905,
-0.20116201043128967,
0.013138093054294586,
0.4568482041358948,
-0.006286092102527618,
-0.0801529735326767,
-0.18912455439567566,
0.019671253859996796,
-0.34952259063720703,
0.30237746238708496,
0.013710924424231052,
0.05769217759370804,
0.06856296211481094,
-0.5156862735748291,
0.1896025836467743,
0.16702309250831604,
-0.03355175256729126,
-0.023258253931999207,
0.3747788965702057,
0.4744546711444855,
0.026535676792263985,
-0.3703329265117645,
0.15619264543056488,
-0.12065389007329941,
0.334969699382782,
0.42637819051742554,
-0.027421079576015472,
-0.08636453002691269,
-0.5245528221130371,
0.3088875412940979,
0.43285539746284485,
0.7110123634338379,
0.06915213167667389,
-0.3323354125022888,
-0.5463768839836121,
0.05531617999076843,
-0.12147042155265808,
0.15069270133972168,
0.05594655126333237,
-0.48586905002593994,
-0.01601504161953926,
-0.474749892950058,
-0.17957322299480438,
0.009408891201019287,
0.15969324111938477,
0.03705766797065735,
-0.2802905738353729,
0.04891849309206009,
0.10702767968177795,
0.35593315958976746,
0.24729907512664795,
0.3180222511291504,
-0.10363610088825226,
0.07162439078092575,
0.08556674420833588,
-0.3632460832595825,
0.039683736860752106,
-0.18767711520195007,
-0.06346259266138077,
-0.03511190786957741,
0.4928968548774719,
0.05373279005289078,
0.44197410345077515,
0.19517265260219574,
-0.053911857306957245,
0.5882900357246399,
-0.12397989630699158,
0.199956014752388,
0.13202928006649017,
0.39576542377471924,
-0.2681330442428589,
-0.04287796840071678,
-0.03036092221736908,
-0.3341366946697235,
-0.058583956211805344,
0.2521041929721832,
-0.08398830890655518,
-0.05640999227762222,
-0.34373939037323,
-0.1681811809539795,
-0.3101803958415985,
0.1414814591407776,
-0.08817432820796967,
0.20621304214000702,
0.41737276315689087,
0.07371587306261063,
0.07970140874385834,
-0.1862519234418869,
0.12311774492263794,
-0.23081311583518982,
-0.15629984438419342,
-0.10044078528881073,
-0.20526130497455597,
-0.00798410177230835,
0.1595643013715744,
0.3800743818283081,
-0.3889925181865692,
0.34798771142959595,
-0.13703978061676025,
0.4121003746986389,
-0.16636741161346436,
0.11366330087184906,
-0.26661524176597595,
0.01714358478784561,
0.20175187289714813,
0.04243413731455803,
0.27241581678390503,
0.08877964317798615,
0.2402317374944687,
-0.2842928469181061,
0.45750555396080017,
-0.007822103798389435,
-0.36091163754463196,
0.0774083286523819,
-0.008456644602119923,
-0.3604275584220886,
0.2339562177658081,
-0.252204567193985,
0.30748510360717773,
0.11198003590106964,
-0.23428106307983398,
-0.2774870693683624,
0.08198026567697525,
-0.05166451260447502,
-0.09618550539016724,
0.6512783765792847,
0.43517494201660156,
-0.18351531028747559,
-0.26623445749282837,
-0.17411790788173676,
0.04885190725326538,
0.24126437306404114,
0.2247578203678131,
-0.4059406518936157,
0.1950821876525879,
-0.1556665450334549,
-0.030799202620983124,
0.5310046672821045,
-0.05498082935810089,
-0.3930068612098694,
0.553425133228302,
-0.04235539585351944,
0.1968267560005188,
-0.014045357704162598,
0.4981529414653778,
0.27929526567459106,
0.0834641233086586,
0.08598928898572922,
0.46846938133239746,
-0.1412011981010437,
0.1441650539636612,
-0.21534165740013123,
-0.11615558713674545,
0.1395130157470703,
0.4743177890777588,
0.04317868500947952,
0.18870460987091064,
-0.03095439076423645,
0.1427437961101532,
0.25083306431770325,
0.01469346508383751,
-0.043091192841529846,
0.1715889871120453,
-0.1290428340435028,
0.004890628159046173,
0.07088597118854523,
-0.25151994824409485,
-0.6060564517974854,
0.35161906480789185,
0.21215790510177612,
-0.34689584374427795,
-0.017834246158599854,
0.01499813050031662,
-0.10390486568212509,
-0.13330160081386566,
-0.010695185512304306,
-0.13978035748004913,
-0.18772563338279724,
0.058075033128261566,
-0.055259592831134796,
-0.38996484875679016,
-0.5041703581809998,
0.17053695023059845,
0.01385250873863697,
0.011117306537926197,
-0.3354496359825134,
0.17811286449432373,
0.40084683895111084,
-0.046254951506853104,
0.014477591961622238,
-0.16219016909599304,
0.006824508309364319,
-0.23686440289020538,
-0.07591821253299713,
0.29597577452659607,
0.14868681132793427,
0.2828855514526367,
0.11451095342636108,
0.11395367980003357,
0.020264433696866035,
-0.1139083057641983,
0.42750489711761475,
0.027754463255405426,
0.035204485058784485,
-0.20949211716651917,
-0.2280774712562561,
0.3332338333129883,
-0.44680318236351013,
0.38997888565063477,
0.08672372996807098,
-0.27793803811073303,
0.1355459988117218,
-0.0903223529458046,
-0.13101474940776825,
-0.059162259101867676,
0.4690311849117279,
-0.26533201336860657,
0.33212611079216003,
0.2059682309627533,
-0.17018094658851624,
-0.0676315501332283,
0.18055464327335358,
-0.05474083125591278,
-0.028181567788124084,
0.31914517283439636,
-0.5030072331428528,
-0.08555585145950317,
-0.071067214012146,
-0.15355026721954346,
0.17065531015396118,
0.14122529327869415,
0.12573599815368652,
-0.24631768465042114,
0.3012811839580536,
-0.09736903011798859,
0.1797521412372589,
0.07644687592983246,
0.023991648107767105,
0.2401656210422516,
-0.16928935050964355,
-0.1677248626947403,
-0.20757699012756348,
0.1335400640964508,
0.16330114006996155,
0.1261618435382843,
-0.24610090255737305,
0.055954210460186005,
-0.3923881947994232,
-0.13712921738624573,
0.09841839969158173,
-0.02630835399031639,
-0.01624322310090065,
-0.11454447358846664,
0.029551150277256966,
0.3922598659992218,
0.13704945147037506,
0.13233593106269836,
-0.24320849776268005,
0.20425984263420105,
-0.15110503137111664,
-0.37578174471855164,
-0.2814655303955078,
-0.2621000409126282,
-0.04854945093393326,
0.003944702446460724,
0.44296127557754517,
0.1515246480703354,
0.26915961503982544,
-0.230483740568161,
-0.23614256083965302,
0.10462430119514465,
-0.044562943279743195,
-0.04105906933546066,
0.23516015708446503,
0.21459174156188965,
-0.14067582786083221,
0.354592502117157,
0.21720193326473236,
-0.2870870530605316,
0.06787053495645523,
-0.1821412742137909,
-0.008720886893570423,
0.07924599200487137,
0.20336341857910156,
0.3169820010662079,
0.0007930546998977661,
-0.14705350995063782,
-0.07988300174474716,
-0.3423277735710144,
0.3489236831665039,
0.02194896712899208,
0.1081119179725647,
0.013132328167557716,
-0.20319020748138428,
-0.18802790343761444,
-0.020102927461266518,
0.12279199808835983,
0.0990581139922142,
-0.27364057302474976,
0.3888798952102661,
0.16853013634681702,
-0.13197582960128784,
-0.01974894106388092,
-0.042800046503543854,
-0.17256008088588715,
0.24570587277412415,
-0.7163404226303101,
-0.036367565393447876,
-0.1039072722196579,
-0.027533624321222305,
-0.14114579558372498,
-0.3152744770050049,
-0.009318843483924866,
-0.163862943649292,
0.08798661828041077,
0.14057594537734985,
-0.24662846326828003,
-0.1660841405391693,
-0.2383488118648529,
0.03270441293716431,
-0.05191568285226822,
0.27903884649276733,
-0.10510814189910889,
0.7948539853096008,
0.06696225702762604,
-0.13587573170661926,
-0.12086218595504761,
-0.1152939572930336,
0.074808768928051,
-0.4005531072616577,
-0.3552457392215729,
0.004725072532892227,
-0.21756115555763245,
-0.2861960530281067,
0.13862408697605133,
-0.08460526913404465,
-0.37366053462028503,
-0.21034497022628784,
-0.0040329620242118835,
-0.24126040935516357,
-0.2968299984931946,
0.44433876872062683,
-0.4901677966117859,
-0.16395577788352966,
0.008424431085586548,
0.2829977869987488,
0.014987263828516006,
-0.3082874119281769,
-0.0442693717777729,
0.11671461164951324,
0.5464727282524109,
-0.20556487143039703,
0.07723651826381683,
0.20334602892398834,
-0.22944334149360657,
0.1801030933856964,
-0.13839268684387207,
0.15408802032470703,
-0.03720200061798096,
-0.18684759736061096,
0.3023756146430969,
0.20275698602199554,
0.6964055299758911,
0.029053473845124245,
0.1523526906967163,
-0.029448945075273514,
-0.5537367463111877,
-0.3339636027812958,
0.051313769072294235,
0.12365728616714478,
0.5426995754241943,
0.14164985716342926,
0.33195874094963074,
-0.3412107527256012,
-0.08572893589735031,
0.08784108608961105,
0.34751954674720764,
-0.2562970817089081,
-0.11656419932842255,
-0.27331507205963135,
0.11155229061841965,
-0.33919963240623474,
0.046034108847379684,
-0.034102629870176315,
-0.25683996081352234,
0.07717777788639069,
-0.13583466410636902,
-0.1969120055437088,
0.0703863874077797,
0.10829400271177292,
0.3095800280570984,
0.25614991784095764,
-0.07959934324026108,
0.6283696889877319,
0.2473168969154358,
-0.07466830313205719,
0.2623119056224823,
0.44843757152557373,
0.054111212491989136,
-0.23913273215293884,
0.25597888231277466,
-0.07614117115736008,
0.15703141689300537,
0.48055756092071533,
-0.027321718633174896,
-0.17404690384864807,
0.16577209532260895,
0.18218004703521729,
-0.353528767824173,
0.029665017500519753,
0.04374806582927704,
-0.036374833434820175,
-0.2842458486557007,
-0.5381664633750916,
0.4099709689617157,
-0.158342182636261,
0.0270082950592041,
0.5929954051971436,
-0.2678990364074707,
0.043302133679389954,
0.17118552327156067,
-0.03412509709596634,
0.9001871943473816,
-0.27759426832199097,
0.01810397580265999,
-0.47384992241859436,
0.025515161454677582,
0.38267043232917786,
-0.25293704867362976,
0.05766059830784798,
-0.3758234679698944,
-0.631865382194519,
0.04519466310739517,
-0.27000176906585693,
-0.256080687046051,
0.29038727283477783,
0.19188927114009857,
0.26269838213920593,
-0.3450230360031128,
0.145223006606102,
-0.08962984383106232,
0.2789686918258667,
0.009276080876588821,
-0.3133336007595062,
-0.07878334820270538,
-0.011240331456065178,
-0.0686865895986557,
0.18296349048614502,
0.11946303397417068,
0.03241671994328499,
-0.013715192675590515,
0.12810015678405762,
-0.4161299467086792,
0.15090438723564148,
-0.13541445136070251,
-0.10830691456794739,
-0.2610020935535431,
-0.44593292474746704,
0.0013435129076242447,
0.18915721774101257,
-0.1695791780948639,
0.007953736931085587,
-0.09622995555400848,
0.3113497793674469,
-0.002812817692756653,
0.23179447650909424,
0.034233178943395615,
0.09171988070011139,
-0.08843421190977097,
-0.06694154441356659,
-0.08679640293121338,
-0.1193690374493599,
-0.2997490465641022,
-0.41807037591934204,
0.32023343443870544,
0.2411242425441742,
0.17271926999092102,
-0.04884197562932968,
-0.24463513493537903,
-0.020854994654655457,
0.15519006550312042,
-0.20338767766952515,
0.0130448117852211,
0.44227856397628784,
-0.05470477417111397,
0.17661727964878082,
0.23174597322940826,
-0.38996192812919617,
-0.032445527613162994,
0.40002578496932983,
0.17748937010765076,
-0.012209206819534302,
0.47297361493110657,
-0.09839038550853729,
-0.3320080637931824,
-0.09052971005439758,
0.05281753093004227,
0.29138076305389404,
-0.49665603041648865,
0.007760757580399513,
-0.13627468049526215,
0.10667853057384491,
-0.13566085696220398,
-0.2550938129425049,
-0.06006970256567001,
0.08961698412895203,
-0.3603338599205017,
-0.42926833033561707,
-0.16038529574871063,
0.29256701469421387,
-0.0006644017994403839,
0.28138840198516846,
-0.24829566478729248,
-0.1884152889251709,
-0.08656203746795654,
0.4756282567977905,
-0.1367110162973404,
-0.08252838999032974,
-0.06714512407779694,
0.3384632468223572,
0.03540796786546707,
0.06083106994628906,
0.352575421333313,
-0.1260366588830948,
-0.038571614772081375,
0.02455846406519413,
0.16562232375144958,
-0.0732397586107254,
0.12851427495479584,
0.2295505702495575,
-0.1557936668395996,
-0.2205277681350708,
-0.23342905938625336,
-0.1802588701248169,
-0.12481939792633057,
-0.2638162076473236,
0.25114625692367554,
0.1583966314792633,
0.16945569217205048,
-0.11068272590637207,
0.49149560928344727,
-0.06092388182878494,
-0.4792810082435608,
0.221491739153862,
-0.296714723110199,
0.3501197099685669,
-0.12634509801864624,
0.20382195711135864,
0.09910585731267929,
-0.010507404804229736,
-0.03576775640249252,
-0.10170476883649826,
0.31243863701820374,
-0.11133604496717453,
0.2047921121120453,
0.04702718183398247,
0.2950063645839691,
0.0029083709232509136,
0.3840973377227783,
0.8036359548568726,
0.03344736993312836,
0.26185011863708496,
-0.009987130761146545,
0.023774411529302597,
-0.05242595076560974,
-0.13272526860237122,
0.04297058656811714,
-0.35470762848854065,
-0.03279481455683708,
0.2194911390542984,
-0.17780303955078125,
0.1971535086631775,
0.006639860570430756,
-0.2571288049221039,
0.2985549867153168,
-0.15951523184776306,
-0.0018200669437646866,
0.3739382326602936,
-0.22261951863765717,
-0.024882156401872635,
0.05943842977285385,
0.27850401401519775,
0.010102637112140656,
0.3171229362487793,
-0.10134468227624893,
0.2024621069431305,
0.16210132837295532,
0.17477278411388397,
-0.2879357933998108,
-0.4448857605457306,
-0.04596642032265663,
0.508470892906189,
0.14092960953712463,
0.03496287390589714,
-0.11586758494377136,
-0.01838362216949463,
0.11527415364980698,
-0.2419973909854889,
-0.058295153081417084,
-0.014558695256710052,
0.12229295074939728,
-0.0667562186717987,
0.23572000861167908,
-0.16624712944030762,
-0.18681824207305908,
0.19921831786632538,
-0.2124331295490265,
-0.3387027978897095,
-0.12238530814647675,
0.3224782943725586,
0.13677185773849487,
-0.111493319272995,
0.05985449254512787,
-0.05683083087205887,
0.2279421091079712,
-0.33981576561927795,
0.1281615048646927,
-0.13082151114940643,
0.31740355491638184,
0.5237308144569397,
-0.025046316906809807,
-0.004435133188962936,
0.10366521030664444,
-0.08806496858596802,
0.06026247888803482,
0.3079099953174591,
-0.03868788480758667,
-0.23401811718940735,
0.3626217544078827,
0.1883050799369812,
0.3122752010822296,
0.03324199095368385,
0.01438882201910019,
-0.05941065400838852,
0.23646554350852966,
-0.2298782616853714,
-0.037265148013830185,
-0.4761093258857727,
0.2671965956687927,
0.10544909536838531,
-0.23716577887535095,
-0.016149386763572693,
-0.15957984328269958,
0.1871897578239441,
-0.4613906741142273,
0.2017507553100586,
-0.3219949007034302,
-0.04847702011466026,
0.32828354835510254,
0.004022892564535141,
-0.09810297191143036,
0.6001442074775696,
0.0621681772172451,
0.560213029384613,
-0.22831419110298157,
0.02136218547821045,
-0.417223185300827,
0.09457000344991684,
-0.016452383249998093,
-0.006825817748904228,
0.4296317994594574,
0.20576372742652893,
0.3834550976753235,
0.3887081742286682,
0.03558940440416336,
0.03802443668246269,
0.29149171710014343,
0.3280864655971527,
-0.016789408400654793,
-0.05895547196269035,
-0.5148504972457886,
0.28426069021224976,
-0.0555005744099617,
-0.3336772620677948,
0.2457810640335083,
0.0031636571511626244,
-0.15669822692871094,
0.41018253564834595,
-0.4301162362098694,
0.4235067069530487,
0.35959941148757935,
0.350681334733963,
-0.21700288355350494,
0.6864233016967773,
0.022863902151584625,
-0.13767094910144806,
-0.029638733714818954,
-0.5314252972602844,
-0.2944948375225067,
0.3133070766925812,
0.12606221437454224,
-0.11574997007846832,
-0.012856962159276009,
0.023660359904170036,
-0.2885635793209076,
0.2185402661561966,
-0.1884385496377945,
0.03442594036459923,
-0.07424312829971313,
-0.40675684809684753,
0.09701285511255264,
0.3279886841773987,
0.2838810980319977,
0.16559141874313354,
-0.13930939137935638,
-0.2604670226573944,
-0.1652662754058838,
0.03573407977819443,
0.5490169525146484,
-0.17038466036319733,
-0.0008901674300432205,
0.007442926988005638,
0.33009642362594604,
0.16132327914237976,
0.24427393078804016,
-0.5656346678733826,
-0.018794924020767212,
0.3026261329650879,
-0.266338974237442,
0.05325872078537941,
-0.010547572746872902,
0.040148619562387466,
-0.05776848644018173,
-0.24615201354026794,
0.18530672788619995,
0.09047800302505493,
-0.12175785005092621,
-0.36858922243118286,
-0.3309919834136963
] |
https://github.com/huggingface/datasets/issues/2532 | Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task | Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**? | [This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner).
The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`:
![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png)
Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing)
It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'.
One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`.
I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this.
p.s.
**I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)**
`get_dataset `is just a simple wrapping for `load_dataset`
and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")` | 18 | Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task
[This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner).
The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`:
![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png)
Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing)
It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'.
One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`.
I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this.
p.s.
**I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)**
`get_dataset `is just a simple wrapping for `load_dataset`
and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")`
Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**? | [
-0.15369674563407898,
0.07901307940483093,
0.07378166913986206,
-0.03823079913854599,
0.09215665608644485,
-0.3246818780899048,
-0.08998145163059235,
0.10603128373622894,
-0.4617604613304138,
0.19867366552352905,
-0.20853781700134277,
0.3074204623699188,
0.27667683362960815,
0.030885959044098854,
-0.21919195353984833,
-0.16327735781669617,
0.14799317717552185,
0.21905723214149475,
0.005623526871204376,
0.06112270802259445,
-0.11941946297883987,
0.4571390151977539,
-0.2123357355594635,
0.2143605798482895,
-0.2866272032260895,
-0.07063647359609604,
0.12557700276374817,
-0.3156488239765167,
-0.16839726269245148,
-0.3988147974014282,
0.249714657664299,
0.11891087889671326,
-0.08367114514112473,
0.2043144404888153,
-0.00011269694368820637,
-0.05750168859958649,
-0.018035300076007843,
0.014288792386651039,
0.17867489159107208,
-0.19643272459506989,
0.12838619947433472,
-0.37691813707351685,
-0.3356098234653473,
0.10738933831453323,
-0.06367025524377823,
0.039611127227544785,
0.2408124953508377,
-0.05541929230093956,
0.6431410908699036,
0.4151502847671509,
0.14555536210536957,
-0.013488482683897018,
0.2545185089111328,
0.06076874956488609,
-0.3109234869480133,
0.26896730065345764,
-0.09506720304489136,
0.01901041343808174,
-0.15407228469848633,
0.03146955370903015,
-0.07465092092752457,
-0.009617893025279045,
-0.09227047860622406,
-0.48027557134628296,
-0.014886192977428436,
0.11489652842283249,
0.3214072287082672,
-0.4625914394855499,
0.18707329034805298,
0.018533281981945038,
-0.24988877773284912,
-0.045073337852954865,
-0.18307693302631378,
-0.39149412512779236,
-0.13682545721530914,
-0.267994225025177,
0.20009687542915344,
-0.15426203608512878,
-0.11812359094619751,
0.11682829260826111,
0.012084223330020905,
0.13784535229206085,
0.029742442071437836,
-0.21203939616680145,
-0.2942853569984436,
0.5647359490394592,
-0.06541189551353455,
0.04264507442712784,
-0.20475517213344574,
-0.010176733136177063,
0.3918435871601105,
-0.042820900678634644,
0.005982525646686554,
0.4373292028903961,
-0.2852559983730316,
-0.05852522328495979,
0.19706889986991882,
-0.4548262655735016,
-0.007933283224701881,
-0.035668738186359406,
0.12427040934562683,
0.20609620213508606,
0.0719594657421112,
0.06091728061437607,
-0.16301655769348145,
0.4642788767814636,
0.21145200729370117,
0.27663546800613403,
0.19684262573719025,
0.11708636581897736,
-0.03980060666799545,
-0.04044084995985031,
0.06278178840875626,
-0.1251496523618698,
-0.04987639933824539,
0.2508598566055298,
-0.3735535144805908,
0.10397166013717651,
-0.23151259124279022,
0.4121435284614563,
-0.07186699658632278,
0.30008161067962646,
0.033865414559841156,
-0.09935813397169113,
0.03931955248117447,
0.2893403470516205,
-0.3403160572052002,
-0.10191503167152405,
-0.08262230455875397,
0.10865522921085358,
-0.1952839344739914,
0.018983427435159683,
-0.2947448492050171,
0.12470877915620804,
-0.1966220587491989,
0.10817722976207733,
-0.02755037695169449,
0.12801147997379303,
0.35698604583740234,
-0.03269307315349579,
-0.08280517905950546,
-0.09475284814834595,
0.5368502140045166,
0.27820292115211487,
0.02615245059132576,
0.12618671357631683,
0.11548109352588654,
-0.35984086990356445,
-0.37482187151908875,
-0.043390803039073944,
-0.21579360961914062,
0.08999046683311462,
0.14790281653404236,
0.2012820988893509,
-0.10737746953964233,
0.13482153415679932,
-0.3785095810890198,
0.28587737679481506,
0.33080142736434937,
-0.2465241700410843,
0.0029814690351486206,
-0.3679085373878479,
-0.41353750228881836,
-0.18983206152915955,
0.3192930817604065,
-0.14425189793109894,
-0.0017323531210422516,
-0.00917079672217369,
0.11065924167633057,
0.18913887441158295,
0.4840118885040283,
0.13396500051021576,
0.3138596713542938,
0.3631415367126465,
-0.49170982837677,
0.4855651259422302,
0.09879171848297119,
-0.13364604115486145,
-0.0881662666797638,
-0.15464365482330322,
-0.39813166856765747,
0.2574172914028168,
-0.1778469681739807,
-0.2853301465511322,
0.14593137800693512,
0.16483430564403534,
0.16425079107284546,
0.4675338864326477,
-0.1345403492450714,
0.0967918112874031,
-0.08240286260843277,
0.3093522787094116,
-0.051647208631038666,
-0.26831987500190735,
0.012527752667665482,
-0.03489507734775543,
-0.23073670268058777,
-0.23822221159934998,
-0.15970271825790405,
-0.08852936327457428,
0.10251908004283905,
-0.08720821142196655,
0.04389958456158638,
-0.12961749732494354,
0.023830587044358253,
-0.15286478400230408,
0.042862825095653534,
-0.011600509285926819,
-0.36197981238365173,
0.22630374133586884,
0.006499245762825012,
-0.16657193005084991,
-0.24409854412078857,
0.1780441850423813,
-0.16995911300182343,
-0.13742025196552277,
0.2298451066017151,
0.06616363674402237,
0.17783059179782867,
0.333491712808609,
0.05531654879450798,
0.29946205019950867,
0.1876497119665146,
0.2598828077316284,
-0.23794056475162506,
0.16552165150642395,
-0.15393312275409698,
0.03288320079445839,
-0.10766257345676422,
0.4495721161365509,
0.05768623948097229,
-0.11599194258451462,
-0.12629857659339905,
0.2283831238746643,
0.25328528881073,
-0.04426836967468262,
-0.2839106023311615,
0.08557228744029999,
0.14712120592594147,
0.16321638226509094,
-0.37553179264068604,
0.284096896648407,
-0.20775215327739716,
-0.12244728952646255,
0.5265052914619446,
0.8932769298553467,
-0.03842529281973839,
0.12675273418426514,
-0.145782932639122,
-0.02217094600200653,
0.44586583971977234,
0.1181425154209137,
-0.15466374158859253,
-0.26945507526397705,
0.037207890301942825,
0.29752224683761597,
-0.10649268329143524,
0.025268934667110443,
-0.09403955191373825,
0.1421886384487152,
0.21936152875423431,
0.06661725044250488,
-0.22007566690444946,
0.11705373227596283,
0.004420511424541473,
-0.28483930230140686,
0.17360757291316986,
0.09409162402153015,
0.23082250356674194,
0.04038381204009056,
0.15981198847293854,
0.2757776379585266,
-0.2304847240447998,
-0.16235129535198212,
0.1398645043373108,
0.015991274267435074,
0.11915150284767151,
0.5081247687339783,
0.1112578958272934,
0.49174344539642334,
-0.25699907541275024,
-0.2506944239139557,
-0.32807356119155884,
0.04698139801621437,
-0.16429316997528076,
0.2328420728445053,
-0.2001020908355713,
-0.33812496066093445,
-0.4188857078552246,
-0.14505593478679657,
-0.11501029133796692,
-0.5577640533447266,
0.13810905814170837,
0.041325341910123825,
-0.27524077892303467,
0.4234623312950134,
0.11343641579151154,
0.25386932492256165,
-0.11761487275362015,
0.056621477007865906,
-0.22700779139995575,
0.049698151648044586,
-0.424137681722641,
-0.003203602507710457,
0.1883007436990738,
-0.22715160250663757,
0.18677839636802673,
-0.30085644125938416,
-0.05237336829304695,
0.16121122241020203,
-0.7381555438041687,
0.15768755972385406,
0.05999598652124405,
0.03008023276925087,
0.2673288881778717,
-0.2804103493690491,
-0.4084685444831848,
-0.5457130670547485,
0.11075866222381592,
0.02729729376733303,
-0.3636142313480377,
0.12399083375930786,
-0.081767737865448,
-0.14283016324043274,
-0.16446292400360107,
-0.023630619049072266,
0.06920316070318222,
-0.20587818324565887,
-0.04295669496059418,
-0.4525321125984192,
0.20525142550468445,
0.23798368871212006,
-0.4658520221710205,
-0.09506664425134659,
-0.4946010410785675,
0.03308161720633507,
-0.15787604451179504,
-0.08936275541782379,
0.20966842770576477,
-0.2081833779811859,
-0.060730498284101486,
-0.2306271344423294,
-0.3089908957481384,
0.4237653613090515,
0.03774287551641464,
-0.03285650908946991,
-0.021978454664349556,
0.023334462195634842,
0.06988739967346191,
-0.11609339714050293,
-0.0024435315281152725,
0.06314872205257416,
0.1390255242586136,
-0.03184446692466736,
0.00034264102578163147,
0.09777253866195679,
0.07185147702693939,
-0.2497500479221344,
0.11355892568826675,
-0.21417278051376343,
0.022147968411445618,
0.27030572295188904,
0.28458714485168457,
0.23099040985107422,
-0.2108982652425766,
0.04621383175253868,
0.047886304557323456,
0.14703397452831268,
-0.24811848998069763,
-0.18722987174987793,
0.1388607770204544,
0.16332893073558807,
-0.08042049407958984,
0.17763862013816833,
0.00433890987187624,
0.012496689334511757,
0.07874073833227158,
0.06714434921741486,
0.12392515689134598,
-0.5669609308242798,
0.17406614124774933,
0.0063352808356285095,
0.3078857958316803,
-0.022440029308199883,
0.00880521535873413,
-0.15569566190242767,
-0.16755276918411255,
-0.023015176877379417,
0.0912778228521347,
-0.06852438300848007,
0.0833251029253006,
-0.6093353629112244,
-0.40870609879493713,
-0.5790938138961792,
0.17966940999031067,
0.3769252300262451,
0.5158492922782898,
0.06319774687290192,
0.002239841967821121,
-0.060926347970962524,
0.19010230898857117,
0.4397820234298706,
-0.0025200117379426956,
-0.3540682792663574,
0.1587357521057129,
-0.24824750423431396,
0.04480782151222229,
-0.05999502167105675,
0.11924593150615692,
0.405915230512619,
0.46247968077659607,
0.6241881251335144,
-0.10790747404098511,
-0.044451236724853516,
-0.28336092829704285,
0.03802773356437683,
-0.043742768466472626,
-0.02791859582066536,
-0.23200978338718414,
-0.1256362497806549,
0.021411484107375145,
0.28267088532447815,
0.3797213137149811,
0.4987156093120575,
0.12521615624427795,
-0.3248324394226074,
-0.10135364532470703,
-0.06805083155632019,
-0.03759211301803589,
0.2665780782699585,
-0.0106767937541008,
0.047892168164253235,
0.059368010610342026,
0.017634611576795578,
0.19567689299583435,
0.4381665885448456,
-0.20380958914756775,
0.2262071669101715,
-0.5027623176574707,
-0.21395224332809448,
0.0629584863781929,
0.1709335446357727,
0.2143750786781311,
0.17903070151805878,
0.12522569298744202,
-0.2666704058647156,
0.019563041627407074,
-0.026946719735860825,
0.5451059937477112,
-0.11037779599428177,
0.24740561842918396,
-0.21154004335403442,
0.19465669989585876,
-0.11201906949281693,
0.13194943964481354,
-0.17595556378364563,
0.19865162670612335,
0.00942964106798172,
-0.48689043521881104,
0.2963678240776062,
0.3950628340244293,
0.953366219997406,
0.46903276443481445,
0.23238225281238556,
0.34437042474746704,
-0.3253106474876404,
0.5577524304389954,
0.012185171246528625,
0.22798261046409607,
-0.43249940872192383,
-0.13418401777744293,
-0.0456637367606163,
-0.006129670888185501,
-0.10332479327917099,
-0.1976802498102188,
-0.033066071569919586,
0.17414365708827972,
0.2883636951446533,
0.3233240842819214,
0.02776719257235527,
-0.098288893699646,
0.08145725727081299,
-0.3617427349090576,
-0.001346588134765625,
0.023409154266119003,
-0.06497298926115036,
0.0034672506153583527,
-0.16220137476921082,
0.11704550683498383,
-0.14431586861610413,
0.1657346934080124,
-0.2635447382926941,
-0.0700075551867485,
-0.27165764570236206,
0.09895695745944977,
0.32647496461868286,
-0.2881447970867157,
0.049925584346055984,
0.036864250898361206,
0.6191905736923218,
0.33154603838920593,
0.022582262754440308,
-0.03396715596318245,
0.14692285656929016,
0.24282364547252655,
0.044535838067531586,
-0.4531974196434021,
0.3092098534107208,
0.06240358203649521,
0.2238793671131134,
-0.4029242992401123,
0.09802277386188507,
0.215809628367424,
-0.25089138746261597,
-0.0615011602640152,
0.03825869411230087,
0.0031569134443998337,
0.225056990981102,
-0.11112815141677856,
0.20285595953464508,
-0.22562767565250397,
0.1336386501789093,
-0.033782683312892914,
-0.23149889707565308,
-0.008900851011276245,
-0.036962274461984634,
-0.3149183988571167,
0.04173847660422325,
0.20637719333171844,
-0.039448514580726624,
-0.5680707693099976,
0.258547842502594,
-0.38277044892311096,
-0.251392126083374,
-0.007450561970472336,
0.2281169295310974,
0.19664306938648224,
-0.0670425221323967,
0.1369251161813736,
-0.09811052680015564,
-0.29444074630737305,
-0.1854887157678604,
0.21928276121616364,
0.32198137044906616,
-0.1407369077205658,
0.045698706060647964,
-0.35104358196258545,
-0.1588989645242691,
0.001002766191959381,
-0.1786627620458603,
0.2199770212173462,
0.3252376914024353,
0.5128354430198669,
-0.38019347190856934,
0.1378069519996643,
-0.289776086807251,
-0.2866576015949249,
-0.1854332536458969,
-0.011455833911895752,
-0.44783881306648254,
-0.12181367725133896,
-0.46384549140930176,
-0.06610337644815445,
0.03964561969041824,
0.46778517961502075,
-0.09399249404668808,
-0.15835049748420715,
-0.15636113286018372,
0.09351423382759094,
0.3157992362976074,
-0.1554114818572998,
0.18161079287528992,
0.4209151268005371,
-0.10544456541538239,
-0.276010125875473,
-0.012592795304954052,
-0.006285097450017929,
-0.03437715023756027,
0.21518568694591522,
0.21609309315681458,
0.45626601576805115,
0.10220439732074738,
0.021516256034374237,
0.13706627488136292,
0.046913933008909225,
0.17423473298549652,
0.4892757534980774,
-0.30652639269828796,
-0.060269881039857864,
0.06501129269599915,
0.1609155833721161,
0.25885242223739624,
-0.10352436453104019,
0.21405139565467834,
0.1330469697713852,
-0.3981342017650604,
0.21249181032180786,
0.016654133796691895,
0.24890395998954773,
-0.0569148026406765,
-0.4193788766860962,
0.48726093769073486,
0.15493585169315338,
-0.07179544866085052,
0.05234526842832565,
0.3959011435508728,
-0.11986357718706131,
-0.05871317535638809,
0.053430408239364624,
0.2961944341659546,
-0.01740635186433792,
0.2820727825164795,
0.09700999408960342,
0.2905799150466919,
-0.03407764062285423,
0.16035735607147217,
0.029296083375811577,
0.01701970025897026,
0.4946974217891693,
0.4404009282588959,
-0.19571928679943085,
0.1561523824930191,
0.2504725456237793,
0.043895695358514786,
0.32307639718055725,
0.030817056074738503,
0.021972618997097015,
-0.0927131250500679,
-0.18686717748641968,
-0.27509039640426636,
0.1224018782377243,
-0.08907744288444519,
0.21071425080299377,
0.34142372012138367,
0.04269608482718468,
-0.06346464157104492,
-0.06216546520590782,
-0.00940992683172226,
0.17256277799606323,
-0.6092425584793091,
-0.10437552630901337,
-0.3937654197216034,
-0.06387650966644287,
-0.3130132257938385,
-0.08785918354988098,
0.11861440539360046,
0.16066396236419678,
0.013257481157779694,
-0.2074560672044754,
-0.3273746967315674,
-0.01577468402683735,
0.2165643274784088,
0.008498229086399078,
0.2358187735080719,
-0.08231787383556366,
0.29514622688293457,
0.010712534189224243,
0.0943172425031662,
-0.22710326313972473,
0.11802910268306732,
0.541067361831665,
0.19452451169490814,
-0.30490007996559143,
-0.18987499177455902,
-0.1428617388010025,
0.015930036082863808,
-0.22178514301776886,
0.37238192558288574,
-0.04617255926132202,
-0.11681772768497467,
0.18493060767650604,
0.045645758509635925,
-0.17474937438964844,
-0.04969098046422005,
0.2591230869293213,
0.09561006724834442,
0.25607219338417053,
0.3022282123565674,
0.0270090252161026,
0.04608696699142456,
0.13593938946723938,
-0.01663467288017273,
0.10464494675397873,
0.018619325011968613,
-0.19132140278816223,
-0.02246965281665325,
0.04960554838180542,
-0.13723205029964447,
0.08899516612291336,
0.24029910564422607,
0.3574056923389435,
0.5411996841430664,
-0.0921805277466774,
-0.20618906617164612,
-0.41495972871780396,
-0.38631293177604675,
0.521124005317688,
0.47850555181503296,
-0.016847554594278336,
-0.06296145170927048,
-0.1964927315711975,
-0.10751775652170181,
0.09571247547864914,
-0.41491007804870605,
0.1647542268037796,
0.08979523181915283,
0.16718682646751404,
-0.1554740071296692,
0.28123316168785095,
-0.0012406334280967712,
-0.4019351601600647,
-0.10898113995790482,
-0.0724288746714592,
0.29898518323898315,
0.028774335980415344,
0.0601961687207222,
0.20420914888381958,
-0.013470321893692017,
-0.1505279541015625,
0.320136696100235,
-0.05211441218852997,
0.6280626058578491,
0.13540689647197723,
-0.1455909013748169,
0.44118642807006836,
-0.01765042170882225,
0.02867744490504265,
-0.5843859314918518,
0.3166660666465759,
-0.23926067352294922,
0.3147203326225281,
0.03731536120176315,
-0.47179386019706726,
-0.050221819430589676,
0.025254152715206146,
0.34875810146331787,
-0.17208096385002136,
-0.3881036937236786,
0.3029593825340271,
-0.21387386322021484,
-0.035779185593128204,
0.05062929168343544,
0.388257771730423,
0.2650299668312073,
0.4494657814502716,
-0.2877141237258911,
-0.6340728402137756,
-0.03300686180591583,
-0.21014787256717682,
-0.28570201992988586,
-0.19992157816886902,
-0.11783638596534729,
0.2962208688259125,
-0.15328043699264526,
-0.13815069198608398,
-0.288376122713089,
0.1595625877380371,
-0.23512059450149536,
-0.29982009530067444,
0.24229300022125244,
-0.1733073890209198,
-0.03217118978500366,
-0.1982431858778,
0.397983193397522,
0.17415457963943481,
-0.25920790433883667,
0.10108746588230133,
-0.14171215891838074
] |
https://github.com/huggingface/datasets/issues/2532 | Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task | > Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**?
Oh, I am sorry
I would reopen the post on huggingface/transformers | [This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner).
The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`:
![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png)
Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing)
It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'.
One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`.
I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this.
p.s.
**I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)**
`get_dataset `is just a simple wrapping for `load_dataset`
and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")` | 30 | Tokenizer's normalization preprocessor cause misalignment in return_offsets_mapping for tokenizer classification task
[This colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) implements a token classification input pipeline extending the logic from [this hugging example](https://huggingface.co/transformers/custom_datasets.html#tok-ner).
The pipeline works fine with most instance in different languages, but unfortunately, [the Japanese Kana ligature (a form of abbreviation? I don't know Japanese well)](https://en.wikipedia.org/wiki/Kana_ligature) break the alignment of `return_offsets_mapping`:
![image](https://user-images.githubusercontent.com/50871412/122904371-db192700-d382-11eb-8917-1775db76db69.png)
Without the try catch block, it riase `ValueError: NumPy boolean array indexing assignment cannot assign 88 input values to the 87 output values where the mask is true`, example shown here [(another colab notebook)](https://colab.research.google.com/drive/1MmOqf3ppzzdKKyMWkn0bJy6DqzOO0SSm?usp=sharing)
It is clear that the normalizer is the process that break the alignment, as it is observed that `tokenizer._tokenizer.normalizer.normalize_str('ヿ')` return 'コト'.
One workaround is to include `tokenizer._tokenizer.normalizer.normalize_str` before the tokenizer preprocessing pipeline, which is also provided in the [first colab notebook](https://colab.research.google.com/drive/151gKyo0YIwnlznrOHst23oYH_a3mAe3Z?usp=sharing) with the name `udposTestDatasetWorkaround`.
I guess similar logics should be included inside the tokenizer and the offsets_mapping generation process such that user don't need to include them in their code. But I don't understand the code of tokenizer well that I think I am not able to do this.
p.s.
**I am using my own dataset building script in the provided example, but the script should be equivalent to the changes made by this [update](https://github.com/huggingface/datasets/pull/2466)**
`get_dataset `is just a simple wrapping for `load_dataset`
and the `tokenizer` is just `XLMRobertaTokenizerFast.from_pretrained("xlm-roberta-large")`
> Hi @jerryIsHere, thanks for reporting the issue. But are you sure this is a bug in HuggingFace **Datasets**?
Oh, I am sorry
I would reopen the post on huggingface/transformers | [
-0.15369674563407898,
0.07901307940483093,
0.07378166913986206,
-0.03823079913854599,
0.09215665608644485,
-0.3246818780899048,
-0.08998145163059235,
0.10603128373622894,
-0.4617604613304138,
0.19867366552352905,
-0.20853781700134277,
0.3074204623699188,
0.27667683362960815,
0.030885959044098854,
-0.21919195353984833,
-0.16327735781669617,
0.14799317717552185,
0.21905723214149475,
0.005623526871204376,
0.06112270802259445,
-0.11941946297883987,
0.4571390151977539,
-0.2123357355594635,
0.2143605798482895,
-0.2866272032260895,
-0.07063647359609604,
0.12557700276374817,
-0.3156488239765167,
-0.16839726269245148,
-0.3988147974014282,
0.249714657664299,
0.11891087889671326,
-0.08367114514112473,
0.2043144404888153,
-0.00011269694368820637,
-0.05750168859958649,
-0.018035300076007843,
0.014288792386651039,
0.17867489159107208,
-0.19643272459506989,
0.12838619947433472,
-0.37691813707351685,
-0.3356098234653473,
0.10738933831453323,
-0.06367025524377823,
0.039611127227544785,
0.2408124953508377,
-0.05541929230093956,
0.6431410908699036,
0.4151502847671509,
0.14555536210536957,
-0.013488482683897018,
0.2545185089111328,
0.06076874956488609,
-0.3109234869480133,
0.26896730065345764,
-0.09506720304489136,
0.01901041343808174,
-0.15407228469848633,
0.03146955370903015,
-0.07465092092752457,
-0.009617893025279045,
-0.09227047860622406,
-0.48027557134628296,
-0.014886192977428436,
0.11489652842283249,
0.3214072287082672,
-0.4625914394855499,
0.18707329034805298,
0.018533281981945038,
-0.24988877773284912,
-0.045073337852954865,
-0.18307693302631378,
-0.39149412512779236,
-0.13682545721530914,
-0.267994225025177,
0.20009687542915344,
-0.15426203608512878,
-0.11812359094619751,
0.11682829260826111,
0.012084223330020905,
0.13784535229206085,
0.029742442071437836,
-0.21203939616680145,
-0.2942853569984436,
0.5647359490394592,
-0.06541189551353455,
0.04264507442712784,
-0.20475517213344574,
-0.010176733136177063,
0.3918435871601105,
-0.042820900678634644,
0.005982525646686554,
0.4373292028903961,
-0.2852559983730316,
-0.05852522328495979,
0.19706889986991882,
-0.4548262655735016,
-0.007933283224701881,
-0.035668738186359406,
0.12427040934562683,
0.20609620213508606,
0.0719594657421112,
0.06091728061437607,
-0.16301655769348145,
0.4642788767814636,
0.21145200729370117,
0.27663546800613403,
0.19684262573719025,
0.11708636581897736,
-0.03980060666799545,
-0.04044084995985031,
0.06278178840875626,
-0.1251496523618698,
-0.04987639933824539,
0.2508598566055298,
-0.3735535144805908,
0.10397166013717651,
-0.23151259124279022,
0.4121435284614563,
-0.07186699658632278,
0.30008161067962646,
0.033865414559841156,
-0.09935813397169113,
0.03931955248117447,
0.2893403470516205,
-0.3403160572052002,
-0.10191503167152405,
-0.08262230455875397,
0.10865522921085358,
-0.1952839344739914,
0.018983427435159683,
-0.2947448492050171,
0.12470877915620804,
-0.1966220587491989,
0.10817722976207733,
-0.02755037695169449,
0.12801147997379303,
0.35698604583740234,
-0.03269307315349579,
-0.08280517905950546,
-0.09475284814834595,
0.5368502140045166,
0.27820292115211487,
0.02615245059132576,
0.12618671357631683,
0.11548109352588654,
-0.35984086990356445,
-0.37482187151908875,
-0.043390803039073944,
-0.21579360961914062,
0.08999046683311462,
0.14790281653404236,
0.2012820988893509,
-0.10737746953964233,
0.13482153415679932,
-0.3785095810890198,
0.28587737679481506,
0.33080142736434937,
-0.2465241700410843,
0.0029814690351486206,
-0.3679085373878479,
-0.41353750228881836,
-0.18983206152915955,
0.3192930817604065,
-0.14425189793109894,
-0.0017323531210422516,
-0.00917079672217369,
0.11065924167633057,
0.18913887441158295,
0.4840118885040283,
0.13396500051021576,
0.3138596713542938,
0.3631415367126465,
-0.49170982837677,
0.4855651259422302,
0.09879171848297119,
-0.13364604115486145,
-0.0881662666797638,
-0.15464365482330322,
-0.39813166856765747,
0.2574172914028168,
-0.1778469681739807,
-0.2853301465511322,
0.14593137800693512,
0.16483430564403534,
0.16425079107284546,
0.4675338864326477,
-0.1345403492450714,
0.0967918112874031,
-0.08240286260843277,
0.3093522787094116,
-0.051647208631038666,
-0.26831987500190735,
0.012527752667665482,
-0.03489507734775543,
-0.23073670268058777,
-0.23822221159934998,
-0.15970271825790405,
-0.08852936327457428,
0.10251908004283905,
-0.08720821142196655,
0.04389958456158638,
-0.12961749732494354,
0.023830587044358253,
-0.15286478400230408,
0.042862825095653534,
-0.011600509285926819,
-0.36197981238365173,
0.22630374133586884,
0.006499245762825012,
-0.16657193005084991,
-0.24409854412078857,
0.1780441850423813,
-0.16995911300182343,
-0.13742025196552277,
0.2298451066017151,
0.06616363674402237,
0.17783059179782867,
0.333491712808609,
0.05531654879450798,
0.29946205019950867,
0.1876497119665146,
0.2598828077316284,
-0.23794056475162506,
0.16552165150642395,
-0.15393312275409698,
0.03288320079445839,
-0.10766257345676422,
0.4495721161365509,
0.05768623948097229,
-0.11599194258451462,
-0.12629857659339905,
0.2283831238746643,
0.25328528881073,
-0.04426836967468262,
-0.2839106023311615,
0.08557228744029999,
0.14712120592594147,
0.16321638226509094,
-0.37553179264068604,
0.284096896648407,
-0.20775215327739716,
-0.12244728952646255,
0.5265052914619446,
0.8932769298553467,
-0.03842529281973839,
0.12675273418426514,
-0.145782932639122,
-0.02217094600200653,
0.44586583971977234,
0.1181425154209137,
-0.15466374158859253,
-0.26945507526397705,
0.037207890301942825,
0.29752224683761597,
-0.10649268329143524,
0.025268934667110443,
-0.09403955191373825,
0.1421886384487152,
0.21936152875423431,
0.06661725044250488,
-0.22007566690444946,
0.11705373227596283,
0.004420511424541473,
-0.28483930230140686,
0.17360757291316986,
0.09409162402153015,
0.23082250356674194,
0.04038381204009056,
0.15981198847293854,
0.2757776379585266,
-0.2304847240447998,
-0.16235129535198212,
0.1398645043373108,
0.015991274267435074,
0.11915150284767151,
0.5081247687339783,
0.1112578958272934,
0.49174344539642334,
-0.25699907541275024,
-0.2506944239139557,
-0.32807356119155884,
0.04698139801621437,
-0.16429316997528076,
0.2328420728445053,
-0.2001020908355713,
-0.33812496066093445,
-0.4188857078552246,
-0.14505593478679657,
-0.11501029133796692,
-0.5577640533447266,
0.13810905814170837,
0.041325341910123825,
-0.27524077892303467,
0.4234623312950134,
0.11343641579151154,
0.25386932492256165,
-0.11761487275362015,
0.056621477007865906,
-0.22700779139995575,
0.049698151648044586,
-0.424137681722641,
-0.003203602507710457,
0.1883007436990738,
-0.22715160250663757,
0.18677839636802673,
-0.30085644125938416,
-0.05237336829304695,
0.16121122241020203,
-0.7381555438041687,
0.15768755972385406,
0.05999598652124405,
0.03008023276925087,
0.2673288881778717,
-0.2804103493690491,
-0.4084685444831848,
-0.5457130670547485,
0.11075866222381592,
0.02729729376733303,
-0.3636142313480377,
0.12399083375930786,
-0.081767737865448,
-0.14283016324043274,
-0.16446292400360107,
-0.023630619049072266,
0.06920316070318222,
-0.20587818324565887,
-0.04295669496059418,
-0.4525321125984192,
0.20525142550468445,
0.23798368871212006,
-0.4658520221710205,
-0.09506664425134659,
-0.4946010410785675,
0.03308161720633507,
-0.15787604451179504,
-0.08936275541782379,
0.20966842770576477,
-0.2081833779811859,
-0.060730498284101486,
-0.2306271344423294,
-0.3089908957481384,
0.4237653613090515,
0.03774287551641464,
-0.03285650908946991,
-0.021978454664349556,
0.023334462195634842,
0.06988739967346191,
-0.11609339714050293,
-0.0024435315281152725,
0.06314872205257416,
0.1390255242586136,
-0.03184446692466736,
0.00034264102578163147,
0.09777253866195679,
0.07185147702693939,
-0.2497500479221344,
0.11355892568826675,
-0.21417278051376343,
0.022147968411445618,
0.27030572295188904,
0.28458714485168457,
0.23099040985107422,
-0.2108982652425766,
0.04621383175253868,
0.047886304557323456,
0.14703397452831268,
-0.24811848998069763,
-0.18722987174987793,
0.1388607770204544,
0.16332893073558807,
-0.08042049407958984,
0.17763862013816833,
0.00433890987187624,
0.012496689334511757,
0.07874073833227158,
0.06714434921741486,
0.12392515689134598,
-0.5669609308242798,
0.17406614124774933,
0.0063352808356285095,
0.3078857958316803,
-0.022440029308199883,
0.00880521535873413,
-0.15569566190242767,
-0.16755276918411255,
-0.023015176877379417,
0.0912778228521347,
-0.06852438300848007,
0.0833251029253006,
-0.6093353629112244,
-0.40870609879493713,
-0.5790938138961792,
0.17966940999031067,
0.3769252300262451,
0.5158492922782898,
0.06319774687290192,
0.002239841967821121,
-0.060926347970962524,
0.19010230898857117,
0.4397820234298706,
-0.0025200117379426956,
-0.3540682792663574,
0.1587357521057129,
-0.24824750423431396,
0.04480782151222229,
-0.05999502167105675,
0.11924593150615692,
0.405915230512619,
0.46247968077659607,
0.6241881251335144,
-0.10790747404098511,
-0.044451236724853516,
-0.28336092829704285,
0.03802773356437683,
-0.043742768466472626,
-0.02791859582066536,
-0.23200978338718414,
-0.1256362497806549,
0.021411484107375145,
0.28267088532447815,
0.3797213137149811,
0.4987156093120575,
0.12521615624427795,
-0.3248324394226074,
-0.10135364532470703,
-0.06805083155632019,
-0.03759211301803589,
0.2665780782699585,
-0.0106767937541008,
0.047892168164253235,
0.059368010610342026,
0.017634611576795578,
0.19567689299583435,
0.4381665885448456,
-0.20380958914756775,
0.2262071669101715,
-0.5027623176574707,
-0.21395224332809448,
0.0629584863781929,
0.1709335446357727,
0.2143750786781311,
0.17903070151805878,
0.12522569298744202,
-0.2666704058647156,
0.019563041627407074,
-0.026946719735860825,
0.5451059937477112,
-0.11037779599428177,
0.24740561842918396,
-0.21154004335403442,
0.19465669989585876,
-0.11201906949281693,
0.13194943964481354,
-0.17595556378364563,
0.19865162670612335,
0.00942964106798172,
-0.48689043521881104,
0.2963678240776062,
0.3950628340244293,
0.953366219997406,
0.46903276443481445,
0.23238225281238556,
0.34437042474746704,
-0.3253106474876404,
0.5577524304389954,
0.012185171246528625,
0.22798261046409607,
-0.43249940872192383,
-0.13418401777744293,
-0.0456637367606163,
-0.006129670888185501,
-0.10332479327917099,
-0.1976802498102188,
-0.033066071569919586,
0.17414365708827972,
0.2883636951446533,
0.3233240842819214,
0.02776719257235527,
-0.098288893699646,
0.08145725727081299,
-0.3617427349090576,
-0.001346588134765625,
0.023409154266119003,
-0.06497298926115036,
0.0034672506153583527,
-0.16220137476921082,
0.11704550683498383,
-0.14431586861610413,
0.1657346934080124,
-0.2635447382926941,
-0.0700075551867485,
-0.27165764570236206,
0.09895695745944977,
0.32647496461868286,
-0.2881447970867157,
0.049925584346055984,
0.036864250898361206,
0.6191905736923218,
0.33154603838920593,
0.022582262754440308,
-0.03396715596318245,
0.14692285656929016,
0.24282364547252655,
0.044535838067531586,
-0.4531974196434021,
0.3092098534107208,
0.06240358203649521,
0.2238793671131134,
-0.4029242992401123,
0.09802277386188507,
0.215809628367424,
-0.25089138746261597,
-0.0615011602640152,
0.03825869411230087,
0.0031569134443998337,
0.225056990981102,
-0.11112815141677856,
0.20285595953464508,
-0.22562767565250397,
0.1336386501789093,
-0.033782683312892914,
-0.23149889707565308,
-0.008900851011276245,
-0.036962274461984634,
-0.3149183988571167,
0.04173847660422325,
0.20637719333171844,
-0.039448514580726624,
-0.5680707693099976,
0.258547842502594,
-0.38277044892311096,
-0.251392126083374,
-0.007450561970472336,
0.2281169295310974,
0.19664306938648224,
-0.0670425221323967,
0.1369251161813736,
-0.09811052680015564,
-0.29444074630737305,
-0.1854887157678604,
0.21928276121616364,
0.32198137044906616,
-0.1407369077205658,
0.045698706060647964,
-0.35104358196258545,
-0.1588989645242691,
0.001002766191959381,
-0.1786627620458603,
0.2199770212173462,
0.3252376914024353,
0.5128354430198669,
-0.38019347190856934,
0.1378069519996643,
-0.289776086807251,
-0.2866576015949249,
-0.1854332536458969,
-0.011455833911895752,
-0.44783881306648254,
-0.12181367725133896,
-0.46384549140930176,
-0.06610337644815445,
0.03964561969041824,
0.46778517961502075,
-0.09399249404668808,
-0.15835049748420715,
-0.15636113286018372,
0.09351423382759094,
0.3157992362976074,
-0.1554114818572998,
0.18161079287528992,
0.4209151268005371,
-0.10544456541538239,
-0.276010125875473,
-0.012592795304954052,
-0.006285097450017929,
-0.03437715023756027,
0.21518568694591522,
0.21609309315681458,
0.45626601576805115,
0.10220439732074738,
0.021516256034374237,
0.13706627488136292,
0.046913933008909225,
0.17423473298549652,
0.4892757534980774,
-0.30652639269828796,
-0.060269881039857864,
0.06501129269599915,
0.1609155833721161,
0.25885242223739624,
-0.10352436453104019,
0.21405139565467834,
0.1330469697713852,
-0.3981342017650604,
0.21249181032180786,
0.016654133796691895,
0.24890395998954773,
-0.0569148026406765,
-0.4193788766860962,
0.48726093769073486,
0.15493585169315338,
-0.07179544866085052,
0.05234526842832565,
0.3959011435508728,
-0.11986357718706131,
-0.05871317535638809,
0.053430408239364624,
0.2961944341659546,
-0.01740635186433792,
0.2820727825164795,
0.09700999408960342,
0.2905799150466919,
-0.03407764062285423,
0.16035735607147217,
0.029296083375811577,
0.01701970025897026,
0.4946974217891693,
0.4404009282588959,
-0.19571928679943085,
0.1561523824930191,
0.2504725456237793,
0.043895695358514786,
0.32307639718055725,
0.030817056074738503,
0.021972618997097015,
-0.0927131250500679,
-0.18686717748641968,
-0.27509039640426636,
0.1224018782377243,
-0.08907744288444519,
0.21071425080299377,
0.34142372012138367,
0.04269608482718468,
-0.06346464157104492,
-0.06216546520590782,
-0.00940992683172226,
0.17256277799606323,
-0.6092425584793091,
-0.10437552630901337,
-0.3937654197216034,
-0.06387650966644287,
-0.3130132257938385,
-0.08785918354988098,
0.11861440539360046,
0.16066396236419678,
0.013257481157779694,
-0.2074560672044754,
-0.3273746967315674,
-0.01577468402683735,
0.2165643274784088,
0.008498229086399078,
0.2358187735080719,
-0.08231787383556366,
0.29514622688293457,
0.010712534189224243,
0.0943172425031662,
-0.22710326313972473,
0.11802910268306732,
0.541067361831665,
0.19452451169490814,
-0.30490007996559143,
-0.18987499177455902,
-0.1428617388010025,
0.015930036082863808,
-0.22178514301776886,
0.37238192558288574,
-0.04617255926132202,
-0.11681772768497467,
0.18493060767650604,
0.045645758509635925,
-0.17474937438964844,
-0.04969098046422005,
0.2591230869293213,
0.09561006724834442,
0.25607219338417053,
0.3022282123565674,
0.0270090252161026,
0.04608696699142456,
0.13593938946723938,
-0.01663467288017273,
0.10464494675397873,
0.018619325011968613,
-0.19132140278816223,
-0.02246965281665325,
0.04960554838180542,
-0.13723205029964447,
0.08899516612291336,
0.24029910564422607,
0.3574056923389435,
0.5411996841430664,
-0.0921805277466774,
-0.20618906617164612,
-0.41495972871780396,
-0.38631293177604675,
0.521124005317688,
0.47850555181503296,
-0.016847554594278336,
-0.06296145170927048,
-0.1964927315711975,
-0.10751775652170181,
0.09571247547864914,
-0.41491007804870605,
0.1647542268037796,
0.08979523181915283,
0.16718682646751404,
-0.1554740071296692,
0.28123316168785095,
-0.0012406334280967712,
-0.4019351601600647,
-0.10898113995790482,
-0.0724288746714592,
0.29898518323898315,
0.028774335980415344,
0.0601961687207222,
0.20420914888381958,
-0.013470321893692017,
-0.1505279541015625,
0.320136696100235,
-0.05211441218852997,
0.6280626058578491,
0.13540689647197723,
-0.1455909013748169,
0.44118642807006836,
-0.01765042170882225,
0.02867744490504265,
-0.5843859314918518,
0.3166660666465759,
-0.23926067352294922,
0.3147203326225281,
0.03731536120176315,
-0.47179386019706726,
-0.050221819430589676,
0.025254152715206146,
0.34875810146331787,
-0.17208096385002136,
-0.3881036937236786,
0.3029593825340271,
-0.21387386322021484,
-0.035779185593128204,
0.05062929168343544,
0.388257771730423,
0.2650299668312073,
0.4494657814502716,
-0.2877141237258911,
-0.6340728402137756,
-0.03300686180591583,
-0.21014787256717682,
-0.28570201992988586,
-0.19992157816886902,
-0.11783638596534729,
0.2962208688259125,
-0.15328043699264526,
-0.13815069198608398,
-0.288376122713089,
0.1595625877380371,
-0.23512059450149536,
-0.29982009530067444,
0.24229300022125244,
-0.1733073890209198,
-0.03217118978500366,
-0.1982431858778,
0.397983193397522,
0.17415457963943481,
-0.25920790433883667,
0.10108746588230133,
-0.14171215891838074
] |
https://github.com/huggingface/datasets/issues/2522 | Documentation Mistakes in Dataset: emotion | Hi,
this issue has been already reported in the dataset repo (https://github.com/dair-ai/emotion_dataset/issues/2), so this is a bug on their side. | As per documentation,
Dataset: emotion
Homepage: https://github.com/dair-ai/emotion_dataset
Dataset: https://github.com/huggingface/datasets/blob/master/datasets/emotion/emotion.py
Permalink: https://huggingface.co/datasets/viewer/?dataset=emotion
Emotion is a dataset of English Twitter messages with eight basic emotions: anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. For more detailed information please refer to the paper.
But when we view the data, there are only 6 emotions, anger, fear, joy, sadness, surprise, and trust. | 20 | Documentation Mistakes in Dataset: emotion
As per documentation,
Dataset: emotion
Homepage: https://github.com/dair-ai/emotion_dataset
Dataset: https://github.com/huggingface/datasets/blob/master/datasets/emotion/emotion.py
Permalink: https://huggingface.co/datasets/viewer/?dataset=emotion
Emotion is a dataset of English Twitter messages with eight basic emotions: anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. For more detailed information please refer to the paper.
But when we view the data, there are only 6 emotions, anger, fear, joy, sadness, surprise, and trust.
Hi,
this issue has been already reported in the dataset repo (https://github.com/dair-ai/emotion_dataset/issues/2), so this is a bug on their side. | [
0.22127093374729156,
-0.34920692443847656,
-0.10875461995601654,
0.5762394070625305,
0.2677902579307556,
0.17377570271492004,
0.294209361076355,
0.11103962361812592,
-0.1283242106437683,
0.20382371544837952,
-0.1274441033601761,
0.04295257106423378,
-0.2023339867591858,
-0.1131504625082016,
-0.005595793016254902,
-0.18627458810806274,
0.08356321603059769,
-0.08725510537624359,
0.3198854923248291,
-0.11779327690601349,
0.033547744154930115,
0.1983213573694229,
-0.09807026386260986,
0.23028835654258728,
-0.4554692506790161,
-0.05639728158712387,
-0.268694669008255,
-0.05159430205821991,
-0.046981796622276306,
-0.5062130093574524,
0.0716765895485878,
-0.08969564735889435,
-0.007479404099285603,
0.28957492113113403,
-0.00011546519090188667,
-0.11166462302207947,
0.3260878920555115,
0.0778147503733635,
0.04545476660132408,
-0.2310899943113327,
0.21439236402511597,
-0.3071577548980713,
0.378417044878006,
-0.08769623935222626,
-0.04483542591333389,
-0.5062564611434937,
0.059291452169418335,
-0.03127778321504593,
0.41844671964645386,
0.49271437525749207,
0.166776642203331,
0.17808789014816284,
0.21756021678447723,
0.20257866382598877,
0.4194195866584778,
0.5456282496452332,
-0.017825601622462273,
0.02042185515165329,
-0.1378217190504074,
-0.021503888070583344,
-0.18517643213272095,
0.3451373279094696,
0.16508015990257263,
0.07125158607959747,
0.17758473753929138,
-0.09184598177671432,
0.1996382772922516,
-0.5791183710098267,
0.15230295062065125,
0.19008973240852356,
0.4783174693584442,
-0.017162948846817017,
-0.3321191668510437,
-0.11462628841400146,
0.015816431492567062,
-0.1334293931722641,
0.19388140738010406,
0.2820133566856384,
-0.11397776007652283,
0.09297177195549011,
0.10228971391916275,
0.09656248986721039,
-0.16098007559776306,
0.42461031675338745,
0.06604672968387604,
0.13224802911281586,
-0.3756154477596283,
0.01948605477809906,
0.007966767996549606,
-0.20899944007396698,
0.03848791867494583,
0.14369317889213562,
-0.03766064718365669,
0.2057618498802185,
-0.17088232934474945,
0.22823259234428406,
-0.016788221895694733,
0.0003170296549797058,
-0.03892384469509125,
-0.2421790510416031,
-0.11244922876358032,
0.13327106833457947,
-0.11476337909698486,
-0.061361201107501984,
0.6197048425674438,
0.04955168068408966,
0.1868036985397339,
0.12370800226926804,
0.29353320598602295,
0.09094639122486115,
-0.003008190542459488,
-0.0017007440328598022,
-0.03673615679144859,
0.022160619497299194,
0.013962291181087494,
-0.43059787154197693,
-0.005887499079108238,
0.09184783697128296,
-0.3832743167877197,
-0.05223584175109863,
-0.23426687717437744,
-0.3501879572868347,
-0.06796586513519287,
0.3387870788574219,
0.07374733686447144,
0.3004622161388397,
-0.08020523190498352,
0.13753268122673035,
0.017084555700421333,
-0.5415077209472656,
-0.18827177584171295,
-0.02498003840446472,
-0.2958142161369324,
-0.008174095302820206,
0.1116006076335907,
-0.0923953652381897,
0.6315550804138184,
0.15594066679477692,
-0.21073155105113983,
-0.37505364418029785,
0.08858896046876907,
-0.19925527274608612,
0.300743967294693,
0.18243764340877533,
-0.03594911843538284,
0.2212834507226944,
0.26647764444351196,
-0.09244383126497269,
0.04866481572389603,
0.09157049655914307,
-0.03511599451303482,
-0.08810700476169586,
-0.49562567472457886,
0.09798838198184967,
-0.2035680115222931,
0.01992410235106945,
-0.03906061500310898,
0.6006977558135986,
0.08034935593605042,
0.15198014676570892,
0.2233845442533493,
-0.07303492724895477,
0.01227596029639244,
-0.29654446244239807,
0.35055309534072876,
0.3677572011947632,
-0.35221797227859497,
-0.39822182059288025,
-0.3678136467933655,
0.00902211107313633,
0.14397871494293213,
0.4062838554382324,
-0.3304080367088318,
0.12715093791484833,
-0.337831050157547,
0.25498342514038086,
0.24185684323310852,
-0.18664659559726715,
-0.23459245264530182,
0.11279302090406418,
0.35749590396881104,
0.06496266275644302,
-0.07620791345834732,
0.25882455706596375,
0.1550673395395279,
0.18594597280025482,
0.08296595513820648,
-0.26221805810928345,
0.30794045329093933,
-0.040789149701595306,
-0.3400014340877533,
-0.1971055269241333,
0.17958883941173553,
0.07287272810935974,
-0.07866856455802917,
-0.056408099830150604,
0.2922450602054596,
-0.24698960781097412,
0.6810662746429443,
-0.019762050360441208,
-0.014156972989439964,
0.27301377058029175,
0.1785186529159546,
0.4840734601020813,
0.12512335181236267,
-0.05564504861831665,
-0.1300530731678009,
-0.11146809905767441,
0.1443292647600174,
0.43736040592193604,
0.204600527882576,
-0.05557756870985031,
-0.2629449963569641,
-0.09834784269332886,
-0.14300690591335297,
-0.42799147963523865,
0.136640727519989,
0.2002827525138855,
-0.36596935987472534,
0.24786804616451263,
-0.3380764424800873,
0.22006556391716003,
-0.24231259524822235,
0.09355707466602325,
-0.2778654396533966,
0.2316070944070816,
-0.09603062272071838,
0.017993519082665443,
0.15084515511989594,
0.0809289887547493,
0.04637591540813446,
0.07185624539852142,
-0.07975786924362183,
0.26890280842781067,
0.09399633854627609,
0.14168517291545868,
0.015278976410627365,
0.010582908987998962,
0.3232317268848419,
-0.49973395466804504,
0.01402541995048523,
0.15801042318344116,
-0.16848312318325043,
0.2369731068611145,
-0.13511058688163757,
0.174646258354187,
0.27250027656555176,
0.02264350652694702,
0.0001452714204788208,
0.11856096237897873,
0.3502691686153412,
0.2929784655570984,
-0.42975515127182007,
-0.4398633539676666,
0.11701782047748566,
-0.29984113574028015,
0.12134012579917908,
0.11564387381076813,
-0.2244836837053299,
0.2992211580276489,
0.2973558008670807,
0.08013854920864105,
0.15438660979270935,
0.24321100115776062,
-0.5394954085350037,
-0.3813191056251526,
0.09011030942201614,
0.0315183661878109,
0.23231595754623413,
0.24321691691875458,
-0.13900145888328552,
-0.1369740217924118,
0.03640512377023697,
-0.1281922608613968,
0.22620782256126404,
0.23625920712947845,
0.1060444563627243,
-0.09019150584936142,
0.18619833886623383,
0.09769626706838608,
-0.3965117633342743,
0.11314058303833008,
-0.13628605008125305,
0.29273656010627747,
-0.4832670986652374,
-0.15883523225784302,
-0.16843518614768982,
-0.34596502780914307,
0.144314706325531,
-0.056645456701517105,
-0.18634602427482605,
-0.3293996751308441,
-0.03846069425344467,
-0.36499452590942383,
-0.19076882302761078,
-0.006747536361217499,
-0.13854707777500153,
0.0470801442861557,
-0.008954770863056183,
0.5758175253868103,
-0.2279253602027893,
-0.052901774644851685,
-0.260759562253952,
0.011780798435211182,
-0.09943516552448273,
0.12970705330371857,
0.08164660632610321,
-0.25966015458106995,
-0.25900933146476746,
-0.2978915572166443,
-0.5375897288322449,
0.26645538210868835,
-0.26328617334365845,
0.3585537075996399,
0.06122272089123726,
-0.012352913618087769,
-0.4086560606956482,
-0.0889182835817337,
0.24681858718395233,
-0.27533844113349915,
-0.18397393822669983,
-0.14423537254333496,
-0.09395299851894379,
0.01868632063269615,
0.12655188143253326,
-0.5909528732299805,
-0.2242359220981598,
-0.14257162809371948,
0.3636077046394348,
-0.06736372411251068,
0.14791354537010193,
0.16919350624084473,
0.03367117792367935,
0.13535724580287933,
-0.388083815574646,
-0.010190516710281372,
-0.4052887260913849,
-0.24964748322963715,
0.24514010548591614,
-0.37150728702545166,
-0.43802425265312195,
0.17137064039707184,
0.009354427456855774,
0.14603090286254883,
-0.26296722888946533,
-0.6767246723175049,
0.06509711593389511,
-0.2844427525997162,
0.16497300565242767,
-0.03916483372449875,
0.25787052512168884,
-0.19623616337776184,
-0.0335545651614666,
-0.1405583769083023,
0.013170778751373291,
-0.3025436997413635,
-0.04726400226354599,
-0.3038463890552521,
0.43155962228775024,
-0.2831231653690338,
0.1189672201871872,
0.031450312584638596,
0.26062101125717163,
0.4236906170845032,
-0.16616250574588776,
0.13303633034229279,
-0.25996795296669006,
0.4982183873653412,
0.13514672219753265,
-0.25445306301116943,
0.25962868332862854,
-0.08364216983318329,
0.27041906118392944,
0.451667845249176,
0.09687623381614685,
-0.006057217717170715,
0.028669454157352448,
-0.07163345068693161,
-0.3876917362213135,
-0.3234593868255615,
-0.07322005927562714,
-0.3693268895149231,
0.28971782326698303,
0.11229325830936432,
-0.10583725571632385,
-0.04757831618189812,
-0.16482600569725037,
-0.06466612219810486,
0.24625706672668457,
0.044236939400434494,
0.13878335058689117,
-0.23425233364105225,
0.10105963796377182,
-0.37690091133117676,
0.1123184785246849,
-0.025566773489117622,
0.3216904103755951,
0.022845368832349777,
0.07104167342185974,
-0.011293403804302216,
0.34664785861968994,
0.47527533769607544,
-0.10601236671209335,
-0.12430939078330994,
0.10344511270523071,
0.250016450881958,
-0.6698015332221985,
0.04829178377985954,
-0.20169198513031006,
0.17254291474819183,
0.38985922932624817,
0.4813299775123596,
-0.10177265107631683,
-0.03329439461231232,
0.2220115065574646,
0.003832523711025715,
-0.05540960282087326,
-0.19468331336975098,
-0.37257036566734314,
-0.27273622155189514,
-0.09434705227613449,
-0.3107706308364868,
0.20055989921092987,
-0.20322410762310028,
-0.16889414191246033,
-0.08187708258628845,
-0.004836726933717728,
-0.0029977262020111084,
0.10373783856630325,
0.04694266989827156,
0.3300940990447998,
-0.02006552740931511,
0.043591711670160294,
0.4950049817562103,
0.31576454639434814,
0.010213383473455906,
0.40649574995040894,
-0.026922069489955902,
-0.6741474866867065,
0.0657278448343277,
-0.25026896595954895,
0.034218914806842804,
0.14197561144828796,
-0.13250279426574707,
-0.0033852458000183105,
0.16669535636901855,
0.12828212976455688,
-0.006562323309481144,
0.19571857154369354,
0.6088895797729492,
0.12206835299730301,
0.08948665112257004,
-0.35472798347473145,
0.2650868594646454,
0.051420215517282486,
0.0123911052942276,
-0.1013602763414383,
0.581146240234375,
-0.10598915815353394,
0.24282535910606384,
0.1652480810880661,
0.8558481335639954,
0.05462515354156494,
0.18284247815608978,
0.28168004751205444,
-0.053839076310396194,
0.5717366933822632,
-0.08666883409023285,
0.10450860857963562,
-0.3380017578601837,
0.1762048751115799,
-0.03628263622522354,
0.024387221783399582,
-0.08734288066625595,
0.3483545184135437,
-0.19208864867687225,
0.07025910913944244,
-0.028769269585609436,
0.12765295803546906,
0.1744466871023178,
0.08075176179409027,
-0.14160555601119995,
0.09134578704833984,
-0.36404499411582947,
0.13938452303409576,
-0.08215951919555664,
0.26863259077072144,
0.1377178132534027,
0.03793647140264511,
-0.07131746411323547,
-0.12588034570217133,
-0.5482357740402222,
-0.2577883303165436,
-0.6138538122177124,
-0.0038741789758205414,
-0.18415814638137817,
0.00873025506734848,
0.2942081689834595,
0.5220608711242676,
0.5753258466720581,
-0.07248111069202423,
-0.06366578489542007,
0.07644130289554596,
0.01120917871594429,
-0.21063081920146942,
0.016880620270967484,
0.04785611480474472,
0.24656683206558228,
-0.06396807730197906,
-0.474783718585968,
0.19247296452522278,
-0.03193172812461853,
0.11356650292873383,
-0.4081459641456604,
-0.022013388574123383,
-0.20995061099529266,
-0.20160752534866333,
0.14555391669273376,
-0.12664227187633514,
-0.25444573163986206,
-0.2183947116136551,
0.10069540143013,
0.18262742459774017,
-0.007685165852308273,
0.036989975720644,
0.015980780124664307,
-0.1750515103340149,
-0.12244771420955658,
0.053038034588098526,
-0.13958615064620972,
-0.33450186252593994,
0.49106863141059875,
0.28666648268699646,
-0.14661630988121033,
-0.19080856442451477,
0.18062973022460938,
0.2962307631969452,
-0.5138748288154602,
0.1283750981092453,
-0.02198139578104019,
0.016277849674224854,
-0.15138374269008636,
0.24096019566059113,
0.054899368435144424,
0.13719238340854645,
-0.1302473396062851,
-0.27328330278396606,
-0.2836497128009796,
0.4248705506324768,
0.057040415704250336,
0.004640541970729828,
-0.0850580558180809,
-0.23700906336307526,
0.17295165359973907,
0.10677753388881683,
-0.2570379376411438,
0.07357178628444672,
0.06654740869998932,
-0.01768488809466362,
0.11184228956699371,
-0.07771741598844528,
0.2077558934688568,
-0.09334899485111237,
0.08253853023052216,
-0.039116956293582916,
0.2671702206134796,
-0.1491822600364685,
-0.044234395027160645,
0.16160902380943298,
0.0723474770784378,
-0.1651761680841446,
-0.015221312642097473,
-0.050117962062358856,
-0.020791079849004745,
-0.16695542633533478,
0.15978166460990906,
0.42278727889060974,
0.06639831513166428,
0.4139952063560486,
-0.43944206833839417,
0.06457513570785522,
0.32716572284698486,
-0.11105847358703613,
0.23285651206970215,
0.4335300922393799,
0.37139710783958435,
0.060355328023433685,
0.2591707408428192,
-0.08011418581008911,
-0.053684186190366745,
0.004376225173473358,
-0.1375540792942047,
0.2534363269805908,
0.049465328454971313,
-0.4649815559387207,
0.007713243365287781,
-0.2350022792816162,
0.3385826349258423,
0.16883081197738647,
-0.28950563073158264,
0.09208707511425018,
0.0927095040678978,
0.19280573725700378,
-0.37695446610450745,
-0.03348378464579582,
-0.2554329037666321,
-0.18357916176319122,
0.14916615188121796,
0.039354488253593445,
0.12621371448040009,
0.0949024111032486,
-0.13209125399589539,
-0.07425149530172348,
0.250360369682312,
-0.22066664695739746,
0.25825706124305725,
-0.0035889148712158203,
-0.32275673747062683,
-0.04636252298951149,
0.20645788311958313,
0.1990870237350464,
0.10758528113365173,
0.3274730443954468,
0.18777240812778473,
0.2775314152240753,
0.14158153533935547,
0.11204472929239273,
0.296093225479126,
-0.011740084737539291,
0.207417294383049,
0.1706998348236084,
-0.3604429066181183,
0.15734761953353882,
-0.17941898107528687,
0.6270521879196167,
0.1679910570383072,
-0.030980944633483887,
0.011247964575886726,
-0.09178411960601807,
-0.004166264086961746,
0.05725802853703499,
-0.004641711711883545,
-0.21173322200775146,
-0.3360925316810608,
-0.1708008199930191,
-0.12709665298461914,
-0.39387422800064087,
-0.18816667795181274,
0.2726411819458008,
-0.3617938756942749,
-0.6225920915603638,
0.23959898948669434,
0.31846052408218384,
0.427642285823822,
0.007905524224042892,
0.17543953657150269,
0.32650262117385864,
-0.10693398118019104,
0.03726349025964737,
0.3438461422920227,
0.5582185387611389,
0.27265650033950806,
0.13579833507537842,
0.0585242323577404,
-0.10895243287086487,
-0.1505999118089676,
0.07116023451089859,
0.031765542924404144,
0.3115769326686859,
-0.3008615970611572,
-0.08674071729183197,
0.05765388160943985,
-0.1387261301279068,
0.13726358115673065,
0.05218498408794403,
0.5654802322387695,
-0.25879088044166565,
0.29975903034210205,
-0.6842375993728638,
-0.25300201773643494,
-0.16970176994800568,
-0.10470113903284073,
-0.3903719484806061,
0.047840818762779236,
0.44834786653518677,
0.05218004807829857,
0.0657663345336914,
-0.24894297122955322,
0.08887585252523422,
-0.2897298336029053,
0.25654336810112,
0.3679550290107727,
0.07156619429588318,
-0.025418851524591446,
-0.14957673847675323,
-0.6116513609886169,
0.05884401500225067,
0.060428909957408905,
-0.21768809854984283,
0.026487991213798523,
0.233348086476326,
0.09485573321580887,
0.05950045958161354,
0.40475916862487793,
-0.11159399896860123,
0.13588711619377136,
0.01891419291496277,
-0.10165125876665115,
-0.0852360874414444,
-0.10310511291027069,
0.5716152787208557,
0.09364575147628784,
0.16503795981407166,
0.19559992849826813,
0.19571416079998016,
-0.1012590080499649,
-0.14049911499023438,
0.1763879954814911,
0.03498375788331032,
-0.19173096120357513,
-0.02499670535326004,
0.3378700613975525,
0.2155158817768097,
-0.054407164454460144,
-0.3151954114437103,
-0.38277462124824524,
-0.1919521540403366,
-0.09216566383838654,
0.43432924151420593,
0.11478523910045624,
0.4005177617073059,
-0.1333860605955124,
-0.3621269464492798,
-0.3094428479671478,
-0.11449049413204193,
0.0826692134141922,
-0.3093990385532379,
-0.1664925515651703,
0.0467182993888855,
0.23049882054328918,
-0.08480293303728104,
0.050470855087041855,
0.1459222435951233,
-0.1524723917245865,
-0.03635614365339279,
-0.24468505382537842,
-0.35240963101387024,
0.31860050559043884,
-0.4616984724998474,
0.0756688117980957,
-0.09872978925704956,
0.3212604522705078,
0.5552656650543213,
-0.20044338703155518,
-0.7379685044288635,
-0.026647627353668213,
0.5044898986816406,
0.14354786276817322,
-0.2154506891965866,
0.01331388670951128,
-0.044797006994485855,
0.16853854060173035,
0.044482167810201645,
0.4601896107196808,
0.3010542094707489,
0.048400454223155975,
0.13570474088191986,
-0.11521647870540619
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | Hi ! `map` calls `__getstate__` using `dill` to hash your map function. This is used by the caching mechanism to recover previously computed results. That's why you don't see any `__setstate__` call.
Why do you change an attribute of your tokenizer when `__getstate__` is called ? | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 46 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
Hi ! `map` calls `__getstate__` using `dill` to hash your map function. This is used by the caching mechanism to recover previously computed results. That's why you don't see any `__setstate__` call.
Why do you change an attribute of your tokenizer when `__getstate__` is called ? | [
-0.22488799691200256,
0.193120539188385,
0.11275288462638855,
0.028775807470083237,
0.03419550508260727,
-0.3237709403038025,
0.1385369747877121,
0.19508418440818787,
0.3468087613582611,
-0.10001760721206665,
0.19218076765537262,
0.7253849506378174,
-0.19295987486839294,
0.20866982638835907,
-0.0016189413145184517,
0.05957898497581482,
0.07051911950111389,
-0.03540794551372528,
-0.005138233304023743,
-0.06401293724775314,
-0.21730074286460876,
0.050917018204927444,
-0.35797542333602905,
0.15361341834068298,
-0.2765946090221405,
-0.17681460082530975,
0.025939082726836205,
0.11868852376937866,
-0.02998422645032406,
-0.2711367905139923,
0.20454657077789307,
-0.07879386842250824,
-0.027705322951078415,
0.24116593599319458,
-0.00012316941865719855,
-0.08011507987976074,
0.016193069517612457,
-0.08638353645801544,
-0.004161312244832516,
-0.21759943664073944,
-0.22309496998786926,
-0.12397703528404236,
-0.12354431301355362,
-0.229413241147995,
0.07815719395875931,
0.0024630348198115826,
-0.2965724468231201,
-0.38138097524642944,
0.6342021226882935,
0.4318729043006897,
0.11990717053413391,
0.36486873030662537,
-0.06786774843931198,
-0.03467966988682747,
-0.13554903864860535,
0.310019314289093,
0.05284801125526428,
0.2233031839132309,
0.12532666325569153,
-0.3918105661869049,
-0.001214444637298584,
0.09562943875789642,
-0.1981264054775238,
-0.21601030230522156,
0.1527504026889801,
0.05910709500312805,
0.1838107407093048,
0.010621223598718643,
-0.008678030222654343,
0.09299501031637192,
0.2169972062110901,
-0.35737472772598267,
-0.2120286375284195,
-0.3761945962905884,
-0.05751373991370201,
-0.15050138533115387,
0.3402036428451538,
-0.21683865785598755,
0.13164937496185303,
0.1427590698003769,
-0.048483431339263916,
-0.10448621213436127,
0.22394004464149475,
0.351848304271698,
-0.03908133879303932,
0.2571783661842346,
-0.01660948619246483,
0.3984132707118988,
-0.05367935821413994,
-0.10632330179214478,
-0.18072569370269775,
-0.10334409773349762,
0.10165378451347351,
0.45161664485931396,
-0.011211667209863663,
-0.23849061131477356,
0.210550457239151,
-0.2123309075832367,
-0.02430822141468525,
0.21151015162467957,
-0.16386498510837555,
0.12254887074232101,
-0.36412692070007324,
0.26401740312576294,
0.47083964943885803,
0.22121846675872803,
0.12371264398097992,
0.6363033056259155,
0.19857066869735718,
-0.16029183566570282,
-0.3000458776950836,
0.07452572882175446,
0.31024831533432007,
-0.10113603621721268,
-0.03733879327774048,
0.17564818263053894,
-0.10271651297807693,
-0.12865199148654938,
-0.07385292649269104,
0.27302286028862,
-0.7321615219116211,
0.008305506780743599,
0.1820908635854721,
0.12161991000175476,
-0.0009523850167170167,
-0.22241157293319702,
-0.08313725143671036,
0.07775600254535675,
-0.21585768461227417,
0.11480947583913803,
-0.1185755655169487,
0.1242491751909256,
-0.3427768647670746,
0.11042282730340958,
-0.04326052963733673,
0.05694468691945076,
0.3175238072872162,
0.12566962838172913,
-0.16883833706378937,
-0.059652335941791534,
0.15125037729740143,
-0.22944819927215576,
0.4016968011856079,
-0.019704069942235947,
-0.2360147088766098,
0.04248479753732681,
0.30694034695625305,
-0.4420321583747864,
-0.2555747926235199,
-0.05922742933034897,
-0.15265685319900513,
-0.14126373827457428,
-0.038635022938251495,
0.03472549840807915,
-0.23729628324508667,
-0.0047178976237773895,
-0.30469030141830444,
0.1028885766863823,
0.3713425397872925,
-0.20585207641124725,
0.0988665372133255,
-0.5015790462493896,
-0.35631152987480164,
-0.20766377449035645,
0.008802609518170357,
0.17747752368450165,
-0.4386502504348755,
-0.24340416491031647,
-0.09803180396556854,
0.1520782858133316,
0.3357076644897461,
0.12456756830215454,
-0.26133859157562256,
0.6007267236709595,
-0.4962503910064697,
0.8756874203681946,
0.2869647443294525,
-0.14862683415412903,
-0.40101176500320435,
0.03295362368226051,
-0.17289458215236664,
0.23207588493824005,
-0.6788748502731323,
-0.10385672003030777,
0.16501544415950775,
-0.07975828647613525,
0.1138157770037651,
0.3388637900352478,
0.15492136776447296,
-0.09533272683620453,
-0.12821991741657257,
0.06443028151988983,
0.326865553855896,
-0.2837589681148529,
0.0703488364815712,
-0.00969521701335907,
0.16244414448738098,
-0.21676354110240936,
0.21740296483039856,
0.034307003021240234,
0.184342160820961,
-0.11258983612060547,
0.455954372882843,
0.17644402384757996,
-0.12051033973693848,
-0.3156251907348633,
-0.18376803398132324,
0.3253220319747925,
-0.02808859758079052,
-0.026879549026489258,
-0.11929571628570557,
-0.08291018009185791,
-0.11312658339738846,
0.056021854281425476,
-0.339925616979599,
-0.2433573305606842,
0.029902435839176178,
0.024314075708389282,
0.2335776686668396,
0.17532978951931,
-0.08356466889381409,
-0.24794498085975647,
-0.050614841282367706,
0.060970887541770935,
-0.05589338019490242,
0.056883715093135834,
0.1251782476902008,
-0.2686156928539276,
-0.31789031624794006,
0.16740421950817108,
0.40873560309410095,
-0.09793664515018463,
-0.18483835458755493,
0.27618691325187683,
0.5985631346702576,
-0.29916536808013916,
-0.3962611258029938,
-0.18160904943943024,
-0.1041160300374031,
0.1290624737739563,
-0.2356889843940735,
0.1717507541179657,
-0.0027848524041473866,
-0.23090091347694397,
-0.025695614516735077,
0.5132237076759338,
0.24769280850887299,
0.31123679876327515,
-0.4027121067047119,
0.2516176402568817,
-0.01230483129620552,
-0.08680570125579834,
-0.14821743965148926,
-0.33737626671791077,
-0.2627914249897003,
0.037331823259592056,
0.3305842876434326,
-0.13446250557899475,
-0.036491744220256805,
0.04074283689260483,
0.3557882606983185,
-0.07353566586971283,
0.325707346200943,
-0.06443041563034058,
-0.19810637831687927,
-0.19067993760108948,
0.2980228066444397,
0.3740845024585724,
0.5166626572608948,
-0.1092328280210495,
-0.057225074619054794,
0.08503854274749756,
-0.045890308916568756,
-0.04900118708610535,
0.01684088259935379,
-0.17222823202610016,
-0.037864360958337784,
0.19884848594665527,
0.048589594662189484,
-0.09989799559116364,
-0.18129202723503113,
0.009795140475034714,
0.056278616189956665,
0.29222795367240906,
-0.23866672813892365,
0.09624195843935013,
-0.5637152791023254,
0.07098790258169174,
-0.28859785199165344,
-0.1303834170103073,
0.007216315716505051,
-0.44396018981933594,
-0.21197178959846497,
0.09415265917778015,
-0.23600523173809052,
0.2182338684797287,
-0.16104929149150848,
-0.1597829908132553,
-0.15046247839927673,
-0.28893664479255676,
0.09865130484104156,
-0.23461343348026276,
-0.22342312335968018,
-0.0864403024315834,
0.12882207334041595,
0.12238137423992157,
0.22562797367572784,
0.3576843738555908,
-0.4277695417404175,
-0.3453753590583801,
-0.2861616909503937,
0.36421072483062744,
-0.16716036200523376,
0.12165587395429611,
0.3645747900009155,
-0.21086330711841583,
-0.07228526473045349,
0.15103338658809662,
0.31954672932624817,
-0.10602527856826782,
-0.1192040964961052,
-0.15033608675003052,
0.27737557888031006,
0.02400069311261177,
-0.028316203504800797,
0.014470204710960388,
-0.1706433892250061,
-0.0576484240591526,
0.37156957387924194,
-0.1595647931098938,
0.08714628219604492,
0.16744211316108704,
0.04409094899892807,
0.23064658045768738,
-0.10440979897975922,
-0.26062706112861633,
-0.4392031729221344,
-0.09853241592645645,
0.16474291682243347,
-0.19629721343517303,
-0.12574008107185364,
-0.03666532039642334,
-0.10954618453979492,
0.1613347977399826,
0.04170382022857666,
-0.23590296506881714,
0.0899796336889267,
-0.004336884245276451,
0.3883190155029297,
-0.20898684859275818,
0.11808407306671143,
0.37520211935043335,
0.16850726306438446,
0.05962496995925903,
-0.1573241949081421,
-0.20618517696857452,
0.1814013421535492,
0.3865942060947418,
0.21564316749572754,
0.18958216905593872,
0.24439680576324463,
0.15978732705116272,
0.850033164024353,
0.319330096244812,
-0.4346616864204407,
0.12059800326824188,
-0.05809423327445984,
-0.06442433595657349,
-0.07623689621686935,
-0.3137795031070709,
-0.06624945253133774,
-0.24335289001464844,
-0.12011294066905975,
-0.12522591650485992,
-0.2128143012523651,
0.12244546413421631,
0.17188696563243866,
0.07384507358074188,
-0.02322227694094181,
-0.4763820171356201,
0.18449820578098297,
-0.25369447469711304,
0.14348547160625458,
0.15853993594646454,
0.37904736399650574,
-0.19344642758369446,
0.31325843930244446,
0.23374055325984955,
-0.09903964400291443,
0.4059719443321228,
0.09168031066656113,
-0.5711541175842285,
-0.20064318180084229,
-0.34278541803359985,
0.44404900074005127,
0.25476062297821045,
0.17552612721920013,
-0.09011698514223099,
-0.08576233685016632,
-0.14311479032039642,
0.18591298162937164,
0.3545985817909241,
-0.44384080171585083,
-0.03123156726360321,
0.3080909848213196,
-0.16998623311519623,
-0.17829053103923798,
-0.085822694003582,
0.20333468914031982,
0.6135451793670654,
0.060685209929943085,
0.5777100324630737,
-0.13267214596271515,
-0.0017200688598677516,
-0.18484032154083252,
0.09971819072961807,
-0.0973081886768341,
-0.1813916563987732,
-0.04163701832294464,
0.04431658983230591,
-0.257154256105423,
0.13071487843990326,
0.1788228154182434,
-0.031146416440606117,
0.25152167677879333,
0.03757307305932045,
-0.11305506527423859,
-0.24862971901893616,
-0.06708429753780365,
0.020453717559576035,
0.2222062349319458,
0.0019846155773848295,
0.15636742115020752,
0.23342156410217285,
-0.033222831785678864,
0.2050066441297531,
0.3170373737812042,
-0.1554170846939087,
0.019160382449626923,
-0.20104798674583435,
0.023792371153831482,
0.3575343191623688,
0.07553467154502869,
-0.05679534375667572,
0.30185386538505554,
-0.013497970998287201,
-0.10008600354194641,
-0.29226070642471313,
0.2588861584663391,
0.1977369636297226,
0.09749899804592133,
-0.13095006346702576,
-0.5797979235649109,
0.06107053533196449,
0.0986432433128357,
-0.17722663283348083,
0.3608708381652832,
0.04270876199007034,
-0.29186302423477173,
0.29059678316116333,
0.17745009064674377,
0.8005257844924927,
0.16540583968162537,
0.014834299683570862,
0.3365233242511749,
0.180822491645813,
0.369922935962677,
0.23551957309246063,
-0.06569360196590424,
-0.34278541803359985,
0.3571140766143799,
-0.18385042250156403,
-0.29293256998062134,
0.002491891384124756,
0.005258984863758087,
-0.19129054248332977,
0.24985666573047638,
-0.013108409941196442,
0.1557762175798416,
-0.182407408952713,
0.14643168449401855,
0.3141552209854126,
-0.21153511106967926,
-0.034584179520606995,
0.15031279623508453,
-0.07391871511936188,
0.2885693609714508,
-0.03575567156076431,
0.13449320197105408,
-0.1474820077419281,
-0.007897693663835526,
-0.24406199157238007,
0.14441326260566711,
-0.5116115212440491,
0.3974112868309021,
0.08362829685211182,
-0.08395231515169144,
0.29561758041381836,
0.08216889202594757,
-0.07009604573249817,
0.16538164019584656,
-0.05454239994287491,
0.12420159578323364,
0.23464107513427734,
0.20128846168518066,
0.12402133643627167,
-0.3333580195903778,
0.26357170939445496,
0.22540849447250366,
-0.10462043434381485,
-0.003839530050754547,
-0.15546728670597076,
-0.22562967240810394,
-0.17735391855239868,
0.21047712862491608,
0.22592024505138397,
-0.35650399327278137,
-0.23085512220859528,
-0.03488767892122269,
0.09603160619735718,
-0.19571059942245483,
0.02037419006228447,
0.12065304815769196,
0.13061852753162384,
0.23726055026054382,
-0.38427743315696716,
-0.15750879049301147,
0.04430614411830902,
0.46375948190689087,
-0.2750534415245056,
0.2132605016231537,
0.42850783467292786,
-0.005432337522506714,
-0.043129097670316696,
-0.12088309228420258,
0.1267634928226471,
0.0437576100230217,
0.2106197476387024,
0.1623663604259491,
-0.31650039553642273,
-0.06293673813343048,
-0.2680119574069977,
0.3825362026691437,
-0.04195999354124069,
-0.20746102929115295,
-0.0652514398097992,
-0.2240743637084961,
-0.46791088581085205,
-0.05444568395614624,
0.24773076176643372,
0.14027415215969086,
0.09236728399991989,
0.5768778324127197,
-0.35869479179382324,
0.18367235362529755,
-0.1821165829896927,
0.09477335214614868,
0.029331641271710396,
0.0852852314710617,
0.0898132473230362,
0.037284694612026215,
-0.022230464965105057,
-0.26654982566833496,
-0.08721087127923965,
0.45016688108444214,
0.009886546991765499,
-0.09261652082204819,
-0.4276532530784607,
0.17318440973758698,
0.5592156052589417,
-0.18240733444690704,
0.07406458258628845,
-0.21702072024345398,
-0.0007080398499965668,
-0.3593151569366455,
-0.025179391726851463,
0.2778584361076355,
0.03072594478726387,
0.2733375132083893,
0.1893637776374817,
0.11630617082118988,
0.004188135266304016,
-0.015500474721193314,
-0.09674584865570068,
-0.06437107920646667,
0.0176320131868124,
0.0547897145152092,
0.03433942422270775,
-0.07344324886798859,
-0.08076473325490952,
0.2219371199607849,
0.29702192544937134,
0.20848289132118225,
0.24013057351112366,
-0.04554034024477005,
-0.22811654210090637,
-0.13362367451190948,
0.35152044892311096,
0.35704055428504944,
-0.20131231844425201,
-0.24378588795661926,
0.5111562013626099,
0.08368027955293655,
-0.09427786618471146,
0.1351260393857956,
0.27597102522850037,
0.03471481427550316,
0.23943015933036804,
0.1732371300458908,
-0.23262850940227509,
0.281165212392807,
-0.46636807918548584,
-0.08754252642393112,
0.2715711295604706,
-0.04677361994981766,
0.04084191471338272,
0.08094300329685211,
-0.1805374026298523,
0.2933402359485626,
0.27704501152038574,
0.13322389125823975,
0.33002305030822754,
0.23037117719650269,
0.09322348982095718,
0.12525342404842377,
0.12603060901165009,
0.09452314674854279,
0.1989387571811676,
-0.46280550956726074,
0.3219623267650604,
0.24264071881771088,
-0.005586951971054077,
0.19447126984596252,
0.15458106994628906,
0.4853109121322632,
-0.5250396728515625,
-0.2774396240711212,
0.23163777589797974,
0.4182755947113037,
-0.20757123827934265,
-0.04142395406961441,
-0.44489017128944397,
0.06417778879404068,
-0.02327709272503853,
-0.019185209646821022,
-0.08467213809490204,
0.004049357026815414,
0.17936667799949646,
-0.14101462066173553,
-0.06083358824253082,
-0.20407839119434357,
-0.46704161167144775,
-0.11982107907533646,
0.30511918663978577,
-0.2399478405714035,
-0.1056109145283699,
-0.10890476405620575,
0.05851910635828972,
-0.21501490473747253,
-0.12643218040466309,
0.2644937038421631,
0.20696739852428436,
-0.3826083540916443,
-0.10495521873235703,
0.012839911505579948,
0.11485438048839569,
-0.12204843759536743,
0.2308775633573532,
-0.2840908169746399,
-0.3314357399940491,
0.3611921966075897,
-0.026852162554860115,
-0.09760954976081848,
-0.1502252221107483,
0.1964082419872284,
0.641011118888855,
0.00015184376388788223,
0.2310478389263153,
-0.025150850415229797,
-0.03459571301937103,
-0.1389734148979187,
0.05277237296104431,
0.07531566172838211,
0.16618970036506653,
0.15701356530189514,
0.1477213352918625,
0.40052279829978943,
0.004388313740491867,
0.050076812505722046,
0.09972867369651794,
0.2572554349899292,
0.3555528521537781,
-0.3640001714229584,
-0.515011727809906,
0.05073210597038269,
-0.5516366958618164,
0.17806710302829742,
-0.2801920771598816,
-0.37626156210899353,
-0.16202875971794128,
-0.08286873251199722,
0.31118276715278625,
0.03223206847906113,
-0.09385420382022858,
0.15670649707317352,
0.11198706179857254,
0.18790365755558014,
0.12259247899055481,
-0.24370063841342926,
-0.4694601893424988,
-0.3019481599330902,
0.3355236351490021,
-0.2901141941547394,
0.26598960161209106,
0.29043933749198914,
-0.016332484781742096,
-0.07166358828544617,
-0.3088708519935608,
-0.06867758929729462,
0.0746302381157875,
0.6968876719474792,
0.31985434889793396,
0.1866273134946823,
-0.09400436282157898,
0.09945815801620483,
-0.023252766579389572,
0.20762383937835693,
-0.2597786784172058,
0.17135590314865112,
-0.48417994379997253,
0.3901791274547577,
0.0003463923931121826,
0.2632504105567932,
-0.6178387999534607,
0.006223740056157112,
0.16857416927814484,
-0.06208442896604538,
-0.5151697397232056,
0.26846614480018616,
-0.17149204015731812,
0.14055563509464264,
-0.1522606760263443,
0.5060007572174072,
-0.16236957907676697,
0.5561704635620117,
-0.242071270942688,
-0.1725638210773468,
0.6069843769073486,
-0.5967271327972412,
-0.28713759779930115,
0.08811946958303452,
-0.02044607698917389,
-0.04781397432088852,
-0.3517236113548279,
-0.40750235319137573,
-0.25453680753707886,
0.31830480694770813,
-0.10058269649744034,
-0.27558934688568115,
-0.12727318704128265,
0.038144879043102264,
0.11818253993988037,
-0.08276401460170746,
0.7448382377624512,
0.08606360107660294,
-0.05790974572300911,
0.3663485646247864,
-0.008757846429944038
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | @lhoestq because if I try to pickle my custom tokenizer (it contains a pure python pretokenization step in an otherwise rust backed tokenizer) I get
> Exception: Error while attempting to pickle Tokenizer: Custom PreTokenizer cannot be serialized
So I remove the Custom PreTokenizer in `__getstate__` and then restore it in `__setstate__` (since it doesn't contain any state). This is what my `__getstate__` / `__setstate__` looks like:
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
out = self.__dict__.copy()
logger.debug("Detaching pre_tokenizer")
out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
return out
def __setstate__(self, d):
"""
Reinstates pre_tokenizer
"""
logger.debug("Reattaching pre_tokenizer")
self.__dict__ = d
self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer()
If this is the case can you think of another way of avoiding my issue? | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 121 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
@lhoestq because if I try to pickle my custom tokenizer (it contains a pure python pretokenization step in an otherwise rust backed tokenizer) I get
> Exception: Error while attempting to pickle Tokenizer: Custom PreTokenizer cannot be serialized
So I remove the Custom PreTokenizer in `__getstate__` and then restore it in `__setstate__` (since it doesn't contain any state). This is what my `__getstate__` / `__setstate__` looks like:
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
out = self.__dict__.copy()
logger.debug("Detaching pre_tokenizer")
out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
return out
def __setstate__(self, d):
"""
Reinstates pre_tokenizer
"""
logger.debug("Reattaching pre_tokenizer")
self.__dict__ = d
self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer()
If this is the case can you think of another way of avoiding my issue? | [
-0.22488799691200256,
0.193120539188385,
0.11275288462638855,
0.028775807470083237,
0.03419550508260727,
-0.3237709403038025,
0.1385369747877121,
0.19508418440818787,
0.3468087613582611,
-0.10001760721206665,
0.19218076765537262,
0.7253849506378174,
-0.19295987486839294,
0.20866982638835907,
-0.0016189413145184517,
0.05957898497581482,
0.07051911950111389,
-0.03540794551372528,
-0.005138233304023743,
-0.06401293724775314,
-0.21730074286460876,
0.050917018204927444,
-0.35797542333602905,
0.15361341834068298,
-0.2765946090221405,
-0.17681460082530975,
0.025939082726836205,
0.11868852376937866,
-0.02998422645032406,
-0.2711367905139923,
0.20454657077789307,
-0.07879386842250824,
-0.027705322951078415,
0.24116593599319458,
-0.00012316941865719855,
-0.08011507987976074,
0.016193069517612457,
-0.08638353645801544,
-0.004161312244832516,
-0.21759943664073944,
-0.22309496998786926,
-0.12397703528404236,
-0.12354431301355362,
-0.229413241147995,
0.07815719395875931,
0.0024630348198115826,
-0.2965724468231201,
-0.38138097524642944,
0.6342021226882935,
0.4318729043006897,
0.11990717053413391,
0.36486873030662537,
-0.06786774843931198,
-0.03467966988682747,
-0.13554903864860535,
0.310019314289093,
0.05284801125526428,
0.2233031839132309,
0.12532666325569153,
-0.3918105661869049,
-0.001214444637298584,
0.09562943875789642,
-0.1981264054775238,
-0.21601030230522156,
0.1527504026889801,
0.05910709500312805,
0.1838107407093048,
0.010621223598718643,
-0.008678030222654343,
0.09299501031637192,
0.2169972062110901,
-0.35737472772598267,
-0.2120286375284195,
-0.3761945962905884,
-0.05751373991370201,
-0.15050138533115387,
0.3402036428451538,
-0.21683865785598755,
0.13164937496185303,
0.1427590698003769,
-0.048483431339263916,
-0.10448621213436127,
0.22394004464149475,
0.351848304271698,
-0.03908133879303932,
0.2571783661842346,
-0.01660948619246483,
0.3984132707118988,
-0.05367935821413994,
-0.10632330179214478,
-0.18072569370269775,
-0.10334409773349762,
0.10165378451347351,
0.45161664485931396,
-0.011211667209863663,
-0.23849061131477356,
0.210550457239151,
-0.2123309075832367,
-0.02430822141468525,
0.21151015162467957,
-0.16386498510837555,
0.12254887074232101,
-0.36412692070007324,
0.26401740312576294,
0.47083964943885803,
0.22121846675872803,
0.12371264398097992,
0.6363033056259155,
0.19857066869735718,
-0.16029183566570282,
-0.3000458776950836,
0.07452572882175446,
0.31024831533432007,
-0.10113603621721268,
-0.03733879327774048,
0.17564818263053894,
-0.10271651297807693,
-0.12865199148654938,
-0.07385292649269104,
0.27302286028862,
-0.7321615219116211,
0.008305506780743599,
0.1820908635854721,
0.12161991000175476,
-0.0009523850167170167,
-0.22241157293319702,
-0.08313725143671036,
0.07775600254535675,
-0.21585768461227417,
0.11480947583913803,
-0.1185755655169487,
0.1242491751909256,
-0.3427768647670746,
0.11042282730340958,
-0.04326052963733673,
0.05694468691945076,
0.3175238072872162,
0.12566962838172913,
-0.16883833706378937,
-0.059652335941791534,
0.15125037729740143,
-0.22944819927215576,
0.4016968011856079,
-0.019704069942235947,
-0.2360147088766098,
0.04248479753732681,
0.30694034695625305,
-0.4420321583747864,
-0.2555747926235199,
-0.05922742933034897,
-0.15265685319900513,
-0.14126373827457428,
-0.038635022938251495,
0.03472549840807915,
-0.23729628324508667,
-0.0047178976237773895,
-0.30469030141830444,
0.1028885766863823,
0.3713425397872925,
-0.20585207641124725,
0.0988665372133255,
-0.5015790462493896,
-0.35631152987480164,
-0.20766377449035645,
0.008802609518170357,
0.17747752368450165,
-0.4386502504348755,
-0.24340416491031647,
-0.09803180396556854,
0.1520782858133316,
0.3357076644897461,
0.12456756830215454,
-0.26133859157562256,
0.6007267236709595,
-0.4962503910064697,
0.8756874203681946,
0.2869647443294525,
-0.14862683415412903,
-0.40101176500320435,
0.03295362368226051,
-0.17289458215236664,
0.23207588493824005,
-0.6788748502731323,
-0.10385672003030777,
0.16501544415950775,
-0.07975828647613525,
0.1138157770037651,
0.3388637900352478,
0.15492136776447296,
-0.09533272683620453,
-0.12821991741657257,
0.06443028151988983,
0.326865553855896,
-0.2837589681148529,
0.0703488364815712,
-0.00969521701335907,
0.16244414448738098,
-0.21676354110240936,
0.21740296483039856,
0.034307003021240234,
0.184342160820961,
-0.11258983612060547,
0.455954372882843,
0.17644402384757996,
-0.12051033973693848,
-0.3156251907348633,
-0.18376803398132324,
0.3253220319747925,
-0.02808859758079052,
-0.026879549026489258,
-0.11929571628570557,
-0.08291018009185791,
-0.11312658339738846,
0.056021854281425476,
-0.339925616979599,
-0.2433573305606842,
0.029902435839176178,
0.024314075708389282,
0.2335776686668396,
0.17532978951931,
-0.08356466889381409,
-0.24794498085975647,
-0.050614841282367706,
0.060970887541770935,
-0.05589338019490242,
0.056883715093135834,
0.1251782476902008,
-0.2686156928539276,
-0.31789031624794006,
0.16740421950817108,
0.40873560309410095,
-0.09793664515018463,
-0.18483835458755493,
0.27618691325187683,
0.5985631346702576,
-0.29916536808013916,
-0.3962611258029938,
-0.18160904943943024,
-0.1041160300374031,
0.1290624737739563,
-0.2356889843940735,
0.1717507541179657,
-0.0027848524041473866,
-0.23090091347694397,
-0.025695614516735077,
0.5132237076759338,
0.24769280850887299,
0.31123679876327515,
-0.4027121067047119,
0.2516176402568817,
-0.01230483129620552,
-0.08680570125579834,
-0.14821743965148926,
-0.33737626671791077,
-0.2627914249897003,
0.037331823259592056,
0.3305842876434326,
-0.13446250557899475,
-0.036491744220256805,
0.04074283689260483,
0.3557882606983185,
-0.07353566586971283,
0.325707346200943,
-0.06443041563034058,
-0.19810637831687927,
-0.19067993760108948,
0.2980228066444397,
0.3740845024585724,
0.5166626572608948,
-0.1092328280210495,
-0.057225074619054794,
0.08503854274749756,
-0.045890308916568756,
-0.04900118708610535,
0.01684088259935379,
-0.17222823202610016,
-0.037864360958337784,
0.19884848594665527,
0.048589594662189484,
-0.09989799559116364,
-0.18129202723503113,
0.009795140475034714,
0.056278616189956665,
0.29222795367240906,
-0.23866672813892365,
0.09624195843935013,
-0.5637152791023254,
0.07098790258169174,
-0.28859785199165344,
-0.1303834170103073,
0.007216315716505051,
-0.44396018981933594,
-0.21197178959846497,
0.09415265917778015,
-0.23600523173809052,
0.2182338684797287,
-0.16104929149150848,
-0.1597829908132553,
-0.15046247839927673,
-0.28893664479255676,
0.09865130484104156,
-0.23461343348026276,
-0.22342312335968018,
-0.0864403024315834,
0.12882207334041595,
0.12238137423992157,
0.22562797367572784,
0.3576843738555908,
-0.4277695417404175,
-0.3453753590583801,
-0.2861616909503937,
0.36421072483062744,
-0.16716036200523376,
0.12165587395429611,
0.3645747900009155,
-0.21086330711841583,
-0.07228526473045349,
0.15103338658809662,
0.31954672932624817,
-0.10602527856826782,
-0.1192040964961052,
-0.15033608675003052,
0.27737557888031006,
0.02400069311261177,
-0.028316203504800797,
0.014470204710960388,
-0.1706433892250061,
-0.0576484240591526,
0.37156957387924194,
-0.1595647931098938,
0.08714628219604492,
0.16744211316108704,
0.04409094899892807,
0.23064658045768738,
-0.10440979897975922,
-0.26062706112861633,
-0.4392031729221344,
-0.09853241592645645,
0.16474291682243347,
-0.19629721343517303,
-0.12574008107185364,
-0.03666532039642334,
-0.10954618453979492,
0.1613347977399826,
0.04170382022857666,
-0.23590296506881714,
0.0899796336889267,
-0.004336884245276451,
0.3883190155029297,
-0.20898684859275818,
0.11808407306671143,
0.37520211935043335,
0.16850726306438446,
0.05962496995925903,
-0.1573241949081421,
-0.20618517696857452,
0.1814013421535492,
0.3865942060947418,
0.21564316749572754,
0.18958216905593872,
0.24439680576324463,
0.15978732705116272,
0.850033164024353,
0.319330096244812,
-0.4346616864204407,
0.12059800326824188,
-0.05809423327445984,
-0.06442433595657349,
-0.07623689621686935,
-0.3137795031070709,
-0.06624945253133774,
-0.24335289001464844,
-0.12011294066905975,
-0.12522591650485992,
-0.2128143012523651,
0.12244546413421631,
0.17188696563243866,
0.07384507358074188,
-0.02322227694094181,
-0.4763820171356201,
0.18449820578098297,
-0.25369447469711304,
0.14348547160625458,
0.15853993594646454,
0.37904736399650574,
-0.19344642758369446,
0.31325843930244446,
0.23374055325984955,
-0.09903964400291443,
0.4059719443321228,
0.09168031066656113,
-0.5711541175842285,
-0.20064318180084229,
-0.34278541803359985,
0.44404900074005127,
0.25476062297821045,
0.17552612721920013,
-0.09011698514223099,
-0.08576233685016632,
-0.14311479032039642,
0.18591298162937164,
0.3545985817909241,
-0.44384080171585083,
-0.03123156726360321,
0.3080909848213196,
-0.16998623311519623,
-0.17829053103923798,
-0.085822694003582,
0.20333468914031982,
0.6135451793670654,
0.060685209929943085,
0.5777100324630737,
-0.13267214596271515,
-0.0017200688598677516,
-0.18484032154083252,
0.09971819072961807,
-0.0973081886768341,
-0.1813916563987732,
-0.04163701832294464,
0.04431658983230591,
-0.257154256105423,
0.13071487843990326,
0.1788228154182434,
-0.031146416440606117,
0.25152167677879333,
0.03757307305932045,
-0.11305506527423859,
-0.24862971901893616,
-0.06708429753780365,
0.020453717559576035,
0.2222062349319458,
0.0019846155773848295,
0.15636742115020752,
0.23342156410217285,
-0.033222831785678864,
0.2050066441297531,
0.3170373737812042,
-0.1554170846939087,
0.019160382449626923,
-0.20104798674583435,
0.023792371153831482,
0.3575343191623688,
0.07553467154502869,
-0.05679534375667572,
0.30185386538505554,
-0.013497970998287201,
-0.10008600354194641,
-0.29226070642471313,
0.2588861584663391,
0.1977369636297226,
0.09749899804592133,
-0.13095006346702576,
-0.5797979235649109,
0.06107053533196449,
0.0986432433128357,
-0.17722663283348083,
0.3608708381652832,
0.04270876199007034,
-0.29186302423477173,
0.29059678316116333,
0.17745009064674377,
0.8005257844924927,
0.16540583968162537,
0.014834299683570862,
0.3365233242511749,
0.180822491645813,
0.369922935962677,
0.23551957309246063,
-0.06569360196590424,
-0.34278541803359985,
0.3571140766143799,
-0.18385042250156403,
-0.29293256998062134,
0.002491891384124756,
0.005258984863758087,
-0.19129054248332977,
0.24985666573047638,
-0.013108409941196442,
0.1557762175798416,
-0.182407408952713,
0.14643168449401855,
0.3141552209854126,
-0.21153511106967926,
-0.034584179520606995,
0.15031279623508453,
-0.07391871511936188,
0.2885693609714508,
-0.03575567156076431,
0.13449320197105408,
-0.1474820077419281,
-0.007897693663835526,
-0.24406199157238007,
0.14441326260566711,
-0.5116115212440491,
0.3974112868309021,
0.08362829685211182,
-0.08395231515169144,
0.29561758041381836,
0.08216889202594757,
-0.07009604573249817,
0.16538164019584656,
-0.05454239994287491,
0.12420159578323364,
0.23464107513427734,
0.20128846168518066,
0.12402133643627167,
-0.3333580195903778,
0.26357170939445496,
0.22540849447250366,
-0.10462043434381485,
-0.003839530050754547,
-0.15546728670597076,
-0.22562967240810394,
-0.17735391855239868,
0.21047712862491608,
0.22592024505138397,
-0.35650399327278137,
-0.23085512220859528,
-0.03488767892122269,
0.09603160619735718,
-0.19571059942245483,
0.02037419006228447,
0.12065304815769196,
0.13061852753162384,
0.23726055026054382,
-0.38427743315696716,
-0.15750879049301147,
0.04430614411830902,
0.46375948190689087,
-0.2750534415245056,
0.2132605016231537,
0.42850783467292786,
-0.005432337522506714,
-0.043129097670316696,
-0.12088309228420258,
0.1267634928226471,
0.0437576100230217,
0.2106197476387024,
0.1623663604259491,
-0.31650039553642273,
-0.06293673813343048,
-0.2680119574069977,
0.3825362026691437,
-0.04195999354124069,
-0.20746102929115295,
-0.0652514398097992,
-0.2240743637084961,
-0.46791088581085205,
-0.05444568395614624,
0.24773076176643372,
0.14027415215969086,
0.09236728399991989,
0.5768778324127197,
-0.35869479179382324,
0.18367235362529755,
-0.1821165829896927,
0.09477335214614868,
0.029331641271710396,
0.0852852314710617,
0.0898132473230362,
0.037284694612026215,
-0.022230464965105057,
-0.26654982566833496,
-0.08721087127923965,
0.45016688108444214,
0.009886546991765499,
-0.09261652082204819,
-0.4276532530784607,
0.17318440973758698,
0.5592156052589417,
-0.18240733444690704,
0.07406458258628845,
-0.21702072024345398,
-0.0007080398499965668,
-0.3593151569366455,
-0.025179391726851463,
0.2778584361076355,
0.03072594478726387,
0.2733375132083893,
0.1893637776374817,
0.11630617082118988,
0.004188135266304016,
-0.015500474721193314,
-0.09674584865570068,
-0.06437107920646667,
0.0176320131868124,
0.0547897145152092,
0.03433942422270775,
-0.07344324886798859,
-0.08076473325490952,
0.2219371199607849,
0.29702192544937134,
0.20848289132118225,
0.24013057351112366,
-0.04554034024477005,
-0.22811654210090637,
-0.13362367451190948,
0.35152044892311096,
0.35704055428504944,
-0.20131231844425201,
-0.24378588795661926,
0.5111562013626099,
0.08368027955293655,
-0.09427786618471146,
0.1351260393857956,
0.27597102522850037,
0.03471481427550316,
0.23943015933036804,
0.1732371300458908,
-0.23262850940227509,
0.281165212392807,
-0.46636807918548584,
-0.08754252642393112,
0.2715711295604706,
-0.04677361994981766,
0.04084191471338272,
0.08094300329685211,
-0.1805374026298523,
0.2933402359485626,
0.27704501152038574,
0.13322389125823975,
0.33002305030822754,
0.23037117719650269,
0.09322348982095718,
0.12525342404842377,
0.12603060901165009,
0.09452314674854279,
0.1989387571811676,
-0.46280550956726074,
0.3219623267650604,
0.24264071881771088,
-0.005586951971054077,
0.19447126984596252,
0.15458106994628906,
0.4853109121322632,
-0.5250396728515625,
-0.2774396240711212,
0.23163777589797974,
0.4182755947113037,
-0.20757123827934265,
-0.04142395406961441,
-0.44489017128944397,
0.06417778879404068,
-0.02327709272503853,
-0.019185209646821022,
-0.08467213809490204,
0.004049357026815414,
0.17936667799949646,
-0.14101462066173553,
-0.06083358824253082,
-0.20407839119434357,
-0.46704161167144775,
-0.11982107907533646,
0.30511918663978577,
-0.2399478405714035,
-0.1056109145283699,
-0.10890476405620575,
0.05851910635828972,
-0.21501490473747253,
-0.12643218040466309,
0.2644937038421631,
0.20696739852428436,
-0.3826083540916443,
-0.10495521873235703,
0.012839911505579948,
0.11485438048839569,
-0.12204843759536743,
0.2308775633573532,
-0.2840908169746399,
-0.3314357399940491,
0.3611921966075897,
-0.026852162554860115,
-0.09760954976081848,
-0.1502252221107483,
0.1964082419872284,
0.641011118888855,
0.00015184376388788223,
0.2310478389263153,
-0.025150850415229797,
-0.03459571301937103,
-0.1389734148979187,
0.05277237296104431,
0.07531566172838211,
0.16618970036506653,
0.15701356530189514,
0.1477213352918625,
0.40052279829978943,
0.004388313740491867,
0.050076812505722046,
0.09972867369651794,
0.2572554349899292,
0.3555528521537781,
-0.3640001714229584,
-0.515011727809906,
0.05073210597038269,
-0.5516366958618164,
0.17806710302829742,
-0.2801920771598816,
-0.37626156210899353,
-0.16202875971794128,
-0.08286873251199722,
0.31118276715278625,
0.03223206847906113,
-0.09385420382022858,
0.15670649707317352,
0.11198706179857254,
0.18790365755558014,
0.12259247899055481,
-0.24370063841342926,
-0.4694601893424988,
-0.3019481599330902,
0.3355236351490021,
-0.2901141941547394,
0.26598960161209106,
0.29043933749198914,
-0.016332484781742096,
-0.07166358828544617,
-0.3088708519935608,
-0.06867758929729462,
0.0746302381157875,
0.6968876719474792,
0.31985434889793396,
0.1866273134946823,
-0.09400436282157898,
0.09945815801620483,
-0.023252766579389572,
0.20762383937835693,
-0.2597786784172058,
0.17135590314865112,
-0.48417994379997253,
0.3901791274547577,
0.0003463923931121826,
0.2632504105567932,
-0.6178387999534607,
0.006223740056157112,
0.16857416927814484,
-0.06208442896604538,
-0.5151697397232056,
0.26846614480018616,
-0.17149204015731812,
0.14055563509464264,
-0.1522606760263443,
0.5060007572174072,
-0.16236957907676697,
0.5561704635620117,
-0.242071270942688,
-0.1725638210773468,
0.6069843769073486,
-0.5967271327972412,
-0.28713759779930115,
0.08811946958303452,
-0.02044607698917389,
-0.04781397432088852,
-0.3517236113548279,
-0.40750235319137573,
-0.25453680753707886,
0.31830480694770813,
-0.10058269649744034,
-0.27558934688568115,
-0.12727318704128265,
0.038144879043102264,
0.11818253993988037,
-0.08276401460170746,
0.7448382377624512,
0.08606360107660294,
-0.05790974572300911,
0.3663485646247864,
-0.008757846429944038
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | Actually, maybe I need to deep copy `self.__dict__`? That way `self` isn't modified. That was my intention and I thought it was working - I'll double-check after the weekend. | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 29 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
Actually, maybe I need to deep copy `self.__dict__`? That way `self` isn't modified. That was my intention and I thought it was working - I'll double-check after the weekend. | [
-0.22488799691200256,
0.193120539188385,
0.11275288462638855,
0.028775807470083237,
0.03419550508260727,
-0.3237709403038025,
0.1385369747877121,
0.19508418440818787,
0.3468087613582611,
-0.10001760721206665,
0.19218076765537262,
0.7253849506378174,
-0.19295987486839294,
0.20866982638835907,
-0.0016189413145184517,
0.05957898497581482,
0.07051911950111389,
-0.03540794551372528,
-0.005138233304023743,
-0.06401293724775314,
-0.21730074286460876,
0.050917018204927444,
-0.35797542333602905,
0.15361341834068298,
-0.2765946090221405,
-0.17681460082530975,
0.025939082726836205,
0.11868852376937866,
-0.02998422645032406,
-0.2711367905139923,
0.20454657077789307,
-0.07879386842250824,
-0.027705322951078415,
0.24116593599319458,
-0.00012316941865719855,
-0.08011507987976074,
0.016193069517612457,
-0.08638353645801544,
-0.004161312244832516,
-0.21759943664073944,
-0.22309496998786926,
-0.12397703528404236,
-0.12354431301355362,
-0.229413241147995,
0.07815719395875931,
0.0024630348198115826,
-0.2965724468231201,
-0.38138097524642944,
0.6342021226882935,
0.4318729043006897,
0.11990717053413391,
0.36486873030662537,
-0.06786774843931198,
-0.03467966988682747,
-0.13554903864860535,
0.310019314289093,
0.05284801125526428,
0.2233031839132309,
0.12532666325569153,
-0.3918105661869049,
-0.001214444637298584,
0.09562943875789642,
-0.1981264054775238,
-0.21601030230522156,
0.1527504026889801,
0.05910709500312805,
0.1838107407093048,
0.010621223598718643,
-0.008678030222654343,
0.09299501031637192,
0.2169972062110901,
-0.35737472772598267,
-0.2120286375284195,
-0.3761945962905884,
-0.05751373991370201,
-0.15050138533115387,
0.3402036428451538,
-0.21683865785598755,
0.13164937496185303,
0.1427590698003769,
-0.048483431339263916,
-0.10448621213436127,
0.22394004464149475,
0.351848304271698,
-0.03908133879303932,
0.2571783661842346,
-0.01660948619246483,
0.3984132707118988,
-0.05367935821413994,
-0.10632330179214478,
-0.18072569370269775,
-0.10334409773349762,
0.10165378451347351,
0.45161664485931396,
-0.011211667209863663,
-0.23849061131477356,
0.210550457239151,
-0.2123309075832367,
-0.02430822141468525,
0.21151015162467957,
-0.16386498510837555,
0.12254887074232101,
-0.36412692070007324,
0.26401740312576294,
0.47083964943885803,
0.22121846675872803,
0.12371264398097992,
0.6363033056259155,
0.19857066869735718,
-0.16029183566570282,
-0.3000458776950836,
0.07452572882175446,
0.31024831533432007,
-0.10113603621721268,
-0.03733879327774048,
0.17564818263053894,
-0.10271651297807693,
-0.12865199148654938,
-0.07385292649269104,
0.27302286028862,
-0.7321615219116211,
0.008305506780743599,
0.1820908635854721,
0.12161991000175476,
-0.0009523850167170167,
-0.22241157293319702,
-0.08313725143671036,
0.07775600254535675,
-0.21585768461227417,
0.11480947583913803,
-0.1185755655169487,
0.1242491751909256,
-0.3427768647670746,
0.11042282730340958,
-0.04326052963733673,
0.05694468691945076,
0.3175238072872162,
0.12566962838172913,
-0.16883833706378937,
-0.059652335941791534,
0.15125037729740143,
-0.22944819927215576,
0.4016968011856079,
-0.019704069942235947,
-0.2360147088766098,
0.04248479753732681,
0.30694034695625305,
-0.4420321583747864,
-0.2555747926235199,
-0.05922742933034897,
-0.15265685319900513,
-0.14126373827457428,
-0.038635022938251495,
0.03472549840807915,
-0.23729628324508667,
-0.0047178976237773895,
-0.30469030141830444,
0.1028885766863823,
0.3713425397872925,
-0.20585207641124725,
0.0988665372133255,
-0.5015790462493896,
-0.35631152987480164,
-0.20766377449035645,
0.008802609518170357,
0.17747752368450165,
-0.4386502504348755,
-0.24340416491031647,
-0.09803180396556854,
0.1520782858133316,
0.3357076644897461,
0.12456756830215454,
-0.26133859157562256,
0.6007267236709595,
-0.4962503910064697,
0.8756874203681946,
0.2869647443294525,
-0.14862683415412903,
-0.40101176500320435,
0.03295362368226051,
-0.17289458215236664,
0.23207588493824005,
-0.6788748502731323,
-0.10385672003030777,
0.16501544415950775,
-0.07975828647613525,
0.1138157770037651,
0.3388637900352478,
0.15492136776447296,
-0.09533272683620453,
-0.12821991741657257,
0.06443028151988983,
0.326865553855896,
-0.2837589681148529,
0.0703488364815712,
-0.00969521701335907,
0.16244414448738098,
-0.21676354110240936,
0.21740296483039856,
0.034307003021240234,
0.184342160820961,
-0.11258983612060547,
0.455954372882843,
0.17644402384757996,
-0.12051033973693848,
-0.3156251907348633,
-0.18376803398132324,
0.3253220319747925,
-0.02808859758079052,
-0.026879549026489258,
-0.11929571628570557,
-0.08291018009185791,
-0.11312658339738846,
0.056021854281425476,
-0.339925616979599,
-0.2433573305606842,
0.029902435839176178,
0.024314075708389282,
0.2335776686668396,
0.17532978951931,
-0.08356466889381409,
-0.24794498085975647,
-0.050614841282367706,
0.060970887541770935,
-0.05589338019490242,
0.056883715093135834,
0.1251782476902008,
-0.2686156928539276,
-0.31789031624794006,
0.16740421950817108,
0.40873560309410095,
-0.09793664515018463,
-0.18483835458755493,
0.27618691325187683,
0.5985631346702576,
-0.29916536808013916,
-0.3962611258029938,
-0.18160904943943024,
-0.1041160300374031,
0.1290624737739563,
-0.2356889843940735,
0.1717507541179657,
-0.0027848524041473866,
-0.23090091347694397,
-0.025695614516735077,
0.5132237076759338,
0.24769280850887299,
0.31123679876327515,
-0.4027121067047119,
0.2516176402568817,
-0.01230483129620552,
-0.08680570125579834,
-0.14821743965148926,
-0.33737626671791077,
-0.2627914249897003,
0.037331823259592056,
0.3305842876434326,
-0.13446250557899475,
-0.036491744220256805,
0.04074283689260483,
0.3557882606983185,
-0.07353566586971283,
0.325707346200943,
-0.06443041563034058,
-0.19810637831687927,
-0.19067993760108948,
0.2980228066444397,
0.3740845024585724,
0.5166626572608948,
-0.1092328280210495,
-0.057225074619054794,
0.08503854274749756,
-0.045890308916568756,
-0.04900118708610535,
0.01684088259935379,
-0.17222823202610016,
-0.037864360958337784,
0.19884848594665527,
0.048589594662189484,
-0.09989799559116364,
-0.18129202723503113,
0.009795140475034714,
0.056278616189956665,
0.29222795367240906,
-0.23866672813892365,
0.09624195843935013,
-0.5637152791023254,
0.07098790258169174,
-0.28859785199165344,
-0.1303834170103073,
0.007216315716505051,
-0.44396018981933594,
-0.21197178959846497,
0.09415265917778015,
-0.23600523173809052,
0.2182338684797287,
-0.16104929149150848,
-0.1597829908132553,
-0.15046247839927673,
-0.28893664479255676,
0.09865130484104156,
-0.23461343348026276,
-0.22342312335968018,
-0.0864403024315834,
0.12882207334041595,
0.12238137423992157,
0.22562797367572784,
0.3576843738555908,
-0.4277695417404175,
-0.3453753590583801,
-0.2861616909503937,
0.36421072483062744,
-0.16716036200523376,
0.12165587395429611,
0.3645747900009155,
-0.21086330711841583,
-0.07228526473045349,
0.15103338658809662,
0.31954672932624817,
-0.10602527856826782,
-0.1192040964961052,
-0.15033608675003052,
0.27737557888031006,
0.02400069311261177,
-0.028316203504800797,
0.014470204710960388,
-0.1706433892250061,
-0.0576484240591526,
0.37156957387924194,
-0.1595647931098938,
0.08714628219604492,
0.16744211316108704,
0.04409094899892807,
0.23064658045768738,
-0.10440979897975922,
-0.26062706112861633,
-0.4392031729221344,
-0.09853241592645645,
0.16474291682243347,
-0.19629721343517303,
-0.12574008107185364,
-0.03666532039642334,
-0.10954618453979492,
0.1613347977399826,
0.04170382022857666,
-0.23590296506881714,
0.0899796336889267,
-0.004336884245276451,
0.3883190155029297,
-0.20898684859275818,
0.11808407306671143,
0.37520211935043335,
0.16850726306438446,
0.05962496995925903,
-0.1573241949081421,
-0.20618517696857452,
0.1814013421535492,
0.3865942060947418,
0.21564316749572754,
0.18958216905593872,
0.24439680576324463,
0.15978732705116272,
0.850033164024353,
0.319330096244812,
-0.4346616864204407,
0.12059800326824188,
-0.05809423327445984,
-0.06442433595657349,
-0.07623689621686935,
-0.3137795031070709,
-0.06624945253133774,
-0.24335289001464844,
-0.12011294066905975,
-0.12522591650485992,
-0.2128143012523651,
0.12244546413421631,
0.17188696563243866,
0.07384507358074188,
-0.02322227694094181,
-0.4763820171356201,
0.18449820578098297,
-0.25369447469711304,
0.14348547160625458,
0.15853993594646454,
0.37904736399650574,
-0.19344642758369446,
0.31325843930244446,
0.23374055325984955,
-0.09903964400291443,
0.4059719443321228,
0.09168031066656113,
-0.5711541175842285,
-0.20064318180084229,
-0.34278541803359985,
0.44404900074005127,
0.25476062297821045,
0.17552612721920013,
-0.09011698514223099,
-0.08576233685016632,
-0.14311479032039642,
0.18591298162937164,
0.3545985817909241,
-0.44384080171585083,
-0.03123156726360321,
0.3080909848213196,
-0.16998623311519623,
-0.17829053103923798,
-0.085822694003582,
0.20333468914031982,
0.6135451793670654,
0.060685209929943085,
0.5777100324630737,
-0.13267214596271515,
-0.0017200688598677516,
-0.18484032154083252,
0.09971819072961807,
-0.0973081886768341,
-0.1813916563987732,
-0.04163701832294464,
0.04431658983230591,
-0.257154256105423,
0.13071487843990326,
0.1788228154182434,
-0.031146416440606117,
0.25152167677879333,
0.03757307305932045,
-0.11305506527423859,
-0.24862971901893616,
-0.06708429753780365,
0.020453717559576035,
0.2222062349319458,
0.0019846155773848295,
0.15636742115020752,
0.23342156410217285,
-0.033222831785678864,
0.2050066441297531,
0.3170373737812042,
-0.1554170846939087,
0.019160382449626923,
-0.20104798674583435,
0.023792371153831482,
0.3575343191623688,
0.07553467154502869,
-0.05679534375667572,
0.30185386538505554,
-0.013497970998287201,
-0.10008600354194641,
-0.29226070642471313,
0.2588861584663391,
0.1977369636297226,
0.09749899804592133,
-0.13095006346702576,
-0.5797979235649109,
0.06107053533196449,
0.0986432433128357,
-0.17722663283348083,
0.3608708381652832,
0.04270876199007034,
-0.29186302423477173,
0.29059678316116333,
0.17745009064674377,
0.8005257844924927,
0.16540583968162537,
0.014834299683570862,
0.3365233242511749,
0.180822491645813,
0.369922935962677,
0.23551957309246063,
-0.06569360196590424,
-0.34278541803359985,
0.3571140766143799,
-0.18385042250156403,
-0.29293256998062134,
0.002491891384124756,
0.005258984863758087,
-0.19129054248332977,
0.24985666573047638,
-0.013108409941196442,
0.1557762175798416,
-0.182407408952713,
0.14643168449401855,
0.3141552209854126,
-0.21153511106967926,
-0.034584179520606995,
0.15031279623508453,
-0.07391871511936188,
0.2885693609714508,
-0.03575567156076431,
0.13449320197105408,
-0.1474820077419281,
-0.007897693663835526,
-0.24406199157238007,
0.14441326260566711,
-0.5116115212440491,
0.3974112868309021,
0.08362829685211182,
-0.08395231515169144,
0.29561758041381836,
0.08216889202594757,
-0.07009604573249817,
0.16538164019584656,
-0.05454239994287491,
0.12420159578323364,
0.23464107513427734,
0.20128846168518066,
0.12402133643627167,
-0.3333580195903778,
0.26357170939445496,
0.22540849447250366,
-0.10462043434381485,
-0.003839530050754547,
-0.15546728670597076,
-0.22562967240810394,
-0.17735391855239868,
0.21047712862491608,
0.22592024505138397,
-0.35650399327278137,
-0.23085512220859528,
-0.03488767892122269,
0.09603160619735718,
-0.19571059942245483,
0.02037419006228447,
0.12065304815769196,
0.13061852753162384,
0.23726055026054382,
-0.38427743315696716,
-0.15750879049301147,
0.04430614411830902,
0.46375948190689087,
-0.2750534415245056,
0.2132605016231537,
0.42850783467292786,
-0.005432337522506714,
-0.043129097670316696,
-0.12088309228420258,
0.1267634928226471,
0.0437576100230217,
0.2106197476387024,
0.1623663604259491,
-0.31650039553642273,
-0.06293673813343048,
-0.2680119574069977,
0.3825362026691437,
-0.04195999354124069,
-0.20746102929115295,
-0.0652514398097992,
-0.2240743637084961,
-0.46791088581085205,
-0.05444568395614624,
0.24773076176643372,
0.14027415215969086,
0.09236728399991989,
0.5768778324127197,
-0.35869479179382324,
0.18367235362529755,
-0.1821165829896927,
0.09477335214614868,
0.029331641271710396,
0.0852852314710617,
0.0898132473230362,
0.037284694612026215,
-0.022230464965105057,
-0.26654982566833496,
-0.08721087127923965,
0.45016688108444214,
0.009886546991765499,
-0.09261652082204819,
-0.4276532530784607,
0.17318440973758698,
0.5592156052589417,
-0.18240733444690704,
0.07406458258628845,
-0.21702072024345398,
-0.0007080398499965668,
-0.3593151569366455,
-0.025179391726851463,
0.2778584361076355,
0.03072594478726387,
0.2733375132083893,
0.1893637776374817,
0.11630617082118988,
0.004188135266304016,
-0.015500474721193314,
-0.09674584865570068,
-0.06437107920646667,
0.0176320131868124,
0.0547897145152092,
0.03433942422270775,
-0.07344324886798859,
-0.08076473325490952,
0.2219371199607849,
0.29702192544937134,
0.20848289132118225,
0.24013057351112366,
-0.04554034024477005,
-0.22811654210090637,
-0.13362367451190948,
0.35152044892311096,
0.35704055428504944,
-0.20131231844425201,
-0.24378588795661926,
0.5111562013626099,
0.08368027955293655,
-0.09427786618471146,
0.1351260393857956,
0.27597102522850037,
0.03471481427550316,
0.23943015933036804,
0.1732371300458908,
-0.23262850940227509,
0.281165212392807,
-0.46636807918548584,
-0.08754252642393112,
0.2715711295604706,
-0.04677361994981766,
0.04084191471338272,
0.08094300329685211,
-0.1805374026298523,
0.2933402359485626,
0.27704501152038574,
0.13322389125823975,
0.33002305030822754,
0.23037117719650269,
0.09322348982095718,
0.12525342404842377,
0.12603060901165009,
0.09452314674854279,
0.1989387571811676,
-0.46280550956726074,
0.3219623267650604,
0.24264071881771088,
-0.005586951971054077,
0.19447126984596252,
0.15458106994628906,
0.4853109121322632,
-0.5250396728515625,
-0.2774396240711212,
0.23163777589797974,
0.4182755947113037,
-0.20757123827934265,
-0.04142395406961441,
-0.44489017128944397,
0.06417778879404068,
-0.02327709272503853,
-0.019185209646821022,
-0.08467213809490204,
0.004049357026815414,
0.17936667799949646,
-0.14101462066173553,
-0.06083358824253082,
-0.20407839119434357,
-0.46704161167144775,
-0.11982107907533646,
0.30511918663978577,
-0.2399478405714035,
-0.1056109145283699,
-0.10890476405620575,
0.05851910635828972,
-0.21501490473747253,
-0.12643218040466309,
0.2644937038421631,
0.20696739852428436,
-0.3826083540916443,
-0.10495521873235703,
0.012839911505579948,
0.11485438048839569,
-0.12204843759536743,
0.2308775633573532,
-0.2840908169746399,
-0.3314357399940491,
0.3611921966075897,
-0.026852162554860115,
-0.09760954976081848,
-0.1502252221107483,
0.1964082419872284,
0.641011118888855,
0.00015184376388788223,
0.2310478389263153,
-0.025150850415229797,
-0.03459571301937103,
-0.1389734148979187,
0.05277237296104431,
0.07531566172838211,
0.16618970036506653,
0.15701356530189514,
0.1477213352918625,
0.40052279829978943,
0.004388313740491867,
0.050076812505722046,
0.09972867369651794,
0.2572554349899292,
0.3555528521537781,
-0.3640001714229584,
-0.515011727809906,
0.05073210597038269,
-0.5516366958618164,
0.17806710302829742,
-0.2801920771598816,
-0.37626156210899353,
-0.16202875971794128,
-0.08286873251199722,
0.31118276715278625,
0.03223206847906113,
-0.09385420382022858,
0.15670649707317352,
0.11198706179857254,
0.18790365755558014,
0.12259247899055481,
-0.24370063841342926,
-0.4694601893424988,
-0.3019481599330902,
0.3355236351490021,
-0.2901141941547394,
0.26598960161209106,
0.29043933749198914,
-0.016332484781742096,
-0.07166358828544617,
-0.3088708519935608,
-0.06867758929729462,
0.0746302381157875,
0.6968876719474792,
0.31985434889793396,
0.1866273134946823,
-0.09400436282157898,
0.09945815801620483,
-0.023252766579389572,
0.20762383937835693,
-0.2597786784172058,
0.17135590314865112,
-0.48417994379997253,
0.3901791274547577,
0.0003463923931121826,
0.2632504105567932,
-0.6178387999534607,
0.006223740056157112,
0.16857416927814484,
-0.06208442896604538,
-0.5151697397232056,
0.26846614480018616,
-0.17149204015731812,
0.14055563509464264,
-0.1522606760263443,
0.5060007572174072,
-0.16236957907676697,
0.5561704635620117,
-0.242071270942688,
-0.1725638210773468,
0.6069843769073486,
-0.5967271327972412,
-0.28713759779930115,
0.08811946958303452,
-0.02044607698917389,
-0.04781397432088852,
-0.3517236113548279,
-0.40750235319137573,
-0.25453680753707886,
0.31830480694770813,
-0.10058269649744034,
-0.27558934688568115,
-0.12727318704128265,
0.038144879043102264,
0.11818253993988037,
-0.08276401460170746,
0.7448382377624512,
0.08606360107660294,
-0.05790974572300911,
0.3663485646247864,
-0.008757846429944038
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | Doing a deep copy results in the warning:
> 06/20/2021 16:02:15 - WARNING - datasets.fingerprint - Parameter 'function'=<function tokenize_function at 0x7f1e95f05d40> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
```
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
out = copy.deepcopy(self.__dict__)
logger.debug("Detaching pre_tokenizer")
out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
return out
``` | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 114 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
Doing a deep copy results in the warning:
> 06/20/2021 16:02:15 - WARNING - datasets.fingerprint - Parameter 'function'=<function tokenize_function at 0x7f1e95f05d40> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
```
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
out = copy.deepcopy(self.__dict__)
logger.debug("Detaching pre_tokenizer")
out['_tokenizer'].pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
return out
``` | [
-0.22488799691200256,
0.193120539188385,
0.11275288462638855,
0.028775807470083237,
0.03419550508260727,
-0.3237709403038025,
0.1385369747877121,
0.19508418440818787,
0.3468087613582611,
-0.10001760721206665,
0.19218076765537262,
0.7253849506378174,
-0.19295987486839294,
0.20866982638835907,
-0.0016189413145184517,
0.05957898497581482,
0.07051911950111389,
-0.03540794551372528,
-0.005138233304023743,
-0.06401293724775314,
-0.21730074286460876,
0.050917018204927444,
-0.35797542333602905,
0.15361341834068298,
-0.2765946090221405,
-0.17681460082530975,
0.025939082726836205,
0.11868852376937866,
-0.02998422645032406,
-0.2711367905139923,
0.20454657077789307,
-0.07879386842250824,
-0.027705322951078415,
0.24116593599319458,
-0.00012316941865719855,
-0.08011507987976074,
0.016193069517612457,
-0.08638353645801544,
-0.004161312244832516,
-0.21759943664073944,
-0.22309496998786926,
-0.12397703528404236,
-0.12354431301355362,
-0.229413241147995,
0.07815719395875931,
0.0024630348198115826,
-0.2965724468231201,
-0.38138097524642944,
0.6342021226882935,
0.4318729043006897,
0.11990717053413391,
0.36486873030662537,
-0.06786774843931198,
-0.03467966988682747,
-0.13554903864860535,
0.310019314289093,
0.05284801125526428,
0.2233031839132309,
0.12532666325569153,
-0.3918105661869049,
-0.001214444637298584,
0.09562943875789642,
-0.1981264054775238,
-0.21601030230522156,
0.1527504026889801,
0.05910709500312805,
0.1838107407093048,
0.010621223598718643,
-0.008678030222654343,
0.09299501031637192,
0.2169972062110901,
-0.35737472772598267,
-0.2120286375284195,
-0.3761945962905884,
-0.05751373991370201,
-0.15050138533115387,
0.3402036428451538,
-0.21683865785598755,
0.13164937496185303,
0.1427590698003769,
-0.048483431339263916,
-0.10448621213436127,
0.22394004464149475,
0.351848304271698,
-0.03908133879303932,
0.2571783661842346,
-0.01660948619246483,
0.3984132707118988,
-0.05367935821413994,
-0.10632330179214478,
-0.18072569370269775,
-0.10334409773349762,
0.10165378451347351,
0.45161664485931396,
-0.011211667209863663,
-0.23849061131477356,
0.210550457239151,
-0.2123309075832367,
-0.02430822141468525,
0.21151015162467957,
-0.16386498510837555,
0.12254887074232101,
-0.36412692070007324,
0.26401740312576294,
0.47083964943885803,
0.22121846675872803,
0.12371264398097992,
0.6363033056259155,
0.19857066869735718,
-0.16029183566570282,
-0.3000458776950836,
0.07452572882175446,
0.31024831533432007,
-0.10113603621721268,
-0.03733879327774048,
0.17564818263053894,
-0.10271651297807693,
-0.12865199148654938,
-0.07385292649269104,
0.27302286028862,
-0.7321615219116211,
0.008305506780743599,
0.1820908635854721,
0.12161991000175476,
-0.0009523850167170167,
-0.22241157293319702,
-0.08313725143671036,
0.07775600254535675,
-0.21585768461227417,
0.11480947583913803,
-0.1185755655169487,
0.1242491751909256,
-0.3427768647670746,
0.11042282730340958,
-0.04326052963733673,
0.05694468691945076,
0.3175238072872162,
0.12566962838172913,
-0.16883833706378937,
-0.059652335941791534,
0.15125037729740143,
-0.22944819927215576,
0.4016968011856079,
-0.019704069942235947,
-0.2360147088766098,
0.04248479753732681,
0.30694034695625305,
-0.4420321583747864,
-0.2555747926235199,
-0.05922742933034897,
-0.15265685319900513,
-0.14126373827457428,
-0.038635022938251495,
0.03472549840807915,
-0.23729628324508667,
-0.0047178976237773895,
-0.30469030141830444,
0.1028885766863823,
0.3713425397872925,
-0.20585207641124725,
0.0988665372133255,
-0.5015790462493896,
-0.35631152987480164,
-0.20766377449035645,
0.008802609518170357,
0.17747752368450165,
-0.4386502504348755,
-0.24340416491031647,
-0.09803180396556854,
0.1520782858133316,
0.3357076644897461,
0.12456756830215454,
-0.26133859157562256,
0.6007267236709595,
-0.4962503910064697,
0.8756874203681946,
0.2869647443294525,
-0.14862683415412903,
-0.40101176500320435,
0.03295362368226051,
-0.17289458215236664,
0.23207588493824005,
-0.6788748502731323,
-0.10385672003030777,
0.16501544415950775,
-0.07975828647613525,
0.1138157770037651,
0.3388637900352478,
0.15492136776447296,
-0.09533272683620453,
-0.12821991741657257,
0.06443028151988983,
0.326865553855896,
-0.2837589681148529,
0.0703488364815712,
-0.00969521701335907,
0.16244414448738098,
-0.21676354110240936,
0.21740296483039856,
0.034307003021240234,
0.184342160820961,
-0.11258983612060547,
0.455954372882843,
0.17644402384757996,
-0.12051033973693848,
-0.3156251907348633,
-0.18376803398132324,
0.3253220319747925,
-0.02808859758079052,
-0.026879549026489258,
-0.11929571628570557,
-0.08291018009185791,
-0.11312658339738846,
0.056021854281425476,
-0.339925616979599,
-0.2433573305606842,
0.029902435839176178,
0.024314075708389282,
0.2335776686668396,
0.17532978951931,
-0.08356466889381409,
-0.24794498085975647,
-0.050614841282367706,
0.060970887541770935,
-0.05589338019490242,
0.056883715093135834,
0.1251782476902008,
-0.2686156928539276,
-0.31789031624794006,
0.16740421950817108,
0.40873560309410095,
-0.09793664515018463,
-0.18483835458755493,
0.27618691325187683,
0.5985631346702576,
-0.29916536808013916,
-0.3962611258029938,
-0.18160904943943024,
-0.1041160300374031,
0.1290624737739563,
-0.2356889843940735,
0.1717507541179657,
-0.0027848524041473866,
-0.23090091347694397,
-0.025695614516735077,
0.5132237076759338,
0.24769280850887299,
0.31123679876327515,
-0.4027121067047119,
0.2516176402568817,
-0.01230483129620552,
-0.08680570125579834,
-0.14821743965148926,
-0.33737626671791077,
-0.2627914249897003,
0.037331823259592056,
0.3305842876434326,
-0.13446250557899475,
-0.036491744220256805,
0.04074283689260483,
0.3557882606983185,
-0.07353566586971283,
0.325707346200943,
-0.06443041563034058,
-0.19810637831687927,
-0.19067993760108948,
0.2980228066444397,
0.3740845024585724,
0.5166626572608948,
-0.1092328280210495,
-0.057225074619054794,
0.08503854274749756,
-0.045890308916568756,
-0.04900118708610535,
0.01684088259935379,
-0.17222823202610016,
-0.037864360958337784,
0.19884848594665527,
0.048589594662189484,
-0.09989799559116364,
-0.18129202723503113,
0.009795140475034714,
0.056278616189956665,
0.29222795367240906,
-0.23866672813892365,
0.09624195843935013,
-0.5637152791023254,
0.07098790258169174,
-0.28859785199165344,
-0.1303834170103073,
0.007216315716505051,
-0.44396018981933594,
-0.21197178959846497,
0.09415265917778015,
-0.23600523173809052,
0.2182338684797287,
-0.16104929149150848,
-0.1597829908132553,
-0.15046247839927673,
-0.28893664479255676,
0.09865130484104156,
-0.23461343348026276,
-0.22342312335968018,
-0.0864403024315834,
0.12882207334041595,
0.12238137423992157,
0.22562797367572784,
0.3576843738555908,
-0.4277695417404175,
-0.3453753590583801,
-0.2861616909503937,
0.36421072483062744,
-0.16716036200523376,
0.12165587395429611,
0.3645747900009155,
-0.21086330711841583,
-0.07228526473045349,
0.15103338658809662,
0.31954672932624817,
-0.10602527856826782,
-0.1192040964961052,
-0.15033608675003052,
0.27737557888031006,
0.02400069311261177,
-0.028316203504800797,
0.014470204710960388,
-0.1706433892250061,
-0.0576484240591526,
0.37156957387924194,
-0.1595647931098938,
0.08714628219604492,
0.16744211316108704,
0.04409094899892807,
0.23064658045768738,
-0.10440979897975922,
-0.26062706112861633,
-0.4392031729221344,
-0.09853241592645645,
0.16474291682243347,
-0.19629721343517303,
-0.12574008107185364,
-0.03666532039642334,
-0.10954618453979492,
0.1613347977399826,
0.04170382022857666,
-0.23590296506881714,
0.0899796336889267,
-0.004336884245276451,
0.3883190155029297,
-0.20898684859275818,
0.11808407306671143,
0.37520211935043335,
0.16850726306438446,
0.05962496995925903,
-0.1573241949081421,
-0.20618517696857452,
0.1814013421535492,
0.3865942060947418,
0.21564316749572754,
0.18958216905593872,
0.24439680576324463,
0.15978732705116272,
0.850033164024353,
0.319330096244812,
-0.4346616864204407,
0.12059800326824188,
-0.05809423327445984,
-0.06442433595657349,
-0.07623689621686935,
-0.3137795031070709,
-0.06624945253133774,
-0.24335289001464844,
-0.12011294066905975,
-0.12522591650485992,
-0.2128143012523651,
0.12244546413421631,
0.17188696563243866,
0.07384507358074188,
-0.02322227694094181,
-0.4763820171356201,
0.18449820578098297,
-0.25369447469711304,
0.14348547160625458,
0.15853993594646454,
0.37904736399650574,
-0.19344642758369446,
0.31325843930244446,
0.23374055325984955,
-0.09903964400291443,
0.4059719443321228,
0.09168031066656113,
-0.5711541175842285,
-0.20064318180084229,
-0.34278541803359985,
0.44404900074005127,
0.25476062297821045,
0.17552612721920013,
-0.09011698514223099,
-0.08576233685016632,
-0.14311479032039642,
0.18591298162937164,
0.3545985817909241,
-0.44384080171585083,
-0.03123156726360321,
0.3080909848213196,
-0.16998623311519623,
-0.17829053103923798,
-0.085822694003582,
0.20333468914031982,
0.6135451793670654,
0.060685209929943085,
0.5777100324630737,
-0.13267214596271515,
-0.0017200688598677516,
-0.18484032154083252,
0.09971819072961807,
-0.0973081886768341,
-0.1813916563987732,
-0.04163701832294464,
0.04431658983230591,
-0.257154256105423,
0.13071487843990326,
0.1788228154182434,
-0.031146416440606117,
0.25152167677879333,
0.03757307305932045,
-0.11305506527423859,
-0.24862971901893616,
-0.06708429753780365,
0.020453717559576035,
0.2222062349319458,
0.0019846155773848295,
0.15636742115020752,
0.23342156410217285,
-0.033222831785678864,
0.2050066441297531,
0.3170373737812042,
-0.1554170846939087,
0.019160382449626923,
-0.20104798674583435,
0.023792371153831482,
0.3575343191623688,
0.07553467154502869,
-0.05679534375667572,
0.30185386538505554,
-0.013497970998287201,
-0.10008600354194641,
-0.29226070642471313,
0.2588861584663391,
0.1977369636297226,
0.09749899804592133,
-0.13095006346702576,
-0.5797979235649109,
0.06107053533196449,
0.0986432433128357,
-0.17722663283348083,
0.3608708381652832,
0.04270876199007034,
-0.29186302423477173,
0.29059678316116333,
0.17745009064674377,
0.8005257844924927,
0.16540583968162537,
0.014834299683570862,
0.3365233242511749,
0.180822491645813,
0.369922935962677,
0.23551957309246063,
-0.06569360196590424,
-0.34278541803359985,
0.3571140766143799,
-0.18385042250156403,
-0.29293256998062134,
0.002491891384124756,
0.005258984863758087,
-0.19129054248332977,
0.24985666573047638,
-0.013108409941196442,
0.1557762175798416,
-0.182407408952713,
0.14643168449401855,
0.3141552209854126,
-0.21153511106967926,
-0.034584179520606995,
0.15031279623508453,
-0.07391871511936188,
0.2885693609714508,
-0.03575567156076431,
0.13449320197105408,
-0.1474820077419281,
-0.007897693663835526,
-0.24406199157238007,
0.14441326260566711,
-0.5116115212440491,
0.3974112868309021,
0.08362829685211182,
-0.08395231515169144,
0.29561758041381836,
0.08216889202594757,
-0.07009604573249817,
0.16538164019584656,
-0.05454239994287491,
0.12420159578323364,
0.23464107513427734,
0.20128846168518066,
0.12402133643627167,
-0.3333580195903778,
0.26357170939445496,
0.22540849447250366,
-0.10462043434381485,
-0.003839530050754547,
-0.15546728670597076,
-0.22562967240810394,
-0.17735391855239868,
0.21047712862491608,
0.22592024505138397,
-0.35650399327278137,
-0.23085512220859528,
-0.03488767892122269,
0.09603160619735718,
-0.19571059942245483,
0.02037419006228447,
0.12065304815769196,
0.13061852753162384,
0.23726055026054382,
-0.38427743315696716,
-0.15750879049301147,
0.04430614411830902,
0.46375948190689087,
-0.2750534415245056,
0.2132605016231537,
0.42850783467292786,
-0.005432337522506714,
-0.043129097670316696,
-0.12088309228420258,
0.1267634928226471,
0.0437576100230217,
0.2106197476387024,
0.1623663604259491,
-0.31650039553642273,
-0.06293673813343048,
-0.2680119574069977,
0.3825362026691437,
-0.04195999354124069,
-0.20746102929115295,
-0.0652514398097992,
-0.2240743637084961,
-0.46791088581085205,
-0.05444568395614624,
0.24773076176643372,
0.14027415215969086,
0.09236728399991989,
0.5768778324127197,
-0.35869479179382324,
0.18367235362529755,
-0.1821165829896927,
0.09477335214614868,
0.029331641271710396,
0.0852852314710617,
0.0898132473230362,
0.037284694612026215,
-0.022230464965105057,
-0.26654982566833496,
-0.08721087127923965,
0.45016688108444214,
0.009886546991765499,
-0.09261652082204819,
-0.4276532530784607,
0.17318440973758698,
0.5592156052589417,
-0.18240733444690704,
0.07406458258628845,
-0.21702072024345398,
-0.0007080398499965668,
-0.3593151569366455,
-0.025179391726851463,
0.2778584361076355,
0.03072594478726387,
0.2733375132083893,
0.1893637776374817,
0.11630617082118988,
0.004188135266304016,
-0.015500474721193314,
-0.09674584865570068,
-0.06437107920646667,
0.0176320131868124,
0.0547897145152092,
0.03433942422270775,
-0.07344324886798859,
-0.08076473325490952,
0.2219371199607849,
0.29702192544937134,
0.20848289132118225,
0.24013057351112366,
-0.04554034024477005,
-0.22811654210090637,
-0.13362367451190948,
0.35152044892311096,
0.35704055428504944,
-0.20131231844425201,
-0.24378588795661926,
0.5111562013626099,
0.08368027955293655,
-0.09427786618471146,
0.1351260393857956,
0.27597102522850037,
0.03471481427550316,
0.23943015933036804,
0.1732371300458908,
-0.23262850940227509,
0.281165212392807,
-0.46636807918548584,
-0.08754252642393112,
0.2715711295604706,
-0.04677361994981766,
0.04084191471338272,
0.08094300329685211,
-0.1805374026298523,
0.2933402359485626,
0.27704501152038574,
0.13322389125823975,
0.33002305030822754,
0.23037117719650269,
0.09322348982095718,
0.12525342404842377,
0.12603060901165009,
0.09452314674854279,
0.1989387571811676,
-0.46280550956726074,
0.3219623267650604,
0.24264071881771088,
-0.005586951971054077,
0.19447126984596252,
0.15458106994628906,
0.4853109121322632,
-0.5250396728515625,
-0.2774396240711212,
0.23163777589797974,
0.4182755947113037,
-0.20757123827934265,
-0.04142395406961441,
-0.44489017128944397,
0.06417778879404068,
-0.02327709272503853,
-0.019185209646821022,
-0.08467213809490204,
0.004049357026815414,
0.17936667799949646,
-0.14101462066173553,
-0.06083358824253082,
-0.20407839119434357,
-0.46704161167144775,
-0.11982107907533646,
0.30511918663978577,
-0.2399478405714035,
-0.1056109145283699,
-0.10890476405620575,
0.05851910635828972,
-0.21501490473747253,
-0.12643218040466309,
0.2644937038421631,
0.20696739852428436,
-0.3826083540916443,
-0.10495521873235703,
0.012839911505579948,
0.11485438048839569,
-0.12204843759536743,
0.2308775633573532,
-0.2840908169746399,
-0.3314357399940491,
0.3611921966075897,
-0.026852162554860115,
-0.09760954976081848,
-0.1502252221107483,
0.1964082419872284,
0.641011118888855,
0.00015184376388788223,
0.2310478389263153,
-0.025150850415229797,
-0.03459571301937103,
-0.1389734148979187,
0.05277237296104431,
0.07531566172838211,
0.16618970036506653,
0.15701356530189514,
0.1477213352918625,
0.40052279829978943,
0.004388313740491867,
0.050076812505722046,
0.09972867369651794,
0.2572554349899292,
0.3555528521537781,
-0.3640001714229584,
-0.515011727809906,
0.05073210597038269,
-0.5516366958618164,
0.17806710302829742,
-0.2801920771598816,
-0.37626156210899353,
-0.16202875971794128,
-0.08286873251199722,
0.31118276715278625,
0.03223206847906113,
-0.09385420382022858,
0.15670649707317352,
0.11198706179857254,
0.18790365755558014,
0.12259247899055481,
-0.24370063841342926,
-0.4694601893424988,
-0.3019481599330902,
0.3355236351490021,
-0.2901141941547394,
0.26598960161209106,
0.29043933749198914,
-0.016332484781742096,
-0.07166358828544617,
-0.3088708519935608,
-0.06867758929729462,
0.0746302381157875,
0.6968876719474792,
0.31985434889793396,
0.1866273134946823,
-0.09400436282157898,
0.09945815801620483,
-0.023252766579389572,
0.20762383937835693,
-0.2597786784172058,
0.17135590314865112,
-0.48417994379997253,
0.3901791274547577,
0.0003463923931121826,
0.2632504105567932,
-0.6178387999534607,
0.006223740056157112,
0.16857416927814484,
-0.06208442896604538,
-0.5151697397232056,
0.26846614480018616,
-0.17149204015731812,
0.14055563509464264,
-0.1522606760263443,
0.5060007572174072,
-0.16236957907676697,
0.5561704635620117,
-0.242071270942688,
-0.1725638210773468,
0.6069843769073486,
-0.5967271327972412,
-0.28713759779930115,
0.08811946958303452,
-0.02044607698917389,
-0.04781397432088852,
-0.3517236113548279,
-0.40750235319137573,
-0.25453680753707886,
0.31830480694770813,
-0.10058269649744034,
-0.27558934688568115,
-0.12727318704128265,
0.038144879043102264,
0.11818253993988037,
-0.08276401460170746,
0.7448382377624512,
0.08606360107660294,
-0.05790974572300911,
0.3663485646247864,
-0.008757846429944038
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | Looks like there is still an object that is not pickable in your `tokenize_function` function.
You can test if an object can be pickled and hashed by using
```python
from datasets.fingerprint import Hasher
Hasher.hash(my_object)
```
Under the hood it pickles the object to compute its hash, so it calls `__getstate__` when applicable. | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 52 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
Looks like there is still an object that is not pickable in your `tokenize_function` function.
You can test if an object can be pickled and hashed by using
```python
from datasets.fingerprint import Hasher
Hasher.hash(my_object)
```
Under the hood it pickles the object to compute its hash, so it calls `__getstate__` when applicable. | [
-0.22488799691200256,
0.193120539188385,
0.11275288462638855,
0.028775807470083237,
0.03419550508260727,
-0.3237709403038025,
0.1385369747877121,
0.19508418440818787,
0.3468087613582611,
-0.10001760721206665,
0.19218076765537262,
0.7253849506378174,
-0.19295987486839294,
0.20866982638835907,
-0.0016189413145184517,
0.05957898497581482,
0.07051911950111389,
-0.03540794551372528,
-0.005138233304023743,
-0.06401293724775314,
-0.21730074286460876,
0.050917018204927444,
-0.35797542333602905,
0.15361341834068298,
-0.2765946090221405,
-0.17681460082530975,
0.025939082726836205,
0.11868852376937866,
-0.02998422645032406,
-0.2711367905139923,
0.20454657077789307,
-0.07879386842250824,
-0.027705322951078415,
0.24116593599319458,
-0.00012316941865719855,
-0.08011507987976074,
0.016193069517612457,
-0.08638353645801544,
-0.004161312244832516,
-0.21759943664073944,
-0.22309496998786926,
-0.12397703528404236,
-0.12354431301355362,
-0.229413241147995,
0.07815719395875931,
0.0024630348198115826,
-0.2965724468231201,
-0.38138097524642944,
0.6342021226882935,
0.4318729043006897,
0.11990717053413391,
0.36486873030662537,
-0.06786774843931198,
-0.03467966988682747,
-0.13554903864860535,
0.310019314289093,
0.05284801125526428,
0.2233031839132309,
0.12532666325569153,
-0.3918105661869049,
-0.001214444637298584,
0.09562943875789642,
-0.1981264054775238,
-0.21601030230522156,
0.1527504026889801,
0.05910709500312805,
0.1838107407093048,
0.010621223598718643,
-0.008678030222654343,
0.09299501031637192,
0.2169972062110901,
-0.35737472772598267,
-0.2120286375284195,
-0.3761945962905884,
-0.05751373991370201,
-0.15050138533115387,
0.3402036428451538,
-0.21683865785598755,
0.13164937496185303,
0.1427590698003769,
-0.048483431339263916,
-0.10448621213436127,
0.22394004464149475,
0.351848304271698,
-0.03908133879303932,
0.2571783661842346,
-0.01660948619246483,
0.3984132707118988,
-0.05367935821413994,
-0.10632330179214478,
-0.18072569370269775,
-0.10334409773349762,
0.10165378451347351,
0.45161664485931396,
-0.011211667209863663,
-0.23849061131477356,
0.210550457239151,
-0.2123309075832367,
-0.02430822141468525,
0.21151015162467957,
-0.16386498510837555,
0.12254887074232101,
-0.36412692070007324,
0.26401740312576294,
0.47083964943885803,
0.22121846675872803,
0.12371264398097992,
0.6363033056259155,
0.19857066869735718,
-0.16029183566570282,
-0.3000458776950836,
0.07452572882175446,
0.31024831533432007,
-0.10113603621721268,
-0.03733879327774048,
0.17564818263053894,
-0.10271651297807693,
-0.12865199148654938,
-0.07385292649269104,
0.27302286028862,
-0.7321615219116211,
0.008305506780743599,
0.1820908635854721,
0.12161991000175476,
-0.0009523850167170167,
-0.22241157293319702,
-0.08313725143671036,
0.07775600254535675,
-0.21585768461227417,
0.11480947583913803,
-0.1185755655169487,
0.1242491751909256,
-0.3427768647670746,
0.11042282730340958,
-0.04326052963733673,
0.05694468691945076,
0.3175238072872162,
0.12566962838172913,
-0.16883833706378937,
-0.059652335941791534,
0.15125037729740143,
-0.22944819927215576,
0.4016968011856079,
-0.019704069942235947,
-0.2360147088766098,
0.04248479753732681,
0.30694034695625305,
-0.4420321583747864,
-0.2555747926235199,
-0.05922742933034897,
-0.15265685319900513,
-0.14126373827457428,
-0.038635022938251495,
0.03472549840807915,
-0.23729628324508667,
-0.0047178976237773895,
-0.30469030141830444,
0.1028885766863823,
0.3713425397872925,
-0.20585207641124725,
0.0988665372133255,
-0.5015790462493896,
-0.35631152987480164,
-0.20766377449035645,
0.008802609518170357,
0.17747752368450165,
-0.4386502504348755,
-0.24340416491031647,
-0.09803180396556854,
0.1520782858133316,
0.3357076644897461,
0.12456756830215454,
-0.26133859157562256,
0.6007267236709595,
-0.4962503910064697,
0.8756874203681946,
0.2869647443294525,
-0.14862683415412903,
-0.40101176500320435,
0.03295362368226051,
-0.17289458215236664,
0.23207588493824005,
-0.6788748502731323,
-0.10385672003030777,
0.16501544415950775,
-0.07975828647613525,
0.1138157770037651,
0.3388637900352478,
0.15492136776447296,
-0.09533272683620453,
-0.12821991741657257,
0.06443028151988983,
0.326865553855896,
-0.2837589681148529,
0.0703488364815712,
-0.00969521701335907,
0.16244414448738098,
-0.21676354110240936,
0.21740296483039856,
0.034307003021240234,
0.184342160820961,
-0.11258983612060547,
0.455954372882843,
0.17644402384757996,
-0.12051033973693848,
-0.3156251907348633,
-0.18376803398132324,
0.3253220319747925,
-0.02808859758079052,
-0.026879549026489258,
-0.11929571628570557,
-0.08291018009185791,
-0.11312658339738846,
0.056021854281425476,
-0.339925616979599,
-0.2433573305606842,
0.029902435839176178,
0.024314075708389282,
0.2335776686668396,
0.17532978951931,
-0.08356466889381409,
-0.24794498085975647,
-0.050614841282367706,
0.060970887541770935,
-0.05589338019490242,
0.056883715093135834,
0.1251782476902008,
-0.2686156928539276,
-0.31789031624794006,
0.16740421950817108,
0.40873560309410095,
-0.09793664515018463,
-0.18483835458755493,
0.27618691325187683,
0.5985631346702576,
-0.29916536808013916,
-0.3962611258029938,
-0.18160904943943024,
-0.1041160300374031,
0.1290624737739563,
-0.2356889843940735,
0.1717507541179657,
-0.0027848524041473866,
-0.23090091347694397,
-0.025695614516735077,
0.5132237076759338,
0.24769280850887299,
0.31123679876327515,
-0.4027121067047119,
0.2516176402568817,
-0.01230483129620552,
-0.08680570125579834,
-0.14821743965148926,
-0.33737626671791077,
-0.2627914249897003,
0.037331823259592056,
0.3305842876434326,
-0.13446250557899475,
-0.036491744220256805,
0.04074283689260483,
0.3557882606983185,
-0.07353566586971283,
0.325707346200943,
-0.06443041563034058,
-0.19810637831687927,
-0.19067993760108948,
0.2980228066444397,
0.3740845024585724,
0.5166626572608948,
-0.1092328280210495,
-0.057225074619054794,
0.08503854274749756,
-0.045890308916568756,
-0.04900118708610535,
0.01684088259935379,
-0.17222823202610016,
-0.037864360958337784,
0.19884848594665527,
0.048589594662189484,
-0.09989799559116364,
-0.18129202723503113,
0.009795140475034714,
0.056278616189956665,
0.29222795367240906,
-0.23866672813892365,
0.09624195843935013,
-0.5637152791023254,
0.07098790258169174,
-0.28859785199165344,
-0.1303834170103073,
0.007216315716505051,
-0.44396018981933594,
-0.21197178959846497,
0.09415265917778015,
-0.23600523173809052,
0.2182338684797287,
-0.16104929149150848,
-0.1597829908132553,
-0.15046247839927673,
-0.28893664479255676,
0.09865130484104156,
-0.23461343348026276,
-0.22342312335968018,
-0.0864403024315834,
0.12882207334041595,
0.12238137423992157,
0.22562797367572784,
0.3576843738555908,
-0.4277695417404175,
-0.3453753590583801,
-0.2861616909503937,
0.36421072483062744,
-0.16716036200523376,
0.12165587395429611,
0.3645747900009155,
-0.21086330711841583,
-0.07228526473045349,
0.15103338658809662,
0.31954672932624817,
-0.10602527856826782,
-0.1192040964961052,
-0.15033608675003052,
0.27737557888031006,
0.02400069311261177,
-0.028316203504800797,
0.014470204710960388,
-0.1706433892250061,
-0.0576484240591526,
0.37156957387924194,
-0.1595647931098938,
0.08714628219604492,
0.16744211316108704,
0.04409094899892807,
0.23064658045768738,
-0.10440979897975922,
-0.26062706112861633,
-0.4392031729221344,
-0.09853241592645645,
0.16474291682243347,
-0.19629721343517303,
-0.12574008107185364,
-0.03666532039642334,
-0.10954618453979492,
0.1613347977399826,
0.04170382022857666,
-0.23590296506881714,
0.0899796336889267,
-0.004336884245276451,
0.3883190155029297,
-0.20898684859275818,
0.11808407306671143,
0.37520211935043335,
0.16850726306438446,
0.05962496995925903,
-0.1573241949081421,
-0.20618517696857452,
0.1814013421535492,
0.3865942060947418,
0.21564316749572754,
0.18958216905593872,
0.24439680576324463,
0.15978732705116272,
0.850033164024353,
0.319330096244812,
-0.4346616864204407,
0.12059800326824188,
-0.05809423327445984,
-0.06442433595657349,
-0.07623689621686935,
-0.3137795031070709,
-0.06624945253133774,
-0.24335289001464844,
-0.12011294066905975,
-0.12522591650485992,
-0.2128143012523651,
0.12244546413421631,
0.17188696563243866,
0.07384507358074188,
-0.02322227694094181,
-0.4763820171356201,
0.18449820578098297,
-0.25369447469711304,
0.14348547160625458,
0.15853993594646454,
0.37904736399650574,
-0.19344642758369446,
0.31325843930244446,
0.23374055325984955,
-0.09903964400291443,
0.4059719443321228,
0.09168031066656113,
-0.5711541175842285,
-0.20064318180084229,
-0.34278541803359985,
0.44404900074005127,
0.25476062297821045,
0.17552612721920013,
-0.09011698514223099,
-0.08576233685016632,
-0.14311479032039642,
0.18591298162937164,
0.3545985817909241,
-0.44384080171585083,
-0.03123156726360321,
0.3080909848213196,
-0.16998623311519623,
-0.17829053103923798,
-0.085822694003582,
0.20333468914031982,
0.6135451793670654,
0.060685209929943085,
0.5777100324630737,
-0.13267214596271515,
-0.0017200688598677516,
-0.18484032154083252,
0.09971819072961807,
-0.0973081886768341,
-0.1813916563987732,
-0.04163701832294464,
0.04431658983230591,
-0.257154256105423,
0.13071487843990326,
0.1788228154182434,
-0.031146416440606117,
0.25152167677879333,
0.03757307305932045,
-0.11305506527423859,
-0.24862971901893616,
-0.06708429753780365,
0.020453717559576035,
0.2222062349319458,
0.0019846155773848295,
0.15636742115020752,
0.23342156410217285,
-0.033222831785678864,
0.2050066441297531,
0.3170373737812042,
-0.1554170846939087,
0.019160382449626923,
-0.20104798674583435,
0.023792371153831482,
0.3575343191623688,
0.07553467154502869,
-0.05679534375667572,
0.30185386538505554,
-0.013497970998287201,
-0.10008600354194641,
-0.29226070642471313,
0.2588861584663391,
0.1977369636297226,
0.09749899804592133,
-0.13095006346702576,
-0.5797979235649109,
0.06107053533196449,
0.0986432433128357,
-0.17722663283348083,
0.3608708381652832,
0.04270876199007034,
-0.29186302423477173,
0.29059678316116333,
0.17745009064674377,
0.8005257844924927,
0.16540583968162537,
0.014834299683570862,
0.3365233242511749,
0.180822491645813,
0.369922935962677,
0.23551957309246063,
-0.06569360196590424,
-0.34278541803359985,
0.3571140766143799,
-0.18385042250156403,
-0.29293256998062134,
0.002491891384124756,
0.005258984863758087,
-0.19129054248332977,
0.24985666573047638,
-0.013108409941196442,
0.1557762175798416,
-0.182407408952713,
0.14643168449401855,
0.3141552209854126,
-0.21153511106967926,
-0.034584179520606995,
0.15031279623508453,
-0.07391871511936188,
0.2885693609714508,
-0.03575567156076431,
0.13449320197105408,
-0.1474820077419281,
-0.007897693663835526,
-0.24406199157238007,
0.14441326260566711,
-0.5116115212440491,
0.3974112868309021,
0.08362829685211182,
-0.08395231515169144,
0.29561758041381836,
0.08216889202594757,
-0.07009604573249817,
0.16538164019584656,
-0.05454239994287491,
0.12420159578323364,
0.23464107513427734,
0.20128846168518066,
0.12402133643627167,
-0.3333580195903778,
0.26357170939445496,
0.22540849447250366,
-0.10462043434381485,
-0.003839530050754547,
-0.15546728670597076,
-0.22562967240810394,
-0.17735391855239868,
0.21047712862491608,
0.22592024505138397,
-0.35650399327278137,
-0.23085512220859528,
-0.03488767892122269,
0.09603160619735718,
-0.19571059942245483,
0.02037419006228447,
0.12065304815769196,
0.13061852753162384,
0.23726055026054382,
-0.38427743315696716,
-0.15750879049301147,
0.04430614411830902,
0.46375948190689087,
-0.2750534415245056,
0.2132605016231537,
0.42850783467292786,
-0.005432337522506714,
-0.043129097670316696,
-0.12088309228420258,
0.1267634928226471,
0.0437576100230217,
0.2106197476387024,
0.1623663604259491,
-0.31650039553642273,
-0.06293673813343048,
-0.2680119574069977,
0.3825362026691437,
-0.04195999354124069,
-0.20746102929115295,
-0.0652514398097992,
-0.2240743637084961,
-0.46791088581085205,
-0.05444568395614624,
0.24773076176643372,
0.14027415215969086,
0.09236728399991989,
0.5768778324127197,
-0.35869479179382324,
0.18367235362529755,
-0.1821165829896927,
0.09477335214614868,
0.029331641271710396,
0.0852852314710617,
0.0898132473230362,
0.037284694612026215,
-0.022230464965105057,
-0.26654982566833496,
-0.08721087127923965,
0.45016688108444214,
0.009886546991765499,
-0.09261652082204819,
-0.4276532530784607,
0.17318440973758698,
0.5592156052589417,
-0.18240733444690704,
0.07406458258628845,
-0.21702072024345398,
-0.0007080398499965668,
-0.3593151569366455,
-0.025179391726851463,
0.2778584361076355,
0.03072594478726387,
0.2733375132083893,
0.1893637776374817,
0.11630617082118988,
0.004188135266304016,
-0.015500474721193314,
-0.09674584865570068,
-0.06437107920646667,
0.0176320131868124,
0.0547897145152092,
0.03433942422270775,
-0.07344324886798859,
-0.08076473325490952,
0.2219371199607849,
0.29702192544937134,
0.20848289132118225,
0.24013057351112366,
-0.04554034024477005,
-0.22811654210090637,
-0.13362367451190948,
0.35152044892311096,
0.35704055428504944,
-0.20131231844425201,
-0.24378588795661926,
0.5111562013626099,
0.08368027955293655,
-0.09427786618471146,
0.1351260393857956,
0.27597102522850037,
0.03471481427550316,
0.23943015933036804,
0.1732371300458908,
-0.23262850940227509,
0.281165212392807,
-0.46636807918548584,
-0.08754252642393112,
0.2715711295604706,
-0.04677361994981766,
0.04084191471338272,
0.08094300329685211,
-0.1805374026298523,
0.2933402359485626,
0.27704501152038574,
0.13322389125823975,
0.33002305030822754,
0.23037117719650269,
0.09322348982095718,
0.12525342404842377,
0.12603060901165009,
0.09452314674854279,
0.1989387571811676,
-0.46280550956726074,
0.3219623267650604,
0.24264071881771088,
-0.005586951971054077,
0.19447126984596252,
0.15458106994628906,
0.4853109121322632,
-0.5250396728515625,
-0.2774396240711212,
0.23163777589797974,
0.4182755947113037,
-0.20757123827934265,
-0.04142395406961441,
-0.44489017128944397,
0.06417778879404068,
-0.02327709272503853,
-0.019185209646821022,
-0.08467213809490204,
0.004049357026815414,
0.17936667799949646,
-0.14101462066173553,
-0.06083358824253082,
-0.20407839119434357,
-0.46704161167144775,
-0.11982107907533646,
0.30511918663978577,
-0.2399478405714035,
-0.1056109145283699,
-0.10890476405620575,
0.05851910635828972,
-0.21501490473747253,
-0.12643218040466309,
0.2644937038421631,
0.20696739852428436,
-0.3826083540916443,
-0.10495521873235703,
0.012839911505579948,
0.11485438048839569,
-0.12204843759536743,
0.2308775633573532,
-0.2840908169746399,
-0.3314357399940491,
0.3611921966075897,
-0.026852162554860115,
-0.09760954976081848,
-0.1502252221107483,
0.1964082419872284,
0.641011118888855,
0.00015184376388788223,
0.2310478389263153,
-0.025150850415229797,
-0.03459571301937103,
-0.1389734148979187,
0.05277237296104431,
0.07531566172838211,
0.16618970036506653,
0.15701356530189514,
0.1477213352918625,
0.40052279829978943,
0.004388313740491867,
0.050076812505722046,
0.09972867369651794,
0.2572554349899292,
0.3555528521537781,
-0.3640001714229584,
-0.515011727809906,
0.05073210597038269,
-0.5516366958618164,
0.17806710302829742,
-0.2801920771598816,
-0.37626156210899353,
-0.16202875971794128,
-0.08286873251199722,
0.31118276715278625,
0.03223206847906113,
-0.09385420382022858,
0.15670649707317352,
0.11198706179857254,
0.18790365755558014,
0.12259247899055481,
-0.24370063841342926,
-0.4694601893424988,
-0.3019481599330902,
0.3355236351490021,
-0.2901141941547394,
0.26598960161209106,
0.29043933749198914,
-0.016332484781742096,
-0.07166358828544617,
-0.3088708519935608,
-0.06867758929729462,
0.0746302381157875,
0.6968876719474792,
0.31985434889793396,
0.1866273134946823,
-0.09400436282157898,
0.09945815801620483,
-0.023252766579389572,
0.20762383937835693,
-0.2597786784172058,
0.17135590314865112,
-0.48417994379997253,
0.3901791274547577,
0.0003463923931121826,
0.2632504105567932,
-0.6178387999534607,
0.006223740056157112,
0.16857416927814484,
-0.06208442896604538,
-0.5151697397232056,
0.26846614480018616,
-0.17149204015731812,
0.14055563509464264,
-0.1522606760263443,
0.5060007572174072,
-0.16236957907676697,
0.5561704635620117,
-0.242071270942688,
-0.1725638210773468,
0.6069843769073486,
-0.5967271327972412,
-0.28713759779930115,
0.08811946958303452,
-0.02044607698917389,
-0.04781397432088852,
-0.3517236113548279,
-0.40750235319137573,
-0.25453680753707886,
0.31830480694770813,
-0.10058269649744034,
-0.27558934688568115,
-0.12727318704128265,
0.038144879043102264,
0.11818253993988037,
-0.08276401460170746,
0.7448382377624512,
0.08606360107660294,
-0.05790974572300911,
0.3663485646247864,
-0.008757846429944038
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | I figured it out, the problem is deep copy itself uses pickle (unless you implement `__deepcopy__`). So when I changed `__getstate__` it started throwing an error.
I'm sure there's a better way of doing this, but in order to return the `__dict__` without the non-pikelable pre-tokeniser and without modifying self I removed the pre-tokenizers, did a deep copy and then re-generated it.
It does work - although I noticed Hasher doesn't call `__hash__` if the object being hashed implements it which I feel it should? If it did I could return a hash of the tokenizers.json file instead.
```
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
self.backend_tokenizer.pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
out = copy.deepcopy(self.__dict__) #self.__dict__.copy()
self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer()
return out
```
| I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 126 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
I figured it out, the problem is deep copy itself uses pickle (unless you implement `__deepcopy__`). So when I changed `__getstate__` it started throwing an error.
I'm sure there's a better way of doing this, but in order to return the `__dict__` without the non-pikelable pre-tokeniser and without modifying self I removed the pre-tokenizers, did a deep copy and then re-generated it.
It does work - although I noticed Hasher doesn't call `__hash__` if the object being hashed implements it which I feel it should? If it did I could return a hash of the tokenizers.json file instead.
```
def __getstate__(self):
"""
Removes pre_tokenizer since it cannot be pickled
"""
logger.debug("Copy state dict")
self.backend_tokenizer.pre_tokenizer = tokenizers.pre_tokenizers.Sequence([])
out = copy.deepcopy(self.__dict__) #self.__dict__.copy()
self.backend_tokenizer.pre_tokenizer = self._pre_tokenizer()
return out
```
| [
-0.22488799691200256,
0.193120539188385,
0.11275288462638855,
0.028775807470083237,
0.03419550508260727,
-0.3237709403038025,
0.1385369747877121,
0.19508418440818787,
0.3468087613582611,
-0.10001760721206665,
0.19218076765537262,
0.7253849506378174,
-0.19295987486839294,
0.20866982638835907,
-0.0016189413145184517,
0.05957898497581482,
0.07051911950111389,
-0.03540794551372528,
-0.005138233304023743,
-0.06401293724775314,
-0.21730074286460876,
0.050917018204927444,
-0.35797542333602905,
0.15361341834068298,
-0.2765946090221405,
-0.17681460082530975,
0.025939082726836205,
0.11868852376937866,
-0.02998422645032406,
-0.2711367905139923,
0.20454657077789307,
-0.07879386842250824,
-0.027705322951078415,
0.24116593599319458,
-0.00012316941865719855,
-0.08011507987976074,
0.016193069517612457,
-0.08638353645801544,
-0.004161312244832516,
-0.21759943664073944,
-0.22309496998786926,
-0.12397703528404236,
-0.12354431301355362,
-0.229413241147995,
0.07815719395875931,
0.0024630348198115826,
-0.2965724468231201,
-0.38138097524642944,
0.6342021226882935,
0.4318729043006897,
0.11990717053413391,
0.36486873030662537,
-0.06786774843931198,
-0.03467966988682747,
-0.13554903864860535,
0.310019314289093,
0.05284801125526428,
0.2233031839132309,
0.12532666325569153,
-0.3918105661869049,
-0.001214444637298584,
0.09562943875789642,
-0.1981264054775238,
-0.21601030230522156,
0.1527504026889801,
0.05910709500312805,
0.1838107407093048,
0.010621223598718643,
-0.008678030222654343,
0.09299501031637192,
0.2169972062110901,
-0.35737472772598267,
-0.2120286375284195,
-0.3761945962905884,
-0.05751373991370201,
-0.15050138533115387,
0.3402036428451538,
-0.21683865785598755,
0.13164937496185303,
0.1427590698003769,
-0.048483431339263916,
-0.10448621213436127,
0.22394004464149475,
0.351848304271698,
-0.03908133879303932,
0.2571783661842346,
-0.01660948619246483,
0.3984132707118988,
-0.05367935821413994,
-0.10632330179214478,
-0.18072569370269775,
-0.10334409773349762,
0.10165378451347351,
0.45161664485931396,
-0.011211667209863663,
-0.23849061131477356,
0.210550457239151,
-0.2123309075832367,
-0.02430822141468525,
0.21151015162467957,
-0.16386498510837555,
0.12254887074232101,
-0.36412692070007324,
0.26401740312576294,
0.47083964943885803,
0.22121846675872803,
0.12371264398097992,
0.6363033056259155,
0.19857066869735718,
-0.16029183566570282,
-0.3000458776950836,
0.07452572882175446,
0.31024831533432007,
-0.10113603621721268,
-0.03733879327774048,
0.17564818263053894,
-0.10271651297807693,
-0.12865199148654938,
-0.07385292649269104,
0.27302286028862,
-0.7321615219116211,
0.008305506780743599,
0.1820908635854721,
0.12161991000175476,
-0.0009523850167170167,
-0.22241157293319702,
-0.08313725143671036,
0.07775600254535675,
-0.21585768461227417,
0.11480947583913803,
-0.1185755655169487,
0.1242491751909256,
-0.3427768647670746,
0.11042282730340958,
-0.04326052963733673,
0.05694468691945076,
0.3175238072872162,
0.12566962838172913,
-0.16883833706378937,
-0.059652335941791534,
0.15125037729740143,
-0.22944819927215576,
0.4016968011856079,
-0.019704069942235947,
-0.2360147088766098,
0.04248479753732681,
0.30694034695625305,
-0.4420321583747864,
-0.2555747926235199,
-0.05922742933034897,
-0.15265685319900513,
-0.14126373827457428,
-0.038635022938251495,
0.03472549840807915,
-0.23729628324508667,
-0.0047178976237773895,
-0.30469030141830444,
0.1028885766863823,
0.3713425397872925,
-0.20585207641124725,
0.0988665372133255,
-0.5015790462493896,
-0.35631152987480164,
-0.20766377449035645,
0.008802609518170357,
0.17747752368450165,
-0.4386502504348755,
-0.24340416491031647,
-0.09803180396556854,
0.1520782858133316,
0.3357076644897461,
0.12456756830215454,
-0.26133859157562256,
0.6007267236709595,
-0.4962503910064697,
0.8756874203681946,
0.2869647443294525,
-0.14862683415412903,
-0.40101176500320435,
0.03295362368226051,
-0.17289458215236664,
0.23207588493824005,
-0.6788748502731323,
-0.10385672003030777,
0.16501544415950775,
-0.07975828647613525,
0.1138157770037651,
0.3388637900352478,
0.15492136776447296,
-0.09533272683620453,
-0.12821991741657257,
0.06443028151988983,
0.326865553855896,
-0.2837589681148529,
0.0703488364815712,
-0.00969521701335907,
0.16244414448738098,
-0.21676354110240936,
0.21740296483039856,
0.034307003021240234,
0.184342160820961,
-0.11258983612060547,
0.455954372882843,
0.17644402384757996,
-0.12051033973693848,
-0.3156251907348633,
-0.18376803398132324,
0.3253220319747925,
-0.02808859758079052,
-0.026879549026489258,
-0.11929571628570557,
-0.08291018009185791,
-0.11312658339738846,
0.056021854281425476,
-0.339925616979599,
-0.2433573305606842,
0.029902435839176178,
0.024314075708389282,
0.2335776686668396,
0.17532978951931,
-0.08356466889381409,
-0.24794498085975647,
-0.050614841282367706,
0.060970887541770935,
-0.05589338019490242,
0.056883715093135834,
0.1251782476902008,
-0.2686156928539276,
-0.31789031624794006,
0.16740421950817108,
0.40873560309410095,
-0.09793664515018463,
-0.18483835458755493,
0.27618691325187683,
0.5985631346702576,
-0.29916536808013916,
-0.3962611258029938,
-0.18160904943943024,
-0.1041160300374031,
0.1290624737739563,
-0.2356889843940735,
0.1717507541179657,
-0.0027848524041473866,
-0.23090091347694397,
-0.025695614516735077,
0.5132237076759338,
0.24769280850887299,
0.31123679876327515,
-0.4027121067047119,
0.2516176402568817,
-0.01230483129620552,
-0.08680570125579834,
-0.14821743965148926,
-0.33737626671791077,
-0.2627914249897003,
0.037331823259592056,
0.3305842876434326,
-0.13446250557899475,
-0.036491744220256805,
0.04074283689260483,
0.3557882606983185,
-0.07353566586971283,
0.325707346200943,
-0.06443041563034058,
-0.19810637831687927,
-0.19067993760108948,
0.2980228066444397,
0.3740845024585724,
0.5166626572608948,
-0.1092328280210495,
-0.057225074619054794,
0.08503854274749756,
-0.045890308916568756,
-0.04900118708610535,
0.01684088259935379,
-0.17222823202610016,
-0.037864360958337784,
0.19884848594665527,
0.048589594662189484,
-0.09989799559116364,
-0.18129202723503113,
0.009795140475034714,
0.056278616189956665,
0.29222795367240906,
-0.23866672813892365,
0.09624195843935013,
-0.5637152791023254,
0.07098790258169174,
-0.28859785199165344,
-0.1303834170103073,
0.007216315716505051,
-0.44396018981933594,
-0.21197178959846497,
0.09415265917778015,
-0.23600523173809052,
0.2182338684797287,
-0.16104929149150848,
-0.1597829908132553,
-0.15046247839927673,
-0.28893664479255676,
0.09865130484104156,
-0.23461343348026276,
-0.22342312335968018,
-0.0864403024315834,
0.12882207334041595,
0.12238137423992157,
0.22562797367572784,
0.3576843738555908,
-0.4277695417404175,
-0.3453753590583801,
-0.2861616909503937,
0.36421072483062744,
-0.16716036200523376,
0.12165587395429611,
0.3645747900009155,
-0.21086330711841583,
-0.07228526473045349,
0.15103338658809662,
0.31954672932624817,
-0.10602527856826782,
-0.1192040964961052,
-0.15033608675003052,
0.27737557888031006,
0.02400069311261177,
-0.028316203504800797,
0.014470204710960388,
-0.1706433892250061,
-0.0576484240591526,
0.37156957387924194,
-0.1595647931098938,
0.08714628219604492,
0.16744211316108704,
0.04409094899892807,
0.23064658045768738,
-0.10440979897975922,
-0.26062706112861633,
-0.4392031729221344,
-0.09853241592645645,
0.16474291682243347,
-0.19629721343517303,
-0.12574008107185364,
-0.03666532039642334,
-0.10954618453979492,
0.1613347977399826,
0.04170382022857666,
-0.23590296506881714,
0.0899796336889267,
-0.004336884245276451,
0.3883190155029297,
-0.20898684859275818,
0.11808407306671143,
0.37520211935043335,
0.16850726306438446,
0.05962496995925903,
-0.1573241949081421,
-0.20618517696857452,
0.1814013421535492,
0.3865942060947418,
0.21564316749572754,
0.18958216905593872,
0.24439680576324463,
0.15978732705116272,
0.850033164024353,
0.319330096244812,
-0.4346616864204407,
0.12059800326824188,
-0.05809423327445984,
-0.06442433595657349,
-0.07623689621686935,
-0.3137795031070709,
-0.06624945253133774,
-0.24335289001464844,
-0.12011294066905975,
-0.12522591650485992,
-0.2128143012523651,
0.12244546413421631,
0.17188696563243866,
0.07384507358074188,
-0.02322227694094181,
-0.4763820171356201,
0.18449820578098297,
-0.25369447469711304,
0.14348547160625458,
0.15853993594646454,
0.37904736399650574,
-0.19344642758369446,
0.31325843930244446,
0.23374055325984955,
-0.09903964400291443,
0.4059719443321228,
0.09168031066656113,
-0.5711541175842285,
-0.20064318180084229,
-0.34278541803359985,
0.44404900074005127,
0.25476062297821045,
0.17552612721920013,
-0.09011698514223099,
-0.08576233685016632,
-0.14311479032039642,
0.18591298162937164,
0.3545985817909241,
-0.44384080171585083,
-0.03123156726360321,
0.3080909848213196,
-0.16998623311519623,
-0.17829053103923798,
-0.085822694003582,
0.20333468914031982,
0.6135451793670654,
0.060685209929943085,
0.5777100324630737,
-0.13267214596271515,
-0.0017200688598677516,
-0.18484032154083252,
0.09971819072961807,
-0.0973081886768341,
-0.1813916563987732,
-0.04163701832294464,
0.04431658983230591,
-0.257154256105423,
0.13071487843990326,
0.1788228154182434,
-0.031146416440606117,
0.25152167677879333,
0.03757307305932045,
-0.11305506527423859,
-0.24862971901893616,
-0.06708429753780365,
0.020453717559576035,
0.2222062349319458,
0.0019846155773848295,
0.15636742115020752,
0.23342156410217285,
-0.033222831785678864,
0.2050066441297531,
0.3170373737812042,
-0.1554170846939087,
0.019160382449626923,
-0.20104798674583435,
0.023792371153831482,
0.3575343191623688,
0.07553467154502869,
-0.05679534375667572,
0.30185386538505554,
-0.013497970998287201,
-0.10008600354194641,
-0.29226070642471313,
0.2588861584663391,
0.1977369636297226,
0.09749899804592133,
-0.13095006346702576,
-0.5797979235649109,
0.06107053533196449,
0.0986432433128357,
-0.17722663283348083,
0.3608708381652832,
0.04270876199007034,
-0.29186302423477173,
0.29059678316116333,
0.17745009064674377,
0.8005257844924927,
0.16540583968162537,
0.014834299683570862,
0.3365233242511749,
0.180822491645813,
0.369922935962677,
0.23551957309246063,
-0.06569360196590424,
-0.34278541803359985,
0.3571140766143799,
-0.18385042250156403,
-0.29293256998062134,
0.002491891384124756,
0.005258984863758087,
-0.19129054248332977,
0.24985666573047638,
-0.013108409941196442,
0.1557762175798416,
-0.182407408952713,
0.14643168449401855,
0.3141552209854126,
-0.21153511106967926,
-0.034584179520606995,
0.15031279623508453,
-0.07391871511936188,
0.2885693609714508,
-0.03575567156076431,
0.13449320197105408,
-0.1474820077419281,
-0.007897693663835526,
-0.24406199157238007,
0.14441326260566711,
-0.5116115212440491,
0.3974112868309021,
0.08362829685211182,
-0.08395231515169144,
0.29561758041381836,
0.08216889202594757,
-0.07009604573249817,
0.16538164019584656,
-0.05454239994287491,
0.12420159578323364,
0.23464107513427734,
0.20128846168518066,
0.12402133643627167,
-0.3333580195903778,
0.26357170939445496,
0.22540849447250366,
-0.10462043434381485,
-0.003839530050754547,
-0.15546728670597076,
-0.22562967240810394,
-0.17735391855239868,
0.21047712862491608,
0.22592024505138397,
-0.35650399327278137,
-0.23085512220859528,
-0.03488767892122269,
0.09603160619735718,
-0.19571059942245483,
0.02037419006228447,
0.12065304815769196,
0.13061852753162384,
0.23726055026054382,
-0.38427743315696716,
-0.15750879049301147,
0.04430614411830902,
0.46375948190689087,
-0.2750534415245056,
0.2132605016231537,
0.42850783467292786,
-0.005432337522506714,
-0.043129097670316696,
-0.12088309228420258,
0.1267634928226471,
0.0437576100230217,
0.2106197476387024,
0.1623663604259491,
-0.31650039553642273,
-0.06293673813343048,
-0.2680119574069977,
0.3825362026691437,
-0.04195999354124069,
-0.20746102929115295,
-0.0652514398097992,
-0.2240743637084961,
-0.46791088581085205,
-0.05444568395614624,
0.24773076176643372,
0.14027415215969086,
0.09236728399991989,
0.5768778324127197,
-0.35869479179382324,
0.18367235362529755,
-0.1821165829896927,
0.09477335214614868,
0.029331641271710396,
0.0852852314710617,
0.0898132473230362,
0.037284694612026215,
-0.022230464965105057,
-0.26654982566833496,
-0.08721087127923965,
0.45016688108444214,
0.009886546991765499,
-0.09261652082204819,
-0.4276532530784607,
0.17318440973758698,
0.5592156052589417,
-0.18240733444690704,
0.07406458258628845,
-0.21702072024345398,
-0.0007080398499965668,
-0.3593151569366455,
-0.025179391726851463,
0.2778584361076355,
0.03072594478726387,
0.2733375132083893,
0.1893637776374817,
0.11630617082118988,
0.004188135266304016,
-0.015500474721193314,
-0.09674584865570068,
-0.06437107920646667,
0.0176320131868124,
0.0547897145152092,
0.03433942422270775,
-0.07344324886798859,
-0.08076473325490952,
0.2219371199607849,
0.29702192544937134,
0.20848289132118225,
0.24013057351112366,
-0.04554034024477005,
-0.22811654210090637,
-0.13362367451190948,
0.35152044892311096,
0.35704055428504944,
-0.20131231844425201,
-0.24378588795661926,
0.5111562013626099,
0.08368027955293655,
-0.09427786618471146,
0.1351260393857956,
0.27597102522850037,
0.03471481427550316,
0.23943015933036804,
0.1732371300458908,
-0.23262850940227509,
0.281165212392807,
-0.46636807918548584,
-0.08754252642393112,
0.2715711295604706,
-0.04677361994981766,
0.04084191471338272,
0.08094300329685211,
-0.1805374026298523,
0.2933402359485626,
0.27704501152038574,
0.13322389125823975,
0.33002305030822754,
0.23037117719650269,
0.09322348982095718,
0.12525342404842377,
0.12603060901165009,
0.09452314674854279,
0.1989387571811676,
-0.46280550956726074,
0.3219623267650604,
0.24264071881771088,
-0.005586951971054077,
0.19447126984596252,
0.15458106994628906,
0.4853109121322632,
-0.5250396728515625,
-0.2774396240711212,
0.23163777589797974,
0.4182755947113037,
-0.20757123827934265,
-0.04142395406961441,
-0.44489017128944397,
0.06417778879404068,
-0.02327709272503853,
-0.019185209646821022,
-0.08467213809490204,
0.004049357026815414,
0.17936667799949646,
-0.14101462066173553,
-0.06083358824253082,
-0.20407839119434357,
-0.46704161167144775,
-0.11982107907533646,
0.30511918663978577,
-0.2399478405714035,
-0.1056109145283699,
-0.10890476405620575,
0.05851910635828972,
-0.21501490473747253,
-0.12643218040466309,
0.2644937038421631,
0.20696739852428436,
-0.3826083540916443,
-0.10495521873235703,
0.012839911505579948,
0.11485438048839569,
-0.12204843759536743,
0.2308775633573532,
-0.2840908169746399,
-0.3314357399940491,
0.3611921966075897,
-0.026852162554860115,
-0.09760954976081848,
-0.1502252221107483,
0.1964082419872284,
0.641011118888855,
0.00015184376388788223,
0.2310478389263153,
-0.025150850415229797,
-0.03459571301937103,
-0.1389734148979187,
0.05277237296104431,
0.07531566172838211,
0.16618970036506653,
0.15701356530189514,
0.1477213352918625,
0.40052279829978943,
0.004388313740491867,
0.050076812505722046,
0.09972867369651794,
0.2572554349899292,
0.3555528521537781,
-0.3640001714229584,
-0.515011727809906,
0.05073210597038269,
-0.5516366958618164,
0.17806710302829742,
-0.2801920771598816,
-0.37626156210899353,
-0.16202875971794128,
-0.08286873251199722,
0.31118276715278625,
0.03223206847906113,
-0.09385420382022858,
0.15670649707317352,
0.11198706179857254,
0.18790365755558014,
0.12259247899055481,
-0.24370063841342926,
-0.4694601893424988,
-0.3019481599330902,
0.3355236351490021,
-0.2901141941547394,
0.26598960161209106,
0.29043933749198914,
-0.016332484781742096,
-0.07166358828544617,
-0.3088708519935608,
-0.06867758929729462,
0.0746302381157875,
0.6968876719474792,
0.31985434889793396,
0.1866273134946823,
-0.09400436282157898,
0.09945815801620483,
-0.023252766579389572,
0.20762383937835693,
-0.2597786784172058,
0.17135590314865112,
-0.48417994379997253,
0.3901791274547577,
0.0003463923931121826,
0.2632504105567932,
-0.6178387999534607,
0.006223740056157112,
0.16857416927814484,
-0.06208442896604538,
-0.5151697397232056,
0.26846614480018616,
-0.17149204015731812,
0.14055563509464264,
-0.1522606760263443,
0.5060007572174072,
-0.16236957907676697,
0.5561704635620117,
-0.242071270942688,
-0.1725638210773468,
0.6069843769073486,
-0.5967271327972412,
-0.28713759779930115,
0.08811946958303452,
-0.02044607698917389,
-0.04781397432088852,
-0.3517236113548279,
-0.40750235319137573,
-0.25453680753707886,
0.31830480694770813,
-0.10058269649744034,
-0.27558934688568115,
-0.12727318704128265,
0.038144879043102264,
0.11818253993988037,
-0.08276401460170746,
0.7448382377624512,
0.08606360107660294,
-0.05790974572300911,
0.3663485646247864,
-0.008757846429944038
] |
https://github.com/huggingface/datasets/issues/2516 | datasets.map pickle issue resulting in invalid mapping function | I'm glad you figured something out :)
Regarding hashing: we're not using hashing for the same purpose as the python `__hash__` purpose (which is in general for dictionary lookups). For example it is allowed for python hashing to not return the same hash across sessions, while our hashing must return the same hashes across sessions for the caching to work properly. | I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
| 61 | datasets.map pickle issue resulting in invalid mapping function
I trained my own tokenizer, and I needed to use a python custom class. Because of this I have to detach the custom step before saving and reattach after restore. I did this using the standard pickle `__get_state__` / `__set_state__` mechanism. I think it's correct but it fails when I use it inside a function which is mapped to a dataset, i.e. in the manner of run_mlm.py and other huggingface scripts.
The following reproduces the issue - most likely I'm missing something
A simulated tokeniser which can be pickled
```
class CustomTokenizer:
def __init__(self):
self.state = "init"
def __getstate__(self):
print("__getstate__ called")
out = self.__dict__.copy()
self.state = "pickled"
return out
def __setstate__(self, d):
print("__setstate__ called")
self.__dict__ = d
self.state = "restored"
tokenizer = CustomTokenizer()
```
Test that it actually works - prints "__getstate__ called" and "__setstate__ called"
```
import pickle
serialized = pickle.dumps(tokenizer)
restored = pickle.loads(serialized)
assert restored.state == "restored"
```
Simulate a function that tokenises examples, when dataset.map is called, this function
```
def tokenize_function(examples):
assert tokenizer.state == "restored" # this shouldn't fail but it does
output = tokenizer(examples) # this will fail as tokenizer isn't really a tokenizer
return output
```
Use map to simulate tokenization
```
import glob
from datasets import load_dataset
assert tokenizer.state == "restored"
train_files = glob.glob('train*.csv')
validation_files = glob.glob('validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
)
```
What's happening is I can see that __getstate__ is called but not __setstate__, so the state of `tokenize_function` is invalid at the point that it's actually executed. This doesn't matter as far as I can see for the standard tokenizers as they don't use __getstate__ / __setstate__. I'm not sure if there's another hook I'm supposed to implement as well?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-a2aef4f74aaa> in <module>
8 tokenized_datasets = datasets.map(
9 tokenize_function,
---> 10 batched=True,
11 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, desc)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
487 desc=desc,
488 )
--> 489 for k, dataset in self.items()
490 }
491 )
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
1633 fn_kwargs=fn_kwargs,
1634 new_fingerprint=new_fingerprint,
-> 1635 desc=desc,
1636 )
1637 else:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
184 }
185 # apply actual function
--> 186 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
187 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
188 # re-apply format to the output
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
395 # Call actual function
396
--> 397 out = func(self, *args, **kwargs)
398
399 # Update fingerprint of in-place transforms + update in-place history of transforms
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in _map_single(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, new_fingerprint, rank, offset, desc)
1961 indices,
1962 check_same_num_examples=len(input_dataset.list_indexes()) > 0,
-> 1963 offset=offset,
1964 )
1965 except NumExamplesMismatch:
~/.pyenv/versions/3.7.6/envs/xxx/lib/python3.7/site-packages/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset)
1853 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset
1854 processed_inputs = (
-> 1855 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
1856 )
1857 if update_data is None:
<ipython-input-21-8ee4a8ba5b1b> in tokenize_function(examples)
1 def tokenize_function(examples):
----> 2 assert tokenizer.state == "restored"
3 tokenizer(examples)
4 return examples
I'm glad you figured something out :)
Regarding hashing: we're not using hashing for the same purpose as the python `__hash__` purpose (which is in general for dictionary lookups). For example it is allowed for python hashing to not return the same hash across sessions, while our hashing must return the same hashes across sessions for the caching to work properly. | [
-0.22488799691200256,
0.193120539188385,
0.11275288462638855,
0.028775807470083237,
0.03419550508260727,
-0.3237709403038025,
0.1385369747877121,
0.19508418440818787,
0.3468087613582611,
-0.10001760721206665,
0.19218076765537262,
0.7253849506378174,
-0.19295987486839294,
0.20866982638835907,
-0.0016189413145184517,
0.05957898497581482,
0.07051911950111389,
-0.03540794551372528,
-0.005138233304023743,
-0.06401293724775314,
-0.21730074286460876,
0.050917018204927444,
-0.35797542333602905,
0.15361341834068298,
-0.2765946090221405,
-0.17681460082530975,
0.025939082726836205,
0.11868852376937866,
-0.02998422645032406,
-0.2711367905139923,
0.20454657077789307,
-0.07879386842250824,
-0.027705322951078415,
0.24116593599319458,
-0.00012316941865719855,
-0.08011507987976074,
0.016193069517612457,
-0.08638353645801544,
-0.004161312244832516,
-0.21759943664073944,
-0.22309496998786926,
-0.12397703528404236,
-0.12354431301355362,
-0.229413241147995,
0.07815719395875931,
0.0024630348198115826,
-0.2965724468231201,
-0.38138097524642944,
0.6342021226882935,
0.4318729043006897,
0.11990717053413391,
0.36486873030662537,
-0.06786774843931198,
-0.03467966988682747,
-0.13554903864860535,
0.310019314289093,
0.05284801125526428,
0.2233031839132309,
0.12532666325569153,
-0.3918105661869049,
-0.001214444637298584,
0.09562943875789642,
-0.1981264054775238,
-0.21601030230522156,
0.1527504026889801,
0.05910709500312805,
0.1838107407093048,
0.010621223598718643,
-0.008678030222654343,
0.09299501031637192,
0.2169972062110901,
-0.35737472772598267,
-0.2120286375284195,
-0.3761945962905884,
-0.05751373991370201,
-0.15050138533115387,
0.3402036428451538,
-0.21683865785598755,
0.13164937496185303,
0.1427590698003769,
-0.048483431339263916,
-0.10448621213436127,
0.22394004464149475,
0.351848304271698,
-0.03908133879303932,
0.2571783661842346,
-0.01660948619246483,
0.3984132707118988,
-0.05367935821413994,
-0.10632330179214478,
-0.18072569370269775,
-0.10334409773349762,
0.10165378451347351,
0.45161664485931396,
-0.011211667209863663,
-0.23849061131477356,
0.210550457239151,
-0.2123309075832367,
-0.02430822141468525,
0.21151015162467957,
-0.16386498510837555,
0.12254887074232101,
-0.36412692070007324,
0.26401740312576294,
0.47083964943885803,
0.22121846675872803,
0.12371264398097992,
0.6363033056259155,
0.19857066869735718,
-0.16029183566570282,
-0.3000458776950836,
0.07452572882175446,
0.31024831533432007,
-0.10113603621721268,
-0.03733879327774048,
0.17564818263053894,
-0.10271651297807693,
-0.12865199148654938,
-0.07385292649269104,
0.27302286028862,
-0.7321615219116211,
0.008305506780743599,
0.1820908635854721,
0.12161991000175476,
-0.0009523850167170167,
-0.22241157293319702,
-0.08313725143671036,
0.07775600254535675,
-0.21585768461227417,
0.11480947583913803,
-0.1185755655169487,
0.1242491751909256,
-0.3427768647670746,
0.11042282730340958,
-0.04326052963733673,
0.05694468691945076,
0.3175238072872162,
0.12566962838172913,
-0.16883833706378937,
-0.059652335941791534,
0.15125037729740143,
-0.22944819927215576,
0.4016968011856079,
-0.019704069942235947,
-0.2360147088766098,
0.04248479753732681,
0.30694034695625305,
-0.4420321583747864,
-0.2555747926235199,
-0.05922742933034897,
-0.15265685319900513,
-0.14126373827457428,
-0.038635022938251495,
0.03472549840807915,
-0.23729628324508667,
-0.0047178976237773895,
-0.30469030141830444,
0.1028885766863823,
0.3713425397872925,
-0.20585207641124725,
0.0988665372133255,
-0.5015790462493896,
-0.35631152987480164,
-0.20766377449035645,
0.008802609518170357,
0.17747752368450165,
-0.4386502504348755,
-0.24340416491031647,
-0.09803180396556854,
0.1520782858133316,
0.3357076644897461,
0.12456756830215454,
-0.26133859157562256,
0.6007267236709595,
-0.4962503910064697,
0.8756874203681946,
0.2869647443294525,
-0.14862683415412903,
-0.40101176500320435,
0.03295362368226051,
-0.17289458215236664,
0.23207588493824005,
-0.6788748502731323,
-0.10385672003030777,
0.16501544415950775,
-0.07975828647613525,
0.1138157770037651,
0.3388637900352478,
0.15492136776447296,
-0.09533272683620453,
-0.12821991741657257,
0.06443028151988983,
0.326865553855896,
-0.2837589681148529,
0.0703488364815712,
-0.00969521701335907,
0.16244414448738098,
-0.21676354110240936,
0.21740296483039856,
0.034307003021240234,
0.184342160820961,
-0.11258983612060547,
0.455954372882843,
0.17644402384757996,
-0.12051033973693848,
-0.3156251907348633,
-0.18376803398132324,
0.3253220319747925,
-0.02808859758079052,
-0.026879549026489258,
-0.11929571628570557,
-0.08291018009185791,
-0.11312658339738846,
0.056021854281425476,
-0.339925616979599,
-0.2433573305606842,
0.029902435839176178,
0.024314075708389282,
0.2335776686668396,
0.17532978951931,
-0.08356466889381409,
-0.24794498085975647,
-0.050614841282367706,
0.060970887541770935,
-0.05589338019490242,
0.056883715093135834,
0.1251782476902008,
-0.2686156928539276,
-0.31789031624794006,
0.16740421950817108,
0.40873560309410095,
-0.09793664515018463,
-0.18483835458755493,
0.27618691325187683,
0.5985631346702576,
-0.29916536808013916,
-0.3962611258029938,
-0.18160904943943024,
-0.1041160300374031,
0.1290624737739563,
-0.2356889843940735,
0.1717507541179657,
-0.0027848524041473866,
-0.23090091347694397,
-0.025695614516735077,
0.5132237076759338,
0.24769280850887299,
0.31123679876327515,
-0.4027121067047119,
0.2516176402568817,
-0.01230483129620552,
-0.08680570125579834,
-0.14821743965148926,
-0.33737626671791077,
-0.2627914249897003,
0.037331823259592056,
0.3305842876434326,
-0.13446250557899475,
-0.036491744220256805,
0.04074283689260483,
0.3557882606983185,
-0.07353566586971283,
0.325707346200943,
-0.06443041563034058,
-0.19810637831687927,
-0.19067993760108948,
0.2980228066444397,
0.3740845024585724,
0.5166626572608948,
-0.1092328280210495,
-0.057225074619054794,
0.08503854274749756,
-0.045890308916568756,
-0.04900118708610535,
0.01684088259935379,
-0.17222823202610016,
-0.037864360958337784,
0.19884848594665527,
0.048589594662189484,
-0.09989799559116364,
-0.18129202723503113,
0.009795140475034714,
0.056278616189956665,
0.29222795367240906,
-0.23866672813892365,
0.09624195843935013,
-0.5637152791023254,
0.07098790258169174,
-0.28859785199165344,
-0.1303834170103073,
0.007216315716505051,
-0.44396018981933594,
-0.21197178959846497,
0.09415265917778015,
-0.23600523173809052,
0.2182338684797287,
-0.16104929149150848,
-0.1597829908132553,
-0.15046247839927673,
-0.28893664479255676,
0.09865130484104156,
-0.23461343348026276,
-0.22342312335968018,
-0.0864403024315834,
0.12882207334041595,
0.12238137423992157,
0.22562797367572784,
0.3576843738555908,
-0.4277695417404175,
-0.3453753590583801,
-0.2861616909503937,
0.36421072483062744,
-0.16716036200523376,
0.12165587395429611,
0.3645747900009155,
-0.21086330711841583,
-0.07228526473045349,
0.15103338658809662,
0.31954672932624817,
-0.10602527856826782,
-0.1192040964961052,
-0.15033608675003052,
0.27737557888031006,
0.02400069311261177,
-0.028316203504800797,
0.014470204710960388,
-0.1706433892250061,
-0.0576484240591526,
0.37156957387924194,
-0.1595647931098938,
0.08714628219604492,
0.16744211316108704,
0.04409094899892807,
0.23064658045768738,
-0.10440979897975922,
-0.26062706112861633,
-0.4392031729221344,
-0.09853241592645645,
0.16474291682243347,
-0.19629721343517303,
-0.12574008107185364,
-0.03666532039642334,
-0.10954618453979492,
0.1613347977399826,
0.04170382022857666,
-0.23590296506881714,
0.0899796336889267,
-0.004336884245276451,
0.3883190155029297,
-0.20898684859275818,
0.11808407306671143,
0.37520211935043335,
0.16850726306438446,
0.05962496995925903,
-0.1573241949081421,
-0.20618517696857452,
0.1814013421535492,
0.3865942060947418,
0.21564316749572754,
0.18958216905593872,
0.24439680576324463,
0.15978732705116272,
0.850033164024353,
0.319330096244812,
-0.4346616864204407,
0.12059800326824188,
-0.05809423327445984,
-0.06442433595657349,
-0.07623689621686935,
-0.3137795031070709,
-0.06624945253133774,
-0.24335289001464844,
-0.12011294066905975,
-0.12522591650485992,
-0.2128143012523651,
0.12244546413421631,
0.17188696563243866,
0.07384507358074188,
-0.02322227694094181,
-0.4763820171356201,
0.18449820578098297,
-0.25369447469711304,
0.14348547160625458,
0.15853993594646454,
0.37904736399650574,
-0.19344642758369446,
0.31325843930244446,
0.23374055325984955,
-0.09903964400291443,
0.4059719443321228,
0.09168031066656113,
-0.5711541175842285,
-0.20064318180084229,
-0.34278541803359985,
0.44404900074005127,
0.25476062297821045,
0.17552612721920013,
-0.09011698514223099,
-0.08576233685016632,
-0.14311479032039642,
0.18591298162937164,
0.3545985817909241,
-0.44384080171585083,
-0.03123156726360321,
0.3080909848213196,
-0.16998623311519623,
-0.17829053103923798,
-0.085822694003582,
0.20333468914031982,
0.6135451793670654,
0.060685209929943085,
0.5777100324630737,
-0.13267214596271515,
-0.0017200688598677516,
-0.18484032154083252,
0.09971819072961807,
-0.0973081886768341,
-0.1813916563987732,
-0.04163701832294464,
0.04431658983230591,
-0.257154256105423,
0.13071487843990326,
0.1788228154182434,
-0.031146416440606117,
0.25152167677879333,
0.03757307305932045,
-0.11305506527423859,
-0.24862971901893616,
-0.06708429753780365,
0.020453717559576035,
0.2222062349319458,
0.0019846155773848295,
0.15636742115020752,
0.23342156410217285,
-0.033222831785678864,
0.2050066441297531,
0.3170373737812042,
-0.1554170846939087,
0.019160382449626923,
-0.20104798674583435,
0.023792371153831482,
0.3575343191623688,
0.07553467154502869,
-0.05679534375667572,
0.30185386538505554,
-0.013497970998287201,
-0.10008600354194641,
-0.29226070642471313,
0.2588861584663391,
0.1977369636297226,
0.09749899804592133,
-0.13095006346702576,
-0.5797979235649109,
0.06107053533196449,
0.0986432433128357,
-0.17722663283348083,
0.3608708381652832,
0.04270876199007034,
-0.29186302423477173,
0.29059678316116333,
0.17745009064674377,
0.8005257844924927,
0.16540583968162537,
0.014834299683570862,
0.3365233242511749,
0.180822491645813,
0.369922935962677,
0.23551957309246063,
-0.06569360196590424,
-0.34278541803359985,
0.3571140766143799,
-0.18385042250156403,
-0.29293256998062134,
0.002491891384124756,
0.005258984863758087,
-0.19129054248332977,
0.24985666573047638,
-0.013108409941196442,
0.1557762175798416,
-0.182407408952713,
0.14643168449401855,
0.3141552209854126,
-0.21153511106967926,
-0.034584179520606995,
0.15031279623508453,
-0.07391871511936188,
0.2885693609714508,
-0.03575567156076431,
0.13449320197105408,
-0.1474820077419281,
-0.007897693663835526,
-0.24406199157238007,
0.14441326260566711,
-0.5116115212440491,
0.3974112868309021,
0.08362829685211182,
-0.08395231515169144,
0.29561758041381836,
0.08216889202594757,
-0.07009604573249817,
0.16538164019584656,
-0.05454239994287491,
0.12420159578323364,
0.23464107513427734,
0.20128846168518066,
0.12402133643627167,
-0.3333580195903778,
0.26357170939445496,
0.22540849447250366,
-0.10462043434381485,
-0.003839530050754547,
-0.15546728670597076,
-0.22562967240810394,
-0.17735391855239868,
0.21047712862491608,
0.22592024505138397,
-0.35650399327278137,
-0.23085512220859528,
-0.03488767892122269,
0.09603160619735718,
-0.19571059942245483,
0.02037419006228447,
0.12065304815769196,
0.13061852753162384,
0.23726055026054382,
-0.38427743315696716,
-0.15750879049301147,
0.04430614411830902,
0.46375948190689087,
-0.2750534415245056,
0.2132605016231537,
0.42850783467292786,
-0.005432337522506714,
-0.043129097670316696,
-0.12088309228420258,
0.1267634928226471,
0.0437576100230217,
0.2106197476387024,
0.1623663604259491,
-0.31650039553642273,
-0.06293673813343048,
-0.2680119574069977,
0.3825362026691437,
-0.04195999354124069,
-0.20746102929115295,
-0.0652514398097992,
-0.2240743637084961,
-0.46791088581085205,
-0.05444568395614624,
0.24773076176643372,
0.14027415215969086,
0.09236728399991989,
0.5768778324127197,
-0.35869479179382324,
0.18367235362529755,
-0.1821165829896927,
0.09477335214614868,
0.029331641271710396,
0.0852852314710617,
0.0898132473230362,
0.037284694612026215,
-0.022230464965105057,
-0.26654982566833496,
-0.08721087127923965,
0.45016688108444214,
0.009886546991765499,
-0.09261652082204819,
-0.4276532530784607,
0.17318440973758698,
0.5592156052589417,
-0.18240733444690704,
0.07406458258628845,
-0.21702072024345398,
-0.0007080398499965668,
-0.3593151569366455,
-0.025179391726851463,
0.2778584361076355,
0.03072594478726387,
0.2733375132083893,
0.1893637776374817,
0.11630617082118988,
0.004188135266304016,
-0.015500474721193314,
-0.09674584865570068,
-0.06437107920646667,
0.0176320131868124,
0.0547897145152092,
0.03433942422270775,
-0.07344324886798859,
-0.08076473325490952,
0.2219371199607849,
0.29702192544937134,
0.20848289132118225,
0.24013057351112366,
-0.04554034024477005,
-0.22811654210090637,
-0.13362367451190948,
0.35152044892311096,
0.35704055428504944,
-0.20131231844425201,
-0.24378588795661926,
0.5111562013626099,
0.08368027955293655,
-0.09427786618471146,
0.1351260393857956,
0.27597102522850037,
0.03471481427550316,
0.23943015933036804,
0.1732371300458908,
-0.23262850940227509,
0.281165212392807,
-0.46636807918548584,
-0.08754252642393112,
0.2715711295604706,
-0.04677361994981766,
0.04084191471338272,
0.08094300329685211,
-0.1805374026298523,
0.2933402359485626,
0.27704501152038574,
0.13322389125823975,
0.33002305030822754,
0.23037117719650269,
0.09322348982095718,
0.12525342404842377,
0.12603060901165009,
0.09452314674854279,
0.1989387571811676,
-0.46280550956726074,
0.3219623267650604,
0.24264071881771088,
-0.005586951971054077,
0.19447126984596252,
0.15458106994628906,
0.4853109121322632,
-0.5250396728515625,
-0.2774396240711212,
0.23163777589797974,
0.4182755947113037,
-0.20757123827934265,
-0.04142395406961441,
-0.44489017128944397,
0.06417778879404068,
-0.02327709272503853,
-0.019185209646821022,
-0.08467213809490204,
0.004049357026815414,
0.17936667799949646,
-0.14101462066173553,
-0.06083358824253082,
-0.20407839119434357,
-0.46704161167144775,
-0.11982107907533646,
0.30511918663978577,
-0.2399478405714035,
-0.1056109145283699,
-0.10890476405620575,
0.05851910635828972,
-0.21501490473747253,
-0.12643218040466309,
0.2644937038421631,
0.20696739852428436,
-0.3826083540916443,
-0.10495521873235703,
0.012839911505579948,
0.11485438048839569,
-0.12204843759536743,
0.2308775633573532,
-0.2840908169746399,
-0.3314357399940491,
0.3611921966075897,
-0.026852162554860115,
-0.09760954976081848,
-0.1502252221107483,
0.1964082419872284,
0.641011118888855,
0.00015184376388788223,
0.2310478389263153,
-0.025150850415229797,
-0.03459571301937103,
-0.1389734148979187,
0.05277237296104431,
0.07531566172838211,
0.16618970036506653,
0.15701356530189514,
0.1477213352918625,
0.40052279829978943,
0.004388313740491867,
0.050076812505722046,
0.09972867369651794,
0.2572554349899292,
0.3555528521537781,
-0.3640001714229584,
-0.515011727809906,
0.05073210597038269,
-0.5516366958618164,
0.17806710302829742,
-0.2801920771598816,
-0.37626156210899353,
-0.16202875971794128,
-0.08286873251199722,
0.31118276715278625,
0.03223206847906113,
-0.09385420382022858,
0.15670649707317352,
0.11198706179857254,
0.18790365755558014,
0.12259247899055481,
-0.24370063841342926,
-0.4694601893424988,
-0.3019481599330902,
0.3355236351490021,
-0.2901141941547394,
0.26598960161209106,
0.29043933749198914,
-0.016332484781742096,
-0.07166358828544617,
-0.3088708519935608,
-0.06867758929729462,
0.0746302381157875,
0.6968876719474792,
0.31985434889793396,
0.1866273134946823,
-0.09400436282157898,
0.09945815801620483,
-0.023252766579389572,
0.20762383937835693,
-0.2597786784172058,
0.17135590314865112,
-0.48417994379997253,
0.3901791274547577,
0.0003463923931121826,
0.2632504105567932,
-0.6178387999534607,
0.006223740056157112,
0.16857416927814484,
-0.06208442896604538,
-0.5151697397232056,
0.26846614480018616,
-0.17149204015731812,
0.14055563509464264,
-0.1522606760263443,
0.5060007572174072,
-0.16236957907676697,
0.5561704635620117,
-0.242071270942688,
-0.1725638210773468,
0.6069843769073486,
-0.5967271327972412,
-0.28713759779930115,
0.08811946958303452,
-0.02044607698917389,
-0.04781397432088852,
-0.3517236113548279,
-0.40750235319137573,
-0.25453680753707886,
0.31830480694770813,
-0.10058269649744034,
-0.27558934688568115,
-0.12727318704128265,
0.038144879043102264,
0.11818253993988037,
-0.08276401460170746,
0.7448382377624512,
0.08606360107660294,
-0.05790974572300911,
0.3663485646247864,
-0.008757846429944038
] |
https://github.com/huggingface/datasets/issues/2514 | Can datasets remove duplicated rows? | Hi ! For now this is probably the best option.
We might add a feature like this in the feature as well.
Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ?
Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases | **Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no | 63 | Can datasets remove duplicated rows?
**Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no
Hi ! For now this is probably the best option.
We might add a feature like this in the feature as well.
Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ?
Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases | [
0.14068499207496643,
-0.16548272967338562,
-0.1650884747505188,
0.1540050208568573,
0.04894326999783516,
0.2394903302192688,
0.27690866589546204,
0.06343910098075867,
-0.3376511037349701,
0.019204318523406982,
-0.034110814332962036,
0.23469819128513336,
0.1190902441740036,
0.2062147557735443,
-0.08168399333953857,
0.0102529376745224,
0.09784127026796341,
0.17271873354911804,
-0.08509716391563416,
0.035690948367118835,
-0.07406999170780182,
-0.24486620724201202,
-0.23722374439239502,
-0.1401376575231552,
-0.4883834719657898,
-0.07013201713562012,
-0.3793194890022278,
-0.05238465964794159,
-0.1877826303243637,
-0.05633240565657616,
0.1769874095916748,
0.525762140750885,
-0.015922855585813522,
0.3108597993850708,
-0.00010153792391065508,
-0.35723161697387695,
0.022831276059150696,
0.1596539467573166,
-0.31861642003059387,
0.16422422230243683,
-0.3713808059692383,
-0.07322610914707184,
0.04189494252204895,
-0.025724396109580994,
0.025640759617090225,
-0.28024807572364807,
-0.26487982273101807,
-0.22341357171535492,
0.15878497064113617,
0.09408938884735107,
0.28886398673057556,
-0.02775830402970314,
-0.24817335605621338,
-0.016167283058166504,
0.029732152819633484,
0.4935173988342285,
-0.14040513336658478,
0.2517947554588318,
0.45259663462638855,
-0.09404969960451126,
0.15952089428901672,
0.10836078226566315,
-0.02248452603816986,
0.23510396480560303,
0.16762244701385498,
-0.17023105919361115,
-0.2057344615459442,
-0.19091518223285675,
0.2019752860069275,
0.30559271574020386,
0.7380334734916687,
-0.41147929430007935,
-0.3087227940559387,
-0.24452251195907593,
0.4246821403503418,
-0.012591952458024025,
-0.08077805489301682,
0.0383971706032753,
-0.018862996250391006,
0.09675199538469315,
-0.35414057970046997,
-0.540553092956543,
-0.10781566798686981,
-0.2075585275888443,
-0.0283794067800045,
-0.5066338777542114,
0.07460863143205643,
-0.11458814889192581,
0.07823609560728073,
-0.025960147380828857,
0.4261384904384613,
-0.1496894657611847,
0.20137986540794373,
0.394400954246521,
-0.3874809741973877,
-0.31271812319755554,
-0.1966111660003662,
-0.08395645767450333,
0.282672256231308,
0.1205257773399353,
0.3587389588356018,
-0.03939454257488251,
-0.10546685755252838,
0.2516821324825287,
0.31066179275512695,
0.0013533476740121841,
-0.1374458372592926,
0.036505501717329025,
0.052742477506399155,
-0.20879222452640533,
-0.2718614339828491,
-0.10243570059537888,
0.015587425790727139,
0.2337317317724228,
0.3121545910835266,
-0.07341144233942032,
0.21978512406349182,
-0.31457939743995667,
-0.3696143627166748,
0.03950292617082596,
-0.25820204615592957,
-0.13382862508296967,
-0.15591800212860107,
-0.11586923152208328,
0.10433544963598251,
-0.07423920184373856,
-0.13985517621040344,
-0.05625619739294052,
-0.26858219504356384,
-0.3536016345024109,
-0.052464935928583145,
0.09230208396911621,
-0.1924513727426529,
0.027381423860788345,
0.3380935490131378,
-0.16899126768112183,
-0.04594673216342926,
0.2378150373697281,
0.17351971566677094,
-0.142939493060112,
0.3021447956562042,
-0.2683901786804199,
0.05805956572294235,
-0.12682197988033295,
-0.19463077187538147,
-0.2599046230316162,
-0.17692552506923676,
0.16866663098335266,
-0.0677967518568039,
0.42032286524772644,
0.12228144705295563,
-0.08900953829288483,
-0.026074735447764397,
0.3075680434703827,
0.038023050874471664,
-0.1720774918794632,
-0.26574039459228516,
0.2884059250354767,
-0.15249282121658325,
0.1331705003976822,
0.07652121782302856,
0.03401047736406326,
-0.012935828417539597,
-0.23175977170467377,
-0.0672173723578453,
0.1737957000732422,
-0.43737471103668213,
-0.007802896201610565,
-0.19611267745494843,
-0.3269726634025574,
-0.11530295759439468,
0.3891497254371643,
-0.0075873155146837234,
0.16047349572181702,
0.01407637633383274,
-0.045371122658252716,
0.04633335769176483,
0.09083940088748932,
-0.15029622614383698,
0.2502071261405945,
-0.02824493497610092,
0.24786891043186188,
-0.13194528222084045,
0.36400631070137024,
0.3663203716278076,
-0.012433014810085297,
0.14156034588813782,
0.0014437530189752579,
-0.2778802216053009,
-0.376496285200119,
-0.216120183467865,
-0.4165986180305481,
0.11947424709796906,
0.10595963895320892,
0.14780941605567932,
0.05976257473230362,
0.16662774980068207,
-0.17105388641357422,
0.1553807258605957,
-0.06318008899688721,
-0.11823463439941406,
-0.056508176028728485,
0.44241824746131897,
0.10029920935630798,
0.10014943033456802,
-0.38358163833618164,
-0.41974467039108276,
0.11714354902505875,
-0.18400396406650543,
-0.11749899387359619,
0.24601860344409943,
-0.6625513434410095,
0.09030666202306747,
-0.08961139619350433,
-0.07946479320526123,
0.16241419315338135,
0.23748520016670227,
-0.3466384708881378,
0.03116883710026741,
-0.27861201763153076,
-0.23571863770484924,
0.3210318684577942,
-0.28573518991470337,
0.02959733083844185,
-0.10311412811279297,
0.3592197299003601,
0.15913544595241547,
-0.010829846374690533,
0.19670847058296204,
0.36694586277008057,
-0.015444822609424591,
0.12015178054571152,
0.004043919499963522,
0.10936179757118225,
0.11138972640037537,
0.046828072518110275,
0.20530450344085693,
0.19677048921585083,
0.1637280136346817,
-0.024982213973999023,
-0.03289292752742767,
0.3001323640346527,
0.09416787326335907,
0.009063534438610077,
-0.4436180293560028,
0.18905240297317505,
-0.39687979221343994,
-0.14337095618247986,
0.07153511792421341,
-0.07114015519618988,
0.03504495322704315,
-0.18692894279956818,
0.13682247698307037,
-0.2567844092845917,
0.12416616082191467,
0.17115478217601776,
-0.17052218317985535,
0.3658868670463562,
-0.4551764726638794,
0.15498772263526917,
-0.1446317434310913,
-0.12763206660747528,
0.10364396870136261,
-0.027898989617824554,
-0.02133844792842865,
-0.13374227285385132,
0.28787150979042053,
0.326110303401947,
0.3545416593551636,
0.24291279911994934,
0.22742541134357452,
0.2056380808353424,
0.2314527928829193,
0.10315537452697754,
0.08541795611381531,
-0.12050919234752655,
0.023636620491743088,
-0.18025937676429749,
-0.09628528356552124,
0.16692671179771423,
-0.3265916407108307,
0.10674996674060822,
0.215819850564003,
0.17357900738716125,
-0.08687497675418854,
-0.34501129388809204,
-0.5039240717887878,
-0.5576462745666504,
-0.06957496702671051,
0.2795044779777527,
-0.09232857823371887,
0.033905357122421265,
0.479555606842041,
0.11935122311115265,
0.0990649163722992,
-0.04229074716567993,
-0.24149422347545624,
0.6234965920448303,
-0.2915302515029907,
0.014294995926320553,
-0.01684189960360527,
-0.10141381621360779,
-0.028120487928390503,
0.32107505202293396,
0.1391533613204956,
0.3040896952152252,
0.7592912912368774,
0.15774740278720856,
0.07966029644012451,
-0.6362707614898682,
-0.19322344660758972,
-0.07858164608478546,
0.09074386954307556,
0.18426398932933807,
0.004484802484512329,
0.053058866411447525,
-0.13113535940647125,
0.12339255213737488,
-0.1617029309272766,
-0.016722464933991432,
-0.1975778490304947,
-0.25562775135040283,
0.23307588696479797,
0.1756497323513031,
-0.06810488551855087,
-0.27428367733955383,
0.0457899272441864,
-0.19809409976005554,
0.26952096819877625,
-0.2622247636318207,
0.09513086080551147,
-0.3755033016204834,
-0.06818370521068573,
-0.11750160157680511,
0.12130901217460632,
0.05280045419931412,
-0.3482716381549835,
-0.2078995406627655,
-0.08308272063732147,
0.03974828124046326,
-0.16916964948177338,
-0.1180495172739029,
0.2818208336830139,
-0.06226375326514244,
0.39093220233917236,
-0.13279494643211365,
-0.22125975787639618,
0.027614733204245567,
0.1558002531528473,
0.016327163204550743,
-0.052264660596847534,
0.2613496482372284,
0.28358277678489685,
-0.1511322557926178,
0.040575481951236725,
-0.043674714863300323,
-0.12154953926801682,
0.07416534423828125,
-0.026868276298046112,
0.17402863502502441,
0.22423765063285828,
0.22912630438804626,
0.3919929265975952,
0.45721858739852905,
0.012055691331624985,
0.10447071492671967,
0.10642193257808685,
0.19438651204109192,
0.015188425779342651,
-0.3934980630874634,
-0.0631566122174263,
-0.25282347202301025,
0.15169988572597504,
0.42562127113342285,
0.13795751333236694,
-0.20580892264842987,
0.029468052089214325,
-0.38172367215156555,
-0.23878517746925354,
-0.23246575891971588,
-0.0845027044415474,
-0.4879078269004822,
0.34772202372550964,
-0.0017106831073760986,
-0.28612232208251953,
0.04418455809354782,
-0.002383831422775984,
-0.09176969528198242,
-0.08109192550182343,
0.2863118052482605,
-0.2717475891113281,
-0.27900204062461853,
-0.23901091516017914,
-0.17837348580360413,
0.24779470264911652,
0.13358339667320251,
0.17355094850063324,
0.03092154487967491,
0.2605946958065033,
0.17446377873420715,
0.14753170311450958,
0.44698023796081543,
-0.22093164920806885,
-0.2941139340400696,
-0.0769939050078392,
-0.15009276568889618,
0.15284498035907745,
0.18823134899139404,
-0.05957718566060066,
0.19631819427013397,
-0.007737196981906891,
-0.007836781442165375,
-0.12920033931732178,
-0.23211731016635895,
0.3821353316307068,
0.3925133943557739,
-0.2230866253376007,
-0.3086243271827698,
0.2006903737783432,
-0.15094390511512756,
-0.30831196904182434,
0.11827392876148224,
0.0833299532532692,
-0.20344644784927368,
-0.03526493161916733,
-0.20103853940963745,
-0.18890763819217682,
-0.057459987699985504,
0.500825822353363,
-0.19319330155849457,
-0.06771187484264374,
-0.05853233486413956,
0.39804956316947937,
0.012942690402269363,
-0.06582716107368469,
0.5238158702850342,
0.4703604280948639,
-0.27447646856307983,
-0.20464390516281128,
-0.43852198123931885,
-0.4762164354324341,
0.4185967445373535,
0.10514810681343079,
0.05753793194890022,
0.4906481206417084,
-0.17691799998283386,
-0.096454918384552,
-0.2603183388710022,
-0.3278200924396515,
0.16100750863552094,
-0.07713213562965393,
-0.28669700026512146,
-0.41264256834983826,
0.156919926404953,
0.2747708857059479,
-0.16965827345848083,
0.31885188817977905,
0.2740939259529114,
-0.2063528448343277,
0.008220351301133633,
0.060281552374362946,
0.7813112139701843,
-0.05726182460784912,
-0.015208940953016281,
-0.4095437526702881,
-0.26412585377693176,
0.2027222216129303,
0.10191968083381653,
0.04605112224817276,
0.021235663443803787,
-0.38086646795272827,
-0.08666866272687912,
0.10766327381134033,
0.21764284372329712,
0.38843053579330444,
0.039283644407987595,
0.28410616517066956,
-0.09246339648962021,
-0.0005441829562187195,
0.2943618893623352,
0.37501779198646545,
0.07313500344753265,
0.13935282826423645,
0.09926307946443558,
0.19938316941261292,
0.1266736090183258,
-0.4207119643688202,
-0.14139020442962646,
0.1719733476638794,
0.4786088764667511,
0.05582962930202484,
-0.06383828818798065,
-0.3529229760169983,
-0.11266406625509262,
0.25130999088287354,
-0.24624326825141907,
-0.16112327575683594,
0.20352068543434143,
-0.1979614496231079,
0.11112523823976517,
0.06543199717998505,
-0.043431349098682404,
-0.03748195245862007,
0.4285086393356323,
0.3341982066631317,
-0.10325486212968826,
-0.10480603575706482,
0.2820318937301636,
-0.013926440849900246,
-0.1866956502199173,
0.017701074481010437,
0.26041439175605774,
-0.32781827449798584,
-0.2937096953392029,
0.11157839000225067,
-0.2877512574195862,
-0.1948908418416977,
-0.07119929790496826,
-0.03620001673698425,
-0.1690899133682251,
-0.2639678418636322,
0.22274325788021088,
0.23211058974266052,
-0.08865737169981003,
0.5801408290863037,
0.09657316654920578,
0.11455446481704712,
-0.2845461368560791,
0.05146561563014984,
0.60384202003479,
-0.2942624092102051,
0.020312506705522537,
-0.04504266381263733,
-0.3466792702674866,
-0.31138330698013306,
0.049529485404491425,
-0.04399809241294861,
-0.1276923567056656,
0.26853835582733154,
-0.23811672627925873,
0.2652875781059265,
0.2355506718158722,
-0.2999511957168579,
-0.10056674480438232,
0.04605117067694664,
-0.09218370169401169,
0.047501444816589355,
-0.20610171556472778,
0.14624391496181488,
0.22922421991825104,
0.41247162222862244,
0.07089632749557495,
-0.046871367841959,
-0.1285552680492401,
0.2888353168964386,
-0.40001964569091797,
0.39936017990112305,
0.094558484852314,
0.17676377296447754,
0.08244676887989044,
0.1948530077934265,
-0.25773006677627563,
-0.21602864563465118,
0.14037680625915527,
-0.017815403640270233,
0.3704652786254883,
-0.32782357931137085,
-0.022552799433469772,
0.06001053750514984,
-0.1476687490940094,
0.20924235880374908,
0.10082651674747467,
-0.06615342944860458,
-0.09863711893558502,
-0.06516727805137634,
0.15381132066249847,
0.0807400569319725,
0.07218784093856812,
0.013038146309554577,
0.398470938205719,
-0.4098283648490906,
-0.35089725255966187,
0.21211780607700348,
0.1171259880065918,
0.01533827930688858,
0.20298349857330322,
-0.053827665746212006,
0.04072289541363716,
0.034762077033519745,
-0.2113349884748459,
0.08224019408226013,
0.21768811345100403,
-0.39763593673706055,
0.13522131741046906,
0.09039756655693054,
-0.006512437015771866,
0.02806064300239086,
0.31318581104278564,
0.023755278438329697,
-0.09548591822385788,
-0.07358261197805405,
0.10230333358049393,
0.2557305693626404,
-0.4735104739665985,
-0.05183567479252815,
0.3816909193992615,
-0.2694069743156433,
0.12850335240364075,
0.32369861006736755,
0.10774505138397217,
0.308287113904953,
0.07598799467086792,
-0.14866143465042114,
0.09524691849946976,
-0.30770570039749146,
0.2454695701599121,
0.1432366669178009,
0.37049663066864014,
-0.24052508175373077,
0.12771844863891602,
0.1459764540195465,
-0.07622384279966354,
0.2074320763349533,
0.04970364645123482,
0.2443208396434784,
0.21038103103637695,
0.08278467506170273,
0.322407603263855,
0.0005859583616256714,
0.1528160572052002,
0.4286259412765503,
-0.10785262286663055,
0.044178031384944916,
0.27975791692733765,
-0.12470775097608566,
0.19383983314037323,
-0.13526597619056702,
-0.11237547546625137,
0.14744648337364197,
-0.08933968842029572,
0.15840516984462738,
0.12590189278125763,
-0.24189332127571106,
-0.12805624306201935,
-0.023635664954781532,
-0.06018117442727089,
-0.09718018770217896,
0.2889660596847534,
-0.07416129112243652,
0.05310019478201866,
-0.19786615669727325,
0.5029253959655762,
0.0863770842552185,
0.2710225582122803,
-0.15008190274238586,
-0.3748131990432739,
0.015113621950149536,
0.06258653104305267,
0.1371515542268753,
0.598158061504364,
0.058528900146484375,
0.034074123948812485,
-0.08152414858341217,
0.014475341886281967,
-0.2162020057439804,
0.028584377840161324,
0.046749718487262726,
0.20415598154067993,
-0.1509692519903183,
-0.10522869229316711,
-0.011583071202039719,
0.1715223342180252,
-0.04473673924803734,
0.038697049021720886,
0.19641511142253876,
-0.14362859725952148,
-0.7924932837486267,
0.3506564199924469,
0.23319511115550995,
-0.3567841351032257,
0.10864872485399246,
-0.005764469504356384,
-0.024692751467227936,
-0.06359357386827469,
0.5445173382759094,
-0.08590444922447205,
-0.11506105214357376,
-0.018531575798988342,
0.15198954939842224,
-0.1441810429096222,
0.1815050095319748,
0.3420632779598236,
0.1265690177679062,
-0.15131337940692902,
-0.04637976363301277,
-0.5696835517883301,
-0.10186979919672012,
-0.22047513723373413,
0.10269699990749359,
0.4844152331352234,
0.04412724822759628,
-0.06743321567773819,
0.13586604595184326,
0.007042944431304932,
-0.25460368394851685,
-0.013201363384723663,
0.21338576078414917,
-0.3235015869140625,
-0.022795815020799637,
-0.006838642060756683,
-0.13830053806304932,
-0.10809345543384552,
-0.3611946403980255,
0.15888166427612305,
-0.1554012894630432,
-0.008933577686548233,
-0.03403209522366524,
0.04694231599569321,
0.3325410783290863,
0.15857619047164917,
0.08707959204912186,
0.07021049410104752,
0.28803688287734985,
0.18091323971748352,
0.07115034013986588,
0.15655142068862915,
0.25940045714378357,
-0.21205352246761322,
0.33637237548828125,
0.3618616759777069,
-0.12245355546474457,
-0.18583440780639648,
-0.15221524238586426,
0.2615296244621277,
0.22563156485557556,
-0.10410581529140472,
0.0012995791621506214,
-0.20957297086715698,
-0.10426713526248932,
0.06741518527269363,
0.0819423571228981,
0.08230788260698318,
0.262248694896698,
-0.2664481997489929,
0.13507524132728577,
-0.2109169363975525,
-0.13550978899002075,
0.13313545286655426,
-0.07221516966819763,
-0.06302548199892044,
-0.3058529794216156,
0.26320499181747437,
0.09857411682605743,
-0.23455747961997986,
-0.3781537413597107,
-0.14967933297157288,
0.46531128883361816,
-0.16931048035621643,
0.1591649353504181,
0.518036961555481,
0.07630063593387604,
-0.000008285045623779297,
-0.13898521661758423,
-0.006003722548484802,
0.017210107296705246,
0.0925399512052536,
0.21960288286209106,
-0.25799888372421265
] |
https://github.com/huggingface/datasets/issues/2514 | Can datasets remove duplicated rows? | Yes, I'd like to work on this feature once I'm done with #2500, but first I have to do some research, and see if the implementation wouldn't be too complex.
In the meantime, maybe [this lib](https://github.com/TomScheffers/pyarrow_ops) can help. However, note that this lib operates directly on pyarrow tables and relies only on `hash` to find duplicates (e.g. `-1` and `-2` have the same hash in Python 3, so this lib will treat them as duplicates), which doesn't make much sense. | **Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no | 80 | Can datasets remove duplicated rows?
**Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no
Yes, I'd like to work on this feature once I'm done with #2500, but first I have to do some research, and see if the implementation wouldn't be too complex.
In the meantime, maybe [this lib](https://github.com/TomScheffers/pyarrow_ops) can help. However, note that this lib operates directly on pyarrow tables and relies only on `hash` to find duplicates (e.g. `-1` and `-2` have the same hash in Python 3, so this lib will treat them as duplicates), which doesn't make much sense. | [
0.10441109538078308,
0.01838807761669159,
-0.1353914886713028,
0.09495456516742706,
0.033134832978248596,
0.14071252942085266,
0.34504762291908264,
0.2536357343196869,
-0.6958318948745728,
0.0018968284130096436,
-0.09365222603082657,
0.37214285135269165,
0.034192878752946854,
0.16504345834255219,
0.19424116611480713,
0.02863234095275402,
0.12868362665176392,
0.24658532440662384,
-0.1124957948923111,
0.11629240214824677,
-0.1895909160375595,
-0.22310972213745117,
-0.3207571506500244,
0.03510211780667305,
-0.3403734266757965,
0.013470934703946114,
-0.3700196444988251,
-0.047361694276332855,
-0.20801253616809845,
-0.2208465188741684,
0.2427179366350174,
0.5297176241874695,
0.018326714634895325,
0.2103600949048996,
-0.00010626097355270758,
-0.2848939895629883,
0.018051646649837494,
0.16285768151283264,
-0.3009907603263855,
0.012217521667480469,
-0.09743040055036545,
-0.12365368753671646,
0.1503574550151825,
-0.07113609462976456,
0.03992606699466705,
-0.48896539211273193,
-0.23557962477207184,
0.12845979630947113,
0.19143065810203552,
0.12222332507371902,
0.25421857833862305,
0.21708320081233978,
-0.07217142730951309,
0.12956039607524872,
0.28108638525009155,
0.3251211643218994,
-0.19848357141017914,
0.4407843351364136,
0.44953295588493347,
-0.14977167546749115,
0.31572750210762024,
0.06263162195682526,
-0.16246412694454193,
0.1453370898962021,
0.13733500242233276,
0.000998147763311863,
-0.133893221616745,
-0.08359242975711823,
0.039932508021593094,
0.2834545075893402,
0.5527538657188416,
-0.6672777533531189,
-0.34177494049072266,
-0.3500332236289978,
0.4291490912437439,
-0.28902721405029297,
-0.05320855230093002,
0.0705094039440155,
-0.062389932572841644,
0.1691332459449768,
-0.4275595247745514,
-0.2888965904712677,
-0.11356769502162933,
-0.05530327558517456,
-0.08598347008228302,
-0.24371343851089478,
0.21261177957057953,
0.004614114761352539,
0.15120883285999298,
-0.022321395576000214,
0.4632270336151123,
-0.0744326263666153,
0.22059418261051178,
0.4448763430118561,
-0.44442474842071533,
-0.22127483785152435,
-0.10276838392019272,
0.13734868168830872,
0.33106374740600586,
0.18323813378810883,
0.2757810652256012,
0.0348053053021431,
0.053675491362810135,
0.21141797304153442,
0.22532209753990173,
-0.0003013545647263527,
-0.0716259703040123,
0.10724764317274094,
-0.04848197102546692,
-0.17148257791996002,
-0.19034364819526672,
0.10945607721805573,
0.06881627440452576,
0.1245206817984581,
0.42258426547050476,
-0.09730426222085953,
0.25605374574661255,
-0.17237171530723572,
-0.3565196394920349,
0.03750688582658768,
-0.5191216468811035,
-0.20631815493106842,
-0.06850326806306839,
-0.13727232813835144,
0.10913638025522232,
-0.2522805333137512,
-0.12792764604091644,
0.09595400840044022,
-0.33022600412368774,
-0.26667237281799316,
-0.028226062655448914,
0.07205472886562347,
-0.18644651770591736,
-0.016029441729187965,
0.35456329584121704,
-0.2653108835220337,
-0.11582750082015991,
0.297713965177536,
0.16642996668815613,
0.05287623405456543,
0.28046122193336487,
-0.07711702585220337,
-0.09250854700803757,
0.00248713418841362,
-0.1493975967168808,
-0.23664246499538422,
-0.18701818585395813,
0.06219737231731415,
-0.13776510953903198,
0.5223928689956665,
0.12370344996452332,
-0.09236426651477814,
-0.12272980809211731,
0.28125569224357605,
-0.14917181432247162,
-0.18536430597305298,
-0.1511610746383667,
0.15681493282318115,
-0.09475966542959213,
0.008655473589897156,
0.12227179110050201,
-0.14310163259506226,
0.07373063266277313,
-0.34646400809288025,
-0.11264844983816147,
0.0648130550980568,
-0.46700191497802734,
-0.05629730224609375,
-0.06849067658185959,
-0.2799333930015564,
-0.17428261041641235,
0.3257144093513489,
-0.05797991901636124,
0.1904360055923462,
0.13094325363636017,
0.09745737910270691,
0.009213365614414215,
0.09784811735153198,
-0.2693903148174286,
0.030833393335342407,
0.004632160067558289,
0.24817846715450287,
-0.14552512764930725,
0.277987003326416,
0.33454424142837524,
-0.04854681342840195,
0.0061083510518074036,
0.020881138741970062,
-0.22293469309806824,
-0.40153494477272034,
-0.175458624958992,
-0.31204572319984436,
0.24020706117153168,
0.232737734913826,
0.011830959469079971,
-0.12964513897895813,
0.13283483684062958,
-0.36759820580482483,
0.31190693378448486,
-0.14831028878688812,
-0.13854075968265533,
-0.19387418031692505,
0.4634333848953247,
0.08241578936576843,
0.13292637467384338,
-0.33474409580230713,
-0.441711962223053,
0.19081944227218628,
-0.3296416401863098,
-0.06250008940696716,
-0.06731000542640686,
-0.6913431882858276,
0.04008456692099571,
0.04452115297317505,
-0.11228770017623901,
0.20887888967990875,
0.17109884321689606,
-0.46519705653190613,
0.10419878363609314,
-0.20039191842079163,
-0.3963650166988373,
0.15346316993236542,
-0.22867485880851746,
0.21428658068180084,
-0.0842437893152237,
0.4892997741699219,
0.03660258278250694,
-0.17648589611053467,
0.06901820749044418,
0.40561771392822266,
0.04764765128493309,
0.06492648273706436,
0.19949164986610413,
0.20822137594223022,
-0.10046412795782089,
-0.09535335004329681,
-0.031193241477012634,
0.23002880811691284,
0.1409669816493988,
0.005699183791875839,
-0.0579598993062973,
0.1789645552635193,
0.026817038655281067,
0.06310494989156723,
-0.3733066916465759,
0.4113072156906128,
-0.3832035958766937,
-0.1537819504737854,
0.0186021625995636,
-0.12283758819103241,
-0.07437261193990707,
-0.15075737237930298,
0.14811064302921295,
-0.14343971014022827,
0.1585225760936737,
0.30841222405433655,
-0.10173480212688446,
0.37476634979248047,
-0.3540119230747223,
0.26074135303497314,
-0.14755524694919586,
-0.27789273858070374,
0.12605851888656616,
0.007866337895393372,
0.06482260674238205,
-0.04560891538858414,
0.22051243484020233,
0.19373945891857147,
0.29556745290756226,
0.2332061380147934,
0.11982385814189911,
0.27882272005081177,
0.04006431996822357,
0.09928836673498154,
0.08584430813789368,
-0.11987340450286865,
0.009250447154045105,
-0.18137705326080322,
0.02221544086933136,
0.23179201781749725,
-0.3626883924007416,
0.1437014490365982,
0.2026202380657196,
0.27735915780067444,
-0.22062766551971436,
-0.1910678893327713,
-0.5655443668365479,
-0.4531569480895996,
-0.07620313763618469,
0.045359592884778976,
-0.17805525660514832,
0.09151779860258102,
0.5150842666625977,
0.1038600504398346,
0.013792548328638077,
0.11036272346973419,
-0.07464087009429932,
0.39414775371551514,
-0.27928176522254944,
-0.039474621415138245,
-0.13176418840885162,
-0.1765996217727661,
0.020345637574791908,
0.27727097272872925,
0.1195714920759201,
0.1093563660979271,
0.5857253670692444,
0.07443515211343765,
0.06959591805934906,
-0.6109539866447449,
-0.2983677387237549,
-0.031136974692344666,
0.037267573177814484,
0.14954259991645813,
0.08542267978191376,
-0.027060329914093018,
-0.3043869137763977,
0.032549742609262466,
-0.04175414517521858,
-0.09850510954856873,
-0.19365660846233368,
-0.104286327958107,
0.13570371270179749,
0.2669227719306946,
-0.1313280463218689,
-0.24558451771736145,
-0.11220379918813705,
-0.005250370129942894,
0.3367565870285034,
-0.11366493999958038,
0.16266390681266785,
-0.30239397287368774,
0.01672171801328659,
-0.13215312361717224,
-0.08368121832609177,
-0.1281004697084427,
-0.21231406927108765,
-0.286914587020874,
0.02136051282286644,
0.01625572144985199,
-0.1465834677219391,
-0.15331214666366577,
0.18514157831668854,
-0.20053578913211823,
0.40181535482406616,
0.011475875973701477,
-0.311875581741333,
0.15340913832187653,
0.5076431035995483,
0.04891536384820938,
0.05206712335348129,
0.3560238480567932,
0.3535311818122864,
-0.07410061359405518,
0.024650566279888153,
0.03102364018559456,
-0.15917691588401794,
0.16339442133903503,
0.0025987476110458374,
0.07697761058807373,
0.13820262253284454,
0.28605759143829346,
0.47218644618988037,
0.20668911933898926,
-0.09520223736763,
0.12651078402996063,
-0.06937263160943985,
0.2181534469127655,
0.045557815581560135,
-0.3102409839630127,
-0.1662704348564148,
-0.3074217140674591,
0.18747949600219727,
0.4478248953819275,
0.1748807728290558,
-0.23377463221549988,
0.14410443603992462,
-0.23321221768856049,
-0.556991696357727,
-0.2196410596370697,
-0.007938532158732414,
-0.16780291497707367,
0.3260240852832794,
0.08460316061973572,
-0.3632085621356964,
0.009063996374607086,
-0.14979201555252075,
-0.09404443204402924,
-0.10684050619602203,
0.2615228593349457,
-0.2522048354148865,
-0.15102066099643707,
-0.424018919467926,
-0.12470341473817825,
0.2552509903907776,
0.1949152797460556,
-0.07510687410831451,
0.20088805258274078,
0.18266776204109192,
0.25195515155792236,
0.09843333065509796,
0.6468615531921387,
-0.14923317730426788,
-0.21072249114513397,
-0.060385409742593765,
0.010937836021184921,
-0.0572134330868721,
0.06342156231403351,
-0.07636941224336624,
0.06608469784259796,
-0.0949908196926117,
-0.11924463510513306,
-0.19997641444206238,
-0.0821867287158966,
0.521083652973175,
0.391253262758255,
-0.15931585431098938,
-0.35968017578125,
0.035803306847810745,
-0.3132457435131073,
-0.2835792005062103,
0.11391720920801163,
0.021758371964097023,
-0.05577728524804115,
-0.09765858948230743,
0.05255047604441643,
-0.016430648043751717,
0.03004205971956253,
0.3727796673774719,
-0.08675792813301086,
-0.005587994121015072,
-0.09234613180160522,
0.28514859080314636,
0.05046588182449341,
-0.23624491691589355,
0.5697199702262878,
0.4987105429172516,
-0.1559569388628006,
-0.2272203266620636,
-0.5975430607795715,
-0.40744131803512573,
0.40836799144744873,
0.05448608100414276,
0.011114440858364105,
0.4816341996192932,
-0.29282113909721375,
-0.06112383306026459,
0.01855587027966976,
-0.4915015995502472,
0.19854618608951569,
-0.14837871491909027,
-0.2121214121580124,
-0.28901177644729614,
0.29514169692993164,
0.24909363687038422,
-0.19994980096817017,
0.07022027671337128,
0.2622959017753601,
-0.17592021822929382,
0.10313727706670761,
0.026873372495174408,
0.899711549282074,
-0.1537865251302719,
0.03913860768079758,
-0.1291906237602234,
-0.2764856815338135,
0.30321991443634033,
-0.05982624739408493,
0.04545668140053749,
-0.1890164166688919,
-0.2673985958099365,
-0.07786458730697632,
0.09257648885250092,
0.2458879053592682,
0.47825026512145996,
0.11299754679203033,
0.15431125462055206,
-0.1317538470029831,
0.14197257161140442,
0.33705639839172363,
0.2129843533039093,
0.03252756595611572,
0.16237010061740875,
-0.16970570385456085,
0.1479339301586151,
0.12161487340927124,
-0.4452347755432129,
-0.1877206265926361,
0.16765166819095612,
0.3555833399295807,
-0.06666304916143417,
0.04452699422836304,
-0.3174162209033966,
-0.0347607396543026,
0.24463553726673126,
-0.007186472415924072,
-0.3055075407028198,
-0.01708485744893551,
-0.08739949762821198,
0.023244187235832214,
-0.1431644707918167,
0.03865651786327362,
-0.022484373301267624,
0.42059940099716187,
0.40713241696357727,
0.029815448448061943,
-0.08484630286693573,
0.2570120692253113,
0.009452972561120987,
-0.2883405387401581,
0.09977306425571442,
0.3497154414653778,
-0.3559156656265259,
-0.21471892297267914,
0.1591346561908722,
-0.21842201054096222,
-0.18049530684947968,
0.15517139434814453,
-0.07124027609825134,
-0.058059342205524445,
-0.3316577970981598,
0.17043191194534302,
0.11804338544607162,
-0.09968636929988861,
0.622268557548523,
-0.14515702426433563,
0.07753841578960419,
-0.2983393669128418,
0.032479263842105865,
0.5118443965911865,
-0.203155055642128,
-0.0017207786440849304,
0.11073796451091766,
-0.3159993290901184,
-0.1827513575553894,
0.2060253918170929,
-0.003820425132289529,
-0.3440484404563904,
0.11511987447738647,
-0.086531862616539,
0.42956387996673584,
0.2392299771308899,
-0.2274765968322754,
-0.0982740968465805,
0.011309389024972916,
-0.07163520902395248,
0.018730536103248596,
-0.11991513520479202,
0.17193815112113953,
0.49265021085739136,
0.27914145588874817,
0.18936210870742798,
0.22549042105674744,
-0.010536889545619488,
0.12151181697845459,
-0.37037932872772217,
0.4481428563594818,
0.10957985371351242,
0.30794697999954224,
-0.08327286690473557,
0.1583915650844574,
-0.2954147756099701,
-0.3457028567790985,
0.15497168898582458,
0.020154468715190887,
0.3334084749221802,
-0.3354876637458801,
-0.1186097264289856,
0.07781846821308136,
-0.1121978685259819,
0.16481730341911316,
0.12118937820196152,
0.07086292654275894,
0.031024988740682602,
-0.006448129191994667,
0.14501625299453735,
0.19542062282562256,
0.15163260698318481,
0.02199064940214157,
0.6954909563064575,
-0.36849069595336914,
-0.3162466883659363,
0.04670882225036621,
-0.10046045482158661,
-0.008543826639652252,
0.23051124811172485,
0.0072728656232357025,
-0.0876673012971878,
0.12528406083583832,
0.059322405606508255,
-0.02966294437646866,
0.16545014083385468,
-0.4229685068130493,
0.2478305995464325,
-0.06880289316177368,
-0.12744557857513428,
-0.15670202672481537,
0.5310268402099609,
-0.019213154911994934,
-0.1377566009759903,
-0.13618972897529602,
0.18653535842895508,
0.21133507788181305,
-0.5376394987106323,
-0.07724355906248093,
0.34205958247184753,
-0.16565577685832977,
0.04846080020070076,
0.3049317002296448,
0.03207629546523094,
0.21976378560066223,
-0.018464870750904083,
-0.08354484289884567,
0.2787998616695404,
-0.14966081082820892,
0.1379198431968689,
0.24001243710517883,
0.2825623154640198,
-0.2172234207391739,
0.28840211033821106,
0.049556832760572433,
-0.05386114865541458,
0.1368463635444641,
-0.1109047457575798,
0.162057563662529,
0.05653885751962662,
0.012983966618776321,
0.2799026370048523,
0.01693400740623474,
0.06162484362721443,
0.2446562647819519,
0.04344751685857773,
-0.09717600792646408,
0.3055134415626526,
0.1565433144569397,
0.3416389524936676,
-0.026482515037059784,
0.02172836847603321,
0.27204105257987976,
0.06253562867641449,
0.1540863960981369,
-0.07408082485198975,
-0.21361932158470154,
-0.07821884006261826,
-0.06460359692573547,
-0.1890467405319214,
-0.31066280603408813,
0.3977771997451782,
0.1065501719713211,
0.1259818971157074,
-0.3896438479423523,
0.382660835981369,
-0.07355485111474991,
0.21799781918525696,
-0.08608129620552063,
-0.3578411638736725,
0.19430485367774963,
-0.03245781362056732,
0.08803912997245789,
0.4262206256389618,
0.24879975616931915,
-0.04392711818218231,
-0.20692689716815948,
0.04922828823328018,
-0.4595757722854614,
0.12204577028751373,
0.07603709399700165,
0.1318107545375824,
-0.07490935921669006,
-0.01744440570473671,
-0.12944868206977844,
0.1688014566898346,
-0.07436702400445938,
0.10674820840358734,
0.22906772792339325,
-0.10148027539253235,
-0.7163108587265015,
0.1947498917579651,
0.21688467264175415,
-0.43720483779907227,
0.2104269415140152,
-0.06657818704843521,
-0.06752986460924149,
-0.0037529384717345238,
0.43380007147789,
0.14056895673274994,
-0.15212196111679077,
-0.05159608647227287,
0.10710635781288147,
-0.01796155422925949,
0.20524267852306366,
0.3779177665710449,
0.1835562288761139,
-0.21553273499011993,
0.013289310038089752,
-0.577845573425293,
-0.0691295638680458,
-0.4157990515232086,
0.029588909819722176,
0.565252423286438,
-0.04844799265265465,
-0.048468850553035736,
0.30985695123672485,
0.07990774512290955,
0.01383131928741932,
-0.15347465872764587,
0.26666027307510376,
-0.30079901218414307,
-0.029029961675405502,
-0.06547825038433075,
-0.13260163366794586,
-0.21077507734298706,
-0.2510814368724823,
0.18139787018299103,
-0.3836824595928192,
-0.017537489533424377,
-0.2416163831949234,
-0.05661403760313988,
0.4530109167098999,
0.1486591100692749,
0.21321505308151245,
0.03424399718642235,
0.405619353055954,
0.2609451711177826,
0.06366648524999619,
0.18524740636348724,
0.17117707431316376,
-0.24304574728012085,
0.47069287300109863,
0.1666070520877838,
-0.1785307079553604,
-0.06177423894405365,
-0.3375509977340698,
0.24450530111789703,
0.2603074610233307,
-0.11949816346168518,
0.06886368244886398,
-0.11944079399108887,
-0.1358763873577118,
0.1132175549864769,
0.08880762755870819,
-0.15498241782188416,
0.16147541999816895,
-0.24819666147232056,
0.30614662170410156,
-0.22630327939987183,
-0.30503877997398376,
0.23268252611160278,
-0.27349328994750977,
-0.03490111231803894,
-0.26244696974754333,
0.17665767669677734,
-0.06430075317621231,
-0.2301061749458313,
-0.36502352356910706,
-0.10188046097755432,
0.4784150719642639,
-0.07846082746982574,
0.12061095237731934,
0.4608335793018341,
0.03311442956328392,
-0.03992011770606041,
-0.09325182437896729,
-0.053703054785728455,
-0.03451091796159744,
0.11753754317760468,
0.10163010656833649,
-0.35631996393203735
] |
https://github.com/huggingface/datasets/issues/2514 | Can datasets remove duplicated rows? | > Hi ! For now this is probably the best option.
> We might add a feature like this in the feature as well.
>
> Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ?
> Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases
Great if this is can be done. Thanks!!
Not sure if you are asking me. In any case I don't know of any unfortunately :( in practice if data is really large we normally do it with spark (only for info. I understand this is not useful in developing this library..) | **Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no | 119 | Can datasets remove duplicated rows?
**Is your feature request related to a problem? Please describe.**
i find myself more and more relying on datasets just to do all the preprocessing. One thing however, for removing duplicated rows, I couldn't find out how and am always converting datasets to pandas to do that..
**Describe the solution you'd like**
have a functionality of " remove duplicated rows"
**Describe alternatives you've considered**
convert dataset to pandas, remove duplicate, and convert back...
**Additional context**
no
> Hi ! For now this is probably the best option.
> We might add a feature like this in the feature as well.
>
> Do you know any deduplication method that works on arbitrary big datasets without filling up RAM ?
> Otherwise we can have do the deduplication in memory like pandas but I feel like this is going to be limiting for some cases
Great if this is can be done. Thanks!!
Not sure if you are asking me. In any case I don't know of any unfortunately :( in practice if data is really large we normally do it with spark (only for info. I understand this is not useful in developing this library..) | [
0.10129891335964203,
-0.1910538673400879,
-0.13927026093006134,
0.28646984696388245,
0.07518847286701202,
0.20366090536117554,
0.2715580463409424,
0.0986693948507309,
-0.33350008726119995,
-0.016334593296051025,
-0.0008105447050184011,
0.2826298773288727,
0.040186572819948196,
0.19777165353298187,
-0.024946734309196472,
-0.02979818731546402,
0.10263416171073914,
0.13065305352210999,
-0.1036723405122757,
0.05012527108192444,
-0.02565922960639,
-0.14657051861286163,
-0.2704997658729553,
-0.17821277678012848,
-0.4471105933189392,
-0.061712346971035004,
-0.48296666145324707,
-0.05883093178272247,
-0.158778116106987,
0.0186242014169693,
0.24961696565151215,
0.5069915652275085,
0.008140437304973602,
0.34496814012527466,
-0.00010656908852979541,
-0.4029151201248169,
-0.007139056921005249,
0.1132887601852417,
-0.1967676728963852,
0.057706259191036224,
-0.20645487308502197,
-0.03783605247735977,
0.08111348748207092,
-0.09239189326763153,
0.045543357729911804,
-0.2710398733615875,
-0.3092348873615265,
-0.2610732316970825,
0.1535589098930359,
0.07555078715085983,
0.2574925720691681,
-0.0642399787902832,
-0.22742946445941925,
0.04275447130203247,
0.19631098210811615,
0.5021445155143738,
-0.14078612625598907,
0.2988504469394684,
0.5304876565933228,
-0.044594451785087585,
0.14335446059703827,
0.0672987550497055,
-0.1113494262099266,
0.13866449892520905,
0.29070407152175903,
-0.19523242115974426,
-0.2926003336906433,
-0.19283440709114075,
0.20410871505737305,
0.32462814450263977,
0.817385196685791,
-0.49106207489967346,
-0.2823200523853302,
-0.15881383419036865,
0.4048907160758972,
0.039211392402648926,
-0.08834724873304367,
0.09934276342391968,
-0.008549593389034271,
0.06957465410232544,
-0.35319986939430237,
-0.5799802541732788,
-0.16400080919265747,
-0.18281252682209015,
0.07339482009410858,
-0.44175776839256287,
0.09955157339572906,
-0.044822171330451965,
0.18412137031555176,
-0.07819275557994843,
0.38137680292129517,
-0.16325217485427856,
0.15930333733558655,
0.44254040718078613,
-0.41418030858039856,
-0.36200183629989624,
-0.20039790868759155,
-0.09434165805578232,
0.32966890931129456,
0.1987353265285492,
0.3466747999191284,
-0.06758347153663635,
-0.11328540742397308,
0.2721819281578064,
0.32232987880706787,
0.019596680998802185,
-0.15583950281143188,
0.011316883377730846,
0.11283460259437561,
-0.19933867454528809,
-0.26044991612434387,
-0.041546568274497986,
-0.030045751482248306,
0.22800703346729279,
0.30021268129348755,
-0.07549269497394562,
0.07759308815002441,
-0.39002466201782227,
-0.29644495248794556,
0.0931491106748581,
-0.29866066575050354,
-0.14956548810005188,
-0.09941571950912476,
-0.12950125336647034,
0.08681435883045197,
-0.14457127451896667,
-0.06615453958511353,
-0.15513350069522858,
-0.29720744490623474,
-0.2271500825881958,
-0.025630341842770576,
0.1597304493188858,
-0.22350330650806427,
-0.006686121225357056,
0.32621532678604126,
-0.2521716058254242,
-0.05752843618392944,
0.2420903593301773,
0.1999293565750122,
-0.13018694519996643,
0.34195366501808167,
-0.2848278284072876,
0.08347460627555847,
-0.0906568169593811,
-0.25679242610931396,
-0.2523030638694763,
-0.20645926892757416,
0.14171284437179565,
-0.09167716652154922,
0.48548147082328796,
0.12968024611473083,
-0.09322787821292877,
-0.14757820963859558,
0.259062796831131,
-0.04670935869216919,
-0.1065518707036972,
-0.27303534746170044,
0.2472008615732193,
-0.1362902820110321,
0.014916941523551941,
0.1113038957118988,
-0.009249638766050339,
0.11344751715660095,
-0.2967498004436493,
-0.04823300614953041,
0.20494753122329712,
-0.5000963807106018,
0.042992591857910156,
-0.17765766382217407,
-0.29424312710762024,
-0.09860836714506149,
0.4649654030799866,
-0.050137363374233246,
0.056444212794303894,
0.013820784166455269,
-0.07341571152210236,
0.0800512433052063,
0.07238748669624329,
-0.16464269161224365,
0.33852529525756836,
0.016754508018493652,
0.19235891103744507,
-0.14073291420936584,
0.4406466782093048,
0.38360264897346497,
-0.031211841851472855,
0.10317626595497131,
0.01567712612450123,
-0.2498231828212738,
-0.3883447051048279,
-0.23448461294174194,
-0.4616601765155792,
0.2157372087240219,
0.09393930435180664,
0.1487685739994049,
-0.03236553817987442,
0.19577564299106598,
-0.0963866114616394,
0.18393616378307343,
-0.06874005496501923,
-0.09467188268899918,
-0.0008342750370502472,
0.44863152503967285,
0.10390195995569229,
0.17510771751403809,
-0.3972981572151184,
-0.371073842048645,
0.08085255324840546,
-0.19254331290721893,
-0.10537394881248474,
0.25088179111480713,
-0.657538115978241,
0.1710526943206787,
-0.11750854551792145,
-0.022081930190324783,
0.12457570433616638,
0.12925875186920166,
-0.4144193232059479,
0.034793537110090256,
-0.30781587958335876,
-0.28133252263069153,
0.22985194623470306,
-0.31136441230773926,
0.03247540444135666,
-0.22534868121147156,
0.41577762365341187,
0.17452089488506317,
-0.017905965447425842,
0.19032788276672363,
0.366119921207428,
-0.03459911048412323,
0.07537811994552612,
-0.009381840005517006,
0.1028030589222908,
0.1476319134235382,
-0.0036961734294891357,
0.18747153878211975,
0.23730960488319397,
0.2151128053665161,
-0.07311701774597168,
0.01103060320019722,
0.3312474191188812,
0.14000588655471802,
-0.022834252566099167,
-0.47822436690330505,
0.16856756806373596,
-0.508192777633667,
-0.14619463682174683,
0.046240054070949554,
-0.08865516632795334,
0.020186932757496834,
-0.1640034019947052,
0.17152447998523712,
-0.12825064361095428,
0.1904507428407669,
0.1697271317243576,
-0.12960253655910492,
0.38157418370246887,
-0.44754377007484436,
0.06418154388666153,
-0.14063329994678497,
-0.11855398118495941,
0.037780068814754486,
0.041827503591775894,
-0.018564261496067047,
-0.11509976536035538,
0.3880043625831604,
0.3194030821323395,
0.3859793543815613,
0.20761725306510925,
0.16284675896167755,
0.21416926383972168,
0.3135339915752411,
0.09563551843166351,
0.1016092449426651,
-0.10035057365894318,
0.007191577460616827,
-0.18432185053825378,
-0.10233794152736664,
0.21576544642448425,
-0.34737876057624817,
0.011186759918928146,
0.25274786353111267,
0.20585860311985016,
-0.0462602898478508,
-0.29688599705696106,
-0.5272916555404663,
-0.6229697465896606,
-0.10584966838359833,
0.25582998991012573,
-0.17891311645507812,
0.15306216478347778,
0.42575526237487793,
0.12202917039394379,
0.12689705193042755,
-0.04637933522462845,
-0.11357563734054565,
0.6114590764045715,
-0.29472988843917847,
-0.11774831265211105,
-0.057832878082990646,
-0.0651279017329216,
-0.019414585083723068,
0.2763374149799347,
0.1898476481437683,
0.32418230175971985,
0.731089174747467,
0.28175944089889526,
0.10691629350185394,
-0.6828430891036987,
-0.3100986182689667,
-0.154841348528862,
0.02207184210419655,
0.21221697330474854,
0.10460766404867172,
0.0073592811822891235,
-0.13700473308563232,
0.08658207952976227,
-0.1891385018825531,
-0.0357154905796051,
-0.14735594391822815,
-0.26653343439102173,
0.20265647768974304,
0.1801406592130661,
-0.19816888868808746,
-0.2760496437549591,
-0.006243716925382614,
-0.22331637144088745,
0.34530770778656006,
-0.2187129110097885,
0.16183064877986908,
-0.4644886255264282,
-0.08773063123226166,
-0.07009327411651611,
0.17997273802757263,
0.013426189310848713,
-0.28044119477272034,
-0.2759271264076233,
-0.03749630227684975,
0.059081774204969406,
-0.20524099469184875,
-0.09427839517593384,
0.2906419038772583,
-0.01659911870956421,
0.3591815233230591,
-0.2501956522464752,
-0.21545225381851196,
0.05089513957500458,
0.1491314023733139,
0.05744362249970436,
-0.006403377279639244,
0.24118070304393768,
0.22586539387702942,
-0.06416874378919601,
0.047674573957920074,
-0.13515572249889374,
-0.10798832029104233,
0.07968498766422272,
0.09205874800682068,
0.2104494869709015,
0.23469820618629456,
0.186886727809906,
0.3986666202545166,
0.43639469146728516,
-0.03046679124236107,
0.10083308815956116,
0.13416796922683716,
0.13138063251972198,
-0.004236146807670593,
-0.3950922191143036,
-0.024060185998678207,
-0.28112515807151794,
0.07781119644641876,
0.41605013608932495,
0.17267590761184692,
-0.2761062979698181,
0.010827314108610153,
-0.43553730845451355,
-0.1743423044681549,
-0.20665788650512695,
-0.08302605897188187,
-0.5281800031661987,
0.25184983015060425,
-0.05847698822617531,
-0.2659352123737335,
0.02189946174621582,
-0.06754472106695175,
-0.09276308119297028,
0.015309639275074005,
0.3267201781272888,
-0.23188002407550812,
-0.19684472680091858,
-0.3175489902496338,
-0.18941083550453186,
0.24901732802391052,
0.12733973562717438,
0.12606853246688843,
0.06455425918102264,
0.2862911820411682,
0.28490689396858215,
0.09445329755544662,
0.5072611570358276,
-0.15503638982772827,
-0.374744713306427,
-0.029764264822006226,
-0.19183355569839478,
0.1423604041337967,
0.19369108974933624,
-0.034542523324489594,
0.1590636819601059,
0.046231649816036224,
0.010422348976135254,
-0.22696298360824585,
-0.22461269795894623,
0.37405088543891907,
0.4223034977912903,
-0.20488125085830688,
-0.3847653865814209,
0.23030413687229156,
-0.20997706055641174,
-0.3856257200241089,
0.1169319748878479,
-0.001592189073562622,
-0.18183688819408417,
-0.05451292544603348,
-0.23089368641376495,
-0.07526393234729767,
-0.053492769598960876,
0.5534111261367798,
-0.24944783747196198,
-0.045238446444272995,
-0.16187626123428345,
0.412678062915802,
-0.04619144648313522,
-0.06477224826812744,
0.5135987997055054,
0.43996256589889526,
-0.2340793013572693,
-0.09550723433494568,
-0.3327077329158783,
-0.46872177720069885,
0.4154411256313324,
0.06325991451740265,
-0.010545043274760246,
0.6419352293014526,
-0.20695465803146362,
-0.10504528880119324,
-0.1951552778482437,
-0.3630763292312622,
0.14634832739830017,
-0.06161968782544136,
-0.29876455664634705,
-0.4916355609893799,
0.17424850165843964,
0.25449058413505554,
-0.15447551012039185,
0.40540534257888794,
0.20267535746097565,
-0.1384013444185257,
0.06830580532550812,
0.06263568997383118,
0.8880200982093811,
-0.13154491782188416,
-0.021065030246973038,
-0.5048200488090515,
-0.21820227801799774,
0.3203296363353729,
0.11012454330921173,
0.03690151497721672,
-0.15330027043819427,
-0.34026533365249634,
-0.09734941273927689,
0.08671088516712189,
0.24989643692970276,
0.3294864892959595,
0.03193473443388939,
0.2788456082344055,
-0.06345663964748383,
-0.017054326832294464,
0.20266340672969818,
0.4478137493133545,
0.04203323274850845,
0.11843158304691315,
0.02729794569313526,
0.15201164782047272,
0.08432815968990326,
-0.3738175928592682,
-0.1554315686225891,
0.11787892878055573,
0.4924124777317047,
-0.014302646741271019,
-0.16165398061275482,
-0.3362334668636322,
-0.06611185520887375,
0.3038235902786255,
-0.19714860618114471,
-0.18460243940353394,
0.29875093698501587,
-0.17567092180252075,
0.028293170034885406,
0.1860213428735733,
-0.04973587393760681,
-0.033816222101449966,
0.3742717206478119,
0.3428650498390198,
-0.04488879069685936,
-0.034716300666332245,
0.31550681591033936,
-0.0240451842546463,
-0.177574023604393,
0.03288627415895462,
0.2792319059371948,
-0.4303007125854492,
-0.2020954042673111,
0.10699552297592163,
-0.14548571407794952,
-0.15057489275932312,
-0.08169996738433838,
0.0012094005942344666,
-0.2756050229072571,
-0.2018072009086609,
0.16827832162380219,
0.30914729833602905,
-0.0842486172914505,
0.660837709903717,
0.06790076941251755,
0.08439415693283081,
-0.3240244686603546,
0.08018112182617188,
0.6168256998062134,
-0.3480917513370514,
-0.015845581889152527,
0.07646746933460236,
-0.35897308588027954,
-0.27947497367858887,
0.041713714599609375,
-0.15069988369941711,
-0.2133917510509491,
0.2705874741077423,
-0.26121482253074646,
0.2985782027244568,
0.29920223355293274,
-0.30481821298599243,
-0.06826695054769516,
0.11923536658287048,
-0.08297610282897949,
0.045265451073646545,
-0.3097730278968811,
0.11524432897567749,
0.1627226322889328,
0.4415401816368103,
0.13041791319847107,
-0.09596776962280273,
-0.11385878920555115,
0.3005709648132324,
-0.34384995698928833,
0.47146710753440857,
0.06884749978780746,
0.1904931217432022,
0.07829853892326355,
0.23681193590164185,
-0.32141995429992676,
-0.18110516667366028,
0.06663849204778671,
0.07949204742908478,
0.38104572892189026,
-0.25541970133781433,
-0.07925821840763092,
0.09592774510383606,
-0.17769461870193481,
0.18489651381969452,
0.06978683173656464,
-0.15653365850448608,
-0.12528732419013977,
-0.0496688187122345,
0.232621967792511,
0.04284915328025818,
0.07938656210899353,
-0.06354685127735138,
0.41344746947288513,
-0.453634113073349,
-0.436545193195343,
0.2588058114051819,
0.11934395134449005,
0.03161541372537613,
0.2070855349302292,
-0.054318055510520935,
0.09824883192777634,
-0.027326039969921112,
-0.27769777178764343,
0.072270967066288,
0.21296264231204987,
-0.43062832951545715,
0.21429350972175598,
0.15448451042175293,
-0.025641830638051033,
-0.0029879757203161716,
0.34906983375549316,
0.0557059720158577,
-0.016368020325899124,
-0.06797889620065689,
0.13780951499938965,
0.1761338710784912,
-0.4282858967781067,
-0.07417420297861099,
0.31660789251327515,
-0.1787237524986267,
0.012357000261545181,
0.29678380489349365,
0.09645964205265045,
0.3377547860145569,
0.0042383670806884766,
-0.15605297684669495,
0.18864871561527252,
-0.2589983344078064,
0.22076815366744995,
0.19897691905498505,
0.27663007378578186,
-0.23985986411571503,
0.17412033677101135,
0.14630770683288574,
-0.042025886476039886,
0.2355792373418808,
0.041592732071876526,
0.2634009122848511,
0.3026796579360962,
0.04521094262599945,
0.32279172539711,
-0.034932758659124374,
0.07398512959480286,
0.4428253471851349,
0.06829044967889786,
0.058040350675582886,
0.2874355912208557,
-0.0683388039469719,
0.23847000300884247,
-0.1309802383184433,
-0.08717445284128189,
0.2352384626865387,
-0.056509166955947876,
0.19072763621807098,
0.14858637750148773,
-0.20841893553733826,
-0.15046456456184387,
-0.008081197738647461,
-0.13951334357261658,
-0.055951572954654694,
0.3512400984764099,
-0.015634283423423767,
0.10960027575492859,
-0.21977703273296356,
0.5052935481071472,
0.02669144608080387,
0.2342054545879364,
-0.18776479363441467,
-0.3179318606853485,
0.0719374492764473,
0.07765015959739685,
0.11119900643825531,
0.47497016191482544,
0.06329303979873657,
0.027171678841114044,
-0.05707396939396858,
-0.03319654241204262,
-0.27602019906044006,
0.12774591147899628,
0.10487191379070282,
0.331417053937912,
-0.10794569551944733,
-0.0018264837563037872,
0.03006744757294655,
0.09674078226089478,
-0.005343839526176453,
0.08938996493816376,
0.18316063284873962,
-0.0931038111448288,
-0.7865318655967712,
0.3493591547012329,
0.22987186908721924,
-0.34726449847221375,
0.022521857172250748,
0.005621470510959625,
-0.05175744369626045,
-0.10727325081825256,
0.5509382486343384,
-0.08140463382005692,
-0.14377754926681519,
-0.05134652927517891,
0.11843350529670715,
-0.20147110521793365,
0.2428552359342575,
0.38884419202804565,
0.15311160683631897,
-0.182267427444458,
-0.07707371562719345,
-0.6075682044029236,
-0.10028453916311264,
-0.14852513372898102,
0.20649859309196472,
0.42422884702682495,
0.06867038458585739,
-0.01604890078306198,
0.10100863873958588,
-0.039028599858284,
-0.248871311545372,
0.0020464109256863594,
0.21559691429138184,
-0.33441558480262756,
0.021590787917375565,
-0.12293939292430878,
-0.13795630633831024,
-0.12297774851322174,
-0.34168192744255066,
0.12835316359996796,
-0.22216899693012238,
-0.07323986291885376,
-0.10795474052429199,
-0.02767172083258629,
0.34661465883255005,
0.142135888338089,
0.11507366597652435,
0.03564814105629921,
0.3848191797733307,
0.2009037435054779,
0.06435823440551758,
0.2148571014404297,
0.25237366557121277,
-0.14051739871501923,
0.313795804977417,
0.3568801283836365,
-0.07430185377597809,
-0.15403643250465393,
-0.06689874827861786,
0.23393630981445312,
0.30836552381515503,
-0.22125111520290375,
0.03824860230088234,
-0.270830899477005,
-0.18472909927368164,
0.008430689573287964,
0.05942162871360779,
0.0863318219780922,
0.3143298625946045,
-0.24902597069740295,
0.1305452585220337,
-0.22273433208465576,
-0.06133543699979782,
0.21621668338775635,
-0.14438526332378387,
-0.03993939235806465,
-0.34231871366500854,
0.20463936030864716,
0.12017811834812164,
-0.22636678814888,
-0.4386409819126129,
-0.15852347016334534,
0.4443911910057068,
-0.13249477744102478,
0.13830776512622833,
0.4938341975212097,
0.009845800697803497,
0.056097764521837234,
-0.16181936860084534,
-0.1014937162399292,
0.0371476374566555,
0.09188652038574219,
0.2818923890590668,
-0.3022618293762207
] |
https://github.com/huggingface/datasets/issues/2511 | Add C4 | Update on this: I'm computing the checksums of the data files. It will be available soon | ## Adding a Dataset
- **Name:** *C4*
- **Description:** *https://github.com/allenai/allennlp/discussions/5056*
- **Paper:** *https://arxiv.org/abs/1910.10683*
- **Data:** *https://huggingface.co/datasets/allenai/c4*
- **Motivation:** *Used a lot for pretraining*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Should fix https://github.com/huggingface/datasets/issues/1710 | 16 | Add C4
## Adding a Dataset
- **Name:** *C4*
- **Description:** *https://github.com/allenai/allennlp/discussions/5056*
- **Paper:** *https://arxiv.org/abs/1910.10683*
- **Data:** *https://huggingface.co/datasets/allenai/c4*
- **Motivation:** *Used a lot for pretraining*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Should fix https://github.com/huggingface/datasets/issues/1710
Update on this: I'm computing the checksums of the data files. It will be available soon | [
-0.2586117684841156,
-0.23689308762550354,
-0.21562543511390686,
0.07441923022270203,
0.20855370163917542,
-0.08748020231723785,
0.10772182047367096,
0.30312982201576233,
0.06430131196975708,
0.32313573360443115,
-0.21327097713947296,
0.06667802482843399,
-0.15428921580314636,
0.43328431248664856,
-0.07344968616962433,
0.030805299058556557,
0.005563028156757355,
0.24548546969890594,
-0.251665323972702,
-0.06123894080519676,
-0.12370612472295761,
0.1600959300994873,
0.1151486337184906,
-0.34270983934402466,
-0.23706839978694916,
-0.02823689393699169,
-0.01263614185154438,
0.23994863033294678,
-0.2678387761116028,
-0.22209259867668152,
0.11059081554412842,
0.2579701244831085,
-0.13013288378715515,
0.3192819654941559,
-0.00010027475218521431,
-0.02445361018180847,
-0.0022868961095809937,
-0.11048638075590134,
-0.0692485123872757,
0.24994580447673798,
-0.023054838180541992,
-0.03289502114057541,
-0.06203441321849823,
-0.1048002690076828,
-0.36295557022094727,
0.012654226273298264,
0.062225811183452606,
-0.13819491863250732,
0.3689247965812683,
0.22718828916549683,
0.36323440074920654,
0.3869175910949707,
-0.019406866282224655,
-0.16299192607402802,
0.11132176220417023,
0.016769450157880783,
-0.08710388094186783,
0.25935688614845276,
0.2584516406059265,
0.12090595066547394,
-0.2002430558204651,
0.28410106897354126,
0.18478046357631683,
0.07397355884313583,
0.17568866908550262,
0.025442609563469887,
-0.055046893656253815,
0.06292078644037247,
0.018719973042607307,
0.0853797122836113,
0.1215299516916275,
-0.28312423825263977,
-0.31106844544410706,
-0.1756318062543869,
0.07415599375963211,
-0.3809302747249603,
0.14682331681251526,
0.023650620132684708,
0.008268170058727264,
-0.021516110748052597,
-0.1706749051809311,
0.024088816717267036,
-0.1968892514705658,
-0.05161544680595398,
0.10055598616600037,
0.06802810728549957,
-0.26443085074424744,
-0.2472827136516571,
0.24970173835754395,
0.03357602283358574,
-0.38030511140823364,
0.11216171830892563,
-0.06707443296909332,
-0.058975111693143845,
-0.09074673056602478,
-0.2901783585548401,
0.03823891282081604,
0.2546214759349823,
0.30784669518470764,
0.12621401250362396,
0.10252770781517029,
0.24849426746368408,
-0.023418448865413666,
0.10003378987312317,
-0.12769781053066254,
-0.07826077938079834,
0.035893864929676056,
-0.25857630372047424,
0.3095816373825073,
0.1944131702184677,
-0.12599794566631317,
-0.1424466371536255,
0.02896743267774582,
-0.15758024156093597,
-0.0986093133687973,
0.052087441086769104,
-0.16779227554798126,
-0.24755018949508667,
-0.2214195281267166,
0.07718420773744583,
0.08888193219900131,
0.007709353696554899,
0.11760623753070831,
0.5735187530517578,
-0.06182992458343506,
-0.19446778297424316,
0.004639267921447754,
0.2758076786994934,
-0.1213822215795517,
-0.14463326334953308,
-0.31230899691581726,
-0.05467448756098747,
-0.28952208161354065,
0.022737031802535057,
0.35082074999809265,
-0.06560653448104858,
0.3327212929725647,
0.05340629070997238,
0.2864612936973572,
0.12028177082538605,
0.10826480388641357,
0.01886695809662342,
0.1733444333076477,
0.03561262786388397,
-0.00045556947588920593,
-0.2364000827074051,
0.12093795835971832,
-0.07257229089736938,
-0.041708700358867645,
-0.47239890694618225,
0.0708003044128418,
0.07651986181735992,
-0.2188253104686737,
0.31661325693130493,
0.002436598762869835,
-0.009268142282962799,
-0.04224727302789688,
0.056175597012043,
-0.07122888416051865,
-0.18646085262298584,
0.014460578560829163,
0.18566228449344635,
-0.09024126827716827,
-0.18523173034191132,
0.16045720875263214,
0.250497043132782,
0.03488790616393089,
-0.13831818103790283,
0.22253184020519257,
-0.18012727797031403,
0.0053031668066978455,
0.11214478313922882,
0.054658014327287674,
-0.131876140832901,
-0.2068520337343216,
0.08684992790222168,
-0.0757225975394249,
-0.17916125059127808,
-0.2858591377735138,
0.06916511803865433,
-0.18407940864562988,
-0.011854485608637333,
0.17421108484268188,
0.1349697709083557,
0.0025918278843164444,
-0.10639291256666183,
-0.04712657630443573,
0.0593734011054039,
0.013482647947967052,
0.14104123413562775,
-0.212696835398674,
-0.23633432388305664,
-0.1547967493534088,
0.12162502110004425,
0.14234156906604767,
-0.1273556351661682,
0.20245344936847687,
-0.12523019313812256,
0.32565686106681824,
-0.39427506923675537,
0.06155800819396973,
0.18287356197834015,
0.4015359878540039,
0.021906673908233643,
-0.19326142966747284,
-0.18275326490402222,
-0.25746771693229675,
0.0062643662095069885,
-0.059029653668403625,
0.14515194296836853,
0.029711119830608368,
-0.3581785559654236,
-0.08834413439035416,
-0.21952809393405914,
-0.13058966398239136,
-0.08491286635398865,
0.3844878077507019,
0.2899782061576843,
0.0879078060388565,
-0.03430760279297829,
0.02019559219479561,
0.3061669170856476,
-0.19015191495418549,
0.09763694554567337,
-0.0789307951927185,
0.1960112601518631,
-0.11007053405046463,
-0.14176329970359802,
0.34078171849250793,
0.13191336393356323,
-0.06080009043216705,
-0.11084901541471481,
0.14436116814613342,
0.301330029964447,
-0.039578236639499664,
0.21335358917713165,
0.22703957557678223,
0.49145936965942383,
0.03382275998592377,
-0.15893669426441193,
0.006297634914517403,
0.15319420397281647,
-0.010462389327585697,
0.06469114869832993,
-0.18880853056907654,
0.5184321999549866,
0.030182749032974243,
-0.16056162118911743,
0.2123938351869583,
-0.15124040842056274,
0.22637823224067688,
-0.17371582984924316,
-0.060689084231853485,
-0.3493959903717041,
0.19808441400527954,
-0.0980958342552185,
0.25945866107940674,
-0.13163959980010986,
-0.4100775420665741,
0.048788633197546005,
0.23382219672203064,
0.16636036336421967,
0.17038723826408386,
-0.04051332175731659,
-0.036333970725536346,
0.0802968218922615,
0.14019675552845,
0.17613910138607025,
0.2134082317352295,
0.5047033429145813,
0.13313384354114532,
0.05889768898487091,
-0.12547364830970764,
-0.18639127910137177,
0.13831135630607605,
-0.2588725686073303,
-0.06428102403879166,
0.23514434695243835,
0.021916083991527557,
-0.17019067704677582,
-0.600166916847229,
0.03724846616387367,
-0.24977800250053406,
-0.039453476667404175,
-0.25433453917503357,
-0.075241819024086,
-0.12406796216964722,
-0.24923306703567505,
-0.12421776354312897,
0.02692529186606407,
-0.11308614909648895,
-0.18180745840072632,
0.19951631128787994,
0.16330210864543915,
-0.3851894438266754,
0.05915895849466324,
-0.27874088287353516,
0.2953496277332306,
0.026986440643668175,
0.008584176190197468,
0.03700144588947296,
0.08548235893249512,
0.04080579802393913,
0.2772703766822815,
0.29073095321655273,
0.06653668731451035,
0.6287956237792969,
-0.31464675068855286,
0.18305037915706635,
-0.21875953674316406,
-0.5036548972129822,
0.16650390625,
-0.15426751971244812,
0.13193325698375702,
0.21562175452709198,
0.17237554490566254,
-0.09997645020484924,
-0.33962687849998474,
0.1567206233739853,
-0.38600361347198486,
-0.33198434114456177,
-0.04646966606378555,
-0.05429207533597946,
0.013893370516598225,
-0.33153703808784485,
-0.1770876944065094,
-0.03269846737384796,
-0.2762327492237091,
0.410189151763916,
0.11994215846061707,
0.013964682817459106,
0.15506413578987122,
0.09944714605808258,
0.15970267355442047,
-0.3217941224575043,
0.2671184241771698,
-0.3387695550918579,
-0.4841826260089874,
0.2318955510854721,
-0.39255398511886597,
-0.41235318779945374,
-0.19289059937000275,
-0.10431458055973053,
0.3161994516849518,
-0.05308659374713898,
-0.29534050822257996,
-0.28391361236572266,
-0.12512315809726715,
0.2562999427318573,
0.06909079104661942,
0.07942810654640198,
0.28653281927108765,
-0.03606784716248512,
-0.3148210644721985,
-0.2869908809661865,
0.009124360978603363,
0.3432370126247406,
-0.2602681815624237,
0.0930614173412323,
-0.37818777561187744,
0.019349614158272743,
0.05910998210310936,
0.325051873922348,
0.1804758757352829,
-0.22836683690547943,
0.3548697829246521,
-0.1520240604877472,
0.5535255670547485,
0.06953901797533035,
-0.18838922679424286,
0.2312798798084259,
-0.004539355635643005,
0.12521514296531677,
0.4402046799659729,
0.10306357592344284,
0.09411901980638504,
-0.0408255010843277,
0.0296800434589386,
-0.36761239171028137,
-0.32074397802352905,
0.06202971190214157,
0.10892115533351898,
0.1617337316274643,
-0.1250072419643402,
0.0586356595158577,
-0.13354671001434326,
-0.13952293992042542,
0.13392986357212067,
0.22031083703041077,
-0.048797182738780975,
-0.28488239645957947,
-0.34416329860687256,
0.010053636506199837,
-0.4193618893623352,
0.2949056625366211,
0.15922506153583527,
-0.05928107351064682,
-0.15735793113708496,
-0.1976349949836731,
-0.145862877368927,
-0.19305740296840668,
0.39511018991470337,
0.023937147110700607,
0.13955014944076538,
-0.06578238308429718,
-0.1350117325782776,
-0.13071179389953613,
0.29565292596817017,
-0.3906790614128113,
-0.10588811337947845,
0.2813071012496948,
0.39263954758644104,
-0.47023752331733704,
-0.0706678107380867,
0.07761941850185394,
0.18798132240772247,
-0.002574104815721512,
0.013698983006179333,
-0.18031230568885803,
-0.09844976663589478,
-0.16801977157592773,
0.20984378457069397,
-0.1209869310259819,
0.13467355072498322,
-0.09373129159212112,
-0.12815237045288086,
0.08984307199716568,
-0.08726496994495392,
0.3720993399620056,
0.2908610701560974,
0.2714124619960785,
0.18563760817050934,
0.10814030468463898,
0.048406217247247696,
0.16585877537727356,
0.35662123560905457,
0.35927149653434753,
-0.11868555843830109,
0.0882529616355896,
-0.1735042929649353,
-0.2214384824037552,
0.30141928791999817,
0.20301060378551483,
0.14867323637008667,
0.1415746957063675,
0.016374465078115463,
0.17712418735027313,
-0.303254097700119,
0.3258427083492279,
0.14576007425785065,
0.0752539411187172,
-0.052498966455459595,
-0.020620595663785934,
0.1941462606191635,
-0.14151476323604584,
-0.03738495707511902,
0.2611513137817383,
0.4078723192214966,
-0.301198273897171,
0.09373307973146439,
0.24438142776489258,
0.8777464628219604,
-0.004667632281780243,
0.21769623458385468,
0.29626789689064026,
-0.31051409244537354,
0.10502882301807404,
-0.11647508293390274,
0.05138017609715462,
-0.13653583824634552,
-0.3590027689933777,
0.05258767306804657,
0.048220839351415634,
0.06916322559118271,
-0.0005929619073867798,
-0.1677507758140564,
-0.06891201436519623,
0.09361870586872101,
0.1628493070602417,
-0.17223551869392395,
0.09501464664936066,
-0.1619413197040558,
-0.18699730932712555,
-0.23684749007225037,
0.33490079641342163,
0.15590375661849976,
-0.19404174387454987,
-0.15834134817123413,
-0.24056534469127655,
-0.0901217833161354,
-0.15321320295333862,
-0.03173752874135971,
-0.08579425513744354,
-0.20660968124866486,
-0.1014995202422142,
0.08339978754520416,
-0.06229887157678604,
-0.07203789800405502,
0.058249711990356445,
0.38716018199920654,
0.3838903307914734,
-0.2678081691265106,
0.10370700061321259,
0.03495485708117485,
0.01922561042010784,
-0.11530284583568573,
0.10062424838542938,
-0.0004591774195432663,
-0.1532992571592331,
-0.004865042865276337,
-0.09065944701433182,
0.19959555566310883,
-0.3959476351737976,
0.07396760582923889,
-0.06942693889141083,
-0.3752850294113159,
-0.2290606051683426,
0.038938265293836594,
0.11175327748060226,
-0.1367267519235611,
-0.2934674918651581,
0.27875038981437683,
0.10511002689599991,
-0.11439426243305206,
0.015720762312412262,
0.3547438383102417,
-0.12517787516117096,
-0.25278934836387634,
0.38340890407562256,
-0.15219247341156006,
-0.13808459043502808,
0.22416450083255768,
0.06766435503959656,
-0.2761636972427368,
-0.4785527288913727,
-0.20419126749038696,
0.1426137387752533,
-0.23389843106269836,
0.03285180404782295,
0.092086061835289,
-0.25482892990112305,
0.08803734183311462,
0.2719171941280365,
0.3056756258010864,
-0.020508810877799988,
0.2051071971654892,
-0.09581644088029861,
-0.6194849610328674,
0.28117817640304565,
-0.07657338678836823,
0.4294383227825165,
-0.02638653665781021,
0.44142770767211914,
-0.2109747678041458,
0.05650975555181503,
-0.5384541153907776,
-0.02102668210864067,
-0.31814128160476685,
-0.07985973358154297,
0.14333873987197876,
-0.13067826628684998,
0.30841222405433655,
-0.09286634624004364,
0.3257276117801666,
0.09146212786436081,
-0.31171828508377075,
-0.3644775152206421,
-0.13206756114959717,
0.051149457693099976,
-0.09963041543960571,
0.01068517379462719,
0.3214329183101654,
0.18516583740711212,
-0.13806985318660736,
-0.16655004024505615,
0.1431972086429596,
0.09878503531217575,
0.03466253727674484,
0.22427761554718018,
0.2374434620141983,
0.05274749919772148,
0.10887008905410767,
-0.2880394458770752,
0.08403804898262024,
-0.001557871699333191,
-0.07544378936290741,
-0.12136951088905334,
-0.32903626561164856,
-0.11178083717823029,
0.5154300928115845,
0.31747809052467346,
0.18260082602500916,
0.07613660395145416,
0.18189266324043274,
0.02619611844420433,
-0.2194974720478058,
0.35107848048210144,
0.43366965651512146,
-0.040293410420417786,
-0.08916423469781876,
0.11073783040046692,
0.18403181433677673,
0.45344388484954834,
-0.34575155377388,
0.0680989995598793,
0.05521364137530327,
-0.061362124979496,
0.3749158978462219,
0.25731968879699707,
0.08391833305358887,
-0.24349001049995422,
0.1740933656692505,
0.14192765951156616,
-0.14425478875637054,
-0.021044593304395676,
0.010023695416748524,
0.19066692888736725,
0.06872643530368805,
-0.13678820431232452,
0.26942235231399536,
0.02673959732055664,
0.19271737337112427,
0.17918887734413147,
-0.12620627880096436,
0.22547098994255066,
-0.3400600552558899,
0.058101117610931396,
0.03773234784603119,
-0.08174553513526917,
0.09689531475305557,
0.22721317410469055,
0.04929795861244202,
0.1836007833480835,
0.11717647314071655,
0.5696305632591248,
-0.15657837688922882,
-0.20257796347141266,
-0.35961592197418213,
0.17606019973754883,
-0.2035919725894928,
-0.08365058898925781,
-0.13763658702373505,
-0.2224748730659485,
-0.1705404669046402,
0.04113425686955452,
0.07987651228904724,
-0.0019952431321144104,
0.19155505299568176,
-0.03546781837940216,
0.06586527824401855,
-0.20868392288684845,
-0.06827422231435776,
0.10184665024280548,
0.257903516292572,
-0.1790466606616974,
0.16223032772541046,
0.31937506794929504,
0.028183136135339737,
0.22342179715633392,
0.35140714049339294,
0.24121154844760895,
-0.08719920367002487,
0.08933326601982117,
0.16269801557064056,
-0.17623108625411987,
-0.031137099489569664,
-0.3607543706893921,
0.224119633436203,
0.33614879846572876,
0.19758054614067078,
0.3792405128479004,
0.29714587330818176,
-0.3550037443637848,
-0.04022667184472084,
-0.08420173823833466,
-0.06797590851783752,
-0.0705568790435791,
0.16202911734580994,
0.021259665489196777,
-0.08453056216239929,
-0.18296755850315094,
-0.16264230012893677,
-0.4618334472179413,
0.06020683795213699,
-0.0069878194481134415,
-0.13287293910980225,
0.20821043848991394,
-0.04724667966365814,
0.16343143582344055,
0.1856044977903366,
0.5502734780311584,
0.025593411177396774,
0.12026867270469666,
-0.16980335116386414,
-0.4889596104621887,
-0.5210318565368652,
0.22356095910072327,
0.06294967234134674,
0.027837811037898064,
-0.36254897713661194,
0.07030398398637772,
0.4442737400531769,
-0.06352074444293976,
0.23737221956253052,
-0.035265903919935226,
0.12187131494283676,
-0.09820675849914551,
-0.4115130603313446,
0.15122662484645844,
-0.048800237476825714,
-0.11518514156341553,
0.2564328908920288,
-0.1479371190071106,
0.014548692852258682,
0.03332054615020752,
0.3110305666923523,
0.005245169624686241,
0.1741115003824234,
-0.2488553524017334,
-0.12338899075984955,
0.32041215896606445,
0.008249598555266857,
0.432865709066391,
-0.5732755064964294,
-0.23789244890213013,
-0.10873912274837494,
-0.013697458431124687,
-0.17552433907985687,
0.033719997853040695,
0.13923701643943787,
0.5417928695678711,
-0.02984168753027916,
-0.19665899872779846,
-0.02429211512207985,
0.3196485638618469,
0.3039907217025757,
0.028704002499580383,
-0.14466015994548798,
0.36471039056777954,
-0.0003913082182407379,
-0.20652590692043304,
-0.0516166128218174,
0.4915196895599365,
-0.0658000111579895,
-0.015351883135735989,
-0.16395917534828186,
-0.3880118429660797,
0.5056563019752502,
-0.3207925260066986,
-0.02668023109436035,
-0.034434687346220016,
0.35569819808006287,
0.18342897295951843,
-0.21938985586166382,
-0.5304561257362366,
0.24424207210540771,
0.08327190577983856,
0.10258882492780685,
-0.1924138069152832,
0.36540308594703674,
-0.16867516934871674,
-0.16410182416439056,
-0.005941428244113922,
0.4586780369281769,
0.24165022373199463,
-0.28492072224617004,
-0.04658183827996254,
-0.3411106467247009
] |
https://github.com/huggingface/datasets/issues/2508 | Load Image Classification Dataset from Local | Hi ! Is this folder structure a standard, a bit like imagenet ?
In this case maybe we can consider having a dataset loader for cifar-like, imagenet-like, squad-like, conll-like etc. datasets ?
```python
from datasets import load_dataset
my_custom_cifar = load_dataset("cifar_like", data_dir="path/to/data/dir")
```
Let me know what you think | **Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
| 48 | Load Image Classification Dataset from Local
**Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
Hi ! Is this folder structure a standard, a bit like imagenet ?
In this case maybe we can consider having a dataset loader for cifar-like, imagenet-like, squad-like, conll-like etc. datasets ?
```python
from datasets import load_dataset
my_custom_cifar = load_dataset("cifar_like", data_dir="path/to/data/dir")
```
Let me know what you think | [
-0.1711529940366745,
-0.16674669086933136,
0.031352896243333817,
0.45320117473602295,
0.2632543444633484,
-0.08111883699893951,
0.22850792109966278,
0.05178454518318176,
0.319464772939682,
0.2681328058242798,
-0.19803617894649506,
0.09343136847019196,
-0.3347459137439728,
0.39439260959625244,
0.03784604370594025,
-0.203116774559021,
-0.2279975712299347,
0.2942553758621216,
-0.19178235530853271,
-0.21730469167232513,
-0.05298947915434837,
-0.11123403906822205,
0.1236167699098587,
0.019519269466400146,
-0.2421075850725174,
0.14863604307174683,
-0.28095823526382446,
0.4919866919517517,
-0.14515089988708496,
-0.10265474021434784,
0.4892808794975281,
0.03376039117574692,
0.3682655692100525,
0.6073813438415527,
-0.00011156163964187726,
0.1082242876291275,
-0.1246427595615387,
-0.291299045085907,
-0.12202364206314087,
-0.3184725046157837,
-0.002807207405567169,
-0.12939698994159698,
0.2840099036693573,
-0.23690667748451233,
-0.45906776189804077,
-0.031031683087348938,
0.04542703181505203,
-0.3836556673049927,
0.4092212915420532,
0.21364520490169525,
0.13006241619586945,
0.07144048064947128,
-0.409070760011673,
0.04862091317772865,
-0.2243046760559082,
0.5681062936782837,
-0.14894986152648926,
0.43935370445251465,
0.3459993004798889,
-0.2117593139410019,
-0.095159150660038,
0.17549043893814087,
0.08138660341501236,
-0.012185156345367432,
0.6244925856590271,
0.32670003175735474,
-0.20126226544380188,
-0.22791579365730286,
-0.17935216426849365,
0.16795262694358826,
0.2916380763053894,
-0.13290265202522278,
-0.15209099650382996,
-0.15287242829799652,
0.10395494848489761,
-0.11917712539434433,
0.05716466158628464,
0.15176677703857422,
-0.410026490688324,
0.261583536863327,
-0.2354241907596588,
-0.14853261411190033,
-0.472870796918869,
0.16645245254039764,
-0.015712015330791473,
-0.31080999970436096,
-0.10968277603387833,
-0.03350798040628433,
0.11070463061332703,
-0.03020249307155609,
-0.06378822028636932,
-0.02255852147936821,
0.17269323766231537,
0.5213358998298645,
-0.14835453033447266,
-0.24486398696899414,
-0.062401942908763885,
0.16357919573783875,
0.0854705348610878,
-0.15679985284805298,
0.13233129680156708,
-0.06575506180524826,
-0.4273360073566437,
0.07660117745399475,
0.17424927651882172,
0.08526565134525299,
-0.06946567445993423,
0.35973647236824036,
-0.11670288443565369,
0.009934982284903526,
-0.4018888473510742,
-0.10228355973958969,
-0.37660089135169983,
-0.005997583735734224,
-0.16495734453201294,
-0.08802738040685654,
-0.08296511322259903,
-0.0514032319188118,
0.23106378316879272,
-0.21276304125785828,
0.1315825879573822,
0.17828194797039032,
0.22599369287490845,
0.22447380423545837,
0.0003827253822237253,
-0.02245417982339859,
0.10430097579956055,
-0.09693123400211334,
-0.18790456652641296,
-0.011245755478739738,
-0.1539771854877472,
0.14921584725379944,
-0.28463014960289,
0.16111508011817932,
0.059334758669137955,
-0.2404901087284088,
0.023940203711390495,
-0.223236083984375,
0.46019625663757324,
0.16442885994911194,
-0.0332617424428463,
-0.19456253945827484,
0.27851444482803345,
0.20137301087379456,
-0.33644580841064453,
-0.1555512696504593,
0.32257530093193054,
-0.12449893355369568,
-0.29274675250053406,
0.09108412265777588,
-0.41556188464164734,
-0.30236634612083435,
0.13209770619869232,
0.12751588225364685,
0.05418337881565094,
-0.11856049299240112,
-0.4537303149700165,
0.04714410752058029,
-0.3906649649143219,
-0.03769007697701454,
-0.20059463381767273,
0.0031115785241127014,
-0.384412944316864,
-0.11220710724592209,
0.32556164264678955,
0.4995099902153015,
-0.35371634364128113,
-0.19350290298461914,
-0.2759787440299988,
-0.12263429164886475,
-0.04054947942495346,
0.3582920730113983,
-0.28251829743385315,
0.3609910309314728,
-0.23162274062633514,
-0.000472240149974823,
0.3596034049987793,
-0.6408886909484863,
-0.1602460741996765,
0.36112314462661743,
-0.14685305953025818,
0.08347904682159424,
-0.11066705733537674,
0.467581570148468,
0.057320479303598404,
-0.04373147338628769,
-0.10971535742282867,
0.7292588949203491,
-0.24615055322647095,
0.10039623826742172,
0.07839134335517883,
-0.3444945812225342,
-0.05952005833387375,
0.38620707392692566,
-0.025587033480405807,
0.26123344898223877,
0.0877627581357956,
-0.12027392536401749,
0.11051195114850998,
-0.24009332060813904,
-0.016725020483136177,
-0.06607275456190109,
0.2149089127779007,
0.252571165561676,
-0.03561513125896454,
0.08568558841943741,
-0.3853400647640228,
0.3809305429458618,
0.013765152543783188,
0.23320996761322021,
-0.08945631980895996,
-0.077572301030159,
-0.10497923195362091,
-0.17977073788642883,
-0.2935766577720642,
-0.07404707372188568,
-0.019134249538183212,
0.09748653322458267,
-0.08794337511062622,
-0.19823771715164185,
-0.364677757024765,
0.36070480942726135,
-0.40329086780548096,
0.14608949422836304,
0.15566320717334747,
0.1872367411851883,
0.1924532949924469,
0.06632613390684128,
-0.2258831411600113,
0.030401986092329025,
-0.17105582356452942,
-0.21633537113666534,
-0.09010560065507889,
0.1741505265235901,
0.13178540766239166,
0.2255445122718811,
0.21038013696670532,
0.1911408007144928,
0.27521660923957825,
-0.25691094994544983,
0.08002062141895294,
-0.09539851546287537,
0.30308061838150024,
0.05047529935836792,
-0.26939982175827026,
0.4733869433403015,
-0.034620124846696854,
0.26508623361587524,
0.12306235730648041,
-0.1807815134525299,
0.038839519023895264,
-0.11778372526168823,
0.007416047155857086,
-0.06953217089176178,
0.11194419860839844,
0.4586135447025299,
0.33275702595710754,
0.24330364167690277,
-0.16772107779979706,
-0.22179773449897766,
-0.08801108598709106,
0.00763925164937973,
0.013919156044721603,
0.2951628267765045,
0.054237253963947296,
0.30940017104148865,
-0.027290893718600273,
-0.1097021996974945,
0.5220657587051392,
0.09713561087846756,
-0.14856913685798645,
0.19683235883712769,
0.17404331266880035,
0.04497915506362915,
0.006672322750091553,
-0.003708392381668091,
0.14701612293720245,
0.010973796248435974,
-0.01925988309085369,
0.19009225070476532,
-0.3261588215827942,
-0.20017631351947784,
-0.2250061184167862,
-0.04292025417089462,
-0.018886681646108627,
0.3271229863166809,
-0.028452323749661446,
-0.4352133572101593,
-0.22291257977485657,
-0.14855247735977173,
-0.05643151327967644,
0.4121342599391937,
-0.026558171957731247,
-0.1437765508890152,
-0.01140592060983181,
0.00612555630505085,
0.018856383860111237,
0.7483347654342651,
-0.027353201061487198,
-0.5523813366889954,
0.12488962709903717,
0.019250111654400826,
-0.14532482624053955,
0.08160129189491272,
0.22550450265407562,
-0.05999625846743584,
0.3380977213382721,
-0.05578751116991043,
0.029719579964876175,
-0.23997905850410461,
-0.2019125521183014,
0.23417522013187408,
-0.07942823320627213,
0.32943111658096313,
0.03421797603368759,
0.22608505189418793,
0.015108179301023483,
-0.23021619021892548,
0.28857430815696716,
-0.06191551685333252,
-0.2701323330402374,
-0.3402596116065979,
0.16755811870098114,
0.35592374205589294,
-0.18293261528015137,
-0.29139721393585205,
-0.608871579170227,
-0.3206726014614105,
0.2787875533103943,
0.4164876639842987,
0.25210779905319214,
0.2307671755552292,
0.15150198340415955,
-0.05467323958873749,
-0.16986533999443054,
0.06966018676757812,
0.11673494428396225,
-0.5177246332168579,
0.03586176037788391,
-0.21006415784358978,
-0.22049887478351593,
-0.23878367245197296,
-0.24666018784046173,
0.14577706158161163,
0.0720842182636261,
-0.38451629877090454,
-0.2613409757614136,
-0.04083229601383209,
0.15928402543067932,
-0.06182017922401428,
-0.001389533281326294,
0.1672934889793396,
-0.09545435011386871,
-0.02352805994451046,
0.03895612806081772,
0.24769780039787292,
0.07944342494010925,
0.009400995448231697,
-0.18647947907447815,
0.19171807169914246,
0.15556809306144714,
-0.12753187119960785,
0.4102592468261719,
-0.06906187534332275,
-0.20883391797542572,
0.46982166171073914,
-0.2183326929807663,
0.2523113489151001,
-0.5016579627990723,
-0.504784345626831,
0.20089802145957947,
0.2034907042980194,
-0.3791692852973938,
0.2592872977256775,
0.3521590232849121,
-0.007107574492692947,
-0.33648261427879333,
-0.1287160962820053,
-0.0697975605726242,
-0.24193449318408966,
0.3536168038845062,
0.2839043140411377,
0.3354142904281616,
-0.417928546667099,
-0.19297897815704346,
-0.19434593617916107,
-0.05679764226078987,
-0.040686994791030884,
0.6717280149459839,
0.16092605888843536,
0.00946219265460968,
-0.32189738750457764,
0.2331465482711792,
-0.009169131517410278,
-0.03326958417892456,
0.199197918176651,
-0.15522116422653198,
-0.18635420501232147,
-0.05004913732409477,
0.061695415526628494,
0.16468481719493866,
0.30632713437080383,
0.07458657026290894,
0.1010865718126297,
0.12513886392116547,
-0.4726446568965912,
-0.16903312504291534,
0.0957719087600708,
0.10850527882575989,
-0.16053780913352966,
-0.23021714389324188,
0.6902588605880737,
0.07564549893140793,
-0.3655427098274231,
0.17518670856952667,
0.1750386357307434,
-0.3738027811050415,
-0.10138735175132751,
-0.17170652747154236,
0.03599373996257782,
-0.24955680966377258,
-0.03823142498731613,
0.037548236548900604,
0.24717803299427032,
0.3213498294353485,
0.10703979432582855,
-0.1904524862766266,
-0.047384221106767654,
0.14187265932559967,
-0.07746432721614838,
0.03568243235349655,
0.2747856080532074,
0.20584221184253693,
0.21507413685321808,
0.31994161009788513,
-0.055234044790267944,
0.5318437814712524,
-0.20672117173671722,
-0.4484460949897766,
-0.00828348845243454,
0.09926478564739227,
0.37003615498542786,
0.3551429510116577,
0.1360486000776291,
-0.0077104344964027405,
0.023810336366295815,
-0.055850133299827576,
-0.7978023290634155,
0.5541272759437561,
0.07840050011873245,
-0.17196454107761383,
0.00200372701510787,
-0.45293816924095154,
0.546837568283081,
-0.05329889431595802,
-0.08428437262773514,
0.18397510051727295,
0.22372668981552124,
-0.348492830991745,
0.13050006330013275,
0.363685667514801,
1.003621220588684,
-0.2000187486410141,
0.5979264378547668,
0.1882559359073639,
0.3165772557258606,
0.18715913593769073,
0.257165789604187,
-0.11894232034683228,
-0.19893082976341248,
-0.39506733417510986,
-0.13183708488941193,
-0.1330116242170334,
0.1488867551088333,
0.11904367059469223,
0.1053663045167923,
0.10675603896379471,
-0.10866498947143555,
-0.03923129662871361,
0.04644396901130676,
0.2183549404144287,
0.020884700119495392,
-0.5506272912025452,
-0.2668243944644928,
0.1397692710161209,
0.16308219730854034,
0.37754955887794495,
-0.05525198578834534,
-0.042941197752952576,
-0.07729923725128174,
0.009942807257175446,
-0.00439453125,
-0.13919496536254883,
-0.17400218546390533,
0.0335317961871624,
0.012694615870714188,
-0.23282429575920105,
-0.05029847472906113,
0.3883981704711914,
0.2344047725200653,
0.09642292559146881,
-0.038338787853717804,
0.1355283260345459,
-0.33171775937080383,
0.192180335521698,
-0.0705684944987297,
-0.22021035850048065,
0.39995965361595154,
0.042843401432037354,
0.02660384029150009,
-0.10411057621240616,
-0.04292793199419975,
-0.43457919359207153,
-0.03058914840221405,
-0.08446264266967773,
0.6611816883087158,
-0.22106190025806427,
-0.18064510822296143,
-0.1703486144542694,
0.014989666640758514,
0.20418599247932434,
0.11528724431991577,
0.20150324702262878,
0.0900537371635437,
-0.06563732773065567,
0.20745187997817993,
-0.2563246488571167,
0.06534962356090546,
0.19793492555618286,
0.08605760335922241,
-0.43008291721343994,
0.2644721269607544,
0.028217192739248276,
0.10345898568630219,
-0.21775615215301514,
0.5871714949607849,
0.6104695796966553,
-0.05570369213819504,
0.09968473762273788,
0.2635746896266937,
-0.14791904389858246,
-0.12743239104747772,
0.7271052002906799,
0.36508387327194214,
-0.3910200893878937,
-0.23158963024616241,
-0.20751972496509552,
-0.5043407082557678,
0.18778789043426514,
-0.20773611962795258,
0.269226610660553,
-0.0096113421022892,
0.022332813590765,
0.19497650861740112,
-0.004061322659254074,
-0.31214872002601624,
0.14859773218631744,
-0.19571051001548767,
0.04609484225511551,
0.44597989320755005,
0.20564860105514526,
0.3248216509819031,
0.002192452549934387,
0.06785502284765244,
-0.08650380373001099,
-0.13294488191604614,
-0.11388983577489853,
-0.21367855370044708,
0.16442443430423737,
0.08220729231834412,
0.13183508813381195,
0.03253740072250366,
-0.23563770949840546,
-0.1330016553401947,
-0.11400911957025528,
0.10530634224414825,
-0.09798245131969452,
-0.11273881793022156,
0.15725059807300568,
-0.20522381365299225,
0.04629180580377579,
-0.16042760014533997,
0.2952699661254883,
0.00895441323518753,
0.31244006752967834,
0.21406805515289307,
-0.31429344415664673,
-0.18736658990383148,
-0.2776603698730469,
0.24085554480552673,
0.1674012690782547,
0.17924371361732483,
-0.030755922198295593,
0.21054717898368835,
0.15597665309906006,
0.23152342438697815,
0.08175849914550781,
0.3380707800388336,
-0.145469069480896,
-0.21254469454288483,
0.15474674105644226,
0.44874507188796997,
0.1892138123512268,
-0.16923663020133972,
-0.2411857545375824,
-0.10999029874801636,
-0.1559246927499771,
0.1897255778312683,
0.3677535355091095,
-0.27450495958328247,
0.3570905029773712,
-0.22247649729251862,
-0.18350723385810852,
0.2273586094379425,
0.13857144117355347,
-0.07095752656459808,
0.11364316195249557,
-0.26010164618492126,
0.0836566686630249,
0.15711228549480438,
0.2050439417362213,
0.14874333143234253,
0.4492584466934204,
-0.4987846612930298,
0.21040262281894684,
-0.4103267788887024,
0.053291529417037964,
0.3693915903568268,
-0.3706343173980713,
0.09090925753116608,
0.005235612392425537,
0.16927319765090942,
0.06788478046655655,
-0.3774768114089966,
0.24271321296691895,
-0.20505917072296143,
-0.2998979091644287,
0.04581870883703232,
0.08836892992258072,
-0.08547531068325043,
0.033792704343795776,
-0.470210462808609,
-0.041239526122808456,
-0.13524067401885986,
0.1471661776304245,
-0.10111549496650696,
-0.26011884212493896,
0.04510370269417763,
0.14020216464996338,
0.23430968821048737,
0.2619289457798004,
-0.1562955379486084,
0.24965664744377136,
0.07285919040441513,
-0.09852585196495056,
0.17052790522575378,
0.014076992869377136,
0.19737710058689117,
0.232573464512825,
0.3065912127494812,
-0.25647786259651184,
0.42073434591293335,
0.062200091779232025,
0.24700090289115906,
-0.12525446712970734,
-0.11602654308080673,
-0.06638982892036438,
-0.1322401612997055,
-0.28214791417121887,
0.2717016637325287,
0.15267953276634216,
0.15081559121608734,
-0.15915043652057648,
0.1688973754644394,
-0.13988056778907776,
0.13398168981075287,
-0.5048723220825195,
0.3854013979434967,
0.3395002484321594,
0.12749871611595154,
-0.2040964514017105,
0.2874663174152374,
-0.3802783787250519,
0.1660725325345993,
0.2698230445384979,
0.06666892766952515,
0.13989779353141785,
0.24885796010494232,
0.030734509229660034,
0.10641676187515259,
0.625642716884613,
0.156533345580101,
0.058062657713890076,
-0.40246352553367615,
-0.23864507675170898,
-0.5080854892730713,
0.07199475914239883,
0.0885123461484909,
-0.3129570484161377,
-0.007390689104795456,
0.05329400300979614,
0.23658329248428345,
0.35403579473495483,
-0.1684102863073349,
-0.2577153146266937,
0.1331724226474762,
-0.05451202392578125,
-0.2838411033153534,
-0.11304092407226562,
0.23173339664936066,
0.2961946725845337,
0.06275350600481033,
-0.377510130405426,
0.1264818012714386,
-0.2398357093334198,
0.0668146088719368,
0.25093454122543335,
-0.1073649525642395,
-0.2066173106431961,
-0.11683985590934753,
0.35518571734428406,
-0.18140998482704163,
0.10296550393104553,
0.033270008862018585,
-0.0983109325170517,
-0.11116202175617218,
-0.08309194445610046,
-0.2492649406194687,
0.004051238298416138,
0.08837486803531647,
0.4344708323478699,
-0.4324684739112854,
0.12662442028522491,
-0.5154182314872742,
-0.18088798224925995,
0.13863247632980347,
-0.11036335676908493,
-0.20505991578102112,
0.037107616662979126,
0.03025825321674347,
-0.03120126575231552,
0.009301389567553997,
0.47740134596824646,
-0.2749960422515869,
-0.2616230845451355,
-0.26509934663772583,
-0.12570127844810486,
0.5387346744537354,
-0.39541754126548767,
-0.10030005872249603,
-0.028227444738149643,
-0.03244034945964813,
-0.04262954741716385,
0.178905189037323,
-0.09986306726932526,
0.21475473046302795,
0.2795608639717102,
0.08393970131874084,
-0.1748623251914978,
0.2535269260406494,
0.14911025762557983,
-0.09453795850276947,
-0.08244399726390839,
0.1646551489830017,
-0.08353546261787415,
0.10624086856842041,
-0.09352661669254303,
-0.36271703243255615
] |
https://github.com/huggingface/datasets/issues/2508 | Load Image Classification Dataset from Local | @lhoestq I think we'll want a generic `image-folder` dataset (same as 'imagenet-like'). This is like `torchvision.datasets.ImageFolder`, and is something vision folks are used to seeing. | **Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
| 25 | Load Image Classification Dataset from Local
**Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
@lhoestq I think we'll want a generic `image-folder` dataset (same as 'imagenet-like'). This is like `torchvision.datasets.ImageFolder`, and is something vision folks are used to seeing. | [
-0.22038385272026062,
-0.17356425523757935,
0.037992339581251144,
0.4659898281097412,
0.19796529412269592,
-0.05095750838518143,
0.18018604815006256,
0.0725659430027008,
0.3113469183444977,
0.24052414298057556,
-0.14534892141819,
0.14189259707927704,
-0.2927550673484802,
0.2843790352344513,
0.08485601097345352,
-0.2747698724269867,
-0.24717065691947937,
0.3313143253326416,
-0.20568209886550903,
-0.19570091366767883,
-0.04492053762078285,
-0.12572027742862701,
0.14487724006175995,
0.004188351333141327,
-0.2547866106033325,
0.12772870063781738,
-0.24681369960308075,
0.49817177653312683,
-0.07975108176469803,
-0.0845918208360672,
0.4612983465194702,
-0.009337406605482101,
0.3770543336868286,
0.4620998501777649,
-0.00010864344949368387,
0.08189855515956879,
-0.06114530563354492,
-0.2880573570728302,
-0.07631942629814148,
-0.17622877657413483,
-0.014972500503063202,
-0.07907240837812424,
0.2707418203353882,
-0.1627686768770218,
-0.4990909993648529,
-0.014791195280849934,
0.08819986879825592,
-0.4173051714897156,
0.41798049211502075,
0.14685769379138947,
0.14345084130764008,
0.11187627911567688,
-0.3733745813369751,
0.03507755696773529,
-0.17789798974990845,
0.5875381231307983,
-0.18754549324512482,
0.3944595456123352,
0.41115325689315796,
-0.140593022108078,
-0.18945220112800598,
0.23884475231170654,
0.09907935559749603,
-0.038961511105298996,
0.6692717671394348,
0.2804868519306183,
-0.2617644667625427,
-0.1706671565771103,
-0.23996910452842712,
0.20665213465690613,
0.31815841794013977,
0.0006300397217273712,
-0.04474719613790512,
-0.10669900476932526,
0.0801902487874031,
-0.06097470968961716,
0.10266289860010147,
0.10485649853944778,
-0.4013625681400299,
0.21542637050151825,
-0.31547781825065613,
-0.2255518138408661,
-0.5069891214370728,
0.11978308856487274,
0.003808632493019104,
-0.4213099181652069,
-0.06348738819360733,
-0.0050005242228507996,
0.16669875383377075,
-0.05444125086069107,
-0.0993967354297638,
0.10496709495782852,
0.08112188428640366,
0.42288142442703247,
-0.1536218374967575,
-0.218739852309227,
-0.05599529296159744,
0.15744958817958832,
0.09806904941797256,
-0.200522318482399,
0.2193754017353058,
-0.02419443428516388,
-0.4958953261375427,
0.12779980897903442,
0.13267745077610016,
0.09801386296749115,
-0.012329332530498505,
0.3163377046585083,
-0.1417279988527298,
-0.039990607649087906,
-0.3384735882282257,
-0.08429406583309174,
-0.3632300794124603,
0.044749677181243896,
-0.2670953571796417,
-0.08914421498775482,
-0.11567948758602142,
-0.1065342128276825,
0.15916337072849274,
-0.22017896175384521,
0.12317559868097305,
0.2107807993888855,
0.1692018359899521,
0.22190427780151367,
-0.02505555748939514,
-0.0770396739244461,
0.1714550107717514,
-0.17236784100532532,
-0.19782698154449463,
-0.14103130996227264,
-0.14299330115318298,
0.10340864956378937,
-0.32449740171432495,
0.19159838557243347,
0.08783125877380371,
-0.25934791564941406,
0.06465733796358109,
-0.23241376876831055,
0.36784201860427856,
0.2796494960784912,
-0.03367523103952408,
-0.1119672954082489,
0.32587385177612305,
0.13666439056396484,
-0.39146941900253296,
-0.24331267178058624,
0.25974082946777344,
0.04652407020330429,
-0.2552488446235657,
0.13321422040462494,
-0.3724265694618225,
-0.2556302845478058,
0.05466596782207489,
0.12165021151304245,
0.10612930357456207,
-0.1501426100730896,
-0.3313508927822113,
0.1637570708990097,
-0.4754871428012848,
-0.051406294107437134,
-0.16219934821128845,
-0.014872360974550247,
-0.3337174952030182,
-0.06511266529560089,
0.3065495789051056,
0.47374939918518066,
-0.41649943590164185,
-0.17933480441570282,
-0.23163685202598572,
-0.1584119200706482,
-0.10638491064310074,
0.3455011248588562,
-0.2947668433189392,
0.2779909670352936,
-0.2246079444885254,
-0.005077637732028961,
0.2705898880958557,
-0.534937858581543,
-0.06017463654279709,
0.3036555051803589,
-0.21194295585155487,
0.03051435388624668,
-0.16403552889823914,
0.5342697501182556,
0.05014687776565552,
-0.0419982373714447,
-0.17459937930107117,
0.6611356139183044,
-0.3526686728000641,
0.04668479412794113,
0.07806529104709625,
-0.34226900339126587,
-0.06446271389722824,
0.41221651434898376,
-0.0797404795885086,
0.24069151282310486,
0.13182266056537628,
-0.11936867982149124,
-0.023629069328308105,
-0.2165367305278778,
-0.0034818360581994057,
-0.06607318669557571,
0.0811406746506691,
0.24586458504199982,
-0.07303272187709808,
0.15299594402313232,
-0.39925381541252136,
0.371170312166214,
0.009704507887363434,
0.19090817868709564,
0.031049571931362152,
-0.06211197376251221,
-0.051072657108306885,
-0.21729953587055206,
-0.17213845252990723,
-0.14603331685066223,
-0.00904712826013565,
0.16794773936271667,
-0.14346009492874146,
-0.21790972352027893,
-0.2863897383213043,
0.30250269174575806,
-0.4228334426879883,
0.11677757650613785,
0.12822958827018738,
0.1148822158575058,
0.17171339690685272,
0.018277641385793686,
-0.19401635229587555,
-0.056665144860744476,
-0.1676884889602661,
-0.23804348707199097,
-0.08035106956958771,
0.18656772375106812,
0.007544412277638912,
0.22751329839229584,
0.27195149660110474,
0.1917620301246643,
0.25240036845207214,
-0.38215741515159607,
0.15318483114242554,
-0.15043850243091583,
0.21512459218502045,
0.06284668296575546,
-0.32064032554626465,
0.39801138639450073,
-0.04544341191649437,
0.21604706346988678,
0.06680098921060562,
-0.11791796237230301,
-0.0077408235520124435,
-0.14409798383712769,
0.0915236622095108,
-0.0523042194545269,
0.12710967659950256,
0.47119319438934326,
0.26647666096687317,
0.22434939444065094,
-0.21888302266597748,
-0.19212403893470764,
-0.05959366634488106,
0.07690389454364777,
-0.011223912239074707,
0.2901335656642914,
-0.0028835684061050415,
0.2898474335670471,
0.10341832786798477,
-0.24698345363140106,
0.4035194516181946,
0.16002890467643738,
-0.17158730328083038,
0.12763503193855286,
0.1330765187740326,
0.053748875856399536,
-0.041468240320682526,
-0.024061501026153564,
0.10061919689178467,
-0.08828601986169815,
-0.1025511845946312,
0.16206036508083344,
-0.3434333801269531,
-0.1346261203289032,
-0.1863877922296524,
-0.06747088581323624,
0.03681014105677605,
0.26445040106773376,
-0.03661855310201645,
-0.48578500747680664,
-0.242070734500885,
-0.030695870518684387,
-0.11922074854373932,
0.4429275393486023,
0.0953444242477417,
-0.1255592703819275,
-0.059894733130931854,
0.038600385189056396,
0.032711613923311234,
0.8698262572288513,
-0.017757276073098183,
-0.48556649684906006,
0.1011931300163269,
0.012497549876570702,
-0.23785969614982605,
0.12738847732543945,
0.1968027651309967,
-0.10208315402269363,
0.40024736523628235,
-0.02519163489341736,
0.15548007190227509,
-0.29487988352775574,
-0.22647124528884888,
0.25182127952575684,
-0.09380969405174255,
0.2748897075653076,
0.025415800511837006,
0.16291189193725586,
0.0268959179520607,
-0.22394591569900513,
0.24279341101646423,
-0.07284995168447495,
-0.29573720693588257,
-0.4095207154750824,
0.1939195990562439,
0.3621397614479065,
-0.20874206721782684,
-0.332457572221756,
-0.4163197875022888,
-0.3412552773952484,
0.304831326007843,
0.3539644777774811,
0.2217608392238617,
0.16515932977199554,
0.14718423783779144,
0.004049742594361305,
-0.2702946960926056,
0.09460239857435226,
0.11444947868585587,
-0.4609885811805725,
-0.05908918008208275,
-0.18967632949352264,
-0.20674015581607819,
-0.22033962607383728,
-0.1727885901927948,
0.11969812214374542,
0.15681998431682587,
-0.45949482917785645,
-0.1874852180480957,
0.014501767233014107,
0.20228852331638336,
-0.06841549277305603,
-0.12153244018554688,
0.2696080207824707,
-0.06867454946041107,
-0.06757239997386932,
-0.011354289948940277,
0.19309735298156738,
0.13053788244724274,
0.01509890891611576,
-0.07666151970624924,
0.2141610085964203,
0.12008761614561081,
-0.128993958234787,
0.4839251637458801,
-0.13413791358470917,
-0.2982959449291229,
0.4586886763572693,
-0.14829640090465546,
0.2997552752494812,
-0.47321638464927673,
-0.3920406699180603,
0.2545681297779083,
0.24725818634033203,
-0.2930373549461365,
0.287958562374115,
0.3745383024215698,
-0.06341246515512466,
-0.3145255446434021,
-0.16096946597099304,
-0.009556297212839127,
-0.17707352340221405,
0.40418586134910583,
0.20898506045341492,
0.3410283625125885,
-0.44032856822013855,
-0.12494371086359024,
-0.19671300053596497,
-0.08694851398468018,
0.0050696516409516335,
0.5884599685668945,
0.27646276354789734,
0.024062540382146835,
-0.2165912687778473,
0.30375778675079346,
0.03214344009757042,
0.039933256804943085,
0.1948239505290985,
-0.12376321852207184,
-0.29565489292144775,
-0.1122802272439003,
0.08544199168682098,
0.19386914372444153,
0.28487858176231384,
0.0979410856962204,
0.048267338424921036,
0.08277864754199982,
-0.46670326590538025,
-0.0958474725484848,
0.12186591327190399,
0.15445120632648468,
-0.16744981706142426,
-0.2894252836704254,
0.5744005441665649,
0.07128416746854782,
-0.3223757743835449,
0.17515961825847626,
0.11931805312633514,
-0.37544578313827515,
-0.02783004567027092,
-0.03990853205323219,
0.18296825885772705,
-0.21039922535419464,
0.017482221126556396,
-0.010224170982837677,
0.14869408309459686,
0.34071648120880127,
0.06790748238563538,
-0.15546952188014984,
-0.07824800908565521,
0.06546955555677414,
-0.07175630331039429,
-0.029060423374176025,
0.26987773180007935,
0.24213826656341553,
0.31975772976875305,
0.4253333508968353,
-0.015142610296607018,
0.5078398585319519,
-0.1578494757413864,
-0.3838404715061188,
0.012100797146558762,
0.1267116814851761,
0.33344724774360657,
0.37101244926452637,
0.19193898141384125,
-0.03843197971582413,
0.018678568303585052,
-0.13705109059810638,
-0.8158693313598633,
0.5896149277687073,
0.07296940684318542,
-0.22319793701171875,
0.04636772722005844,
-0.2987612187862396,
0.4696882367134094,
-0.10428225994110107,
-0.10039860755205154,
0.21214096248149872,
0.1468672752380371,
-0.30208706855773926,
0.05952697992324829,
0.4889586269855499,
0.9659130573272705,
-0.256528377532959,
0.5424613356590271,
0.09194256365299225,
0.2645845413208008,
0.20192378759384155,
0.24721215665340424,
-0.0507732555270195,
-0.21403388679027557,
-0.38546475768089294,
-0.13269975781440735,
-0.11570292711257935,
0.08999652415513992,
0.028009163215756416,
0.10466571152210236,
-0.00047928327694535255,
0.03187611699104309,
0.045968636870384216,
0.05550381541252136,
0.18659865856170654,
0.11254558712244034,
-0.5767167210578918,
-0.08850662410259247,
0.16567271947860718,
0.09787192940711975,
0.3691045641899109,
-0.05015106871724129,
-0.09385265409946442,
-0.003833618015050888,
-0.005517154932022095,
0.011955320835113525,
-0.10706765949726105,
-0.1335558146238327,
0.0020823031663894653,
0.006706599146127701,
-0.20645374059677124,
-0.036845613270998,
0.32394737005233765,
0.19034673273563385,
0.04620708152651787,
-0.14602895081043243,
0.16984857618808746,
-0.26832863688468933,
0.14354307949543,
-0.03717304766178131,
-0.2572735548019409,
0.4271562993526459,
0.06038391590118408,
0.12325669080018997,
-0.08716056495904922,
-0.03428458049893379,
-0.44875532388687134,
-0.1154082864522934,
-0.14011716842651367,
0.6795430779457092,
-0.20165951550006866,
-0.04418812692165375,
-0.17131900787353516,
0.04547770693898201,
0.19474738836288452,
0.13561831414699554,
0.18813738226890564,
0.14648567140102386,
-0.14708319306373596,
0.30698662996292114,
-0.16325275599956512,
0.04228375107049942,
0.18185022473335266,
0.02069106325507164,
-0.4831428527832031,
0.13899821043014526,
0.057158615440130234,
0.13795171678066254,
-0.21869343519210815,
0.5137710571289062,
0.6890592575073242,
-0.18561002612113953,
0.09501490741968155,
0.25501587986946106,
-0.17696990072727203,
-0.08096109330654144,
0.7742310762405396,
0.36072462797164917,
-0.4379705786705017,
-0.21554845571517944,
-0.08064974099397659,
-0.5159037709236145,
0.1880485713481903,
-0.30542775988578796,
0.3426121175289154,
-0.06712360680103302,
-0.020532894879579544,
0.16776716709136963,
0.044604044407606125,
-0.3304336965084076,
0.061593085527420044,
-0.24062691628932953,
0.1268831342458725,
0.4618698060512543,
0.26175767183303833,
0.28104233741760254,
0.048701103776693344,
0.047938212752342224,
-0.09347647428512573,
-0.18094192445278168,
-0.0897054523229599,
-0.1819973587989807,
0.1569422483444214,
0.09658928960561752,
0.12959617376327515,
-0.024712085723876953,
-0.25088995695114136,
-0.16467441618442535,
-0.07659251987934113,
0.11851279437541962,
-0.21175402402877808,
-0.1617017239332199,
0.13779687881469727,
-0.1535947620868683,
0.035975415259599686,
-0.1333470344543457,
0.26761960983276367,
0.00691106915473938,
0.35296255350112915,
0.08983916789293289,
-0.3657234311103821,
-0.24567078053951263,
-0.34134578704833984,
0.2444542497396469,
0.2418670356273651,
0.1333370953798294,
0.005994707345962524,
0.19237899780273438,
0.2601996660232544,
0.16151905059814453,
0.035491738468408585,
0.33019062876701355,
-0.24506500363349915,
-0.16395926475524902,
0.13434064388275146,
0.47915178537368774,
0.2119673192501068,
-0.1309014856815338,
-0.20894275605678558,
-0.08899550139904022,
-0.20900118350982666,
0.13441024720668793,
0.29510051012039185,
-0.2345121204853058,
0.39506134390830994,
-0.047556668519973755,
-0.19036713242530823,
0.18427933752536774,
0.11069346219301224,
-0.06243709847331047,
0.14889384806156158,
-0.31555238366127014,
0.060946617275476456,
0.2417811006307602,
0.19078169763088226,
0.1738508939743042,
0.4474366307258606,
-0.508870005607605,
0.23130184412002563,
-0.35259518027305603,
0.13279715180397034,
0.43717795610427856,
-0.3301292061805725,
0.08896373212337494,
-0.0813511461019516,
0.2755254805088043,
0.13030262291431427,
-0.40827104449272156,
0.26086702942848206,
-0.19795294106006622,
-0.38858461380004883,
-0.007152317091822624,
0.09987682104110718,
-0.17697888612747192,
0.10984553396701813,
-0.5392651557922363,
-0.10547687113285065,
-0.09678211808204651,
0.21018420159816742,
-0.07887789607048035,
-0.17323875427246094,
0.13058871030807495,
0.1152079701423645,
0.17595356702804565,
0.2512296438217163,
-0.15431120991706848,
0.20875033736228943,
0.06096576154232025,
-0.05606985092163086,
0.229368656873703,
-0.05107572674751282,
0.1742604374885559,
0.3724263310432434,
0.37319302558898926,
-0.33608749508857727,
0.36722254753112793,
0.10794073343276978,
0.19731839001178741,
-0.06042405590415001,
-0.11457183212041855,
-0.07519781589508057,
-0.08535994589328766,
-0.2778792977333069,
0.2198878973722458,
0.13205420970916748,
0.13609658181667328,
-0.13982437551021576,
0.23059271275997162,
-0.2897709310054779,
0.14701172709465027,
-0.44134649634361267,
0.2855161130428314,
0.3836595118045807,
0.11161873489618301,
-0.2781763970851898,
0.26664918661117554,
-0.303193598985672,
0.15579672157764435,
0.12693287432193756,
0.04708290472626686,
0.05621611326932907,
0.22013652324676514,
0.04916238784790039,
0.040818024426698685,
0.6757799386978149,
0.12306246161460876,
-0.0002565719187259674,
-0.42201942205429077,
-0.2528708577156067,
-0.4494130611419678,
0.10869205743074417,
0.1498086154460907,
-0.29667019844055176,
0.014644837006926537,
0.019230833277106285,
0.28938084840774536,
0.3351857662200928,
-0.1327325850725174,
-0.2538820505142212,
0.2743799090385437,
-0.07673704624176025,
-0.2786463499069214,
-0.12928561866283417,
0.3408535122871399,
0.22063474357128143,
0.05678192526102066,
-0.28513869643211365,
0.20806284248828888,
-0.14783839881420135,
0.07504492253065109,
0.22634875774383545,
-0.16681674122810364,
-0.1618989259004593,
-0.08489254117012024,
0.401875376701355,
-0.16492722928524017,
0.08866317570209503,
0.0323634147644043,
-0.11470931768417358,
-0.1409023553133011,
-0.12374496459960938,
-0.2987908720970154,
-0.1430538296699524,
0.1465638428926468,
0.49596527218818665,
-0.40861672163009644,
0.10195719450712204,
-0.5701280832290649,
-0.1637083739042282,
0.1276891678571701,
0.011801487766206264,
-0.24403005838394165,
0.036494188010692596,
-0.0801195502281189,
-0.09490116685628891,
0.09797544032335281,
0.47454723715782166,
-0.18974880874156952,
-0.35232436656951904,
-0.3604653477668762,
-0.15092948079109192,
0.5336057543754578,
-0.3622502088546753,
-0.017983701080083847,
-0.0006386903114616871,
-0.10823795199394226,
0.057922713458538055,
0.13088156282901764,
-0.1344609260559082,
0.15276789665222168,
0.2543116509914398,
0.10608284920454025,
-0.12743929028511047,
0.23315265774726868,
0.14092600345611572,
-0.01773739978671074,
-0.10208207368850708,
0.18049299716949463,
-0.012253720313310623,
0.11068347096443176,
-0.09724320471286774,
-0.3407367467880249
] |
https://github.com/huggingface/datasets/issues/2508 | Load Image Classification Dataset from Local | Opening this back up, since I'm planning on tackling this. Already posted a quick version of it on my account on the hub.
```python
from datasets import load_dataset
ds = load_dataset('nateraw/image-folder', data_files='PetImages/')
``` | **Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
| 33 | Load Image Classification Dataset from Local
**Is your feature request related to a problem? Please describe.**
Yes - we would like to load an image classification dataset with datasets without having to write a custom data loader.
**Describe the solution you'd like**
Given a folder structure with images of each class in each folder, the ability to load these folders into a HuggingFace dataset like "cifar10".
**Describe alternatives you've considered**
Implement ViT training outside of the HuggingFace Trainer and without datasets (we did this but prefer to stay on the main path)
Write custom data loader logic
**Additional context**
We're training ViT on custom dataset
Opening this back up, since I'm planning on tackling this. Already posted a quick version of it on my account on the hub.
```python
from datasets import load_dataset
ds = load_dataset('nateraw/image-folder', data_files='PetImages/')
``` | [
-0.20275026559829712,
-0.1886909008026123,
0.013178259134292603,
0.40116411447525024,
0.259304404258728,
-0.02797408401966095,
0.19759707152843475,
0.14511771500110626,
0.3119904398918152,
0.2857656478881836,
-0.19353632628917694,
0.12354758381843567,
-0.30474141240119934,
0.32702136039733887,
0.06507740169763565,
-0.22926029562950134,
-0.22782519459724426,
0.33788150548934937,
-0.1562049686908722,
-0.24757908284664154,
-0.0562424436211586,
-0.09633214771747589,
0.166083425283432,
-0.008865460753440857,
-0.3098396062850952,
0.17935973405838013,
-0.24538278579711914,
0.5447190403938293,
-0.11850129812955856,
-0.10167601704597473,
0.4887927174568176,
0.03336421027779579,
0.39437615871429443,
0.5124266743659973,
-0.00010685518645914271,
0.08726650476455688,
-0.1294453740119934,
-0.26511719822883606,
-0.06088847294449806,
-0.25198954343795776,
-0.020675234496593475,
-0.15433108806610107,
0.241837278008461,
-0.2121085822582245,
-0.4997156858444214,
-0.05516127869486809,
0.046199798583984375,
-0.3964984714984894,
0.46589136123657227,
0.19286902248859406,
0.17464518547058105,
0.1268729418516159,
-0.34235039353370667,
0.026652883738279343,
-0.22405913472175598,
0.4555792808532715,
-0.13813088834285736,
0.4050813913345337,
0.40206727385520935,
-0.2422720193862915,
-0.05631265789270401,
0.27176785469055176,
0.09580834954977036,
-0.0036633312702178955,
0.5949126482009888,
0.32277151942253113,
-0.1611323356628418,
-0.2097162902355194,
-0.18577155470848083,
0.18643715977668762,
0.1650446653366089,
-0.07890691608190536,
-0.12299317866563797,
-0.18921947479248047,
0.10587023198604584,
-0.10916764289140701,
0.06453071534633636,
0.1194697842001915,
-0.4392840564250946,
0.2350858747959137,
-0.25824159383773804,
-0.1784319281578064,
-0.448018342256546,
0.09942597895860672,
0.02626621723175049,
-0.3858395516872406,
-0.0895732119679451,
-0.05669458210468292,
0.12812939286231995,
-0.023399148136377335,
-0.16730116307735443,
0.08378918468952179,
0.14295224845409393,
0.49851545691490173,
-0.16984695196151733,
-0.2242089956998825,
0.011930260807275772,
0.09449376165866852,
0.07475292682647705,
-0.16140589118003845,
0.11793485283851624,
-0.03378310054540634,
-0.45302248001098633,
0.0725456029176712,
0.19356799125671387,
0.11958658695220947,
-0.04633750021457672,
0.30496612191200256,
-0.1034984141588211,
0.00025710882619023323,
-0.41691216826438904,
-0.11911510676145554,
-0.3012647032737732,
-0.03442751616239548,
-0.1744805872440338,
-0.04680349677801132,
-0.01930358074605465,
-0.1389564722776413,
0.16125141084194183,
-0.16243574023246765,
0.1029188260436058,
0.19089064002037048,
0.15040743350982666,
0.24245882034301758,
-0.048272643238306046,
-0.003193940967321396,
0.10312847793102264,
-0.12023469805717468,
-0.22834642231464386,
-0.06363821029663086,
-0.19175218045711517,
0.1401711404323578,
-0.2598925828933716,
0.11193928122520447,
0.07595571875572205,
-0.2991686463356018,
0.04138655960559845,
-0.2150571048259735,
0.47285574674606323,
0.23091167211532593,
-0.05879451334476471,
-0.15649278461933136,
0.31777966022491455,
0.1721373349428177,
-0.3297009766101837,
-0.220026895403862,
0.3412001430988312,
-0.16476638615131378,
-0.24466940760612488,
0.09085827320814133,
-0.365121454000473,
-0.2542344331741333,
0.09028980880975723,
0.1549030840396881,
0.05807074159383774,
-0.13078202307224274,
-0.352718323469162,
0.15043410658836365,
-0.4175848662853241,
0.019151955842971802,
-0.19445893168449402,
-0.007576800882816315,
-0.34219861030578613,
-0.05169864371418953,
0.34789031744003296,
0.46906858682632446,
-0.3932279646396637,
-0.16529132425785065,
-0.16187940537929535,
-0.13979025185108185,
-0.06414008885622025,
0.31366026401519775,
-0.22971612215042114,
0.3035111725330353,
-0.1629570722579956,
-0.005273893475532532,
0.22360019385814667,
-0.5785588622093201,
-0.11556954681873322,
0.26018139719963074,
-0.13760054111480713,
0.1651304066181183,
-0.18176546692848206,
0.41978293657302856,
0.04826686903834343,
-0.023476481437683105,
-0.11054754257202148,
0.726915180683136,
-0.2688494622707367,
0.08746637403964996,
0.00787273794412613,
-0.31164923310279846,
-0.09151333570480347,
0.41748520731925964,
0.018892381340265274,
0.27932146191596985,
0.059596069157123566,
-0.0981966182589531,
0.08943580836057663,
-0.25810959935188293,
0.01992775686085224,
-0.04673781991004944,
0.225555419921875,
0.27702659368515015,
-0.0013276885729283094,
0.05827660113573074,
-0.3241298496723175,
0.41058605909347534,
-0.012333270162343979,
0.2917638421058655,
-0.1126457154750824,
-0.06836561858654022,
-0.14588874578475952,
-0.17024743556976318,
-0.27222657203674316,
-0.134783536195755,
0.047026582062244415,
0.08642944693565369,
-0.06603148579597473,
-0.15816724300384521,
-0.3154452443122864,
0.34854090213775635,
-0.42568281292915344,
0.13706640899181366,
0.13805675506591797,
0.13803455233573914,
0.18718355894088745,
-0.021699007600545883,
-0.16577383875846863,
-0.0027633532881736755,
-0.18125012516975403,
-0.17276161909103394,
-0.11711696535348892,
0.20029288530349731,
0.07996900379657745,
0.24563723802566528,
0.21900346875190735,
0.14015939831733704,
0.2687152326107025,
-0.2863897681236267,
-0.007938707247376442,
-0.0720435231924057,
0.2825770080089569,
0.08579359203577042,
-0.29184529185295105,
0.4547753930091858,
-0.0203847698867321,
0.22213689982891083,
0.10128729045391083,
-0.11007456481456757,
0.01554962433874607,
-0.12118618190288544,
0.050990305840969086,
-0.0794549360871315,
0.12321566045284271,
0.4209691882133484,
0.3136685788631439,
0.12994901835918427,
-0.177784264087677,
-0.19411355257034302,
-0.08125355839729309,
0.05860031768679619,
-0.001988425850868225,
0.26398807764053345,
0.023716788738965988,
0.2941884994506836,
0.028450578451156616,
-0.15955689549446106,
0.42019152641296387,
0.12860815227031708,
-0.1448092758655548,
0.1587548702955246,
0.07809047400951385,
0.04493853449821472,
-0.04981360584497452,
-0.010747119784355164,
0.06404824554920197,
-0.05864338576793671,
-0.007914341986179352,
0.1536598652601242,
-0.38674336671829224,
-0.13192571699619293,
-0.2363806813955307,
0.0018704663962125778,
-0.007926210761070251,
0.28523463010787964,
-0.10098116099834442,
-0.387507826089859,
-0.14908307790756226,
-0.15533170104026794,
-0.10844992101192474,
0.3473506271839142,
0.04786643758416176,
-0.13405269384384155,
-0.09208796918392181,
0.03237636014819145,
0.06454099714756012,
0.7125990986824036,
-0.02485242299735546,
-0.46919646859169006,
0.10369966924190521,
-0.04675310105085373,
-0.1814674735069275,
0.14669813215732574,
0.21568815410137177,
-0.06440386921167374,
0.3603675365447998,
-0.06692152470350266,
0.06591476500034332,
-0.2202042192220688,
-0.24786785244941711,
0.1926792562007904,
-0.0845222994685173,
0.3398306667804718,
0.022336922585964203,
0.21821117401123047,
-0.02822423167526722,
-0.1670156717300415,
0.3136245012283325,
-0.12519261240959167,
-0.22485648095607758,
-0.372147798538208,
0.15396295487880707,
0.348657488822937,
-0.2092299610376358,
-0.3167015314102173,
-0.5308421850204468,
-0.314233660697937,
0.3089391589164734,
0.4514376223087311,
0.20633520185947418,
0.2160307765007019,
0.1925136148929596,
0.020339861512184143,
-0.20600710809230804,
0.11678297072649002,
0.07099137455224991,
-0.5225778222084045,
0.02605321630835533,
-0.24021534621715546,
-0.25740233063697815,
-0.203823983669281,
-0.18804584443569183,
0.0893688052892685,
0.017909251153469086,
-0.37262868881225586,
-0.31708934903144836,
-0.09480687975883484,
0.192702054977417,
-0.09823630750179291,
-0.008916014805436134,
0.1456409990787506,
-0.07697618752717972,
-0.0927020013332367,
-0.03808079659938812,
0.2784574627876282,
0.13741648197174072,
0.022646911442279816,
-0.20678839087486267,
0.1048833355307579,
0.04211478680372238,
-0.09494568407535553,
0.3632549047470093,
-0.11899009346961975,
-0.18582268059253693,
0.49873560667037964,
-0.21889884769916534,
0.27804869413375854,
-0.5007697939872742,
-0.470510870218277,
0.15549203753471375,
0.2024281620979309,
-0.31579768657684326,
0.23610574007034302,
0.3836195170879364,
0.04170294851064682,
-0.34288662672042847,
-0.08299531042575836,
-0.011055730283260345,
-0.2468995749950409,
0.32236582040786743,
0.3423321843147278,
0.2638837993144989,
-0.3573630750179291,
-0.14199848473072052,
-0.21695049107074738,
-0.07887207716703415,
-0.0044162943959236145,
0.5882704854011536,
0.1983949840068817,
0.005052817985415459,
-0.32219770550727844,
0.23214779794216156,
-0.082027368247509,
0.00944497436285019,
0.2002619504928589,
-0.11622604727745056,
-0.24068064987659454,
-0.10602171719074249,
0.058375950902700424,
0.14899499714374542,
0.34604543447494507,
0.10161459445953369,
0.06719039380550385,
0.12306590378284454,
-0.5372576713562012,
-0.14383164048194885,
0.10073517262935638,
0.059722986072301865,
-0.2057904154062271,
-0.255479633808136,
0.6490079164505005,
0.06818688660860062,
-0.35367363691329956,
0.15852773189544678,
0.09916699677705765,
-0.34919026494026184,
-0.03281658887863159,
-0.16182370483875275,
0.06737295538187027,
-0.2876487970352173,
-0.003782808780670166,
0.03760415315628052,
0.2875197231769562,
0.2628847658634186,
0.13155615329742432,
-0.17344798147678375,
-0.017632922157645226,
0.15360993146896362,
-0.029311861842870712,
0.027831103652715683,
0.2857740521430969,
0.22905433177947998,
0.256281316280365,
0.32515427470207214,
-0.07947292923927307,
0.509340226650238,
-0.21596676111221313,
-0.47528934478759766,
-0.03890473395586014,
0.11177029460668564,
0.330912321805954,
0.3534548282623291,
0.11490460485219955,
0.0006217733025550842,
-0.031412407755851746,
-0.018764525651931763,
-0.8070134520530701,
0.5762059092521667,
0.06889878958463669,
-0.1418064683675766,
0.08667544275522232,
-0.41210249066352844,
0.4884504973888397,
-0.09917500615119934,
-0.033698443323373795,
0.1793900728225708,
0.21293281018733978,
-0.27540862560272217,
0.10616520792245865,
0.3879123628139496,
0.9502136707305908,
-0.20899532735347748,
0.5667908191680908,
0.16774863004684448,
0.2664760947227478,
0.24312610924243927,
0.23489238321781158,
-0.10476690530776978,
-0.16160863637924194,
-0.41554710268974304,
-0.10519834607839584,
-0.07668633759021759,
0.16507013142108917,
0.05885007232427597,
0.07654987275600433,
0.03806815296411514,
-0.023941434919834137,
-0.05125140771269798,
0.015295952558517456,
0.1511947065591812,
0.008729832246899605,
-0.5815856456756592,
-0.314502090215683,
0.2094789445400238,
0.15352748334407806,
0.3991641402244568,
-0.04692411422729492,
-0.06686823815107346,
-0.06173522397875786,
0.00736304372549057,
0.026992782950401306,
-0.10284136235713959,
-0.11251383274793625,
0.036290135234594345,
0.007102770730853081,
-0.2341008335351944,
-0.10180668532848358,
0.36089298129081726,
0.2642959952354431,
0.07599771022796631,
-0.12977387011051178,
0.1938926726579666,
-0.30317986011505127,
0.17490701377391815,
-0.08443494141101837,
-0.18841461837291718,
0.4033643901348114,
0.03063366562128067,
0.040238745510578156,
-0.07789263874292374,
-0.04649917781352997,
-0.4463993310928345,
-0.051500774919986725,
-0.09147864580154419,
0.5949822664260864,
-0.1436299979686737,
-0.14426098763942719,
-0.15262870490550995,
0.05576268956065178,
0.11643821001052856,
0.15654464066028595,
0.2211778461933136,
0.058963850140571594,
-0.05663936585187912,
0.258000910282135,
-0.24737173318862915,
0.07999372482299805,
0.25931158661842346,
0.07327063381671906,
-0.4243009090423584,
0.27104461193084717,
0.13120539486408234,
0.12364327907562256,
-0.23331907391548157,
0.47938477993011475,
0.5929040908813477,
-0.09431122243404388,
0.13895872235298157,
0.26276031136512756,
-0.13871344923973083,
-0.09826411306858063,
0.7520089745521545,
0.3514796495437622,
-0.42761504650115967,
-0.17810232937335968,
-0.18496279418468475,
-0.5113025307655334,
0.13922175765037537,
-0.1715737283229828,
0.33888474106788635,
0.004855450242757797,
0.07195894420146942,
0.1959528923034668,
0.02115224301815033,
-0.36290496587753296,
0.11498364061117172,
-0.27954214811325073,
0.07819913327693939,
0.36435794830322266,
0.22435137629508972,
0.3502080738544464,
-0.008418070152401924,
0.08530700951814651,
-0.02625860646367073,
-0.15960943698883057,
-0.16164818406105042,
-0.21931695938110352,
0.1357160061597824,
0.07672072947025299,
0.12132126837968826,
0.04476218298077583,
-0.1669975370168686,
-0.16484124958515167,
-0.08506307005882263,
0.15923304855823517,
-0.08061027526855469,
-0.14873087406158447,
0.19324056804180145,
-0.14174169301986694,
0.010405957698822021,
-0.10492046922445297,
0.217550590634346,
0.015971578657627106,
0.290470153093338,
0.13888214528560638,
-0.34039047360420227,
-0.23932646214962006,
-0.2667355537414551,
0.31102997064590454,
0.18645688891410828,
0.12961655855178833,
-0.017091456800699234,
0.19882500171661377,
0.17548373341560364,
0.16645170748233795,
0.043294090777635574,
0.36260780692100525,
-0.20049086213111877,
-0.22120897471904755,
0.2235449105501175,
0.46676161885261536,
0.24062028527259827,
-0.1922972947359085,
-0.21872541308403015,
-0.08077219128608704,
-0.18014304339885712,
0.21730941534042358,
0.30762481689453125,
-0.2552919387817383,
0.38368281722068787,
-0.17840273678302765,
-0.12800219655036926,
0.15896844863891602,
0.10560110211372375,
-0.06708317995071411,
0.16689084470272064,
-0.2920245826244354,
0.0753038302063942,
0.1400858759880066,
0.16390763223171234,
0.15058624744415283,
0.42413127422332764,
-0.5359815955162048,
0.2032945603132248,
-0.42836135625839233,
0.10268840193748474,
0.387052446603775,
-0.38398200273513794,
0.09441575407981873,
0.022355422377586365,
0.18999384343624115,
0.16335433721542358,
-0.3974066376686096,
0.36311930418014526,
-0.24559740722179413,
-0.3343324363231659,
-0.01524366531521082,
0.13043980300426483,
-0.11918812245130539,
0.035759665071964264,
-0.4416678249835968,
-0.061371780931949615,
-0.15142324566841125,
0.17021672427654266,
-0.06522516906261444,
-0.2150888293981552,
0.012493789196014404,
0.08243029564619064,
0.18490153551101685,
0.25376656651496887,
-0.2565476894378662,
0.2063065469264984,
0.1319909393787384,
-0.0657893717288971,
0.11269472539424896,
0.04142947494983673,
0.1676037609577179,
0.27876564860343933,
0.37830448150634766,
-0.22632262110710144,
0.41362911462783813,
0.06329160928726196,
0.21889512240886688,
-0.03347562998533249,
-0.12379828840494156,
-0.08262041211128235,
-0.04448068141937256,
-0.2586863040924072,
0.2596128582954407,
0.20828938484191895,
0.1723281443119049,
-0.200801283121109,
0.13485398888587952,
-0.18852998316287994,
0.23332127928733826,
-0.5136274695396423,
0.3722875416278839,
0.3565172255039215,
0.11054953187704086,
-0.2204439640045166,
0.2379426658153534,
-0.3508527874946594,
0.1727735847234726,
0.19168420135974884,
0.06681202352046967,
0.10187961161136627,
0.18691076338291168,
0.06009621173143387,
0.06173599138855934,
0.6641266942024231,
0.14943736791610718,
0.021015815436840057,
-0.4050767421722412,
-0.2557227611541748,
-0.5360124111175537,
0.08164967596530914,
0.10624493658542633,
-0.2939176857471466,
0.008480141870677471,
0.030625654384493828,
0.2576003074645996,
0.39802098274230957,
-0.11944308876991272,
-0.3155708312988281,
0.16355197131633759,
-0.04189162701368332,
-0.27961140871047974,
-0.1119438111782074,
0.2454470694065094,
0.21006710827350616,
0.08102287352085114,
-0.308484822511673,
0.18343549966812134,
-0.21360349655151367,
0.11777660995721817,
0.24911543726921082,
-0.10128235816955566,
-0.19141775369644165,
-0.11909040808677673,
0.3701431155204773,
-0.13826504349708557,
0.07339025288820267,
-0.0025673098862171173,
-0.10671654343605042,
-0.12259551882743835,
-0.13005584478378296,
-0.27267545461654663,
-0.07443561404943466,
0.07214047014713287,
0.5224918127059937,
-0.4053124487400055,
0.0876043438911438,
-0.4886484444141388,
-0.09441196918487549,
0.18753285706043243,
-0.06869416683912277,
-0.2719264030456543,
0.045387618243694305,
0.07303812354803085,
-0.0700622946023941,
0.010301063768565655,
0.5261640548706055,
-0.23777493834495544,
-0.2638459801673889,
-0.3279534578323364,
-0.19582393765449524,
0.5588268041610718,
-0.41330623626708984,
-0.13756798207759857,
-0.06331268697977066,
-0.04752890765666962,
-0.043731965124607086,
0.07300938665866852,
-0.16225053369998932,
0.20039129257202148,
0.2113153040409088,
0.12491673976182938,
-0.21200679242610931,
0.3038727343082428,
0.13361334800720215,
-0.058834902942180634,
-0.08380244672298431,
0.14373116195201874,
-0.028081797063350677,
0.14666473865509033,
-0.06020016223192215,
-0.3650999665260315
] |
https://github.com/huggingface/datasets/issues/2503 | SubjQA wrong boolean values in entries | @arnaudstiegler I have just checked that these mismatches are already present in the original dataset: https://github.com/megagonlabs/SubjQA
We are going to contact the dataset owners to report this. | ## Describe the bug
SubjQA seems to have a boolean that's consistently wrong.
It defines:
- question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective).
- is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective)
However, `is_ques_subjective` seems to have wrong values in the entire dataset.
For instance, in the example in the dataset card, we have:
- "question_subj_level": 2
- "is_ques_subjective": false
However, according to the description, the question should be subjective since the `question_subj_level` is below 4
| 27 | SubjQA wrong boolean values in entries
## Describe the bug
SubjQA seems to have a boolean that's consistently wrong.
It defines:
- question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective).
- is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective)
However, `is_ques_subjective` seems to have wrong values in the entire dataset.
For instance, in the example in the dataset card, we have:
- "question_subj_level": 2
- "is_ques_subjective": false
However, according to the description, the question should be subjective since the `question_subj_level` is below 4
@arnaudstiegler I have just checked that these mismatches are already present in the original dataset: https://github.com/megagonlabs/SubjQA
We are going to contact the dataset owners to report this. | [
0.12356564402580261,
0.06930410861968994,
0.027031660079956055,
0.16452065110206604,
-0.3365960717201233,
-0.006898857653141022,
0.08650696277618408,
0.045239441096782684,
-0.09279720485210419,
0.18643856048583984,
-0.0919596403837204,
0.4202962815761566,
0.2149701714515686,
0.2549102306365967,
-0.21842701733112335,
0.1229734793305397,
0.2286490797996521,
0.18424063920974731,
-0.13636015355587006,
-0.15472087264060974,
-0.4317787289619446,
0.2605760991573334,
-0.5335962772369385,
-0.011904552578926086,
-0.1275147795677185,
-0.20236587524414062,
-0.13335834443569183,
-0.1422058343887329,
-0.22388438880443573,
-0.29324623942375183,
0.07300077378749847,
-0.03353968635201454,
-0.08117686957120895,
0.12340879440307617,
-0.00010932749137282372,
-0.2034589797258377,
0.05263723433017731,
0.01623287983238697,
-0.21767905354499817,
0.07691710442304611,
-0.26178064942359924,
-0.04175575077533722,
-0.1978147327899933,
0.04866848140954971,
-0.33576875925064087,
-0.4470197558403015,
-0.20890282094478607,
-0.26836711168289185,
0.38990795612335205,
0.00910001527518034,
0.1720300018787384,
0.06109726428985596,
-0.16620317101478577,
0.24745646119117737,
0.3539653420448303,
-0.1808384209871292,
-0.04923645406961441,
0.24323156476020813,
-0.043777018785476685,
-0.046364396810531616,
0.15075457096099854,
0.3817000985145569,
0.08788774162530899,
0.079287588596344,
0.11952698230743408,
-0.13141968846321106,
-0.06438343971967697,
-0.24493488669395447,
0.2853112518787384,
0.2433767318725586,
0.340031236410141,
-0.14749619364738464,
-0.4372360408306122,
-0.08656167984008789,
-0.06885112822055817,
-0.1194220632314682,
0.272938996553421,
0.02678106352686882,
0.13243429362773895,
-0.04655801132321358,
0.10462566465139389,
0.39836403727531433,
0.10855431854724884,
-0.04107508808374405,
-0.11356381326913834,
0.1411973536014557,
-0.12439678609371185,
-0.02822919934988022,
-0.18967483937740326,
-0.11828315258026123,
0.016792835667729378,
0.0029044412076473236,
-0.6352518200874329,
0.10342659801244736,
-0.4720302224159241,
-0.055229220539331436,
-0.0651552602648735,
0.15203721821308136,
-0.15406957268714905,
-0.3375008702278137,
0.2958478331565857,
-0.050365008413791656,
0.20317378640174866,
0.13815027475357056,
0.5345703363418579,
0.25543278455734253,
0.3524949848651886,
-0.20063485205173492,
-0.09164541959762573,
-0.25440898537635803,
0.04281711205840111,
0.06384878605604172,
0.19854530692100525,
-0.278859406709671,
-0.00280202180147171,
0.08877864480018616,
0.10842311382293701,
-0.3041124939918518,
-0.5812079310417175,
0.15725718438625336,
-0.40011435747146606,
-0.045035798102617264,
0.13402099907398224,
0.09278518706560135,
0.04765303432941437,
-0.22273018956184387,
-0.09906637668609619,
0.020952187478542328,
-0.13459230959415436,
-0.47820037603378296,
-0.12395200878381729,
-0.023846779018640518,
-0.1999007761478424,
0.05449404567480087,
0.0194699726998806,
-0.018034212291240692,
-0.002073378302156925,
0.3719305098056793,
-0.1979912668466568,
-0.2239193469285965,
0.009151708334684372,
-0.2884501814842224,
0.22148236632347107,
0.20325511693954468,
-0.24966631829738617,
0.20088034868240356,
0.04937181994318962,
-0.05211425945162773,
-0.014767415821552277,
0.338778018951416,
0.08916909992694855,
0.18195921182632446,
-0.036985404789447784,
0.18043853342533112,
-0.0891750305891037,
-0.05787447839975357,
0.14108487963676453,
0.32336485385894775,
0.21533715724945068,
0.038241494446992874,
0.0631319135427475,
-0.20672349631786346,
-0.15594254434108734,
-0.09162288904190063,
-0.03643026947975159,
0.15023957192897797,
-0.6753095388412476,
-0.10317765921354294,
-0.008157084695994854,
0.23791278898715973,
0.011878684163093567,
0.180616095662117,
0.19111602008342743,
0.2914668619632721,
0.07678668946027756,
-0.08618666231632233,
-0.27438801527023315,
0.19276340305805206,
-0.42520707845687866,
0.0999392420053482,
0.42203396558761597,
-0.0812639445066452,
-0.23457258939743042,
0.2056291699409485,
0.17051267623901367,
0.03482823073863983,
0.1862516701221466,
0.07118331640958786,
0.09806478023529053,
-0.10929189622402191,
-0.4336036443710327,
-0.06822045892477036,
-0.019869688898324966,
0.20168441534042358,
-0.18399567902088165,
-0.07026215642690659,
0.05195547640323639,
-0.48572829365730286,
0.13697825372219086,
0.1761038899421692,
-0.2915925085544586,
0.07503335177898407,
0.45790934562683105,
-0.3810136318206787,
0.286334753036499,
0.03770201653242111,
0.11688182502985,
0.1942809820175171,
-0.40586531162261963,
0.00258558988571167,
0.5612455606460571,
-0.09352846443653107,
-0.19901803135871887,
0.10169486701488495,
0.0479903370141983,
-0.1811894029378891,
0.12318111956119537,
0.14439329504966736,
-0.34422406554222107,
-0.031230153515934944,
-0.2829023599624634,
-0.06185207515954971,
0.11431293189525604,
-0.06969963014125824,
0.13980476558208466,
-0.13273917138576508,
-0.07713281363248825,
0.05674704536795616,
0.4595973491668701,
0.34036022424697876,
0.44744065403938293,
0.06925519555807114,
-0.09828981757164001,
0.17804667353630066,
0.08166670054197311,
-0.10032868385314941,
-0.13978835940361023,
-0.215881809592247,
-0.09324108064174652,
-0.10094165056943893,
0.048600032925605774,
0.5878673791885376,
-0.09767099469900131,
0.34598222374916077,
0.154442697763443,
0.4633136987686157,
0.08115644752979279,
-0.14658322930335999,
-0.30199235677719116,
0.2043396532535553,
-0.03048776462674141,
-0.19462750852108002,
-0.1729120910167694,
-0.40563198924064636,
0.23564684391021729,
0.05240509659051895,
-0.0895465761423111,
0.24771979451179504,
0.1411382406949997,
0.2954137325286865,
0.3167262375354767,
-0.18549789488315582,
0.2649509906768799,
-0.2104395031929016,
-0.02029705047607422,
-0.06528441607952118,
0.2469474971294403,
0.4416827857494354,
0.11517789959907532,
0.19547215104103088,
-0.09817805886268616,
-0.0625016912817955,
-0.1693165898323059,
-0.04542405903339386,
0.2141803503036499,
0.16796794533729553,
-0.2550601065158844,
-0.00837293267250061,
0.05599489063024521,
0.15833680331707,
-0.21402806043624878,
0.7436458468437195,
-0.056171491742134094,
0.042921170592308044,
-0.32199427485466003,
0.3840668499469757,
-0.316583514213562,
-0.3022708296775818,
0.006538695190101862,
-0.5269254446029663,
0.028217054903507233,
-0.22704565525054932,
0.4689013957977295,
-0.39127880334854126,
-0.4067310392856598,
0.3903203308582306,
0.42096561193466187,
0.6782053709030151,
-0.1489884853363037,
0.19567438960075378,
-0.028305742889642715,
-0.05630122497677803,
-0.5697381496429443,
0.07571534812450409,
0.03661191090941429,
-0.23676829040050507,
0.05959651619195938,
-0.1379314810037613,
-0.1368681788444519,
-0.007210312411189079,
-0.27687621116638184,
0.1192593201994896,
0.0006520897150039673,
1.0724869966506958,
-0.26951801776885986,
-0.1467302441596985,
-0.11903492361307144,
0.11935339868068695,
-0.15747322142124176,
0.1590283364057541,
-0.05399100482463837,
0.09066931158304214,
-0.17395862936973572,
-0.16750773787498474,
-0.1246674656867981,
-0.3515959084033966,
0.03825753927230835,
0.0046208202838897705,
-0.1437680572271347,
-0.2055479735136032,
0.2674574553966522,
0.44658195972442627,
-0.16141249239444733,
-0.399371474981308,
0.07139332592487335,
-0.017341017723083496,
-0.3348316252231598,
-0.2631751000881195,
0.33404454588890076,
0.05222581699490547,
-0.5183655023574829,
-0.0925905853509903,
-0.12972493469715118,
0.4031529128551483,
-0.26574790477752686,
-0.3338996171951294,
0.30034148693084717,
0.0676514282822609,
-0.2214173823595047,
0.3181120753288269,
-0.39684441685676575,
-0.14733581244945526,
-0.27910828590393066,
-0.12106679379940033,
-0.15482334792613983,
-0.624026358127594,
0.13611310720443726,
0.1735401153564453,
0.45682287216186523,
-0.04876396805047989,
0.14952395856380463,
0.155635267496109,
-0.042530179023742676,
0.3412085175514221,
0.165167897939682,
0.31197741627693176,
0.31864282488822937,
0.335690975189209,
0.08319166302680969,
-0.2547820210456848,
0.37566855549812317,
-0.027398794889450073,
-0.21273887157440186,
0.3895859122276306,
0.0599050298333168,
-0.22885943949222565,
-0.1277027130126953,
-0.18005824089050293,
-0.3049181401729584,
-0.04357069730758667,
-0.22001659870147705,
-0.19133585691452026,
-0.08325346559286118,
0.2246246635913849,
0.39756888151168823,
0.0006996933370828629,
-0.11591749638319016,
0.004277131520211697,
0.027291812002658844,
0.11277052760124207,
0.007455875165760517,
-0.12311482429504395,
-0.2056867927312851,
0.12326826900243759,
0.25218361616134644,
-0.2121993452310562,
0.4180160462856293,
0.04515896365046501,
-0.009737150743603706,
0.043247517198324203,
-0.0618414469063282,
0.3363802433013916,
0.10824193060398102,
0.1873946189880371,
0.16635507345199585,
0.29251742362976074,
-0.37216174602508545,
-0.2799002528190613,
0.029969055205583572,
0.05265756696462631,
0.39840009808540344,
-0.24954915046691895,
0.03456256538629532,
0.1566701978445053,
0.1528947949409485,
-0.24421916902065277,
-0.39428701996803284,
-0.39825916290283203,
-0.5250515341758728,
-0.0674077644944191,
0.07311905920505524,
-0.21327805519104004,
-0.08598331362009048,
-0.04576801881194115,
0.03691980987787247,
-0.22668953239917755,
-0.0952136442065239,
-0.2053312361240387,
0.11773146688938141,
0.36156541109085083,
0.17255163192749023,
-0.13220922648906708,
0.3831835389137268,
0.05722189322113991,
0.4139151871204376,
0.01337596494704485,
0.26560744643211365,
-0.0019583217799663544,
0.164422869682312,
0.01575491949915886,
-0.13113684952259064,
-0.021649383008480072,
0.011954054236412048,
-0.11180655658245087,
0.14196650683879852,
0.07806547731161118,
-0.00046225637197494507,
-0.2904461920261383,
-0.23819942772388458,
0.19093863666057587,
0.29209303855895996,
0.13831613957881927,
-0.22429709136486053,
0.5193614363670349,
-0.2695472836494446,
-0.36411231756210327,
0.1406289041042328,
0.1554795503616333,
0.04879596829414368,
0.43079549074172974,
0.5219878554344177,
0.7752361297607422,
0.024951163679361343,
-0.19947481155395508,
0.023230813443660736,
-0.5342606902122498,
0.22769467532634735,
0.18811044096946716,
0.06588828563690186,
-0.3278454840183258,
-0.022209685295820236,
0.04158284515142441,
0.05122775956988335,
0.0864020437002182,
-0.07821114361286163,
-0.2384384125471115,
0.2436138540506363,
-0.06143251806497574,
0.24186572432518005,
0.19699949026107788,
-0.4235362112522125,
0.04831717163324356,
0.20416978001594543,
0.07956458628177643,
0.16673342883586884,
0.05051068216562271,
0.24431529641151428,
-0.13791853189468384,
0.043410178273916245,
0.013646956533193588,
-0.03385251387953758,
-0.22219720482826233,
-0.06915964186191559,
-0.06499713659286499,
-0.17926688492298126,
0.5730499029159546,
0.04419265687465668,
-0.14023439586162567,
0.35587966442108154,
0.7642985582351685,
0.03354453295469284,
-0.13019056618213654,
0.242331862449646,
0.0350242517888546,
0.13537545502185822,
-0.02436373569071293,
-0.03339279443025589,
0.38631191849708557,
-0.16369959712028503,
-0.2512913942337036,
-0.05706550180912018,
0.2584724724292755,
0.13364028930664062,
-0.5338661670684814,
0.18520855903625488,
0.1505403220653534,
-0.06883569061756134,
0.26953062415122986,
-0.37627607583999634,
0.4878801703453064,
-0.33133748173713684,
0.16497111320495605,
-0.047472089529037476,
0.15321892499923706,
0.2749256193637848,
-0.2633229196071625,
-0.11573633551597595,
-0.24743707478046417,
0.0408620610833168,
0.12184285372495651,
0.4315548837184906,
0.23133119940757751,
-0.19391879439353943,
0.009841613471508026,
-0.17579996585845947,
0.17534276843070984,
0.12736177444458008,
0.19774097204208374,
-0.10554323345422745,
-0.18236307799816132,
-0.3872092664241791,
-0.11938472092151642,
0.4147983193397522,
0.35922539234161377,
0.10231076925992966,
-0.0635269358754158,
-0.45720186829566956,
-0.011848067864775658,
0.17010989785194397,
-0.25865083932876587,
0.02496158890426159,
0.04140235483646393,
-0.009908787906169891,
0.04542332887649536,
0.4727863669395447,
-0.2946557402610779,
-0.2848924398422241,
-0.1437348574399948,
-0.11454068124294281,
-0.07920175045728683,
-0.15563634037971497,
-0.06097275763750076,
0.013185076415538788,
0.08099303394556046,
-0.2546260952949524,
-0.09117740392684937,
-0.13494601845741272,
-0.2378510981798172,
0.0759965255856514,
0.18582546710968018,
0.13576164841651917,
-0.2410290539264679,
-0.09685801714658737,
-0.05284618213772774,
-0.03841012343764305,
-0.08517320454120636,
-0.14011994004249573,
0.17088979482650757,
0.5099930167198181,
-0.2567965090274811,
-0.06652819365262985,
-0.06876853108406067,
0.11678564548492432,
0.1696683168411255,
-0.09223221242427826,
0.06039034202694893,
-0.024142034351825714,
-0.03748134523630142,
-0.09158516675233841,
-0.09868847578763962,
0.11595875024795532,
-0.30268394947052,
0.025761689990758896,
0.12229235470294952,
-0.18050970137119293,
0.23523163795471191,
0.013227980583906174,
0.06678459793329239,
-0.041105419397354126,
-0.06709470599889755,
-0.1620510369539261,
-0.06094341725111008,
0.1795119196176529,
-0.36090147495269775,
-0.28597262501716614,
-0.5163062810897827,
0.07936654984951019,
-0.025766313076019287,
0.16782651841640472,
0.09591624140739441,
-0.12927892804145813,
-0.08631142973899841,
-0.04901918023824692,
0.14146548509597778,
-0.08609951287508011,
-0.09712822735309601,
0.16564685106277466,
-0.1560972034931183,
0.05254470929503441,
0.3499765992164612,
0.05128460377454758,
0.008799508213996887,
0.6680777668952942,
-0.0368148609995842,
0.28587010502815247,
0.39554765820503235,
0.161746546626091,
-0.02362414449453354,
0.05408841744065285,
0.7669573426246643,
0.7463685870170593,
0.06612476706504822,
-0.07790333777666092,
0.13202577829360962,
-0.18196189403533936,
0.06649486720561981,
-0.32911935448646545,
-0.36710071563720703,
-0.20426754653453827,
-0.14627143740653992,
-0.2567377984523773,
-0.7162521481513977,
-0.15720319747924805,
0.02450539916753769,
-0.15849743783473969,
-0.20331305265426636,
-0.1467425525188446,
-0.13357007503509521,
0.010622765868902206,
-0.27287596464157104,
-0.06993409246206284,
-0.33882978558540344,
0.3155479431152344,
-0.024283520877361298,
-0.09996449202299118,
0.4305466413497925,
-0.023444533348083496,
0.23843121528625488,
0.41218847036361694,
0.20023587346076965,
0.18856900930404663,
0.3959144949913025,
-0.34547969698905945,
0.08068017661571503,
-0.0005038939416408539,
-0.25427794456481934,
0.03888195380568504,
0.1794077455997467,
-0.13216787576675415,
0.4886123239994049,
0.2490166574716568,
0.057808488607406616,
-0.0644315704703331,
0.24688264727592468,
0.044487547129392624,
0.7353174686431885,
-0.31022384762763977,
0.0769423097372055,
-0.2547961473464966,
0.01981981098651886,
0.10258570313453674,
0.008967123925685883,
-0.2493952214717865,
-0.21082335710525513,
-0.10927604138851166,
0.013548079878091812,
0.153376042842865,
0.14156730473041534,
0.11175549030303955,
-0.11675901710987091,
0.3674063980579376,
0.0092887282371521,
0.3763059079647064,
-0.2092631310224533,
0.033728331327438354,
-0.6373869180679321,
0.00887337327003479,
0.33277273178100586,
0.09586900472640991,
0.22323431074619293,
-0.039627134799957275,
0.13146944344043732,
0.3173556923866272,
0.2348482310771942,
0.4174257218837738,
-0.00005196221172809601,
-0.303464412689209,
-0.5666865706443787,
-0.1190757155418396,
0.2442636340856552,
0.15386560559272766,
-0.007622698321938515,
-0.06591413915157318,
0.3218998908996582,
0.0929826945066452,
0.018220938742160797,
0.31799817085266113,
-0.34381118416786194,
0.2634424865245819,
0.07506045699119568,
0.10028839111328125,
0.25695502758026123,
0.03465043753385544,
0.04829031974077225,
-0.09143999218940735,
0.0513274148106575,
0.08391428738832474,
-0.3272610008716583,
-0.19086045026779175,
-0.13390734791755676,
0.45773282647132874,
0.16185563802719116,
-0.10289986431598663,
0.07809644937515259,
0.15821540355682373,
0.1992506980895996,
-0.3002580404281616,
-0.30784910917282104,
0.21934983134269714,
0.26223286986351013,
0.09816665947437286,
-0.024988573044538498,
0.07753026485443115,
0.01793650910258293,
0.30353567004203796,
-0.2655320167541504,
-0.14245784282684326,
0.4916680157184601,
-0.5384695529937744,
0.24424435198307037,
-0.01645328663289547,
0.4995487928390503,
0.1762416660785675,
-0.13709323108196259,
-0.10338636487722397,
-0.11875796318054199,
0.3682962656021118,
-0.16111180186271667,
-0.12322759628295898,
0.08270522952079773,
-0.031023740768432617,
0.19079546630382538,
-0.017548760399222374,
0.15479356050491333,
0.3163713216781616,
-0.16366013884544373,
0.3270501494407654,
-0.14998596906661987
] |
https://github.com/huggingface/datasets/issues/2503 | SubjQA wrong boolean values in entries | I have:
- opened an issue in their repo: https://github.com/megagonlabs/SubjQA/issues/3
- written an email to all the paper authors | ## Describe the bug
SubjQA seems to have a boolean that's consistently wrong.
It defines:
- question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective).
- is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective)
However, `is_ques_subjective` seems to have wrong values in the entire dataset.
For instance, in the example in the dataset card, we have:
- "question_subj_level": 2
- "is_ques_subjective": false
However, according to the description, the question should be subjective since the `question_subj_level` is below 4
| 19 | SubjQA wrong boolean values in entries
## Describe the bug
SubjQA seems to have a boolean that's consistently wrong.
It defines:
- question_subj_level: The subjectiviy level of the question (on a 1 to 5 scale with 1 being the most subjective).
- is_ques_subjective: A boolean subjectivity label derived from question_subj_level (i.e., scores below 4 are considered as subjective)
However, `is_ques_subjective` seems to have wrong values in the entire dataset.
For instance, in the example in the dataset card, we have:
- "question_subj_level": 2
- "is_ques_subjective": false
However, according to the description, the question should be subjective since the `question_subj_level` is below 4
I have:
- opened an issue in their repo: https://github.com/megagonlabs/SubjQA/issues/3
- written an email to all the paper authors | [
0.17107336223125458,
0.05873498320579529,
0.044212158769369125,
0.09914536774158478,
-0.31854403018951416,
-0.10435988754034042,
0.09934553503990173,
0.02440829947590828,
-0.14664655923843384,
0.2234862744808197,
-0.06140277534723282,
0.3840130567550659,
0.22751617431640625,
0.22797374427318573,
-0.27284955978393555,
0.11014193296432495,
0.2479695975780487,
0.1666608452796936,
-0.07002267241477966,
-0.18006184697151184,
-0.45206499099731445,
0.259962797164917,
-0.6040434241294861,
-0.040531471371650696,
-0.12444446235895157,
-0.23899230360984802,
-0.12357250601053238,
-0.161175936460495,
-0.31973329186439514,
-0.2684793770313263,
0.02289476804435253,
-0.002461448311805725,
-0.070696160197258,
0.11735321581363678,
-0.00011124740558443591,
-0.19526797533035278,
0.07515211403369904,
0.01766798458993435,
-0.2246192991733551,
0.08561059087514877,
-0.1955978274345398,
-0.09285107254981995,
-0.2246858924627304,
0.04008827358484268,
-0.3261658847332001,
-0.4419410526752472,
-0.20200218260288239,
-0.21903672814369202,
0.35370737314224243,
0.025561977177858353,
0.1417028307914734,
0.01580551639199257,
-0.11255204677581787,
0.25668391585350037,
0.34051331877708435,
-0.24264086782932281,
-0.10258208960294724,
0.24941974878311157,
-0.019455090165138245,
-0.045754656195640564,
0.11296483129262924,
0.3713183104991913,
0.1074480265378952,
0.09997667372226715,
0.08085592091083527,
-0.06490499526262283,
-0.001437462866306305,
-0.2529066503047943,
0.26937583088874817,
0.22898069024085999,
0.32893136143684387,
-0.14686211943626404,
-0.4584592580795288,
-0.09658148884773254,
-0.0855322927236557,
-0.09768062829971313,
0.27906718850135803,
0.03828537464141846,
0.11279632151126862,
-0.02640378847718239,
0.1741410195827484,
0.4021875560283661,
0.08610004186630249,
-0.011823281645774841,
-0.11401820182800293,
0.11759096384048462,
-0.1791197955608368,
-0.04281005263328552,
-0.11246739327907562,
-0.13376052677631378,
-0.049531277269124985,
0.010883796960115433,
-0.6033583283424377,
0.12035425007343292,
-0.4970496892929077,
-0.023889297619462013,
0.03688038885593414,
0.11412675678730011,
-0.14819110929965973,
-0.37020057439804077,
0.30331510305404663,
-0.05320914834737778,
0.20162734389305115,
0.21209841966629028,
0.516777753829956,
0.21399351954460144,
0.3768245279788971,
-0.21538887917995453,
-0.058861374855041504,
-0.21953827142715454,
0.06174849346280098,
0.018637286499142647,
0.16079668700695038,
-0.28326141834259033,
0.03608851507306099,
0.04941792041063309,
0.13755559921264648,
-0.27505847811698914,
-0.5347520112991333,
0.11727634817361832,
-0.4085179269313812,
-0.035644084215164185,
0.15202894806861877,
0.08247298002243042,
0.052298761904239655,
-0.2182784080505371,
-0.12426400929689407,
-0.014275789260864258,
-0.18097251653671265,
-0.46639102697372437,
-0.10261242836713791,
-0.012675859034061432,
-0.24218939244747162,
0.07046693563461304,
0.009584683924913406,
-0.005173832178115845,
-0.03266032040119171,
0.36104631423950195,
-0.1792069524526596,
-0.23111525177955627,
-0.0455448217689991,
-0.319203644990921,
0.21024571359157562,
0.15663012862205505,
-0.25756916403770447,
0.17693684995174408,
0.01846092939376831,
-0.08858451247215271,
0.011378884315490723,
0.3068144917488098,
0.13143135607242584,
0.21601377427577972,
-0.026500793173909187,
0.1529015153646469,
-0.04883120208978653,
-0.01942494511604309,
0.13057905435562134,
0.34278127551078796,
0.2295737862586975,
0.076658234000206,
0.0978994220495224,
-0.12460026144981384,
-0.10844746232032776,
-0.12016644328832626,
-0.007498347200453281,
0.09307609498500824,
-0.5938047170639038,
-0.09565582871437073,
0.002829108852893114,
0.2563049793243408,
0.006008647382259369,
0.16146220266819,
0.23525753617286682,
0.32175371050834656,
0.10386697947978973,
-0.06968208402395248,
-0.27986884117126465,
0.17832930386066437,
-0.4563192129135132,
0.1051226407289505,
0.4366210699081421,
-0.12204449623823166,
-0.2218266725540161,
0.20335735380649567,
0.1472884863615036,
0.0721241757273674,
0.14846032857894897,
0.060656893998384476,
0.09197734296321869,
-0.09786290675401688,
-0.42956051230430603,
-0.018879342824220657,
-0.04615597426891327,
0.19466684758663177,
-0.1881415694952011,
-0.06674943119287491,
0.07512322813272476,
-0.4497658908367157,
0.13885992765426636,
0.20895658433437347,
-0.2969641387462616,
0.0651317834854126,
0.4925540089607239,
-0.4521815776824951,
0.29076093435287476,
0.02848811447620392,
0.14246787130832672,
0.18904688954353333,
-0.4601030647754669,
0.018778596073389053,
0.5386309623718262,
-0.08748912066221237,
-0.21669405698776245,
0.09646499156951904,
0.07628563046455383,
-0.18289677798748016,
0.12644138932228088,
0.09423808753490448,
-0.3206944763660431,
0.04401150718331337,
-0.24634727835655212,
-0.07239528745412827,
0.11738455295562744,
-0.05388263240456581,
0.16549399495124817,
-0.12312882393598557,
-0.08290024101734161,
0.010214672423899174,
0.500478982925415,
0.3310021460056305,
0.44760027527809143,
0.08240064233541489,
-0.08407746255397797,
0.17008273303508759,
0.09187103062868118,
-0.09969501197338104,
-0.14697140455245972,
-0.21267317235469818,
-0.14874626696109772,
-0.0451180599629879,
0.017672952264547348,
0.5685977339744568,
-0.09613475948572159,
0.35595667362213135,
0.11582334339618683,
0.42052799463272095,
0.068166583776474,
-0.15105143189430237,
-0.2987356185913086,
0.1734161376953125,
-0.01585712656378746,
-0.21662548184394836,
-0.2364969104528427,
-0.3514857590198517,
0.18234220147132874,
0.07841674983501434,
-0.11229726672172546,
0.22937147319316864,
0.21494096517562866,
0.24027812480926514,
0.3250112533569336,
-0.1460167020559311,
0.3074643909931183,
-0.19753921031951904,
0.013595446944236755,
-0.06153425574302673,
0.23450620472431183,
0.38914579153060913,
0.04157785326242447,
0.15500286221504211,
-0.11605361104011536,
-0.086148701608181,
-0.13979099690914154,
-0.031043512746691704,
0.16612733900547028,
0.20367860794067383,
-0.2768186926841736,
-0.053408876061439514,
0.04035615921020508,
0.136725515127182,
-0.1804145872592926,
0.7738119959831238,
-0.06619592010974884,
0.06290962547063828,
-0.28416433930397034,
0.40800797939300537,
-0.3262372314929962,
-0.3555264472961426,
0.06515169143676758,
-0.5793980360031128,
0.04299088194966316,
-0.18765202164649963,
0.41974037885665894,
-0.34219589829444885,
-0.3711313009262085,
0.3845456540584564,
0.43214595317840576,
0.7168481349945068,
-0.08357643336057663,
0.19793154299259186,
0.035579755902290344,
-0.0012886682525277138,
-0.5488739609718323,
0.0704202800989151,
-0.0014019813388586044,
-0.21501325070858002,
0.027291376143693924,
-0.1356787085533142,
-0.09082776308059692,
0.03973490744829178,
-0.2662622630596161,
0.10433176159858704,
0.0013376809656620026,
1.0558433532714844,
-0.27241572737693787,
-0.15387889742851257,
-0.1018541157245636,
0.15663257241249084,
-0.09176498651504517,
0.16927005350589752,
-0.008326297625899315,
0.13735376298427582,
-0.12997272610664368,
-0.17731653153896332,
-0.12177708745002747,
-0.3256259262561798,
0.12160032987594604,
-0.007337547838687897,
-0.17553173005580902,
-0.22549627721309662,
0.27607598900794983,
0.49579504132270813,
-0.09907674044370651,
-0.3769024908542633,
0.0817372128367424,
-0.028282685205340385,
-0.24699406325817108,
-0.22657343745231628,
0.3488761782646179,
0.06404224783182144,
-0.5016042590141296,
-0.09533804655075073,
-0.16882658004760742,
0.45323365926742554,
-0.29416579008102417,
-0.26071470975875854,
0.303018718957901,
0.10405763983726501,
-0.2190980613231659,
0.38391047716140747,
-0.3634412884712219,
-0.12916655838489532,
-0.3180089592933655,
-0.12276532500982285,
-0.1539870798587799,
-0.6412740349769592,
0.10943441092967987,
0.1728309988975525,
0.49495452642440796,
0.03120211884379387,
0.1230885237455368,
0.21590092778205872,
-0.11577492952346802,
0.4156981110572815,
0.18083710968494415,
0.29635733366012573,
0.32926619052886963,
0.3150506913661957,
0.14599674940109253,
-0.3184508681297302,
0.40765124559402466,
-0.013139724731445312,
-0.22255311906337738,
0.39155495166778564,
0.10709939152002335,
-0.20398344099521637,
-0.12519757449626923,
-0.2320016324520111,
-0.29300931096076965,
-0.09539030492305756,
-0.22250081598758698,
-0.17375487089157104,
-0.08045855909585953,
0.14781169593334198,
0.4190996289253235,
0.018586795777082443,
-0.04964375123381615,
0.007256273180246353,
0.06531491130590439,
0.1636173129081726,
-0.037321869283914566,
-0.06495028734207153,
-0.1452893614768982,
0.08659429103136063,
0.22246147692203522,
-0.19677112996578217,
0.4460468888282776,
0.0981760174036026,
0.061253584921360016,
0.042976342141628265,
-0.07205306738615036,
0.2515115439891815,
0.08199898898601532,
0.1902340054512024,
0.18134090304374695,
0.22191068530082703,
-0.36126193404197693,
-0.25545886158943176,
0.045408282428979874,
0.037350110709667206,
0.4311321973800659,
-0.32068684697151184,
-0.04649674892425537,
0.15787099301815033,
0.10755860805511475,
-0.3169376254081726,
-0.3542126715183258,
-0.4349250793457031,
-0.5650665163993835,
-0.07006822526454926,
0.09108426421880722,
-0.2530287504196167,
-0.06878047436475754,
-0.005895014852285385,
0.044294580817222595,
-0.2659391462802887,
-0.045998960733413696,
-0.27911555767059326,
0.08034276962280273,
0.3241613507270813,
0.13752898573875427,
-0.18151628971099854,
0.3898333013057709,
0.08327140659093857,
0.36201488971710205,
-0.019157910719513893,
0.2222391813993454,
-0.004174716770648956,
0.14618855714797974,
0.0003618542104959488,
-0.10016843676567078,
-0.02574070543050766,
-0.04710540175437927,
-0.14575940370559692,
0.17568115890026093,
0.13809944689273834,
0.005162067711353302,
-0.2981780767440796,
-0.22800184786319733,
0.18839959800243378,
0.29183006286621094,
0.19234497845172882,
-0.1986015886068344,
0.5775859951972961,
-0.2535887360572815,
-0.3238763213157654,
0.16436025500297546,
0.1683271825313568,
0.05285457521677017,
0.37848949432373047,
0.45393139123916626,
0.6912421584129333,
0.034001804888248444,
-0.2650216221809387,
0.003518126904964447,
-0.49625498056411743,
0.17270225286483765,
0.1954568773508072,
0.10800707340240479,
-0.3301399350166321,
0.0022254837676882744,
0.031964629888534546,
0.05545986071228981,
0.11384576559066772,
-0.12017731368541718,
-0.2493574172258377,
0.22814086079597473,
-0.07648202031850815,
0.23825329542160034,
0.2021411657333374,
-0.41768911480903625,
0.02961948700249195,
0.14988015592098236,
0.06131179630756378,
0.13912710547447205,
0.07933984696865082,
0.2710896134376526,
-0.13775211572647095,
0.009885940700769424,
0.008247587829828262,
-0.012412616983056068,
-0.20501765608787537,
-0.1198812946677208,
-0.06365358084440231,
-0.2108406275510788,
0.6007063984870911,
0.04969137907028198,
-0.16215628385543823,
0.3443549871444702,
0.7612617015838623,
0.041460368782281876,
-0.16905377805233002,
0.1809292733669281,
-0.006354577839374542,
0.05393984168767929,
-0.052357789129018784,
-0.02422979101538658,
0.38993319869041443,
-0.16006402671337128,
-0.26721540093421936,
-0.03542400896549225,
0.2512819766998291,
0.12086264789104462,
-0.4943592846393585,
0.16661201417446136,
0.1627017855644226,
-0.05043647438287735,
0.3389594852924347,
-0.38111412525177,
0.441351979970932,
-0.30244386196136475,
0.15717695653438568,
0.05963888019323349,
0.18611407279968262,
0.2916516363620758,
-0.24864701926708221,
-0.03108575940132141,
-0.2250557392835617,
0.00863281637430191,
0.07058987021446228,
0.4474605619907379,
0.1469641625881195,
-0.19633202254772186,
0.0011982321739196777,
-0.13529403507709503,
0.16031745076179504,
0.10215465724468231,
0.2937577962875366,
-0.08954998105764389,
-0.17349955439567566,
-0.3739543557167053,
-0.11345040053129196,
0.4546184539794922,
0.33249717950820923,
0.03490695729851723,
-0.0810137614607811,
-0.4279146194458008,
0.009793469682335854,
0.1897890865802765,
-0.31919729709625244,
-0.018634643405675888,
0.053500525653362274,
-0.006030520424246788,
0.1207752376794815,
0.461446613073349,
-0.2734963595867157,
-0.3302181363105774,
-0.1840931475162506,
-0.13643166422843933,
-0.03175888955593109,
-0.1606324017047882,
-0.06491602957248688,
0.01951426826417446,
0.05827508866786957,
-0.23661695420742035,
-0.05807587504386902,
-0.11019036173820496,
-0.2381676286458969,
0.07389312982559204,
0.22229140996932983,
0.13101504743099213,
-0.20870916545391083,
-0.10665560513734818,
-0.09515944123268127,
-0.0650412067770958,
-0.11916540563106537,
-0.16715899109840393,
0.178407683968544,
0.5427190661430359,
-0.31804534792900085,
-0.07277379184961319,
-0.09465637803077698,
0.13490891456604004,
0.17837637662887573,
-0.10644082725048065,
0.045723460614681244,
-0.01956934481859207,
-0.0604565292596817,
-0.07339145243167877,
-0.14290525019168854,
0.10149464011192322,
-0.3249173164367676,
-0.03240744769573212,
0.17913518846035004,
-0.17927607893943787,
0.2557196617126465,
-0.04813277721405029,
0.06875066459178925,
-0.10878238081932068,
-0.08069749921560287,
-0.10582946240901947,
-0.08370483666658401,
0.15772779285907745,
-0.29392051696777344,
-0.2751476764678955,
-0.5780194401741028,
0.08106263726949692,
0.02591780200600624,
0.2421533167362213,
0.06582047045230865,
-0.1607860028743744,
-0.11544814705848694,
-0.08428563922643661,
0.12616874277591705,
-0.07432911545038223,
-0.169979065656662,
0.10356698930263519,
-0.14242281019687653,
0.06221362203359604,
0.4021685719490051,
0.016279596835374832,
0.01141870766878128,
0.6619752645492554,
0.006465114653110504,
0.27067050337791443,
0.3829731345176697,
0.19919826090335846,
-0.07448231428861618,
0.14421021938323975,
0.7489559650421143,
0.7794599533081055,
0.08778037875890732,
-0.15469488501548767,
0.09226226061582565,
-0.24610120058059692,
0.06894069910049438,
-0.2604277729988098,
-0.3266117572784424,
-0.19211184978485107,
-0.10995959490537643,
-0.23577390611171722,
-0.7090892195701599,
-0.14794401824474335,
0.06147778034210205,
-0.22989463806152344,
-0.16546384990215302,
-0.16091668605804443,
-0.13097399473190308,
-0.0166163370013237,
-0.24930201470851898,
-0.03429578244686127,
-0.307119220495224,
0.38578271865844727,
0.02572912722826004,
-0.09131056070327759,
0.4063311517238617,
-0.07809562981128693,
0.2709382176399231,
0.33684301376342773,
0.21801720559597015,
0.20856469869613647,
0.41077402234077454,
-0.36201485991477966,
0.034245360642671585,
0.0007553622126579285,
-0.25956547260284424,
0.0585564449429512,
0.2109634429216385,
-0.17156672477722168,
0.5173894762992859,
0.18917201459407806,
0.04025918245315552,
-0.057114288210868835,
0.2397421896457672,
0.05731206014752388,
0.715569019317627,
-0.30116304755210876,
0.11964039504528046,
-0.2480366826057434,
0.04136521369218826,
0.08410206437110901,
0.00891498476266861,
-0.20252513885498047,
-0.18393489718437195,
-0.16010791063308716,
-0.025551313534379005,
0.1391834020614624,
0.09682339429855347,
0.09958775341510773,
-0.057967785745859146,
0.3223225176334381,
-0.04317000135779381,
0.4640342891216278,
-0.20752210915088654,
0.05188915133476257,
-0.5853192210197449,
-0.09002325683832169,
0.32769885659217834,
0.0366399884223938,
0.279447466135025,
0.031109271571040154,
0.10667037218809128,
0.40721362829208374,
0.2393849790096283,
0.43122586607933044,
-0.0055288346484303474,
-0.3165997862815857,
-0.5569552183151245,
-0.1463945060968399,
0.22378072142601013,
0.11291562765836716,
-0.02779891900718212,
-0.10044705122709274,
0.33617103099823,
0.07467211782932281,
0.03999657928943634,
0.3453139662742615,
-0.2967596650123596,
0.25412848591804504,
0.05695143714547157,
0.11006571352481842,
0.27016258239746094,
-0.02242368459701538,
0.06595534831285477,
-0.15218187868595123,
0.00021971017122268677,
0.18629704415798187,
-0.3042447865009308,
-0.26314759254455566,
-0.1038384735584259,
0.45823973417282104,
0.14688324928283691,
-0.13425755500793457,
0.05560581386089325,
0.19607020914554596,
0.23312561213970184,
-0.36192598938941956,
-0.22659675776958466,
0.21750612556934357,
0.3137885630130768,
0.08977004885673523,
-0.052636731415987015,
0.023625746369361877,
-0.048844240605831146,
0.2905328571796417,
-0.31442755460739136,
-0.18012076616287231,
0.4388241767883301,
-0.5293751955032349,
0.29066210985183716,
-0.00979531742632389,
0.5312719345092773,
0.1658746302127838,
-0.13086088001728058,
-0.11093547940254211,
-0.09465859085321426,
0.33027565479278564,
-0.11057095974683762,
-0.15255777537822723,
0.024437546730041504,
0.011989140883088112,
0.18981043994426727,
0.00367012619972229,
0.13433879613876343,
0.26341697573661804,
-0.09793508052825928,
0.3415634036064148,
-0.1324792057275772
] |
https://github.com/huggingface/datasets/issues/2499 | Python Programming Puzzles | Thanks @VictorSanh!
There's also a [notebook](https://aka.ms/python_puzzles) and [demo](https://aka.ms/python_puzzles_study) available now to try out some of the puzzles | ## Adding a Dataset
- **Name:** Python Programming Puzzles
- **Description:** Programming challenge called programming puzzles, as an objective and comprehensive evaluation of program synthesis
- **Paper:** https://arxiv.org/pdf/2106.05784.pdf
- **Data:** https://github.com/microsoft/PythonProgrammingPuzzles ([Scrolling through the data](https://github.com/microsoft/PythonProgrammingPuzzles/blob/main/problems/README.md))
- **Motivation:** Spans a large range of difficulty, problems, and domains. A useful resource for evaluation as we don't have a clear understanding of the abilities and skills of extremely large LMs.
Note: it's a growing dataset (contributions are welcome), so we'll need careful versioning for this dataset.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 17 | Python Programming Puzzles
## Adding a Dataset
- **Name:** Python Programming Puzzles
- **Description:** Programming challenge called programming puzzles, as an objective and comprehensive evaluation of program synthesis
- **Paper:** https://arxiv.org/pdf/2106.05784.pdf
- **Data:** https://github.com/microsoft/PythonProgrammingPuzzles ([Scrolling through the data](https://github.com/microsoft/PythonProgrammingPuzzles/blob/main/problems/README.md))
- **Motivation:** Spans a large range of difficulty, problems, and domains. A useful resource for evaluation as we don't have a clear understanding of the abilities and skills of extremely large LMs.
Note: it's a growing dataset (contributions are welcome), so we'll need careful versioning for this dataset.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Thanks @VictorSanh!
There's also a [notebook](https://aka.ms/python_puzzles) and [demo](https://aka.ms/python_puzzles_study) available now to try out some of the puzzles | [
-0.06903810799121857,
-0.15612733364105225,
-0.2759871780872345,
-0.052750177681446075,
-0.0006485283374786377,
0.0701652392745018,
0.01956375688314438,
0.25621917843818665,
0.0034627821296453476,
0.12764203548431396,
0.03861561417579651,
0.30958127975463867,
-0.3876289129257202,
0.3575752079486847,
0.23318029940128326,
-0.34801775217056274,
-0.04252959042787552,
-0.004456609487533569,
-0.09909173846244812,
0.04900134354829788,
-0.19246718287467957,
0.2509893774986267,
-0.14735102653503418,
-0.07994630932807922,
0.04599863290786743,
-0.2655210793018341,
-0.18279491364955902,
0.21184498071670532,
-0.09623167663812637,
-0.3995172083377838,
-0.3597228527069092,
0.03805307671427727,
-0.15061508119106293,
0.3561882972717285,
-0.0000946857180679217,
-0.44835734367370605,
0.1580720841884613,
-0.03283233568072319,
-0.4988926649093628,
-0.05230630934238434,
0.1360354721546173,
-0.2378714382648468,
-0.19419780373573303,
-0.1723555028438568,
-0.11471852660179138,
-0.010593078099191189,
-0.055127695202827454,
-0.3561467230319977,
0.48664939403533936,
0.25863710045814514,
0.37447670102119446,
0.290442556142807,
0.22130535542964935,
-0.037972431629896164,
0.14925777912139893,
-0.12863504886627197,
-0.1574363112449646,
0.20816926658153534,
0.5029333829879761,
-0.18218575417995453,
-0.01041131466627121,
0.050555963069200516,
0.09698253870010376,
-0.12749186158180237,
0.0570475272834301,
-0.2780984044075012,
0.0993155911564827,
-0.548532247543335,
-0.14642760157585144,
0.10038695484399796,
0.1350403130054474,
-0.1140141412615776,
-0.2543652653694153,
-0.38783714175224304,
-0.0214352086186409,
-0.1134716123342514,
-0.3032560348510742,
0.20306184887886047,
-0.22278465330600739,
0.018185555934906006,
0.04161835089325905,
-0.1341143399477005,
-0.016990769654512405,
-0.09636788070201874,
0.09128352999687195,
0.2131262719631195,
-0.02263062819838524,
-0.16266503930091858,
0.10817024856805801,
-0.1193748265504837,
-0.15270677208900452,
0.03144267201423645,
0.1135200709104538,
0.23475007712841034,
-0.08680932223796844,
-0.26097553968429565,
0.27085766196250916,
0.12392327189445496,
0.017795901745557785,
0.3355650305747986,
0.14806309342384338,
-0.00607454776763916,
0.37733137607574463,
-0.10289586335420609,
0.10933367908000946,
0.09280045330524445,
-0.16377276182174683,
-0.01967279240489006,
-0.0344458669424057,
0.11256778240203857,
-0.2922191023826599,
0.08856314420700073,
-0.08669494092464447,
-0.10236958414316177,
0.056347060948610306,
0.14421609044075012,
-0.08402993530035019,
0.18208453059196472,
-0.171640545129776,
0.2033603936433792,
-0.22732847929000854,
0.029916362836956978,
-0.0007510092109441757,
0.010751090943813324,
-0.10669080168008804,
0.026017090305685997,
-0.03032153844833374,
0.05749725177884102,
-0.29946520924568176,
-0.005629665218293667,
-0.15622568130493164,
0.058140791952610016,
-0.3145739734172821,
-0.17955400049686432,
0.3554587960243225,
0.08707503974437714,
0.0416053831577301,
0.1689741313457489,
0.012568619102239609,
-0.28265637159347534,
0.30625322461128235,
-0.004568086005747318,
0.1723778247833252,
-0.01713748648762703,
-0.07842706143856049,
-0.3076555132865906,
0.010073043406009674,
-0.272568941116333,
-0.2808992862701416,
0.1333916038274765,
0.27796798944473267,
0.044920001178979874,
-0.0949024111032486,
0.38167449831962585,
-0.15509100258350372,
0.10567758977413177,
0.2967662811279297,
0.3964274227619171,
-0.15169388055801392,
0.3133292496204376,
-0.0206085667014122,
-0.10800956189632416,
0.22930097579956055,
-0.17705026268959045,
0.21924759447574615,
0.2873534560203552,
-0.05416582524776459,
0.09850727021694183,
-0.01980622112751007,
-0.02205483242869377,
-0.37454158067703247,
0.15869562327861786,
0.12155886739492416,
0.4654807448387146,
-0.18465951085090637,
0.0024684593081474304,
0.3773071765899658,
-0.20765924453735352,
0.1459478884935379,
0.03200094774365425,
-0.15309062600135803,
0.0365181639790535,
0.02532876282930374,
0.2588231861591339,
0.055617984384298325,
-0.02005394548177719,
0.18403872847557068,
0.31404054164886475,
-0.040661126375198364,
-0.08315317332744598,
-0.273620069026947,
0.02884485013782978,
-0.14195001125335693,
0.12714402377605438,
0.15292268991470337,
-0.1347590684890747,
0.032384611666202545,
-0.10647884011268616,
0.16684278845787048,
-0.15404431521892548,
-0.28475192189216614,
0.10165414959192276,
0.19680669903755188,
0.17047521471977234,
0.10618025809526443,
-0.49484047293663025,
-0.09545744210481644,
-0.07822246849536896,
0.21545200049877167,
0.20925644040107727,
0.11788878589868546,
-0.0678558200597763,
-0.16305750608444214,
0.19547228515148163,
0.07713054120540619,
-0.21471036970615387,
0.3580572009086609,
-0.18309158086776733,
0.15559881925582886,
-0.13124094903469086,
-0.132144957780838,
0.3327609896659851,
0.0983532965183258,
-0.032827604562044144,
-0.29393431544303894,
0.06508495658636093,
-0.13665828108787537,
-0.13230004906654358,
0.16773578524589539,
0.4808662235736847,
-0.03489246219396591,
0.17651504278182983,
0.15276437997817993,
0.00913504883646965,
0.16836725175380707,
-0.23243378102779388,
0.0812196359038353,
0.3387722373008728,
-0.1564701348543167,
-0.2968173027038574,
0.12514010071754456,
0.31889694929122925,
-0.022004812955856323,
0.12813839316368103,
0.33376550674438477,
0.34329870343208313,
-0.06282827258110046,
0.11985303461551666,
0.32735997438430786,
0.06079191714525223,
-0.04671749100089073,
-0.015750117599964142,
-0.33522236347198486,
-0.17809760570526123,
0.44035810232162476,
-0.0038231108337640762,
0.23704315721988678,
-0.07174726575613022,
-0.3317888081073761,
0.18784677982330322,
0.456113338470459,
-0.029113002121448517,
0.24738910794258118,
-0.1612129807472229,
-0.11262675374746323,
0.058572523295879364,
-0.22324858605861664,
0.2160293012857437,
0.027773834764957428,
0.3220369517803192,
0.20590828359127045,
0.22308382391929626,
-0.27320730686187744,
-0.23217841982841492,
0.1780882477760315,
0.06397364288568497,
-0.23331187665462494,
0.18996644020080566,
0.12423574179410934,
0.11440787464380264,
-0.053399987518787384,
-0.28260523080825806,
-0.26269206404685974,
-0.08109202235937119,
-0.2464054375886917,
0.22956936061382294,
-0.1131107285618782,
-0.1971311867237091,
-0.24956101179122925,
0.0127568319439888,
-0.0888332724571228,
-0.47560542821884155,
0.18303832411766052,
0.11652334034442902,
-0.2463804930448532,
-0.039041921496391296,
0.04155479744076729,
0.2850761413574219,
-0.2686406970024109,
0.13127203285694122,
0.17590129375457764,
-0.2556352913379669,
-0.04517563432455063,
0.33352354168891907,
0.10244958102703094,
0.045179855078458786,
0.7545126676559448,
-0.4607819616794586,
0.30170464515686035,
-0.1164512112736702,
-0.5321434736251831,
0.05177043378353119,
-0.07272138446569443,
0.6607950925827026,
0.3045022487640381,
-0.026543669402599335,
-0.018640674650669098,
-0.17032773792743683,
0.06313350051641464,
-0.19592705368995667,
-0.05071915686130524,
-0.18483266234397888,
0.18507808446884155,
-0.16056866943836212,
-0.21321749687194824,
-0.18608662486076355,
-0.04653120040893555,
-0.3705590069293976,
0.3902665376663208,
0.2063414305448532,
0.21953681111335754,
0.08112835139036179,
-0.07104452699422836,
0.19067855179309845,
0.06975772231817245,
0.15497532486915588,
-0.023291446268558502,
-0.1519995629787445,
0.09689749032258987,
-0.34748193621635437,
-0.2306870073080063,
-0.19153524935245514,
-0.4439185857772827,
0.11477985978126526,
0.00016450323164463043,
-0.015055004507303238,
0.037884943187236786,
-0.08186835795640945,
0.21550115942955017,
-0.02635323256254196,
0.30326077342033386,
-0.2600439190864563,
0.19743788242340088,
-0.23453181982040405,
-0.20701542496681213,
-0.19314239919185638,
0.1899798959493637,
0.13692131638526917,
0.07377158105373383,
-0.17568910121917725,
0.003985513001680374,
-0.06460638344287872,
0.5416691303253174,
0.1444900780916214,
0.09658609330654144,
0.17752674221992493,
-0.039596907794475555,
0.23683549463748932,
-0.03566031903028488,
-0.3107922673225403,
0.009680022485554218,
0.1647159457206726,
-0.14369535446166992,
0.2343016266822815,
0.2779712975025177,
-0.010676560923457146,
-0.04413885623216629,
0.052683424204587936,
-0.22589436173439026,
-0.038845986127853394,
0.3063012957572937,
-0.15875039994716644,
0.12833362817764282,
-0.07370800524950027,
0.026200905442237854,
-0.3611780107021332,
-0.015942610800266266,
-0.18707039952278137,
0.038997430354356766,
0.05052090436220169,
-0.04095040634274483,
0.034764181822538376,
-0.2494024783372879,
-0.3102254867553711,
0.14553794264793396,
0.16858543455600739,
-0.008225076831877232,
0.08123064041137695,
-0.3296031355857849,
-0.1815975159406662,
-0.043476566672325134,
0.14255505800247192,
-0.011950938031077385,
-0.07857060432434082,
0.36685752868652344,
0.009608972817659378,
-0.0375763438642025,
-0.03097706474363804,
-0.37424325942993164,
-0.01764664426445961,
0.19275540113449097,
0.3419082760810852,
0.015098251402378082,
0.002714933594688773,
0.040925752371549606,
0.3311520516872406,
-0.08682841807603836,
-0.08995562791824341,
-0.2745048999786377,
-0.4378644824028015,
-0.30916017293930054,
0.10359252989292145,
0.25436684489250183,
0.19616800546646118,
-0.025127362459897995,
-0.030761338770389557,
0.03620626777410507,
-0.11057212948799133,
0.2938111424446106,
0.10535655915737152,
-0.005982589907944202,
-0.08220116049051285,
0.14368745684623718,
-0.24200239777565002,
-0.09847824275493622,
-0.08506380021572113,
0.16932840645313263,
-0.31310945749282837,
0.18896766006946564,
0.03294213488698006,
-0.048395171761512756,
0.3921135663986206,
0.21571660041809082,
0.03492812067270279,
-0.03505522757768631,
-0.25840169191360474,
0.3342839479446411,
-0.3644000291824341,
-0.08166619390249252,
0.09172124415636063,
0.22048231959342957,
-0.24577857553958893,
-0.3512529134750366,
0.031087640672922134,
-0.1219966858625412,
-0.11327320337295532,
0.12577813863754272,
-0.20435582101345062,
-0.09378281980752945,
0.13826531171798706,
0.13940173387527466,
0.7695466876029968,
-0.24238274991512299,
0.14404913783073425,
0.2465067207813263,
-0.35161352157592773,
0.4781211018562317,
0.08194714784622192,
0.16433873772621155,
-0.31543251872062683,
-0.030870605260133743,
0.09826306998729706,
-0.3076472878456116,
0.12328457832336426,
0.06703641265630722,
-0.15597711503505707,
0.22174164652824402,
-0.16964322328567505,
-0.11145760118961334,
0.07527807354927063,
0.4630981683731079,
0.017310380935668945,
0.08614318072795868,
-0.4428923726081848,
0.315877765417099,
0.05282773822546005,
0.023962875828146935,
-0.28390181064605713,
0.00623680092394352,
-0.13431423902511597,
-0.009388083592057228,
-0.37850844860076904,
0.09111280739307404,
-0.10660744458436966,
0.021302198991179466,
-0.015566539019346237,
-0.18679776787757874,
0.20887845754623413,
-0.12061598896980286,
0.32456302642822266,
0.4761957824230194,
0.09715290367603302,
0.0018045641481876373,
0.21710073947906494,
-0.12325434386730194,
0.2538086473941803,
0.15272502601146698,
0.4604753851890564,
-0.26438668370246887,
-0.07985958456993103,
-0.08529723435640335,
0.25361189246177673,
-0.12321609258651733,
-0.30773985385894775,
-0.08373957872390747,
0.07088201493024826,
-0.011984838172793388,
0.04791071265935898,
0.0312015600502491,
-0.13834674656391144,
-0.05624962970614433,
0.29171499609947205,
0.11550235748291016,
-0.12299711257219315,
0.17122898995876312,
-0.04399183765053749,
-0.08519349247217178,
-0.012080341577529907,
-0.3101005554199219,
0.07720591127872467,
-0.07637710869312286,
0.18735110759735107,
0.2989393472671509,
-0.19598595798015594,
-0.49840036034584045,
-0.027251489460468292,
-0.06206667423248291,
0.027730844914913177,
0.2527606189250946,
-0.10063109546899796,
-0.1459801346063614,
-0.011941083706915379,
0.008839569985866547,
0.26689907908439636,
0.04035893827676773,
-0.04147467017173767,
0.013655275106430054,
-0.2834407091140747,
0.03843023255467415,
0.13141915202140808,
0.1851043850183487,
-0.3328621983528137,
0.2243734449148178,
0.11723074316978455,
0.24797549843788147,
-0.550517201423645,
0.004111107904464006,
-0.37281179428100586,
-0.0001514442265033722,
0.07444202154874802,
-0.3020961880683899,
-0.43914365768432617,
0.056722160428762436,
0.3743457794189453,
-0.06886332482099533,
-0.4298591613769531,
-0.43434637784957886,
-0.28673964738845825,
-0.02234932780265808,
-0.21072107553482056,
-0.001658379565924406,
0.1870345175266266,
0.008610427379608154,
0.041539065539836884,
-0.18803805112838745,
-0.11116917431354523,
-0.06760586053133011,
0.1136835515499115,
0.11139719933271408,
0.09596312046051025,
0.14045988023281097,
0.0950419157743454,
0.09878485649824142,
0.0849585086107254,
0.19624066352844238,
0.0901591032743454,
0.11856362223625183,
0.07942812889814377,
0.05074368417263031,
-0.13708920776844025,
0.050244249403476715,
-0.012363314628601074,
0.15064729750156403,
-0.05155462771654129,
0.02676401287317276,
-0.22119024395942688,
0.12163767218589783,
0.10037490725517273,
0.27757924795150757,
-0.02836979553103447,
-0.07336112856864929,
0.24028679728507996,
0.38979658484458923,
-0.1823674589395523,
0.22771181166172028,
0.19282236695289612,
-0.2348293960094452,
0.23180392384529114,
0.325514554977417,
-0.0016308575868606567,
0.02441197633743286,
-0.17155177891254425,
-0.11442431807518005,
0.14744146168231964,
0.1806928813457489,
0.32620248198509216,
0.18190638720989227,
0.1565910279750824,
-0.03791307285428047,
0.04039453715085983,
-0.0785384327173233,
0.05124710872769356,
0.07845010608434677,
-0.10342953354120255,
0.16598953306674957,
0.2315863072872162,
0.07403450459241867,
0.2153991460800171,
0.28522172570228577,
0.25424760580062866,
0.12754885852336884,
0.10800372809171677,
0.23086532950401306,
0.018512576818466187,
0.007453165948390961,
-0.24531732499599457,
0.08218855410814285,
-0.07528537511825562,
0.2779006361961365,
-0.2056857943534851,
-0.0719238817691803,
0.31328749656677246,
-0.29135265946388245,
-0.2342720627784729,
-0.11080865561962128,
0.052408427000045776,
-0.28130048513412476,
-0.008915156126022339,
-0.006207957863807678,
0.2553602159023285,
-0.11429965496063232,
-0.14993053674697876,
0.005470737814903259,
0.3869016170501709,
-0.2155785858631134,
0.14327891170978546,
0.1367814838886261,
0.1342475414276123,
0.02536429837346077,
0.17625214159488678,
0.4440712332725525,
0.1253834068775177,
-0.4179985821247101,
0.07757618278265,
-0.21725994348526,
-0.06951917707920074,
-0.22134213149547577,
0.17247965931892395,
0.11156876385211945,
0.1996077299118042,
0.25872039794921875,
0.2700967788696289,
-0.30194365978240967,
-0.2827012836933136,
0.058990493416786194,
-0.3771445155143738,
-0.2978946566581726,
0.3868862986564636,
-0.10451298952102661,
-0.14540711045265198,
-0.04395313560962677,
0.1012018471956253,
-0.48623126745224,
-0.18021176755428314,
0.3434888422489166,
-0.08491666615009308,
-0.05050472170114517,
-0.05942950025200844,
0.19330193102359772,
-0.05977465584874153,
0.5083771347999573,
0.3308284878730774,
0.660435140132904,
-0.09874077141284943,
-0.12566494941711426,
-0.5089110136032104,
0.02740708738565445,
-0.06791292130947113,
-0.20852698385715485,
-0.02883731946349144,
0.1555771380662918,
0.02421955019235611,
0.23061376810073853,
-0.02045363187789917,
0.24521833658218384,
-0.11695464700460434,
-0.05531752109527588,
-0.4203053116798401,
0.20210929214954376,
0.09667409956455231,
-0.07897478342056274,
-0.0023823250085115433,
-0.01579495519399643,
-0.042228180915117264,
-0.2822079658508301,
0.28682592511177063,
-0.04805543273687363,
0.03568388521671295,
0.2877689301967621,
0.044380128383636475,
0.14150682091712952,
0.102994903922081,
0.35271239280700684,
-0.014393467456102371,
-0.551295816898346,
-0.041004862636327744,
-0.0339038148522377,
-0.11009161919355392,
0.18878184258937836,
0.2182331383228302,
0.2595932185649872,
-0.06300785392522812,
-0.0017128847539424896,
0.08189340680837631,
0.11975803226232529,
0.24250833690166473,
0.15262997150421143,
-0.023105796426534653,
-0.06923852860927582,
0.19910264015197754,
-0.02707180380821228,
0.07715046405792236,
0.45726922154426575,
-0.17054788768291473,
0.13092240691184998,
-0.08836228400468826,
-0.23116973042488098,
0.2516572177410126,
-0.16412296891212463,
-0.4007522463798523,
-0.2591986358165741,
0.18494835495948792,
0.047610241919755936,
0.11286813020706177,
-0.4909985661506653,
-0.07920681685209274,
0.2659676969051361,
-0.1039644256234169,
-0.015823427587747574,
0.4436084032058716,
-0.19853366911411285,
0.03223627433180809,
0.024687509983778,
0.03524923697113991,
-0.17054086923599243,
0.0034705232828855515,
-0.037461407482624054,
-0.22899582982063293
] |
https://github.com/huggingface/datasets/issues/2498 | Improve torch formatting performance | That’s interesting thanks, let’s see what we can do. Can you detail your last sentence? I’m not sure I understand it well. | **Is your feature request related to a problem? Please describe.**
It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors.
A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs.
The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded.
**Describe the solution you'd like**
Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call.
![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png)
As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call.
Digging a bit deeper into format_batch we can see the following profiler data:
![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png)
Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion.
**Describe alternatives you've considered**
I am not familiar with pyarrow and have not yet considered the alternatives to the current approach.
Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
| 22 | Improve torch formatting performance
**Is your feature request related to a problem? Please describe.**
It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors.
A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs.
The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded.
**Describe the solution you'd like**
Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call.
![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png)
As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call.
Digging a bit deeper into format_batch we can see the following profiler data:
![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png)
Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion.
**Describe alternatives you've considered**
I am not familiar with pyarrow and have not yet considered the alternatives to the current approach.
Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
That’s interesting thanks, let’s see what we can do. Can you detail your last sentence? I’m not sure I understand it well. | [
-0.35013532638549805,
-0.2402968406677246,
-0.07366824150085449,
0.1903572529554367,
0.1027538999915123,
0.14770635962486267,
0.2599889934062958,
0.6868165731430054,
-0.12113015353679657,
-0.06412002444267273,
-0.3566419780254364,
0.2431405484676361,
-0.11459852010011673,
-0.03322073444724083,
0.06633522361516953,
-0.3101109266281128,
0.0007665827870368958,
0.10030800849199295,
-0.06789612770080566,
-0.13086211681365967,
-0.10192406922578812,
-0.42416369915008545,
0.05567824840545654,
-0.23089207708835602,
-0.1764657199382782,
0.143389031291008,
-0.07297074049711227,
0.004990179091691971,
-0.01477799378335476,
-0.39140811562538147,
-0.016801990568637848,
0.20411209762096405,
0.1916383057832718,
0.23665562272071838,
-0.0001087393902707845,
-0.02196245640516281,
0.10556335747241974,
0.029854929074645042,
-0.3094548285007477,
0.2616172730922699,
0.32627159357070923,
-0.31579017639160156,
0.05455996096134186,
-0.20534224808216095,
-0.4622156620025635,
-0.20446480810642242,
-0.011553915217518806,
-0.3079187870025635,
0.04370926320552826,
0.032494332641363144,
0.1543280929327011,
0.2567412555217743,
-0.3000166118144989,
0.18780530989170074,
0.32916268706321716,
0.48526549339294434,
-0.1752861738204956,
0.09862008690834045,
0.3001522123813629,
0.029168350622057915,
-0.5153073668479919,
0.6179617643356323,
-0.17225757241249084,
-0.03250305727124214,
0.17719489336013794,
0.06036936491727829,
-0.24245521426200867,
-0.11645013093948364,
-0.08242093026638031,
0.40601903200149536,
0.03252445161342621,
-0.24458926916122437,
-0.5007596611976624,
-0.44534993171691895,
-0.030952833592891693,
-0.5959247350692749,
-0.10014718025922775,
0.111388199031353,
-0.28344231843948364,
0.1466880440711975,
-0.0680338591337204,
0.036880526691675186,
-0.12036436051130295,
-0.09613679349422455,
-0.05475850775837898,
0.25879377126693726,
0.24107299745082855,
-0.2225954830646515,
0.09051409363746643,
0.19611386954784393,
0.45579954981803894,
-0.11577935516834259,
0.27609750628471375,
-0.004552692174911499,
-0.35223251581192017,
-0.16664165258407593,
-0.023672275245189667,
-0.18670925498008728,
-0.15297484397888184,
-0.06688906252384186,
0.12647847831249237,
0.5531219840049744,
-0.09119188040494919,
-0.019700966775417328,
-0.23726147413253784,
0.03756026178598404,
-0.1032603457570076,
0.21059183776378632,
0.19669969379901886,
-0.118680439889431,
0.06776347756385803,
0.19367557764053345,
-0.0780177041888237,
-0.049307286739349365,
-0.3120102286338806,
0.1427364945411682,
-0.48154568672180176,
-0.08429025113582611,
-0.18622125685214996,
0.025211362168192863,
-0.13065527379512787,
-0.1333499401807785,
0.04096152260899544,
0.31119734048843384,
-0.2863076627254486,
0.19483327865600586,
0.16808445751667023,
-0.14746202528476715,
-0.24756193161010742,
-0.26792585849761963,
0.05119393393397331,
0.17039605975151062,
-0.2893528640270233,
0.006973749026656151,
0.2033194899559021,
-0.24583041667938232,
-0.09343065321445465,
-0.07095514237880707,
0.07478560507297516,
0.388759046792984,
0.02003285102546215,
-0.22809775173664093,
0.4766444265842438,
-0.027101997286081314,
-0.06796316057443619,
0.013656334951519966,
0.1813703030347824,
0.5773719549179077,
-0.2796095907688141,
0.15739990770816803,
-0.1916833519935608,
-0.20621715486049652,
-0.15920808911323547,
0.1019587367773056,
0.07004435360431671,
0.007334958761930466,
0.06688331067562103,
0.34242701530456543,
0.13319149613380432,
0.07672066986560822,
0.12647217512130737,
-0.2490808516740799,
-0.3356602191925049,
-0.11782275885343552,
0.3001022934913635,
0.30322375893592834,
-0.1989404559135437,
-0.04738591983914375,
0.47587287425994873,
0.34417852759361267,
0.4220888018608093,
0.4858787953853607,
-0.3000441789627075,
0.11796949803829193,
-0.02902454510331154,
0.00725623220205307,
0.3716587722301483,
-0.36978259682655334,
-0.12970733642578125,
0.3484441936016083,
0.07491359114646912,
0.27083975076675415,
0.16083940863609314,
0.19488370418548584,
0.4046298861503601,
-0.005936785601079464,
0.07297417521476746,
0.39548927545547485,
0.008220789954066277,
-0.049947671592235565,
-0.482464998960495,
-0.17390650510787964,
0.4433809518814087,
0.39572644233703613,
0.05743418633937836,
-0.3865261375904083,
-0.11886433511972427,
-0.10473915189504623,
0.4031054675579071,
-0.3227173984050751,
0.1457480937242508,
0.10898647457361221,
-0.17205823957920074,
0.15341338515281677,
0.015173645690083504,
0.2190544605255127,
-0.11219426244497299,
0.22421002388000488,
-0.36455073952674866,
0.3796460032463074,
0.04791228100657463,
-0.1950644999742508,
0.3231678009033203,
-0.03614523634314537,
-0.003982875496149063,
-0.25541967153549194,
0.04070751368999481,
-0.04461783170700073,
-0.20460262894630432,
0.025377001613378525,
0.04244584962725639,
0.3719463646411896,
-0.2666938304901123,
0.11531154811382294,
-0.2319299429655075,
0.11067293584346771,
0.052905380725860596,
-0.05287354066967964,
-0.05345344915986061,
0.2816495895385742,
0.06501039117574692,
-0.04305204004049301,
-0.07917871326208115,
0.1298169493675232,
-0.13434115052223206,
0.20282484591007233,
-0.2158794105052948,
0.1773775964975357,
0.418503999710083,
-0.12596145272254944,
0.29379552602767944,
0.17013846337795258,
-0.024878941476345062,
-0.1208951473236084,
-0.42238283157348633,
0.7661342620849609,
0.4835476279258728,
0.1557842195034027,
-0.1161571741104126,
-0.21867740154266357,
-0.222104012966156,
0.1484176367521286,
0.056070856750011444,
0.08440457284450531,
0.5234324932098389,
0.13681940734386444,
0.17340388894081116,
0.08097924292087555,
-0.41778773069381714,
0.37128162384033203,
0.3411574959754944,
0.005134858191013336,
-0.1374358832836151,
0.43637004494667053,
-0.07853854447603226,
-0.3662791848182678,
0.3380373418331146,
-0.550646185874939,
-0.00509895384311676,
0.2330383062362671,
0.23336796462535858,
0.02353242225944996,
-0.01775997504591942,
-0.03146374598145485,
0.0983770415186882,
0.010549575090408325,
-0.05427692458033562,
0.01268380880355835,
0.21903590857982635,
0.2533148229122162,
-0.07325073331594467,
-0.09442104399204254,
-0.1324290931224823,
0.02365817502140999,
-0.1572205275297165,
0.12378572672605515,
-0.41272109746932983,
-0.10316678136587143,
-0.155376136302948,
-0.3362695872783661,
-0.0705445408821106,
-0.17990975081920624,
0.030072955414652824,
0.13778646290302277,
-0.028504833579063416,
0.1710876077413559,
0.021794162690639496,
0.046973273158073425,
0.05702967941761017,
-0.22337706387043,
-0.17397823929786682,
-0.1969989687204361,
-0.03078443557024002,
0.03385380282998085,
0.14755964279174805,
-0.03262823820114136,
0.3699905574321747,
-0.006934940814971924,
0.1059628501534462,
0.0763375386595726,
-0.2765931785106659,
0.048594482243061066,
-0.1336110681295395,
-0.2551209032535553,
0.04960886389017105,
-0.12589725852012634,
-0.2280787229537964,
-0.12080254405736923,
0.09727287292480469,
0.001779286190867424,
0.058724068105220795,
-0.1553664654493332,
-0.09026386588811874,
0.18178127706050873,
-0.019235610961914062,
-0.22558137774467468,
-0.24595950543880463,
-0.30734944343566895,
-0.04960642009973526,
-0.1677563339471817,
0.15653753280639648,
-0.2041863054037094,
-0.028364818543195724,
0.13088321685791016,
0.20822449028491974,
0.04565916955471039,
0.02368113398551941,
-0.42927730083465576,
0.4179662764072418,
-0.2306927740573883,
-0.16887815296649933,
-0.401109516620636,
-0.020249921828508377,
0.00005058199167251587,
0.36734479665756226,
-0.4472314119338989,
0.21421471238136292,
-0.06474312394857407,
0.1862572580575943,
-0.24602508544921875,
-0.1165195107460022,
0.14454954862594604,
0.2486152946949005,
-0.09356870502233505,
0.008100010454654694,
0.07200388610363007,
-0.15417581796646118,
-0.23297888040542603,
0.10221614688634872,
-0.07459939271211624,
0.30419671535491943,
0.3246067464351654,
0.6840357184410095,
-0.061722394078969955,
-0.345792680978775,
0.10292747616767883,
0.1235019788146019,
0.10423067212104797,
-0.09333723038434982,
-0.23231501877307892,
0.12217705696821213,
-0.2074725329875946,
0.3181700110435486,
0.3299955725669861,
-0.053586483001708984,
-0.21739231050014496,
-0.013857753947377205,
-0.2203805148601532,
0.1459466814994812,
-0.2429204136133194,
0.6411698460578918,
-0.4819489121437073,
0.2805367112159729,
-0.09434463083744049,
0.47749772667884827,
-0.267218679189682,
-0.2383500337600708,
0.29150596261024475,
-0.006821990013122559,
0.2728026211261749,
-0.1776014119386673,
0.10382340848445892,
-0.17983528971672058,
-0.49148857593536377,
0.24443507194519043,
0.38476505875587463,
0.19534826278686523,
0.03308932110667229,
-0.012956053018569946,
0.19633501768112183,
-0.056744176894426346,
0.265669584274292,
0.006643231958150864,
-0.1794695109128952,
0.165277898311615,
-0.5235357284545898,
-0.19511951506137848,
0.009396139532327652,
-0.003670457750558853,
-0.07097126543521881,
-0.07673397660255432,
0.27617108821868896,
-0.11872344464063644,
-0.39650899171829224,
0.2941376864910126,
-0.05354924499988556,
-0.05985289067029953,
-0.0008520586416125298,
0.05153605714440346,
-0.011456936597824097,
-0.12476145476102829,
0.16677282750606537,
0.07657240331172943,
-0.010711515322327614,
-0.21172699332237244,
-0.05749509111046791,
-0.11023350059986115,
0.2859831750392914,
0.3494950532913208,
0.025546088814735413,
-0.1026386246085167,
0.021711910143494606,
0.11759831011295319,
0.07751549035310745,
0.3361070454120636,
0.47614046931266785,
0.07305487990379333,
-0.37654024362564087,
0.046519212424755096,
-0.034541573375463486,
-0.09407130628824234,
0.21856048703193665,
0.5431830883026123,
0.09415340423583984,
0.357247918844223,
-0.2959465980529785,
0.003148600459098816,
-0.44047293066978455,
0.12412241101264954,
0.07991121709346771,
0.016461092978715897,
-0.5305217504501343,
-0.5308508276939392,
0.44491368532180786,
0.09528903663158417,
-0.007360927760601044,
0.30800139904022217,
-0.19862337410449982,
-0.1722663789987564,
0.43405866622924805,
0.46194180846214294,
1.0132728815078735,
0.018463432788848877,
0.4371160566806793,
0.07837918400764465,
-0.3031279444694519,
-0.010949920862913132,
-0.6706627011299133,
0.24126510322093964,
-0.39932918548583984,
-0.22910575568675995,
-0.016653303056955338,
0.020678263157606125,
0.15239962935447693,
-0.06725838780403137,
0.020589318126440048,
0.03182327002286911,
0.1562063843011856,
0.09961429238319397,
-0.052722908556461334,
0.18215905129909515,
0.21333588659763336,
-0.7044988870620728,
-0.2040032148361206,
0.11375044286251068,
0.09074999392032623,
0.11755846440792084,
-0.048960600048303604,
-0.25799477100372314,
-0.16638141870498657,
0.1905657947063446,
-0.13835787773132324,
-0.04506237059831619,
-0.2100946307182312,
0.0955529659986496,
-0.2639066278934479,
-0.8112198710441589,
0.3461894690990448,
0.11804483830928802,
0.17771142721176147,
0.1102321594953537,
0.008975768461823463,
0.1276240050792694,
0.11280906200408936,
0.33758750557899475,
0.19162245094776154,
-0.3779071867465973,
0.34236738085746765,
-0.018887409940361977,
0.003991127014160156,
0.20391258597373962,
0.045379266142845154,
-0.18854928016662598,
-0.030591338872909546,
-0.04270647466182709,
0.28334492444992065,
-0.16243009269237518,
0.08990508317947388,
-0.11142139136791229,
-0.05001695454120636,
-0.24637386202812195,
0.1121336966753006,
0.13389620184898376,
-0.09504061192274094,
0.24689334630966187,
-0.004864431917667389,
-0.262728214263916,
-0.26011574268341064,
0.509530782699585,
0.15353775024414062,
-0.11776988953351974,
0.16912662982940674,
0.32075750827789307,
-0.5200850367546082,
-0.15202537178993225,
0.21273750066757202,
0.452996164560318,
-0.31429022550582886,
-0.13947202265262604,
-0.10357918590307236,
-0.08572950959205627,
-0.09490971267223358,
-0.11065240204334259,
-0.08580182492733002,
-0.17949825525283813,
-0.1017007902264595,
0.1357041597366333,
-0.40161409974098206,
-0.08848150074481964,
-0.2072799652814865,
0.26217520236968994,
0.005984269082546234,
0.4504779279232025,
-0.20523592829704285,
0.25692427158355713,
-0.3582395911216736,
-0.11573672294616699,
0.18900029361248016,
0.2031717300415039,
-0.12233223021030426,
0.1105046272277832,
0.1015334203839302,
0.23654717206954956,
0.047012463212013245,
0.38061559200286865,
-0.013310272246599197,
-0.1437842845916748,
-0.21117371320724487,
0.13594506680965424,
-0.16302454471588135,
-0.2040039598941803,
0.18534526228904724,
0.07138185948133469,
-0.2378407120704651,
-0.39862722158432007,
0.20836329460144043,
0.1215953603386879,
0.07943005859851837,
0.26502129435539246,
0.17490637302398682,
0.14563500881195068,
-0.011683931574225426,
0.1614363193511963,
0.04361078888177872,
0.35005617141723633,
-0.13124047219753265,
-0.033134594559669495,
-0.15472330152988434,
-0.18167689442634583,
0.019409511238336563,
0.16297650337219238,
0.4281500577926636,
0.09542302042245865,
0.3320987820625305,
0.027960246428847313,
0.02676526829600334,
-0.18606320023536682,
0.3409809172153473,
-0.08449004590511322,
-0.062081027776002884,
-0.26387298107147217,
0.345656156539917,
0.1365155279636383,
-0.0907139778137207,
-0.06269580125808716,
-0.13555409014225006,
-0.41723325848579407,
0.15794327855110168,
0.18290211260318756,
0.5511485934257507,
0.4552232623100281,
0.16137632727622986,
-0.06117403134703636,
0.041216570883989334,
-0.2157760113477707,
-0.16084393858909607,
0.4734087288379669,
0.25229188799858093,
-0.015894118696451187,
0.2946074903011322,
0.06074819341301918,
0.1728644073009491,
0.19793029129505157,
0.16690975427627563,
0.5242637395858765,
0.44370242953300476,
0.22663332521915436,
-0.16032618284225464,
-0.28039124608039856,
-0.2760699689388275,
0.07497674971818924,
0.09503930807113647,
0.434154212474823,
-0.16329601407051086,
0.26831457018852234,
-0.012611913494765759,
-0.46388891339302063,
0.18484929203987122,
0.5748348832130432,
-0.2423255443572998,
-0.07486473023891449,
0.21023713052272797,
-0.019163571298122406,
-0.34950295090675354,
0.09301403164863586,
-0.10507208108901978,
-0.07509978115558624,
-0.015653550624847412,
0.3138207495212555,
0.03484019637107849,
0.01915137842297554,
0.1164429783821106,
-0.16677311062812805,
0.4328155219554901,
-0.21308854222297668,
-0.05874647945165634,
0.03408152610063553,
0.005026929080486298,
-0.06483463943004608,
-0.05554898828268051,
0.20038938522338867,
-0.09766337275505066,
-0.37714046239852905,
-0.037999462336301804,
-0.20765620470046997,
0.11538121104240417,
0.1750670224428177,
0.08639442175626755,
-0.047186627984046936,
-0.22251243889331818,
0.3377094268798828,
0.027160244062542915,
-0.18818069994449615,
0.06818173825740814,
0.021009590476751328,
-0.07886068522930145,
-0.06442378461360931,
0.19694864749908447,
0.3674181401729584,
-0.17136621475219727,
-0.21732687950134277,
-0.3684084117412567,
-0.24444469809532166,
-0.19971568882465363,
0.5486782789230347,
-0.08734700828790665,
-0.03353264927864075,
0.09559360146522522,
0.10148146748542786,
0.08621691167354584,
0.6552406549453735,
0.08003959059715271,
0.10044083744287491,
-0.30571678280830383,
-0.10018041729927063,
-0.01984800025820732,
-0.03477700799703598,
-0.030332040041685104,
-0.13634350895881653,
0.0663217231631279,
-0.03536410629749298,
0.25372928380966187,
-0.01605534553527832,
-0.06540647149085999,
-0.19823892414569855,
0.25221654772758484,
0.34217941761016846,
-0.3151421546936035,
0.19319431483745575,
-0.5118904709815979,
0.15018142759799957,
-0.12944434583187103,
-0.22087714076042175,
0.21895475685596466,
0.201865091919899,
0.08278838545084,
-0.283098042011261,
-0.15040914714336395,
0.2201904058456421,
0.12713421881198883,
0.4697135388851166,
-0.09937406331300735,
0.03842465579509735,
-0.1637730896472931,
-0.24263042211532593,
-0.11561517417430878,
0.17853081226348877,
-0.15644089877605438,
0.1788851022720337,
0.15880730748176575,
0.3668154776096344,
0.1120525598526001,
-0.5914243459701538,
-0.2831096947193146,
0.6362105011940002,
0.1218942403793335,
-0.1333908587694168,
-0.1297859102487564,
0.30113741755485535,
-0.1914127767086029,
-0.008940128609538078,
0.11733792722225189,
0.3214927613735199,
0.4039698839187622,
0.11564774811267853,
-0.6210434436798096,
-0.2591514587402344,
0.33287304639816284,
-0.2074272185564041,
-0.07195870578289032,
-0.159703329205513,
-0.0799204558134079,
0.26900428533554077,
0.5017661452293396,
-0.755147397518158,
-0.12310118973255157,
0.12834131717681885,
0.09595821797847748,
-0.09908218681812286,
0.3250206410884857,
0.32278749346733093,
0.0367262028157711,
-0.3005054295063019,
-0.03767760097980499,
-0.15676140785217285,
-0.016944877803325653,
-0.3125457465648651,
-0.29178154468536377
] |
https://github.com/huggingface/datasets/issues/2498 | Improve torch formatting performance | Hi ! I just re-ran a quick benchmark and using `to_numpy()` seems to be faster now:
```python
import pyarrow as pa # I used pyarrow 3.0.0
import numpy as np
n, max_length = 1_000, 512
low, high, size = 0, 2 << 16, (n, max_length)
table = pa.Table.from_pydict({
"input_ids": np.random.default_rng(42).integers(low=low, high=high, size=size).tolist()
})
%%timeit
_ = table.to_pandas()["input_ids"].to_numpy()
# 1.44 ms ± 80.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
%%timeit
_ = table["input_ids"].to_pandas().to_numpy()
# 461 µs ± 14.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
%%timeit
_ = table["input_ids"].to_numpy()
# 317 µs ± 5.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
```
Currently the conversion from arrow to numpy is done in the NumpyArrowExtractor here:
https://github.com/huggingface/datasets/blob/d6d0ede9486ffad7944642ca9a326e058b676788/src/datasets/formatting/formatting.py#L143-L166
Let's update the NumpyArrowExtractor to call `to_numpy` directly and see how our github benchmarks evolve ?__ | **Is your feature request related to a problem? Please describe.**
It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors.
A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs.
The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded.
**Describe the solution you'd like**
Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call.
![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png)
As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call.
Digging a bit deeper into format_batch we can see the following profiler data:
![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png)
Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion.
**Describe alternatives you've considered**
I am not familiar with pyarrow and have not yet considered the alternatives to the current approach.
Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
| 150 | Improve torch formatting performance
**Is your feature request related to a problem? Please describe.**
It would be great, if possible, to further improve read performance of raw encoded datasets and their subsequent conversion to torch tensors.
A bit more background. I am working on LM pre-training using HF ecosystem. We use encoded HF Wikipedia and BookCorpus datasets. The training machines are similar to DGX-1 workstations. We use HF trainer torch.distributed training approach on a single machine with 8 GPUs.
The current performance is about 30% slower than NVidia optimized BERT [examples](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling) baseline. Quite a bit of customized code and training loop tricks were used to achieve the baseline performance. It would be great to achieve the same performance while using nothing more than off the shelf HF ecosystem. Perhaps, in the future, with @stas00 work on deepspeed integration, it could even be exceeded.
**Describe the solution you'd like**
Using profiling tools we've observed that appx. 25% of cumulative run time is spent on data loader next call.
![dataloader_next](https://user-images.githubusercontent.com/458335/121895543-59742a00-ccee-11eb-85fb-f07715e3f1f6.png)
As you can observe most of the data loader next call is spent in HF datasets torch_formatter.py format_batch call.
Digging a bit deeper into format_batch we can see the following profiler data:
![torch_formatter](https://user-images.githubusercontent.com/458335/121895944-c7b8ec80-ccee-11eb-95d5-5875c5716c30.png)
Once again, a lot of time is spent in pyarrow table conversion to pandas which seems like an intermediary step. Offline @lhoestq told me that this approach was, for some unknown reason, faster than direct to numpy conversion.
**Describe alternatives you've considered**
I am not familiar with pyarrow and have not yet considered the alternatives to the current approach.
Most of the online advice around data loader performance improvements revolve around increasing number of workers, using pin memory for copying tensors from host device to gpus but we've already tried these avenues without much performance improvement. Weights & Biases dashboard for the pre-training task reports CPU utilization of ~ 10%, GPUs are completely saturated (GPU utilization is above 95% on all GPUs), while disk utilization is above 90%.
Hi ! I just re-ran a quick benchmark and using `to_numpy()` seems to be faster now:
```python
import pyarrow as pa # I used pyarrow 3.0.0
import numpy as np
n, max_length = 1_000, 512
low, high, size = 0, 2 << 16, (n, max_length)
table = pa.Table.from_pydict({
"input_ids": np.random.default_rng(42).integers(low=low, high=high, size=size).tolist()
})
%%timeit
_ = table.to_pandas()["input_ids"].to_numpy()
# 1.44 ms ± 80.1 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
%%timeit
_ = table["input_ids"].to_pandas().to_numpy()
# 461 µs ± 14.2 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
%%timeit
_ = table["input_ids"].to_numpy()
# 317 µs ± 5.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
```
Currently the conversion from arrow to numpy is done in the NumpyArrowExtractor here:
https://github.com/huggingface/datasets/blob/d6d0ede9486ffad7944642ca9a326e058b676788/src/datasets/formatting/formatting.py#L143-L166
Let's update the NumpyArrowExtractor to call `to_numpy` directly and see how our github benchmarks evolve ?__ | [
-0.35013532638549805,
-0.2402968406677246,
-0.07366824150085449,
0.1903572529554367,
0.1027538999915123,
0.14770635962486267,
0.2599889934062958,
0.6868165731430054,
-0.12113015353679657,
-0.06412002444267273,
-0.3566419780254364,
0.2431405484676361,
-0.11459852010011673,
-0.03322073444724083,
0.06633522361516953,
-0.3101109266281128,
0.0007665827870368958,
0.10030800849199295,
-0.06789612770080566,
-0.13086211681365967,
-0.10192406922578812,
-0.42416369915008545,
0.05567824840545654,
-0.23089207708835602,
-0.1764657199382782,
0.143389031291008,
-0.07297074049711227,
0.004990179091691971,
-0.01477799378335476,
-0.39140811562538147,
-0.016801990568637848,
0.20411209762096405,
0.1916383057832718,
0.23665562272071838,
-0.0001087393902707845,
-0.02196245640516281,
0.10556335747241974,
0.029854929074645042,
-0.3094548285007477,
0.2616172730922699,
0.32627159357070923,
-0.31579017639160156,
0.05455996096134186,
-0.20534224808216095,
-0.4622156620025635,
-0.20446480810642242,
-0.011553915217518806,
-0.3079187870025635,
0.04370926320552826,
0.032494332641363144,
0.1543280929327011,
0.2567412555217743,
-0.3000166118144989,
0.18780530989170074,
0.32916268706321716,
0.48526549339294434,
-0.1752861738204956,
0.09862008690834045,
0.3001522123813629,
0.029168350622057915,
-0.5153073668479919,
0.6179617643356323,
-0.17225757241249084,
-0.03250305727124214,
0.17719489336013794,
0.06036936491727829,
-0.24245521426200867,
-0.11645013093948364,
-0.08242093026638031,
0.40601903200149536,
0.03252445161342621,
-0.24458926916122437,
-0.5007596611976624,
-0.44534993171691895,
-0.030952833592891693,
-0.5959247350692749,
-0.10014718025922775,
0.111388199031353,
-0.28344231843948364,
0.1466880440711975,
-0.0680338591337204,
0.036880526691675186,
-0.12036436051130295,
-0.09613679349422455,
-0.05475850775837898,
0.25879377126693726,
0.24107299745082855,
-0.2225954830646515,
0.09051409363746643,
0.19611386954784393,
0.45579954981803894,
-0.11577935516834259,
0.27609750628471375,
-0.004552692174911499,
-0.35223251581192017,
-0.16664165258407593,
-0.023672275245189667,
-0.18670925498008728,
-0.15297484397888184,
-0.06688906252384186,
0.12647847831249237,
0.5531219840049744,
-0.09119188040494919,
-0.019700966775417328,
-0.23726147413253784,
0.03756026178598404,
-0.1032603457570076,
0.21059183776378632,
0.19669969379901886,
-0.118680439889431,
0.06776347756385803,
0.19367557764053345,
-0.0780177041888237,
-0.049307286739349365,
-0.3120102286338806,
0.1427364945411682,
-0.48154568672180176,
-0.08429025113582611,
-0.18622125685214996,
0.025211362168192863,
-0.13065527379512787,
-0.1333499401807785,
0.04096152260899544,
0.31119734048843384,
-0.2863076627254486,
0.19483327865600586,
0.16808445751667023,
-0.14746202528476715,
-0.24756193161010742,
-0.26792585849761963,
0.05119393393397331,
0.17039605975151062,
-0.2893528640270233,
0.006973749026656151,
0.2033194899559021,
-0.24583041667938232,
-0.09343065321445465,
-0.07095514237880707,
0.07478560507297516,
0.388759046792984,
0.02003285102546215,
-0.22809775173664093,
0.4766444265842438,
-0.027101997286081314,
-0.06796316057443619,
0.013656334951519966,
0.1813703030347824,
0.5773719549179077,
-0.2796095907688141,
0.15739990770816803,
-0.1916833519935608,
-0.20621715486049652,
-0.15920808911323547,
0.1019587367773056,
0.07004435360431671,
0.007334958761930466,
0.06688331067562103,
0.34242701530456543,
0.13319149613380432,
0.07672066986560822,
0.12647217512130737,
-0.2490808516740799,
-0.3356602191925049,
-0.11782275885343552,
0.3001022934913635,
0.30322375893592834,
-0.1989404559135437,
-0.04738591983914375,
0.47587287425994873,
0.34417852759361267,
0.4220888018608093,
0.4858787953853607,
-0.3000441789627075,
0.11796949803829193,
-0.02902454510331154,
0.00725623220205307,
0.3716587722301483,
-0.36978259682655334,
-0.12970733642578125,
0.3484441936016083,
0.07491359114646912,
0.27083975076675415,
0.16083940863609314,
0.19488370418548584,
0.4046298861503601,
-0.005936785601079464,
0.07297417521476746,
0.39548927545547485,
0.008220789954066277,
-0.049947671592235565,
-0.482464998960495,
-0.17390650510787964,
0.4433809518814087,
0.39572644233703613,
0.05743418633937836,
-0.3865261375904083,
-0.11886433511972427,
-0.10473915189504623,
0.4031054675579071,
-0.3227173984050751,
0.1457480937242508,
0.10898647457361221,
-0.17205823957920074,
0.15341338515281677,
0.015173645690083504,
0.2190544605255127,
-0.11219426244497299,
0.22421002388000488,
-0.36455073952674866,
0.3796460032463074,
0.04791228100657463,
-0.1950644999742508,
0.3231678009033203,
-0.03614523634314537,
-0.003982875496149063,
-0.25541967153549194,
0.04070751368999481,
-0.04461783170700073,
-0.20460262894630432,
0.025377001613378525,
0.04244584962725639,
0.3719463646411896,
-0.2666938304901123,
0.11531154811382294,
-0.2319299429655075,
0.11067293584346771,
0.052905380725860596,
-0.05287354066967964,
-0.05345344915986061,
0.2816495895385742,
0.06501039117574692,
-0.04305204004049301,
-0.07917871326208115,
0.1298169493675232,
-0.13434115052223206,
0.20282484591007233,
-0.2158794105052948,
0.1773775964975357,
0.418503999710083,
-0.12596145272254944,
0.29379552602767944,
0.17013846337795258,
-0.024878941476345062,
-0.1208951473236084,
-0.42238283157348633,
0.7661342620849609,
0.4835476279258728,
0.1557842195034027,
-0.1161571741104126,
-0.21867740154266357,
-0.222104012966156,
0.1484176367521286,
0.056070856750011444,
0.08440457284450531,
0.5234324932098389,
0.13681940734386444,
0.17340388894081116,
0.08097924292087555,
-0.41778773069381714,
0.37128162384033203,
0.3411574959754944,
0.005134858191013336,
-0.1374358832836151,
0.43637004494667053,
-0.07853854447603226,
-0.3662791848182678,
0.3380373418331146,
-0.550646185874939,
-0.00509895384311676,
0.2330383062362671,
0.23336796462535858,
0.02353242225944996,
-0.01775997504591942,
-0.03146374598145485,
0.0983770415186882,
0.010549575090408325,
-0.05427692458033562,
0.01268380880355835,
0.21903590857982635,
0.2533148229122162,
-0.07325073331594467,
-0.09442104399204254,
-0.1324290931224823,
0.02365817502140999,
-0.1572205275297165,
0.12378572672605515,
-0.41272109746932983,
-0.10316678136587143,
-0.155376136302948,
-0.3362695872783661,
-0.0705445408821106,
-0.17990975081920624,
0.030072955414652824,
0.13778646290302277,
-0.028504833579063416,
0.1710876077413559,
0.021794162690639496,
0.046973273158073425,
0.05702967941761017,
-0.22337706387043,
-0.17397823929786682,
-0.1969989687204361,
-0.03078443557024002,
0.03385380282998085,
0.14755964279174805,
-0.03262823820114136,
0.3699905574321747,
-0.006934940814971924,
0.1059628501534462,
0.0763375386595726,
-0.2765931785106659,
0.048594482243061066,
-0.1336110681295395,
-0.2551209032535553,
0.04960886389017105,
-0.12589725852012634,
-0.2280787229537964,
-0.12080254405736923,
0.09727287292480469,
0.001779286190867424,
0.058724068105220795,
-0.1553664654493332,
-0.09026386588811874,
0.18178127706050873,
-0.019235610961914062,
-0.22558137774467468,
-0.24595950543880463,
-0.30734944343566895,
-0.04960642009973526,
-0.1677563339471817,
0.15653753280639648,
-0.2041863054037094,
-0.028364818543195724,
0.13088321685791016,
0.20822449028491974,
0.04565916955471039,
0.02368113398551941,
-0.42927730083465576,
0.4179662764072418,
-0.2306927740573883,
-0.16887815296649933,
-0.401109516620636,
-0.020249921828508377,
0.00005058199167251587,
0.36734479665756226,
-0.4472314119338989,
0.21421471238136292,
-0.06474312394857407,
0.1862572580575943,
-0.24602508544921875,
-0.1165195107460022,
0.14454954862594604,
0.2486152946949005,
-0.09356870502233505,
0.008100010454654694,
0.07200388610363007,
-0.15417581796646118,
-0.23297888040542603,
0.10221614688634872,
-0.07459939271211624,
0.30419671535491943,
0.3246067464351654,
0.6840357184410095,
-0.061722394078969955,
-0.345792680978775,
0.10292747616767883,
0.1235019788146019,
0.10423067212104797,
-0.09333723038434982,
-0.23231501877307892,
0.12217705696821213,
-0.2074725329875946,
0.3181700110435486,
0.3299955725669861,
-0.053586483001708984,
-0.21739231050014496,
-0.013857753947377205,
-0.2203805148601532,
0.1459466814994812,
-0.2429204136133194,
0.6411698460578918,
-0.4819489121437073,
0.2805367112159729,
-0.09434463083744049,
0.47749772667884827,
-0.267218679189682,
-0.2383500337600708,
0.29150596261024475,
-0.006821990013122559,
0.2728026211261749,
-0.1776014119386673,
0.10382340848445892,
-0.17983528971672058,
-0.49148857593536377,
0.24443507194519043,
0.38476505875587463,
0.19534826278686523,
0.03308932110667229,
-0.012956053018569946,
0.19633501768112183,
-0.056744176894426346,
0.265669584274292,
0.006643231958150864,
-0.1794695109128952,
0.165277898311615,
-0.5235357284545898,
-0.19511951506137848,
0.009396139532327652,
-0.003670457750558853,
-0.07097126543521881,
-0.07673397660255432,
0.27617108821868896,
-0.11872344464063644,
-0.39650899171829224,
0.2941376864910126,
-0.05354924499988556,
-0.05985289067029953,
-0.0008520586416125298,
0.05153605714440346,
-0.011456936597824097,
-0.12476145476102829,
0.16677282750606537,
0.07657240331172943,
-0.010711515322327614,
-0.21172699332237244,
-0.05749509111046791,
-0.11023350059986115,
0.2859831750392914,
0.3494950532913208,
0.025546088814735413,
-0.1026386246085167,
0.021711910143494606,
0.11759831011295319,
0.07751549035310745,
0.3361070454120636,
0.47614046931266785,
0.07305487990379333,
-0.37654024362564087,
0.046519212424755096,
-0.034541573375463486,
-0.09407130628824234,
0.21856048703193665,
0.5431830883026123,
0.09415340423583984,
0.357247918844223,
-0.2959465980529785,
0.003148600459098816,
-0.44047293066978455,
0.12412241101264954,
0.07991121709346771,
0.016461092978715897,
-0.5305217504501343,
-0.5308508276939392,
0.44491368532180786,
0.09528903663158417,
-0.007360927760601044,
0.30800139904022217,
-0.19862337410449982,
-0.1722663789987564,
0.43405866622924805,
0.46194180846214294,
1.0132728815078735,
0.018463432788848877,
0.4371160566806793,
0.07837918400764465,
-0.3031279444694519,
-0.010949920862913132,
-0.6706627011299133,
0.24126510322093964,
-0.39932918548583984,
-0.22910575568675995,
-0.016653303056955338,
0.020678263157606125,
0.15239962935447693,
-0.06725838780403137,
0.020589318126440048,
0.03182327002286911,
0.1562063843011856,
0.09961429238319397,
-0.052722908556461334,
0.18215905129909515,
0.21333588659763336,
-0.7044988870620728,
-0.2040032148361206,
0.11375044286251068,
0.09074999392032623,
0.11755846440792084,
-0.048960600048303604,
-0.25799477100372314,
-0.16638141870498657,
0.1905657947063446,
-0.13835787773132324,
-0.04506237059831619,
-0.2100946307182312,
0.0955529659986496,
-0.2639066278934479,
-0.8112198710441589,
0.3461894690990448,
0.11804483830928802,
0.17771142721176147,
0.1102321594953537,
0.008975768461823463,
0.1276240050792694,
0.11280906200408936,
0.33758750557899475,
0.19162245094776154,
-0.3779071867465973,
0.34236738085746765,
-0.018887409940361977,
0.003991127014160156,
0.20391258597373962,
0.045379266142845154,
-0.18854928016662598,
-0.030591338872909546,
-0.04270647466182709,
0.28334492444992065,
-0.16243009269237518,
0.08990508317947388,
-0.11142139136791229,
-0.05001695454120636,
-0.24637386202812195,
0.1121336966753006,
0.13389620184898376,
-0.09504061192274094,
0.24689334630966187,
-0.004864431917667389,
-0.262728214263916,
-0.26011574268341064,
0.509530782699585,
0.15353775024414062,
-0.11776988953351974,
0.16912662982940674,
0.32075750827789307,
-0.5200850367546082,
-0.15202537178993225,
0.21273750066757202,
0.452996164560318,
-0.31429022550582886,
-0.13947202265262604,
-0.10357918590307236,
-0.08572950959205627,
-0.09490971267223358,
-0.11065240204334259,
-0.08580182492733002,
-0.17949825525283813,
-0.1017007902264595,
0.1357041597366333,
-0.40161409974098206,
-0.08848150074481964,
-0.2072799652814865,
0.26217520236968994,
0.005984269082546234,
0.4504779279232025,
-0.20523592829704285,
0.25692427158355713,
-0.3582395911216736,
-0.11573672294616699,
0.18900029361248016,
0.2031717300415039,
-0.12233223021030426,
0.1105046272277832,
0.1015334203839302,
0.23654717206954956,
0.047012463212013245,
0.38061559200286865,
-0.013310272246599197,
-0.1437842845916748,
-0.21117371320724487,
0.13594506680965424,
-0.16302454471588135,
-0.2040039598941803,
0.18534526228904724,
0.07138185948133469,
-0.2378407120704651,
-0.39862722158432007,
0.20836329460144043,
0.1215953603386879,
0.07943005859851837,
0.26502129435539246,
0.17490637302398682,
0.14563500881195068,
-0.011683931574225426,
0.1614363193511963,
0.04361078888177872,
0.35005617141723633,
-0.13124047219753265,
-0.033134594559669495,
-0.15472330152988434,
-0.18167689442634583,
0.019409511238336563,
0.16297650337219238,
0.4281500577926636,
0.09542302042245865,
0.3320987820625305,
0.027960246428847313,
0.02676526829600334,
-0.18606320023536682,
0.3409809172153473,
-0.08449004590511322,
-0.062081027776002884,
-0.26387298107147217,
0.345656156539917,
0.1365155279636383,
-0.0907139778137207,
-0.06269580125808716,
-0.13555409014225006,
-0.41723325848579407,
0.15794327855110168,
0.18290211260318756,
0.5511485934257507,
0.4552232623100281,
0.16137632727622986,
-0.06117403134703636,
0.041216570883989334,
-0.2157760113477707,
-0.16084393858909607,
0.4734087288379669,
0.25229188799858093,
-0.015894118696451187,
0.2946074903011322,
0.06074819341301918,
0.1728644073009491,
0.19793029129505157,
0.16690975427627563,
0.5242637395858765,
0.44370242953300476,
0.22663332521915436,
-0.16032618284225464,
-0.28039124608039856,
-0.2760699689388275,
0.07497674971818924,
0.09503930807113647,
0.434154212474823,
-0.16329601407051086,
0.26831457018852234,
-0.012611913494765759,
-0.46388891339302063,
0.18484929203987122,
0.5748348832130432,
-0.2423255443572998,
-0.07486473023891449,
0.21023713052272797,
-0.019163571298122406,
-0.34950295090675354,
0.09301403164863586,
-0.10507208108901978,
-0.07509978115558624,
-0.015653550624847412,
0.3138207495212555,
0.03484019637107849,
0.01915137842297554,
0.1164429783821106,
-0.16677311062812805,
0.4328155219554901,
-0.21308854222297668,
-0.05874647945165634,
0.03408152610063553,
0.005026929080486298,
-0.06483463943004608,
-0.05554898828268051,
0.20038938522338867,
-0.09766337275505066,
-0.37714046239852905,
-0.037999462336301804,
-0.20765620470046997,
0.11538121104240417,
0.1750670224428177,
0.08639442175626755,
-0.047186627984046936,
-0.22251243889331818,
0.3377094268798828,
0.027160244062542915,
-0.18818069994449615,
0.06818173825740814,
0.021009590476751328,
-0.07886068522930145,
-0.06442378461360931,
0.19694864749908447,
0.3674181401729584,
-0.17136621475219727,
-0.21732687950134277,
-0.3684084117412567,
-0.24444469809532166,
-0.19971568882465363,
0.5486782789230347,
-0.08734700828790665,
-0.03353264927864075,
0.09559360146522522,
0.10148146748542786,
0.08621691167354584,
0.6552406549453735,
0.08003959059715271,
0.10044083744287491,
-0.30571678280830383,
-0.10018041729927063,
-0.01984800025820732,
-0.03477700799703598,
-0.030332040041685104,
-0.13634350895881653,
0.0663217231631279,
-0.03536410629749298,
0.25372928380966187,
-0.01605534553527832,
-0.06540647149085999,
-0.19823892414569855,
0.25221654772758484,
0.34217941761016846,
-0.3151421546936035,
0.19319431483745575,
-0.5118904709815979,
0.15018142759799957,
-0.12944434583187103,
-0.22087714076042175,
0.21895475685596466,
0.201865091919899,
0.08278838545084,
-0.283098042011261,
-0.15040914714336395,
0.2201904058456421,
0.12713421881198883,
0.4697135388851166,
-0.09937406331300735,
0.03842465579509735,
-0.1637730896472931,
-0.24263042211532593,
-0.11561517417430878,
0.17853081226348877,
-0.15644089877605438,
0.1788851022720337,
0.15880730748176575,
0.3668154776096344,
0.1120525598526001,
-0.5914243459701538,
-0.2831096947193146,
0.6362105011940002,
0.1218942403793335,
-0.1333908587694168,
-0.1297859102487564,
0.30113741755485535,
-0.1914127767086029,
-0.008940128609538078,
0.11733792722225189,
0.3214927613735199,
0.4039698839187622,
0.11564774811267853,
-0.6210434436798096,
-0.2591514587402344,
0.33287304639816284,
-0.2074272185564041,
-0.07195870578289032,
-0.159703329205513,
-0.0799204558134079,
0.26900428533554077,
0.5017661452293396,
-0.755147397518158,
-0.12310118973255157,
0.12834131717681885,
0.09595821797847748,
-0.09908218681812286,
0.3250206410884857,
0.32278749346733093,
0.0367262028157711,
-0.3005054295063019,
-0.03767760097980499,
-0.15676140785217285,
-0.016944877803325653,
-0.3125457465648651,
-0.29178154468536377
] |