html_url
stringlengths
48
51
title
stringlengths
5
280
comments
stringlengths
63
51.8k
body
stringlengths
0
36.2k
comment_length
int64
16
1.52k
text
stringlengths
159
54.1k
embeddings
listlengths
768
768
https://github.com/huggingface/datasets/issues/6775
IndexError: Invalid key: 0 is out of bounds for size 0
Hi! You should be able to fix this by passing `remove_unused_columns=False` to the `transformers` `TrainingArguments` as explained in https://github.com/huggingface/peft/issues/1299. (I'm not familiar with Vertex AI, but I'd assume `remove_unused_columns` can be passed as a flag to the docker container)
### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002
39
IndexError: Invalid key: 0 is out of bounds for size 0 ### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002 Hi! You should be able to fix this by passing `remove_unused_columns=False` to the `transformers` `TrainingArguments` as explained in https://github.com/huggingface/peft/issues/1299. (I'm not familiar with Vertex AI, but I'd assume `remove_unused_columns` can be passed as a flag to the docker container)
[ -0.28066593408584595, -0.47747936844825745, 0.019472308456897736, 0.3315136432647705, 0.0059850625693798065, -0.030505608767271042, 0.08925245702266693, 0.33032339811325073, 0.032530248165130615, 0.1563732624053955, -0.2661375105381012, 0.060142435133457184, -0.09422646462917328, 0.4449833333492279, -0.0871804878115654, -0.3004750907421112, -0.031435735523700714, 0.12220142781734467, 0.3271576762199402, 0.05073251575231552, -0.3249167203903198, 0.21276047825813293, -0.2704356610774994, 0.29350876808166504, -0.16703125834465027, -0.22655364871025085, 0.09205583482980728, 0.23466697335243225, -0.10501457750797272, -0.18814480304718018, 0.18059799075126648, -0.5807288289070129, 0.2683962285518646, 0.5133949518203735, -0.00012073567631887272, 0.004902258515357971, 0.0979359894990921, -0.1210201308131218, -0.1832079291343689, 0.0962597131729126, 0.21084120869636536, -0.11364620923995972, -0.19647645950317383, -0.22097955644130707, -0.2335861623287201, -0.3329051733016968, 0.0682653933763504, 0.31786048412323, 0.36156558990478516, 0.5647464394569397, 0.12545672059059143, 0.17141671478748322, 0.2708599865436554, -0.16307765245437622, -0.043038204312324524, -0.4466325044631958, -0.11719414591789246, 0.3056569993495941, 0.29180920124053955, 0.026461442932486534, -0.07868766039609909, 0.3120504319667816, -0.22922255098819733, -0.11253118515014648, 0.3330805003643036, -0.021563556045293808, 0.19685609638690948, -0.4860195219516754, 0.17954912781715393, 0.13748976588249207, 0.08182170987129211, -0.09747277945280075, -0.3787056803703308, -0.45725247263908386, 0.129802867770195, -0.30639714002609253, 0.24208319187164307, 0.32787415385246277, 0.0300239697098732, 0.4115365147590637, 0.17746680974960327, 0.10756010562181473, -0.11845242232084274, 0.0925878956913948, -0.2437802255153656, 0.4983732998371124, -0.013431391678750515, 0.08449332416057587, 0.16889923810958862, -0.07316071540117264, -0.1354472041130066, 0.2001882791519165, -0.4056951403617859, 0.1535329669713974, -0.3092325031757355, -0.09132257103919983, 0.04516717419028282, 0.10418307036161423, 0.06187272071838379, 0.2962704300880432, 0.36000680923461914, -0.02201930806040764, 0.1653914749622345, -0.09537302702665329, 0.09586495161056519, 0.5454307198524475, -0.06482646614313126, 0.8031893968582153, 0.33362555503845215, 0.22921693325042725, -0.04277840629220009, -0.05746065080165863, 0.11666630953550339, -0.2461397349834442, -0.13336901366710663, 0.061003901064395905, -0.04764530807733536, -0.12765218317508698, -0.45155662298202515, 0.18909399211406708, -0.09879449009895325, 0.09858077019453049, 0.39627981185913086, 0.3320257067680359, 0.036176037043333054, -0.11990361660718918, 0.08823247253894806, 0.3008958697319031, -0.4833337068557739, -0.23635634779930115, -0.1767115741968155, 0.1990157663822174, 0.08893777430057526, 0.13320903480052948, 0.038702305406332016, -0.26292192935943604, 0.48142892122268677, -0.11951233446598053, 0.3989276885986328, -0.21987000107765198, 0.1574854850769043, -0.22252891957759857, -0.05453907698392868, 0.5060524344444275, -0.08921517431735992, -0.004285991191864014, 0.03091699443757534, -0.15439258515834808, -0.1221260204911232, 0.2088840901851654, -0.545764148235321, -0.44295480847358704, -0.05944403260946274, 0.016470035538077354, -0.19153952598571777, 0.2767576277256012, 0.08372681587934494, 0.08578099310398102, 0.27196305990219116, -0.3519435226917267, 0.16237998008728027, -0.16258504986763, -0.18168121576309204, -0.23459838330745697, 0.08878619968891144, 0.12842513620853424, -0.18335705995559692, 0.027195140719413757, -0.11652740836143494, 0.34211766719818115, 0.036156557500362396, 0.36728301644325256, -0.06078202649950981, 0.24964287877082825, -0.3656572699546814, 0.5239205956459045, -0.08464913815259933, -0.33550089597702026, -0.8524019122123718, 0.0686151385307312, -0.15509697794914246, -0.06381906569004059, -0.028848953545093536, 0.09270582348108292, 0.2748269736766815, 0.071144238114357, 0.07311277836561203, -0.03889397904276848, 0.04710490256547928, -0.09041178226470947, -0.31055501103401184, -0.28629541397094727, -0.2353498786687851, -0.15194882452487946, 0.15881682932376862, 0.05869147926568985, -0.01004011183977127, -0.1928732693195343, -0.05043085664510727, -0.23772040009498596, 0.005199656821787357, 0.2760031521320343, 0.3793164789676666, -0.34479743242263794, 0.20647932589054108, 0.2272336781024933, -0.40454989671707153, 0.31023135781288147, -0.3764098882675171, 0.17379815876483917, -0.24195225536823273, -0.019348621368408203, -0.3782620131969452, -0.2080335170030594, -0.16935473680496216, -0.45278140902519226, -0.009203214198350906, -0.13418222963809967, 0.23925024271011353, -0.10856758058071136, -0.03324030339717865, 0.223976269364357, -0.24408960342407227, 0.04936151206493378, -0.19579394161701202, 0.21375685930252075, -0.24124713242053986, -0.31338462233543396, 0.03216592222452164, -0.052086301147937775, 0.3062553107738495, -0.027709566056728363, -0.05644897371530533, 0.22309055924415588, -0.07815989851951599, -0.12424144148826599, -0.17166614532470703, 0.5252529978752136, 0.31850358843803406, -0.18360234797000885, 0.2083074450492859, 0.07452940940856934, -0.06840338557958603, -0.06348464637994766, 0.0538199320435524, 0.8773183226585388, 0.25553926825523376, -0.02124052494764328, -0.2041146159172058, -0.18304607272148132, 0.02073667012155056, -0.14320361614227295, 0.0038152262568473816, -0.038623739033937454, 0.10060635954141617, -0.22176598012447357, 0.16762815415859222, -0.1129351556301117, -0.16648681461811066, -0.052752308547496796, 0.04124479740858078, 0.026985209435224533, 0.2896217405796051, 0.02747708186507225, -0.016055859625339508, 0.0544784739613533, 0.13494864106178284, 0.030925434082746506, 0.1645592451095581, 0.2198905497789383, -0.02361128106713295, 0.20918919146060944, -0.19706040620803833, -0.09640317410230637, 0.02488529682159424, 0.027935415506362915, 0.015085834078490734, 0.3094438910484314, 0.0807783305644989, 0.0004892339929938316, 0.03855877369642258, 0.08032180368900299, 0.22551552951335907, 0.488883376121521, -0.48139241337776184, 0.29390138387680054, -0.02397739700973034, -0.3061606287956238, 0.1430351883172989, 0.1719520539045334, -0.25053098797798157, -0.1809219866991043, -0.012189436703920364, 0.11726965010166168, -0.17054177820682526, -0.04182300716638565, -0.2597266435623169, 0.17993390560150146, 0.20183782279491425, -0.126156747341156, 0.14719435572624207, 0.16245682537555695, -0.27483341097831726, -0.09015688300132751, 0.4931677579879761, -0.2216625064611435, -0.024700572714209557, 0.04622414708137512, -0.3569597005844116, 0.03937750682234764, -0.4266420304775238, 0.08711127936840057, 0.06147453933954239, 0.4652862846851349, 0.03286253660917282, 0.21723495423793793, -0.26856476068496704, -0.0013472884893417358, 0.174966499209404, 0.12309634685516357, -0.2456970512866974, -0.1799515038728714, -0.16903845965862274, 0.2208820879459381, -0.17125579714775085, -0.0950380340218544, 0.14898785948753357, -0.33868736028671265, -0.05251862853765488, 0.04634533450007439, 0.3550451397895813, 0.42318490147590637, 0.3149893581867218, -0.06301224231719971, 0.16544996201992035, -0.06242189556360245, -0.03437432646751404, 0.1367350071668625, 0.37461069226264954, -0.08662916719913483, -0.30055949091911316, 0.028038259595632553, -0.3432195782661438, 0.3580743968486786, -0.2546854019165039, -0.3936575651168823, -0.1287437081336975, -0.09084893763065338, 0.2744081914424896, -0.1958860158920288, 0.07083351165056229, -0.0010954439640045166, -0.28239282965660095, 0.06785985827445984, -0.07146454602479935, -0.1352558434009552, 0.10942864418029785, 0.3965734541416168, 0.265139639377594, 0.02539609558880329, -0.03253632038831711, -0.20083686709403992, 0.5701972842216492, 0.24933597445487976, 0.09069490432739258, 0.016032274812459946, -0.08529335260391235, -0.10104788839817047, -0.3084198832511902, -0.06043248623609543, 0.18689899146556854, 0.12254264950752258, -0.29478830099105835, 0.4365310072898865, 0.10548274219036102, -0.062459997832775116, -0.10379353165626526, -0.3435376286506653, -0.5244941711425781, -0.044173210859298706, 0.16021274030208588, 0.34905263781547546, 0.10051455348730087, -0.017017994076013565, 0.37092503905296326, -0.2442457526922226, -0.1090889498591423, 0.10710835456848145, -0.06617340445518494, 0.02916301041841507, 0.016995292156934738, 0.36932069063186646, -0.26602602005004883, -0.4287901520729065, 0.46212464570999146, -0.10837151855230331, 0.13294446468353271, 0.0247194804251194, -0.18114140629768372, 0.15507088601589203, -0.16541866958141327, 0.5125327706336975, -0.06589925289154053, -0.20467348396778107, 0.07841065526008606, 0.23770108819007874, 0.07066604495048523, -0.2215423434972763, -0.02359228953719139, 0.13445156812667847, 0.46653005480766296, 0.5863974690437317, -0.24097099900245667, 0.09039219468832016, -0.0371595174074173, 0.08331643790006638, -0.18027383089065552, 0.2525636851787567, -0.3108900487422943, -0.3436911106109619, -0.05395032465457916, 0.26381227374076843, 0.08971504867076874, 0.3723680377006531, -0.10901013761758804, 0.3731098771095276, 0.14735549688339233, -0.14593887329101562, -0.0013938769698143005, 0.32933929562568665, 0.6566372513771057, -0.0963345319032669, 0.15951240062713623, 0.0937890037894249, 0.16787368059158325, 0.33419230580329895, 0.6681458950042725, 0.21131323277950287, 0.22112663090229034, 0.08434639871120453, 0.013923346064984798, -0.20146945118904114, 0.33724769949913025, 0.12406785786151886, 0.18332192301750183, 0.2423383742570877, 0.2159472107887268, -0.12066426128149033, -0.2950114607810974, 0.003758680075407028, 0.14975027740001678, -0.3588108420372009, -0.09863549470901489, 0.5908243060112, -0.011960141360759735, -0.03609734773635864, 0.21965260803699493, 0.2423911690711975, -0.17305564880371094, 0.40447115898132324, 0.29517626762390137, 0.879645586013794, -0.04616573452949524, 0.009440269321203232, 0.43351104855537415, 0.1599506139755249, 0.3531619608402252, -0.17535316944122314, 0.32622623443603516, -0.3820408284664154, -0.26373082399368286, -0.03876356780529022, -0.01860162243247032, 0.15368235111236572, 0.022762563079595566, -0.25430941581726074, 0.12471095472574234, -0.019585557281970978, -0.3683655261993408, -0.22894425690174103, 0.11451920866966248, -0.019472254440188408, 0.035342615097761154, -0.17229358851909637, 0.007581185549497604, -0.18028515577316284, 0.476026713848114, -0.035615209490060806, -0.16144829988479614, -0.45011723041534424, -0.2931792140007019, -0.31060105562210083, -0.08498211205005646, -0.37355154752731323, -0.11985549330711365, 0.1624213457107544, -0.5230306386947632, 0.25190797448158264, -0.16151726245880127, 0.02289743721485138, 0.016031654551625252, -0.1495695412158966, 0.16078907251358032, 0.231397807598114, 0.05555533617734909, 0.13466095924377441, -0.07721851021051407, 0.18021038174629211, -0.058325543999671936, -0.19820941984653473, -0.06020084768533707, 0.04861634224653244, -0.05694295093417168, 0.0888441652059555, 0.15555419027805328, -0.19551001489162445, -0.13211798667907715, -0.24973253905773163, -0.20600241422653198, -0.047176871448755264, -0.24534785747528076, 0.0218672938644886, 0.14545485377311707, -0.24201856553554535, -0.10770735889673233, -0.00979933887720108, -0.4818700850009918, -0.19983097910881042, 0.3658028244972229, 0.2643853724002838, -0.1910974383354187, 0.640241265296936, 0.2562059462070465, 0.07158683985471725, -0.14304398000240326, 0.14718344807624817, 0.13490456342697144, -0.24205675721168518, 0.1791730374097824, -0.02542535401880741, -0.13340063393115997, 0.10118943452835083, 0.42826536297798157, 0.33563166856765747, 0.21858397126197815, -0.26853978633880615, -0.27250397205352783, -0.578578770160675, 0.2360900193452835, 0.10950914025306702, 0.06202268227934837, -0.37572377920150757, 0.056789398193359375, 0.10615216195583344, -0.03963097184896469, -0.1985880732536316, -0.05440588295459747, -0.3950386047363281, 0.026988303288817406, 0.3258836567401886, 0.11075140535831451, 0.06279990077018738, 0.12088964879512787, -0.08703511953353882, 0.056588731706142426, -0.11201252788305283, -0.07871746271848679, -0.21296650171279907, 0.13784444332122803, -0.0055414605885744095, -0.1764863282442093, -0.11345719546079636, -0.3165765404701233, -0.12579652667045593, -0.14431849122047424, 0.30782583355903625, 0.19438976049423218, 0.13862046599388123, 0.1208232045173645, -0.03988044336438179, -0.00962868332862854, -0.1688242405653, 0.048609163612127304, 0.004769712686538696, 0.16238579154014587, 0.295712947845459, 0.3576594293117523, 0.21657396852970123, 0.15108300745487213, -0.10666383802890778, 0.017444364726543427, -0.5637590885162354, -0.05236522853374481, -0.018324747681617737, -0.3271968364715576, 0.0014045089483261108, 0.18482056260108948, 0.05994077026844025, 0.20589816570281982, -0.10478018969297409, 0.04448273777961731, 0.35792022943496704, 0.0646284744143486, -0.2867365777492523, -0.04780622199177742, 0.1118093729019165, -0.04507158324122429, -0.05985021963715553, 0.46616899967193604, 0.2438097596168518, 0.06150670349597931, -0.48179829120635986, 0.17367300391197205, -0.1417907178401947, 0.2920726537704468, 0.1866726279258728, 0.7362819910049438, 0.204279825091362, -0.04473352059721947, 0.4228043258190155, -0.23770743608474731, 0.13684631884098053, 0.33697980642318726, -0.2562151849269867, 0.04650476202368736, -0.049918629229068756, 0.4144738018512726, -0.11542408913373947, -0.7970684766769409, -0.16873325407505035, -0.10235077142715454, 0.0402507483959198, 0.07851334661245346, -0.04267078638076782, 0.21609893441200256, 0.021924789994955063, -0.24736236035823822, -0.14671464264392853, 0.15153957903385162, -0.5240290760993958, 0.007526783272624016, -0.34082889556884766, -0.24079707264900208, 0.12191559374332428, 0.024147938936948776, 0.06889420747756958, -0.014475136995315552, 0.007073640823364258, -0.00603494793176651, -0.5795778036117554, 0.3997425436973572, -0.2281774878501892, 0.25714725255966187, 0.13929355144500732, -0.31071916222572327, 0.3764277994632721, 0.22886735200881958, -0.06750403344631195, 0.1630832850933075, 0.09814191609621048, 0.6825338006019592, 0.13905183970928192, -0.22514759004116058, -0.07266655564308167, 0.24637338519096375, -0.053833648562431335, -0.1966206133365631, 0.009411423467099667, 0.3035133481025696, 0.19013194739818573, 0.25079768896102905, -0.0882406085729599, -0.13729025423526764, -0.07537862658500671, 0.030921513214707375, 0.39291253685951233, -0.028225455433130264, 0.18808025121688843, -0.41838446259498596, -0.4121072292327881, -0.16348735988140106, 0.19143177568912506, -0.1863514930009842, 0.3233473598957062, -0.053065430372953415, 0.04527219384908676, 0.1985781490802765, 0.21621102094650269, 0.002692287787795067, -0.2696684002876282, 0.5837225914001465, 0.597804844379425, 0.029399514198303223, -0.5097256898880005, 0.018958404660224915, -0.3499075770378113, 0.30139288306236267, -0.6289397478103638, -0.026429014280438423, 0.1364554613828659, 0.272819846868515, -0.0773167833685875, -0.23894523084163666, 0.3593960404396057, 0.06000642105937004, 0.27789217233657837, 0.6054530143737793, -0.15197932720184326, -0.3027724325656891, -0.411674439907074, -0.023094622418284416, 0.011842440813779831, -0.21493875980377197, 0.0638871043920517, -0.018354376778006554, -0.03228907287120819, 0.08596035838127136, 0.09978550672531128, -0.013660440221428871, 0.05186987668275833, 0.5265001058578491, 0.15931226313114166, 0.3797856569290161, -0.030647315084934235, -0.05605775862932205, -0.43223848938941956, -0.10352734476327896, -0.2636748254299164, 0.11230068653821945, 0.09262104332447052, 0.6569477319717407, -0.03546950966119766, -0.23132078349590302, -0.3874509036540985, 0.1790010780096054, 0.18747971951961517, -0.1808694303035736, 0.050061434507369995, 0.20792743563652039, -0.1919955313205719, -0.21665483713150024, 0.2797966003417969, 0.255062997341156, 0.16007277369499207, -0.2280758023262024, -0.27365291118621826, -0.20869196951389313, 0.5025376677513123, -0.35773271322250366, -0.025009995326399803, 0.06481717526912689, 0.35343971848487854, 0.09435160458087921, -0.14156238734722137, -0.5027105808258057, -0.011304624378681183, 0.12790344655513763, -0.08095425367355347, -0.3460330069065094, -0.18161842226982117, -0.1787724643945694, -0.059059858322143555, 0.028563793748617172, 0.05094413086771965, 0.029052363708615303, -0.3211509585380554, -0.06412285566329956, -0.17744430899620056 ]
https://github.com/huggingface/datasets/issues/6775
IndexError: Invalid key: 0 is out of bounds for size 0
I had the same problem, but I spent a whole day trying different combination with my own dataset with the example data set and found the reason: the example data is multi-turn conversation between human and assistant, so # Humman or # Assistant appear at least twice. If your own custom data only has single turn conversation, it might end up with the same error. What you can do is repeat your single turn conversation twice in your training data (keep the key 'text' the same) and maybe it works. I guess the reason is the specific way processing the data requires and counts multi-turn only (single turn will be discarded so it ends up with no training data), but since I am using Google Vertex AI, I don't have direct access to the underlying code so that was just my guess.
### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002
142
IndexError: Invalid key: 0 is out of bounds for size 0 ### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002 I had the same problem, but I spent a whole day trying different combination with my own dataset with the example data set and found the reason: the example data is multi-turn conversation between human and assistant, so # Humman or # Assistant appear at least twice. If your own custom data only has single turn conversation, it might end up with the same error. What you can do is repeat your single turn conversation twice in your training data (keep the key 'text' the same) and maybe it works. I guess the reason is the specific way processing the data requires and counts multi-turn only (single turn will be discarded so it ends up with no training data), but since I am using Google Vertex AI, I don't have direct access to the underlying code so that was just my guess.
[ -0.28066593408584595, -0.47747936844825745, 0.019472308456897736, 0.3315136432647705, 0.0059850625693798065, -0.030505608767271042, 0.08925245702266693, 0.33032339811325073, 0.032530248165130615, 0.1563732624053955, -0.2661375105381012, 0.060142435133457184, -0.09422646462917328, 0.4449833333492279, -0.0871804878115654, -0.3004750907421112, -0.031435735523700714, 0.12220142781734467, 0.3271576762199402, 0.05073251575231552, -0.3249167203903198, 0.21276047825813293, -0.2704356610774994, 0.29350876808166504, -0.16703125834465027, -0.22655364871025085, 0.09205583482980728, 0.23466697335243225, -0.10501457750797272, -0.18814480304718018, 0.18059799075126648, -0.5807288289070129, 0.2683962285518646, 0.5133949518203735, -0.00012073567631887272, 0.004902258515357971, 0.0979359894990921, -0.1210201308131218, -0.1832079291343689, 0.0962597131729126, 0.21084120869636536, -0.11364620923995972, -0.19647645950317383, -0.22097955644130707, -0.2335861623287201, -0.3329051733016968, 0.0682653933763504, 0.31786048412323, 0.36156558990478516, 0.5647464394569397, 0.12545672059059143, 0.17141671478748322, 0.2708599865436554, -0.16307765245437622, -0.043038204312324524, -0.4466325044631958, -0.11719414591789246, 0.3056569993495941, 0.29180920124053955, 0.026461442932486534, -0.07868766039609909, 0.3120504319667816, -0.22922255098819733, -0.11253118515014648, 0.3330805003643036, -0.021563556045293808, 0.19685609638690948, -0.4860195219516754, 0.17954912781715393, 0.13748976588249207, 0.08182170987129211, -0.09747277945280075, -0.3787056803703308, -0.45725247263908386, 0.129802867770195, -0.30639714002609253, 0.24208319187164307, 0.32787415385246277, 0.0300239697098732, 0.4115365147590637, 0.17746680974960327, 0.10756010562181473, -0.11845242232084274, 0.0925878956913948, -0.2437802255153656, 0.4983732998371124, -0.013431391678750515, 0.08449332416057587, 0.16889923810958862, -0.07316071540117264, -0.1354472041130066, 0.2001882791519165, -0.4056951403617859, 0.1535329669713974, -0.3092325031757355, -0.09132257103919983, 0.04516717419028282, 0.10418307036161423, 0.06187272071838379, 0.2962704300880432, 0.36000680923461914, -0.02201930806040764, 0.1653914749622345, -0.09537302702665329, 0.09586495161056519, 0.5454307198524475, -0.06482646614313126, 0.8031893968582153, 0.33362555503845215, 0.22921693325042725, -0.04277840629220009, -0.05746065080165863, 0.11666630953550339, -0.2461397349834442, -0.13336901366710663, 0.061003901064395905, -0.04764530807733536, -0.12765218317508698, -0.45155662298202515, 0.18909399211406708, -0.09879449009895325, 0.09858077019453049, 0.39627981185913086, 0.3320257067680359, 0.036176037043333054, -0.11990361660718918, 0.08823247253894806, 0.3008958697319031, -0.4833337068557739, -0.23635634779930115, -0.1767115741968155, 0.1990157663822174, 0.08893777430057526, 0.13320903480052948, 0.038702305406332016, -0.26292192935943604, 0.48142892122268677, -0.11951233446598053, 0.3989276885986328, -0.21987000107765198, 0.1574854850769043, -0.22252891957759857, -0.05453907698392868, 0.5060524344444275, -0.08921517431735992, -0.004285991191864014, 0.03091699443757534, -0.15439258515834808, -0.1221260204911232, 0.2088840901851654, -0.545764148235321, -0.44295480847358704, -0.05944403260946274, 0.016470035538077354, -0.19153952598571777, 0.2767576277256012, 0.08372681587934494, 0.08578099310398102, 0.27196305990219116, -0.3519435226917267, 0.16237998008728027, -0.16258504986763, -0.18168121576309204, -0.23459838330745697, 0.08878619968891144, 0.12842513620853424, -0.18335705995559692, 0.027195140719413757, -0.11652740836143494, 0.34211766719818115, 0.036156557500362396, 0.36728301644325256, -0.06078202649950981, 0.24964287877082825, -0.3656572699546814, 0.5239205956459045, -0.08464913815259933, -0.33550089597702026, -0.8524019122123718, 0.0686151385307312, -0.15509697794914246, -0.06381906569004059, -0.028848953545093536, 0.09270582348108292, 0.2748269736766815, 0.071144238114357, 0.07311277836561203, -0.03889397904276848, 0.04710490256547928, -0.09041178226470947, -0.31055501103401184, -0.28629541397094727, -0.2353498786687851, -0.15194882452487946, 0.15881682932376862, 0.05869147926568985, -0.01004011183977127, -0.1928732693195343, -0.05043085664510727, -0.23772040009498596, 0.005199656821787357, 0.2760031521320343, 0.3793164789676666, -0.34479743242263794, 0.20647932589054108, 0.2272336781024933, -0.40454989671707153, 0.31023135781288147, -0.3764098882675171, 0.17379815876483917, -0.24195225536823273, -0.019348621368408203, -0.3782620131969452, -0.2080335170030594, -0.16935473680496216, -0.45278140902519226, -0.009203214198350906, -0.13418222963809967, 0.23925024271011353, -0.10856758058071136, -0.03324030339717865, 0.223976269364357, -0.24408960342407227, 0.04936151206493378, -0.19579394161701202, 0.21375685930252075, -0.24124713242053986, -0.31338462233543396, 0.03216592222452164, -0.052086301147937775, 0.3062553107738495, -0.027709566056728363, -0.05644897371530533, 0.22309055924415588, -0.07815989851951599, -0.12424144148826599, -0.17166614532470703, 0.5252529978752136, 0.31850358843803406, -0.18360234797000885, 0.2083074450492859, 0.07452940940856934, -0.06840338557958603, -0.06348464637994766, 0.0538199320435524, 0.8773183226585388, 0.25553926825523376, -0.02124052494764328, -0.2041146159172058, -0.18304607272148132, 0.02073667012155056, -0.14320361614227295, 0.0038152262568473816, -0.038623739033937454, 0.10060635954141617, -0.22176598012447357, 0.16762815415859222, -0.1129351556301117, -0.16648681461811066, -0.052752308547496796, 0.04124479740858078, 0.026985209435224533, 0.2896217405796051, 0.02747708186507225, -0.016055859625339508, 0.0544784739613533, 0.13494864106178284, 0.030925434082746506, 0.1645592451095581, 0.2198905497789383, -0.02361128106713295, 0.20918919146060944, -0.19706040620803833, -0.09640317410230637, 0.02488529682159424, 0.027935415506362915, 0.015085834078490734, 0.3094438910484314, 0.0807783305644989, 0.0004892339929938316, 0.03855877369642258, 0.08032180368900299, 0.22551552951335907, 0.488883376121521, -0.48139241337776184, 0.29390138387680054, -0.02397739700973034, -0.3061606287956238, 0.1430351883172989, 0.1719520539045334, -0.25053098797798157, -0.1809219866991043, -0.012189436703920364, 0.11726965010166168, -0.17054177820682526, -0.04182300716638565, -0.2597266435623169, 0.17993390560150146, 0.20183782279491425, -0.126156747341156, 0.14719435572624207, 0.16245682537555695, -0.27483341097831726, -0.09015688300132751, 0.4931677579879761, -0.2216625064611435, -0.024700572714209557, 0.04622414708137512, -0.3569597005844116, 0.03937750682234764, -0.4266420304775238, 0.08711127936840057, 0.06147453933954239, 0.4652862846851349, 0.03286253660917282, 0.21723495423793793, -0.26856476068496704, -0.0013472884893417358, 0.174966499209404, 0.12309634685516357, -0.2456970512866974, -0.1799515038728714, -0.16903845965862274, 0.2208820879459381, -0.17125579714775085, -0.0950380340218544, 0.14898785948753357, -0.33868736028671265, -0.05251862853765488, 0.04634533450007439, 0.3550451397895813, 0.42318490147590637, 0.3149893581867218, -0.06301224231719971, 0.16544996201992035, -0.06242189556360245, -0.03437432646751404, 0.1367350071668625, 0.37461069226264954, -0.08662916719913483, -0.30055949091911316, 0.028038259595632553, -0.3432195782661438, 0.3580743968486786, -0.2546854019165039, -0.3936575651168823, -0.1287437081336975, -0.09084893763065338, 0.2744081914424896, -0.1958860158920288, 0.07083351165056229, -0.0010954439640045166, -0.28239282965660095, 0.06785985827445984, -0.07146454602479935, -0.1352558434009552, 0.10942864418029785, 0.3965734541416168, 0.265139639377594, 0.02539609558880329, -0.03253632038831711, -0.20083686709403992, 0.5701972842216492, 0.24933597445487976, 0.09069490432739258, 0.016032274812459946, -0.08529335260391235, -0.10104788839817047, -0.3084198832511902, -0.06043248623609543, 0.18689899146556854, 0.12254264950752258, -0.29478830099105835, 0.4365310072898865, 0.10548274219036102, -0.062459997832775116, -0.10379353165626526, -0.3435376286506653, -0.5244941711425781, -0.044173210859298706, 0.16021274030208588, 0.34905263781547546, 0.10051455348730087, -0.017017994076013565, 0.37092503905296326, -0.2442457526922226, -0.1090889498591423, 0.10710835456848145, -0.06617340445518494, 0.02916301041841507, 0.016995292156934738, 0.36932069063186646, -0.26602602005004883, -0.4287901520729065, 0.46212464570999146, -0.10837151855230331, 0.13294446468353271, 0.0247194804251194, -0.18114140629768372, 0.15507088601589203, -0.16541866958141327, 0.5125327706336975, -0.06589925289154053, -0.20467348396778107, 0.07841065526008606, 0.23770108819007874, 0.07066604495048523, -0.2215423434972763, -0.02359228953719139, 0.13445156812667847, 0.46653005480766296, 0.5863974690437317, -0.24097099900245667, 0.09039219468832016, -0.0371595174074173, 0.08331643790006638, -0.18027383089065552, 0.2525636851787567, -0.3108900487422943, -0.3436911106109619, -0.05395032465457916, 0.26381227374076843, 0.08971504867076874, 0.3723680377006531, -0.10901013761758804, 0.3731098771095276, 0.14735549688339233, -0.14593887329101562, -0.0013938769698143005, 0.32933929562568665, 0.6566372513771057, -0.0963345319032669, 0.15951240062713623, 0.0937890037894249, 0.16787368059158325, 0.33419230580329895, 0.6681458950042725, 0.21131323277950287, 0.22112663090229034, 0.08434639871120453, 0.013923346064984798, -0.20146945118904114, 0.33724769949913025, 0.12406785786151886, 0.18332192301750183, 0.2423383742570877, 0.2159472107887268, -0.12066426128149033, -0.2950114607810974, 0.003758680075407028, 0.14975027740001678, -0.3588108420372009, -0.09863549470901489, 0.5908243060112, -0.011960141360759735, -0.03609734773635864, 0.21965260803699493, 0.2423911690711975, -0.17305564880371094, 0.40447115898132324, 0.29517626762390137, 0.879645586013794, -0.04616573452949524, 0.009440269321203232, 0.43351104855537415, 0.1599506139755249, 0.3531619608402252, -0.17535316944122314, 0.32622623443603516, -0.3820408284664154, -0.26373082399368286, -0.03876356780529022, -0.01860162243247032, 0.15368235111236572, 0.022762563079595566, -0.25430941581726074, 0.12471095472574234, -0.019585557281970978, -0.3683655261993408, -0.22894425690174103, 0.11451920866966248, -0.019472254440188408, 0.035342615097761154, -0.17229358851909637, 0.007581185549497604, -0.18028515577316284, 0.476026713848114, -0.035615209490060806, -0.16144829988479614, -0.45011723041534424, -0.2931792140007019, -0.31060105562210083, -0.08498211205005646, -0.37355154752731323, -0.11985549330711365, 0.1624213457107544, -0.5230306386947632, 0.25190797448158264, -0.16151726245880127, 0.02289743721485138, 0.016031654551625252, -0.1495695412158966, 0.16078907251358032, 0.231397807598114, 0.05555533617734909, 0.13466095924377441, -0.07721851021051407, 0.18021038174629211, -0.058325543999671936, -0.19820941984653473, -0.06020084768533707, 0.04861634224653244, -0.05694295093417168, 0.0888441652059555, 0.15555419027805328, -0.19551001489162445, -0.13211798667907715, -0.24973253905773163, -0.20600241422653198, -0.047176871448755264, -0.24534785747528076, 0.0218672938644886, 0.14545485377311707, -0.24201856553554535, -0.10770735889673233, -0.00979933887720108, -0.4818700850009918, -0.19983097910881042, 0.3658028244972229, 0.2643853724002838, -0.1910974383354187, 0.640241265296936, 0.2562059462070465, 0.07158683985471725, -0.14304398000240326, 0.14718344807624817, 0.13490456342697144, -0.24205675721168518, 0.1791730374097824, -0.02542535401880741, -0.13340063393115997, 0.10118943452835083, 0.42826536297798157, 0.33563166856765747, 0.21858397126197815, -0.26853978633880615, -0.27250397205352783, -0.578578770160675, 0.2360900193452835, 0.10950914025306702, 0.06202268227934837, -0.37572377920150757, 0.056789398193359375, 0.10615216195583344, -0.03963097184896469, -0.1985880732536316, -0.05440588295459747, -0.3950386047363281, 0.026988303288817406, 0.3258836567401886, 0.11075140535831451, 0.06279990077018738, 0.12088964879512787, -0.08703511953353882, 0.056588731706142426, -0.11201252788305283, -0.07871746271848679, -0.21296650171279907, 0.13784444332122803, -0.0055414605885744095, -0.1764863282442093, -0.11345719546079636, -0.3165765404701233, -0.12579652667045593, -0.14431849122047424, 0.30782583355903625, 0.19438976049423218, 0.13862046599388123, 0.1208232045173645, -0.03988044336438179, -0.00962868332862854, -0.1688242405653, 0.048609163612127304, 0.004769712686538696, 0.16238579154014587, 0.295712947845459, 0.3576594293117523, 0.21657396852970123, 0.15108300745487213, -0.10666383802890778, 0.017444364726543427, -0.5637590885162354, -0.05236522853374481, -0.018324747681617737, -0.3271968364715576, 0.0014045089483261108, 0.18482056260108948, 0.05994077026844025, 0.20589816570281982, -0.10478018969297409, 0.04448273777961731, 0.35792022943496704, 0.0646284744143486, -0.2867365777492523, -0.04780622199177742, 0.1118093729019165, -0.04507158324122429, -0.05985021963715553, 0.46616899967193604, 0.2438097596168518, 0.06150670349597931, -0.48179829120635986, 0.17367300391197205, -0.1417907178401947, 0.2920726537704468, 0.1866726279258728, 0.7362819910049438, 0.204279825091362, -0.04473352059721947, 0.4228043258190155, -0.23770743608474731, 0.13684631884098053, 0.33697980642318726, -0.2562151849269867, 0.04650476202368736, -0.049918629229068756, 0.4144738018512726, -0.11542408913373947, -0.7970684766769409, -0.16873325407505035, -0.10235077142715454, 0.0402507483959198, 0.07851334661245346, -0.04267078638076782, 0.21609893441200256, 0.021924789994955063, -0.24736236035823822, -0.14671464264392853, 0.15153957903385162, -0.5240290760993958, 0.007526783272624016, -0.34082889556884766, -0.24079707264900208, 0.12191559374332428, 0.024147938936948776, 0.06889420747756958, -0.014475136995315552, 0.007073640823364258, -0.00603494793176651, -0.5795778036117554, 0.3997425436973572, -0.2281774878501892, 0.25714725255966187, 0.13929355144500732, -0.31071916222572327, 0.3764277994632721, 0.22886735200881958, -0.06750403344631195, 0.1630832850933075, 0.09814191609621048, 0.6825338006019592, 0.13905183970928192, -0.22514759004116058, -0.07266655564308167, 0.24637338519096375, -0.053833648562431335, -0.1966206133365631, 0.009411423467099667, 0.3035133481025696, 0.19013194739818573, 0.25079768896102905, -0.0882406085729599, -0.13729025423526764, -0.07537862658500671, 0.030921513214707375, 0.39291253685951233, -0.028225455433130264, 0.18808025121688843, -0.41838446259498596, -0.4121072292327881, -0.16348735988140106, 0.19143177568912506, -0.1863514930009842, 0.3233473598957062, -0.053065430372953415, 0.04527219384908676, 0.1985781490802765, 0.21621102094650269, 0.002692287787795067, -0.2696684002876282, 0.5837225914001465, 0.597804844379425, 0.029399514198303223, -0.5097256898880005, 0.018958404660224915, -0.3499075770378113, 0.30139288306236267, -0.6289397478103638, -0.026429014280438423, 0.1364554613828659, 0.272819846868515, -0.0773167833685875, -0.23894523084163666, 0.3593960404396057, 0.06000642105937004, 0.27789217233657837, 0.6054530143737793, -0.15197932720184326, -0.3027724325656891, -0.411674439907074, -0.023094622418284416, 0.011842440813779831, -0.21493875980377197, 0.0638871043920517, -0.018354376778006554, -0.03228907287120819, 0.08596035838127136, 0.09978550672531128, -0.013660440221428871, 0.05186987668275833, 0.5265001058578491, 0.15931226313114166, 0.3797856569290161, -0.030647315084934235, -0.05605775862932205, -0.43223848938941956, -0.10352734476327896, -0.2636748254299164, 0.11230068653821945, 0.09262104332447052, 0.6569477319717407, -0.03546950966119766, -0.23132078349590302, -0.3874509036540985, 0.1790010780096054, 0.18747971951961517, -0.1808694303035736, 0.050061434507369995, 0.20792743563652039, -0.1919955313205719, -0.21665483713150024, 0.2797966003417969, 0.255062997341156, 0.16007277369499207, -0.2280758023262024, -0.27365291118621826, -0.20869196951389313, 0.5025376677513123, -0.35773271322250366, -0.025009995326399803, 0.06481717526912689, 0.35343971848487854, 0.09435160458087921, -0.14156238734722137, -0.5027105808258057, -0.011304624378681183, 0.12790344655513763, -0.08095425367355347, -0.3460330069065094, -0.18161842226982117, -0.1787724643945694, -0.059059858322143555, 0.028563793748617172, 0.05094413086771965, 0.029052363708615303, -0.3211509585380554, -0.06412285566329956, -0.17744430899620056 ]
https://github.com/huggingface/datasets/issues/6775
IndexError: Invalid key: 0 is out of bounds for size 0
> Hi! You should be able to fix this by passing `remove_unused_columns=False` to the `transformers` `TrainingArguments` as explained in [huggingface/peft#1299](https://github.com/huggingface/peft/issues/1299). > > (I'm not familiar with Vertex AI, but I'd assume `remove_unused_columns` can be passed as a flag to the docker container) @mariosasko Thanks for the response and suggestion. When I set `remove_unused_columns` as `False` , I end up getting different error (will post the error soon). Either the Vertex-AI does not support `remove_unused_columns` or my dataset is completely wrong. Thank you, KK
### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002
83
IndexError: Invalid key: 0 is out of bounds for size 0 ### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002 > Hi! You should be able to fix this by passing `remove_unused_columns=False` to the `transformers` `TrainingArguments` as explained in [huggingface/peft#1299](https://github.com/huggingface/peft/issues/1299). > > (I'm not familiar with Vertex AI, but I'd assume `remove_unused_columns` can be passed as a flag to the docker container) @mariosasko Thanks for the response and suggestion. When I set `remove_unused_columns` as `False` , I end up getting different error (will post the error soon). Either the Vertex-AI does not support `remove_unused_columns` or my dataset is completely wrong. Thank you, KK
[ -0.28066593408584595, -0.47747936844825745, 0.019472308456897736, 0.3315136432647705, 0.0059850625693798065, -0.030505608767271042, 0.08925245702266693, 0.33032339811325073, 0.032530248165130615, 0.1563732624053955, -0.2661375105381012, 0.060142435133457184, -0.09422646462917328, 0.4449833333492279, -0.0871804878115654, -0.3004750907421112, -0.031435735523700714, 0.12220142781734467, 0.3271576762199402, 0.05073251575231552, -0.3249167203903198, 0.21276047825813293, -0.2704356610774994, 0.29350876808166504, -0.16703125834465027, -0.22655364871025085, 0.09205583482980728, 0.23466697335243225, -0.10501457750797272, -0.18814480304718018, 0.18059799075126648, -0.5807288289070129, 0.2683962285518646, 0.5133949518203735, -0.00012073567631887272, 0.004902258515357971, 0.0979359894990921, -0.1210201308131218, -0.1832079291343689, 0.0962597131729126, 0.21084120869636536, -0.11364620923995972, -0.19647645950317383, -0.22097955644130707, -0.2335861623287201, -0.3329051733016968, 0.0682653933763504, 0.31786048412323, 0.36156558990478516, 0.5647464394569397, 0.12545672059059143, 0.17141671478748322, 0.2708599865436554, -0.16307765245437622, -0.043038204312324524, -0.4466325044631958, -0.11719414591789246, 0.3056569993495941, 0.29180920124053955, 0.026461442932486534, -0.07868766039609909, 0.3120504319667816, -0.22922255098819733, -0.11253118515014648, 0.3330805003643036, -0.021563556045293808, 0.19685609638690948, -0.4860195219516754, 0.17954912781715393, 0.13748976588249207, 0.08182170987129211, -0.09747277945280075, -0.3787056803703308, -0.45725247263908386, 0.129802867770195, -0.30639714002609253, 0.24208319187164307, 0.32787415385246277, 0.0300239697098732, 0.4115365147590637, 0.17746680974960327, 0.10756010562181473, -0.11845242232084274, 0.0925878956913948, -0.2437802255153656, 0.4983732998371124, -0.013431391678750515, 0.08449332416057587, 0.16889923810958862, -0.07316071540117264, -0.1354472041130066, 0.2001882791519165, -0.4056951403617859, 0.1535329669713974, -0.3092325031757355, -0.09132257103919983, 0.04516717419028282, 0.10418307036161423, 0.06187272071838379, 0.2962704300880432, 0.36000680923461914, -0.02201930806040764, 0.1653914749622345, -0.09537302702665329, 0.09586495161056519, 0.5454307198524475, -0.06482646614313126, 0.8031893968582153, 0.33362555503845215, 0.22921693325042725, -0.04277840629220009, -0.05746065080165863, 0.11666630953550339, -0.2461397349834442, -0.13336901366710663, 0.061003901064395905, -0.04764530807733536, -0.12765218317508698, -0.45155662298202515, 0.18909399211406708, -0.09879449009895325, 0.09858077019453049, 0.39627981185913086, 0.3320257067680359, 0.036176037043333054, -0.11990361660718918, 0.08823247253894806, 0.3008958697319031, -0.4833337068557739, -0.23635634779930115, -0.1767115741968155, 0.1990157663822174, 0.08893777430057526, 0.13320903480052948, 0.038702305406332016, -0.26292192935943604, 0.48142892122268677, -0.11951233446598053, 0.3989276885986328, -0.21987000107765198, 0.1574854850769043, -0.22252891957759857, -0.05453907698392868, 0.5060524344444275, -0.08921517431735992, -0.004285991191864014, 0.03091699443757534, -0.15439258515834808, -0.1221260204911232, 0.2088840901851654, -0.545764148235321, -0.44295480847358704, -0.05944403260946274, 0.016470035538077354, -0.19153952598571777, 0.2767576277256012, 0.08372681587934494, 0.08578099310398102, 0.27196305990219116, -0.3519435226917267, 0.16237998008728027, -0.16258504986763, -0.18168121576309204, -0.23459838330745697, 0.08878619968891144, 0.12842513620853424, -0.18335705995559692, 0.027195140719413757, -0.11652740836143494, 0.34211766719818115, 0.036156557500362396, 0.36728301644325256, -0.06078202649950981, 0.24964287877082825, -0.3656572699546814, 0.5239205956459045, -0.08464913815259933, -0.33550089597702026, -0.8524019122123718, 0.0686151385307312, -0.15509697794914246, -0.06381906569004059, -0.028848953545093536, 0.09270582348108292, 0.2748269736766815, 0.071144238114357, 0.07311277836561203, -0.03889397904276848, 0.04710490256547928, -0.09041178226470947, -0.31055501103401184, -0.28629541397094727, -0.2353498786687851, -0.15194882452487946, 0.15881682932376862, 0.05869147926568985, -0.01004011183977127, -0.1928732693195343, -0.05043085664510727, -0.23772040009498596, 0.005199656821787357, 0.2760031521320343, 0.3793164789676666, -0.34479743242263794, 0.20647932589054108, 0.2272336781024933, -0.40454989671707153, 0.31023135781288147, -0.3764098882675171, 0.17379815876483917, -0.24195225536823273, -0.019348621368408203, -0.3782620131969452, -0.2080335170030594, -0.16935473680496216, -0.45278140902519226, -0.009203214198350906, -0.13418222963809967, 0.23925024271011353, -0.10856758058071136, -0.03324030339717865, 0.223976269364357, -0.24408960342407227, 0.04936151206493378, -0.19579394161701202, 0.21375685930252075, -0.24124713242053986, -0.31338462233543396, 0.03216592222452164, -0.052086301147937775, 0.3062553107738495, -0.027709566056728363, -0.05644897371530533, 0.22309055924415588, -0.07815989851951599, -0.12424144148826599, -0.17166614532470703, 0.5252529978752136, 0.31850358843803406, -0.18360234797000885, 0.2083074450492859, 0.07452940940856934, -0.06840338557958603, -0.06348464637994766, 0.0538199320435524, 0.8773183226585388, 0.25553926825523376, -0.02124052494764328, -0.2041146159172058, -0.18304607272148132, 0.02073667012155056, -0.14320361614227295, 0.0038152262568473816, -0.038623739033937454, 0.10060635954141617, -0.22176598012447357, 0.16762815415859222, -0.1129351556301117, -0.16648681461811066, -0.052752308547496796, 0.04124479740858078, 0.026985209435224533, 0.2896217405796051, 0.02747708186507225, -0.016055859625339508, 0.0544784739613533, 0.13494864106178284, 0.030925434082746506, 0.1645592451095581, 0.2198905497789383, -0.02361128106713295, 0.20918919146060944, -0.19706040620803833, -0.09640317410230637, 0.02488529682159424, 0.027935415506362915, 0.015085834078490734, 0.3094438910484314, 0.0807783305644989, 0.0004892339929938316, 0.03855877369642258, 0.08032180368900299, 0.22551552951335907, 0.488883376121521, -0.48139241337776184, 0.29390138387680054, -0.02397739700973034, -0.3061606287956238, 0.1430351883172989, 0.1719520539045334, -0.25053098797798157, -0.1809219866991043, -0.012189436703920364, 0.11726965010166168, -0.17054177820682526, -0.04182300716638565, -0.2597266435623169, 0.17993390560150146, 0.20183782279491425, -0.126156747341156, 0.14719435572624207, 0.16245682537555695, -0.27483341097831726, -0.09015688300132751, 0.4931677579879761, -0.2216625064611435, -0.024700572714209557, 0.04622414708137512, -0.3569597005844116, 0.03937750682234764, -0.4266420304775238, 0.08711127936840057, 0.06147453933954239, 0.4652862846851349, 0.03286253660917282, 0.21723495423793793, -0.26856476068496704, -0.0013472884893417358, 0.174966499209404, 0.12309634685516357, -0.2456970512866974, -0.1799515038728714, -0.16903845965862274, 0.2208820879459381, -0.17125579714775085, -0.0950380340218544, 0.14898785948753357, -0.33868736028671265, -0.05251862853765488, 0.04634533450007439, 0.3550451397895813, 0.42318490147590637, 0.3149893581867218, -0.06301224231719971, 0.16544996201992035, -0.06242189556360245, -0.03437432646751404, 0.1367350071668625, 0.37461069226264954, -0.08662916719913483, -0.30055949091911316, 0.028038259595632553, -0.3432195782661438, 0.3580743968486786, -0.2546854019165039, -0.3936575651168823, -0.1287437081336975, -0.09084893763065338, 0.2744081914424896, -0.1958860158920288, 0.07083351165056229, -0.0010954439640045166, -0.28239282965660095, 0.06785985827445984, -0.07146454602479935, -0.1352558434009552, 0.10942864418029785, 0.3965734541416168, 0.265139639377594, 0.02539609558880329, -0.03253632038831711, -0.20083686709403992, 0.5701972842216492, 0.24933597445487976, 0.09069490432739258, 0.016032274812459946, -0.08529335260391235, -0.10104788839817047, -0.3084198832511902, -0.06043248623609543, 0.18689899146556854, 0.12254264950752258, -0.29478830099105835, 0.4365310072898865, 0.10548274219036102, -0.062459997832775116, -0.10379353165626526, -0.3435376286506653, -0.5244941711425781, -0.044173210859298706, 0.16021274030208588, 0.34905263781547546, 0.10051455348730087, -0.017017994076013565, 0.37092503905296326, -0.2442457526922226, -0.1090889498591423, 0.10710835456848145, -0.06617340445518494, 0.02916301041841507, 0.016995292156934738, 0.36932069063186646, -0.26602602005004883, -0.4287901520729065, 0.46212464570999146, -0.10837151855230331, 0.13294446468353271, 0.0247194804251194, -0.18114140629768372, 0.15507088601589203, -0.16541866958141327, 0.5125327706336975, -0.06589925289154053, -0.20467348396778107, 0.07841065526008606, 0.23770108819007874, 0.07066604495048523, -0.2215423434972763, -0.02359228953719139, 0.13445156812667847, 0.46653005480766296, 0.5863974690437317, -0.24097099900245667, 0.09039219468832016, -0.0371595174074173, 0.08331643790006638, -0.18027383089065552, 0.2525636851787567, -0.3108900487422943, -0.3436911106109619, -0.05395032465457916, 0.26381227374076843, 0.08971504867076874, 0.3723680377006531, -0.10901013761758804, 0.3731098771095276, 0.14735549688339233, -0.14593887329101562, -0.0013938769698143005, 0.32933929562568665, 0.6566372513771057, -0.0963345319032669, 0.15951240062713623, 0.0937890037894249, 0.16787368059158325, 0.33419230580329895, 0.6681458950042725, 0.21131323277950287, 0.22112663090229034, 0.08434639871120453, 0.013923346064984798, -0.20146945118904114, 0.33724769949913025, 0.12406785786151886, 0.18332192301750183, 0.2423383742570877, 0.2159472107887268, -0.12066426128149033, -0.2950114607810974, 0.003758680075407028, 0.14975027740001678, -0.3588108420372009, -0.09863549470901489, 0.5908243060112, -0.011960141360759735, -0.03609734773635864, 0.21965260803699493, 0.2423911690711975, -0.17305564880371094, 0.40447115898132324, 0.29517626762390137, 0.879645586013794, -0.04616573452949524, 0.009440269321203232, 0.43351104855537415, 0.1599506139755249, 0.3531619608402252, -0.17535316944122314, 0.32622623443603516, -0.3820408284664154, -0.26373082399368286, -0.03876356780529022, -0.01860162243247032, 0.15368235111236572, 0.022762563079595566, -0.25430941581726074, 0.12471095472574234, -0.019585557281970978, -0.3683655261993408, -0.22894425690174103, 0.11451920866966248, -0.019472254440188408, 0.035342615097761154, -0.17229358851909637, 0.007581185549497604, -0.18028515577316284, 0.476026713848114, -0.035615209490060806, -0.16144829988479614, -0.45011723041534424, -0.2931792140007019, -0.31060105562210083, -0.08498211205005646, -0.37355154752731323, -0.11985549330711365, 0.1624213457107544, -0.5230306386947632, 0.25190797448158264, -0.16151726245880127, 0.02289743721485138, 0.016031654551625252, -0.1495695412158966, 0.16078907251358032, 0.231397807598114, 0.05555533617734909, 0.13466095924377441, -0.07721851021051407, 0.18021038174629211, -0.058325543999671936, -0.19820941984653473, -0.06020084768533707, 0.04861634224653244, -0.05694295093417168, 0.0888441652059555, 0.15555419027805328, -0.19551001489162445, -0.13211798667907715, -0.24973253905773163, -0.20600241422653198, -0.047176871448755264, -0.24534785747528076, 0.0218672938644886, 0.14545485377311707, -0.24201856553554535, -0.10770735889673233, -0.00979933887720108, -0.4818700850009918, -0.19983097910881042, 0.3658028244972229, 0.2643853724002838, -0.1910974383354187, 0.640241265296936, 0.2562059462070465, 0.07158683985471725, -0.14304398000240326, 0.14718344807624817, 0.13490456342697144, -0.24205675721168518, 0.1791730374097824, -0.02542535401880741, -0.13340063393115997, 0.10118943452835083, 0.42826536297798157, 0.33563166856765747, 0.21858397126197815, -0.26853978633880615, -0.27250397205352783, -0.578578770160675, 0.2360900193452835, 0.10950914025306702, 0.06202268227934837, -0.37572377920150757, 0.056789398193359375, 0.10615216195583344, -0.03963097184896469, -0.1985880732536316, -0.05440588295459747, -0.3950386047363281, 0.026988303288817406, 0.3258836567401886, 0.11075140535831451, 0.06279990077018738, 0.12088964879512787, -0.08703511953353882, 0.056588731706142426, -0.11201252788305283, -0.07871746271848679, -0.21296650171279907, 0.13784444332122803, -0.0055414605885744095, -0.1764863282442093, -0.11345719546079636, -0.3165765404701233, -0.12579652667045593, -0.14431849122047424, 0.30782583355903625, 0.19438976049423218, 0.13862046599388123, 0.1208232045173645, -0.03988044336438179, -0.00962868332862854, -0.1688242405653, 0.048609163612127304, 0.004769712686538696, 0.16238579154014587, 0.295712947845459, 0.3576594293117523, 0.21657396852970123, 0.15108300745487213, -0.10666383802890778, 0.017444364726543427, -0.5637590885162354, -0.05236522853374481, -0.018324747681617737, -0.3271968364715576, 0.0014045089483261108, 0.18482056260108948, 0.05994077026844025, 0.20589816570281982, -0.10478018969297409, 0.04448273777961731, 0.35792022943496704, 0.0646284744143486, -0.2867365777492523, -0.04780622199177742, 0.1118093729019165, -0.04507158324122429, -0.05985021963715553, 0.46616899967193604, 0.2438097596168518, 0.06150670349597931, -0.48179829120635986, 0.17367300391197205, -0.1417907178401947, 0.2920726537704468, 0.1866726279258728, 0.7362819910049438, 0.204279825091362, -0.04473352059721947, 0.4228043258190155, -0.23770743608474731, 0.13684631884098053, 0.33697980642318726, -0.2562151849269867, 0.04650476202368736, -0.049918629229068756, 0.4144738018512726, -0.11542408913373947, -0.7970684766769409, -0.16873325407505035, -0.10235077142715454, 0.0402507483959198, 0.07851334661245346, -0.04267078638076782, 0.21609893441200256, 0.021924789994955063, -0.24736236035823822, -0.14671464264392853, 0.15153957903385162, -0.5240290760993958, 0.007526783272624016, -0.34082889556884766, -0.24079707264900208, 0.12191559374332428, 0.024147938936948776, 0.06889420747756958, -0.014475136995315552, 0.007073640823364258, -0.00603494793176651, -0.5795778036117554, 0.3997425436973572, -0.2281774878501892, 0.25714725255966187, 0.13929355144500732, -0.31071916222572327, 0.3764277994632721, 0.22886735200881958, -0.06750403344631195, 0.1630832850933075, 0.09814191609621048, 0.6825338006019592, 0.13905183970928192, -0.22514759004116058, -0.07266655564308167, 0.24637338519096375, -0.053833648562431335, -0.1966206133365631, 0.009411423467099667, 0.3035133481025696, 0.19013194739818573, 0.25079768896102905, -0.0882406085729599, -0.13729025423526764, -0.07537862658500671, 0.030921513214707375, 0.39291253685951233, -0.028225455433130264, 0.18808025121688843, -0.41838446259498596, -0.4121072292327881, -0.16348735988140106, 0.19143177568912506, -0.1863514930009842, 0.3233473598957062, -0.053065430372953415, 0.04527219384908676, 0.1985781490802765, 0.21621102094650269, 0.002692287787795067, -0.2696684002876282, 0.5837225914001465, 0.597804844379425, 0.029399514198303223, -0.5097256898880005, 0.018958404660224915, -0.3499075770378113, 0.30139288306236267, -0.6289397478103638, -0.026429014280438423, 0.1364554613828659, 0.272819846868515, -0.0773167833685875, -0.23894523084163666, 0.3593960404396057, 0.06000642105937004, 0.27789217233657837, 0.6054530143737793, -0.15197932720184326, -0.3027724325656891, -0.411674439907074, -0.023094622418284416, 0.011842440813779831, -0.21493875980377197, 0.0638871043920517, -0.018354376778006554, -0.03228907287120819, 0.08596035838127136, 0.09978550672531128, -0.013660440221428871, 0.05186987668275833, 0.5265001058578491, 0.15931226313114166, 0.3797856569290161, -0.030647315084934235, -0.05605775862932205, -0.43223848938941956, -0.10352734476327896, -0.2636748254299164, 0.11230068653821945, 0.09262104332447052, 0.6569477319717407, -0.03546950966119766, -0.23132078349590302, -0.3874509036540985, 0.1790010780096054, 0.18747971951961517, -0.1808694303035736, 0.050061434507369995, 0.20792743563652039, -0.1919955313205719, -0.21665483713150024, 0.2797966003417969, 0.255062997341156, 0.16007277369499207, -0.2280758023262024, -0.27365291118621826, -0.20869196951389313, 0.5025376677513123, -0.35773271322250366, -0.025009995326399803, 0.06481717526912689, 0.35343971848487854, 0.09435160458087921, -0.14156238734722137, -0.5027105808258057, -0.011304624378681183, 0.12790344655513763, -0.08095425367355347, -0.3460330069065094, -0.18161842226982117, -0.1787724643945694, -0.059059858322143555, 0.028563793748617172, 0.05094413086771965, 0.029052363708615303, -0.3211509585380554, -0.06412285566329956, -0.17744430899620056 ]
https://github.com/huggingface/datasets/issues/6775
IndexError: Invalid key: 0 is out of bounds for size 0
> I had the same problem, but I spent a whole day trying different combination with my own dataset with the example data set and found the reason: the example data is multi-turn conversation between human and assistant, so # Humman or # Assistant appear at least twice. If your own custom data only has single turn conversation, it might end up with the same error. What you can do is repeat your single turn conversation twice in your training data (keep the key 'text' the same) and maybe it works. I guess the reason is the specific way processing the data requires and counts multi-turn only (single turn will be discarded so it ends up with no training data), but since I am using Google Vertex AI, I don't have direct access to the underlying code so that was just my guess. @cyberyu Thanks for your suggestions. I have tried the approach you suggested, copied the same conversation in each jsonl element so every jsonl item has 2 `HUMAN` and `ASSISTANT`. However in my case, the issue persists. I am gonna give few more tries, and post the results here. You can find my dataset [here](https://huggingface.co/datasets/kk2491/test/tree/main) Thank you, KK
### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002
200
IndexError: Invalid key: 0 is out of bounds for size 0 ### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002 > I had the same problem, but I spent a whole day trying different combination with my own dataset with the example data set and found the reason: the example data is multi-turn conversation between human and assistant, so # Humman or # Assistant appear at least twice. If your own custom data only has single turn conversation, it might end up with the same error. What you can do is repeat your single turn conversation twice in your training data (keep the key 'text' the same) and maybe it works. I guess the reason is the specific way processing the data requires and counts multi-turn only (single turn will be discarded so it ends up with no training data), but since I am using Google Vertex AI, I don't have direct access to the underlying code so that was just my guess. @cyberyu Thanks for your suggestions. I have tried the approach you suggested, copied the same conversation in each jsonl element so every jsonl item has 2 `HUMAN` and `ASSISTANT`. However in my case, the issue persists. I am gonna give few more tries, and post the results here. You can find my dataset [here](https://huggingface.co/datasets/kk2491/test/tree/main) Thank you, KK
[ -0.28066593408584595, -0.47747936844825745, 0.019472308456897736, 0.3315136432647705, 0.0059850625693798065, -0.030505608767271042, 0.08925245702266693, 0.33032339811325073, 0.032530248165130615, 0.1563732624053955, -0.2661375105381012, 0.060142435133457184, -0.09422646462917328, 0.4449833333492279, -0.0871804878115654, -0.3004750907421112, -0.031435735523700714, 0.12220142781734467, 0.3271576762199402, 0.05073251575231552, -0.3249167203903198, 0.21276047825813293, -0.2704356610774994, 0.29350876808166504, -0.16703125834465027, -0.22655364871025085, 0.09205583482980728, 0.23466697335243225, -0.10501457750797272, -0.18814480304718018, 0.18059799075126648, -0.5807288289070129, 0.2683962285518646, 0.5133949518203735, -0.00012073567631887272, 0.004902258515357971, 0.0979359894990921, -0.1210201308131218, -0.1832079291343689, 0.0962597131729126, 0.21084120869636536, -0.11364620923995972, -0.19647645950317383, -0.22097955644130707, -0.2335861623287201, -0.3329051733016968, 0.0682653933763504, 0.31786048412323, 0.36156558990478516, 0.5647464394569397, 0.12545672059059143, 0.17141671478748322, 0.2708599865436554, -0.16307765245437622, -0.043038204312324524, -0.4466325044631958, -0.11719414591789246, 0.3056569993495941, 0.29180920124053955, 0.026461442932486534, -0.07868766039609909, 0.3120504319667816, -0.22922255098819733, -0.11253118515014648, 0.3330805003643036, -0.021563556045293808, 0.19685609638690948, -0.4860195219516754, 0.17954912781715393, 0.13748976588249207, 0.08182170987129211, -0.09747277945280075, -0.3787056803703308, -0.45725247263908386, 0.129802867770195, -0.30639714002609253, 0.24208319187164307, 0.32787415385246277, 0.0300239697098732, 0.4115365147590637, 0.17746680974960327, 0.10756010562181473, -0.11845242232084274, 0.0925878956913948, -0.2437802255153656, 0.4983732998371124, -0.013431391678750515, 0.08449332416057587, 0.16889923810958862, -0.07316071540117264, -0.1354472041130066, 0.2001882791519165, -0.4056951403617859, 0.1535329669713974, -0.3092325031757355, -0.09132257103919983, 0.04516717419028282, 0.10418307036161423, 0.06187272071838379, 0.2962704300880432, 0.36000680923461914, -0.02201930806040764, 0.1653914749622345, -0.09537302702665329, 0.09586495161056519, 0.5454307198524475, -0.06482646614313126, 0.8031893968582153, 0.33362555503845215, 0.22921693325042725, -0.04277840629220009, -0.05746065080165863, 0.11666630953550339, -0.2461397349834442, -0.13336901366710663, 0.061003901064395905, -0.04764530807733536, -0.12765218317508698, -0.45155662298202515, 0.18909399211406708, -0.09879449009895325, 0.09858077019453049, 0.39627981185913086, 0.3320257067680359, 0.036176037043333054, -0.11990361660718918, 0.08823247253894806, 0.3008958697319031, -0.4833337068557739, -0.23635634779930115, -0.1767115741968155, 0.1990157663822174, 0.08893777430057526, 0.13320903480052948, 0.038702305406332016, -0.26292192935943604, 0.48142892122268677, -0.11951233446598053, 0.3989276885986328, -0.21987000107765198, 0.1574854850769043, -0.22252891957759857, -0.05453907698392868, 0.5060524344444275, -0.08921517431735992, -0.004285991191864014, 0.03091699443757534, -0.15439258515834808, -0.1221260204911232, 0.2088840901851654, -0.545764148235321, -0.44295480847358704, -0.05944403260946274, 0.016470035538077354, -0.19153952598571777, 0.2767576277256012, 0.08372681587934494, 0.08578099310398102, 0.27196305990219116, -0.3519435226917267, 0.16237998008728027, -0.16258504986763, -0.18168121576309204, -0.23459838330745697, 0.08878619968891144, 0.12842513620853424, -0.18335705995559692, 0.027195140719413757, -0.11652740836143494, 0.34211766719818115, 0.036156557500362396, 0.36728301644325256, -0.06078202649950981, 0.24964287877082825, -0.3656572699546814, 0.5239205956459045, -0.08464913815259933, -0.33550089597702026, -0.8524019122123718, 0.0686151385307312, -0.15509697794914246, -0.06381906569004059, -0.028848953545093536, 0.09270582348108292, 0.2748269736766815, 0.071144238114357, 0.07311277836561203, -0.03889397904276848, 0.04710490256547928, -0.09041178226470947, -0.31055501103401184, -0.28629541397094727, -0.2353498786687851, -0.15194882452487946, 0.15881682932376862, 0.05869147926568985, -0.01004011183977127, -0.1928732693195343, -0.05043085664510727, -0.23772040009498596, 0.005199656821787357, 0.2760031521320343, 0.3793164789676666, -0.34479743242263794, 0.20647932589054108, 0.2272336781024933, -0.40454989671707153, 0.31023135781288147, -0.3764098882675171, 0.17379815876483917, -0.24195225536823273, -0.019348621368408203, -0.3782620131969452, -0.2080335170030594, -0.16935473680496216, -0.45278140902519226, -0.009203214198350906, -0.13418222963809967, 0.23925024271011353, -0.10856758058071136, -0.03324030339717865, 0.223976269364357, -0.24408960342407227, 0.04936151206493378, -0.19579394161701202, 0.21375685930252075, -0.24124713242053986, -0.31338462233543396, 0.03216592222452164, -0.052086301147937775, 0.3062553107738495, -0.027709566056728363, -0.05644897371530533, 0.22309055924415588, -0.07815989851951599, -0.12424144148826599, -0.17166614532470703, 0.5252529978752136, 0.31850358843803406, -0.18360234797000885, 0.2083074450492859, 0.07452940940856934, -0.06840338557958603, -0.06348464637994766, 0.0538199320435524, 0.8773183226585388, 0.25553926825523376, -0.02124052494764328, -0.2041146159172058, -0.18304607272148132, 0.02073667012155056, -0.14320361614227295, 0.0038152262568473816, -0.038623739033937454, 0.10060635954141617, -0.22176598012447357, 0.16762815415859222, -0.1129351556301117, -0.16648681461811066, -0.052752308547496796, 0.04124479740858078, 0.026985209435224533, 0.2896217405796051, 0.02747708186507225, -0.016055859625339508, 0.0544784739613533, 0.13494864106178284, 0.030925434082746506, 0.1645592451095581, 0.2198905497789383, -0.02361128106713295, 0.20918919146060944, -0.19706040620803833, -0.09640317410230637, 0.02488529682159424, 0.027935415506362915, 0.015085834078490734, 0.3094438910484314, 0.0807783305644989, 0.0004892339929938316, 0.03855877369642258, 0.08032180368900299, 0.22551552951335907, 0.488883376121521, -0.48139241337776184, 0.29390138387680054, -0.02397739700973034, -0.3061606287956238, 0.1430351883172989, 0.1719520539045334, -0.25053098797798157, -0.1809219866991043, -0.012189436703920364, 0.11726965010166168, -0.17054177820682526, -0.04182300716638565, -0.2597266435623169, 0.17993390560150146, 0.20183782279491425, -0.126156747341156, 0.14719435572624207, 0.16245682537555695, -0.27483341097831726, -0.09015688300132751, 0.4931677579879761, -0.2216625064611435, -0.024700572714209557, 0.04622414708137512, -0.3569597005844116, 0.03937750682234764, -0.4266420304775238, 0.08711127936840057, 0.06147453933954239, 0.4652862846851349, 0.03286253660917282, 0.21723495423793793, -0.26856476068496704, -0.0013472884893417358, 0.174966499209404, 0.12309634685516357, -0.2456970512866974, -0.1799515038728714, -0.16903845965862274, 0.2208820879459381, -0.17125579714775085, -0.0950380340218544, 0.14898785948753357, -0.33868736028671265, -0.05251862853765488, 0.04634533450007439, 0.3550451397895813, 0.42318490147590637, 0.3149893581867218, -0.06301224231719971, 0.16544996201992035, -0.06242189556360245, -0.03437432646751404, 0.1367350071668625, 0.37461069226264954, -0.08662916719913483, -0.30055949091911316, 0.028038259595632553, -0.3432195782661438, 0.3580743968486786, -0.2546854019165039, -0.3936575651168823, -0.1287437081336975, -0.09084893763065338, 0.2744081914424896, -0.1958860158920288, 0.07083351165056229, -0.0010954439640045166, -0.28239282965660095, 0.06785985827445984, -0.07146454602479935, -0.1352558434009552, 0.10942864418029785, 0.3965734541416168, 0.265139639377594, 0.02539609558880329, -0.03253632038831711, -0.20083686709403992, 0.5701972842216492, 0.24933597445487976, 0.09069490432739258, 0.016032274812459946, -0.08529335260391235, -0.10104788839817047, -0.3084198832511902, -0.06043248623609543, 0.18689899146556854, 0.12254264950752258, -0.29478830099105835, 0.4365310072898865, 0.10548274219036102, -0.062459997832775116, -0.10379353165626526, -0.3435376286506653, -0.5244941711425781, -0.044173210859298706, 0.16021274030208588, 0.34905263781547546, 0.10051455348730087, -0.017017994076013565, 0.37092503905296326, -0.2442457526922226, -0.1090889498591423, 0.10710835456848145, -0.06617340445518494, 0.02916301041841507, 0.016995292156934738, 0.36932069063186646, -0.26602602005004883, -0.4287901520729065, 0.46212464570999146, -0.10837151855230331, 0.13294446468353271, 0.0247194804251194, -0.18114140629768372, 0.15507088601589203, -0.16541866958141327, 0.5125327706336975, -0.06589925289154053, -0.20467348396778107, 0.07841065526008606, 0.23770108819007874, 0.07066604495048523, -0.2215423434972763, -0.02359228953719139, 0.13445156812667847, 0.46653005480766296, 0.5863974690437317, -0.24097099900245667, 0.09039219468832016, -0.0371595174074173, 0.08331643790006638, -0.18027383089065552, 0.2525636851787567, -0.3108900487422943, -0.3436911106109619, -0.05395032465457916, 0.26381227374076843, 0.08971504867076874, 0.3723680377006531, -0.10901013761758804, 0.3731098771095276, 0.14735549688339233, -0.14593887329101562, -0.0013938769698143005, 0.32933929562568665, 0.6566372513771057, -0.0963345319032669, 0.15951240062713623, 0.0937890037894249, 0.16787368059158325, 0.33419230580329895, 0.6681458950042725, 0.21131323277950287, 0.22112663090229034, 0.08434639871120453, 0.013923346064984798, -0.20146945118904114, 0.33724769949913025, 0.12406785786151886, 0.18332192301750183, 0.2423383742570877, 0.2159472107887268, -0.12066426128149033, -0.2950114607810974, 0.003758680075407028, 0.14975027740001678, -0.3588108420372009, -0.09863549470901489, 0.5908243060112, -0.011960141360759735, -0.03609734773635864, 0.21965260803699493, 0.2423911690711975, -0.17305564880371094, 0.40447115898132324, 0.29517626762390137, 0.879645586013794, -0.04616573452949524, 0.009440269321203232, 0.43351104855537415, 0.1599506139755249, 0.3531619608402252, -0.17535316944122314, 0.32622623443603516, -0.3820408284664154, -0.26373082399368286, -0.03876356780529022, -0.01860162243247032, 0.15368235111236572, 0.022762563079595566, -0.25430941581726074, 0.12471095472574234, -0.019585557281970978, -0.3683655261993408, -0.22894425690174103, 0.11451920866966248, -0.019472254440188408, 0.035342615097761154, -0.17229358851909637, 0.007581185549497604, -0.18028515577316284, 0.476026713848114, -0.035615209490060806, -0.16144829988479614, -0.45011723041534424, -0.2931792140007019, -0.31060105562210083, -0.08498211205005646, -0.37355154752731323, -0.11985549330711365, 0.1624213457107544, -0.5230306386947632, 0.25190797448158264, -0.16151726245880127, 0.02289743721485138, 0.016031654551625252, -0.1495695412158966, 0.16078907251358032, 0.231397807598114, 0.05555533617734909, 0.13466095924377441, -0.07721851021051407, 0.18021038174629211, -0.058325543999671936, -0.19820941984653473, -0.06020084768533707, 0.04861634224653244, -0.05694295093417168, 0.0888441652059555, 0.15555419027805328, -0.19551001489162445, -0.13211798667907715, -0.24973253905773163, -0.20600241422653198, -0.047176871448755264, -0.24534785747528076, 0.0218672938644886, 0.14545485377311707, -0.24201856553554535, -0.10770735889673233, -0.00979933887720108, -0.4818700850009918, -0.19983097910881042, 0.3658028244972229, 0.2643853724002838, -0.1910974383354187, 0.640241265296936, 0.2562059462070465, 0.07158683985471725, -0.14304398000240326, 0.14718344807624817, 0.13490456342697144, -0.24205675721168518, 0.1791730374097824, -0.02542535401880741, -0.13340063393115997, 0.10118943452835083, 0.42826536297798157, 0.33563166856765747, 0.21858397126197815, -0.26853978633880615, -0.27250397205352783, -0.578578770160675, 0.2360900193452835, 0.10950914025306702, 0.06202268227934837, -0.37572377920150757, 0.056789398193359375, 0.10615216195583344, -0.03963097184896469, -0.1985880732536316, -0.05440588295459747, -0.3950386047363281, 0.026988303288817406, 0.3258836567401886, 0.11075140535831451, 0.06279990077018738, 0.12088964879512787, -0.08703511953353882, 0.056588731706142426, -0.11201252788305283, -0.07871746271848679, -0.21296650171279907, 0.13784444332122803, -0.0055414605885744095, -0.1764863282442093, -0.11345719546079636, -0.3165765404701233, -0.12579652667045593, -0.14431849122047424, 0.30782583355903625, 0.19438976049423218, 0.13862046599388123, 0.1208232045173645, -0.03988044336438179, -0.00962868332862854, -0.1688242405653, 0.048609163612127304, 0.004769712686538696, 0.16238579154014587, 0.295712947845459, 0.3576594293117523, 0.21657396852970123, 0.15108300745487213, -0.10666383802890778, 0.017444364726543427, -0.5637590885162354, -0.05236522853374481, -0.018324747681617737, -0.3271968364715576, 0.0014045089483261108, 0.18482056260108948, 0.05994077026844025, 0.20589816570281982, -0.10478018969297409, 0.04448273777961731, 0.35792022943496704, 0.0646284744143486, -0.2867365777492523, -0.04780622199177742, 0.1118093729019165, -0.04507158324122429, -0.05985021963715553, 0.46616899967193604, 0.2438097596168518, 0.06150670349597931, -0.48179829120635986, 0.17367300391197205, -0.1417907178401947, 0.2920726537704468, 0.1866726279258728, 0.7362819910049438, 0.204279825091362, -0.04473352059721947, 0.4228043258190155, -0.23770743608474731, 0.13684631884098053, 0.33697980642318726, -0.2562151849269867, 0.04650476202368736, -0.049918629229068756, 0.4144738018512726, -0.11542408913373947, -0.7970684766769409, -0.16873325407505035, -0.10235077142715454, 0.0402507483959198, 0.07851334661245346, -0.04267078638076782, 0.21609893441200256, 0.021924789994955063, -0.24736236035823822, -0.14671464264392853, 0.15153957903385162, -0.5240290760993958, 0.007526783272624016, -0.34082889556884766, -0.24079707264900208, 0.12191559374332428, 0.024147938936948776, 0.06889420747756958, -0.014475136995315552, 0.007073640823364258, -0.00603494793176651, -0.5795778036117554, 0.3997425436973572, -0.2281774878501892, 0.25714725255966187, 0.13929355144500732, -0.31071916222572327, 0.3764277994632721, 0.22886735200881958, -0.06750403344631195, 0.1630832850933075, 0.09814191609621048, 0.6825338006019592, 0.13905183970928192, -0.22514759004116058, -0.07266655564308167, 0.24637338519096375, -0.053833648562431335, -0.1966206133365631, 0.009411423467099667, 0.3035133481025696, 0.19013194739818573, 0.25079768896102905, -0.0882406085729599, -0.13729025423526764, -0.07537862658500671, 0.030921513214707375, 0.39291253685951233, -0.028225455433130264, 0.18808025121688843, -0.41838446259498596, -0.4121072292327881, -0.16348735988140106, 0.19143177568912506, -0.1863514930009842, 0.3233473598957062, -0.053065430372953415, 0.04527219384908676, 0.1985781490802765, 0.21621102094650269, 0.002692287787795067, -0.2696684002876282, 0.5837225914001465, 0.597804844379425, 0.029399514198303223, -0.5097256898880005, 0.018958404660224915, -0.3499075770378113, 0.30139288306236267, -0.6289397478103638, -0.026429014280438423, 0.1364554613828659, 0.272819846868515, -0.0773167833685875, -0.23894523084163666, 0.3593960404396057, 0.06000642105937004, 0.27789217233657837, 0.6054530143737793, -0.15197932720184326, -0.3027724325656891, -0.411674439907074, -0.023094622418284416, 0.011842440813779831, -0.21493875980377197, 0.0638871043920517, -0.018354376778006554, -0.03228907287120819, 0.08596035838127136, 0.09978550672531128, -0.013660440221428871, 0.05186987668275833, 0.5265001058578491, 0.15931226313114166, 0.3797856569290161, -0.030647315084934235, -0.05605775862932205, -0.43223848938941956, -0.10352734476327896, -0.2636748254299164, 0.11230068653821945, 0.09262104332447052, 0.6569477319717407, -0.03546950966119766, -0.23132078349590302, -0.3874509036540985, 0.1790010780096054, 0.18747971951961517, -0.1808694303035736, 0.050061434507369995, 0.20792743563652039, -0.1919955313205719, -0.21665483713150024, 0.2797966003417969, 0.255062997341156, 0.16007277369499207, -0.2280758023262024, -0.27365291118621826, -0.20869196951389313, 0.5025376677513123, -0.35773271322250366, -0.025009995326399803, 0.06481717526912689, 0.35343971848487854, 0.09435160458087921, -0.14156238734722137, -0.5027105808258057, -0.011304624378681183, 0.12790344655513763, -0.08095425367355347, -0.3460330069065094, -0.18161842226982117, -0.1787724643945694, -0.059059858322143555, 0.028563793748617172, 0.05094413086771965, 0.029052363708615303, -0.3211509585380554, -0.06412285566329956, -0.17744430899620056 ]
https://github.com/huggingface/datasets/issues/6775
IndexError: Invalid key: 0 is out of bounds for size 0
> > I had the same problem, but I spent a whole day trying different combination with my own dataset with the example data set and found the reason: the example data is multi-turn conversation between human and assistant, so # Humman or # Assistant appear at least twice. If your own custom data only has single turn conversation, it might end up with the same error. What you can do is repeat your single turn conversation twice in your training data (keep the key 'text' the same) and maybe it works. I guess the reason is the specific way processing the data requires and counts multi-turn only (single turn will be discarded so it ends up with no training data), but since I am using Google Vertex AI, I don't have direct access to the underlying code so that was just my guess. > > @cyberyu Thanks for your suggestions. I have tried the approach you suggested, copied the same conversation in each jsonl element so every jsonl item has 2 `HUMAN` and `ASSISTANT`. However in my case, the issue persists. I am gonna give few more tries, and post the results here. You can find my dataset [here](https://huggingface.co/datasets/kk2491/test/tree/main) > > Thank you, KK I think another reason is your training sample length is too short. I saw a relevant report (https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0/14298/16) stating that the processing code might have a bug discarding sequence length short than max_seq_length, which is 512. Not sure the Vertex AI backend code has fixed that bug or not. So I tried to add some garbage content in your data, and extended the length longer than 512 for a single turn, and repeated twice. You can copy the following line as 5 repeated lines as your training data jsonl file of five samples (no eval or test needed, for speed up, set evaluation step to 5 and training step to 10,), and it will pass. {"text":"### Human: You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You will handle customers queries and provide effective help message. Please provide response to 'Can Interplai software optimize routes for minimizing package handling and transfer times in distribution centers'? ### Assistant: Yes, Interplai software can optimize routes for distribution centers by streamlining package handling processes, minimizing transfer times between loading docks and storage areas, and optimizing warehouse layouts for efficient order fulfillment. ### Human: You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You will handle customers queries and provide effective help message. Please provide response to 'Can Interplai software optimize routes for minimizing package handling and transfer times in distribution centers'? ### Assistant: Yes, Interplai software can optimize routes for distribution centers by streamlining package handling processes, minimizing transfer times between loading docks and storage areas, and optimizing warehouse layouts for efficient order fulfillment."}
### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002
708
IndexError: Invalid key: 0 is out of bounds for size 0 ### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002 > > I had the same problem, but I spent a whole day trying different combination with my own dataset with the example data set and found the reason: the example data is multi-turn conversation between human and assistant, so # Humman or # Assistant appear at least twice. If your own custom data only has single turn conversation, it might end up with the same error. What you can do is repeat your single turn conversation twice in your training data (keep the key 'text' the same) and maybe it works. I guess the reason is the specific way processing the data requires and counts multi-turn only (single turn will be discarded so it ends up with no training data), but since I am using Google Vertex AI, I don't have direct access to the underlying code so that was just my guess. > > @cyberyu Thanks for your suggestions. I have tried the approach you suggested, copied the same conversation in each jsonl element so every jsonl item has 2 `HUMAN` and `ASSISTANT`. However in my case, the issue persists. I am gonna give few more tries, and post the results here. You can find my dataset [here](https://huggingface.co/datasets/kk2491/test/tree/main) > > Thank you, KK I think another reason is your training sample length is too short. I saw a relevant report (https://discuss.huggingface.co/t/indexerror-invalid-key-16-is-out-of-bounds-for-size-0/14298/16) stating that the processing code might have a bug discarding sequence length short than max_seq_length, which is 512. Not sure the Vertex AI backend code has fixed that bug or not. So I tried to add some garbage content in your data, and extended the length longer than 512 for a single turn, and repeated twice. You can copy the following line as 5 repeated lines as your training data jsonl file of five samples (no eval or test needed, for speed up, set evaluation step to 5 and training step to 10,), and it will pass. {"text":"### Human: You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You will handle customers queries and provide effective help message. Please provide response to 'Can Interplai software optimize routes for minimizing package handling and transfer times in distribution centers'? ### Assistant: Yes, Interplai software can optimize routes for distribution centers by streamlining package handling processes, minimizing transfer times between loading docks and storage areas, and optimizing warehouse layouts for efficient order fulfillment. ### Human: You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You are a helpful AI Assistant familiar with customer service. You will handle customers queries and provide effective help message. Please provide response to 'Can Interplai software optimize routes for minimizing package handling and transfer times in distribution centers'? ### Assistant: Yes, Interplai software can optimize routes for distribution centers by streamlining package handling processes, minimizing transfer times between loading docks and storage areas, and optimizing warehouse layouts for efficient order fulfillment."}
[ -0.28066593408584595, -0.47747936844825745, 0.019472308456897736, 0.3315136432647705, 0.0059850625693798065, -0.030505608767271042, 0.08925245702266693, 0.33032339811325073, 0.032530248165130615, 0.1563732624053955, -0.2661375105381012, 0.060142435133457184, -0.09422646462917328, 0.4449833333492279, -0.0871804878115654, -0.3004750907421112, -0.031435735523700714, 0.12220142781734467, 0.3271576762199402, 0.05073251575231552, -0.3249167203903198, 0.21276047825813293, -0.2704356610774994, 0.29350876808166504, -0.16703125834465027, -0.22655364871025085, 0.09205583482980728, 0.23466697335243225, -0.10501457750797272, -0.18814480304718018, 0.18059799075126648, -0.5807288289070129, 0.2683962285518646, 0.5133949518203735, -0.00012073567631887272, 0.004902258515357971, 0.0979359894990921, -0.1210201308131218, -0.1832079291343689, 0.0962597131729126, 0.21084120869636536, -0.11364620923995972, -0.19647645950317383, -0.22097955644130707, -0.2335861623287201, -0.3329051733016968, 0.0682653933763504, 0.31786048412323, 0.36156558990478516, 0.5647464394569397, 0.12545672059059143, 0.17141671478748322, 0.2708599865436554, -0.16307765245437622, -0.043038204312324524, -0.4466325044631958, -0.11719414591789246, 0.3056569993495941, 0.29180920124053955, 0.026461442932486534, -0.07868766039609909, 0.3120504319667816, -0.22922255098819733, -0.11253118515014648, 0.3330805003643036, -0.021563556045293808, 0.19685609638690948, -0.4860195219516754, 0.17954912781715393, 0.13748976588249207, 0.08182170987129211, -0.09747277945280075, -0.3787056803703308, -0.45725247263908386, 0.129802867770195, -0.30639714002609253, 0.24208319187164307, 0.32787415385246277, 0.0300239697098732, 0.4115365147590637, 0.17746680974960327, 0.10756010562181473, -0.11845242232084274, 0.0925878956913948, -0.2437802255153656, 0.4983732998371124, -0.013431391678750515, 0.08449332416057587, 0.16889923810958862, -0.07316071540117264, -0.1354472041130066, 0.2001882791519165, -0.4056951403617859, 0.1535329669713974, -0.3092325031757355, -0.09132257103919983, 0.04516717419028282, 0.10418307036161423, 0.06187272071838379, 0.2962704300880432, 0.36000680923461914, -0.02201930806040764, 0.1653914749622345, -0.09537302702665329, 0.09586495161056519, 0.5454307198524475, -0.06482646614313126, 0.8031893968582153, 0.33362555503845215, 0.22921693325042725, -0.04277840629220009, -0.05746065080165863, 0.11666630953550339, -0.2461397349834442, -0.13336901366710663, 0.061003901064395905, -0.04764530807733536, -0.12765218317508698, -0.45155662298202515, 0.18909399211406708, -0.09879449009895325, 0.09858077019453049, 0.39627981185913086, 0.3320257067680359, 0.036176037043333054, -0.11990361660718918, 0.08823247253894806, 0.3008958697319031, -0.4833337068557739, -0.23635634779930115, -0.1767115741968155, 0.1990157663822174, 0.08893777430057526, 0.13320903480052948, 0.038702305406332016, -0.26292192935943604, 0.48142892122268677, -0.11951233446598053, 0.3989276885986328, -0.21987000107765198, 0.1574854850769043, -0.22252891957759857, -0.05453907698392868, 0.5060524344444275, -0.08921517431735992, -0.004285991191864014, 0.03091699443757534, -0.15439258515834808, -0.1221260204911232, 0.2088840901851654, -0.545764148235321, -0.44295480847358704, -0.05944403260946274, 0.016470035538077354, -0.19153952598571777, 0.2767576277256012, 0.08372681587934494, 0.08578099310398102, 0.27196305990219116, -0.3519435226917267, 0.16237998008728027, -0.16258504986763, -0.18168121576309204, -0.23459838330745697, 0.08878619968891144, 0.12842513620853424, -0.18335705995559692, 0.027195140719413757, -0.11652740836143494, 0.34211766719818115, 0.036156557500362396, 0.36728301644325256, -0.06078202649950981, 0.24964287877082825, -0.3656572699546814, 0.5239205956459045, -0.08464913815259933, -0.33550089597702026, -0.8524019122123718, 0.0686151385307312, -0.15509697794914246, -0.06381906569004059, -0.028848953545093536, 0.09270582348108292, 0.2748269736766815, 0.071144238114357, 0.07311277836561203, -0.03889397904276848, 0.04710490256547928, -0.09041178226470947, -0.31055501103401184, -0.28629541397094727, -0.2353498786687851, -0.15194882452487946, 0.15881682932376862, 0.05869147926568985, -0.01004011183977127, -0.1928732693195343, -0.05043085664510727, -0.23772040009498596, 0.005199656821787357, 0.2760031521320343, 0.3793164789676666, -0.34479743242263794, 0.20647932589054108, 0.2272336781024933, -0.40454989671707153, 0.31023135781288147, -0.3764098882675171, 0.17379815876483917, -0.24195225536823273, -0.019348621368408203, -0.3782620131969452, -0.2080335170030594, -0.16935473680496216, -0.45278140902519226, -0.009203214198350906, -0.13418222963809967, 0.23925024271011353, -0.10856758058071136, -0.03324030339717865, 0.223976269364357, -0.24408960342407227, 0.04936151206493378, -0.19579394161701202, 0.21375685930252075, -0.24124713242053986, -0.31338462233543396, 0.03216592222452164, -0.052086301147937775, 0.3062553107738495, -0.027709566056728363, -0.05644897371530533, 0.22309055924415588, -0.07815989851951599, -0.12424144148826599, -0.17166614532470703, 0.5252529978752136, 0.31850358843803406, -0.18360234797000885, 0.2083074450492859, 0.07452940940856934, -0.06840338557958603, -0.06348464637994766, 0.0538199320435524, 0.8773183226585388, 0.25553926825523376, -0.02124052494764328, -0.2041146159172058, -0.18304607272148132, 0.02073667012155056, -0.14320361614227295, 0.0038152262568473816, -0.038623739033937454, 0.10060635954141617, -0.22176598012447357, 0.16762815415859222, -0.1129351556301117, -0.16648681461811066, -0.052752308547496796, 0.04124479740858078, 0.026985209435224533, 0.2896217405796051, 0.02747708186507225, -0.016055859625339508, 0.0544784739613533, 0.13494864106178284, 0.030925434082746506, 0.1645592451095581, 0.2198905497789383, -0.02361128106713295, 0.20918919146060944, -0.19706040620803833, -0.09640317410230637, 0.02488529682159424, 0.027935415506362915, 0.015085834078490734, 0.3094438910484314, 0.0807783305644989, 0.0004892339929938316, 0.03855877369642258, 0.08032180368900299, 0.22551552951335907, 0.488883376121521, -0.48139241337776184, 0.29390138387680054, -0.02397739700973034, -0.3061606287956238, 0.1430351883172989, 0.1719520539045334, -0.25053098797798157, -0.1809219866991043, -0.012189436703920364, 0.11726965010166168, -0.17054177820682526, -0.04182300716638565, -0.2597266435623169, 0.17993390560150146, 0.20183782279491425, -0.126156747341156, 0.14719435572624207, 0.16245682537555695, -0.27483341097831726, -0.09015688300132751, 0.4931677579879761, -0.2216625064611435, -0.024700572714209557, 0.04622414708137512, -0.3569597005844116, 0.03937750682234764, -0.4266420304775238, 0.08711127936840057, 0.06147453933954239, 0.4652862846851349, 0.03286253660917282, 0.21723495423793793, -0.26856476068496704, -0.0013472884893417358, 0.174966499209404, 0.12309634685516357, -0.2456970512866974, -0.1799515038728714, -0.16903845965862274, 0.2208820879459381, -0.17125579714775085, -0.0950380340218544, 0.14898785948753357, -0.33868736028671265, -0.05251862853765488, 0.04634533450007439, 0.3550451397895813, 0.42318490147590637, 0.3149893581867218, -0.06301224231719971, 0.16544996201992035, -0.06242189556360245, -0.03437432646751404, 0.1367350071668625, 0.37461069226264954, -0.08662916719913483, -0.30055949091911316, 0.028038259595632553, -0.3432195782661438, 0.3580743968486786, -0.2546854019165039, -0.3936575651168823, -0.1287437081336975, -0.09084893763065338, 0.2744081914424896, -0.1958860158920288, 0.07083351165056229, -0.0010954439640045166, -0.28239282965660095, 0.06785985827445984, -0.07146454602479935, -0.1352558434009552, 0.10942864418029785, 0.3965734541416168, 0.265139639377594, 0.02539609558880329, -0.03253632038831711, -0.20083686709403992, 0.5701972842216492, 0.24933597445487976, 0.09069490432739258, 0.016032274812459946, -0.08529335260391235, -0.10104788839817047, -0.3084198832511902, -0.06043248623609543, 0.18689899146556854, 0.12254264950752258, -0.29478830099105835, 0.4365310072898865, 0.10548274219036102, -0.062459997832775116, -0.10379353165626526, -0.3435376286506653, -0.5244941711425781, -0.044173210859298706, 0.16021274030208588, 0.34905263781547546, 0.10051455348730087, -0.017017994076013565, 0.37092503905296326, -0.2442457526922226, -0.1090889498591423, 0.10710835456848145, -0.06617340445518494, 0.02916301041841507, 0.016995292156934738, 0.36932069063186646, -0.26602602005004883, -0.4287901520729065, 0.46212464570999146, -0.10837151855230331, 0.13294446468353271, 0.0247194804251194, -0.18114140629768372, 0.15507088601589203, -0.16541866958141327, 0.5125327706336975, -0.06589925289154053, -0.20467348396778107, 0.07841065526008606, 0.23770108819007874, 0.07066604495048523, -0.2215423434972763, -0.02359228953719139, 0.13445156812667847, 0.46653005480766296, 0.5863974690437317, -0.24097099900245667, 0.09039219468832016, -0.0371595174074173, 0.08331643790006638, -0.18027383089065552, 0.2525636851787567, -0.3108900487422943, -0.3436911106109619, -0.05395032465457916, 0.26381227374076843, 0.08971504867076874, 0.3723680377006531, -0.10901013761758804, 0.3731098771095276, 0.14735549688339233, -0.14593887329101562, -0.0013938769698143005, 0.32933929562568665, 0.6566372513771057, -0.0963345319032669, 0.15951240062713623, 0.0937890037894249, 0.16787368059158325, 0.33419230580329895, 0.6681458950042725, 0.21131323277950287, 0.22112663090229034, 0.08434639871120453, 0.013923346064984798, -0.20146945118904114, 0.33724769949913025, 0.12406785786151886, 0.18332192301750183, 0.2423383742570877, 0.2159472107887268, -0.12066426128149033, -0.2950114607810974, 0.003758680075407028, 0.14975027740001678, -0.3588108420372009, -0.09863549470901489, 0.5908243060112, -0.011960141360759735, -0.03609734773635864, 0.21965260803699493, 0.2423911690711975, -0.17305564880371094, 0.40447115898132324, 0.29517626762390137, 0.879645586013794, -0.04616573452949524, 0.009440269321203232, 0.43351104855537415, 0.1599506139755249, 0.3531619608402252, -0.17535316944122314, 0.32622623443603516, -0.3820408284664154, -0.26373082399368286, -0.03876356780529022, -0.01860162243247032, 0.15368235111236572, 0.022762563079595566, -0.25430941581726074, 0.12471095472574234, -0.019585557281970978, -0.3683655261993408, -0.22894425690174103, 0.11451920866966248, -0.019472254440188408, 0.035342615097761154, -0.17229358851909637, 0.007581185549497604, -0.18028515577316284, 0.476026713848114, -0.035615209490060806, -0.16144829988479614, -0.45011723041534424, -0.2931792140007019, -0.31060105562210083, -0.08498211205005646, -0.37355154752731323, -0.11985549330711365, 0.1624213457107544, -0.5230306386947632, 0.25190797448158264, -0.16151726245880127, 0.02289743721485138, 0.016031654551625252, -0.1495695412158966, 0.16078907251358032, 0.231397807598114, 0.05555533617734909, 0.13466095924377441, -0.07721851021051407, 0.18021038174629211, -0.058325543999671936, -0.19820941984653473, -0.06020084768533707, 0.04861634224653244, -0.05694295093417168, 0.0888441652059555, 0.15555419027805328, -0.19551001489162445, -0.13211798667907715, -0.24973253905773163, -0.20600241422653198, -0.047176871448755264, -0.24534785747528076, 0.0218672938644886, 0.14545485377311707, -0.24201856553554535, -0.10770735889673233, -0.00979933887720108, -0.4818700850009918, -0.19983097910881042, 0.3658028244972229, 0.2643853724002838, -0.1910974383354187, 0.640241265296936, 0.2562059462070465, 0.07158683985471725, -0.14304398000240326, 0.14718344807624817, 0.13490456342697144, -0.24205675721168518, 0.1791730374097824, -0.02542535401880741, -0.13340063393115997, 0.10118943452835083, 0.42826536297798157, 0.33563166856765747, 0.21858397126197815, -0.26853978633880615, -0.27250397205352783, -0.578578770160675, 0.2360900193452835, 0.10950914025306702, 0.06202268227934837, -0.37572377920150757, 0.056789398193359375, 0.10615216195583344, -0.03963097184896469, -0.1985880732536316, -0.05440588295459747, -0.3950386047363281, 0.026988303288817406, 0.3258836567401886, 0.11075140535831451, 0.06279990077018738, 0.12088964879512787, -0.08703511953353882, 0.056588731706142426, -0.11201252788305283, -0.07871746271848679, -0.21296650171279907, 0.13784444332122803, -0.0055414605885744095, -0.1764863282442093, -0.11345719546079636, -0.3165765404701233, -0.12579652667045593, -0.14431849122047424, 0.30782583355903625, 0.19438976049423218, 0.13862046599388123, 0.1208232045173645, -0.03988044336438179, -0.00962868332862854, -0.1688242405653, 0.048609163612127304, 0.004769712686538696, 0.16238579154014587, 0.295712947845459, 0.3576594293117523, 0.21657396852970123, 0.15108300745487213, -0.10666383802890778, 0.017444364726543427, -0.5637590885162354, -0.05236522853374481, -0.018324747681617737, -0.3271968364715576, 0.0014045089483261108, 0.18482056260108948, 0.05994077026844025, 0.20589816570281982, -0.10478018969297409, 0.04448273777961731, 0.35792022943496704, 0.0646284744143486, -0.2867365777492523, -0.04780622199177742, 0.1118093729019165, -0.04507158324122429, -0.05985021963715553, 0.46616899967193604, 0.2438097596168518, 0.06150670349597931, -0.48179829120635986, 0.17367300391197205, -0.1417907178401947, 0.2920726537704468, 0.1866726279258728, 0.7362819910049438, 0.204279825091362, -0.04473352059721947, 0.4228043258190155, -0.23770743608474731, 0.13684631884098053, 0.33697980642318726, -0.2562151849269867, 0.04650476202368736, -0.049918629229068756, 0.4144738018512726, -0.11542408913373947, -0.7970684766769409, -0.16873325407505035, -0.10235077142715454, 0.0402507483959198, 0.07851334661245346, -0.04267078638076782, 0.21609893441200256, 0.021924789994955063, -0.24736236035823822, -0.14671464264392853, 0.15153957903385162, -0.5240290760993958, 0.007526783272624016, -0.34082889556884766, -0.24079707264900208, 0.12191559374332428, 0.024147938936948776, 0.06889420747756958, -0.014475136995315552, 0.007073640823364258, -0.00603494793176651, -0.5795778036117554, 0.3997425436973572, -0.2281774878501892, 0.25714725255966187, 0.13929355144500732, -0.31071916222572327, 0.3764277994632721, 0.22886735200881958, -0.06750403344631195, 0.1630832850933075, 0.09814191609621048, 0.6825338006019592, 0.13905183970928192, -0.22514759004116058, -0.07266655564308167, 0.24637338519096375, -0.053833648562431335, -0.1966206133365631, 0.009411423467099667, 0.3035133481025696, 0.19013194739818573, 0.25079768896102905, -0.0882406085729599, -0.13729025423526764, -0.07537862658500671, 0.030921513214707375, 0.39291253685951233, -0.028225455433130264, 0.18808025121688843, -0.41838446259498596, -0.4121072292327881, -0.16348735988140106, 0.19143177568912506, -0.1863514930009842, 0.3233473598957062, -0.053065430372953415, 0.04527219384908676, 0.1985781490802765, 0.21621102094650269, 0.002692287787795067, -0.2696684002876282, 0.5837225914001465, 0.597804844379425, 0.029399514198303223, -0.5097256898880005, 0.018958404660224915, -0.3499075770378113, 0.30139288306236267, -0.6289397478103638, -0.026429014280438423, 0.1364554613828659, 0.272819846868515, -0.0773167833685875, -0.23894523084163666, 0.3593960404396057, 0.06000642105937004, 0.27789217233657837, 0.6054530143737793, -0.15197932720184326, -0.3027724325656891, -0.411674439907074, -0.023094622418284416, 0.011842440813779831, -0.21493875980377197, 0.0638871043920517, -0.018354376778006554, -0.03228907287120819, 0.08596035838127136, 0.09978550672531128, -0.013660440221428871, 0.05186987668275833, 0.5265001058578491, 0.15931226313114166, 0.3797856569290161, -0.030647315084934235, -0.05605775862932205, -0.43223848938941956, -0.10352734476327896, -0.2636748254299164, 0.11230068653821945, 0.09262104332447052, 0.6569477319717407, -0.03546950966119766, -0.23132078349590302, -0.3874509036540985, 0.1790010780096054, 0.18747971951961517, -0.1808694303035736, 0.050061434507369995, 0.20792743563652039, -0.1919955313205719, -0.21665483713150024, 0.2797966003417969, 0.255062997341156, 0.16007277369499207, -0.2280758023262024, -0.27365291118621826, -0.20869196951389313, 0.5025376677513123, -0.35773271322250366, -0.025009995326399803, 0.06481717526912689, 0.35343971848487854, 0.09435160458087921, -0.14156238734722137, -0.5027105808258057, -0.011304624378681183, 0.12790344655513763, -0.08095425367355347, -0.3460330069065094, -0.18161842226982117, -0.1787724643945694, -0.059059858322143555, 0.028563793748617172, 0.05094413086771965, 0.029052363708615303, -0.3211509585380554, -0.06412285566329956, -0.17744430899620056 ]
https://github.com/huggingface/datasets/issues/6775
IndexError: Invalid key: 0 is out of bounds for size 0
@cyberyu **Thank you so much, You saved my day (+ so many days)**. I tried the example you provided above, and the training is successfully completed in Vertex-AI (through GUI). I never thought there would be constraints on the length of the samples and also on the number of turns. I will update my complete dataset and see update here once the training is completed. Thank you, KK
### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002
68
IndexError: Invalid key: 0 is out of bounds for size 0 ### Describe the bug I am trying to fine-tune llama2-7b model in GCP. The notebook I am using for this can be found [here](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). When I use the dataset given in the example, the training gets successfully completed (example dataset can be found [here](https://huggingface.co/datasets/timdettmers/openassistant-guanaco)). However when I use my own dataset which is in the same format as the example dataset, I get the below error (my dataset can be found [here](https://huggingface.co/datasets/kk2491/finetune_dataset_002)). ![image](https://github.com/huggingface/datasets/assets/38481564/47fa2de3-95e0-478b-a35f-58cbaf90427a) I see the files are being read correctly from the logs: ![image](https://github.com/huggingface/datasets/assets/38481564/b0b6316c-2cc7-476c-9674-ca2222c8f4e3) ### Steps to reproduce the bug 1. Clone the [vertex-ai-samples](https://github.com/GoogleCloudPlatform/vertex-ai-samples) repository. 2. Run the [llama2-7b peft fine-tuning](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_pytorch_llama2_peft_finetuning.ipynb). 3. Change the dataset `kk2491/finetune_dataset_002` ### Expected behavior The training should complete successfully, and model gets deployed to an endpoint. ### Environment info Python version : Python 3.10.12 Dataset : https://huggingface.co/datasets/kk2491/finetune_dataset_002 @cyberyu **Thank you so much, You saved my day (+ so many days)**. I tried the example you provided above, and the training is successfully completed in Vertex-AI (through GUI). I never thought there would be constraints on the length of the samples and also on the number of turns. I will update my complete dataset and see update here once the training is completed. Thank you, KK
[ -0.28066593408584595, -0.47747936844825745, 0.019472308456897736, 0.3315136432647705, 0.0059850625693798065, -0.030505608767271042, 0.08925245702266693, 0.33032339811325073, 0.032530248165130615, 0.1563732624053955, -0.2661375105381012, 0.060142435133457184, -0.09422646462917328, 0.4449833333492279, -0.0871804878115654, -0.3004750907421112, -0.031435735523700714, 0.12220142781734467, 0.3271576762199402, 0.05073251575231552, -0.3249167203903198, 0.21276047825813293, -0.2704356610774994, 0.29350876808166504, -0.16703125834465027, -0.22655364871025085, 0.09205583482980728, 0.23466697335243225, -0.10501457750797272, -0.18814480304718018, 0.18059799075126648, -0.5807288289070129, 0.2683962285518646, 0.5133949518203735, -0.00012073567631887272, 0.004902258515357971, 0.0979359894990921, -0.1210201308131218, -0.1832079291343689, 0.0962597131729126, 0.21084120869636536, -0.11364620923995972, -0.19647645950317383, -0.22097955644130707, -0.2335861623287201, -0.3329051733016968, 0.0682653933763504, 0.31786048412323, 0.36156558990478516, 0.5647464394569397, 0.12545672059059143, 0.17141671478748322, 0.2708599865436554, -0.16307765245437622, -0.043038204312324524, -0.4466325044631958, -0.11719414591789246, 0.3056569993495941, 0.29180920124053955, 0.026461442932486534, -0.07868766039609909, 0.3120504319667816, -0.22922255098819733, -0.11253118515014648, 0.3330805003643036, -0.021563556045293808, 0.19685609638690948, -0.4860195219516754, 0.17954912781715393, 0.13748976588249207, 0.08182170987129211, -0.09747277945280075, -0.3787056803703308, -0.45725247263908386, 0.129802867770195, -0.30639714002609253, 0.24208319187164307, 0.32787415385246277, 0.0300239697098732, 0.4115365147590637, 0.17746680974960327, 0.10756010562181473, -0.11845242232084274, 0.0925878956913948, -0.2437802255153656, 0.4983732998371124, -0.013431391678750515, 0.08449332416057587, 0.16889923810958862, -0.07316071540117264, -0.1354472041130066, 0.2001882791519165, -0.4056951403617859, 0.1535329669713974, -0.3092325031757355, -0.09132257103919983, 0.04516717419028282, 0.10418307036161423, 0.06187272071838379, 0.2962704300880432, 0.36000680923461914, -0.02201930806040764, 0.1653914749622345, -0.09537302702665329, 0.09586495161056519, 0.5454307198524475, -0.06482646614313126, 0.8031893968582153, 0.33362555503845215, 0.22921693325042725, -0.04277840629220009, -0.05746065080165863, 0.11666630953550339, -0.2461397349834442, -0.13336901366710663, 0.061003901064395905, -0.04764530807733536, -0.12765218317508698, -0.45155662298202515, 0.18909399211406708, -0.09879449009895325, 0.09858077019453049, 0.39627981185913086, 0.3320257067680359, 0.036176037043333054, -0.11990361660718918, 0.08823247253894806, 0.3008958697319031, -0.4833337068557739, -0.23635634779930115, -0.1767115741968155, 0.1990157663822174, 0.08893777430057526, 0.13320903480052948, 0.038702305406332016, -0.26292192935943604, 0.48142892122268677, -0.11951233446598053, 0.3989276885986328, -0.21987000107765198, 0.1574854850769043, -0.22252891957759857, -0.05453907698392868, 0.5060524344444275, -0.08921517431735992, -0.004285991191864014, 0.03091699443757534, -0.15439258515834808, -0.1221260204911232, 0.2088840901851654, -0.545764148235321, -0.44295480847358704, -0.05944403260946274, 0.016470035538077354, -0.19153952598571777, 0.2767576277256012, 0.08372681587934494, 0.08578099310398102, 0.27196305990219116, -0.3519435226917267, 0.16237998008728027, -0.16258504986763, -0.18168121576309204, -0.23459838330745697, 0.08878619968891144, 0.12842513620853424, -0.18335705995559692, 0.027195140719413757, -0.11652740836143494, 0.34211766719818115, 0.036156557500362396, 0.36728301644325256, -0.06078202649950981, 0.24964287877082825, -0.3656572699546814, 0.5239205956459045, -0.08464913815259933, -0.33550089597702026, -0.8524019122123718, 0.0686151385307312, -0.15509697794914246, -0.06381906569004059, -0.028848953545093536, 0.09270582348108292, 0.2748269736766815, 0.071144238114357, 0.07311277836561203, -0.03889397904276848, 0.04710490256547928, -0.09041178226470947, -0.31055501103401184, -0.28629541397094727, -0.2353498786687851, -0.15194882452487946, 0.15881682932376862, 0.05869147926568985, -0.01004011183977127, -0.1928732693195343, -0.05043085664510727, -0.23772040009498596, 0.005199656821787357, 0.2760031521320343, 0.3793164789676666, -0.34479743242263794, 0.20647932589054108, 0.2272336781024933, -0.40454989671707153, 0.31023135781288147, -0.3764098882675171, 0.17379815876483917, -0.24195225536823273, -0.019348621368408203, -0.3782620131969452, -0.2080335170030594, -0.16935473680496216, -0.45278140902519226, -0.009203214198350906, -0.13418222963809967, 0.23925024271011353, -0.10856758058071136, -0.03324030339717865, 0.223976269364357, -0.24408960342407227, 0.04936151206493378, -0.19579394161701202, 0.21375685930252075, -0.24124713242053986, -0.31338462233543396, 0.03216592222452164, -0.052086301147937775, 0.3062553107738495, -0.027709566056728363, -0.05644897371530533, 0.22309055924415588, -0.07815989851951599, -0.12424144148826599, -0.17166614532470703, 0.5252529978752136, 0.31850358843803406, -0.18360234797000885, 0.2083074450492859, 0.07452940940856934, -0.06840338557958603, -0.06348464637994766, 0.0538199320435524, 0.8773183226585388, 0.25553926825523376, -0.02124052494764328, -0.2041146159172058, -0.18304607272148132, 0.02073667012155056, -0.14320361614227295, 0.0038152262568473816, -0.038623739033937454, 0.10060635954141617, -0.22176598012447357, 0.16762815415859222, -0.1129351556301117, -0.16648681461811066, -0.052752308547496796, 0.04124479740858078, 0.026985209435224533, 0.2896217405796051, 0.02747708186507225, -0.016055859625339508, 0.0544784739613533, 0.13494864106178284, 0.030925434082746506, 0.1645592451095581, 0.2198905497789383, -0.02361128106713295, 0.20918919146060944, -0.19706040620803833, -0.09640317410230637, 0.02488529682159424, 0.027935415506362915, 0.015085834078490734, 0.3094438910484314, 0.0807783305644989, 0.0004892339929938316, 0.03855877369642258, 0.08032180368900299, 0.22551552951335907, 0.488883376121521, -0.48139241337776184, 0.29390138387680054, -0.02397739700973034, -0.3061606287956238, 0.1430351883172989, 0.1719520539045334, -0.25053098797798157, -0.1809219866991043, -0.012189436703920364, 0.11726965010166168, -0.17054177820682526, -0.04182300716638565, -0.2597266435623169, 0.17993390560150146, 0.20183782279491425, -0.126156747341156, 0.14719435572624207, 0.16245682537555695, -0.27483341097831726, -0.09015688300132751, 0.4931677579879761, -0.2216625064611435, -0.024700572714209557, 0.04622414708137512, -0.3569597005844116, 0.03937750682234764, -0.4266420304775238, 0.08711127936840057, 0.06147453933954239, 0.4652862846851349, 0.03286253660917282, 0.21723495423793793, -0.26856476068496704, -0.0013472884893417358, 0.174966499209404, 0.12309634685516357, -0.2456970512866974, -0.1799515038728714, -0.16903845965862274, 0.2208820879459381, -0.17125579714775085, -0.0950380340218544, 0.14898785948753357, -0.33868736028671265, -0.05251862853765488, 0.04634533450007439, 0.3550451397895813, 0.42318490147590637, 0.3149893581867218, -0.06301224231719971, 0.16544996201992035, -0.06242189556360245, -0.03437432646751404, 0.1367350071668625, 0.37461069226264954, -0.08662916719913483, -0.30055949091911316, 0.028038259595632553, -0.3432195782661438, 0.3580743968486786, -0.2546854019165039, -0.3936575651168823, -0.1287437081336975, -0.09084893763065338, 0.2744081914424896, -0.1958860158920288, 0.07083351165056229, -0.0010954439640045166, -0.28239282965660095, 0.06785985827445984, -0.07146454602479935, -0.1352558434009552, 0.10942864418029785, 0.3965734541416168, 0.265139639377594, 0.02539609558880329, -0.03253632038831711, -0.20083686709403992, 0.5701972842216492, 0.24933597445487976, 0.09069490432739258, 0.016032274812459946, -0.08529335260391235, -0.10104788839817047, -0.3084198832511902, -0.06043248623609543, 0.18689899146556854, 0.12254264950752258, -0.29478830099105835, 0.4365310072898865, 0.10548274219036102, -0.062459997832775116, -0.10379353165626526, -0.3435376286506653, -0.5244941711425781, -0.044173210859298706, 0.16021274030208588, 0.34905263781547546, 0.10051455348730087, -0.017017994076013565, 0.37092503905296326, -0.2442457526922226, -0.1090889498591423, 0.10710835456848145, -0.06617340445518494, 0.02916301041841507, 0.016995292156934738, 0.36932069063186646, -0.26602602005004883, -0.4287901520729065, 0.46212464570999146, -0.10837151855230331, 0.13294446468353271, 0.0247194804251194, -0.18114140629768372, 0.15507088601589203, -0.16541866958141327, 0.5125327706336975, -0.06589925289154053, -0.20467348396778107, 0.07841065526008606, 0.23770108819007874, 0.07066604495048523, -0.2215423434972763, -0.02359228953719139, 0.13445156812667847, 0.46653005480766296, 0.5863974690437317, -0.24097099900245667, 0.09039219468832016, -0.0371595174074173, 0.08331643790006638, -0.18027383089065552, 0.2525636851787567, -0.3108900487422943, -0.3436911106109619, -0.05395032465457916, 0.26381227374076843, 0.08971504867076874, 0.3723680377006531, -0.10901013761758804, 0.3731098771095276, 0.14735549688339233, -0.14593887329101562, -0.0013938769698143005, 0.32933929562568665, 0.6566372513771057, -0.0963345319032669, 0.15951240062713623, 0.0937890037894249, 0.16787368059158325, 0.33419230580329895, 0.6681458950042725, 0.21131323277950287, 0.22112663090229034, 0.08434639871120453, 0.013923346064984798, -0.20146945118904114, 0.33724769949913025, 0.12406785786151886, 0.18332192301750183, 0.2423383742570877, 0.2159472107887268, -0.12066426128149033, -0.2950114607810974, 0.003758680075407028, 0.14975027740001678, -0.3588108420372009, -0.09863549470901489, 0.5908243060112, -0.011960141360759735, -0.03609734773635864, 0.21965260803699493, 0.2423911690711975, -0.17305564880371094, 0.40447115898132324, 0.29517626762390137, 0.879645586013794, -0.04616573452949524, 0.009440269321203232, 0.43351104855537415, 0.1599506139755249, 0.3531619608402252, -0.17535316944122314, 0.32622623443603516, -0.3820408284664154, -0.26373082399368286, -0.03876356780529022, -0.01860162243247032, 0.15368235111236572, 0.022762563079595566, -0.25430941581726074, 0.12471095472574234, -0.019585557281970978, -0.3683655261993408, -0.22894425690174103, 0.11451920866966248, -0.019472254440188408, 0.035342615097761154, -0.17229358851909637, 0.007581185549497604, -0.18028515577316284, 0.476026713848114, -0.035615209490060806, -0.16144829988479614, -0.45011723041534424, -0.2931792140007019, -0.31060105562210083, -0.08498211205005646, -0.37355154752731323, -0.11985549330711365, 0.1624213457107544, -0.5230306386947632, 0.25190797448158264, -0.16151726245880127, 0.02289743721485138, 0.016031654551625252, -0.1495695412158966, 0.16078907251358032, 0.231397807598114, 0.05555533617734909, 0.13466095924377441, -0.07721851021051407, 0.18021038174629211, -0.058325543999671936, -0.19820941984653473, -0.06020084768533707, 0.04861634224653244, -0.05694295093417168, 0.0888441652059555, 0.15555419027805328, -0.19551001489162445, -0.13211798667907715, -0.24973253905773163, -0.20600241422653198, -0.047176871448755264, -0.24534785747528076, 0.0218672938644886, 0.14545485377311707, -0.24201856553554535, -0.10770735889673233, -0.00979933887720108, -0.4818700850009918, -0.19983097910881042, 0.3658028244972229, 0.2643853724002838, -0.1910974383354187, 0.640241265296936, 0.2562059462070465, 0.07158683985471725, -0.14304398000240326, 0.14718344807624817, 0.13490456342697144, -0.24205675721168518, 0.1791730374097824, -0.02542535401880741, -0.13340063393115997, 0.10118943452835083, 0.42826536297798157, 0.33563166856765747, 0.21858397126197815, -0.26853978633880615, -0.27250397205352783, -0.578578770160675, 0.2360900193452835, 0.10950914025306702, 0.06202268227934837, -0.37572377920150757, 0.056789398193359375, 0.10615216195583344, -0.03963097184896469, -0.1985880732536316, -0.05440588295459747, -0.3950386047363281, 0.026988303288817406, 0.3258836567401886, 0.11075140535831451, 0.06279990077018738, 0.12088964879512787, -0.08703511953353882, 0.056588731706142426, -0.11201252788305283, -0.07871746271848679, -0.21296650171279907, 0.13784444332122803, -0.0055414605885744095, -0.1764863282442093, -0.11345719546079636, -0.3165765404701233, -0.12579652667045593, -0.14431849122047424, 0.30782583355903625, 0.19438976049423218, 0.13862046599388123, 0.1208232045173645, -0.03988044336438179, -0.00962868332862854, -0.1688242405653, 0.048609163612127304, 0.004769712686538696, 0.16238579154014587, 0.295712947845459, 0.3576594293117523, 0.21657396852970123, 0.15108300745487213, -0.10666383802890778, 0.017444364726543427, -0.5637590885162354, -0.05236522853374481, -0.018324747681617737, -0.3271968364715576, 0.0014045089483261108, 0.18482056260108948, 0.05994077026844025, 0.20589816570281982, -0.10478018969297409, 0.04448273777961731, 0.35792022943496704, 0.0646284744143486, -0.2867365777492523, -0.04780622199177742, 0.1118093729019165, -0.04507158324122429, -0.05985021963715553, 0.46616899967193604, 0.2438097596168518, 0.06150670349597931, -0.48179829120635986, 0.17367300391197205, -0.1417907178401947, 0.2920726537704468, 0.1866726279258728, 0.7362819910049438, 0.204279825091362, -0.04473352059721947, 0.4228043258190155, -0.23770743608474731, 0.13684631884098053, 0.33697980642318726, -0.2562151849269867, 0.04650476202368736, -0.049918629229068756, 0.4144738018512726, -0.11542408913373947, -0.7970684766769409, -0.16873325407505035, -0.10235077142715454, 0.0402507483959198, 0.07851334661245346, -0.04267078638076782, 0.21609893441200256, 0.021924789994955063, -0.24736236035823822, -0.14671464264392853, 0.15153957903385162, -0.5240290760993958, 0.007526783272624016, -0.34082889556884766, -0.24079707264900208, 0.12191559374332428, 0.024147938936948776, 0.06889420747756958, -0.014475136995315552, 0.007073640823364258, -0.00603494793176651, -0.5795778036117554, 0.3997425436973572, -0.2281774878501892, 0.25714725255966187, 0.13929355144500732, -0.31071916222572327, 0.3764277994632721, 0.22886735200881958, -0.06750403344631195, 0.1630832850933075, 0.09814191609621048, 0.6825338006019592, 0.13905183970928192, -0.22514759004116058, -0.07266655564308167, 0.24637338519096375, -0.053833648562431335, -0.1966206133365631, 0.009411423467099667, 0.3035133481025696, 0.19013194739818573, 0.25079768896102905, -0.0882406085729599, -0.13729025423526764, -0.07537862658500671, 0.030921513214707375, 0.39291253685951233, -0.028225455433130264, 0.18808025121688843, -0.41838446259498596, -0.4121072292327881, -0.16348735988140106, 0.19143177568912506, -0.1863514930009842, 0.3233473598957062, -0.053065430372953415, 0.04527219384908676, 0.1985781490802765, 0.21621102094650269, 0.002692287787795067, -0.2696684002876282, 0.5837225914001465, 0.597804844379425, 0.029399514198303223, -0.5097256898880005, 0.018958404660224915, -0.3499075770378113, 0.30139288306236267, -0.6289397478103638, -0.026429014280438423, 0.1364554613828659, 0.272819846868515, -0.0773167833685875, -0.23894523084163666, 0.3593960404396057, 0.06000642105937004, 0.27789217233657837, 0.6054530143737793, -0.15197932720184326, -0.3027724325656891, -0.411674439907074, -0.023094622418284416, 0.011842440813779831, -0.21493875980377197, 0.0638871043920517, -0.018354376778006554, -0.03228907287120819, 0.08596035838127136, 0.09978550672531128, -0.013660440221428871, 0.05186987668275833, 0.5265001058578491, 0.15931226313114166, 0.3797856569290161, -0.030647315084934235, -0.05605775862932205, -0.43223848938941956, -0.10352734476327896, -0.2636748254299164, 0.11230068653821945, 0.09262104332447052, 0.6569477319717407, -0.03546950966119766, -0.23132078349590302, -0.3874509036540985, 0.1790010780096054, 0.18747971951961517, -0.1808694303035736, 0.050061434507369995, 0.20792743563652039, -0.1919955313205719, -0.21665483713150024, 0.2797966003417969, 0.255062997341156, 0.16007277369499207, -0.2280758023262024, -0.27365291118621826, -0.20869196951389313, 0.5025376677513123, -0.35773271322250366, -0.025009995326399803, 0.06481717526912689, 0.35343971848487854, 0.09435160458087921, -0.14156238734722137, -0.5027105808258057, -0.011304624378681183, 0.12790344655513763, -0.08095425367355347, -0.3460330069065094, -0.18161842226982117, -0.1787724643945694, -0.059059858322143555, 0.028563793748617172, 0.05094413086771965, 0.029052363708615303, -0.3211509585380554, -0.06412285566329956, -0.17744430899620056 ]
https://github.com/huggingface/datasets/issues/6774
Generating split is very slow when Image format is PNG
I think this is due to the speed of reading a `png` image using pillow compared to a `jpg` image. Notably the same is true with `tiff`, it is even faster than `jpg` in my case.
### Describe the bug When I create a dataset, it gets stuck while generating cached data. The image format is PNG, and it will not get stuck when the image format is jpeg. ![image](https://github.com/huggingface/datasets/assets/22740819/3b888fd8-e6d6-488f-b828-95a8f206a152) After debugging, I know that it is because of the `pa.array` operation in [arrow_writer](https://github.com/huggingface/datasets/blob/2.13.0/src/datasets/arrow_writer.py#L553), but i don't why. ### Steps to reproduce the bug ``` from datasets import Dataset def generator(lines): for line in lines: img = Image.open(open(line["url"], "rb")) # print(img.format) # "PNG" yield { "image": img, } lines = open(dataset_path, "r") dataset = Dataset.from_generator( generator, gen_kwargs={"lines": lines} ) ``` ### Expected behavior Generating split done. ### Environment info datasets 2.13.0
36
Generating split is very slow when Image format is PNG ### Describe the bug When I create a dataset, it gets stuck while generating cached data. The image format is PNG, and it will not get stuck when the image format is jpeg. ![image](https://github.com/huggingface/datasets/assets/22740819/3b888fd8-e6d6-488f-b828-95a8f206a152) After debugging, I know that it is because of the `pa.array` operation in [arrow_writer](https://github.com/huggingface/datasets/blob/2.13.0/src/datasets/arrow_writer.py#L553), but i don't why. ### Steps to reproduce the bug ``` from datasets import Dataset def generator(lines): for line in lines: img = Image.open(open(line["url"], "rb")) # print(img.format) # "PNG" yield { "image": img, } lines = open(dataset_path, "r") dataset = Dataset.from_generator( generator, gen_kwargs={"lines": lines} ) ``` ### Expected behavior Generating split done. ### Environment info datasets 2.13.0 I think this is due to the speed of reading a `png` image using pillow compared to a `jpg` image. Notably the same is true with `tiff`, it is even faster than `jpg` in my case.
[ -0.16957108676433563, -0.3820321261882782, -0.09798769652843475, 0.34538745880126953, 0.11148780584335327, 0.18358322978019714, 0.4230484068393707, 0.30021917819976807, -0.2039995938539505, 0.15063035488128662, 0.162183940410614, 0.10342351347208023, 0.01709027588367462, -0.3737950026988983, -0.24137580394744873, -0.3387591540813446, 0.03064383566379547, 0.3638002574443817, 0.4677039682865143, 0.08264018595218658, -0.10992947220802307, 0.03585979714989662, -0.2091234028339386, -0.1221732348203659, -0.6295644044876099, -0.07479403913021088, 0.0812528133392334, 0.08016377687454224, -0.24430112540721893, -0.2101820856332779, 0.2985198199748993, 0.01303526945412159, -0.41930726170539856, 0.13796406984329224, -0.00012967073416803032, -0.08585374802350998, 0.39760565757751465, 0.16858439147472382, -0.050097446888685226, 0.09164471179246902, 0.06650710850954056, -0.1821848750114441, -0.08581357449293137, -0.20152407884597778, 0.02498243749141693, -0.07399500161409378, 0.2411622256040573, -0.28769972920417786, 0.5959134101867676, -0.006465676240622997, 0.026984209194779396, -0.08129242062568665, -0.23662234842777252, 0.011235593818128109, 0.41472169756889343, 0.4313777685165405, -0.34778323769569397, -0.20152316987514496, -0.06958042085170746, -0.0028078248724341393, -0.21768087148666382, 0.273362398147583, -0.23131757974624634, 0.21097926795482635, 0.026937851682305336, 0.17301732301712036, -0.4730159640312195, -0.22536024451255798, 0.25984659790992737, 0.22265949845314026, 0.19667112827301025, 0.054325975477695465, -0.2322101891040802, -0.45499667525291443, -0.17842228710651398, -0.3322252333164215, 0.2366509735584259, 0.3631504476070404, -0.2269236445426941, -0.00518827885389328, -0.39377760887145996, 0.03258815035223961, -0.15013465285301208, -0.20524875819683075, 0.09186527132987976, -0.4020296633243561, -0.021729420870542526, 0.1474742293357849, 0.44757112860679626, 0.20831404626369476, 0.07041976600885391, -0.20590433478355408, 0.1589621603488922, 0.04743907228112221, -0.07994093000888824, 0.18946067988872528, -0.12292418628931046, -0.0831083282828331, 0.1696474850177765, 0.22512249648571014, -0.42900583148002625, 0.1324618011713028, 0.03448181971907616, 0.09973692893981934, -0.03732145205140114, -0.16528698801994324, -0.1750943958759308, 0.1794959008693695, 0.12015868723392487, -0.04923846200108528, -0.24013473093509674, -0.11685966700315475, 0.05878759175539017, -0.2507302761077881, 0.35229286551475525, -0.20145553350448608, -0.05714205279946327, -0.07622136175632477, -0.2425640970468521, -0.23733177781105042, 0.06123185157775879, -0.0009039365686476231, -0.16173146665096283, 0.20233115553855896, -0.01155826635658741, 0.16547277569770813, -0.05553571879863739, 0.15377065539360046, -0.4775485098361969, 0.11181731522083282, 0.01738882251083851, -0.3336922228336334, -0.20655256509780884, 0.1698223203420639, -0.009934656322002411, -0.20769841969013214, -0.03659500181674957, 0.20638470351696014, -0.013026364147663116, 0.02719622105360031, 0.12004713714122772, -0.40475910902023315, 0.33747291564941406, 0.24049198627471924, 0.012078426778316498, 0.12064205855131149, -0.11612732708454132, 0.30547845363616943, -0.144195556640625, 0.1653415411710739, -0.2892790734767914, -0.23416201770305634, 0.06471516937017441, -0.037778910249471664, -0.02816709131002426, 0.29552191495895386, -0.09621915966272354, -0.0810205340385437, 0.5712155699729919, -0.1386292576789856, 0.017930567264556885, -0.10508373379707336, -0.4034233093261719, -0.3027012348175049, 0.10466528683900833, 0.4868609309196472, -0.04347255080938339, 0.26035571098327637, -0.2227572798728943, -0.06915266811847687, 0.4382024109363556, 0.5314516425132751, 0.10114847123622894, 0.0687304139137268, -0.4942670166492462, 0.09899537265300751, 0.25238654017448425, 0.10562871396541595, -0.29603004455566406, 0.23814812302589417, -0.0942525640130043, 0.06961160898208618, 0.5607960224151611, 0.13631552457809448, 0.173111692070961, -0.06722356379032135, -0.17639335989952087, 0.41915953159332275, -0.2636347711086273, 0.12418784946203232, -0.1638147234916687, -0.3580213785171509, 0.04586603865027428, 0.1315278708934784, -0.1474446952342987, 0.1068483218550682, -0.07314497977495193, 0.04496033489704132, 0.168860524892807, -0.14317214488983154, 0.07387251406908035, 0.04793072119355202, 0.13224747776985168, -0.07775689661502838, 0.2737985849380493, -0.2725045382976532, -0.2952114939689636, 0.1794993281364441, 0.09117500483989716, -0.11242888867855072, -0.591579258441925, -0.05021834746003151, -0.15159159898757935, -0.03871976584196091, -0.25921395421028137, -0.07573038339614868, -0.14252641797065735, -0.0017614662647247314, 0.4936215877532959, 0.06992489099502563, 0.09376190602779388, 0.25797197222709656, 0.17074744403362274, 0.1829577088356018, -0.46942663192749023, 0.07039467245340347, 0.08328694850206375, -0.15667851269245148, -0.2360820174217224, 0.16226309537887573, -0.094629667699337, -0.2198600172996521, -0.08453617990016937, 0.2833833396434784, 0.5003665685653687, 0.40836286544799805, -0.19286945462226868, -0.14790190756320953, 0.26023319363594055, -0.2271968424320221, 0.2240532785654068, -0.14793486893177032, -0.19242426753044128, -0.1903676986694336, -0.1401529610157013, 0.4455960988998413, -0.15606966614723206, 0.36091774702072144, -0.15521571040153503, -0.002931671217083931, -0.007183963432908058, 0.1426720768213272, 0.4452574551105499, -0.2120945006608963, 0.24686814844608307, 0.18434453010559082, 0.6085540056228638, 0.024188939481973648, -0.004147566854953766, 0.3327130079269409, 0.7402724623680115, -0.0008139796555042267, -0.26812124252319336, 0.2812426686286926, 0.14003977179527283, -0.1423906683921814, -0.13362349569797516, 0.2237216681241989, 0.2893029451370239, 0.2053743153810501, -0.05650617554783821, -0.013478746637701988, -0.16058553755283356, -0.35168081521987915, 0.2743494212627411, -0.022433429956436157, 0.34837642312049866, 0.010009028017520905, 0.04747315123677254, -0.11888311058282852, -0.2383575141429901, 0.058558281511068344, -0.013569684699177742, 0.1702585369348526, 0.02144736424088478, 0.323790043592453, -0.2375769317150116, -0.14538228511810303, -0.2295353263616562, 0.25553685426712036, -0.15762479603290558, -0.23065400123596191, -0.055434420704841614, 0.12709136307239532, 0.10168065130710602, -0.0565401092171669, 0.03982967510819435, 0.031195536255836487, 0.22452427446842194, -0.15354079008102417, -0.48706892132759094, 0.037264738231897354, -0.02327778935432434, -0.06258648633956909, 0.22176595032215118, -0.10488865524530411, 0.38714516162872314, -0.2407042682170868, -0.152420774102211, -0.0442260205745697, -0.13499081134796143, 0.06058967113494873, -0.22539864480495453, 0.078182153403759, 0.31142306327819824, 0.14981265366077423, 0.19171582162380219, 0.005841446109116077, 0.39322856068611145, -0.1696735918521881, -0.3432629406452179, 0.07272621989250183, 0.021171070635318756, 0.04556984081864357, -0.25995534658432007, -0.24776121973991394, 0.08886058628559113, -0.026101410388946533, 0.47353851795196533, -0.16850237548351288, 0.4234715700149536, 0.13662512600421906, 0.2775590717792511, -0.06483513861894608, -0.11035074293613434, -0.06948265433311462, -0.24697734415531158, -0.37148961424827576, 0.12146970629692078, -0.041068870574235916, -0.2166135162115097, -0.2461017519235611, -0.07496942579746246, -0.07812923192977905, 0.4014076590538025, -0.2927396893501282, -0.11827924102544785, -0.471223384141922, 0.4641551971435547, -0.007909350097179413, -0.01978966034948826, 0.17848964035511017, 0.13657356798648834, -0.01968368887901306, -0.18121185898780823, 0.009942136704921722, 0.26341694593429565, -0.39067715406417847, -0.06660609692335129, 0.1381218135356903, 0.257398784160614, 0.0982448160648346, 0.7553042769432068, 0.27983349561691284, 0.06105811893939972, 0.17282643914222717, -0.1737699955701828, 0.2046119123697281, -0.3460477590560913, -0.07896912097930908, 0.1122104600071907, -0.0274917334318161, -0.19415631890296936, -0.12339706718921661, 0.020627817139029503, -0.19935598969459534, 0.07065083831548691, 0.24066179990768433, -0.023413289338350296, -0.13717110455036163, 0.1493566334247589, -0.1256370097398758, 0.14236468076705933, -0.07714225351810455, 0.16492053866386414, -0.14522647857666016, -0.10487832874059677, -0.16584783792495728, -0.05843602120876312, 0.6448037028312683, -0.21346533298492432, -0.036662209779024124, -0.11651477962732315, -0.4398900866508484, 0.2480773776769638, 0.3808446228504181, 0.0629238411784172, -0.29311850666999817, 0.20035436749458313, 0.37794631719589233, -0.11909054964780807, 0.9777926802635193, -0.2518516182899475, 0.08965200185775757, -0.15510734915733337, -0.0944809839129448, -0.18403610587120056, 0.286318838596344, 0.09108565747737885, 0.08719910681247711, 0.024480797350406647, 0.558403730392456, -0.5158805847167969, -0.32509395480155945, 0.10959888249635696, 0.2456951141357422, 0.06288391351699829, -0.060361918061971664, -0.2490520179271698, -0.08866893500089645, 0.022914273664355278, 0.03958277404308319, -0.08091132342815399, -0.05236734077334404, -0.009682787582278252, -0.1033061146736145, -0.189400777220726, 0.006093304604291916, -0.22416017949581146, 0.008703691884875298, 0.22446289658546448, -0.6240873336791992, 0.28017324209213257, 0.4859221875667572, 0.03554524481296539, 0.2471524178981781, 0.30705052614212036, -0.04908294603228569, -0.10993385314941406, -0.08157743513584137, 0.009967419318854809, 0.021096982061862946, 0.5441367626190186, -0.11053932458162308, 0.2091241180896759, -0.049732230603694916, 0.2581648528575897, -0.3455355763435364, -0.37542885541915894, 0.4839651882648468, -0.040917228907346725, -0.13314539194107056, -0.4514308571815491, 0.35261601209640503, 0.20882226526737213, 0.056877076625823975, 0.3112778961658478, 0.03897924721240997, -0.041438668966293335, 0.3205105662345886, 0.1219836175441742, 0.9376933574676514, -0.19414718449115753, 0.193996861577034, 0.2214120328426361, -0.34255272150039673, 0.3385803699493408, 0.07460909336805344, 0.14106518030166626, -0.3849017024040222, -0.12145887315273285, -0.05999044328927994, -0.34494325518608093, 0.289571076631546, -0.005495145916938782, 0.10390304028987885, 0.12815727293491364, -0.02703997865319252, 0.03480488806962967, -0.1671152561903, 0.1193726509809494, -0.46425938606262207, -0.4646422266960144, -0.23539137840270996, -0.05347302556037903, -0.03615497052669525, -0.047213513404130936, 0.17607557773590088, -0.09690649062395096, -0.33203181624412537, 0.11736568808555603, -0.3645535707473755, 0.22859442234039307, -0.154349684715271, 0.1963265985250473, 0.01261751540005207, -0.3200399875640869, -0.08243219554424286, -0.02266557142138481, 0.006069578230381012, -0.08902409672737122, -0.07342856377363205, 0.41745224595069885, 0.03714197874069214, 0.028852486982941628, 0.32136839628219604, -0.39836081862449646, 0.26718708872795105, 0.11989442259073257, -0.0968247801065445, -0.4819888472557068, -0.3208032548427582, -0.18738962709903717, 0.15523028373718262, 0.01569507271051407, 0.18397928774356842, 0.06734689325094223, -0.32848554849624634, -0.14649075269699097, -0.2756466269493103, -0.25473469495773315, -0.03707536682486534, 0.17842498421669006, 0.1983664333820343, 0.3583272695541382, -0.21816711127758026, -0.17595237493515015, -0.03277036175131798, 0.2586069703102112, 0.13893111050128937, 0.08382786065340042, 0.39463314414024353, -0.16625629365444183, -0.27038007974624634, -0.10098996013402939, 0.3689267933368683, -0.10602409392595291, -0.8347877860069275, 0.3319302797317505, -0.12051399797201157, -0.028437092900276184, 0.14181536436080933, -0.33454522490501404, -0.22886373102664948, -0.15828558802604675, -0.4193873107433319, -0.2837989330291748, -0.07048087567090988, -0.11610427498817444, -0.23569898307323456, 0.0627460926771164, -0.06887992471456528, 0.008391368202865124, 0.034225910902023315, 0.0321829691529274, -0.08649815618991852, 0.03225693106651306, 0.20768018066883087, 0.2969042658805847, -0.14979612827301025, -0.259924978017807, 0.2899459898471832, -0.11243420839309692, -0.07740696519613266, 0.41572272777557373, -0.1911332905292511, -0.02524242363870144, -0.08143079280853271, 0.1994209885597229, -0.22406074404716492, -0.3600400686264038, 0.026296410709619522, -0.07181006669998169, -0.31714242696762085, -0.314024955034256, 0.21937957406044006, -0.09122076630592346, -0.11801894009113312, -0.21419882774353027, 0.013681754469871521, 0.12016960978507996, -0.018299447372555733, 0.10740720480680466, -0.48726895451545715, 0.42634445428848267, -0.11645776033401489, 0.2193853110074997, -0.24634461104869843, -0.15136387944221497, -0.13288387656211853, 0.16432417929172516, 0.2312236726284027, -0.20505860447883606, 0.5046775341033936, -0.2736351490020752, -0.09117984771728516, -0.08990254998207092, 0.5105526447296143, 0.274471640586853, 0.26311570405960083, -0.06139247119426727, 0.13684678077697754, -0.0265148114413023, -0.007428275421261787, 0.08052366226911545, 0.15516433119773865, -0.013734950684010983, 0.0340249203145504, 0.2755429148674011, 0.2474525272846222, 0.3164617121219635, -0.26892125606536865, -0.03890456259250641, 0.5774460434913635, -0.4637066721916199, -0.014643684029579163, 0.5051006078720093, 0.3329339325428009, 0.24868887662887573, 0.3299306631088257, 0.19033008813858032, 0.10958120226860046, 0.48282814025878906, 0.2291000485420227, 0.4951808750629425, 0.23387876152992249, 0.2742628753185272, 0.06525501608848572, -0.1761624813079834, -0.18650509417057037, 0.3527607321739197, -0.06203077733516693, 0.32095417380332947, -0.009701736271381378, 0.667593240737915, -0.3567747175693512, -0.3262191414833069, -0.14415353536605835, 0.3081854283809662, 0.044997695833444595, -0.02313867025077343, 0.28493085503578186, -0.01979263871908188, -0.3124748766422272, 0.18672850728034973, -0.013031411916017532, 0.005327470600605011, 0.5092748403549194, 0.22213934361934662, 0.2217504233121872, -0.09443710744380951, 0.03414785861968994, -0.11615539342164993, 0.6029676795005798, -0.29831838607788086, 0.0956556424498558, -0.08865557610988617, -0.11293159425258636, 0.05673091858625412, 0.38235732913017273, 0.5146450996398926, 0.2589946687221527, -0.12729239463806152, -0.11943758279085159, 0.10333272814750671, 0.0026209410279989243, 0.16983360052108765, 0.5282737612724304, -0.038827262818813324, -0.07197119295597076, -0.017934398725628853, -0.08727351576089859, -0.04910551384091377, -0.1628415584564209, 0.34689992666244507, 0.2672082781791687, -0.09449590742588043, 0.09197523444890976, -0.4037265479564667, -0.22087690234184265, 0.012884670868515968, 0.04118916764855385, -0.2695375978946686, 0.1811491698026657, 0.05221577733755112, -0.3665005564689636, -0.05367502197623253, 0.08242416381835938, -0.0387997031211853, -0.1045616865158081, 0.5539819002151489, 0.2868189811706543, 0.2347758710384369, -0.2201293706893921, -0.23642714321613312, -0.3988341987133026, -0.10534431785345078, -0.20842692255973816, -0.1453070491552353, 0.14166581630706787, 0.3285077214241028, -0.086966373026371, 0.09741128981113434, 0.26213425397872925, 0.18394602835178375, 0.4444854259490967, 0.5378170013427734, -0.06245529651641846, 0.10590516030788422, 0.27894705533981323, -0.3313257396221161, -0.40911805629730225, -0.7347207069396973, 0.40769240260124207, 0.08006484806537628, -0.10177966952323914, 0.11254218220710754, 0.2258780300617218, 0.08493341505527496, 0.09220623970031738, 0.053101781755685806, 0.5298444032669067, -0.058505550026893616, -0.040428515523672104, -0.1690225750207901, -0.317840576171875, 0.08536386489868164, -0.031857870519161224, 0.24934011697769165, 0.23117613792419434, 0.5558383464813232, -0.060555122792720795, -0.07368172705173492, -0.4531516432762146, 0.5831829309463501, 0.09112848341464996, -0.0024925197940319777, -0.12629416584968567, 0.3531615734100342, -0.3135858476161957, 0.15067808330059052, 0.0644034892320633, 0.09844657778739929, 0.14728158712387085, 0.03489562124013901, -0.3310379981994629, -0.3417435884475708, 0.1360495537519455, -0.23130790889263153, -0.28042492270469666, 0.3978956937789917, 0.2376728355884552, 0.5166455507278442, -0.09890837222337723, -0.359084814786911, -0.06986197829246521, 0.04389297217130661, -0.22545230388641357, 0.0530654676258564, 0.0993766188621521, 0.2540293037891388, -0.0066862814128398895, -0.055243656039237976, 0.43570950627326965, 0.020836004987359047, -0.3155158460140228, 0.366303026676178, -0.08803054690361023 ]
https://github.com/huggingface/datasets/issues/6773
Dataset on Hub re-downloads every time?
hi @mariosasko , Thank you for checking. I also tried running this again just now, and it seems like the `load_dataset()` caches properly (though I'll double check later). I think the issue might be in the caching of the function output for `territories.map(lambda row: {'Claimants': row['Claimants'].split(';')})`. My current run re-ran this, even though I have run this many times before, and as demonstrated by loading from cache, the loaded dataset is the same. I wonder if the issue stems from using CSV output. Do you recommend changing to Parquet, and if so, is there an easy way to take the already uploaded data on the Hub and reformat?
### Describe the bug Hi, I have a dataset on the hub [here](https://huggingface.co/datasets/manestay/borderlines). It has 1k+ downloads, which I sure is mostly just me and my colleagues working with it. It should have far fewer, since I'm using the same machine with a properly set up HF_HOME variable. However, whenever I run the below function `load_borderlines_hf`, it downloads the entire dataset from the hub and then does the other logic: https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80 Let me know what I'm doing wrong here, or if it's a bug with the `datasets` library itself. On the hub I have my data stored in CSVs, but several columns are lists, so that's why I have the code to map splitting on `;`. I looked into dataset loading scripts, but it seemed difficult to set up. I have verified that other `datasets` and `models` on my system are using the cache properly (e.g. I have a 13B parameter model and large datasets, but those are cached and don't redownload). __EDIT: __ as pointed out in the discussion below, it may be the `map()` calls that aren't being cached properly. Supposing the `load_dataset()` retrieve from the cache, then it should be the case that the `map()` calls also retrieve from the cached output. But the `map()` commands re-execute sometimes. ### Steps to reproduce the bug 1. Copy and paste the function from [here](https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80) (lines 80-100) 2. Run it in Python `load_borderlines_hf(None)` 3. It completes successfully, downloading from HF hub, then doing the mapping logic etc. 4. If you run it again after some time, it will re-download, ignoring the cache ### Expected behavior Re-running the code, which calls `datasets.load_dataset('manestay/borderlines', 'territories')`, should use the cached version ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.21-150500.55.7-default-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
108
Dataset on Hub re-downloads every time? ### Describe the bug Hi, I have a dataset on the hub [here](https://huggingface.co/datasets/manestay/borderlines). It has 1k+ downloads, which I sure is mostly just me and my colleagues working with it. It should have far fewer, since I'm using the same machine with a properly set up HF_HOME variable. However, whenever I run the below function `load_borderlines_hf`, it downloads the entire dataset from the hub and then does the other logic: https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80 Let me know what I'm doing wrong here, or if it's a bug with the `datasets` library itself. On the hub I have my data stored in CSVs, but several columns are lists, so that's why I have the code to map splitting on `;`. I looked into dataset loading scripts, but it seemed difficult to set up. I have verified that other `datasets` and `models` on my system are using the cache properly (e.g. I have a 13B parameter model and large datasets, but those are cached and don't redownload). __EDIT: __ as pointed out in the discussion below, it may be the `map()` calls that aren't being cached properly. Supposing the `load_dataset()` retrieve from the cache, then it should be the case that the `map()` calls also retrieve from the cached output. But the `map()` commands re-execute sometimes. ### Steps to reproduce the bug 1. Copy and paste the function from [here](https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80) (lines 80-100) 2. Run it in Python `load_borderlines_hf(None)` 3. It completes successfully, downloading from HF hub, then doing the mapping logic etc. 4. If you run it again after some time, it will re-download, ignoring the cache ### Expected behavior Re-running the code, which calls `datasets.load_dataset('manestay/borderlines', 'territories')`, should use the cached version ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.21-150500.55.7-default-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0 hi @mariosasko , Thank you for checking. I also tried running this again just now, and it seems like the `load_dataset()` caches properly (though I'll double check later). I think the issue might be in the caching of the function output for `territories.map(lambda row: {'Claimants': row['Claimants'].split(';')})`. My current run re-ran this, even though I have run this many times before, and as demonstrated by loading from cache, the loaded dataset is the same. I wonder if the issue stems from using CSV output. Do you recommend changing to Parquet, and if so, is there an easy way to take the already uploaded data on the Hub and reformat?
[ -0.2759879529476166, -0.12056708335876465, 0.04106386378407478, 0.37259286642074585, -0.04802778363227844, -0.04825824871659279, 0.48405343294143677, 0.1776006817817688, 0.509155809879303, -0.14426784217357635, -0.2950863540172577, 0.2489885538816452, 0.35557642579078674, -0.011246345937252045, -0.06220050901174545, 0.2072557955980301, 0.05311090126633644, 0.16853415966033936, -0.1610955446958542, -0.38928884267807007, -0.0763707235455513, 0.10613318532705307, 0.04852323234081268, -0.05066502094268799, -0.41403791308403015, 0.06807566434144974, -0.11644662171602249, 0.16358818113803864, 0.025573011487722397, -0.12237220257520676, 0.48288410902023315, 0.34512197971343994, 0.22950538992881775, 0.3627080023288727, -0.00012205525854369625, -0.22151142358779907, 0.03689997270703316, -0.13435277342796326, -0.16276684403419495, -0.11725176870822906, -0.10334233939647675, -0.015725912526249886, 0.10310935229063034, -0.08102671056985855, 0.13908594846725464, 0.36104702949523926, -0.1305450201034546, -0.01960758864879608, 0.23641659319400787, 0.08513665944337845, 0.11050479114055634, -0.013050501234829426, -0.32489660382270813, 0.005920111201703548, 0.24764564633369446, 0.0873887687921524, -0.18275220692157745, 0.2550962269306183, 0.032426998019218445, -0.15086489915847778, -0.35489681363105774, 0.2184293568134308, -0.16191351413726807, 0.37397682666778564, 0.3879123330116272, -0.011060508899390697, -0.1996387243270874, -0.16689370572566986, 0.22800344228744507, 0.21734902262687683, 0.35993027687072754, -0.3228374421596527, -0.018842054530978203, -0.42202794551849365, -0.18597306311130524, -0.061443060636520386, 0.07968902587890625, 0.12789227068424225, 0.01151653379201889, 0.310884565114975, -0.2042693942785263, -0.49589094519615173, 0.11906206607818604, -0.07366234064102173, -0.1390296220779419, -0.13019925355911255, -0.05296920984983444, 0.2774676978588104, 0.04050283506512642, 0.26639634370803833, 0.3514227867126465, -0.4912763833999634, -0.23233473300933838, 0.00459421006962657, -0.3790649473667145, 0.13450908660888672, 0.18769866228103638, 0.5131011605262756, 0.18740740418434143, 0.4891444444656372, 0.13974803686141968, 0.07828317582607269, -0.45462682843208313, 0.09960846602916718, 0.5483413338661194, 0.08442206680774689, 0.2063477635383606, 0.1778663843870163, 0.17292626202106476, 0.016897261142730713, -0.27641475200653076, -0.04173032194375992, -0.00016846763901412487, 0.28952839970588684, 0.3231078088283539, -0.3262825310230255, 0.11573734879493713, -0.29857534170150757, -0.1371888369321823, 0.02650124579668045, 0.15434080362319946, -0.11189638823270798, 0.1502474844455719, 0.1441342830657959, -0.13551001250743866, 0.4795847237110138, -0.27249032258987427, -0.04502680152654648, -0.2826615273952484, -0.16005609929561615, -0.19041845202445984, -0.0758533626794815, -0.35695138573646545, 0.38841554522514343, 0.23321695625782013, -0.47922924160957336, -0.03750348836183548, 0.18878601491451263, -0.03776579350233078, -0.410652756690979, -0.16460315883159637, -0.3745424449443817, 0.19179581105709076, 0.24588295817375183, -0.08963494747877121, 0.514164388179779, 0.2510323226451874, 0.24507062137126923, -0.22345775365829468, 0.2600981295108795, -0.5073912739753723, -0.06905701756477356, 0.31401339173316956, 0.008409971371293068, -0.25274431705474854, 0.003863215446472168, -0.21588057279586792, 0.0011357590556144714, 0.09912541508674622, -0.1838190257549286, 0.13877685368061066, -0.10768114030361176, -0.20678459107875824, -0.2609246075153351, 0.00266868993639946, 0.8008918762207031, -0.27333760261535645, -0.03222941607236862, -0.13431845605373383, -0.0888487845659256, 0.10546489804983139, 0.23108285665512085, -0.1859659105539322, 0.3372803330421448, -0.40165960788726807, 0.24534161388874054, 0.13655681908130646, -0.20075978338718414, -0.741081953048706, 0.27561700344085693, -0.1390770673751831, 0.1373782902956009, -0.35844185948371887, 0.4142925441265106, 0.22677648067474365, 0.09562814980745316, -0.13838790357112885, 0.19948069751262665, 0.17983520030975342, 0.09141882508993149, -0.20410791039466858, -0.2508421540260315, -0.03500383347272873, 0.12655745446681976, 0.1839403361082077, 0.26505935192108154, 0.2432035207748413, 0.2268098145723343, 0.14741116762161255, 0.18691757321357727, 0.11950338631868362, 0.05224001035094261, 0.2210284173488617, 0.30636924505233765, 0.11508499085903168, -0.12874317169189453, -0.38134580850601196, 0.2772403657436371, 0.14598028361797333, -0.3900719881057739, 0.16727618873119354, 0.01855197548866272, -0.3163888156414032, -0.10742820054292679, -0.2792639136314392, -0.06256325542926788, -0.03130369633436203, 0.2808683514595032, -0.11174851655960083, -0.01652911864221096, -0.1303335428237915, 0.7195931673049927, 0.015850825235247612, 0.0782339945435524, -0.19363324344158173, 0.5722058415412903, 0.21448953449726105, -0.050917454063892365, -0.10027523338794708, -0.1401253342628479, 0.3058643043041229, 0.011820181272923946, -0.10412892699241638, 0.380154013633728, 0.22314177453517914, 0.3141239881515503, -0.0014607533812522888, 0.05839086323976517, 0.19098420441150665, 0.08397819101810455, 0.20042729377746582, -0.13093116879463196, 0.30864056944847107, -0.27205297350883484, -0.06606394797563553, 0.023086264729499817, -0.10377824306488037, 0.11901307106018066, -0.1853736788034439, 0.08630112558603287, 0.012265248224139214, -0.08842481672763824, 0.09757037460803986, -0.029305964708328247, -0.05356796458363533, 0.10878133773803711, 0.26356765627861023, 0.16602183878421783, 0.1544143557548523, 0.2913937568664551, 0.49387359619140625, 0.031766925007104874, 0.2493184208869934, 0.1681382954120636, -0.3157067596912384, -0.1566297709941864, 0.1586717963218689, 0.2206103652715683, 0.5062969326972961, -0.119309201836586, 0.17846278846263885, 0.17158359289169312, -0.06410474330186844, -0.17489361763000488, 0.016391359269618988, 0.011789903044700623, 0.07238385826349258, 0.1471312940120697, 0.07003273069858551, -0.05681755021214485, -0.6494042873382568, 0.09489059448242188, 0.21479900181293488, 0.17430558800697327, -0.23318949341773987, 0.2012428492307663, -0.48350027203559875, 0.49725136160850525, -0.08832690119743347, -0.23715278506278992, -0.2643357813358307, -0.15478627383708954, -0.029844529926776886, 0.5899510979652405, 0.2818087637424469, -0.10796423256397247, 0.0317530483007431, 0.42363619804382324, -0.09940497577190399, -0.20483730733394623, 0.022396646440029144, -0.213261678814888, -0.3189343214035034, -0.11269581317901611, 0.09735265374183655, 0.03371436148881912, 0.19068001210689545, 0.0035861749202013016, 0.2849263548851013, -0.49697232246398926, 0.2140091359615326, 0.22016896307468414, -0.05193861573934555, -0.11850796639919281, -0.018600821495056152, 0.2893350124359131, -0.1011209711432457, 0.2117466926574707, 0.019927307963371277, -0.33693045377731323, 0.1474931240081787, -0.004282462410628796, -0.06119620054960251, 0.02754560299217701, -0.16843940317630768, -0.16682863235473633, 0.1443472057580948, -0.21353118121623993, 0.08770261704921722, -0.12434957921504974, 0.13462817668914795, -0.004616809077560902, 0.03331390768289566, -0.16331475973129272, -0.2105184942483902, -0.30411845445632935, -0.48997482657432556, -0.4323063790798187, 0.18679022789001465, 0.0460871085524559, -0.25855493545532227, 0.10129004716873169, 0.2050795704126358, 0.13952581584453583, 0.11225306987762451, -0.8882763981819153, -0.1482515186071396, -0.019162030890583992, 0.24952489137649536, 0.06467166543006897, 0.1798926591873169, 0.23039834201335907, -0.12990178167819977, 0.1787448227405548, -0.15423038601875305, -0.09852460026741028, 0.15039607882499695, 0.08616950362920761, 0.009622909128665924, -0.06719507277011871, -0.14224392175674438, -0.017363253980875015, 0.3080821931362152, 0.4094243049621582, -0.04860733076930046, 0.5365737676620483, 0.06516093015670776, 0.4728914201259613, -0.19902515411376953, -0.2666029632091522, -0.0006408039480447769, -0.16406020522117615, -0.1739351451396942, 0.42089152336120605, 0.07488775253295898, -0.07970306277275085, -0.2081085592508316, -0.18920977413654327, 0.053829774260520935, -0.4498424828052521, -0.10672791302204132, -0.004267856478691101, -0.09013771265745163, 0.24126273393630981, 0.28024476766586304, -0.26458415389060974, -0.16225799918174744, 0.20949143171310425, 0.012346029281616211, 0.3240286707878113, 0.1783313751220703, -0.22352929413318634, -0.05115620419383049, -0.2879185080528259, -0.0243854820728302, -0.08697722107172012, 0.1954256147146225, -0.046211306005716324, 0.1424870491027832, 0.21209688484668732, 0.06159369647502899, 0.581695556640625, -0.3456372916698456, 0.18023298680782318, -0.1608463078737259, 0.06557653844356537, -0.29533857107162476, -0.17979075014591217, 0.06893828511238098, 0.03075214847922325, -0.10587893426418304, 0.1435888111591339, -0.21701380610466003, 0.07452207803726196, -0.07202408462762833, 0.05937008187174797, -0.13862097263336182, -0.3592965602874756, -0.05566433072090149, -0.2360009253025055, -0.3787665367126465, -0.038322560489177704, -0.22290095686912537, -0.16231068968772888, -0.20871776342391968, -0.1801338642835617, 0.20816963911056519, 0.04661591351032257, 0.11273977905511856, 0.013207241892814636, 0.25699469447135925, 0.12739814817905426, 0.17939484119415283, 0.1485762596130371, -0.01109149307012558, -0.0003922712057828903, 0.8470823168754578, -0.10075551271438599, -0.03345493972301483, 0.13095340132713318, -0.017865661531686783, -0.22054803371429443, 0.33541640639305115, -0.09695383906364441, 0.0688190683722496, -0.12333150207996368, 0.004877761006355286, -0.39710530638694763, -0.014851700514554977, 0.04998169094324112, -0.06398004293441772, -0.1016160398721695, -0.4216974973678589, 0.5531934499740601, -0.04021218419075012, -0.17707476019859314, 0.6461355686187744, -0.2449299842119217, -0.015106063336133957, 0.04920355603098869, -0.0862579271197319, 0.8072254657745361, -0.040464021265506744, -0.03742512688040733, 0.1823144555091858, -0.1751185804605484, 0.4501873552799225, -0.44272518157958984, -0.009763581678271294, -0.34900960326194763, -0.18279720842838287, -0.15310029685497284, -0.11856772005558014, -0.057560257613658905, 0.17298920452594757, 0.05092909559607506, 0.36465218663215637, -0.17365795373916626, 0.6451426148414612, 0.037058133631944656, -0.009653206914663315, -0.278020977973938, -0.2493589222431183, 0.09556327015161514, 0.1327141672372818, -0.12298563122749329, 0.5211477279663086, -0.14647257328033447, 0.2713242173194885, 0.15180881321430206, -0.17782559990882874, -0.37043511867523193, 0.20738625526428223, -0.004484829492866993, 0.09869132936000824, -0.27187711000442505, 0.20632363855838776, -0.14727890491485596, -0.09926941990852356, 0.18849971890449524, -0.028291571885347366, -0.2456606924533844, 0.267212837934494, -0.058112867176532745, 0.16180482506752014, -0.22963769733905792, -0.03283385932445526, 0.10773148387670517, 0.110733263194561, -0.42637765407562256, -0.10178347676992416, 0.07701657712459564, -0.23184362053871155, -0.21123364567756653, 0.3208070993423462, 0.24287773668766022, -0.2501680254936218, -0.046656202524900436, 0.24035196006298065, 0.03459104523062706, -0.06462675333023071, 0.000306885689496994, 0.19233405590057373, 0.11636143177747726, 0.4061295688152313, -0.24811924993991852, -0.39052557945251465, -0.20194761455059052, 0.5375152826309204, 0.12038285285234451, -0.2534801959991455, 0.06265929341316223, 0.1183905303478241, -0.2653743624687195, -0.22497504949569702, -0.07269331067800522, 0.04114210233092308, -0.6442760825157166, 0.10304717719554901, -0.3368719816207886, 0.06299026310443878, 0.06640032678842545, -0.07117746770381927, -0.2012215405702591, 0.024049073457717896, -0.23717276751995087, -0.5379887819290161, 0.18221265077590942, -0.1476709544658661, -0.2141762524843216, 0.15401595830917358, 0.23977693915367126, -0.2081374078989029, 0.29443204402923584, 0.16881157457828522, -0.16952282190322876, 0.23033647239208221, 0.06357348710298538, 0.15073934197425842, -0.40455111861228943, 0.021502193063497543, 0.022364486008882523, -0.23967252671718597, -0.16890257596969604, 0.3418208956718445, -0.3093329966068268, -0.11471783369779587, -0.1474630981683731, 0.2698635458946228, 0.03605473414063454, 0.23150509595870972, -0.2959991991519928, -0.332905113697052, -0.03833623602986336, -0.40452465415000916, 0.49495619535446167, 0.3661425709724426, -0.13436441123485565, -0.09050208330154419, 0.5424568057060242, -0.12466251105070114, -0.22588568925857544, 0.19914884865283966, -0.018504850566387177, 0.2992187738418579, 0.042876943945884705, -0.011319104582071304, -0.002012401120737195, 0.01687198132276535, -0.3555929958820343, 0.25103703141212463, 0.48329514265060425, -0.010395105928182602, 0.24158242344856262, -0.19412149488925934, 0.1893775314092636, 0.058335237205028534, 0.12206786870956421, 0.428234726190567, -0.012528282590210438, -0.3222188651561737, -0.08595407009124756, 0.06510589271783829, -0.2071419507265091, -0.2962716221809387, 0.28328242897987366, 0.18615101277828217, -0.018452566117048264, 0.31396204233169556, 0.45168212056159973, -0.27732551097869873, 0.05677492171525955, -0.10467017441987991, 0.7503430843353271, -0.09009822458028793, 0.14702071249485016, 0.6180302500724792, -0.18731917440891266, 0.10348482429981232, 0.23101027309894562, 0.17095156013965607, -0.12808167934417725, 0.5245493650436401, 0.03808092325925827, 0.24605439603328705, 0.2732991576194763, 0.11761756241321564, 0.07381356507539749, -0.5858016014099121, -0.12751156091690063, 0.14189159870147705, 0.0063409581780433655, 0.04266136512160301, -0.10650603473186493, -0.008302904665470123, -0.17704816162586212, -0.02012946642935276, -0.31792575120925903, 0.14091554284095764, -0.05210094898939133, 0.15275980532169342, 0.0002873614430427551, -0.11075692623853683, -0.2628244459629059, 0.10094568133354187, -0.08305889368057251, -0.24678702652454376, 0.44229647517204285, 0.1523582935333252, -0.11501875519752502, -0.43286266922950745, -0.28884097933769226, 0.000947166234254837, 0.033187516033649445, -0.19688864052295685, 0.26359015703201294, -0.026509806513786316, 0.05283276364207268, 0.11215639114379883, 0.04990702122449875, 0.028673596680164337, 0.29444023966789246, 0.1748408079147339, 0.13281939923763275, 0.020958280190825462, 0.22749187052249908, -0.05765830725431442, 0.1492845118045807, -0.15941040217876434, 0.22618111968040466, 0.16623641550540924, 0.057560987770557404, -0.008590223267674446, 0.1366972178220749, -0.09428960084915161, 0.28026247024536133, -0.35014599561691284, 0.735213577747345, -0.0986076295375824, 0.1375577449798584, -0.1786738634109497, 0.03706903010606766, -0.17021314799785614, 0.008541076444089413, 0.6333984136581421, -0.2879665195941925, 0.1309090554714203, -0.3771941065788269, 0.004972310736775398, -0.29802584648132324, 0.4440078139305115, 0.22506466507911682, -0.010976903140544891, -0.16992275416851044, -0.14728398621082306, -0.6406459808349609, 0.3689071834087372, -0.29526960849761963, 0.2847389280796051, 0.2248624712228775, 0.13821932673454285, -0.08077806979417801, 0.26164841651916504, -0.025569364428520203, 0.027308393269777298, 0.057976171374320984, -0.023234009742736816, -0.2543940544128418, -0.12997078895568848, -0.1799740046262741, 0.13547900319099426, -0.023514943197369576, -0.4784790873527527, 0.5247835516929626, 0.06142830476164818, -0.1210237517952919, 0.1060425192117691, -0.20408956706523895, 0.11158117651939392, -0.2850147783756256, 0.5564208030700684, 0.09905802458524704, 0.04555561766028404, 0.25331684947013855, 0.015558375045657158, -0.6226340532302856, -0.27418753504753113, -0.10805100947618484, -0.14315178990364075, -0.12120285630226135, 0.19029711186885834, -0.14899668097496033, -0.12475399672985077, -0.2914438545703888, 0.08454989641904831, 0.3116547465324402, 0.33670544624328613, -0.07773204892873764, -0.2738924026489258, -0.2815033793449402, 0.35701218247413635, 0.02925931289792061, 0.3436930179595947, -0.05383855849504471, 0.23089656233787537, 0.023479104042053223, -0.2894750237464905, 0.5123056173324585, -0.12660053372383118, -0.4669921100139618, -0.09853071719408035, 0.48151761293411255, 0.07281005382537842, -0.3415836691856384, -0.6230279803276062, 0.04145006090402603, 0.2575680613517761, -0.07949609309434891, -0.1953565776348114, 0.11924169957637787, -0.22546781599521637, 0.20402692258358002, -0.08503621816635132, 0.20778150856494904, 0.1866963803768158, -0.20132708549499512, 0.4180053174495697, -0.2137487232685089 ]
https://github.com/huggingface/datasets/issues/6773
Dataset on Hub re-downloads every time?
This issue seems similar to https://github.com/huggingface/datasets/issues/6184 (`dill` serializes objects defined outside the `__main__` module by reference). You should be able to work around this limitation by defining the lambdas outside of `load_borderlines_hf` (as module variables) and then setting their `__module__` attribute's value to `None` to force serializing them by value, e.g., like this: ```python split_Claimants_row = lambda row: {'Claimants': row['Claimants'].split(';')} split_Claimants_row.__module__ = None ```
### Describe the bug Hi, I have a dataset on the hub [here](https://huggingface.co/datasets/manestay/borderlines). It has 1k+ downloads, which I sure is mostly just me and my colleagues working with it. It should have far fewer, since I'm using the same machine with a properly set up HF_HOME variable. However, whenever I run the below function `load_borderlines_hf`, it downloads the entire dataset from the hub and then does the other logic: https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80 Let me know what I'm doing wrong here, or if it's a bug with the `datasets` library itself. On the hub I have my data stored in CSVs, but several columns are lists, so that's why I have the code to map splitting on `;`. I looked into dataset loading scripts, but it seemed difficult to set up. I have verified that other `datasets` and `models` on my system are using the cache properly (e.g. I have a 13B parameter model and large datasets, but those are cached and don't redownload). __EDIT: __ as pointed out in the discussion below, it may be the `map()` calls that aren't being cached properly. Supposing the `load_dataset()` retrieve from the cache, then it should be the case that the `map()` calls also retrieve from the cached output. But the `map()` commands re-execute sometimes. ### Steps to reproduce the bug 1. Copy and paste the function from [here](https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80) (lines 80-100) 2. Run it in Python `load_borderlines_hf(None)` 3. It completes successfully, downloading from HF hub, then doing the mapping logic etc. 4. If you run it again after some time, it will re-download, ignoring the cache ### Expected behavior Re-running the code, which calls `datasets.load_dataset('manestay/borderlines', 'territories')`, should use the cached version ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.21-150500.55.7-default-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
64
Dataset on Hub re-downloads every time? ### Describe the bug Hi, I have a dataset on the hub [here](https://huggingface.co/datasets/manestay/borderlines). It has 1k+ downloads, which I sure is mostly just me and my colleagues working with it. It should have far fewer, since I'm using the same machine with a properly set up HF_HOME variable. However, whenever I run the below function `load_borderlines_hf`, it downloads the entire dataset from the hub and then does the other logic: https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80 Let me know what I'm doing wrong here, or if it's a bug with the `datasets` library itself. On the hub I have my data stored in CSVs, but several columns are lists, so that's why I have the code to map splitting on `;`. I looked into dataset loading scripts, but it seemed difficult to set up. I have verified that other `datasets` and `models` on my system are using the cache properly (e.g. I have a 13B parameter model and large datasets, but those are cached and don't redownload). __EDIT: __ as pointed out in the discussion below, it may be the `map()` calls that aren't being cached properly. Supposing the `load_dataset()` retrieve from the cache, then it should be the case that the `map()` calls also retrieve from the cached output. But the `map()` commands re-execute sometimes. ### Steps to reproduce the bug 1. Copy and paste the function from [here](https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80) (lines 80-100) 2. Run it in Python `load_borderlines_hf(None)` 3. It completes successfully, downloading from HF hub, then doing the mapping logic etc. 4. If you run it again after some time, it will re-download, ignoring the cache ### Expected behavior Re-running the code, which calls `datasets.load_dataset('manestay/borderlines', 'territories')`, should use the cached version ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.21-150500.55.7-default-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0 This issue seems similar to https://github.com/huggingface/datasets/issues/6184 (`dill` serializes objects defined outside the `__main__` module by reference). You should be able to work around this limitation by defining the lambdas outside of `load_borderlines_hf` (as module variables) and then setting their `__module__` attribute's value to `None` to force serializing them by value, e.g., like this: ```python split_Claimants_row = lambda row: {'Claimants': row['Claimants'].split(';')} split_Claimants_row.__module__ = None ```
[ -0.2759879529476166, -0.12056708335876465, 0.04106386378407478, 0.37259286642074585, -0.04802778363227844, -0.04825824871659279, 0.48405343294143677, 0.1776006817817688, 0.509155809879303, -0.14426784217357635, -0.2950863540172577, 0.2489885538816452, 0.35557642579078674, -0.011246345937252045, -0.06220050901174545, 0.2072557955980301, 0.05311090126633644, 0.16853415966033936, -0.1610955446958542, -0.38928884267807007, -0.0763707235455513, 0.10613318532705307, 0.04852323234081268, -0.05066502094268799, -0.41403791308403015, 0.06807566434144974, -0.11644662171602249, 0.16358818113803864, 0.025573011487722397, -0.12237220257520676, 0.48288410902023315, 0.34512197971343994, 0.22950538992881775, 0.3627080023288727, -0.00012205525854369625, -0.22151142358779907, 0.03689997270703316, -0.13435277342796326, -0.16276684403419495, -0.11725176870822906, -0.10334233939647675, -0.015725912526249886, 0.10310935229063034, -0.08102671056985855, 0.13908594846725464, 0.36104702949523926, -0.1305450201034546, -0.01960758864879608, 0.23641659319400787, 0.08513665944337845, 0.11050479114055634, -0.013050501234829426, -0.32489660382270813, 0.005920111201703548, 0.24764564633369446, 0.0873887687921524, -0.18275220692157745, 0.2550962269306183, 0.032426998019218445, -0.15086489915847778, -0.35489681363105774, 0.2184293568134308, -0.16191351413726807, 0.37397682666778564, 0.3879123330116272, -0.011060508899390697, -0.1996387243270874, -0.16689370572566986, 0.22800344228744507, 0.21734902262687683, 0.35993027687072754, -0.3228374421596527, -0.018842054530978203, -0.42202794551849365, -0.18597306311130524, -0.061443060636520386, 0.07968902587890625, 0.12789227068424225, 0.01151653379201889, 0.310884565114975, -0.2042693942785263, -0.49589094519615173, 0.11906206607818604, -0.07366234064102173, -0.1390296220779419, -0.13019925355911255, -0.05296920984983444, 0.2774676978588104, 0.04050283506512642, 0.26639634370803833, 0.3514227867126465, -0.4912763833999634, -0.23233473300933838, 0.00459421006962657, -0.3790649473667145, 0.13450908660888672, 0.18769866228103638, 0.5131011605262756, 0.18740740418434143, 0.4891444444656372, 0.13974803686141968, 0.07828317582607269, -0.45462682843208313, 0.09960846602916718, 0.5483413338661194, 0.08442206680774689, 0.2063477635383606, 0.1778663843870163, 0.17292626202106476, 0.016897261142730713, -0.27641475200653076, -0.04173032194375992, -0.00016846763901412487, 0.28952839970588684, 0.3231078088283539, -0.3262825310230255, 0.11573734879493713, -0.29857534170150757, -0.1371888369321823, 0.02650124579668045, 0.15434080362319946, -0.11189638823270798, 0.1502474844455719, 0.1441342830657959, -0.13551001250743866, 0.4795847237110138, -0.27249032258987427, -0.04502680152654648, -0.2826615273952484, -0.16005609929561615, -0.19041845202445984, -0.0758533626794815, -0.35695138573646545, 0.38841554522514343, 0.23321695625782013, -0.47922924160957336, -0.03750348836183548, 0.18878601491451263, -0.03776579350233078, -0.410652756690979, -0.16460315883159637, -0.3745424449443817, 0.19179581105709076, 0.24588295817375183, -0.08963494747877121, 0.514164388179779, 0.2510323226451874, 0.24507062137126923, -0.22345775365829468, 0.2600981295108795, -0.5073912739753723, -0.06905701756477356, 0.31401339173316956, 0.008409971371293068, -0.25274431705474854, 0.003863215446472168, -0.21588057279586792, 0.0011357590556144714, 0.09912541508674622, -0.1838190257549286, 0.13877685368061066, -0.10768114030361176, -0.20678459107875824, -0.2609246075153351, 0.00266868993639946, 0.8008918762207031, -0.27333760261535645, -0.03222941607236862, -0.13431845605373383, -0.0888487845659256, 0.10546489804983139, 0.23108285665512085, -0.1859659105539322, 0.3372803330421448, -0.40165960788726807, 0.24534161388874054, 0.13655681908130646, -0.20075978338718414, -0.741081953048706, 0.27561700344085693, -0.1390770673751831, 0.1373782902956009, -0.35844185948371887, 0.4142925441265106, 0.22677648067474365, 0.09562814980745316, -0.13838790357112885, 0.19948069751262665, 0.17983520030975342, 0.09141882508993149, -0.20410791039466858, -0.2508421540260315, -0.03500383347272873, 0.12655745446681976, 0.1839403361082077, 0.26505935192108154, 0.2432035207748413, 0.2268098145723343, 0.14741116762161255, 0.18691757321357727, 0.11950338631868362, 0.05224001035094261, 0.2210284173488617, 0.30636924505233765, 0.11508499085903168, -0.12874317169189453, -0.38134580850601196, 0.2772403657436371, 0.14598028361797333, -0.3900719881057739, 0.16727618873119354, 0.01855197548866272, -0.3163888156414032, -0.10742820054292679, -0.2792639136314392, -0.06256325542926788, -0.03130369633436203, 0.2808683514595032, -0.11174851655960083, -0.01652911864221096, -0.1303335428237915, 0.7195931673049927, 0.015850825235247612, 0.0782339945435524, -0.19363324344158173, 0.5722058415412903, 0.21448953449726105, -0.050917454063892365, -0.10027523338794708, -0.1401253342628479, 0.3058643043041229, 0.011820181272923946, -0.10412892699241638, 0.380154013633728, 0.22314177453517914, 0.3141239881515503, -0.0014607533812522888, 0.05839086323976517, 0.19098420441150665, 0.08397819101810455, 0.20042729377746582, -0.13093116879463196, 0.30864056944847107, -0.27205297350883484, -0.06606394797563553, 0.023086264729499817, -0.10377824306488037, 0.11901307106018066, -0.1853736788034439, 0.08630112558603287, 0.012265248224139214, -0.08842481672763824, 0.09757037460803986, -0.029305964708328247, -0.05356796458363533, 0.10878133773803711, 0.26356765627861023, 0.16602183878421783, 0.1544143557548523, 0.2913937568664551, 0.49387359619140625, 0.031766925007104874, 0.2493184208869934, 0.1681382954120636, -0.3157067596912384, -0.1566297709941864, 0.1586717963218689, 0.2206103652715683, 0.5062969326972961, -0.119309201836586, 0.17846278846263885, 0.17158359289169312, -0.06410474330186844, -0.17489361763000488, 0.016391359269618988, 0.011789903044700623, 0.07238385826349258, 0.1471312940120697, 0.07003273069858551, -0.05681755021214485, -0.6494042873382568, 0.09489059448242188, 0.21479900181293488, 0.17430558800697327, -0.23318949341773987, 0.2012428492307663, -0.48350027203559875, 0.49725136160850525, -0.08832690119743347, -0.23715278506278992, -0.2643357813358307, -0.15478627383708954, -0.029844529926776886, 0.5899510979652405, 0.2818087637424469, -0.10796423256397247, 0.0317530483007431, 0.42363619804382324, -0.09940497577190399, -0.20483730733394623, 0.022396646440029144, -0.213261678814888, -0.3189343214035034, -0.11269581317901611, 0.09735265374183655, 0.03371436148881912, 0.19068001210689545, 0.0035861749202013016, 0.2849263548851013, -0.49697232246398926, 0.2140091359615326, 0.22016896307468414, -0.05193861573934555, -0.11850796639919281, -0.018600821495056152, 0.2893350124359131, -0.1011209711432457, 0.2117466926574707, 0.019927307963371277, -0.33693045377731323, 0.1474931240081787, -0.004282462410628796, -0.06119620054960251, 0.02754560299217701, -0.16843940317630768, -0.16682863235473633, 0.1443472057580948, -0.21353118121623993, 0.08770261704921722, -0.12434957921504974, 0.13462817668914795, -0.004616809077560902, 0.03331390768289566, -0.16331475973129272, -0.2105184942483902, -0.30411845445632935, -0.48997482657432556, -0.4323063790798187, 0.18679022789001465, 0.0460871085524559, -0.25855493545532227, 0.10129004716873169, 0.2050795704126358, 0.13952581584453583, 0.11225306987762451, -0.8882763981819153, -0.1482515186071396, -0.019162030890583992, 0.24952489137649536, 0.06467166543006897, 0.1798926591873169, 0.23039834201335907, -0.12990178167819977, 0.1787448227405548, -0.15423038601875305, -0.09852460026741028, 0.15039607882499695, 0.08616950362920761, 0.009622909128665924, -0.06719507277011871, -0.14224392175674438, -0.017363253980875015, 0.3080821931362152, 0.4094243049621582, -0.04860733076930046, 0.5365737676620483, 0.06516093015670776, 0.4728914201259613, -0.19902515411376953, -0.2666029632091522, -0.0006408039480447769, -0.16406020522117615, -0.1739351451396942, 0.42089152336120605, 0.07488775253295898, -0.07970306277275085, -0.2081085592508316, -0.18920977413654327, 0.053829774260520935, -0.4498424828052521, -0.10672791302204132, -0.004267856478691101, -0.09013771265745163, 0.24126273393630981, 0.28024476766586304, -0.26458415389060974, -0.16225799918174744, 0.20949143171310425, 0.012346029281616211, 0.3240286707878113, 0.1783313751220703, -0.22352929413318634, -0.05115620419383049, -0.2879185080528259, -0.0243854820728302, -0.08697722107172012, 0.1954256147146225, -0.046211306005716324, 0.1424870491027832, 0.21209688484668732, 0.06159369647502899, 0.581695556640625, -0.3456372916698456, 0.18023298680782318, -0.1608463078737259, 0.06557653844356537, -0.29533857107162476, -0.17979075014591217, 0.06893828511238098, 0.03075214847922325, -0.10587893426418304, 0.1435888111591339, -0.21701380610466003, 0.07452207803726196, -0.07202408462762833, 0.05937008187174797, -0.13862097263336182, -0.3592965602874756, -0.05566433072090149, -0.2360009253025055, -0.3787665367126465, -0.038322560489177704, -0.22290095686912537, -0.16231068968772888, -0.20871776342391968, -0.1801338642835617, 0.20816963911056519, 0.04661591351032257, 0.11273977905511856, 0.013207241892814636, 0.25699469447135925, 0.12739814817905426, 0.17939484119415283, 0.1485762596130371, -0.01109149307012558, -0.0003922712057828903, 0.8470823168754578, -0.10075551271438599, -0.03345493972301483, 0.13095340132713318, -0.017865661531686783, -0.22054803371429443, 0.33541640639305115, -0.09695383906364441, 0.0688190683722496, -0.12333150207996368, 0.004877761006355286, -0.39710530638694763, -0.014851700514554977, 0.04998169094324112, -0.06398004293441772, -0.1016160398721695, -0.4216974973678589, 0.5531934499740601, -0.04021218419075012, -0.17707476019859314, 0.6461355686187744, -0.2449299842119217, -0.015106063336133957, 0.04920355603098869, -0.0862579271197319, 0.8072254657745361, -0.040464021265506744, -0.03742512688040733, 0.1823144555091858, -0.1751185804605484, 0.4501873552799225, -0.44272518157958984, -0.009763581678271294, -0.34900960326194763, -0.18279720842838287, -0.15310029685497284, -0.11856772005558014, -0.057560257613658905, 0.17298920452594757, 0.05092909559607506, 0.36465218663215637, -0.17365795373916626, 0.6451426148414612, 0.037058133631944656, -0.009653206914663315, -0.278020977973938, -0.2493589222431183, 0.09556327015161514, 0.1327141672372818, -0.12298563122749329, 0.5211477279663086, -0.14647257328033447, 0.2713242173194885, 0.15180881321430206, -0.17782559990882874, -0.37043511867523193, 0.20738625526428223, -0.004484829492866993, 0.09869132936000824, -0.27187711000442505, 0.20632363855838776, -0.14727890491485596, -0.09926941990852356, 0.18849971890449524, -0.028291571885347366, -0.2456606924533844, 0.267212837934494, -0.058112867176532745, 0.16180482506752014, -0.22963769733905792, -0.03283385932445526, 0.10773148387670517, 0.110733263194561, -0.42637765407562256, -0.10178347676992416, 0.07701657712459564, -0.23184362053871155, -0.21123364567756653, 0.3208070993423462, 0.24287773668766022, -0.2501680254936218, -0.046656202524900436, 0.24035196006298065, 0.03459104523062706, -0.06462675333023071, 0.000306885689496994, 0.19233405590057373, 0.11636143177747726, 0.4061295688152313, -0.24811924993991852, -0.39052557945251465, -0.20194761455059052, 0.5375152826309204, 0.12038285285234451, -0.2534801959991455, 0.06265929341316223, 0.1183905303478241, -0.2653743624687195, -0.22497504949569702, -0.07269331067800522, 0.04114210233092308, -0.6442760825157166, 0.10304717719554901, -0.3368719816207886, 0.06299026310443878, 0.06640032678842545, -0.07117746770381927, -0.2012215405702591, 0.024049073457717896, -0.23717276751995087, -0.5379887819290161, 0.18221265077590942, -0.1476709544658661, -0.2141762524843216, 0.15401595830917358, 0.23977693915367126, -0.2081374078989029, 0.29443204402923584, 0.16881157457828522, -0.16952282190322876, 0.23033647239208221, 0.06357348710298538, 0.15073934197425842, -0.40455111861228943, 0.021502193063497543, 0.022364486008882523, -0.23967252671718597, -0.16890257596969604, 0.3418208956718445, -0.3093329966068268, -0.11471783369779587, -0.1474630981683731, 0.2698635458946228, 0.03605473414063454, 0.23150509595870972, -0.2959991991519928, -0.332905113697052, -0.03833623602986336, -0.40452465415000916, 0.49495619535446167, 0.3661425709724426, -0.13436441123485565, -0.09050208330154419, 0.5424568057060242, -0.12466251105070114, -0.22588568925857544, 0.19914884865283966, -0.018504850566387177, 0.2992187738418579, 0.042876943945884705, -0.011319104582071304, -0.002012401120737195, 0.01687198132276535, -0.3555929958820343, 0.25103703141212463, 0.48329514265060425, -0.010395105928182602, 0.24158242344856262, -0.19412149488925934, 0.1893775314092636, 0.058335237205028534, 0.12206786870956421, 0.428234726190567, -0.012528282590210438, -0.3222188651561737, -0.08595407009124756, 0.06510589271783829, -0.2071419507265091, -0.2962716221809387, 0.28328242897987366, 0.18615101277828217, -0.018452566117048264, 0.31396204233169556, 0.45168212056159973, -0.27732551097869873, 0.05677492171525955, -0.10467017441987991, 0.7503430843353271, -0.09009822458028793, 0.14702071249485016, 0.6180302500724792, -0.18731917440891266, 0.10348482429981232, 0.23101027309894562, 0.17095156013965607, -0.12808167934417725, 0.5245493650436401, 0.03808092325925827, 0.24605439603328705, 0.2732991576194763, 0.11761756241321564, 0.07381356507539749, -0.5858016014099121, -0.12751156091690063, 0.14189159870147705, 0.0063409581780433655, 0.04266136512160301, -0.10650603473186493, -0.008302904665470123, -0.17704816162586212, -0.02012946642935276, -0.31792575120925903, 0.14091554284095764, -0.05210094898939133, 0.15275980532169342, 0.0002873614430427551, -0.11075692623853683, -0.2628244459629059, 0.10094568133354187, -0.08305889368057251, -0.24678702652454376, 0.44229647517204285, 0.1523582935333252, -0.11501875519752502, -0.43286266922950745, -0.28884097933769226, 0.000947166234254837, 0.033187516033649445, -0.19688864052295685, 0.26359015703201294, -0.026509806513786316, 0.05283276364207268, 0.11215639114379883, 0.04990702122449875, 0.028673596680164337, 0.29444023966789246, 0.1748408079147339, 0.13281939923763275, 0.020958280190825462, 0.22749187052249908, -0.05765830725431442, 0.1492845118045807, -0.15941040217876434, 0.22618111968040466, 0.16623641550540924, 0.057560987770557404, -0.008590223267674446, 0.1366972178220749, -0.09428960084915161, 0.28026247024536133, -0.35014599561691284, 0.735213577747345, -0.0986076295375824, 0.1375577449798584, -0.1786738634109497, 0.03706903010606766, -0.17021314799785614, 0.008541076444089413, 0.6333984136581421, -0.2879665195941925, 0.1309090554714203, -0.3771941065788269, 0.004972310736775398, -0.29802584648132324, 0.4440078139305115, 0.22506466507911682, -0.010976903140544891, -0.16992275416851044, -0.14728398621082306, -0.6406459808349609, 0.3689071834087372, -0.29526960849761963, 0.2847389280796051, 0.2248624712228775, 0.13821932673454285, -0.08077806979417801, 0.26164841651916504, -0.025569364428520203, 0.027308393269777298, 0.057976171374320984, -0.023234009742736816, -0.2543940544128418, -0.12997078895568848, -0.1799740046262741, 0.13547900319099426, -0.023514943197369576, -0.4784790873527527, 0.5247835516929626, 0.06142830476164818, -0.1210237517952919, 0.1060425192117691, -0.20408956706523895, 0.11158117651939392, -0.2850147783756256, 0.5564208030700684, 0.09905802458524704, 0.04555561766028404, 0.25331684947013855, 0.015558375045657158, -0.6226340532302856, -0.27418753504753113, -0.10805100947618484, -0.14315178990364075, -0.12120285630226135, 0.19029711186885834, -0.14899668097496033, -0.12475399672985077, -0.2914438545703888, 0.08454989641904831, 0.3116547465324402, 0.33670544624328613, -0.07773204892873764, -0.2738924026489258, -0.2815033793449402, 0.35701218247413635, 0.02925931289792061, 0.3436930179595947, -0.05383855849504471, 0.23089656233787537, 0.023479104042053223, -0.2894750237464905, 0.5123056173324585, -0.12660053372383118, -0.4669921100139618, -0.09853071719408035, 0.48151761293411255, 0.07281005382537842, -0.3415836691856384, -0.6230279803276062, 0.04145006090402603, 0.2575680613517761, -0.07949609309434891, -0.1953565776348114, 0.11924169957637787, -0.22546781599521637, 0.20402692258358002, -0.08503621816635132, 0.20778150856494904, 0.1866963803768158, -0.20132708549499512, 0.4180053174495697, -0.2137487232685089 ]
https://github.com/huggingface/datasets/issues/6773
Dataset on Hub re-downloads every time?
Thank you, I'll give this a try. Your fix makes sense to me, so this issue can be closed for now. Unrelated comment -- for "Downloads last month" on the hub page, I'm assuming for this project that each downloaded CSV is 1 download? The dataset consists of 51 CSVs, so I'm trying to see why it's incrementing so quickly (1125 2 days ago, 1246 right now).
### Describe the bug Hi, I have a dataset on the hub [here](https://huggingface.co/datasets/manestay/borderlines). It has 1k+ downloads, which I sure is mostly just me and my colleagues working with it. It should have far fewer, since I'm using the same machine with a properly set up HF_HOME variable. However, whenever I run the below function `load_borderlines_hf`, it downloads the entire dataset from the hub and then does the other logic: https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80 Let me know what I'm doing wrong here, or if it's a bug with the `datasets` library itself. On the hub I have my data stored in CSVs, but several columns are lists, so that's why I have the code to map splitting on `;`. I looked into dataset loading scripts, but it seemed difficult to set up. I have verified that other `datasets` and `models` on my system are using the cache properly (e.g. I have a 13B parameter model and large datasets, but those are cached and don't redownload). __EDIT: __ as pointed out in the discussion below, it may be the `map()` calls that aren't being cached properly. Supposing the `load_dataset()` retrieve from the cache, then it should be the case that the `map()` calls also retrieve from the cached output. But the `map()` commands re-execute sometimes. ### Steps to reproduce the bug 1. Copy and paste the function from [here](https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80) (lines 80-100) 2. Run it in Python `load_borderlines_hf(None)` 3. It completes successfully, downloading from HF hub, then doing the mapping logic etc. 4. If you run it again after some time, it will re-download, ignoring the cache ### Expected behavior Re-running the code, which calls `datasets.load_dataset('manestay/borderlines', 'territories')`, should use the cached version ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.21-150500.55.7-default-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
67
Dataset on Hub re-downloads every time? ### Describe the bug Hi, I have a dataset on the hub [here](https://huggingface.co/datasets/manestay/borderlines). It has 1k+ downloads, which I sure is mostly just me and my colleagues working with it. It should have far fewer, since I'm using the same machine with a properly set up HF_HOME variable. However, whenever I run the below function `load_borderlines_hf`, it downloads the entire dataset from the hub and then does the other logic: https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80 Let me know what I'm doing wrong here, or if it's a bug with the `datasets` library itself. On the hub I have my data stored in CSVs, but several columns are lists, so that's why I have the code to map splitting on `;`. I looked into dataset loading scripts, but it seemed difficult to set up. I have verified that other `datasets` and `models` on my system are using the cache properly (e.g. I have a 13B parameter model and large datasets, but those are cached and don't redownload). __EDIT: __ as pointed out in the discussion below, it may be the `map()` calls that aren't being cached properly. Supposing the `load_dataset()` retrieve from the cache, then it should be the case that the `map()` calls also retrieve from the cached output. But the `map()` commands re-execute sometimes. ### Steps to reproduce the bug 1. Copy and paste the function from [here](https://github.com/manestay/borderlines/blob/4e161f444661e2ebfe643f3fe149d9258d63a57d/run_gpt/lib.py#L80) (lines 80-100) 2. Run it in Python `load_borderlines_hf(None)` 3. It completes successfully, downloading from HF hub, then doing the mapping logic etc. 4. If you run it again after some time, it will re-download, ignoring the cache ### Expected behavior Re-running the code, which calls `datasets.load_dataset('manestay/borderlines', 'territories')`, should use the cached version ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.21-150500.55.7-default-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0 Thank you, I'll give this a try. Your fix makes sense to me, so this issue can be closed for now. Unrelated comment -- for "Downloads last month" on the hub page, I'm assuming for this project that each downloaded CSV is 1 download? The dataset consists of 51 CSVs, so I'm trying to see why it's incrementing so quickly (1125 2 days ago, 1246 right now).
[ -0.2759879529476166, -0.12056708335876465, 0.04106386378407478, 0.37259286642074585, -0.04802778363227844, -0.04825824871659279, 0.48405343294143677, 0.1776006817817688, 0.509155809879303, -0.14426784217357635, -0.2950863540172577, 0.2489885538816452, 0.35557642579078674, -0.011246345937252045, -0.06220050901174545, 0.2072557955980301, 0.05311090126633644, 0.16853415966033936, -0.1610955446958542, -0.38928884267807007, -0.0763707235455513, 0.10613318532705307, 0.04852323234081268, -0.05066502094268799, -0.41403791308403015, 0.06807566434144974, -0.11644662171602249, 0.16358818113803864, 0.025573011487722397, -0.12237220257520676, 0.48288410902023315, 0.34512197971343994, 0.22950538992881775, 0.3627080023288727, -0.00012205525854369625, -0.22151142358779907, 0.03689997270703316, -0.13435277342796326, -0.16276684403419495, -0.11725176870822906, -0.10334233939647675, -0.015725912526249886, 0.10310935229063034, -0.08102671056985855, 0.13908594846725464, 0.36104702949523926, -0.1305450201034546, -0.01960758864879608, 0.23641659319400787, 0.08513665944337845, 0.11050479114055634, -0.013050501234829426, -0.32489660382270813, 0.005920111201703548, 0.24764564633369446, 0.0873887687921524, -0.18275220692157745, 0.2550962269306183, 0.032426998019218445, -0.15086489915847778, -0.35489681363105774, 0.2184293568134308, -0.16191351413726807, 0.37397682666778564, 0.3879123330116272, -0.011060508899390697, -0.1996387243270874, -0.16689370572566986, 0.22800344228744507, 0.21734902262687683, 0.35993027687072754, -0.3228374421596527, -0.018842054530978203, -0.42202794551849365, -0.18597306311130524, -0.061443060636520386, 0.07968902587890625, 0.12789227068424225, 0.01151653379201889, 0.310884565114975, -0.2042693942785263, -0.49589094519615173, 0.11906206607818604, -0.07366234064102173, -0.1390296220779419, -0.13019925355911255, -0.05296920984983444, 0.2774676978588104, 0.04050283506512642, 0.26639634370803833, 0.3514227867126465, -0.4912763833999634, -0.23233473300933838, 0.00459421006962657, -0.3790649473667145, 0.13450908660888672, 0.18769866228103638, 0.5131011605262756, 0.18740740418434143, 0.4891444444656372, 0.13974803686141968, 0.07828317582607269, -0.45462682843208313, 0.09960846602916718, 0.5483413338661194, 0.08442206680774689, 0.2063477635383606, 0.1778663843870163, 0.17292626202106476, 0.016897261142730713, -0.27641475200653076, -0.04173032194375992, -0.00016846763901412487, 0.28952839970588684, 0.3231078088283539, -0.3262825310230255, 0.11573734879493713, -0.29857534170150757, -0.1371888369321823, 0.02650124579668045, 0.15434080362319946, -0.11189638823270798, 0.1502474844455719, 0.1441342830657959, -0.13551001250743866, 0.4795847237110138, -0.27249032258987427, -0.04502680152654648, -0.2826615273952484, -0.16005609929561615, -0.19041845202445984, -0.0758533626794815, -0.35695138573646545, 0.38841554522514343, 0.23321695625782013, -0.47922924160957336, -0.03750348836183548, 0.18878601491451263, -0.03776579350233078, -0.410652756690979, -0.16460315883159637, -0.3745424449443817, 0.19179581105709076, 0.24588295817375183, -0.08963494747877121, 0.514164388179779, 0.2510323226451874, 0.24507062137126923, -0.22345775365829468, 0.2600981295108795, -0.5073912739753723, -0.06905701756477356, 0.31401339173316956, 0.008409971371293068, -0.25274431705474854, 0.003863215446472168, -0.21588057279586792, 0.0011357590556144714, 0.09912541508674622, -0.1838190257549286, 0.13877685368061066, -0.10768114030361176, -0.20678459107875824, -0.2609246075153351, 0.00266868993639946, 0.8008918762207031, -0.27333760261535645, -0.03222941607236862, -0.13431845605373383, -0.0888487845659256, 0.10546489804983139, 0.23108285665512085, -0.1859659105539322, 0.3372803330421448, -0.40165960788726807, 0.24534161388874054, 0.13655681908130646, -0.20075978338718414, -0.741081953048706, 0.27561700344085693, -0.1390770673751831, 0.1373782902956009, -0.35844185948371887, 0.4142925441265106, 0.22677648067474365, 0.09562814980745316, -0.13838790357112885, 0.19948069751262665, 0.17983520030975342, 0.09141882508993149, -0.20410791039466858, -0.2508421540260315, -0.03500383347272873, 0.12655745446681976, 0.1839403361082077, 0.26505935192108154, 0.2432035207748413, 0.2268098145723343, 0.14741116762161255, 0.18691757321357727, 0.11950338631868362, 0.05224001035094261, 0.2210284173488617, 0.30636924505233765, 0.11508499085903168, -0.12874317169189453, -0.38134580850601196, 0.2772403657436371, 0.14598028361797333, -0.3900719881057739, 0.16727618873119354, 0.01855197548866272, -0.3163888156414032, -0.10742820054292679, -0.2792639136314392, -0.06256325542926788, -0.03130369633436203, 0.2808683514595032, -0.11174851655960083, -0.01652911864221096, -0.1303335428237915, 0.7195931673049927, 0.015850825235247612, 0.0782339945435524, -0.19363324344158173, 0.5722058415412903, 0.21448953449726105, -0.050917454063892365, -0.10027523338794708, -0.1401253342628479, 0.3058643043041229, 0.011820181272923946, -0.10412892699241638, 0.380154013633728, 0.22314177453517914, 0.3141239881515503, -0.0014607533812522888, 0.05839086323976517, 0.19098420441150665, 0.08397819101810455, 0.20042729377746582, -0.13093116879463196, 0.30864056944847107, -0.27205297350883484, -0.06606394797563553, 0.023086264729499817, -0.10377824306488037, 0.11901307106018066, -0.1853736788034439, 0.08630112558603287, 0.012265248224139214, -0.08842481672763824, 0.09757037460803986, -0.029305964708328247, -0.05356796458363533, 0.10878133773803711, 0.26356765627861023, 0.16602183878421783, 0.1544143557548523, 0.2913937568664551, 0.49387359619140625, 0.031766925007104874, 0.2493184208869934, 0.1681382954120636, -0.3157067596912384, -0.1566297709941864, 0.1586717963218689, 0.2206103652715683, 0.5062969326972961, -0.119309201836586, 0.17846278846263885, 0.17158359289169312, -0.06410474330186844, -0.17489361763000488, 0.016391359269618988, 0.011789903044700623, 0.07238385826349258, 0.1471312940120697, 0.07003273069858551, -0.05681755021214485, -0.6494042873382568, 0.09489059448242188, 0.21479900181293488, 0.17430558800697327, -0.23318949341773987, 0.2012428492307663, -0.48350027203559875, 0.49725136160850525, -0.08832690119743347, -0.23715278506278992, -0.2643357813358307, -0.15478627383708954, -0.029844529926776886, 0.5899510979652405, 0.2818087637424469, -0.10796423256397247, 0.0317530483007431, 0.42363619804382324, -0.09940497577190399, -0.20483730733394623, 0.022396646440029144, -0.213261678814888, -0.3189343214035034, -0.11269581317901611, 0.09735265374183655, 0.03371436148881912, 0.19068001210689545, 0.0035861749202013016, 0.2849263548851013, -0.49697232246398926, 0.2140091359615326, 0.22016896307468414, -0.05193861573934555, -0.11850796639919281, -0.018600821495056152, 0.2893350124359131, -0.1011209711432457, 0.2117466926574707, 0.019927307963371277, -0.33693045377731323, 0.1474931240081787, -0.004282462410628796, -0.06119620054960251, 0.02754560299217701, -0.16843940317630768, -0.16682863235473633, 0.1443472057580948, -0.21353118121623993, 0.08770261704921722, -0.12434957921504974, 0.13462817668914795, -0.004616809077560902, 0.03331390768289566, -0.16331475973129272, -0.2105184942483902, -0.30411845445632935, -0.48997482657432556, -0.4323063790798187, 0.18679022789001465, 0.0460871085524559, -0.25855493545532227, 0.10129004716873169, 0.2050795704126358, 0.13952581584453583, 0.11225306987762451, -0.8882763981819153, -0.1482515186071396, -0.019162030890583992, 0.24952489137649536, 0.06467166543006897, 0.1798926591873169, 0.23039834201335907, -0.12990178167819977, 0.1787448227405548, -0.15423038601875305, -0.09852460026741028, 0.15039607882499695, 0.08616950362920761, 0.009622909128665924, -0.06719507277011871, -0.14224392175674438, -0.017363253980875015, 0.3080821931362152, 0.4094243049621582, -0.04860733076930046, 0.5365737676620483, 0.06516093015670776, 0.4728914201259613, -0.19902515411376953, -0.2666029632091522, -0.0006408039480447769, -0.16406020522117615, -0.1739351451396942, 0.42089152336120605, 0.07488775253295898, -0.07970306277275085, -0.2081085592508316, -0.18920977413654327, 0.053829774260520935, -0.4498424828052521, -0.10672791302204132, -0.004267856478691101, -0.09013771265745163, 0.24126273393630981, 0.28024476766586304, -0.26458415389060974, -0.16225799918174744, 0.20949143171310425, 0.012346029281616211, 0.3240286707878113, 0.1783313751220703, -0.22352929413318634, -0.05115620419383049, -0.2879185080528259, -0.0243854820728302, -0.08697722107172012, 0.1954256147146225, -0.046211306005716324, 0.1424870491027832, 0.21209688484668732, 0.06159369647502899, 0.581695556640625, -0.3456372916698456, 0.18023298680782318, -0.1608463078737259, 0.06557653844356537, -0.29533857107162476, -0.17979075014591217, 0.06893828511238098, 0.03075214847922325, -0.10587893426418304, 0.1435888111591339, -0.21701380610466003, 0.07452207803726196, -0.07202408462762833, 0.05937008187174797, -0.13862097263336182, -0.3592965602874756, -0.05566433072090149, -0.2360009253025055, -0.3787665367126465, -0.038322560489177704, -0.22290095686912537, -0.16231068968772888, -0.20871776342391968, -0.1801338642835617, 0.20816963911056519, 0.04661591351032257, 0.11273977905511856, 0.013207241892814636, 0.25699469447135925, 0.12739814817905426, 0.17939484119415283, 0.1485762596130371, -0.01109149307012558, -0.0003922712057828903, 0.8470823168754578, -0.10075551271438599, -0.03345493972301483, 0.13095340132713318, -0.017865661531686783, -0.22054803371429443, 0.33541640639305115, -0.09695383906364441, 0.0688190683722496, -0.12333150207996368, 0.004877761006355286, -0.39710530638694763, -0.014851700514554977, 0.04998169094324112, -0.06398004293441772, -0.1016160398721695, -0.4216974973678589, 0.5531934499740601, -0.04021218419075012, -0.17707476019859314, 0.6461355686187744, -0.2449299842119217, -0.015106063336133957, 0.04920355603098869, -0.0862579271197319, 0.8072254657745361, -0.040464021265506744, -0.03742512688040733, 0.1823144555091858, -0.1751185804605484, 0.4501873552799225, -0.44272518157958984, -0.009763581678271294, -0.34900960326194763, -0.18279720842838287, -0.15310029685497284, -0.11856772005558014, -0.057560257613658905, 0.17298920452594757, 0.05092909559607506, 0.36465218663215637, -0.17365795373916626, 0.6451426148414612, 0.037058133631944656, -0.009653206914663315, -0.278020977973938, -0.2493589222431183, 0.09556327015161514, 0.1327141672372818, -0.12298563122749329, 0.5211477279663086, -0.14647257328033447, 0.2713242173194885, 0.15180881321430206, -0.17782559990882874, -0.37043511867523193, 0.20738625526428223, -0.004484829492866993, 0.09869132936000824, -0.27187711000442505, 0.20632363855838776, -0.14727890491485596, -0.09926941990852356, 0.18849971890449524, -0.028291571885347366, -0.2456606924533844, 0.267212837934494, -0.058112867176532745, 0.16180482506752014, -0.22963769733905792, -0.03283385932445526, 0.10773148387670517, 0.110733263194561, -0.42637765407562256, -0.10178347676992416, 0.07701657712459564, -0.23184362053871155, -0.21123364567756653, 0.3208070993423462, 0.24287773668766022, -0.2501680254936218, -0.046656202524900436, 0.24035196006298065, 0.03459104523062706, -0.06462675333023071, 0.000306885689496994, 0.19233405590057373, 0.11636143177747726, 0.4061295688152313, -0.24811924993991852, -0.39052557945251465, -0.20194761455059052, 0.5375152826309204, 0.12038285285234451, -0.2534801959991455, 0.06265929341316223, 0.1183905303478241, -0.2653743624687195, -0.22497504949569702, -0.07269331067800522, 0.04114210233092308, -0.6442760825157166, 0.10304717719554901, -0.3368719816207886, 0.06299026310443878, 0.06640032678842545, -0.07117746770381927, -0.2012215405702591, 0.024049073457717896, -0.23717276751995087, -0.5379887819290161, 0.18221265077590942, -0.1476709544658661, -0.2141762524843216, 0.15401595830917358, 0.23977693915367126, -0.2081374078989029, 0.29443204402923584, 0.16881157457828522, -0.16952282190322876, 0.23033647239208221, 0.06357348710298538, 0.15073934197425842, -0.40455111861228943, 0.021502193063497543, 0.022364486008882523, -0.23967252671718597, -0.16890257596969604, 0.3418208956718445, -0.3093329966068268, -0.11471783369779587, -0.1474630981683731, 0.2698635458946228, 0.03605473414063454, 0.23150509595870972, -0.2959991991519928, -0.332905113697052, -0.03833623602986336, -0.40452465415000916, 0.49495619535446167, 0.3661425709724426, -0.13436441123485565, -0.09050208330154419, 0.5424568057060242, -0.12466251105070114, -0.22588568925857544, 0.19914884865283966, -0.018504850566387177, 0.2992187738418579, 0.042876943945884705, -0.011319104582071304, -0.002012401120737195, 0.01687198132276535, -0.3555929958820343, 0.25103703141212463, 0.48329514265060425, -0.010395105928182602, 0.24158242344856262, -0.19412149488925934, 0.1893775314092636, 0.058335237205028534, 0.12206786870956421, 0.428234726190567, -0.012528282590210438, -0.3222188651561737, -0.08595407009124756, 0.06510589271783829, -0.2071419507265091, -0.2962716221809387, 0.28328242897987366, 0.18615101277828217, -0.018452566117048264, 0.31396204233169556, 0.45168212056159973, -0.27732551097869873, 0.05677492171525955, -0.10467017441987991, 0.7503430843353271, -0.09009822458028793, 0.14702071249485016, 0.6180302500724792, -0.18731917440891266, 0.10348482429981232, 0.23101027309894562, 0.17095156013965607, -0.12808167934417725, 0.5245493650436401, 0.03808092325925827, 0.24605439603328705, 0.2732991576194763, 0.11761756241321564, 0.07381356507539749, -0.5858016014099121, -0.12751156091690063, 0.14189159870147705, 0.0063409581780433655, 0.04266136512160301, -0.10650603473186493, -0.008302904665470123, -0.17704816162586212, -0.02012946642935276, -0.31792575120925903, 0.14091554284095764, -0.05210094898939133, 0.15275980532169342, 0.0002873614430427551, -0.11075692623853683, -0.2628244459629059, 0.10094568133354187, -0.08305889368057251, -0.24678702652454376, 0.44229647517204285, 0.1523582935333252, -0.11501875519752502, -0.43286266922950745, -0.28884097933769226, 0.000947166234254837, 0.033187516033649445, -0.19688864052295685, 0.26359015703201294, -0.026509806513786316, 0.05283276364207268, 0.11215639114379883, 0.04990702122449875, 0.028673596680164337, 0.29444023966789246, 0.1748408079147339, 0.13281939923763275, 0.020958280190825462, 0.22749187052249908, -0.05765830725431442, 0.1492845118045807, -0.15941040217876434, 0.22618111968040466, 0.16623641550540924, 0.057560987770557404, -0.008590223267674446, 0.1366972178220749, -0.09428960084915161, 0.28026247024536133, -0.35014599561691284, 0.735213577747345, -0.0986076295375824, 0.1375577449798584, -0.1786738634109497, 0.03706903010606766, -0.17021314799785614, 0.008541076444089413, 0.6333984136581421, -0.2879665195941925, 0.1309090554714203, -0.3771941065788269, 0.004972310736775398, -0.29802584648132324, 0.4440078139305115, 0.22506466507911682, -0.010976903140544891, -0.16992275416851044, -0.14728398621082306, -0.6406459808349609, 0.3689071834087372, -0.29526960849761963, 0.2847389280796051, 0.2248624712228775, 0.13821932673454285, -0.08077806979417801, 0.26164841651916504, -0.025569364428520203, 0.027308393269777298, 0.057976171374320984, -0.023234009742736816, -0.2543940544128418, -0.12997078895568848, -0.1799740046262741, 0.13547900319099426, -0.023514943197369576, -0.4784790873527527, 0.5247835516929626, 0.06142830476164818, -0.1210237517952919, 0.1060425192117691, -0.20408956706523895, 0.11158117651939392, -0.2850147783756256, 0.5564208030700684, 0.09905802458524704, 0.04555561766028404, 0.25331684947013855, 0.015558375045657158, -0.6226340532302856, -0.27418753504753113, -0.10805100947618484, -0.14315178990364075, -0.12120285630226135, 0.19029711186885834, -0.14899668097496033, -0.12475399672985077, -0.2914438545703888, 0.08454989641904831, 0.3116547465324402, 0.33670544624328613, -0.07773204892873764, -0.2738924026489258, -0.2815033793449402, 0.35701218247413635, 0.02925931289792061, 0.3436930179595947, -0.05383855849504471, 0.23089656233787537, 0.023479104042053223, -0.2894750237464905, 0.5123056173324585, -0.12660053372383118, -0.4669921100139618, -0.09853071719408035, 0.48151761293411255, 0.07281005382537842, -0.3415836691856384, -0.6230279803276062, 0.04145006090402603, 0.2575680613517761, -0.07949609309434891, -0.1953565776348114, 0.11924169957637787, -0.22546781599521637, 0.20402692258358002, -0.08503621816635132, 0.20778150856494904, 0.1866963803768158, -0.20132708549499512, 0.4180053174495697, -0.2137487232685089 ]
https://github.com/huggingface/datasets/issues/6771
Datasets FileNotFoundError when trying to generate examples.
@mariosasko Thanks for the PR and help! Guess I could close the issue for now. Appreciate the help!
### Discussed in https://github.com/huggingface/datasets/discussions/6768 <div type='discussions-op-text'> <sup>Originally posted by **RitchieP** April 1, 2024</sup> Currently, I have a dataset hosted on Huggingface with a custom script [here](https://huggingface.co/datasets/RitchieP/VerbaLex_voice). I'm loading my dataset as below. ```py from datasets import load_dataset, IterableDatasetDict dataset = IterableDatasetDict() dataset["train"] = load_dataset("RitchieP/VerbaLex_voice", "ar", split="train", use_auth_token=True, streaming=True) dataset["test"] = load_dataset("RitchieP/VerbaLex_voice", "ar", split="test", use_auth_token=True, streaming=True) ``` And when I try to see the data I have loaded with ```py list(dataset["train"].take(1)) ``` And it gives me this stack trace ``` --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) Cell In[2], line 1 ----> 1 list(dataset["train"].take(1)) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:1388, in IterableDataset.__iter__(self) 1385 yield formatter.format_row(pa_table) 1386 return -> 1388 for key, example in ex_iterable: 1389 if self.features: 1390 # `IterableDataset` automatically fills missing columns with None. 1391 # This is done with `_apply_feature_types_on_example`. 1392 example = _apply_feature_types_on_example( 1393 example, self.features, token_per_repo_id=self._token_per_repo_id 1394 ) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:1044, in TakeExamplesIterable.__iter__(self) 1043 def __iter__(self): -> 1044 yield from islice(self.ex_iterable, self.n) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:234, in ExamplesIterable.__iter__(self) 233 def __iter__(self): --> 234 yield from self.generate_examples_fn(**self.kwargs) File ~/.cache/huggingface/modules/datasets_modules/datasets/RitchieP--VerbaLex_voice/9465eaee58383cf9d7c3e14111d7abaea56398185a641b646897d6df4e4732f7/VerbaLex_voice.py:127, in VerbaLexVoiceDataset._generate_examples(self, local_extracted_archive_paths, archives, meta_path) 125 for i, audio_archive in enumerate(archives): 126 print(audio_archive) --> 127 for path, file in audio_archive: 128 _, filename = os.path.split(path) 129 if filename in metadata: File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:869, in _IterableFromGenerator.__iter__(self) 868 def __iter__(self): --> 869 yield from self.generator(*self.args, **self.kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:919, in ArchiveIterable._iter_from_urlpath(cls, urlpath, download_config) 915 @classmethod 916 def _iter_from_urlpath( 917 cls, urlpath: str, download_config: Optional[DownloadConfig] = None 918 ) -> Generator[Tuple, None, None]: --> 919 compression = _get_extraction_protocol(urlpath, download_config=download_config) 920 # Set block_size=0 to get faster streaming 921 # (e.g. for hf:// and https:// it uses streaming Requests file-like instances) 922 with xopen(urlpath, "rb", download_config=download_config, block_size=0) as f: File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:400, in _get_extraction_protocol(urlpath, download_config) 398 urlpath, storage_options = _prepare_path_and_storage_options(urlpath, download_config=download_config) 399 try: --> 400 with fsspec.open(urlpath, **(storage_options or {})) as f: 401 return _get_extraction_protocol_with_magic_number(f) 402 except FileNotFoundError: File /opt/conda/lib/python3.10/site-packages/fsspec/core.py:100, in OpenFile.__enter__(self) 97 def __enter__(self): 98 mode = self.mode.replace("t", "").replace("b", "") + "b" --> 100 f = self.fs.open(self.path, mode=mode) 102 self.fobjects = [f] 104 if self.compression is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:1307, in AbstractFileSystem.open(self, path, mode, block_size, cache_options, compression, **kwargs) 1305 else: 1306 ac = kwargs.pop("autocommit", not self._intrans) -> 1307 f = self._open( 1308 path, 1309 mode=mode, 1310 block_size=block_size, 1311 autocommit=ac, 1312 cache_options=cache_options, 1313 **kwargs, 1314 ) 1315 if compression is not None: 1316 from fsspec.compression import compr File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:180, in LocalFileSystem._open(self, path, mode, block_size, **kwargs) 178 if self.auto_mkdir and "w" in mode: 179 self.makedirs(self._parent(path), exist_ok=True) --> 180 return LocalFileOpener(path, mode, fs=self, **kwargs) File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:302, in LocalFileOpener.__init__(self, path, mode, autocommit, fs, compression, **kwargs) 300 self.compression = get_compression(path, compression) 301 self.blocksize = io.DEFAULT_BUFFER_SIZE --> 302 self._open() File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:307, in LocalFileOpener._open(self) 305 if self.f is None or self.f.closed: 306 if self.autocommit or "w" not in self.mode: --> 307 self.f = open(self.path, mode=self.mode) 308 if self.compression: 309 compress = compr[self.compression] FileNotFoundError: [Errno 2] No such file or directory: '/kaggle/working/h' ``` After looking into the stack trace, and referring to the source codes, it looks like its trying to access a directory in the notebook's environment and I don't understand why. Not sure if its a bug in Datasets library, so I'm opening a discussions first. Feel free to ask for more information if needed. Appreciate any help in advance!</div> Hi, referring to the discussion title above, after further digging, I think it's an issue within the datasets library. But not quite sure where it is. If you require any more info or actions from me, please let me know. Appreciate any help in advance!
18
Datasets FileNotFoundError when trying to generate examples. ### Discussed in https://github.com/huggingface/datasets/discussions/6768 <div type='discussions-op-text'> <sup>Originally posted by **RitchieP** April 1, 2024</sup> Currently, I have a dataset hosted on Huggingface with a custom script [here](https://huggingface.co/datasets/RitchieP/VerbaLex_voice). I'm loading my dataset as below. ```py from datasets import load_dataset, IterableDatasetDict dataset = IterableDatasetDict() dataset["train"] = load_dataset("RitchieP/VerbaLex_voice", "ar", split="train", use_auth_token=True, streaming=True) dataset["test"] = load_dataset("RitchieP/VerbaLex_voice", "ar", split="test", use_auth_token=True, streaming=True) ``` And when I try to see the data I have loaded with ```py list(dataset["train"].take(1)) ``` And it gives me this stack trace ``` --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) Cell In[2], line 1 ----> 1 list(dataset["train"].take(1)) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:1388, in IterableDataset.__iter__(self) 1385 yield formatter.format_row(pa_table) 1386 return -> 1388 for key, example in ex_iterable: 1389 if self.features: 1390 # `IterableDataset` automatically fills missing columns with None. 1391 # This is done with `_apply_feature_types_on_example`. 1392 example = _apply_feature_types_on_example( 1393 example, self.features, token_per_repo_id=self._token_per_repo_id 1394 ) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:1044, in TakeExamplesIterable.__iter__(self) 1043 def __iter__(self): -> 1044 yield from islice(self.ex_iterable, self.n) File /opt/conda/lib/python3.10/site-packages/datasets/iterable_dataset.py:234, in ExamplesIterable.__iter__(self) 233 def __iter__(self): --> 234 yield from self.generate_examples_fn(**self.kwargs) File ~/.cache/huggingface/modules/datasets_modules/datasets/RitchieP--VerbaLex_voice/9465eaee58383cf9d7c3e14111d7abaea56398185a641b646897d6df4e4732f7/VerbaLex_voice.py:127, in VerbaLexVoiceDataset._generate_examples(self, local_extracted_archive_paths, archives, meta_path) 125 for i, audio_archive in enumerate(archives): 126 print(audio_archive) --> 127 for path, file in audio_archive: 128 _, filename = os.path.split(path) 129 if filename in metadata: File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:869, in _IterableFromGenerator.__iter__(self) 868 def __iter__(self): --> 869 yield from self.generator(*self.args, **self.kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:919, in ArchiveIterable._iter_from_urlpath(cls, urlpath, download_config) 915 @classmethod 916 def _iter_from_urlpath( 917 cls, urlpath: str, download_config: Optional[DownloadConfig] = None 918 ) -> Generator[Tuple, None, None]: --> 919 compression = _get_extraction_protocol(urlpath, download_config=download_config) 920 # Set block_size=0 to get faster streaming 921 # (e.g. for hf:// and https:// it uses streaming Requests file-like instances) 922 with xopen(urlpath, "rb", download_config=download_config, block_size=0) as f: File /opt/conda/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:400, in _get_extraction_protocol(urlpath, download_config) 398 urlpath, storage_options = _prepare_path_and_storage_options(urlpath, download_config=download_config) 399 try: --> 400 with fsspec.open(urlpath, **(storage_options or {})) as f: 401 return _get_extraction_protocol_with_magic_number(f) 402 except FileNotFoundError: File /opt/conda/lib/python3.10/site-packages/fsspec/core.py:100, in OpenFile.__enter__(self) 97 def __enter__(self): 98 mode = self.mode.replace("t", "").replace("b", "") + "b" --> 100 f = self.fs.open(self.path, mode=mode) 102 self.fobjects = [f] 104 if self.compression is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:1307, in AbstractFileSystem.open(self, path, mode, block_size, cache_options, compression, **kwargs) 1305 else: 1306 ac = kwargs.pop("autocommit", not self._intrans) -> 1307 f = self._open( 1308 path, 1309 mode=mode, 1310 block_size=block_size, 1311 autocommit=ac, 1312 cache_options=cache_options, 1313 **kwargs, 1314 ) 1315 if compression is not None: 1316 from fsspec.compression import compr File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:180, in LocalFileSystem._open(self, path, mode, block_size, **kwargs) 178 if self.auto_mkdir and "w" in mode: 179 self.makedirs(self._parent(path), exist_ok=True) --> 180 return LocalFileOpener(path, mode, fs=self, **kwargs) File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:302, in LocalFileOpener.__init__(self, path, mode, autocommit, fs, compression, **kwargs) 300 self.compression = get_compression(path, compression) 301 self.blocksize = io.DEFAULT_BUFFER_SIZE --> 302 self._open() File /opt/conda/lib/python3.10/site-packages/fsspec/implementations/local.py:307, in LocalFileOpener._open(self) 305 if self.f is None or self.f.closed: 306 if self.autocommit or "w" not in self.mode: --> 307 self.f = open(self.path, mode=self.mode) 308 if self.compression: 309 compress = compr[self.compression] FileNotFoundError: [Errno 2] No such file or directory: '/kaggle/working/h' ``` After looking into the stack trace, and referring to the source codes, it looks like its trying to access a directory in the notebook's environment and I don't understand why. Not sure if its a bug in Datasets library, so I'm opening a discussions first. Feel free to ask for more information if needed. Appreciate any help in advance!</div> Hi, referring to the discussion title above, after further digging, I think it's an issue within the datasets library. But not quite sure where it is. If you require any more info or actions from me, please let me know. Appreciate any help in advance! @mariosasko Thanks for the PR and help! Guess I could close the issue for now. Appreciate the help!
[ -0.27704334259033203, -0.07210198789834976, 0.0195186547935009, 0.3475953936576843, 0.26319271326065063, 0.11979939788579941, 0.2685096561908722, 0.3378804326057434, 0.013867110013961792, 0.2252742499113083, 0.010754437185823917, 0.09313718229532242, -0.19975227117538452, -0.011398108676075935, 0.20538078248500824, 0.18841592967510223, -0.011127270758152008, 0.05107618868350983, -0.18072566390037537, 0.033168725669384, -0.13723987340927124, 0.2482312023639679, -0.3105228543281555, 0.030878163874149323, -0.32547760009765625, -0.1216932013630867, -0.1186862662434578, 0.551507830619812, -0.07795611768960953, -0.3455931544303894, 0.24455015361309052, 0.03727595880627632, 0.006947498768568039, 0.5508931875228882, -0.00011408421414671466, 0.16386467218399048, 0.2701888680458069, -0.14811545610427856, -0.522482693195343, -0.23375384509563446, -0.004536096006631851, 0.08354843407869339, -0.09976347535848618, -0.25394824147224426, -0.20995929837226868, -0.2676498591899872, 0.09106471389532089, -0.4218705892562866, 0.5328043103218079, 0.2639158070087433, 0.1616889238357544, 0.4899624288082123, -0.03745369613170624, -0.2723369300365448, 0.22249877452850342, 0.4353299140930176, -0.18684038519859314, 0.16769477725028992, 0.05996131896972656, -0.06226624548435211, 0.025360360741615295, 0.31769859790802, -0.2303684800863266, -0.1020997017621994, 0.0700070858001709, 0.08048480749130249, -0.3685484528541565, -0.04442516714334488, 0.16163775324821472, 0.5761858820915222, 0.43984511494636536, -0.3769678473472595, -0.4669201970100403, -0.5003477931022644, 0.01964147761464119, -0.21744117140769958, 0.0846802294254303, 0.06048048287630081, -0.13768146932125092, 0.33978861570358276, -0.08806319534778595, 0.12082303315401077, -0.15690819919109344, 0.0561828538775444, 0.14249956607818604, -0.03802448511123657, -0.329203337430954, -0.0011577829718589783, 0.14747168123722076, -0.113051638007164, -0.02825632318854332, -0.2228344827890396, 0.04370623081922531, 0.1852685809135437, -0.09245321154594421, 0.14040294289588928, 0.3432835638523102, -0.16220396757125854, 0.41986608505249023, 0.09304891526699066, 0.18686304986476898, 0.04479430243372917, -0.18515357375144958, 0.151418536901474, 0.07561776041984558, -0.006892497651278973, 0.14974021911621094, 0.059257589280605316, 0.2612519860267639, 0.39872390031814575, 0.06407731771469116, -0.19383564591407776, -0.33299022912979126, -0.05341070145368576, -0.06451189517974854, -0.055757924914360046, 0.5721377730369568, -0.2288934588432312, -0.49482405185699463, 0.12573689222335815, -0.21556535363197327, 0.009843479841947556, 0.2799448072910309, 0.5603510141372681, 0.18103359639644623, -0.15496951341629028, 0.06523410230875015, 0.2741433382034302, -0.09289594739675522, -0.293744832277298, -0.19306573271751404, -0.07371272146701813, -0.1714673638343811, 0.16205081343650818, 0.3333760201931, -0.19620954990386963, 0.24271690845489502, 0.03137366101145744, 0.014620408415794373, -0.0914108008146286, 0.035439349710941315, -0.042874716222286224, 0.38174962997436523, 0.2633844316005707, -0.02848706766963005, 0.05758259445428848, 0.3232533931732178, -0.20559009909629822, -0.09884372353553772, 0.04495229572057724, 0.045592114329338074, -0.2629449665546417, -0.12778708338737488, 0.15793302655220032, -0.29027825593948364, 0.05973009765148163, -0.1338297426700592, 0.20029893517494202, 0.07492519915103912, -0.2933703064918518, 0.11369523406028748, -0.007475994527339935, -0.2242416888475418, -0.19146300852298737, 0.4666673243045807, 0.9370113015174866, -0.4361359179019928, 0.015791907906532288, 0.04402599856257439, -0.261006236076355, -0.01737598329782486, 0.18717221915721893, -0.12834900617599487, 0.5090256333351135, -0.4740849733352661, 0.287270724773407, 0.22019344568252563, -0.35227689146995544, -0.1093018651008606, 0.21932928264141083, -0.0836983472108841, 0.3938801884651184, 0.27774450182914734, -0.326813668012619, -0.05123555660247803, -0.10410946607589722, 0.08596402406692505, -0.06781670451164246, 0.009336503222584724, -0.06702326983213425, -0.16101181507110596, 0.0912538394331932, 0.053725942969322205, 0.10957743227481842, -0.2512339949607849, 0.16031140089035034, 0.060398802161216736, -0.10522517561912537, 0.423300564289093, -0.3800014853477478, 0.1196574941277504, 0.1480763852596283, 0.406756192445755, 0.19743628799915314, -0.07688525319099426, -0.1167319267988205, -0.4527624845504761, 0.2003348469734192, 0.14136478304862976, -0.11135444045066833, -0.25556230545043945, -0.2804436683654785, -0.20462414622306824, 0.22686703503131866, -0.3101060092449188, -0.2645074129104614, 0.17928330600261688, 0.171648770570755, 0.1046779453754425, -0.012004148215055466, -0.3053964674472809, 0.37240347266197205, -0.24088357388973236, 0.12932218611240387, -0.6163602471351624, 0.21263717114925385, 0.17658235132694244, -0.2311176210641861, 0.14357109367847443, 0.3293667435646057, 0.13133016228675842, -0.2809726297855377, 0.14472359418869019, 0.5570608973503113, 0.18570151925086975, -0.02620449662208557, 0.05650349706411362, 0.03174029290676117, 0.006142779253423214, 0.0035956688225269318, 0.15086884796619415, -0.08737766742706299, 0.12570609152317047, -0.010316859930753708, -0.3384024202823639, 0.44722235202789307, -0.024212714284658432, 0.2650725543498993, 0.21473859250545502, -0.05397249013185501, 0.25134384632110596, 0.029084492474794388, -0.31677302718162537, -0.15130700170993805, 0.2432461827993393, 0.07289282977581024, 0.3780665099620819, -0.0935010015964508, -0.5364471673965454, 0.16436149179935455, 0.2387298047542572, -0.21520698070526123, 0.06338039040565491, -0.01197098195552826, -0.25877436995506287, 0.006659552454948425, 0.2790207266807556, 0.06588323414325714, 0.4290875196456909, 0.21575060486793518, 0.037608854472637177, 0.13503916561603546, -0.20835134387016296, -0.17401660978794098, 0.15651166439056396, 0.0053671374917030334, 0.14385007321834564, 0.22393593192100525, -0.12314581125974655, -0.07514122128486633, -0.48212122917175293, -0.48986321687698364, -0.39615774154663086, 0.04729841277003288, -0.5227926969528198, 0.1961832046508789, -0.28042250871658325, -0.2811652719974518, -0.2294556051492691, 0.07291463017463684, 0.020678557455539703, -0.2686593532562256, -0.1173395961523056, 0.2905788719654083, -0.20107094943523407, -0.04372106492519379, -0.24710513651371002, 0.14759021997451782, 0.040981486439704895, -0.17634524405002594, -0.3050716519355774, -0.14383839070796967, -0.20346879959106445, 0.03896153345704079, 0.24910347163677216, -0.0900200605392456, 0.3660014271736145, -0.18649965524673462, 0.030619990080595016, -0.39022958278656006, -0.25462576746940613, 0.2826477289199829, -0.1279132217168808, 0.21984697878360748, 0.23989702761173248, 0.12651652097702026, -0.06557856500148773, -0.2928474247455597, 0.23500999808311462, -0.1474255621433258, -0.2836114466190338, 0.15050168335437775, 0.043577294796705246, -0.1578015238046646, -0.14467546343803406, -0.3030444383621216, 0.06466807425022125, -0.35819119215011597, 0.43134909868240356, -0.051032304763793945, 0.00565497949719429, 0.646934986114502, 0.16468527913093567, 0.499080091714859, -0.39570140838623047, 0.12346337735652924, -0.2297358214855194, -0.259515643119812, 0.23934896290302277, -0.4042484164237976, -0.2894022464752197, 0.1386035680770874, -0.19138486683368683, 0.11185885965824127, 0.18763317167758942, -0.36372214555740356, -0.23394203186035156, -0.01846708543598652, 0.140740767121315, -0.02607470005750656, 0.14860397577285767, 0.3432786166667938, 0.06379568576812744, -0.10334755480289459, -0.2986642122268677, -0.30962496995925903, 0.07942049950361252, -0.2928485870361328, -0.0017802640795707703, -0.16569826006889343, 0.35894015431404114, 0.034814562648534775, 0.5398584008216858, 0.35735803842544556, 0.20108431577682495, 0.2328212410211563, -0.3183743953704834, 0.6039528250694275, -0.2601619362831116, -0.20236524939537048, 0.030970374122262, 0.04133206605911255, -0.22793613374233246, 0.2395864874124527, 0.02512594871222973, 0.17031320929527283, -0.13453030586242676, 0.16384808719158173, -0.544787585735321, -0.39929381012916565, 0.010694019496440887, 0.03132333233952522, 0.10049469769001007, 0.031610362231731415, 0.18780770897865295, 0.024572204798460007, 0.10673119127750397, -0.10301107168197632, 0.323505163192749, 0.3445984423160553, -0.053411468863487244, -0.4757874011993408, 0.11843697726726532, -0.4542188048362732, 0.34111300110816956, -0.07281524688005447, 0.24843032658100128, -0.16396158933639526, -0.4226902425289154, -0.015837371349334717, -0.05980830267071724, 0.7184507250785828, 0.16496795415878296, -0.12697239220142365, 0.12942911684513092, -0.1899949610233307, -0.4170999825000763, -0.013334173709154129, -0.2750668227672577, 0.2459690421819687, 0.042633164674043655, 0.37521207332611084, -0.255964994430542, -0.12145257741212845, 0.31390777230262756, 0.22541368007659912, 0.12080170214176178, -0.0677919089794159, -0.060181666165590286, -0.45573776960372925, -0.3378071188926697, -0.0908682569861412, 0.056574128568172455, 0.050694435834884644, -0.13127420842647552, -0.0016780458390712738, -0.11493201553821564, -0.09568990021944046, 0.27919626235961914, 0.37890657782554626, 0.2794432044029236, -0.08120211958885193, 0.14810727536678314, 0.4523020088672638, 0.22958706319332123, 0.3541622459888458, 0.5199926495552063, 0.2258368581533432, -0.23645687103271484, -0.010204583406448364, -0.05305486172437668, 0.1628466546535492, 0.4347653388977051, -0.2597748339176178, -0.10762595385313034, 0.1762625128030777, 0.09698685258626938, -0.14541979134082794, 0.022805307060480118, 0.4090242087841034, -0.14797845482826233, -0.35729143023490906, -0.37874549627304077, 0.41427069902420044, -0.03951031714677811, -0.024449869990348816, 0.2792288661003113, 0.1355249136686325, -0.2057846337556839, 0.1920854151248932, -0.1985412836074829, 0.7916973829269409, 0.003738582134246826, 0.29105696082115173, 0.49983373284339905, 0.05587179213762283, 0.43226712942123413, -0.2431928664445877, 0.07408685237169266, -0.26800674200057983, -0.3299046456813812, -0.015213802456855774, -0.0791664868593216, 0.23306605219841003, 0.36517560482025146, -0.223385289311409, 0.21676327288150787, 0.11025619506835938, 0.12081579864025116, -0.009232327342033386, 0.10043947398662567, -0.23999708890914917, -0.24456286430358887, -0.6655870079994202, 0.09418094903230667, 0.20674246549606323, 0.21559855341911316, -0.03015897050499916, -0.09745831042528152, -0.26914963126182556, -0.16701607406139374, -0.26311469078063965, 0.2193754017353058, -0.4187985360622406, -0.15660378336906433, 0.33195433020591736, -0.2549532949924469, -0.015547744929790497, 0.2271638810634613, 0.21165908873081207, 0.14853912591934204, -0.2828742265701294, -0.009002558887004852, -0.07435815781354904, -0.10810758918523788, -0.18780381977558136, -0.08002185076475143, 0.3841884136199951, -0.019107280299067497, -0.11898401379585266, 0.10251810401678085, 0.017023295164108276, -0.06567889451980591, 0.08806084096431732, -0.026622943580150604, -0.15392160415649414, -0.42268475890159607, -0.2152618169784546, 0.12681272625923157, 0.0469302199780941, -0.24882160127162933, 0.08331772685050964, 0.26408451795578003, -0.06591275334358215, -0.15627354383468628, 0.026593653485178947, -0.1315971314907074, -0.11258403956890106, 0.3152869641780853, -0.3278978168964386, 0.03519522398710251, 0.47107458114624023, 0.2581363916397095, -0.017679328098893166, -0.238388329744339, 0.10562688857316971, 0.28141170740127563, -0.4236457049846649, 0.0741046741604805, 0.22647850215435028, 0.19953931868076324, 0.05836699530482292, 0.18488001823425293, 0.14127705991268158, -0.2765999734401703, -0.10620489716529846, -0.30289459228515625, -0.22601132094860077, 0.23789873719215393, 0.048854630440473557, 0.293973833322525, 0.1334550380706787, 0.2278529405593872, 0.06526035070419312, -0.31043392419815063, -0.33109036087989807, -0.06648122519254684, -0.06820717453956604, -0.0018417052924633026, 0.49049463868141174, 0.10302616655826569, 0.4875473082065582, -0.04102106764912605, 0.17578963935375214, -0.014448605477809906, -0.21616312861442566, -0.24085375666618347, -0.12122948467731476, 0.14564020931720734, 0.09032338857650757, -0.23476040363311768, 0.15675337612628937, 0.0861043781042099, -0.07810777425765991, -0.3395857810974121, 0.33256766200065613, 0.21866589784622192, -0.0026040151715278625, 0.15318264067173004, -0.2103842943906784, 0.3544740378856659, -0.07374494522809982, -0.08512410521507263, -0.05984663963317871, 0.0914718434214592, 0.11597613990306854, 0.025967122986912727, -0.2912871539592743, -0.07895397394895554, 0.035045936703681946, 0.29910433292388916, 0.001017257571220398, 0.008042342960834503, 0.2894973158836365, -0.2667675018310547, -0.15363436937332153, 0.11274762451648712, 0.46642184257507324, 0.4477165937423706, -0.16962017118930817, 0.05492166429758072, 0.20910102128982544, 0.16023457050323486, -0.20143334567546844, 0.12885761260986328, 0.26907801628112793, -0.011971409432590008, 0.18040578067302704, 0.41710302233695984, -0.10622893273830414, 0.11063934862613678, 0.11306747794151306, -0.051115527749061584, 0.1914874017238617, -0.06969921290874481, 0.1874576359987259, 0.28209221363067627, -0.1123100221157074, 0.1642361581325531, 0.10516395419836044, 0.11393702030181885, 0.36982545256614685, 0.3602059483528137, -0.02862732857465744, 0.23815715312957764, -0.2486860454082489, 0.04908175393939018, 0.1620311290025711, -0.5804136395454407, 0.06150732934474945, 0.1379096657037735, 0.06572915613651276, 0.12382636964321136, -0.3044072389602661, 0.5113987326622009, -0.3054676651954651, 0.18954899907112122, -0.15797023475170135, 0.01720055751502514, -0.02584926411509514, -0.16315843164920807, -0.06705915182828903, -0.2215992510318756, -0.08798452466726303, -0.29205402731895447, 0.04333692044019699, -0.12352047860622406, 0.08682243525981903, -0.20181904733181, -0.031249485909938812, -0.3001701831817627, 0.1938858926296234, 0.009162507951259613, 0.19407106935977936, -0.1652807742357254, 0.1922493577003479, 0.24461518228054047, 0.09082646667957306, 0.13360393047332764, 0.4890497326850891, 0.6290808320045471, 0.24917012453079224, 0.11506949365139008, 0.014340502209961414, -0.21610546112060547, -0.09753192216157913, -0.11457449197769165, 0.3654332458972931, -0.08203430473804474, 0.003271831199526787, 0.37525925040245056, 0.16804395616054535, -0.09764067083597183, 0.16430765390396118, 0.11213064193725586, 0.018467053771018982, -0.328642338514328, -0.04988937824964523, -0.41338327527046204, -0.06933096796274185, -0.2067219614982605, -0.17363333702087402, -0.24469894170761108, -0.06715305149555206, 0.32906094193458557, -0.06532774865627289, 0.18490254878997803, 0.024391379207372665, 0.09062645584344864, -0.012753590941429138, 0.1602678894996643, 0.5035966634750366, 0.09442395716905594, -0.08181414008140564, 0.011938974261283875, -0.5996617078781128, 0.027115926146507263, -0.2577754259109497, -0.14579108357429504, -0.09505319595336914, 0.3249829411506653, 0.11202763020992279, 0.1141805648803711, 0.11725650727748871, -0.42395874857902527, -0.12312697619199753, 0.15930187702178955, -0.09244124591350555, -0.32571831345558167, -0.18634240329265594, -0.08542007207870483, 0.027130261063575745, -0.40773487091064453, -0.0972055196762085, -0.15200723707675934, -0.013659857213497162, -0.001352258026599884, 0.1825610250234604, -0.11655035614967346, -0.38305363059043884, 0.29557788372039795, 0.10499817878007889, 0.2851424217224121, -0.1851908266544342, -0.2819913923740387, -0.4110683798789978, -0.08372972160577774, -0.06706767529249191, 0.42050135135650635, 0.11309944093227386, 0.3961254358291626, 0.03323483467102051, -0.24915681779384613, -0.13491126894950867, 0.39560580253601074, 0.35626065731048584, 0.01458085048943758, -0.3610415458679199, 0.4550711512565613, -0.40416282415390015, -0.02473183535039425, 0.14769068360328674, 0.21737340092658997, -0.1922801434993744, 0.18716204166412354, -0.3101370930671692, -0.38850870728492737, 0.44795361161231995, -0.4885660707950592, -0.08177389949560165, 0.06953812390565872, 0.266571581363678, 0.19705665111541748, -0.30019137263298035, -0.531287670135498, 0.24018651247024536, 0.40424543619155884, -0.10924986749887466, -0.21599534153938293, 0.1425291746854782, -0.2676577866077423, -0.1261153221130371, 0.012402210384607315, 0.5465601086616516, 0.08979715406894684, -0.26283469796180725, 0.3144127428531647, -0.19096894562244415 ]
https://github.com/huggingface/datasets/issues/6770
[Bug Report] `datasets==2.18.0` is not compatible with `fsspec==2023.12.2`
You should be able to fix this by updating `huggingface_hub` with `pip install -U huggingface_hub`. We use this package under the hood to resolve the Hub's files.
### Describe the bug `Datasets==2.18.0` is not compatible with `fsspec==2023.12.2`. I have to downgrade fsspec to `fsspec==2023.10.0` to make `Datasets==2.18.0` work properly. ### Steps to reproduce the bug To reproduce the bug: 1. Make sure that `Datasets==2.18.0` and `fsspec==2023.12.2`. 2. Run the following code: ``` from datasets import load_dataset dataset = load_dataset("trec") ``` 3. Then one will get the following error message: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/conda/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/opt/conda/lib/python3.10/site-packages/datasets/load.py", line 2265, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 371, in __init__ self.config, self.config_id = self._create_builder_config( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 620, in _create_builder_config builder_config._resolve_data_files( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 211, in _resolve_data_files self.data_files = self.data_files.resolve(base_path, download_config) File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 799, in resolve out[key] = data_files_patterns_list.resolve(base_path, download_config) File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 752, in resolve resolve_pattern( File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 393, in resolve_pattern raise FileNotFoundError(error_msg) FileNotFoundError: Unable to find 'hf://datasets/trec@65752bf53af25bc935a0dce92fb5b6c930728450/default/train/0000.parquet' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.tar', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] ``` 4. Similar issue also found for the following code: ``` dataset = load_dataset("sst", "default") ``` ### Expected behavior If the dataset is loaded correctly, one will have: ``` >>> print(dataset) DatasetDict({ train: Dataset({ features: ['text', 'coarse_label', 'fine_label'], num_rows: 5452 }) test: Dataset({ features: ['text', 'coarse_label', 'fine_label'], num_rows: 500 }) }) >>> ``` ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-6.2.0-35-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.1 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
27
[Bug Report] `datasets==2.18.0` is not compatible with `fsspec==2023.12.2` ### Describe the bug `Datasets==2.18.0` is not compatible with `fsspec==2023.12.2`. I have to downgrade fsspec to `fsspec==2023.10.0` to make `Datasets==2.18.0` work properly. ### Steps to reproduce the bug To reproduce the bug: 1. Make sure that `Datasets==2.18.0` and `fsspec==2023.12.2`. 2. Run the following code: ``` from datasets import load_dataset dataset = load_dataset("trec") ``` 3. Then one will get the following error message: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/conda/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/opt/conda/lib/python3.10/site-packages/datasets/load.py", line 2265, in load_dataset_builder builder_instance: DatasetBuilder = builder_cls( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 371, in __init__ self.config, self.config_id = self._create_builder_config( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 620, in _create_builder_config builder_config._resolve_data_files( File "/opt/conda/lib/python3.10/site-packages/datasets/builder.py", line 211, in _resolve_data_files self.data_files = self.data_files.resolve(base_path, download_config) File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 799, in resolve out[key] = data_files_patterns_list.resolve(base_path, download_config) File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 752, in resolve resolve_pattern( File "/opt/conda/lib/python3.10/site-packages/datasets/data_files.py", line 393, in resolve_pattern raise FileNotFoundError(error_msg) FileNotFoundError: Unable to find 'hf://datasets/trec@65752bf53af25bc935a0dce92fb5b6c930728450/default/train/0000.parquet' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.tar', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.h5', '.hdf', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.H5', '.HDF', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.zip'] ``` 4. Similar issue also found for the following code: ``` dataset = load_dataset("sst", "default") ``` ### Expected behavior If the dataset is loaded correctly, one will have: ``` >>> print(dataset) DatasetDict({ train: Dataset({ features: ['text', 'coarse_label', 'fine_label'], num_rows: 5452 }) test: Dataset({ features: ['text', 'coarse_label', 'fine_label'], num_rows: 500 }) }) >>> ``` ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-6.2.0-35-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.1 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2 You should be able to fix this by updating `huggingface_hub` with `pip install -U huggingface_hub`. We use this package under the hood to resolve the Hub's files.
[ -0.6085851788520813, 0.04668770730495453, -0.08293451368808746, 0.17726293206214905, 0.24817615747451782, -0.04743963107466698, 0.09981110692024231, 0.39784231781959534, -0.31554001569747925, 0.31441277265548706, 0.026782501488924026, 0.5403881669044495, 0.09309377521276474, 0.431184858083725, -0.21786491572856903, 0.12716183066368103, 0.20971457660198212, 0.15417863428592682, -0.27282410860061646, 0.20440857112407684, -0.17383994162082672, 0.4018147885799408, -0.24649958312511444, -0.06879612803459167, -0.4196419417858124, 0.04008040577173233, 0.09516473114490509, 0.3012893795967102, -0.25949805974960327, -0.5211542844772339, 0.3694591820240021, -0.08793991804122925, 0.22016385197639465, 0.43939119577407837, -0.00011285494838375598, 0.08995035290718079, 0.41602957248687744, -0.04120289534330368, -0.36697643995285034, -0.2536892294883728, -0.1460936963558197, -0.13979099690914154, 0.08273065090179443, 0.11464569717645645, -0.15932807326316833, -0.3543878197669983, -0.1723252534866333, -0.31805068254470825, 0.44003593921661377, 0.37419095635414124, 0.27789050340652466, 0.13276034593582153, 0.36463069915771484, -0.4159661531448364, 0.19656935334205627, -0.31278473138809204, -0.20250974595546722, -0.017497967928647995, 0.13711057603359222, -0.13755826652050018, 0.2522377073764801, 0.005453225690871477, 0.02562214620411396, -0.0918218344449997, 0.3513578474521637, -0.17322447896003723, 0.3439450263977051, -0.48006924986839294, 0.2748624086380005, 0.16577643156051636, 0.43010151386260986, -0.19305098056793213, -0.4752577245235443, -0.024726517498493195, 0.00934059638530016, -0.24629734456539154, 0.2674959599971771, -0.3718274235725403, -0.04230717569589615, 0.08996178954839706, 0.21903091669082642, -0.08810199797153473, -0.03911392390727997, 0.039222244173288345, -0.18805520236492157, 0.40898364782333374, -0.1548117697238922, -0.041564881801605225, -0.1634768694639206, -0.384738564491272, 0.504371702671051, -0.16631175577640533, -0.09168340265750885, -0.02273329347372055, -0.4479982852935791, -0.0541449598968029, 0.04673564434051514, -0.058784060180187225, -0.06872132420539856, 0.20688949525356293, -0.36019304394721985, 0.010842110961675644, -0.07005420327186584, 0.1262153685092926, 0.1176186352968216, 0.1251431554555893, 0.2123977541923523, 0.22518068552017212, 0.1688728928565979, 0.0988415777683258, 0.1213715672492981, -0.12993124127388, 0.00875816773623228, -0.44716018438339233, -0.09549883008003235, 0.32583269476890564, 0.4549679756164551, -0.37546589970588684, -0.47155827283859253, 0.018532678484916687, 0.056546926498413086, 0.05126931890845299, -0.014335247687995434, 0.3109492063522339, -0.10179777443408966, 0.4460586607456207, -0.012148983776569366, 0.07347442209720612, -0.293098509311676, -0.12031127512454987, -0.17181015014648438, -0.17513339221477509, -0.10187818109989166, -0.07098405808210373, -0.008310515433549881, -0.3264487385749817, 0.25889965891838074, -0.04607471078634262, 0.10436977446079254, -0.0247476939111948, -0.12965454161167145, -0.09691964089870453, -0.05337394028902054, 0.3573787212371826, -0.07960416376590729, -0.07563658803701401, 0.04751152545213699, -0.2802382707595825, -0.10614395141601562, 0.08807167410850525, -0.2634972035884857, -0.24256765842437744, -0.3751385807991028, 0.23036324977874756, 0.026522789150476456, -0.07258764654397964, -0.05057739466428757, -0.10105369985103607, 0.06880176067352295, -0.34621885418891907, -0.10217601805925369, -0.2259998768568039, -0.48193585872650146, -0.17789851129055023, 0.2851159870624542, 0.24976491928100586, -0.6266120672225952, 0.029719114303588867, -0.07341249287128448, -0.2331954538822174, -0.040838710963726044, -0.19795171916484833, -0.031621962785720825, 0.043039511889219284, -0.10775863379240036, -0.11090998351573944, 0.30048224329948425, -0.20544248819351196, -0.4088882505893707, 0.1036640927195549, 0.1028454452753067, -0.12153669446706772, -0.02060527354478836, -0.08500403165817261, 0.3042723536491394, -0.23125417530536652, 0.26876723766326904, 0.12844423949718475, -0.011985605582594872, -0.1602557897567749, -0.21869316697120667, -0.3316357433795929, 0.10191771388053894, 0.0023207422345876694, 0.08156280964612961, 0.07094036787748337, 0.12834811210632324, -0.1309947967529297, 0.24720698595046997, 0.06865786015987396, -0.0006105597130954266, 0.16156736016273499, 0.581352174282074, 0.08809252083301544, 0.18057158589363098, -0.34968820214271545, -0.4846082329750061, 0.25230199098587036, -0.12662985920906067, -0.1523430347442627, 0.018762536346912384, -0.0414886511862278, -0.38636237382888794, -0.07053769379854202, -0.17687536776065826, -0.24180865287780762, 0.14128299057483673, -0.027016669511795044, 0.15865610539913177, -0.02707010880112648, -0.2219475507736206, 0.22877423465251923, -0.09736406058073044, -0.05730166286230087, -0.15409539639949799, 0.4719402492046356, -0.07620136439800262, -0.2329261153936386, 0.16114377975463867, 0.20052635669708252, 0.4347371459007263, -0.06403142958879471, -0.22404450178146362, 0.4721977710723877, 0.3648734390735626, 0.2473267912864685, -0.2694646418094635, 0.1361621916294098, 0.24935241043567657, -0.10443772375583649, 0.073415607213974, 0.2676163911819458, -0.01915198378264904, 0.08831415325403214, 0.36047080159187317, 0.21991631388664246, -0.06942588090896606, 0.36283257603645325, 0.12456965446472168, 0.13273917138576508, 0.2567373812198639, -0.02623661980032921, -0.003339199349284172, -0.14272527396678925, 0.0883963480591774, 0.13132615387439728, 0.3746119737625122, 0.01358892023563385, -0.07158605754375458, 0.2082028090953827, 0.13075338304042816, 0.010425560176372528, -0.20455136895179749, 0.06163788586854935, -0.16756188869476318, 0.08928979933261871, 0.2439669966697693, 0.5560674667358398, 0.4789106249809265, 0.2512824237346649, -0.05071449652314186, 0.3598593771457672, -0.036212895065546036, -0.007109702564775944, 0.350235253572464, 0.050570227205753326, 0.5990607738494873, 0.23648574948310852, 0.07869166135787964, 0.37873315811157227, -0.08176055550575256, -0.11492444574832916, -0.1745268702507019, 0.21897336840629578, -0.37663018703460693, 0.15735174715518951, -0.33848702907562256, -0.1350126415491104, -0.23923218250274658, 0.09550206363201141, -0.12312015891075134, -0.22550509870052338, 0.03972482681274414, 0.30097487568855286, 0.02593127265572548, 0.3246757388114929, -0.21823573112487793, 0.2269865721464157, -0.04926740750670433, 0.02540690265595913, -0.12589037418365479, 0.11902009695768356, -0.26362845301628113, 0.07522796094417572, 0.33517181873321533, 0.12467058002948761, 0.07294602692127228, -0.19444362819194794, -0.2133827954530716, -0.21597877144813538, -0.5470672249794006, 0.16338449716567993, -0.034264691174030304, 0.4165929853916168, 0.2729279398918152, -0.024131454527378082, 0.5932196974754333, -0.23861873149871826, 0.07662951946258545, -0.2878399193286896, -0.2482338398694992, -0.10365086048841476, -0.23639944195747375, -0.1411724090576172, -0.1660412698984146, -0.5935467481613159, -0.16275158524513245, -0.41074323654174805, -0.11835724115371704, -0.18023841083049774, 0.11212848126888275, 0.2518938183784485, 0.16963180899620056, -0.17804285883903503, -0.18193577229976654, 0.09886372089385986, -0.06216500699520111, -0.2873024642467499, 0.13955512642860413, -0.2536456882953644, -0.41451579332351685, 0.09135991334915161, 0.1530831903219223, 0.11519061028957367, -0.0932338610291481, -0.2816948890686035, -0.27923405170440674, -0.19087457656860352, -0.09391731023788452, -0.162964329123497, 0.025381529703736305, 0.2829165458679199, 0.28669318556785583, -0.15258966386318207, -0.18313279747962952, -0.36315426230430603, -0.019033029675483704, -0.19429978728294373, 0.3000507950782776, 0.004407679662108421, 0.28624606132507324, 0.044685978442430496, 0.3743394613265991, 0.6895648837089539, -0.25655144453048706, 0.22511762380599976, -0.10376115888357162, 0.42562952637672424, -0.2480931580066681, -0.2533828616142273, -0.10651522129774094, -0.01241399347782135, -0.1029120683670044, 0.11295511573553085, -0.05733097344636917, -0.0687807947397232, -0.12689663469791412, 0.07523179054260254, -0.2444194257259369, -0.09643957018852234, -0.4177815914154053, -0.11057417094707489, 0.3404807150363922, -0.0038134008646011353, 0.14854863286018372, 0.013047581538558006, 0.0722251906991005, 0.1405031383037567, 0.09980865567922592, -0.08475203067064285, -0.08881863951683044, -0.15078243613243103, 0.09970799833536148, -0.3741472661495209, 0.4656750559806824, -0.05094228312373161, 0.33813902735710144, -0.06836849451065063, -0.0002396106719970703, -0.15712188184261322, -0.19045118987560272, 0.5337507724761963, -0.15539486706256866, 0.22386088967323303, 0.34201762080192566, -0.009562693536281586, -0.2856065332889557, -0.114260733127594, 0.07770416140556335, 0.11330417543649673, 0.23850341141223907, 0.48705682158470154, 0.030369989573955536, -0.30924364924430847, 0.13141730427742004, -0.0864960327744484, 0.027052361518144608, 0.007387104444205761, -0.18690156936645508, 0.0448131337761879, -0.11506255716085434, -0.28160426020622253, -0.23641495406627655, 0.28807348012924194, -0.13525117933750153, -0.1653759926557541, -0.14633120596408844, -0.27446767687797546, -0.012146592140197754, 0.1965067982673645, 0.2860336899757385, 0.08944790810346603, 0.4095025956630707, 0.15255269408226013, -0.05649951100349426, 0.6088181138038635, 0.5019786357879639, 0.11512410640716553, -0.4374375343322754, 0.014493707567453384, 0.15648087859153748, 0.19109565019607544, 0.17178772389888763, -0.39729684591293335, -0.053488828241825104, -0.1483917087316513, -0.03291747719049454, -0.15224625170230865, -0.0797901451587677, 0.3547433316707611, 0.09563101083040237, -0.18449920415878296, -0.19062794744968414, 0.27289801836013794, 0.07431742548942566, -0.03740362450480461, 0.09413374215364456, 0.061866551637649536, -0.14931924641132355, 0.2033272087574005, 0.10568344593048096, 0.7791169285774231, 0.27499592304229736, -0.06654897332191467, 0.04251160845160484, -0.17482559382915497, 0.2335815727710724, -0.00455310195684433, -0.05031554400920868, -0.29506149888038635, -0.3123587965965271, -0.016248144209384918, -0.08537912368774414, 0.38906747102737427, -0.20552010834217072, -0.14191089570522308, 0.4811052083969116, -0.039247848093509674, -0.2676607072353363, 0.05044695734977722, 0.15577834844589233, -0.016362586989998817, 0.05116765573620796, -0.4926394820213318, 0.23498877882957458, 0.13466885685920715, 0.02858281321823597, -0.05408347025513649, -0.01965840347111225, 0.10267184674739838, -0.1891421228647232, -0.35939455032348633, 0.27555301785469055, -0.42775657773017883, -0.03952939063310623, 0.13240572810173035, -0.2208421230316162, 0.3788479268550873, 0.10860276222229004, 0.10511215776205063, 0.038228388875722885, -0.22388792037963867, 0.14705593883991241, -0.05828426033258438, 0.14326906204223633, 0.015936799347400665, -0.025487340986728668, 0.13170035183429718, -0.20559948682785034, -0.11863502860069275, 0.049302201718091965, -0.02531672641634941, -0.1298331618309021, 0.37097662687301636, -0.041574276983737946, 0.18258416652679443, -0.13192220032215118, 0.22065414488315582, 0.03272416815161705, 0.21937614679336548, -0.36198824644088745, 0.2202807068824768, -0.06426385045051575, -0.029387859627604485, 0.08969301730394363, 0.018426841124892235, -0.33033907413482666, -0.04735279455780983, 0.40407171845436096, -0.12027879804372787, 0.1244107335805893, 0.5121623277664185, 0.0533878393471241, -0.0934276282787323, -0.18614396452903748, 0.05808733403682709, -0.2877139747142792, -0.10829174518585205, 0.007405728101730347, -0.01842041313648224, -0.0780879482626915, 0.1469322293996811, 0.5815587043762207, 0.1267799735069275, 0.021501891314983368, 0.011619992554187775, -0.26066941022872925, -0.13380081951618195, 0.12114309519529343, -0.1275794804096222, 0.38917580246925354, -0.29366934299468994, 0.07251986861228943, -0.228060781955719, -0.16452661156654358, -0.348176509141922, 0.1180223748087883, -0.16235297918319702, 0.1384861171245575, -0.26551592350006104, 0.06882719695568085, 0.1196921169757843, -0.1875796914100647, 0.10356079041957855, 0.03721616789698601, -0.33399268984794617, -0.220271497964859, -0.2492496371269226, 0.11256130039691925, 0.19093942642211914, -0.21948279440402985, 0.06610700488090515, -0.2699771523475647, -0.2574514150619507, -0.0923389121890068, 0.14330552518367767, 0.3220740556716919, -0.044181786477565765, 0.1775401383638382, 0.06897789984941483, -0.06337996572256088, -0.02500566467642784, 0.19690601527690887, 0.11884807795286179, 0.2364739179611206, 0.18498896062374115, 0.36594000458717346, -0.23089200258255005, 0.038389310240745544, -0.04449114203453064, 0.1103203147649765, 0.06114359200000763, -0.09307708591222763, 0.14110195636749268, -0.11553579568862915, -0.042609892785549164, 0.34942957758903503, 0.3084360957145691, 0.4414656162261963, 0.00996215920895338, 0.15811757743358612, 0.1436760425567627, 0.20767846703529358, -0.38801926374435425, 0.05055136978626251, 0.04708437621593475, 0.10271583497524261, 0.033557090908288956, -0.04514000564813614, 0.07440349459648132, 0.02586130052804947, 0.42597317695617676, 0.32126039266586304, -0.039159879088401794, -0.06876671314239502, 0.6413305401802063, -0.012666922062635422, 0.13129614293575287, 0.21489159762859344, 0.2830185294151306, -0.07666286826133728, -0.03963802009820938, 0.5679041743278503, 0.0035739243030548096, 0.3722209632396698, -0.21595346927642822, 0.03966020047664642, 0.04797852784395218, -0.315562903881073, 0.3138231933116913, 0.03826943784952164, -0.10997951030731201, -0.2786048352718353, 0.18093571066856384, 0.3247629702091217, -0.07603298127651215, -0.12836281955242157, -0.2416401505470276, 0.009202629327774048, -0.08578374981880188, -0.20858299732208252, 0.033001720905303955, -0.12996190786361694, -0.117421954870224, -0.12809307873249054, 0.0017362534999847412, -0.1775956153869629, 0.559111475944519, 0.02071978524327278, -0.2431408017873764, -0.3670550584793091, -0.03681731969118118, 0.20603585243225098, -0.005568571388721466, -0.08761033415794373, 0.3696277439594269, -0.006912201642990112, -0.06725001335144043, 0.10860589146614075, 0.5747425556182861, 0.591362714767456, 0.39710763096809387, 0.03218219429254532, -0.1663273423910141, 0.034269481897354126, -0.07350412011146545, 0.04958884418010712, 0.1359015256166458, -0.08600839972496033, 0.23257902264595032, 0.3144147992134094, 0.1949593871831894, -0.10425123572349548, -0.19650039076805115, -0.030603189021348953, 0.2554813325405121, -0.4143960177898407, 0.5046107769012451, -0.0346318781375885, 0.21544364094734192, -0.1335735321044922, 0.19717848300933838, -0.33982884883880615, -0.09708783030509949, 0.46344393491744995, 0.18387337028980255, 0.12738701701164246, -0.07182706147432327, 0.09987514466047287, -0.1440623700618744, 0.21069036424160004, 0.24807626008987427, 0.19264677166938782, -0.17703363299369812, -0.24497787654399872, -0.5107564330101013, 0.21208207309246063, 0.003705129027366638, 0.33852747082710266, 0.05765092000365257, 0.09454158693552017, 0.04573693126440048, 0.17333458364009857, 0.39656561613082886, -0.13265424966812134, 0.04879133403301239, 0.08801260590553284, -0.39442092180252075, 0.0887017473578453, -0.08840680122375488, -0.23595136404037476, 0.14629621803760529, -0.4374904930591583, -0.12117664515972137, -0.2172161042690277, 0.04649446904659271, 0.12563124299049377, -0.11871303617954254, 0.0717097818851471, -0.32820749282836914, 0.5011359453201294, 0.059391267597675323, 0.5077265501022339, -0.16948649287223816, -0.28137388825416565, -0.33862391114234924, -0.3340546786785126, -0.2617191672325134, 0.13763894140720367, -0.04923854395747185, 0.11352556943893433, -0.3289181888103485, -0.1367492824792862, -0.29099810123443604, 0.24182996153831482, -0.15463869273662567, 0.059929344803094864, -0.33933132886886597, 0.38939234614372253, -0.09832237660884857, 0.1645873636007309, -0.012866809964179993, 0.08921562135219574, -0.03330863267183304, 0.19021424651145935, -0.3709309697151184, -0.3459825813770294, 0.504775881767273, -0.27826792001724243, -0.16662631928920746, -0.2987009882926941, 0.32671570777893066, 0.08815135806798935, -0.2873688042163849, -0.38221821188926697, 0.11553642898797989, 0.28866079449653625, -0.08737041801214218, 0.01905915141105652, 0.3106381893157959, -0.2885434329509735, 0.07497763633728027, -0.12368758022785187, 0.6247084140777588, 0.0494014248251915, -0.04151834547519684, 0.24485677480697632, -0.35972440242767334 ]
https://github.com/huggingface/datasets/issues/6765
Compatibility issue between s3fs, fsspec, and datasets
Hi! Instead of running `pip install` separately for each package, you should pass all the packages to a single `pip install` call (in this case, `pip install datasets s3fs`) to let `pip` properly resolve their versions.
### Describe the bug Here is the full error stack when installing: ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 2.18.0 requires fsspec[http]<=2024.2.0,>=2023.1.0, but you have fsspec 2024.3.1 which is incompatible. Successfully installed aiobotocore-2.12.1 aioitertools-0.11.0 botocore-1.34.51 fsspec-2024.3.1 jmespath-1.0.1 s3fs-2024.3.1 urllib3-2.0.7 wrapt-1.16.0 ``` When I install with pip, pip allows this error to exist while still installing s3fs, but this error breaks poetry, since poetry will refuse to install s3fs because of the dependency conflict. Maybe I'm missing something so maybe it's not a bug but some mistake on my end? Any input would be helpful. Thanks! ### Steps to reproduce the bug 1. conda create -n tmp python=3.10 -y 2. conda activate tmp 3. pip install datasets 4. pip install s3fs ### Expected behavior I would expect there to be no error. ### Environment info MacOS (ARM), Python3.10, conda 23.11.0.
36
Compatibility issue between s3fs, fsspec, and datasets ### Describe the bug Here is the full error stack when installing: ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 2.18.0 requires fsspec[http]<=2024.2.0,>=2023.1.0, but you have fsspec 2024.3.1 which is incompatible. Successfully installed aiobotocore-2.12.1 aioitertools-0.11.0 botocore-1.34.51 fsspec-2024.3.1 jmespath-1.0.1 s3fs-2024.3.1 urllib3-2.0.7 wrapt-1.16.0 ``` When I install with pip, pip allows this error to exist while still installing s3fs, but this error breaks poetry, since poetry will refuse to install s3fs because of the dependency conflict. Maybe I'm missing something so maybe it's not a bug but some mistake on my end? Any input would be helpful. Thanks! ### Steps to reproduce the bug 1. conda create -n tmp python=3.10 -y 2. conda activate tmp 3. pip install datasets 4. pip install s3fs ### Expected behavior I would expect there to be no error. ### Environment info MacOS (ARM), Python3.10, conda 23.11.0. Hi! Instead of running `pip install` separately for each package, you should pass all the packages to a single `pip install` call (in this case, `pip install datasets s3fs`) to let `pip` properly resolve their versions.
[ -0.2145080268383026, 0.05141748487949371, -0.11407479643821716, 0.44768309593200684, 0.0963214859366417, -0.30690237879753113, -0.11762954294681549, 0.1704910397529602, -0.15889768302440643, 0.01165984570980072, 0.1124238520860672, 0.702254056930542, 0.1701168417930603, 0.2622492015361786, -0.5623539090156555, 0.1789904683828354, 0.3183588683605194, 0.14813101291656494, -0.038979314267635345, 0.07284499704837799, -0.005706142634153366, 0.40963172912597656, -0.1801372915506363, -0.1842827945947647, -0.08727474510669708, 0.21474087238311768, -0.12620308995246887, 0.10197475552558899, -0.35136210918426514, -0.3126128911972046, 0.6367244720458984, 0.22404956817626953, 0.02826271951198578, 0.5227329134941101, -0.00012621852511074394, -0.07487467676401138, 0.37281477451324463, -0.020357167348265648, -0.13386480510234833, -0.3715185523033142, -0.5835508704185486, -0.2836849093437195, 0.13533034920692444, 0.07044292241334915, 0.07926727831363678, 0.16416646540164948, -0.18847881257534027, -0.3039683401584625, 0.4533499479293823, 0.2783490717411041, 0.07546767592430115, 0.1583399623632431, 0.3390904366970062, 0.08668392896652222, 0.3078538775444031, -0.05073339492082596, -0.16056300699710846, 0.012474479153752327, 0.18005961179733276, -0.1119391918182373, 0.22964251041412354, 0.20972758531570435, -0.2813786268234253, 0.16472627222537994, 0.25667324662208557, -0.18346287310123444, 0.19668494164943695, -0.3881351053714752, -0.2089809775352478, 0.13481155037879944, 0.45399951934814453, -0.1628667414188385, -0.6795161366462708, -0.2891635298728943, -0.23254412412643433, 0.07762157171964645, 0.3590085804462433, -0.2424817681312561, -0.022344304248690605, 0.07890462130308151, -0.02963925339281559, -0.01558361854404211, -0.17380736768245697, 0.2641602158546448, -0.23644530773162842, 0.34783753752708435, -0.26822108030319214, 0.010068077594041824, 0.14902636408805847, -0.18827557563781738, 0.5513409972190857, -0.20185016095638275, -0.019408199936151505, 0.04341766983270645, -0.3151662349700928, -0.14924609661102295, -0.19895324110984802, 0.02735891193151474, -0.058827921748161316, 0.278303861618042, -0.32544511556625366, 0.12994912266731262, -0.09196147322654724, 0.17605707049369812, 0.3345334231853485, -0.025712020695209503, 0.07868144661188126, 0.36924946308135986, 0.1894889622926712, 0.11531056463718414, 0.24104639887809753, 0.031061861664056778, 0.14935623109340668, -0.3841986358165741, -0.41082313656806946, -0.18804031610488892, 0.30470573902130127, -0.40471482276916504, -0.17037589848041534, 0.017306292429566383, 0.15116742253303528, -0.0528787299990654, -0.17779751121997833, 0.09890124201774597, -0.2296440452337265, 0.6224863529205322, 0.028837673366069794, 0.1852203607559204, -0.16462492942810059, 0.24803176522254944, 0.08832307904958725, -0.35001903772354126, 0.06402651965618134, -0.05048619210720062, 0.06620959937572479, -0.2030036598443985, 0.2809644341468811, 0.06133131682872772, 0.09911102056503296, 0.07622699439525604, -0.05634027719497681, -0.20626915991306305, -0.18198952078819275, 0.3346961736679077, -0.08561177551746368, 0.18640106916427612, -0.06652995944023132, 0.02126277983188629, -0.09561318159103394, 0.032838374376297, -0.2307998239994049, 0.17255070805549622, -0.3197706937789917, 0.03492984175682068, -0.33434391021728516, -0.027109377086162567, -0.12447398155927658, -0.2209235280752182, 0.1718394160270691, -0.3748260736465454, 0.13270321488380432, -0.23279951512813568, -0.17564789950847626, -0.23173880577087402, -0.0055945273488759995, 0.08663450181484222, -0.11726848781108856, 0.017597652971744537, -0.1664011925458908, -0.037147436290979385, -0.15495359897613525, 0.1028706282377243, 0.1810900717973709, -0.24118095636367798, -0.033033959567546844, -0.17449627816677094, 0.28058305382728577, -0.5965560674667358, -0.520052969455719, 0.417618989944458, 0.3202178478240967, 0.215567946434021, 0.059511948376894, -0.05156095325946808, 0.1098402589559555, -0.06296084076166153, 0.07121826708316803, 0.25525450706481934, -0.06760679930448532, -0.21305136382579803, -0.1730370968580246, -0.2496635764837265, -0.2319723218679428, 0.2291414886713028, 0.05017421394586563, 0.14217545092105865, -0.0613284632563591, -0.45368126034736633, 0.10870598256587982, 0.17989715933799744, 0.10808970779180527, 0.5529764294624329, 0.7246325612068176, 0.6009683012962341, 0.03388991206884384, -0.39888325333595276, -0.21799319982528687, 0.25268036127090454, 0.04335053265094757, -0.07808603346347809, -0.17869289219379425, 0.04001401364803314, 0.04379056766629219, 0.026977436617016792, -0.08378036320209503, 0.0221579447388649, -0.05772458761930466, 0.08635786920785904, 0.28318408131599426, -0.024141676723957062, -0.02261502668261528, 0.6066290736198425, 0.25250622630119324, 0.21515783667564392, -0.35784292221069336, 0.209469273686409, -0.3513229787349701, -0.14072436094284058, 0.29091572761535645, 0.1338433474302292, 0.1729118973016739, -0.09473414719104767, -0.059160567820072174, 0.2695329189300537, 0.18774299323558807, 0.041907839477062225, -0.149356871843338, 0.21241484582424164, 0.09733951836824417, -0.17516939342021942, -0.09453897923231125, -0.0717257559299469, -0.025035344064235687, 0.168113112449646, 0.32445040345191956, 0.1115514487028122, -0.12281356751918793, 0.45218977332115173, -0.05568883568048477, 0.11499042063951492, 0.27333396673202515, -0.1836363822221756, -0.26027581095695496, -0.0943375900387764, 0.24428831040859222, -0.18978065252304077, 0.1084294468164444, 0.22679996490478516, 0.06754350662231445, -0.013856261968612671, 0.2510174512863159, -0.00006194785237312317, -0.25286051630973816, 0.18693503737449646, 0.08832451701164246, 0.22147592902183533, 0.34063974022865295, 0.2772511839866638, 0.7672819495201111, 0.19224625825881958, -0.27153295278549194, -0.03289391100406647, -0.07801172137260437, -0.024784505367279053, 0.29735204577445984, 0.3310086131095886, 0.288183331489563, 0.004273131489753723, 0.2509861886501312, 0.25178006291389465, 0.12364336103200912, -0.07626722753047943, -0.28440743684768677, -0.04649460315704346, -0.3218667805194855, 0.33629360795021057, -0.29599109292030334, -0.18950939178466797, -0.11217917501926422, -0.17370936274528503, -0.30445998907089233, -0.13368821144104004, -0.09507811069488525, 0.3631499111652374, 0.19025686383247375, 0.12562653422355652, -0.023999860510230064, -0.04830826818943024, -0.17879286408424377, -0.1338602602481842, -0.14053666591644287, 0.06460075825452805, -0.3211526870727539, -0.03658280149102211, 0.28450915217399597, -0.14566239714622498, 0.1306167095899582, -0.10440535098314285, -0.03562858700752258, -0.25083133578300476, -0.514716386795044, 0.059519845992326736, -0.36797720193862915, 0.6420917510986328, 0.28612828254699707, -0.05868358910083771, 0.21928490698337555, -0.07221928238868713, 0.07619809359312057, 0.03421629220247269, -0.19152013957500458, -0.047328557819128036, -0.009391866624355316, -0.27887579798698425, -0.13308411836624146, -0.21225321292877197, -0.08636748045682907, -0.24080663919448853, 0.33922475576400757, -0.15510794520378113, 0.04013951122760773, -0.020154215395450592, 0.27893298864364624, -0.1621936559677124, -0.24055708944797516, 0.12347917258739471, -0.04985063895583153, 0.006204608827829361, 0.10661998391151428, 0.12866412103176117, -0.19379989802837372, 0.07731963694095612, 0.06452760100364685, 0.3323279321193695, -0.004331285133957863, -0.48040837049484253, -0.16474926471710205, -0.24756227433681488, 0.21889165043830872, -0.14895473420619965, 0.09778647124767303, 0.4767325520515442, 0.12917670607566833, 0.06907092034816742, -0.3745831847190857, -0.1845884770154953, -0.21553418040275574, -0.26496005058288574, 0.2502109706401825, 0.11489646136760712, 0.2999882698059082, -0.051290880888700485, 0.31279927492141724, 0.5221015214920044, -0.13979576528072357, 0.4134259521961212, 0.22791504859924316, 0.3587162494659424, 0.254641592502594, -0.32141438126564026, -0.07426920533180237, -0.042868539690971375, 0.103971928358078, 0.04066058248281479, 0.005605342797935009, -0.014509972184896469, -0.38561826944351196, 0.3120521306991577, -0.35107022523880005, -0.04620884731411934, -0.220691978931427, -0.2691332697868347, 0.32119789719581604, 0.14753088355064392, -0.18166378140449524, 0.19901540875434875, 0.10138656944036484, -0.029769351705908775, 0.19530773162841797, -0.0817171260714531, -0.012448355555534363, -0.10981642454862595, -0.061046499758958817, -0.043035537004470825, 0.25078409910202026, 0.044659703969955444, 0.3723665773868561, -0.16200365126132965, 0.24857500195503235, -0.1359567493200302, -0.10422025620937347, 0.8315378427505493, -0.46019572019577026, -0.36733853816986084, 0.00006987899541854858, 0.08970291912555695, -0.8504012227058411, -0.04331352561712265, -0.10294406116008759, 0.15945464372634888, 0.35596802830696106, 0.5179630517959595, -0.22450971603393555, -0.11604656279087067, -0.0323929637670517, -0.14440609514713287, 0.15853646397590637, -0.3154650032520294, -0.5162098407745361, 0.01759503036737442, -0.2936347424983978, -0.19807428121566772, -0.060649044811725616, -0.07374453544616699, -0.07431615144014359, -0.3038005530834198, -0.13447193801403046, 0.07193067669868469, 0.05957239493727684, 0.05156552419066429, 0.09566088020801544, -0.31306368112564087, 0.3047460913658142, -0.02042977884411812, -0.16176706552505493, 0.49639445543289185, 0.5903105139732361, 0.012166358530521393, -0.5215316414833069, -0.029623065143823624, 0.05310023948550224, 0.3653322756290436, 0.14218485355377197, -0.10874862968921661, -0.11640448123216629, -0.11212904751300812, -0.056520164012908936, -0.2207639217376709, -0.12307889014482498, 0.40602627396583557, 0.24625247716903687, -0.17890609800815582, -0.19552825391292572, 0.08408830314874649, 0.40251263976097107, -0.09993032366037369, 0.19473406672477722, 0.12839342653751373, -0.03027338720858097, 0.1848199963569641, -0.0330156534910202, 0.7789949178695679, 0.11224757879972458, 0.08140438795089722, 0.21673625707626343, -0.3239958882331848, 0.4429561495780945, -0.09590113162994385, 0.010609479621052742, -0.02830183506011963, 0.07139527052640915, -0.18188153207302094, -0.2334047257900238, 0.3810986876487732, -0.08003202080726624, -0.2412400245666504, 0.5146133303642273, 0.21583382785320282, -0.4358867406845093, 0.2374192327260971, 0.01412908360362053, -0.12507803738117218, -0.1298568695783615, -0.3395189940929413, 0.1189328283071518, -0.14241665601730347, 0.1730387657880783, -0.08303987234830856, -0.04002883657813072, -0.4345039427280426, -0.3414188027381897, -0.3976935148239136, 0.12444660812616348, -0.307007759809494, -0.15747715532779694, 0.22762341797351837, 0.19760166108608246, 0.32214298844337463, 0.10272113978862762, 0.13384553790092468, 0.1904129534959793, -0.1430816799402237, 0.10567349195480347, 0.22286206483840942, -0.11340894550085068, 0.1193854808807373, -0.1566780060529709, -0.0980709046125412, -0.0669325441122055, -0.06027120351791382, -0.29556936025619507, -0.22732535004615784, -0.142154723405838, 0.05758558213710785, 0.26477694511413574, -0.03762081265449524, -0.002794702770188451, -0.2530501186847687, 0.029714256525039673, 0.30632689595222473, -0.11926083266735077, 0.08326150476932526, 0.01785934716463089, 0.15488098561763763, 0.5112432241439819, -0.301484078168869, -0.17108316719532013, -0.07063877582550049, 0.4461028277873993, -0.06379998475313187, -0.03799824044108391, 0.06596894562244415, 0.0015283748507499695, -0.19869394600391388, 0.015263482928276062, -0.29865342378616333, -0.5704378485679626, -0.08629132807254791, -0.17453661561012268, -0.05392242595553398, -0.4142683148384094, -0.05030163750052452, 0.2747229337692261, 0.3139340281486511, 0.020479843020439148, 0.11574338376522064, -0.3524751365184784, 0.17584306001663208, 0.08924257010221481, -0.053398508578538895, 0.15242618322372437, -0.07297234982252121, -0.07423895597457886, -0.2180432677268982, 0.07010186463594437, -0.1383490413427353, 0.11396759003400803, -0.14712995290756226, 0.06696343421936035, 0.02162337861955166, 0.0792580246925354, 0.16411522030830383, -0.46855801343917847, -0.0620158314704895, 0.25778889656066895, -0.15018951892852783, -0.07244225591421127, -0.008288897573947906, 0.16078732907772064, 0.3001609742641449, -0.15161319077014923, -0.06789784133434296, -0.2633800208568573, 0.0039011742919683456, 0.07260110229253769, -0.06627757847309113, 0.3502552807331085, -0.05730454623699188, -0.07938917726278305, -0.4273281991481781, 0.15538495779037476, 0.17516584694385529, 0.3083784878253937, -0.0925055593252182, 0.0012537389993667603, 0.2704326808452606, 0.35088223218917847, 0.10497476160526276, 0.020177990198135376, -0.09872819483280182, -0.07353564351797104, 0.09930860251188278, 0.056195519864559174, 0.08513665199279785, -0.2735239267349243, -0.1934332549571991, 0.3982386291027069, 0.3866788446903229, 0.4501686692237854, -0.11076196283102036, -0.04113127291202545, 0.11286864429712296, 0.1375771462917328, -0.100566066801548, -0.2246251404285431, -0.0772513896226883, 0.11892997473478317, -0.15672408044338226, 0.08972859382629395, 0.18140189349651337, -0.15318132936954498, 0.3127303421497345, 0.3399762213230133, 0.18558065593242645, 0.2706705927848816, 0.373123437166214, -0.24501365423202515, 0.03812398388981819, 0.10991252958774567, 0.2907167375087738, -0.16881631314754486, 0.014309339225292206, 0.16402247548103333, -0.04818537086248398, 0.10930036008358002, -0.2848864197731018, 0.021856628358364105, 0.057552605867385864, -0.268911749124527, 0.038104694336652756, -0.26836878061294556, 0.07688490301370621, 0.016129527240991592, 0.09596391767263412, 0.25623202323913574, -0.19998671114444733, -0.3181428909301758, -0.14731605350971222, -0.1221717894077301, -0.02416670322418213, -0.11839082837104797, 0.22126993536949158, -0.03285260125994682, 0.28442201018333435, -0.11113831400871277, 0.07326150685548782, -0.18341059982776642, 0.7150969505310059, 0.22095152735710144, -0.24251414835453033, -0.5878751873970032, 0.049489282071590424, 0.25389575958251953, 0.024787962436676025, 0.01591760292649269, 0.47052648663520813, -0.07051718235015869, -0.32894468307495117, -0.2153613269329071, 0.28295964002609253, 0.6972415447235107, 0.29586061835289, 0.20417608320713043, -0.1866847425699234, -0.1902759075164795, 0.04335842281579971, -0.07668398320674896, 0.36811012029647827, -0.18881863355636597, 0.32766443490982056, 0.22044700384140015, 0.09430455416440964, -0.07540792226791382, -0.06609448790550232, -0.12476442754268646, 0.43948912620544434, -0.5393512845039368, 0.3757272958755493, -0.3813650906085968, 0.21594494581222534, 0.16905520856380463, 0.3816286325454712, -0.6374168992042542, 0.17870764434337616, 0.44257235527038574, 0.011190246790647507, -0.04573887214064598, -0.11012750118970871, 0.03885066881775856, -0.02072146162390709, 0.2442035973072052, 0.37622204422950745, 0.17904627323150635, -0.12793253362178802, -0.13651639223098755, -0.38015007972717285, 0.18879400193691254, -0.37626832723617554, 0.2485741674900055, 0.12030430883169174, 0.15568560361862183, 0.1435655951499939, 0.15989258885383606, 0.11906064301729202, 0.11322178691625595, -0.08903153240680695, 0.10582256317138672, -0.35943591594696045, -0.037052880972623825, -0.056856364011764526, -0.3193277418613434, 0.3694603145122528, -0.31264275312423706, 0.07519764453172684, 0.015798717737197876, -0.11992403119802475, -0.045596301555633545, 0.11903277039527893, 0.1375901699066162, -0.2811046540737152, 0.4220700263977051, 0.224074587225914, 0.38220471143722534, 0.01388227567076683, -0.2945113480091095, -0.15516965091228485, -0.1664602905511856, -0.2534681260585785, 0.27811282873153687, -0.2350178360939026, 0.22240979969501495, -0.6205953359603882, 0.16966485977172852, -0.2677215337753296, 0.1841459572315216, -0.0008498020470142365, 0.019287271425127983, 0.003362562507390976, 0.13376766443252563, -0.14127929508686066, 0.2346721589565277, -0.23866231739521027, 0.195704847574234, 0.09684094786643982, 0.33071085810661316, -0.42326444387435913, -0.2908995747566223, 0.3156002461910248, -0.4078480303287506, -0.15039511024951935, 0.07273022830486298, 0.06296293437480927, 0.16010460257530212, -0.35294246673583984, -0.6912459135055542, -0.07888132333755493, 0.29170724749565125, 0.017637085169553757, -0.08188332617282867, 0.2841508686542511, -0.1160079687833786, -0.044107936322689056, -0.08803801983594894, 0.6566945314407349, 0.031240299344062805, -0.031378474086523056, 0.5665826797485352, -0.0022484920918941498 ]
https://github.com/huggingface/datasets/issues/6765
Compatibility issue between s3fs, fsspec, and datasets
> Hi! Instead of running `pip install` separately for each package, you should pass all the packages to a single `pip install` call (in this case, `pip install datasets s3fs`) to let `pip` properly resolve their versions. Thanks so much! My inexperience with pip is showing 😆 🙈
### Describe the bug Here is the full error stack when installing: ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 2.18.0 requires fsspec[http]<=2024.2.0,>=2023.1.0, but you have fsspec 2024.3.1 which is incompatible. Successfully installed aiobotocore-2.12.1 aioitertools-0.11.0 botocore-1.34.51 fsspec-2024.3.1 jmespath-1.0.1 s3fs-2024.3.1 urllib3-2.0.7 wrapt-1.16.0 ``` When I install with pip, pip allows this error to exist while still installing s3fs, but this error breaks poetry, since poetry will refuse to install s3fs because of the dependency conflict. Maybe I'm missing something so maybe it's not a bug but some mistake on my end? Any input would be helpful. Thanks! ### Steps to reproduce the bug 1. conda create -n tmp python=3.10 -y 2. conda activate tmp 3. pip install datasets 4. pip install s3fs ### Expected behavior I would expect there to be no error. ### Environment info MacOS (ARM), Python3.10, conda 23.11.0.
48
Compatibility issue between s3fs, fsspec, and datasets ### Describe the bug Here is the full error stack when installing: ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 2.18.0 requires fsspec[http]<=2024.2.0,>=2023.1.0, but you have fsspec 2024.3.1 which is incompatible. Successfully installed aiobotocore-2.12.1 aioitertools-0.11.0 botocore-1.34.51 fsspec-2024.3.1 jmespath-1.0.1 s3fs-2024.3.1 urllib3-2.0.7 wrapt-1.16.0 ``` When I install with pip, pip allows this error to exist while still installing s3fs, but this error breaks poetry, since poetry will refuse to install s3fs because of the dependency conflict. Maybe I'm missing something so maybe it's not a bug but some mistake on my end? Any input would be helpful. Thanks! ### Steps to reproduce the bug 1. conda create -n tmp python=3.10 -y 2. conda activate tmp 3. pip install datasets 4. pip install s3fs ### Expected behavior I would expect there to be no error. ### Environment info MacOS (ARM), Python3.10, conda 23.11.0. > Hi! Instead of running `pip install` separately for each package, you should pass all the packages to a single `pip install` call (in this case, `pip install datasets s3fs`) to let `pip` properly resolve their versions. Thanks so much! My inexperience with pip is showing 😆 🙈
[ -0.2077006846666336, 0.010491222143173218, -0.11634887754917145, 0.4619513750076294, 0.10029921680688858, -0.30013683438301086, -0.1435176432132721, 0.15162542462348938, -0.14734475314617157, 0.014978870749473572, 0.136674702167511, 0.7176003456115723, 0.17941242456436157, 0.23967169225215912, -0.5651845335960388, 0.15388715267181396, 0.32133448123931885, 0.1459566354751587, -0.02107670158147812, 0.0713469535112381, 0.0011359192430973053, 0.418618381023407, -0.1802750676870346, -0.1749088019132614, -0.07451976090669632, 0.20089662075042725, -0.11639587581157684, 0.10963898152112961, -0.3651115894317627, -0.3091595470905304, 0.6325328946113586, 0.22245179116725922, 0.02085227146744728, 0.5119442343711853, -0.00012589454127009958, -0.07678371667861938, 0.38362741470336914, -0.018123961985111237, -0.11306993663311005, -0.3786661624908447, -0.5906620025634766, -0.31972405314445496, 0.12482906877994537, 0.05828220397233963, 0.06783479452133179, 0.18648195266723633, -0.18710285425186157, -0.27542728185653687, 0.47268742322921753, 0.2712889015674591, 0.07500092685222626, 0.16333046555519104, 0.33980539441108704, 0.09871100634336472, 0.3324442505836487, -0.06090065836906433, -0.1552606225013733, 0.017581457272171974, 0.19043755531311035, -0.09634506702423096, 0.22907555103302002, 0.21132010221481323, -0.30195367336273193, 0.1757483333349228, 0.2411317229270935, -0.18091534078121185, 0.19610682129859924, -0.3951471745967865, -0.22676047682762146, 0.14354223012924194, 0.41794025897979736, -0.15798744559288025, -0.6669500470161438, -0.27597495913505554, -0.2476249635219574, 0.06740418821573257, 0.34839510917663574, -0.22233036160469055, -0.0237540565431118, 0.07897640764713287, -0.02513517253100872, -0.010596646927297115, -0.17324864864349365, 0.2654404044151306, -0.20421594381332397, 0.3342370390892029, -0.2791113257408142, 0.018276255577802658, 0.14739957451820374, -0.17153893411159515, 0.5445711612701416, -0.2094573676586151, -0.02875974401831627, 0.054388243705034256, -0.308657705783844, -0.14350977540016174, -0.2189750075340271, 0.051116861402988434, -0.06511012464761734, 0.26553869247436523, -0.3146512806415558, 0.1346651166677475, -0.07396247982978821, 0.19193050265312195, 0.3417604863643646, -0.018082961440086365, 0.053287211805582047, 0.39453768730163574, 0.17018325626850128, 0.11481840163469315, 0.24707353115081787, 0.021706271916627884, 0.16041141748428345, -0.3691755533218384, -0.41169124841690063, -0.1984129250049591, 0.29682064056396484, -0.3843516707420349, -0.18433482944965363, 0.017970385029911995, 0.15461987257003784, -0.06036822125315666, -0.15906116366386414, 0.10618826746940613, -0.24164511263370514, 0.6165449619293213, 0.01325593888759613, 0.17451627552509308, -0.1605702042579651, 0.2529647946357727, 0.09048908948898315, -0.3220645487308502, 0.06645512580871582, -0.07480497658252716, 0.05891958251595497, -0.21373775601387024, 0.2786625623703003, 0.08238028734922409, 0.08563734591007233, 0.07270228117704391, -0.05008697509765625, -0.22746022045612335, -0.17069998383522034, 0.33198466897010803, -0.056590210646390915, 0.18562692403793335, -0.07027681171894073, 0.02259887009859085, -0.08924925327301025, 0.0455862432718277, -0.2506638467311859, 0.17651167511940002, -0.31549036502838135, 0.03668329119682312, -0.332283079624176, -0.01699410006403923, -0.1449485719203949, -0.23640130460262299, 0.18425753712654114, -0.3764442503452301, 0.16057223081588745, -0.23689956963062286, -0.16559529304504395, -0.23464620113372803, -0.0204163771122694, 0.06661775708198547, -0.09222088009119034, 0.021499186754226685, -0.16210542619228363, -0.04552168771624565, -0.13194400072097778, 0.1224769651889801, 0.19485673308372498, -0.23803862929344177, -0.038755327463150024, -0.17923831939697266, 0.2883792519569397, -0.6107163429260254, -0.5387745499610901, 0.42886513471603394, 0.3202892541885376, 0.2134130597114563, 0.060875385999679565, -0.03580446168780327, 0.09456883370876312, -0.06339938193559647, 0.05014170706272125, 0.2531704902648926, -0.0817926749587059, -0.1963619738817215, -0.19634874165058136, -0.24538451433181763, -0.2283829003572464, 0.22239595651626587, 0.04740224778652191, 0.13123565912246704, -0.08020602911710739, -0.4446586072444916, 0.10562143474817276, 0.1959269791841507, 0.10621686279773712, 0.5630508065223694, 0.7261494994163513, 0.6027477383613586, 0.040220003575086594, -0.40732383728027344, -0.18936952948570251, 0.2407974898815155, 0.01996355503797531, -0.09165546298027039, -0.1714114397764206, 0.04567335546016693, 0.025820303708314896, 0.026433756574988365, -0.09422782063484192, 0.016168158501386642, -0.05529465526342392, 0.06646496057510376, 0.2926234006881714, -0.040462810546159744, -0.029897641390562057, 0.6117343902587891, 0.23161016404628754, 0.22971753776073456, -0.37151291966438293, 0.20682229101657867, -0.3599906265735626, -0.1485821008682251, 0.268321692943573, 0.13687220215797424, 0.18325188755989075, -0.09153150767087936, -0.051101528108119965, 0.26436716318130493, 0.18401865661144257, 0.041193824261426926, -0.16388139128684998, 0.1884448528289795, 0.09463777393102646, -0.19616113603115082, -0.10505399852991104, -0.05794285610318184, -0.011424625292420387, 0.16514137387275696, 0.3218226134777069, 0.08808748424053192, -0.14623215794563293, 0.45760446786880493, -0.05409806966781616, 0.10351637750864029, 0.2552739679813385, -0.19697587192058563, -0.26804131269454956, -0.08665929734706879, 0.2569870948791504, -0.19085034728050232, 0.12899400293827057, 0.2155349850654602, 0.08224359154701233, -0.0367572084069252, 0.228575199842453, 0.0027483440935611725, -0.24620750546455383, 0.1820288896560669, 0.09116547554731369, 0.22612568736076355, 0.32781392335891724, 0.28869542479515076, 0.7621920108795166, 0.19453459978103638, -0.2855640649795532, -0.039740607142448425, -0.06376073509454727, -0.02015254832804203, 0.29901206493377686, 0.33384954929351807, 0.2663325369358063, 0.01812921091914177, 0.256415992975235, 0.253291517496109, 0.1278628408908844, -0.04434654489159584, -0.28970634937286377, -0.04622866213321686, -0.32518914341926575, 0.33388447761535645, -0.28832364082336426, -0.2013208270072937, -0.10578379034996033, -0.19491665065288544, -0.2884882986545563, -0.13049569725990295, -0.08416365832090378, 0.3510158360004425, 0.1873696744441986, 0.11183451116085052, -0.008309341967105865, -0.07169826328754425, -0.17891553044319153, -0.1294671595096588, -0.14090323448181152, 0.06727834045886993, -0.30820831656455994, -0.03452679142355919, 0.27098360657691956, -0.12488945573568344, 0.1389024555683136, -0.10156147181987762, -0.04662775248289108, -0.25608697533607483, -0.4974345266819, 0.0744723528623581, -0.37323445081710815, 0.6589609384536743, 0.2948639988899231, -0.04633471369743347, 0.2170855551958084, -0.07397496700286865, 0.08406141400337219, 0.03048746846616268, -0.1963135153055191, -0.05363789573311806, 0.0017625591717660427, -0.2760913670063019, -0.12375208735466003, -0.19424700736999512, -0.10734208673238754, -0.23512345552444458, 0.33838409185409546, -0.16514812409877777, 0.04973556101322174, -0.03912915661931038, 0.2758867144584656, -0.1709413230419159, -0.24038547277450562, 0.11839382350444794, -0.05966591835021973, -0.004264842718839645, 0.09976805746555328, 0.13176167011260986, -0.19670827686786652, 0.07822947204113007, 0.04034829139709473, 0.3409539461135864, -0.017068039625883102, -0.4572872519493103, -0.17699705064296722, -0.24382688105106354, 0.2199074625968933, -0.1560778170824051, 0.1177929937839508, 0.46753740310668945, 0.11116766929626465, 0.07617871463298798, -0.3768996596336365, -0.16449427604675293, -0.2346142828464508, -0.26629191637039185, 0.258590430021286, 0.12419134378433228, 0.2987390458583832, -0.04642860218882561, 0.33173906803131104, 0.5337492823600769, -0.11415058374404907, 0.41776567697525024, 0.21673138439655304, 0.35064709186553955, 0.2736058235168457, -0.33921268582344055, -0.0912415012717247, -0.049577102065086365, 0.09146491438150406, 0.0338127464056015, 0.0060623083263635635, -0.00002107955515384674, -0.3701437711715698, 0.3064813017845154, -0.3609774112701416, -0.03911793977022171, -0.22523275017738342, -0.24187713861465454, 0.3245288133621216, 0.14514786005020142, -0.19205120205879211, 0.2306748628616333, 0.09152406454086304, -0.03612949699163437, 0.2004714012145996, -0.08292574435472488, -0.011403990909457207, -0.09098677337169647, -0.09130791574716568, -0.03276948630809784, 0.23119592666625977, 0.0629236176609993, 0.3602600693702698, -0.16533216834068298, 0.27410662174224854, -0.12821602821350098, -0.09370093047618866, 0.8236984610557556, -0.4645780920982361, -0.3640505075454712, -0.002934865653514862, 0.08977368474006653, -0.843433141708374, -0.04735960438847542, -0.12147343158721924, 0.15229956805706024, 0.3617265224456787, 0.4875413775444031, -0.2219611406326294, -0.11451541632413864, -0.006722941994667053, -0.15410178899765015, 0.15090115368366241, -0.330644428730011, -0.5191431045532227, -0.0019256174564361572, -0.2981081008911133, -0.19494062662124634, -0.03496775031089783, -0.08375157415866852, -0.06656090915203094, -0.29638397693634033, -0.1293308287858963, 0.09081371128559113, 0.04716719686985016, 0.019247569143772125, 0.0975634977221489, -0.32636362314224243, 0.2829209864139557, -0.04200085252523422, -0.17525850236415863, 0.4781459867954254, 0.5993887186050415, -0.00021930783987045288, -0.4971309304237366, -0.03921571001410484, 0.05910724774003029, 0.359569787979126, 0.1178768128156662, -0.10939386487007141, -0.10610625892877579, -0.11394062638282776, -0.042731910943984985, -0.21965110301971436, -0.13460473716259003, 0.3951869308948517, 0.25048279762268066, -0.16342657804489136, -0.19286507368087769, 0.11269715428352356, 0.4217025339603424, -0.09322170168161392, 0.17103758454322815, 0.11932431906461716, -0.025860441848635674, 0.1852678656578064, -0.03494581580162048, 0.7647661566734314, 0.12703028321266174, 0.0656202882528305, 0.21761932969093323, -0.32281744480133057, 0.4311704635620117, -0.09310843050479889, 0.015330533497035503, -0.03373724967241287, 0.07331689447164536, -0.18867912888526917, -0.23583024740219116, 0.3755020499229431, -0.07589106261730194, -0.25260767340660095, 0.5281192064285278, 0.23664216697216034, -0.44251617789268494, 0.22809424996376038, 0.025960825383663177, -0.13808071613311768, -0.11921176314353943, -0.339061439037323, 0.11859138309955597, -0.1517380177974701, 0.1884954571723938, -0.08751394599676132, -0.042248789221048355, -0.44199883937835693, -0.3538023829460144, -0.40218985080718994, 0.12108569592237473, -0.3186270594596863, -0.1561073213815689, 0.22800683975219727, 0.1822384148836136, 0.3198651671409607, 0.09894202649593353, 0.11113423109054565, 0.18546098470687866, -0.1343623250722885, 0.10915972292423248, 0.2361457347869873, -0.129980206489563, 0.11194856464862823, -0.14484085142612457, -0.10417556762695312, -0.07958435267210007, -0.04779905080795288, -0.3104743957519531, -0.23708108067512512, -0.11722002178430557, 0.07111652195453644, 0.2855445146560669, -0.012635834515094757, -0.023547295480966568, -0.2848401665687561, 0.023100249469280243, 0.3006099760532379, -0.10332983732223511, 0.083955317735672, 0.026819147169589996, 0.14610260725021362, 0.512725830078125, -0.2862900495529175, -0.15329132974147797, -0.06656412780284882, 0.4364032447338104, -0.05156859755516052, -0.0641576498746872, 0.05596529319882393, -0.005402728915214539, -0.20800703763961792, 0.01683947816491127, -0.28842583298683167, -0.5677359104156494, -0.0746762752532959, -0.17248576879501343, -0.053520567715168, -0.4057442545890808, -0.049422115087509155, 0.28723129630088806, 0.3165512681007385, 0.033588752150535583, 0.10424402356147766, -0.3534347414970398, 0.1693936437368393, 0.09109461307525635, -0.02111014351248741, 0.1529136300086975, -0.07764650881290436, -0.1108245700597763, -0.1921459436416626, 0.08453860133886337, -0.13951972126960754, 0.10810540616512299, -0.150597482919693, 0.06845831125974655, 0.03642353042960167, 0.0842515379190445, 0.15195809304714203, -0.4639503061771393, -0.05833139270544052, 0.2553470730781555, -0.14455020427703857, -0.07964441180229187, 0.0036587808281183243, 0.15701645612716675, 0.2974421977996826, -0.15042878687381744, -0.07526220381259918, -0.24671447277069092, 0.021614419296383858, 0.07678458094596863, -0.07072395086288452, 0.3464611768722534, -0.06071281433105469, -0.0719546228647232, -0.43626055121421814, 0.15839380025863647, 0.1585143357515335, 0.31643104553222656, -0.10454076528549194, 0.014429062604904175, 0.2736179828643799, 0.3491969108581543, 0.1311027705669403, 0.029380135238170624, -0.07913420349359512, -0.09511256963014603, 0.12410864233970642, 0.041023969650268555, 0.08699041604995728, -0.29101496934890747, -0.18077002465724945, 0.38836929202079773, 0.3752678632736206, 0.4277852475643158, -0.12926819920539856, -0.037170130759477615, 0.09506196528673172, 0.14384660124778748, -0.09732050448656082, -0.2137589156627655, -0.06727518141269684, 0.12210776656866074, -0.14245377480983734, 0.09577088057994843, 0.18925268948078156, -0.16249248385429382, 0.29922783374786377, 0.3513006567955017, 0.21764366328716278, 0.25660449266433716, 0.3560064435005188, -0.2483292520046234, 0.0281711183488369, 0.10158923268318176, 0.2859807014465332, -0.17994552850723267, 0.010687470436096191, 0.1491975337266922, -0.029512152075767517, 0.1277608424425125, -0.2730425000190735, 0.033337391912937164, 0.06626315414905548, -0.2508247196674347, 0.03290272876620293, -0.2743898034095764, 0.06877177208662033, 0.01622028276324272, 0.09445895254611969, 0.2673377990722656, -0.1945742964744568, -0.29438844323158264, -0.11975390464067459, -0.10860784351825714, -0.02111830562353134, -0.11891584098339081, 0.22503197193145752, -0.020769402384757996, 0.2792647182941437, -0.12506303191184998, 0.08498391509056091, -0.1811407208442688, 0.7051993608474731, 0.23179693520069122, -0.24134473502635956, -0.5639019012451172, 0.05520513653755188, 0.27368563413619995, 0.02283162623643875, 0.0006614923477172852, 0.4787062108516693, -0.05694550275802612, -0.3192949891090393, -0.23617911338806152, 0.2939014732837677, 0.7087401747703552, 0.3057974576950073, 0.19338685274124146, -0.18188725411891937, -0.1853182166814804, 0.030013209208846092, -0.06393115222454071, 0.37766245007514954, -0.19604021310806274, 0.3401232063770294, 0.20422852039337158, 0.09748654067516327, -0.079949289560318, -0.06515613198280334, -0.1252502053976059, 0.43076539039611816, -0.5256727337837219, 0.3925979733467102, -0.39443832635879517, 0.19676178693771362, 0.1604757159948349, 0.36831581592559814, -0.6633337736129761, 0.19341887533664703, 0.4372611939907074, -0.004143496509641409, -0.037798259407281876, -0.10847926884889603, 0.04063546657562256, -0.029302585870027542, 0.24555423855781555, 0.38377565145492554, 0.17941266298294067, -0.1386931985616684, -0.13529008626937866, -0.3709452748298645, 0.17597778141498566, -0.39618709683418274, 0.24677905440330505, 0.122614786028862, 0.15511436760425568, 0.11526861786842346, 0.19712819159030914, 0.11909584701061249, 0.10356083512306213, -0.0872758999466896, 0.1280268430709839, -0.3443451225757599, -0.03565671667456627, -0.043761320412158966, -0.32161617279052734, 0.38106462359428406, -0.3144477307796478, 0.05670793727040291, 0.023866873234510422, -0.12070298194885254, -0.042455777525901794, 0.12204425036907196, 0.13817192614078522, -0.30685490369796753, 0.40494468808174133, 0.2299298346042633, 0.3844732344150543, -0.002429332584142685, -0.28431397676467896, -0.12389811873435974, -0.15945515036582947, -0.26147326827049255, 0.27278193831443787, -0.2274574339389801, 0.23073118925094604, -0.5984925627708435, 0.15247678756713867, -0.28073498606681824, 0.15579192340373993, -0.007117025554180145, 0.009699329733848572, 0.018758198246359825, 0.12139631062746048, -0.13264784216880798, 0.25074684619903564, -0.255816251039505, 0.18720906972885132, 0.09851256012916565, 0.3313947319984436, -0.43530410528182983, -0.31846028566360474, 0.3059464395046234, -0.4210299253463745, -0.1332758367061615, 0.06287990510463715, 0.06885398924350739, 0.1543492078781128, -0.3493395149707794, -0.687364935874939, -0.08710750937461853, 0.29410848021507263, 0.012035785242915154, -0.06914818286895752, 0.2843652665615082, -0.11583951115608215, -0.039188772439956665, -0.07090753316879272, 0.6490457057952881, 0.038176774978637695, -0.01614006981253624, 0.5660128593444824, -0.01762165129184723 ]
https://github.com/huggingface/datasets/issues/6765
Compatibility issue between s3fs, fsspec, and datasets
> Hi! Instead of running `pip install` separately for each package, you should pass all the packages to a single `pip install` call (in this case, `pip install datasets s3fs`) to let `pip` properly resolve their versions. you are awesome bro
### Describe the bug Here is the full error stack when installing: ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 2.18.0 requires fsspec[http]<=2024.2.0,>=2023.1.0, but you have fsspec 2024.3.1 which is incompatible. Successfully installed aiobotocore-2.12.1 aioitertools-0.11.0 botocore-1.34.51 fsspec-2024.3.1 jmespath-1.0.1 s3fs-2024.3.1 urllib3-2.0.7 wrapt-1.16.0 ``` When I install with pip, pip allows this error to exist while still installing s3fs, but this error breaks poetry, since poetry will refuse to install s3fs because of the dependency conflict. Maybe I'm missing something so maybe it's not a bug but some mistake on my end? Any input would be helpful. Thanks! ### Steps to reproduce the bug 1. conda create -n tmp python=3.10 -y 2. conda activate tmp 3. pip install datasets 4. pip install s3fs ### Expected behavior I would expect there to be no error. ### Environment info MacOS (ARM), Python3.10, conda 23.11.0.
41
Compatibility issue between s3fs, fsspec, and datasets ### Describe the bug Here is the full error stack when installing: ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 2.18.0 requires fsspec[http]<=2024.2.0,>=2023.1.0, but you have fsspec 2024.3.1 which is incompatible. Successfully installed aiobotocore-2.12.1 aioitertools-0.11.0 botocore-1.34.51 fsspec-2024.3.1 jmespath-1.0.1 s3fs-2024.3.1 urllib3-2.0.7 wrapt-1.16.0 ``` When I install with pip, pip allows this error to exist while still installing s3fs, but this error breaks poetry, since poetry will refuse to install s3fs because of the dependency conflict. Maybe I'm missing something so maybe it's not a bug but some mistake on my end? Any input would be helpful. Thanks! ### Steps to reproduce the bug 1. conda create -n tmp python=3.10 -y 2. conda activate tmp 3. pip install datasets 4. pip install s3fs ### Expected behavior I would expect there to be no error. ### Environment info MacOS (ARM), Python3.10, conda 23.11.0. > Hi! Instead of running `pip install` separately for each package, you should pass all the packages to a single `pip install` call (in this case, `pip install datasets s3fs`) to let `pip` properly resolve their versions. you are awesome bro
[ -0.21253354847431183, 0.0397123247385025, -0.1161235123872757, 0.4506732225418091, 0.10362973064184189, -0.3032476603984833, -0.11845283210277557, 0.1645442247390747, -0.16454802453517914, 0.010245010256767273, 0.10515247285366058, 0.7001554369926453, 0.1645832508802414, 0.2848645746707916, -0.5554219484329224, 0.19078375399112701, 0.3186761736869812, 0.14804324507713318, -0.03200206160545349, 0.06834135949611664, -0.005690872669219971, 0.41114723682403564, -0.1830870509147644, -0.18696598708629608, -0.09033866971731186, 0.2120741456747055, -0.12802399694919586, 0.10661275684833527, -0.3632107973098755, -0.31027543544769287, 0.6209111213684082, 0.22016829252243042, 0.03651629760861397, 0.5388235449790955, -0.00012575449363794178, -0.08370538800954819, 0.36383914947509766, -0.015509365126490593, -0.13757947087287903, -0.3798784017562866, -0.5762103199958801, -0.26579031348228455, 0.12838390469551086, 0.07052934914827347, 0.0669010654091835, 0.16531771421432495, -0.19931244850158691, -0.3085692822933197, 0.4496992826461792, 0.29281044006347656, 0.07978726923465729, 0.16093704104423523, 0.3478502929210663, 0.0823991522192955, 0.3084718883037567, -0.047970131039619446, -0.16041594743728638, 0.009702606126666069, 0.1769750416278839, -0.11984563618898392, 0.23670423030853271, 0.21514008939266205, -0.2783489227294922, 0.14671088755130768, 0.2654820382595062, -0.17202354967594147, 0.20489636063575745, -0.4038011133670807, -0.20595386624336243, 0.1379992961883545, 0.46174106001853943, -0.1620018482208252, -0.6703526377677917, -0.2779718339443207, -0.22211046516895294, 0.06468988209962845, 0.36773690581321716, -0.22774095833301544, -0.027725879102945328, 0.08209414780139923, -0.04659689590334892, -0.015018020756542683, -0.1794452965259552, 0.2715247869491577, -0.2278270721435547, 0.3459387719631195, -0.26505959033966064, 0.0028852932155132294, 0.1538495421409607, -0.19084089994430542, 0.5627049803733826, -0.19805914163589478, -0.028608668595552444, 0.05647381395101547, -0.3171434998512268, -0.1592903733253479, -0.2100028693675995, 0.027322690933942795, -0.07120192795991898, 0.2849399447441101, -0.3353116810321808, 0.12231273204088211, -0.10627914220094681, 0.18193072080612183, 0.3302943706512451, -0.01915123499929905, 0.08111497014760971, 0.3764581084251404, 0.1810498833656311, 0.10786205530166626, 0.24668839573860168, 0.021987859159708023, 0.14968015253543854, -0.38677093386650085, -0.4024747312068939, -0.1906597912311554, 0.2946992516517639, -0.4051555395126343, -0.17599789798259735, 0.022548751905560493, 0.14709720015525818, -0.0537099651992321, -0.17347286641597748, 0.10394182801246643, -0.22233779728412628, 0.6072306036949158, 0.03601270169019699, 0.19039762020111084, -0.15867839753627777, 0.24888241291046143, 0.09064950793981552, -0.35522717237472534, 0.06092880293726921, -0.04646788537502289, 0.06946542859077454, -0.20069150626659393, 0.2840575873851776, 0.06981503963470459, 0.1087450236082077, 0.07758808135986328, -0.04743601381778717, -0.20127961039543152, -0.17633089423179626, 0.3291471004486084, -0.09514279663562775, 0.18014483153820038, -0.06320373713970184, 0.017337419092655182, -0.09502647817134857, 0.039949242025613785, -0.23113274574279785, 0.17651711404323578, -0.345918208360672, 0.042138248682022095, -0.3318885564804077, -0.03622610867023468, -0.1305222511291504, -0.22015167772769928, 0.16506840288639069, -0.3602055013179779, 0.138290673494339, -0.21865643560886383, -0.1662857085466385, -0.22466981410980225, -0.009961167350411415, 0.07923474162817001, -0.1240646094083786, 0.02502330392599106, -0.16745567321777344, -0.027997996658086777, -0.15652897953987122, 0.10674354434013367, 0.17533452808856964, -0.23650890588760376, -0.03735283762216568, -0.165944904088974, 0.2744588851928711, -0.5977367758750916, -0.5065563321113586, 0.4086933732032776, 0.3137633800506592, 0.20604996383190155, 0.04883723333477974, -0.045035216957330704, 0.10704133659601212, -0.057482071220874786, 0.07415962964296341, 0.25686120986938477, -0.06332574784755707, -0.20985102653503418, -0.18358972668647766, -0.2543618679046631, -0.2301860898733139, 0.22571001946926117, 0.038358286023139954, 0.14914533495903015, -0.06891714781522751, -0.4690294861793518, 0.11680971086025238, 0.17662107944488525, 0.10755529254674911, 0.5517845153808594, 0.7439258098602295, 0.5993190407752991, 0.035841334611177444, -0.40385526418685913, -0.21508833765983582, 0.25132742524147034, 0.04763208329677582, -0.0699857547879219, -0.17370449006557465, 0.046028077602386475, 0.03651704639196396, 0.024569643661379814, -0.09051172435283661, 0.014606770128011703, -0.05258755758404732, 0.06578638404607773, 0.27947911620140076, -0.03131955862045288, -0.03544926643371582, 0.6029762625694275, 0.25839242339134216, 0.21472275257110596, -0.3520541787147522, 0.21629753708839417, -0.35513415932655334, -0.14121970534324646, 0.2919084131717682, 0.13222041726112366, 0.17827259004116058, -0.09068635106086731, -0.06960640847682953, 0.2834206819534302, 0.187674880027771, 0.03684154525399208, -0.13206270337104797, 0.21251103281974792, 0.09265301376581192, -0.17173008620738983, -0.0918494239449501, -0.07399332523345947, -0.02530655637383461, 0.16641950607299805, 0.31536927819252014, 0.10743360966444016, -0.12096183001995087, 0.437135249376297, -0.0645805150270462, 0.11472224444150925, 0.2621656060218811, -0.18913760781288147, -0.2537776231765747, -0.0933484360575676, 0.2492322325706482, -0.18971073627471924, 0.09590877592563629, 0.22543929517269135, 0.06461286544799805, -0.013142883777618408, 0.25427719950675964, -0.006193570792675018, -0.257436066865921, 0.19508299231529236, 0.08030245453119278, 0.22375056147575378, 0.3378061056137085, 0.2597986161708832, 0.7722172141075134, 0.18957188725471497, -0.2820885479450226, -0.028896944597363472, -0.0774630531668663, -0.02865445613861084, 0.3157336413860321, 0.31536802649497986, 0.30509763956069946, -0.01298028975725174, 0.2576698064804077, 0.25348010659217834, 0.12236350029706955, -0.08930234611034393, -0.29300037026405334, -0.040534891188144684, -0.32063499093055725, 0.3284074366092682, -0.29054638743400574, -0.18861085176467896, -0.11304366588592529, -0.17855587601661682, -0.30236104130744934, -0.13440890610218048, -0.09007885307073593, 0.3646576702594757, 0.2032829225063324, 0.11800316721200943, -0.01781764253973961, -0.047121986746788025, -0.1658647060394287, -0.13239724934101105, -0.14880305528640747, 0.056095656007528305, -0.3202882409095764, -0.03351081162691116, 0.2871982753276825, -0.15404516458511353, 0.12844662368297577, -0.09169593453407288, -0.03961537778377533, -0.2565239369869232, -0.5231776833534241, 0.05000244081020355, -0.36454951763153076, 0.6457793116569519, 0.27870309352874756, -0.048353567719459534, 0.2126116305589676, -0.08015339076519012, 0.07728707790374756, 0.0418088361620903, -0.1955658346414566, -0.04708045348525047, 0.001794600859284401, -0.28287526965141296, -0.12454275786876678, -0.2148895561695099, -0.08350685983896255, -0.23519699275493622, 0.3382152318954468, -0.1529277265071869, 0.04118333384394646, -0.01892109587788582, 0.2789318859577179, -0.16384801268577576, -0.2359001487493515, 0.11645767837762833, -0.061816222965717316, -0.014859642833471298, 0.11437572538852692, 0.11559169739484787, -0.19946202635765076, 0.08398400247097015, 0.07509438693523407, 0.34028422832489014, -0.018373118713498116, -0.4878394603729248, -0.16975942254066467, -0.24902375042438507, 0.22113093733787537, -0.1554689109325409, 0.09564300626516342, 0.4684064984321594, 0.13216397166252136, 0.06730837374925613, -0.37197986245155334, -0.1809009164571762, -0.22438925504684448, -0.2610135078430176, 0.2654400169849396, 0.106336809694767, 0.29483160376548767, -0.05867863446474075, 0.3093774914741516, 0.5171326398849487, -0.14750318229198456, 0.4151197075843811, 0.22800546884536743, 0.3498575985431671, 0.2410302460193634, -0.32864272594451904, -0.07057584077119827, -0.040906623005867004, 0.1009172648191452, 0.034199655055999756, 0.003610098734498024, -0.030117103829979897, -0.3861604332923889, 0.31293442845344543, -0.3592650592327118, -0.042264673858881, -0.22415819764137268, -0.26939764618873596, 0.30320632457733154, 0.14756906032562256, -0.1813463419675827, 0.19155548512935638, 0.09303449839353561, -0.027459420263767242, 0.1930139809846878, -0.08435916155576706, -0.016612675040960312, -0.11869844794273376, -0.06600800901651382, -0.02724451571702957, 0.25357329845428467, 0.027206413447856903, 0.35528644919395447, -0.16128817200660706, 0.24891293048858643, -0.12853631377220154, -0.09580498188734055, 0.8553295731544495, -0.4599590599536896, -0.37841445207595825, -0.007936323992908001, 0.10118153691291809, -0.8446740508079529, -0.04528173431754112, -0.09826716780662537, 0.1586935818195343, 0.37303733825683594, 0.5287668704986572, -0.21023589372634888, -0.11335290223360062, -0.034138694405555725, -0.14624984562397003, 0.15865446627140045, -0.331103652715683, -0.5125537514686584, 0.02698986977338791, -0.2940584421157837, -0.20277869701385498, -0.056647442281246185, -0.06438811123371124, -0.07587362080812454, -0.3131154179573059, -0.13286955654621124, 0.06888524442911148, 0.06200987473130226, 0.04765802621841431, 0.0989118218421936, -0.31118181347846985, 0.3109012544155121, -0.016424212604761124, -0.15522129833698273, 0.49422237277030945, 0.5903643369674683, 0.013641396537423134, -0.5296639204025269, -0.03858426585793495, 0.04305848479270935, 0.3681786060333252, 0.1479271501302719, -0.09417296946048737, -0.11619647592306137, -0.1132611483335495, -0.0417604073882103, -0.2204742133617401, -0.12545756995677948, 0.4018993675708771, 0.2537226676940918, -0.19204534590244293, -0.18893557786941528, 0.09263940900564194, 0.39393287897109985, -0.10167218744754791, 0.19520586729049683, 0.12442637979984283, -0.03684151917695999, 0.19426849484443665, -0.024081416428089142, 0.8082056045532227, 0.10253272950649261, 0.07864578068256378, 0.2102896273136139, -0.31322187185287476, 0.4454706013202667, -0.11583908647298813, 0.01355084590613842, -0.032856814563274384, 0.06818197667598724, -0.18092410266399384, -0.2293797880411148, 0.3758313059806824, -0.06520246714353561, -0.24160566926002502, 0.5093041062355042, 0.19829516112804413, -0.4313253164291382, 0.23345772922039032, 0.01574249193072319, -0.12639658153057098, -0.1296750009059906, -0.33999305963516235, 0.12267738580703735, -0.12836293876171112, 0.18552644550800323, -0.08030462265014648, -0.0487627312541008, -0.44242000579833984, -0.33380037546157837, -0.4030640721321106, 0.1270717978477478, -0.3100507855415344, -0.16012313961982727, 0.23197481036186218, 0.19035537540912628, 0.3191392123699188, 0.10617033392190933, 0.1490056812763214, 0.19897916913032532, -0.14501850306987762, 0.109011709690094, 0.22892919182777405, -0.11657790094614029, 0.12158651649951935, -0.16288651525974274, -0.09486745297908783, -0.07473790645599365, -0.07509756088256836, -0.28475895524024963, -0.21259145438671112, -0.14631587266921997, 0.05182527005672455, 0.2633706331253052, -0.04107372462749481, -0.011091325432062149, -0.2501806914806366, 0.02668076753616333, 0.3066551387310028, -0.1156492829322815, 0.08797326683998108, 0.01670786365866661, 0.14906471967697144, 0.5067554712295532, -0.29314297437667847, -0.17022475600242615, -0.0763942152261734, 0.44610023498535156, -0.07040359824895859, -0.04069095477461815, 0.06289881467819214, 0.014742400497198105, -0.19896283745765686, 0.00833655521273613, -0.2907533645629883, -0.5649448037147522, -0.0815589651465416, -0.1750512719154358, -0.03611191362142563, -0.41125887632369995, -0.04795248806476593, 0.2665462791919708, 0.3144327998161316, 0.031498078256845474, 0.12585929036140442, -0.3552815616130829, 0.174615278840065, 0.07344456762075424, -0.05259160324931145, 0.15515786409378052, -0.07729090750217438, -0.06720195710659027, -0.2095678299665451, 0.06906820088624954, -0.14607416093349457, 0.11958532780408859, -0.14549843966960907, 0.07825390994548798, 0.025992486625909805, 0.07208477705717087, 0.17160487174987793, -0.47668424248695374, -0.05470298230648041, 0.24793747067451477, -0.1432175189256668, -0.08017344772815704, -0.006077617406845093, 0.1574101746082306, 0.2983754873275757, -0.1593703180551529, -0.0690794512629509, -0.2623068690299988, 0.00388377346098423, 0.0679280012845993, -0.06913051754236221, 0.3504447937011719, -0.05014539510011673, -0.07874219119548798, -0.4309426248073578, 0.13972784578800201, 0.17627941071987152, 0.3005472421646118, -0.08550460636615753, 0.011757887899875641, 0.26774775981903076, 0.3447842597961426, 0.10396843403577805, 0.015190981328487396, -0.09345424175262451, -0.07111518830060959, 0.08806050568819046, 0.05974547564983368, 0.09103384613990784, -0.2720978260040283, -0.19328047335147858, 0.39709705114364624, 0.3836788237094879, 0.4539787769317627, -0.11254843324422836, -0.047239430248737335, 0.12087318301200867, 0.14608073234558105, -0.09707780182361603, -0.2191360890865326, -0.08090555667877197, 0.11374333500862122, -0.16484315693378448, 0.09294548630714417, 0.16415804624557495, -0.14282935857772827, 0.30842024087905884, 0.3409079909324646, 0.18754535913467407, 0.2588821053504944, 0.37864744663238525, -0.25744035840034485, 0.03516141697764397, 0.10494040697813034, 0.28735631704330444, -0.1719122976064682, 0.009769037365913391, 0.16432836651802063, -0.055717818439006805, 0.10280843824148178, -0.27666833996772766, 0.02688102424144745, 0.06567560136318207, -0.2670046389102936, 0.031844060868024826, -0.25532758235931396, 0.06527034938335419, 0.01344028115272522, 0.10110495984554291, 0.2665894329547882, -0.19232256710529327, -0.3256547749042511, -0.1479347199201584, -0.11925415694713593, -0.023160859942436218, -0.10172291100025177, 0.20841896533966064, -0.03715594857931137, 0.2852115035057068, -0.11636979877948761, 0.0764899030327797, -0.18999497592449188, 0.7166650295257568, 0.2307973951101303, -0.24642466008663177, -0.5887578129768372, 0.05044183135032654, 0.25544464588165283, 0.03058713674545288, 0.018325459212064743, 0.47214624285697937, -0.06777560710906982, -0.3344007730484009, -0.21485617756843567, 0.2819526195526123, 0.6949802041053772, 0.3048309087753296, 0.19485613703727722, -0.16762371361255646, -0.18453679978847504, 0.03368423134088516, -0.07018865644931793, 0.36613139510154724, -0.18593472242355347, 0.32412558794021606, 0.21572841703891754, 0.10256921499967575, -0.07689239084720612, -0.06000532582402229, -0.12444712221622467, 0.4524392783641815, -0.5348700881004333, 0.3708685636520386, -0.3730539083480835, 0.2181452512741089, 0.14995767176151276, 0.36340779066085815, -0.6342434883117676, 0.17804427444934845, 0.4449814558029175, 0.00685595627874136, -0.04491943493485451, -0.10963187366724014, 0.04063742980360985, -0.01855427399277687, 0.2436114251613617, 0.38697925209999084, 0.18075355887413025, -0.13828331232070923, -0.13024255633354187, -0.3674842119216919, 0.19023378193378448, -0.3720785081386566, 0.23956933617591858, 0.10755487531423569, 0.1615290641784668, 0.1451076865196228, 0.16499030590057373, 0.12442167848348618, 0.11025676876306534, -0.0998959094285965, 0.11514121294021606, -0.36571675539016724, -0.02780882641673088, -0.06780451536178589, -0.31090274453163147, 0.37241169810295105, -0.306525319814682, 0.08057825267314911, 0.0098569942638278, -0.11549307405948639, -0.05154627561569214, 0.13442812860012054, 0.1291993111371994, -0.2778496742248535, 0.422383189201355, 0.22162817418575287, 0.3759777843952179, 0.019109416753053665, -0.28539103269577026, -0.1543130874633789, -0.1740085780620575, -0.26060372591018677, 0.27987417578697205, -0.21837690472602844, 0.2194281667470932, -0.6157901883125305, 0.16173537075519562, -0.27206310629844666, 0.19745886325836182, -0.0066433921456336975, 0.01934484951198101, -0.0012689121067523956, 0.1303527057170868, -0.1333712637424469, 0.23455926775932312, -0.2374993860721588, 0.1983354389667511, 0.09303170442581177, 0.3353639245033264, -0.42447733879089355, -0.29155832529067993, 0.31955716013908386, -0.4168755114078522, -0.15280649065971375, 0.08093024045228958, 0.06329324841499329, 0.16557219624519348, -0.3538280129432678, -0.6990500688552856, -0.07430928200483322, 0.2918899953365326, 0.017297783866524696, -0.08326222747564316, 0.29075154662132263, -0.10271060466766357, -0.04161091521382332, -0.08606726676225662, 0.6528440713882446, 0.04109249264001846, -0.02288265898823738, 0.564691960811615, -0.0002915412187576294 ]
https://github.com/huggingface/datasets/issues/6760
Load codeparrot/apps raising UnicodeDecodeError in datasets-2.18.0
Here is the requirements.txt from a clean virtual environment (managed by conda) where I only install `datasets` by `pip install datasets`. The pip list: ``` aiohttp==3.9.3 aiosignal==1.3.1 attrs==23.2.0 certifi==2024.2.2 charset-normalizer==3.3.2 datasets==2.18.0 dill==0.3.8 filelock==3.13.3 frozenlist==1.4.1 fsspec==2024.2.0 huggingface-hub==0.22.2 idna==3.6 multidict==6.0.5 multiprocess==0.70.16 numpy==1.26.4 packaging==24.0 pandas==2.2.1 pyarrow==15.0.2 pyarrow-hotfix==0.6 python-dateutil==2.9.0.post0 pytz==2024.1 PyYAML==6.0.1 requests==2.31.0 six==1.16.0 tqdm==4.66.2 typing_extensions==4.11.0 tzdata==2024.1 urllib3==2.2.1 xxhash==3.4.1 yarl==1.9.4 ``` And the error can be reproduced. Downgrading to datasets==2.14.6 changes some packages' versions: ``` Successfully installed datasets-2.14.6 dill-0.3.7 fsspec-2023.10.0 multiprocess-0.70.15 ``` and the dataset can be downloaded and loaded. Then I upgrade the version to 2.18.0 again; now the dataset can be loaded with such a line: ```Using the latest cached version of the module from /home/xxx/.cache/huggingface/modules/datasets_modules/datasets/codeparrot--apps/04ac807715d07d6e5cc580f59cdc8213cd7dc4529d0bb819cca72c9f8e8c1aa5 (last modified on Sun Apr 7 09:06:43 2024) since it couldn't be found locally at codeparrot/apps, or remotely on the Hugging Face Hub. ``` So the latest version works wrong when requesting the dataset info. **But if you cannot reproduce this, I may ignore some detailed information: I use `HF_ENDPOINT=https://hf-mirror.com` for some reason (if not use this I cannot connect to huggingface resources) and the error occurs when requesting the dataset's info card.** Maybe the error is caused by this environment variable. I'll open an issue in the author's repo now.
### Describe the bug This happens with datasets-2.18.0; I downgraded the version to 2.14.6 fixing this temporarily. ``` Traceback (most recent call last): File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1831, in dataset_module_factory can_load_config_from_parquet_export = "DEFAULT_CONFIG_NAME" not in f.read() File "/home/xxx/miniconda3/envs/py310/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte ``` ### Steps to reproduce the bug 1. Using Python3.10/3.11 2. Install datasets-2.18.0 3. test with ``` from datasets import load_dataset dataset = load_dataset("codeparrot/apps") ``` ### Expected behavior Normally it should manage to download and load the dataset without such error. ### Environment info Ubuntu, Python3.10/3.11
204
Load codeparrot/apps raising UnicodeDecodeError in datasets-2.18.0 ### Describe the bug This happens with datasets-2.18.0; I downgraded the version to 2.14.6 fixing this temporarily. ``` Traceback (most recent call last): File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1831, in dataset_module_factory can_load_config_from_parquet_export = "DEFAULT_CONFIG_NAME" not in f.read() File "/home/xxx/miniconda3/envs/py310/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte ``` ### Steps to reproduce the bug 1. Using Python3.10/3.11 2. Install datasets-2.18.0 3. test with ``` from datasets import load_dataset dataset = load_dataset("codeparrot/apps") ``` ### Expected behavior Normally it should manage to download and load the dataset without such error. ### Environment info Ubuntu, Python3.10/3.11 Here is the requirements.txt from a clean virtual environment (managed by conda) where I only install `datasets` by `pip install datasets`. The pip list: ``` aiohttp==3.9.3 aiosignal==1.3.1 attrs==23.2.0 certifi==2024.2.2 charset-normalizer==3.3.2 datasets==2.18.0 dill==0.3.8 filelock==3.13.3 frozenlist==1.4.1 fsspec==2024.2.0 huggingface-hub==0.22.2 idna==3.6 multidict==6.0.5 multiprocess==0.70.16 numpy==1.26.4 packaging==24.0 pandas==2.2.1 pyarrow==15.0.2 pyarrow-hotfix==0.6 python-dateutil==2.9.0.post0 pytz==2024.1 PyYAML==6.0.1 requests==2.31.0 six==1.16.0 tqdm==4.66.2 typing_extensions==4.11.0 tzdata==2024.1 urllib3==2.2.1 xxhash==3.4.1 yarl==1.9.4 ``` And the error can be reproduced. Downgrading to datasets==2.14.6 changes some packages' versions: ``` Successfully installed datasets-2.14.6 dill-0.3.7 fsspec-2023.10.0 multiprocess-0.70.15 ``` and the dataset can be downloaded and loaded. Then I upgrade the version to 2.18.0 again; now the dataset can be loaded with such a line: ```Using the latest cached version of the module from /home/xxx/.cache/huggingface/modules/datasets_modules/datasets/codeparrot--apps/04ac807715d07d6e5cc580f59cdc8213cd7dc4529d0bb819cca72c9f8e8c1aa5 (last modified on Sun Apr 7 09:06:43 2024) since it couldn't be found locally at codeparrot/apps, or remotely on the Hugging Face Hub. ``` So the latest version works wrong when requesting the dataset info. **But if you cannot reproduce this, I may ignore some detailed information: I use `HF_ENDPOINT=https://hf-mirror.com` for some reason (if not use this I cannot connect to huggingface resources) and the error occurs when requesting the dataset's info card.** Maybe the error is caused by this environment variable. I'll open an issue in the author's repo now.
[ -0.4005688726902008, 0.20541945099830627, -0.05042307823896408, 0.3017098307609558, 0.4103245735168457, 0.06695821136236191, 0.3023069202899933, 0.3237931728363037, -0.3200613260269165, 0.020805619657039642, 0.29079321026802063, 0.3435957431793213, -0.1630995124578476, 0.03766073286533356, 0.05022330582141876, 0.166195809841156, 0.06219661980867386, 0.3197528123855591, 0.10303869843482971, 0.0686940848827362, -0.28635698556900024, 0.24451503157615662, -0.1917881965637207, 0.027705013751983643, -0.38514459133148193, 0.15765489637851715, 0.06825095415115356, 0.4622393250465393, 0.001428782008588314, -0.7307705283164978, 0.2397642284631729, -0.0667748898267746, 0.2327587753534317, 0.4497069716453552, -0.00011734781583072618, 0.10456344485282898, 0.5315661430358887, -0.0671452060341835, -0.6678274869918823, -0.11384628713130951, -0.16869497299194336, -0.17629046738147736, 0.16940675675868988, -0.08716433495283127, 0.07226619869470596, -0.21462661027908325, -0.007857808843255043, -0.7698162794113159, 0.23911619186401367, 0.41126343607902527, 0.18205678462982178, 0.339603990316391, -0.022151075303554535, 0.23114924132823944, 0.07135719060897827, 0.07888921350240707, -0.06670166552066803, 0.37540197372436523, 0.40971839427948, -0.02519552782177925, -0.03714451938867569, 0.020111046731472015, 0.061070188879966736, 0.04259856417775154, 0.13124176859855652, 0.18105176091194153, 0.13354599475860596, -0.3698284924030304, 0.36844584345817566, 0.07442563772201538, 0.2553946077823639, -0.5095711946487427, -0.31872016191482544, -0.40112417936325073, -0.10021615028381348, -0.4617045521736145, 0.4477415382862091, 0.1139163225889206, 0.0448458157479763, 0.25130191445350647, 0.049713972955942154, -0.054216090589761734, -0.091103196144104, -0.07215677201747894, -0.1594320684671402, 0.3405337333679199, -0.08822555094957352, -0.049217112362384796, -0.21213920414447784, -0.21201008558273315, 0.4670761525630951, -0.3602257966995239, -0.17339712381362915, 0.2796265482902527, -0.0858365148305893, 0.19615088403224945, 0.0681723952293396, -0.14933398365974426, 0.06230923533439636, -0.12764275074005127, -0.18468615412712097, 0.1625138223171234, -0.019643619656562805, 0.1600952297449112, 0.1783466339111328, 0.006400153040885925, 0.2926047742366791, 0.34373655915260315, 0.29025697708129883, 0.25938016176223755, 0.2894008457660675, 0.0358814038336277, -0.061971522867679596, -0.08692355453968048, 0.00425305962562561, 0.20807871222496033, 0.5476137399673462, -0.152749165892601, -0.3842123746871948, 0.2220388501882553, 0.2136366069316864, -0.024014273658394814, 0.1382863074541092, 0.002437196671962738, 0.037217333912849426, 0.40430110692977905, -0.10124500095844269, 0.3237301707267761, -0.1942293494939804, -0.08767911046743393, -0.15009237825870514, -0.3037622272968292, 0.15213489532470703, 0.1251729279756546, -0.06648290157318115, -0.18511512875556946, 0.22547496855258942, 0.26891034841537476, 0.13764548301696777, -0.08134696632623672, -0.14367972314357758, -0.16962507367134094, -0.2269299030303955, 0.12384451925754547, -0.06976625323295593, 0.08413688838481903, 0.1457805037498474, -0.644618034362793, 0.03263635188341141, 0.12065349519252777, -0.2661144733428955, -0.2159484177827835, -0.25719836354255676, 0.22513532638549805, -0.2653490900993347, 0.06801426410675049, -0.1732100546360016, 0.12581086158752441, 0.43873125314712524, -0.0841127410531044, -0.0814446285367012, -0.12524819374084473, -0.28688737750053406, -0.013870544731616974, 0.19363611936569214, 0.5286911129951477, -0.5475998520851135, -0.08479203283786774, 0.3248082995414734, -0.18728317320346832, 0.2968152165412903, -0.08182032406330109, -0.1554986983537674, -0.1810731589794159, -0.3683609366416931, -0.06366612017154694, 0.07556436955928802, -0.1438959687948227, -0.2770996391773224, 0.46774330735206604, -0.07080506533384323, 0.034758590161800385, 0.19586634635925293, -0.3422432541847229, 0.30529317259788513, -0.22786828875541687, 0.1946096122264862, 0.2588542699813843, -0.14354567229747772, 0.18337763845920563, -0.33893463015556335, -0.14617204666137695, 0.16176334023475647, 0.2650904953479767, -0.03425602242350578, -0.01863151788711548, 0.14047539234161377, -0.06624890863895416, 0.4156874120235443, -0.2918298542499542, 0.20633293688297272, 0.14382211863994598, 0.14829015731811523, -0.06279590725898743, 0.07436717301607132, -0.22705626487731934, -0.1478608250617981, 0.3628109097480774, -0.1756833791732788, -0.027118422091007233, -0.5915696620941162, -0.10472773760557175, -0.23302793502807617, 0.12102233618497849, -0.40619856119155884, -0.0591394267976284, 0.13998498022556305, 0.373434841632843, -0.207859605550766, 0.3378879725933075, -0.3409966826438904, 0.2904590368270874, -0.3439697027206421, -0.0018004166195169091, -0.19833308458328247, 0.39643052220344543, 0.17975826561450958, -0.19061461091041565, 0.06134168803691864, 0.23751875758171082, 0.07840840518474579, -0.20204715430736542, -0.25034773349761963, 0.5289462208747864, 0.25756821036338806, 0.28487715125083923, -0.12232383340597153, -0.374075710773468, 0.3910520374774933, -0.14418406784534454, 0.01134881004691124, 0.22114412486553192, 0.13756869733333588, -0.00560891255736351, 0.22425079345703125, 0.4007614254951477, 0.12064307928085327, 0.17250220477581024, 0.11865599453449249, -0.05530227720737457, 0.24624425172805786, -0.02138538658618927, -0.12618999183177948, -0.43089619278907776, 0.1276979148387909, 0.11929149925708771, 0.42313244938850403, 0.15127626061439514, 0.021364979445934296, 0.010100744664669037, 0.6056984663009644, -0.14700102806091309, 0.04663940891623497, 0.19400256872177124, -0.06412092596292496, -0.17185407876968384, -0.17925094068050385, 0.3972325026988983, 0.32031309604644775, -0.04218880087137222, -0.04484179988503456, 0.16354058682918549, 0.11429144442081451, -0.04277971386909485, 0.3326418697834015, -0.015546329319477081, 0.2959173917770386, 0.1413440704345703, -0.06589101999998093, -0.020481321960687637, -0.324543833732605, -0.23835060000419617, 0.04194576293230057, 0.2770029306411743, -0.36688417196273804, 0.14560477435588837, -0.40048590302467346, 0.25134414434432983, -0.2573998272418976, 0.1355523318052292, -0.362705260515213, -0.1881624162197113, -0.03850773721933365, -0.18406465649604797, -0.05134887620806694, 0.25279489159584045, -0.4370746314525604, 0.1264401376247406, -0.10883057117462158, -0.29185813665390015, -0.05415242165327072, -0.25639647245407104, -0.5054076910018921, 0.013907987624406815, 0.42138683795928955, 0.011204637587070465, 0.02305002324283123, -0.43465185165405273, -0.24857038259506226, -0.034184060990810394, -0.24753770232200623, 0.09917370975017548, 0.01727423258125782, 0.31090569496154785, 0.024944022297859192, -0.1176576316356659, 0.250788152217865, -0.37477123737335205, 0.08271314203739166, 0.024716312065720558, -0.186737522482872, 0.15888656675815582, -0.0907822772860527, -0.22909393906593323, -0.24383769929409027, -0.0902746394276619, -0.23480479419231415, -0.297097772359848, -0.20232389867305756, 0.023152749985456467, 0.1534777283668518, 0.24376928806304932, -0.040995027869939804, 0.04680223762989044, 0.2060539871454239, -0.05140390992164612, -0.10376407206058502, -0.3125602602958679, 0.26170864701271057, -0.13899405300617218, -0.3428069055080414, -0.037382133305072784, -0.033180609345436096, 0.21525409817695618, -0.004560516215860844, -0.3171756863594055, 0.00423430185765028, -0.1539987176656723, 0.09006723761558533, -0.07764866203069687, -0.048004597425460815, -0.06060171127319336, 0.116895392537117, 0.08889766037464142, -0.10601970553398132, -0.2633768916130066, -0.11433609575033188, 0.03393489494919777, 0.07878030836582184, 0.24283108115196228, 0.4648128151893616, -0.055909790098667145, 0.16756398975849152, 0.28799039125442505, 0.03275296092033386, 0.3816492259502411, -0.09938395768404007, 0.21688289940357208, -0.024564936757087708, -0.12355280667543411, 0.06459331512451172, 0.11324280500411987, -0.06388728320598602, 0.25576159358024597, -0.13517871499061584, -0.2011050134897232, 0.017334021627902985, 0.07329957187175751, -0.19134140014648438, -0.1301335245370865, -0.06409864127635956, -0.3895423710346222, 0.40894654393196106, -0.11755862832069397, 0.1734480857849121, -0.014499234966933727, 0.1558794379234314, -0.20997297763824463, 0.09494354575872421, 0.09190316498279572, -0.019485093653202057, -0.15207237005233765, 0.3981720507144928, -0.1707247495651245, 0.07277265191078186, 0.2274060845375061, 0.48947396874427795, -0.0783013328909874, 0.012675918638706207, 0.030340619385242462, -0.2013896107673645, 0.34188568592071533, 0.19307582080364227, 0.20095188915729523, 0.09831255674362183, 0.11047658324241638, -0.5618799924850464, -0.13903255760669708, 0.02313048020005226, 0.16544179618358612, 0.13668961822986603, 0.21779131889343262, -0.3128851354122162, -0.12311340868473053, 0.028502952307462692, 0.1895894706249237, -0.12548504769802094, 0.1489204466342926, -0.37891194224357605, -0.46065017580986023, -0.24040339887142181, -0.015275657176971436, -0.007318135350942612, 0.4825436472892761, -0.06920099258422852, 0.12383534014225006, -0.11652548611164093, -0.33679884672164917, -0.002342909574508667, 0.26686158776283264, 0.29605579376220703, -0.04002058133482933, 0.2782142162322998, -0.019340109080076218, -0.29847443103790283, 0.4534760117530823, 0.6119334101676941, 0.24180689454078674, -0.7839244604110718, 0.10931257903575897, -0.23106060922145844, 0.2108500599861145, 0.22062605619430542, -0.2473936527967453, -0.054626740515232086, 0.18354424834251404, 0.09100218117237091, -0.24360567331314087, -0.19044752418994904, 0.32746732234954834, -0.041973091661930084, -0.29930904507637024, -0.5289267301559448, 0.23672699928283691, -0.08457687497138977, 0.09138530492782593, -0.18018320202827454, -0.022464945912361145, -0.3920173943042755, 0.40283364057540894, 0.19426879286766052, 0.44102925062179565, 0.18786455690860748, -0.029241103678941727, 0.2666557729244232, -0.40189486742019653, 0.24965263903141022, 0.005789477378129959, -0.12810657918453217, -0.3726911246776581, -0.2249068170785904, -0.10164336115121841, 0.13116024434566498, 0.397504985332489, -0.017309628427028656, -0.08830820024013519, 0.15517668426036835, -0.09294785559177399, -0.02243846282362938, 0.29648157954216003, 0.2045784294605255, -0.5447907447814941, -0.16129185259342194, -0.5929229855537415, 0.10153114795684814, -0.07387755811214447, -0.22415858507156372, 0.017550813034176826, -0.15671782195568085, -0.013996880501508713, -0.37406396865844727, -0.26156193017959595, 0.2838827669620514, -0.22579126060009003, 0.14207950234413147, -0.04699889197945595, -0.34680789709091187, 0.23574557900428772, 0.34516340494155884, 0.42683541774749756, -0.056648675352334976, 0.07015705853700638, 0.22896724939346313, -0.09165970236063004, 0.29986679553985596, 0.029861479997634888, -0.0304030142724514, 0.053662434220314026, 0.013834100216627121, -0.2626481056213379, -0.13120269775390625, -0.047815900295972824, -0.04104532301425934, 0.24995848536491394, 0.19675880670547485, -0.03134938329458237, -0.06458564102649689, -0.013457749038934708, -0.18246948719024658, 0.35424718260765076, -0.2322285771369934, 0.14256329834461212, 0.01714189723134041, -0.16843199729919434, -0.01619059592485428, -0.27574408054351807, -0.37600967288017273, -0.1927541196346283, 0.2802514433860779, 0.01982060819864273, 0.047645412385463715, 0.5735347270965576, 0.11246266961097717, -0.05749762803316116, -0.10466089844703674, 0.25391674041748047, 0.0880383625626564, -0.46091315150260925, 0.11019007116556168, 0.1741575449705124, 0.0017088353633880615, -0.14593347907066345, -0.1032027155160904, -0.0039391666650772095, -0.07857171446084976, -0.1638723462820053, -0.4159221649169922, -0.31851792335510254, -0.14028967916965485, -0.1561938375234604, 0.10409654676914215, 0.09385830909013748, 0.05419907718896866, -0.2841363251209259, -0.16285404562950134, -0.25190380215644836, 0.3044768273830414, -0.10129482299089432, 0.14101234078407288, 0.16165977716445923, -0.08180972188711166, 0.16377508640289307, -0.05757233500480652, 0.13941173255443573, 0.14871779084205627, 0.04514608159661293, -0.14453160762786865, -0.2212887555360794, 0.08216140419244766, 0.0064551737159490585, -0.3054999113082886, -0.1318938434123993, -0.01746797375380993, -0.05820430442690849, -0.17062585055828094, 0.3061425983905792, 0.18879806995391846, -0.04811277985572815, 0.13358405232429504, 0.14297880232334137, 0.11003395915031433, -0.023636318743228912, -0.0023356229066848755, -0.3313971161842346, 0.417188823223114, 0.12655052542686462, 0.4428807199001312, -0.08544739335775375, 0.07282951474189758, 0.07853559404611588, 0.11797228455543518, -0.11532549560070038, 0.026908067986369133, 0.2223721146583557, -0.4891014099121094, 0.13876809179782867, 0.3674507141113281, 0.012334981933236122, 0.5853311419487, -0.28699755668640137, -0.16830989718437195, 0.13832691311836243, 0.13125531375408173, -0.1097518801689148, -0.29038292169570923, 0.09796106815338135, -0.18248136341571808, -0.06426794081926346, 0.2579954266548157, 0.23216599225997925, -0.12384110689163208, 0.1315585970878601, 0.13568013906478882, 0.4770963490009308, 0.05929143354296684, 0.46386390924453735, 0.39016222953796387, -0.10835371911525726, 0.18743309378623962, -0.04902460426092148, 0.027557091787457466, 0.0881253182888031, 0.5505675077438354, -0.3299351632595062, 0.28185799717903137, -0.06036219000816345, 0.25088900327682495, -0.2529267966747284, -0.5596941113471985, 0.10076912492513657, -0.01639854907989502, -0.14385788142681122, 0.11476089060306549, 0.3077297806739807, 0.0018024295568466187, -0.1903795599937439, 0.046903010457754135, -0.19574294984340668, -0.028404485434293747, -0.03357039391994476, -0.14054781198501587, -0.0249735489487648, -0.08155184239149094, -0.3026483356952667, 0.020411647856235504, -0.07851062715053558, 0.052997101098299026, -0.022330336272716522, 0.10021428018808365, -0.3233770728111267, -0.2049078643321991, -0.17899248003959656, 0.2034718096256256, -0.05700119584798813, -0.17941458523273468, 0.3955203592777252, 0.33210289478302, 0.1371881365776062, 0.08414798974990845, 0.2652130126953125, 0.5720177888870239, 0.4728533625602722, -0.10857692360877991, -0.011148872785270214, 0.022724315524101257, 0.0414569228887558, -0.06433480978012085, 0.23641180992126465, -0.23843303322792053, 0.5531561970710754, 0.15693019330501556, 0.21267513930797577, -0.022229183465242386, -0.14747470617294312, 0.17903104424476624, 0.049007024616003036, -0.1304343044757843, 0.3055906891822815, 0.038357656449079514, 0.2401711344718933, -0.21246913075447083, 0.07325874269008636, -0.1993429958820343, -0.14208346605300903, 0.3931535482406616, 0.09344172477722168, 0.17354655265808105, 0.0943131148815155, 0.06441108882427216, 0.030239533632993698, 0.29044264554977417, 0.4940098822116852, -0.17743977904319763, -0.11660804599523544, -0.18936754763126373, -0.5353964567184448, 0.19799044728279114, 0.08286463469266891, -0.06696067005395889, 0.15755179524421692, -0.036998599767684937, 0.00983363389968872, 0.061838299036026, 0.05258021503686905, 0.2407042235136032, 0.026829522103071213, -0.14954981207847595, -0.10633702576160431, -0.1338120549917221, 0.014767877757549286, 0.04148104041814804, -0.2643955647945404, -0.34997591376304626, 0.19433586299419403, -0.0744711309671402, 0.024638958275318146, -0.08881121873855591, 0.03719920665025711, -0.116007000207901, -0.8468509912490845, 0.5439585447311401, 0.2890605926513672, 0.3048397898674011, -0.3207247257232666, -0.1495400071144104, -0.35775086283683777, -0.25779372453689575, -0.13039544224739075, 0.44808095693588257, -0.02530025690793991, 0.33422914147377014, -0.1333540678024292, -0.3851572275161743, -0.3503004014492035, 0.5176897048950195, 0.061686672270298004, 0.22670888900756836, -0.10218237340450287, 0.2894882261753082, -0.09295713901519775, 0.0452774316072464, 0.07130924612283707, 0.0413987971842289, 0.0604279488325119, 0.2966955304145813, 0.1254703253507614, -0.4789183735847473, 0.3521789014339447, -0.11940041184425354, -0.3062579035758972, 0.03689560294151306, 0.2440371960401535, 0.04791098088026047, -0.16925694048404694, -0.3182777166366577, 0.21181389689445496, 0.3852091431617737, -0.2201853096485138, -0.39540961384773254, 0.08209027349948883, 0.051864512264728546, 0.08454997837543488, -0.1423357129096985, 0.23036161065101624, -0.08663146197795868, -0.18573354184627533, 0.26544347405433655, -0.2989656329154968 ]
https://github.com/huggingface/datasets/issues/6760
Load codeparrot/apps raising UnicodeDecodeError in datasets-2.18.0
> Here is the requirements.txt from a clean virtual environment (managed by conda) where I only install `datasets` by `pip install datasets`. The pip list: > > ``` > aiohttp==3.9.3 > aiosignal==1.3.1 > attrs==23.2.0 > certifi==2024.2.2 > charset-normalizer==3.3.2 > datasets==2.18.0 > dill==0.3.8 > filelock==3.13.3 > frozenlist==1.4.1 > fsspec==2024.2.0 > huggingface-hub==0.22.2 > idna==3.6 > multidict==6.0.5 > multiprocess==0.70.16 > numpy==1.26.4 > packaging==24.0 > pandas==2.2.1 > pyarrow==15.0.2 > pyarrow-hotfix==0.6 > python-dateutil==2.9.0.post0 > pytz==2024.1 > PyYAML==6.0.1 > requests==2.31.0 > six==1.16.0 > tqdm==4.66.2 > typing_extensions==4.11.0 > tzdata==2024.1 > urllib3==2.2.1 > xxhash==3.4.1 > yarl==1.9.4 > ``` > > And the error can be reproduced. > > Downgrading to datasets==2.14.6 changes some packages' versions: > > ``` > Successfully installed datasets-2.14.6 dill-0.3.7 fsspec-2023.10.0 multiprocess-0.70.15 > ``` > > and the dataset can be downloaded and loaded. > > Then I upgrade the version to 2.18.0 again; now the dataset can be loaded with such a line: `Using the latest cached version of the module from /home/xxx/.cache/huggingface/modules/datasets_modules/datasets/codeparrot--apps/04ac807715d07d6e5cc580f59cdc8213cd7dc4529d0bb819cca72c9f8e8c1aa5 (last modified on Sun Apr 7 09:06:43 2024) since it couldn't be found locally at codeparrot/apps, or remotely on the Hugging Face Hub. ` > > So the latest version works wrong when requesting the dataset info. > > **But if you cannot reproduce this, I may ignore some detailed information: I use `HF_ENDPOINT=https://hf-mirror.com` for some reason (if not use this I cannot connect to huggingface resources) and the error occurs when requesting the dataset's info card.** Maybe the error is caused by this environment variable. I'll open an issue in the author's repo now. This is useful and my same error is settled!!!
### Describe the bug This happens with datasets-2.18.0; I downgraded the version to 2.14.6 fixing this temporarily. ``` Traceback (most recent call last): File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1831, in dataset_module_factory can_load_config_from_parquet_export = "DEFAULT_CONFIG_NAME" not in f.read() File "/home/xxx/miniconda3/envs/py310/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte ``` ### Steps to reproduce the bug 1. Using Python3.10/3.11 2. Install datasets-2.18.0 3. test with ``` from datasets import load_dataset dataset = load_dataset("codeparrot/apps") ``` ### Expected behavior Normally it should manage to download and load the dataset without such error. ### Environment info Ubuntu, Python3.10/3.11
263
Load codeparrot/apps raising UnicodeDecodeError in datasets-2.18.0 ### Describe the bug This happens with datasets-2.18.0; I downgraded the version to 2.14.6 fixing this temporarily. ``` Traceback (most recent call last): File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/xxx/miniconda3/envs/py310/lib/python3.10/site-packages/datasets/load.py", line 1831, in dataset_module_factory can_load_config_from_parquet_export = "DEFAULT_CONFIG_NAME" not in f.read() File "/home/xxx/miniconda3/envs/py310/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte ``` ### Steps to reproduce the bug 1. Using Python3.10/3.11 2. Install datasets-2.18.0 3. test with ``` from datasets import load_dataset dataset = load_dataset("codeparrot/apps") ``` ### Expected behavior Normally it should manage to download and load the dataset without such error. ### Environment info Ubuntu, Python3.10/3.11 > Here is the requirements.txt from a clean virtual environment (managed by conda) where I only install `datasets` by `pip install datasets`. The pip list: > > ``` > aiohttp==3.9.3 > aiosignal==1.3.1 > attrs==23.2.0 > certifi==2024.2.2 > charset-normalizer==3.3.2 > datasets==2.18.0 > dill==0.3.8 > filelock==3.13.3 > frozenlist==1.4.1 > fsspec==2024.2.0 > huggingface-hub==0.22.2 > idna==3.6 > multidict==6.0.5 > multiprocess==0.70.16 > numpy==1.26.4 > packaging==24.0 > pandas==2.2.1 > pyarrow==15.0.2 > pyarrow-hotfix==0.6 > python-dateutil==2.9.0.post0 > pytz==2024.1 > PyYAML==6.0.1 > requests==2.31.0 > six==1.16.0 > tqdm==4.66.2 > typing_extensions==4.11.0 > tzdata==2024.1 > urllib3==2.2.1 > xxhash==3.4.1 > yarl==1.9.4 > ``` > > And the error can be reproduced. > > Downgrading to datasets==2.14.6 changes some packages' versions: > > ``` > Successfully installed datasets-2.14.6 dill-0.3.7 fsspec-2023.10.0 multiprocess-0.70.15 > ``` > > and the dataset can be downloaded and loaded. > > Then I upgrade the version to 2.18.0 again; now the dataset can be loaded with such a line: `Using the latest cached version of the module from /home/xxx/.cache/huggingface/modules/datasets_modules/datasets/codeparrot--apps/04ac807715d07d6e5cc580f59cdc8213cd7dc4529d0bb819cca72c9f8e8c1aa5 (last modified on Sun Apr 7 09:06:43 2024) since it couldn't be found locally at codeparrot/apps, or remotely on the Hugging Face Hub. ` > > So the latest version works wrong when requesting the dataset info. > > **But if you cannot reproduce this, I may ignore some detailed information: I use `HF_ENDPOINT=https://hf-mirror.com` for some reason (if not use this I cannot connect to huggingface resources) and the error occurs when requesting the dataset's info card.** Maybe the error is caused by this environment variable. I'll open an issue in the author's repo now. This is useful and my same error is settled!!!
[ -0.4005688726902008, 0.20541945099830627, -0.05042307823896408, 0.3017098307609558, 0.4103245735168457, 0.06695821136236191, 0.3023069202899933, 0.3237931728363037, -0.3200613260269165, 0.020805619657039642, 0.29079321026802063, 0.3435957431793213, -0.1630995124578476, 0.03766073286533356, 0.05022330582141876, 0.166195809841156, 0.06219661980867386, 0.3197528123855591, 0.10303869843482971, 0.0686940848827362, -0.28635698556900024, 0.24451503157615662, -0.1917881965637207, 0.027705013751983643, -0.38514459133148193, 0.15765489637851715, 0.06825095415115356, 0.4622393250465393, 0.001428782008588314, -0.7307705283164978, 0.2397642284631729, -0.0667748898267746, 0.2327587753534317, 0.4497069716453552, -0.00011734781583072618, 0.10456344485282898, 0.5315661430358887, -0.0671452060341835, -0.6678274869918823, -0.11384628713130951, -0.16869497299194336, -0.17629046738147736, 0.16940675675868988, -0.08716433495283127, 0.07226619869470596, -0.21462661027908325, -0.007857808843255043, -0.7698162794113159, 0.23911619186401367, 0.41126343607902527, 0.18205678462982178, 0.339603990316391, -0.022151075303554535, 0.23114924132823944, 0.07135719060897827, 0.07888921350240707, -0.06670166552066803, 0.37540197372436523, 0.40971839427948, -0.02519552782177925, -0.03714451938867569, 0.020111046731472015, 0.061070188879966736, 0.04259856417775154, 0.13124176859855652, 0.18105176091194153, 0.13354599475860596, -0.3698284924030304, 0.36844584345817566, 0.07442563772201538, 0.2553946077823639, -0.5095711946487427, -0.31872016191482544, -0.40112417936325073, -0.10021615028381348, -0.4617045521736145, 0.4477415382862091, 0.1139163225889206, 0.0448458157479763, 0.25130191445350647, 0.049713972955942154, -0.054216090589761734, -0.091103196144104, -0.07215677201747894, -0.1594320684671402, 0.3405337333679199, -0.08822555094957352, -0.049217112362384796, -0.21213920414447784, -0.21201008558273315, 0.4670761525630951, -0.3602257966995239, -0.17339712381362915, 0.2796265482902527, -0.0858365148305893, 0.19615088403224945, 0.0681723952293396, -0.14933398365974426, 0.06230923533439636, -0.12764275074005127, -0.18468615412712097, 0.1625138223171234, -0.019643619656562805, 0.1600952297449112, 0.1783466339111328, 0.006400153040885925, 0.2926047742366791, 0.34373655915260315, 0.29025697708129883, 0.25938016176223755, 0.2894008457660675, 0.0358814038336277, -0.061971522867679596, -0.08692355453968048, 0.00425305962562561, 0.20807871222496033, 0.5476137399673462, -0.152749165892601, -0.3842123746871948, 0.2220388501882553, 0.2136366069316864, -0.024014273658394814, 0.1382863074541092, 0.002437196671962738, 0.037217333912849426, 0.40430110692977905, -0.10124500095844269, 0.3237301707267761, -0.1942293494939804, -0.08767911046743393, -0.15009237825870514, -0.3037622272968292, 0.15213489532470703, 0.1251729279756546, -0.06648290157318115, -0.18511512875556946, 0.22547496855258942, 0.26891034841537476, 0.13764548301696777, -0.08134696632623672, -0.14367972314357758, -0.16962507367134094, -0.2269299030303955, 0.12384451925754547, -0.06976625323295593, 0.08413688838481903, 0.1457805037498474, -0.644618034362793, 0.03263635188341141, 0.12065349519252777, -0.2661144733428955, -0.2159484177827835, -0.25719836354255676, 0.22513532638549805, -0.2653490900993347, 0.06801426410675049, -0.1732100546360016, 0.12581086158752441, 0.43873125314712524, -0.0841127410531044, -0.0814446285367012, -0.12524819374084473, -0.28688737750053406, -0.013870544731616974, 0.19363611936569214, 0.5286911129951477, -0.5475998520851135, -0.08479203283786774, 0.3248082995414734, -0.18728317320346832, 0.2968152165412903, -0.08182032406330109, -0.1554986983537674, -0.1810731589794159, -0.3683609366416931, -0.06366612017154694, 0.07556436955928802, -0.1438959687948227, -0.2770996391773224, 0.46774330735206604, -0.07080506533384323, 0.034758590161800385, 0.19586634635925293, -0.3422432541847229, 0.30529317259788513, -0.22786828875541687, 0.1946096122264862, 0.2588542699813843, -0.14354567229747772, 0.18337763845920563, -0.33893463015556335, -0.14617204666137695, 0.16176334023475647, 0.2650904953479767, -0.03425602242350578, -0.01863151788711548, 0.14047539234161377, -0.06624890863895416, 0.4156874120235443, -0.2918298542499542, 0.20633293688297272, 0.14382211863994598, 0.14829015731811523, -0.06279590725898743, 0.07436717301607132, -0.22705626487731934, -0.1478608250617981, 0.3628109097480774, -0.1756833791732788, -0.027118422091007233, -0.5915696620941162, -0.10472773760557175, -0.23302793502807617, 0.12102233618497849, -0.40619856119155884, -0.0591394267976284, 0.13998498022556305, 0.373434841632843, -0.207859605550766, 0.3378879725933075, -0.3409966826438904, 0.2904590368270874, -0.3439697027206421, -0.0018004166195169091, -0.19833308458328247, 0.39643052220344543, 0.17975826561450958, -0.19061461091041565, 0.06134168803691864, 0.23751875758171082, 0.07840840518474579, -0.20204715430736542, -0.25034773349761963, 0.5289462208747864, 0.25756821036338806, 0.28487715125083923, -0.12232383340597153, -0.374075710773468, 0.3910520374774933, -0.14418406784534454, 0.01134881004691124, 0.22114412486553192, 0.13756869733333588, -0.00560891255736351, 0.22425079345703125, 0.4007614254951477, 0.12064307928085327, 0.17250220477581024, 0.11865599453449249, -0.05530227720737457, 0.24624425172805786, -0.02138538658618927, -0.12618999183177948, -0.43089619278907776, 0.1276979148387909, 0.11929149925708771, 0.42313244938850403, 0.15127626061439514, 0.021364979445934296, 0.010100744664669037, 0.6056984663009644, -0.14700102806091309, 0.04663940891623497, 0.19400256872177124, -0.06412092596292496, -0.17185407876968384, -0.17925094068050385, 0.3972325026988983, 0.32031309604644775, -0.04218880087137222, -0.04484179988503456, 0.16354058682918549, 0.11429144442081451, -0.04277971386909485, 0.3326418697834015, -0.015546329319477081, 0.2959173917770386, 0.1413440704345703, -0.06589101999998093, -0.020481321960687637, -0.324543833732605, -0.23835060000419617, 0.04194576293230057, 0.2770029306411743, -0.36688417196273804, 0.14560477435588837, -0.40048590302467346, 0.25134414434432983, -0.2573998272418976, 0.1355523318052292, -0.362705260515213, -0.1881624162197113, -0.03850773721933365, -0.18406465649604797, -0.05134887620806694, 0.25279489159584045, -0.4370746314525604, 0.1264401376247406, -0.10883057117462158, -0.29185813665390015, -0.05415242165327072, -0.25639647245407104, -0.5054076910018921, 0.013907987624406815, 0.42138683795928955, 0.011204637587070465, 0.02305002324283123, -0.43465185165405273, -0.24857038259506226, -0.034184060990810394, -0.24753770232200623, 0.09917370975017548, 0.01727423258125782, 0.31090569496154785, 0.024944022297859192, -0.1176576316356659, 0.250788152217865, -0.37477123737335205, 0.08271314203739166, 0.024716312065720558, -0.186737522482872, 0.15888656675815582, -0.0907822772860527, -0.22909393906593323, -0.24383769929409027, -0.0902746394276619, -0.23480479419231415, -0.297097772359848, -0.20232389867305756, 0.023152749985456467, 0.1534777283668518, 0.24376928806304932, -0.040995027869939804, 0.04680223762989044, 0.2060539871454239, -0.05140390992164612, -0.10376407206058502, -0.3125602602958679, 0.26170864701271057, -0.13899405300617218, -0.3428069055080414, -0.037382133305072784, -0.033180609345436096, 0.21525409817695618, -0.004560516215860844, -0.3171756863594055, 0.00423430185765028, -0.1539987176656723, 0.09006723761558533, -0.07764866203069687, -0.048004597425460815, -0.06060171127319336, 0.116895392537117, 0.08889766037464142, -0.10601970553398132, -0.2633768916130066, -0.11433609575033188, 0.03393489494919777, 0.07878030836582184, 0.24283108115196228, 0.4648128151893616, -0.055909790098667145, 0.16756398975849152, 0.28799039125442505, 0.03275296092033386, 0.3816492259502411, -0.09938395768404007, 0.21688289940357208, -0.024564936757087708, -0.12355280667543411, 0.06459331512451172, 0.11324280500411987, -0.06388728320598602, 0.25576159358024597, -0.13517871499061584, -0.2011050134897232, 0.017334021627902985, 0.07329957187175751, -0.19134140014648438, -0.1301335245370865, -0.06409864127635956, -0.3895423710346222, 0.40894654393196106, -0.11755862832069397, 0.1734480857849121, -0.014499234966933727, 0.1558794379234314, -0.20997297763824463, 0.09494354575872421, 0.09190316498279572, -0.019485093653202057, -0.15207237005233765, 0.3981720507144928, -0.1707247495651245, 0.07277265191078186, 0.2274060845375061, 0.48947396874427795, -0.0783013328909874, 0.012675918638706207, 0.030340619385242462, -0.2013896107673645, 0.34188568592071533, 0.19307582080364227, 0.20095188915729523, 0.09831255674362183, 0.11047658324241638, -0.5618799924850464, -0.13903255760669708, 0.02313048020005226, 0.16544179618358612, 0.13668961822986603, 0.21779131889343262, -0.3128851354122162, -0.12311340868473053, 0.028502952307462692, 0.1895894706249237, -0.12548504769802094, 0.1489204466342926, -0.37891194224357605, -0.46065017580986023, -0.24040339887142181, -0.015275657176971436, -0.007318135350942612, 0.4825436472892761, -0.06920099258422852, 0.12383534014225006, -0.11652548611164093, -0.33679884672164917, -0.002342909574508667, 0.26686158776283264, 0.29605579376220703, -0.04002058133482933, 0.2782142162322998, -0.019340109080076218, -0.29847443103790283, 0.4534760117530823, 0.6119334101676941, 0.24180689454078674, -0.7839244604110718, 0.10931257903575897, -0.23106060922145844, 0.2108500599861145, 0.22062605619430542, -0.2473936527967453, -0.054626740515232086, 0.18354424834251404, 0.09100218117237091, -0.24360567331314087, -0.19044752418994904, 0.32746732234954834, -0.041973091661930084, -0.29930904507637024, -0.5289267301559448, 0.23672699928283691, -0.08457687497138977, 0.09138530492782593, -0.18018320202827454, -0.022464945912361145, -0.3920173943042755, 0.40283364057540894, 0.19426879286766052, 0.44102925062179565, 0.18786455690860748, -0.029241103678941727, 0.2666557729244232, -0.40189486742019653, 0.24965263903141022, 0.005789477378129959, -0.12810657918453217, -0.3726911246776581, -0.2249068170785904, -0.10164336115121841, 0.13116024434566498, 0.397504985332489, -0.017309628427028656, -0.08830820024013519, 0.15517668426036835, -0.09294785559177399, -0.02243846282362938, 0.29648157954216003, 0.2045784294605255, -0.5447907447814941, -0.16129185259342194, -0.5929229855537415, 0.10153114795684814, -0.07387755811214447, -0.22415858507156372, 0.017550813034176826, -0.15671782195568085, -0.013996880501508713, -0.37406396865844727, -0.26156193017959595, 0.2838827669620514, -0.22579126060009003, 0.14207950234413147, -0.04699889197945595, -0.34680789709091187, 0.23574557900428772, 0.34516340494155884, 0.42683541774749756, -0.056648675352334976, 0.07015705853700638, 0.22896724939346313, -0.09165970236063004, 0.29986679553985596, 0.029861479997634888, -0.0304030142724514, 0.053662434220314026, 0.013834100216627121, -0.2626481056213379, -0.13120269775390625, -0.047815900295972824, -0.04104532301425934, 0.24995848536491394, 0.19675880670547485, -0.03134938329458237, -0.06458564102649689, -0.013457749038934708, -0.18246948719024658, 0.35424718260765076, -0.2322285771369934, 0.14256329834461212, 0.01714189723134041, -0.16843199729919434, -0.01619059592485428, -0.27574408054351807, -0.37600967288017273, -0.1927541196346283, 0.2802514433860779, 0.01982060819864273, 0.047645412385463715, 0.5735347270965576, 0.11246266961097717, -0.05749762803316116, -0.10466089844703674, 0.25391674041748047, 0.0880383625626564, -0.46091315150260925, 0.11019007116556168, 0.1741575449705124, 0.0017088353633880615, -0.14593347907066345, -0.1032027155160904, -0.0039391666650772095, -0.07857171446084976, -0.1638723462820053, -0.4159221649169922, -0.31851792335510254, -0.14028967916965485, -0.1561938375234604, 0.10409654676914215, 0.09385830909013748, 0.05419907718896866, -0.2841363251209259, -0.16285404562950134, -0.25190380215644836, 0.3044768273830414, -0.10129482299089432, 0.14101234078407288, 0.16165977716445923, -0.08180972188711166, 0.16377508640289307, -0.05757233500480652, 0.13941173255443573, 0.14871779084205627, 0.04514608159661293, -0.14453160762786865, -0.2212887555360794, 0.08216140419244766, 0.0064551737159490585, -0.3054999113082886, -0.1318938434123993, -0.01746797375380993, -0.05820430442690849, -0.17062585055828094, 0.3061425983905792, 0.18879806995391846, -0.04811277985572815, 0.13358405232429504, 0.14297880232334137, 0.11003395915031433, -0.023636318743228912, -0.0023356229066848755, -0.3313971161842346, 0.417188823223114, 0.12655052542686462, 0.4428807199001312, -0.08544739335775375, 0.07282951474189758, 0.07853559404611588, 0.11797228455543518, -0.11532549560070038, 0.026908067986369133, 0.2223721146583557, -0.4891014099121094, 0.13876809179782867, 0.3674507141113281, 0.012334981933236122, 0.5853311419487, -0.28699755668640137, -0.16830989718437195, 0.13832691311836243, 0.13125531375408173, -0.1097518801689148, -0.29038292169570923, 0.09796106815338135, -0.18248136341571808, -0.06426794081926346, 0.2579954266548157, 0.23216599225997925, -0.12384110689163208, 0.1315585970878601, 0.13568013906478882, 0.4770963490009308, 0.05929143354296684, 0.46386390924453735, 0.39016222953796387, -0.10835371911525726, 0.18743309378623962, -0.04902460426092148, 0.027557091787457466, 0.0881253182888031, 0.5505675077438354, -0.3299351632595062, 0.28185799717903137, -0.06036219000816345, 0.25088900327682495, -0.2529267966747284, -0.5596941113471985, 0.10076912492513657, -0.01639854907989502, -0.14385788142681122, 0.11476089060306549, 0.3077297806739807, 0.0018024295568466187, -0.1903795599937439, 0.046903010457754135, -0.19574294984340668, -0.028404485434293747, -0.03357039391994476, -0.14054781198501587, -0.0249735489487648, -0.08155184239149094, -0.3026483356952667, 0.020411647856235504, -0.07851062715053558, 0.052997101098299026, -0.022330336272716522, 0.10021428018808365, -0.3233770728111267, -0.2049078643321991, -0.17899248003959656, 0.2034718096256256, -0.05700119584798813, -0.17941458523273468, 0.3955203592777252, 0.33210289478302, 0.1371881365776062, 0.08414798974990845, 0.2652130126953125, 0.5720177888870239, 0.4728533625602722, -0.10857692360877991, -0.011148872785270214, 0.022724315524101257, 0.0414569228887558, -0.06433480978012085, 0.23641180992126465, -0.23843303322792053, 0.5531561970710754, 0.15693019330501556, 0.21267513930797577, -0.022229183465242386, -0.14747470617294312, 0.17903104424476624, 0.049007024616003036, -0.1304343044757843, 0.3055906891822815, 0.038357656449079514, 0.2401711344718933, -0.21246913075447083, 0.07325874269008636, -0.1993429958820343, -0.14208346605300903, 0.3931535482406616, 0.09344172477722168, 0.17354655265808105, 0.0943131148815155, 0.06441108882427216, 0.030239533632993698, 0.29044264554977417, 0.4940098822116852, -0.17743977904319763, -0.11660804599523544, -0.18936754763126373, -0.5353964567184448, 0.19799044728279114, 0.08286463469266891, -0.06696067005395889, 0.15755179524421692, -0.036998599767684937, 0.00983363389968872, 0.061838299036026, 0.05258021503686905, 0.2407042235136032, 0.026829522103071213, -0.14954981207847595, -0.10633702576160431, -0.1338120549917221, 0.014767877757549286, 0.04148104041814804, -0.2643955647945404, -0.34997591376304626, 0.19433586299419403, -0.0744711309671402, 0.024638958275318146, -0.08881121873855591, 0.03719920665025711, -0.116007000207901, -0.8468509912490845, 0.5439585447311401, 0.2890605926513672, 0.3048397898674011, -0.3207247257232666, -0.1495400071144104, -0.35775086283683777, -0.25779372453689575, -0.13039544224739075, 0.44808095693588257, -0.02530025690793991, 0.33422914147377014, -0.1333540678024292, -0.3851572275161743, -0.3503004014492035, 0.5176897048950195, 0.061686672270298004, 0.22670888900756836, -0.10218237340450287, 0.2894882261753082, -0.09295713901519775, 0.0452774316072464, 0.07130924612283707, 0.0413987971842289, 0.0604279488325119, 0.2966955304145813, 0.1254703253507614, -0.4789183735847473, 0.3521789014339447, -0.11940041184425354, -0.3062579035758972, 0.03689560294151306, 0.2440371960401535, 0.04791098088026047, -0.16925694048404694, -0.3182777166366577, 0.21181389689445496, 0.3852091431617737, -0.2201853096485138, -0.39540961384773254, 0.08209027349948883, 0.051864512264728546, 0.08454997837543488, -0.1423357129096985, 0.23036161065101624, -0.08663146197795868, -0.18573354184627533, 0.26544347405433655, -0.2989656329154968 ]
https://github.com/huggingface/datasets/issues/6756
Support SQLite files?
You can use `Dataset.from_sql(path_to_sql_file)` already. Though we haven't added the Sql dataset builder to the `_PACKAGED_DATASETS_MODULES` list or in `_EXTENSION_TO_MODULE` to map `.sqlite` to the Sql dataset builder This would allow to load a dataset repository with a `.sqlite` file using `load_dataset` and enable the Dataset Viewer
### Feature request Support loading a dataset from a SQLite file https://huggingface.co/datasets/severo/test_iris_sqlite/tree/main ### Motivation SQLite is a popular file format. ### Your contribution See discussion on slack: https://huggingface.slack.com/archives/C04L6P8KNQ5/p1702481859117909 (internal) In particular: a SQLite file can contain multiple tables, which might be matched to multiple configs. Maybe the detail of splits and configs should be defined in the README YAML, or use the same format as for ZIP files: `Iris.sqlite::Iris`. See dataset here: https://huggingface.co/datasets/severo/test_iris_sqlite Note: should we also support DuckDB files?
47
Support SQLite files? ### Feature request Support loading a dataset from a SQLite file https://huggingface.co/datasets/severo/test_iris_sqlite/tree/main ### Motivation SQLite is a popular file format. ### Your contribution See discussion on slack: https://huggingface.slack.com/archives/C04L6P8KNQ5/p1702481859117909 (internal) In particular: a SQLite file can contain multiple tables, which might be matched to multiple configs. Maybe the detail of splits and configs should be defined in the README YAML, or use the same format as for ZIP files: `Iris.sqlite::Iris`. See dataset here: https://huggingface.co/datasets/severo/test_iris_sqlite Note: should we also support DuckDB files? You can use `Dataset.from_sql(path_to_sql_file)` already. Though we haven't added the Sql dataset builder to the `_PACKAGED_DATASETS_MODULES` list or in `_EXTENSION_TO_MODULE` to map `.sqlite` to the Sql dataset builder This would allow to load a dataset repository with a `.sqlite` file using `load_dataset` and enable the Dataset Viewer
[ -0.6961444020271301, -0.029209665954113007, -0.03673972561955452, 0.32284408807754517, 0.048361632972955704, 0.23912319540977478, -0.12631085515022278, 0.5097777843475342, 0.095565065741539, 0.04004529118537903, -0.2469336986541748, 0.6184216737747192, -0.13654939830303192, 0.41123807430267334, 0.22775454819202423, -0.08757592737674713, 0.04497813433408737, 0.039323627948760986, -0.30041614174842834, 0.32724910974502563, -0.25401225686073303, 0.2754729986190796, 0.17864395678043365, 0.02405726909637451, -0.19160395860671997, 0.008389119058847427, -0.4132831394672394, 0.42880457639694214, -0.36672741174697876, -0.44132062792778015, -0.030690521001815796, 0.27777597308158875, 0.1898413896560669, 0.23337456583976746, -0.00010129310976481065, 0.012394316494464874, 0.04999595880508423, -0.0591636598110199, -0.44530189037323, -0.12604950368404388, -0.22584539651870728, -0.3201299011707306, 0.16640301048755646, -0.09360901266336441, -0.2806859016418457, 0.07060769200325012, -0.0051879119127988815, -0.17343676090240479, 0.13074521720409393, -0.0032747704535722733, 0.2316749393939972, 0.2097693234682083, 0.1807965636253357, -0.43571242690086365, 0.26519298553466797, 0.20855648815631866, -0.31149688363075256, 0.11131653189659119, 0.2596076726913452, 0.09607309848070145, -0.12115319818258286, 0.11436136066913605, -0.040886737406253815, 0.01817210763692856, 0.38775214552879333, 0.04180193319916725, 0.17233732342720032, -0.1505402773618698, 0.032431717962026596, 0.2806122601032257, 0.5700777769088745, -0.36699074506759644, -0.5296030640602112, -0.35463058948516846, 0.09951868653297424, -0.2538297176361084, 0.20836114883422852, 0.2578791677951813, 0.07280409336090088, 0.2867012619972229, -0.03643506392836571, -0.5262278914451599, -0.17661747336387634, 0.09407559782266617, -0.11893749237060547, -0.0919085294008255, -0.13153085112571716, -0.17264029383659363, 0.44853851199150085, -0.04650068283081055, 0.10656779259443283, 0.09740981459617615, -0.2864108681678772, 0.04341435432434082, -0.18769703805446625, -0.0681234747171402, -0.018622614443302155, 0.2903560698032379, 0.44998273253440857, 0.31733304262161255, 0.10943329334259033, 0.2787298262119293, -0.049677249044179916, 0.16938376426696777, 0.3990059196949005, -0.10687991976737976, 0.15121859312057495, -0.012370058335363865, 0.3525823950767517, 0.11380082368850708, 0.04972076788544655, 0.03284083306789398, -0.2334701418876648, 0.01979360356926918, -0.41269248723983765, -0.2165423333644867, 0.08428491652011871, 0.04699854925274849, 0.02078101597726345, -0.21593230962753296, 0.4098223149776459, 0.004621222149580717, 0.084857277572155, 0.4312722384929657, -0.008937576785683632, -0.13001880049705505, -0.10242851823568344, 0.2752639055252075, -0.0600157231092453, -0.39504238963127136, -0.01162605918943882, -0.08730731904506683, -0.08169809728860855, 0.13610103726387024, 0.2155703753232956, -0.5168873071670532, 0.08370012789964676, -0.18513071537017822, 0.06677092611789703, 0.03916695713996887, 0.2158983200788498, 0.07601301372051239, 0.0687030702829361, 0.21069779992103577, 0.023475319147109985, -0.2601918578147888, 0.09668669104576111, -0.09848042577505112, -0.3440002501010895, -0.05203931778669357, -0.22967591881752014, -0.4839080572128296, -0.2817188799381256, 0.18315088748931885, -0.13416236639022827, -0.029744379222393036, 0.0408928245306015, 0.48440128564834595, -0.2869635224342346, -0.3106774687767029, -0.21561983227729797, 0.10980506241321564, -0.31265079975128174, -0.2158513367176056, 0.26918402314186096, 0.5505325198173523, -0.43018922209739685, -0.17988047003746033, -0.19438599050045013, -0.3203793466091156, -0.1810183823108673, 0.026105275377631187, -0.15206649899482727, -0.07762687653303146, -0.32389119267463684, 0.09056881070137024, 0.387576162815094, -0.15216121077537537, -0.12377753853797913, 0.2398299276828766, -0.11704659461975098, -0.020573608577251434, 0.1599130928516388, 0.3028189241886139, 0.23799942433834076, -0.053771935403347015, 0.019135862588882446, 0.11070418357849121, -0.1458936184644699, 0.05677860975265503, -0.12458804249763489, -0.42690610885620117, 0.07371610403060913, 0.3872930109500885, -0.15198345482349396, 0.0053189098834991455, 0.21581459045410156, -0.06551814824342728, 0.26339462399482727, -0.149910569190979, -0.19673112034797668, -0.09427852928638458, 0.05674051120877266, 0.4787812829017639, -0.16319578886032104, -0.2829907536506653, -0.44784414768218994, 0.2647426128387451, -0.14914195239543915, 0.05461685359477997, 0.00889386236667633, -0.4523778557777405, 0.20330071449279785, 0.10159045457839966, -0.2383701354265213, -0.07491862773895264, 0.10370030999183655, 0.14925584197044373, 0.06414222717285156, 0.035426098853349686, -0.41781285405158997, 0.1405351310968399, -0.03405607491731644, 0.31735849380493164, -0.45787808299064636, 0.14875425398349762, -0.0574168860912323, 0.09055862575769424, 0.2090190052986145, 0.18883049488067627, -0.17070800065994263, -0.21782581508159637, 0.2812896966934204, 0.47560855746269226, 0.18611542880535126, 0.0351792611181736, 0.3149668872356415, 0.3443828225135803, 0.26013487577438354, 0.07773986458778381, 0.28632840514183044, -0.3972282409667969, -0.1896202266216278, -0.1359674334526062, -0.41161447763442993, 0.5170630216598511, -0.004258759319782257, -0.15003153681755066, 0.1985105276107788, 0.026950934901833534, 0.25695905089378357, 0.1367434710264206, -0.11674707382917404, -0.19365786015987396, -0.11385758221149445, -0.05006812885403633, -0.20232564210891724, 0.10621090978384018, -0.494597464799881, 0.15080714225769043, 0.18036550283432007, 0.01677018031477928, 0.2984996438026428, -0.021571293473243713, -0.07697253674268723, -0.0018530823290348053, 0.17365390062332153, 0.1824793517589569, 0.31865596771240234, 0.3234840929508209, 0.15559370815753937, 0.11867509037256241, -0.01656414195895195, -0.0741463154554367, 0.30160585045814514, 0.026618514209985733, -0.03473946452140808, 0.09699194133281708, -0.029766255989670753, -0.2003198266029358, -0.2280460000038147, 0.17369236052036285, -0.09603341668844223, -0.07385312020778656, -0.28254464268684387, -0.0885319709777832, -0.20905323326587677, -0.6581533551216125, -0.05354182422161102, 0.09926337748765945, -0.030946630984544754, -0.25551319122314453, 0.2989569902420044, 0.2393931746482849, -0.1037275642156601, 0.12467024475336075, -0.4481700360774994, 0.5235955715179443, -0.1312299519777298, -0.24101991951465607, -0.04260707646608353, -0.09528647363185883, 0.22296571731567383, 0.12938863039016724, 0.36205482482910156, 0.0782347023487091, 0.42507484555244446, -0.10515964031219482, 0.1626591980457306, -0.6538412570953369, -0.29891321063041687, 0.32189369201660156, -0.14035557210445404, 0.23561611771583557, 0.40726178884506226, -0.037389129400253296, 0.11718869209289551, -0.28607362508773804, 0.29606181383132935, 0.011554745957255363, -0.05672983080148697, 0.06553614884614944, 0.19422800838947296, -0.14619725942611694, -0.09259069710969925, -0.4285432994365692, -0.13755108416080475, -0.6999263167381287, 0.5103668570518494, 0.08452065289020538, 0.18460845947265625, 0.040365178138017654, 0.04322030022740364, 0.20207685232162476, -0.34264689683914185, -0.020174669101834297, 0.04109121114015579, -0.2451423853635788, 0.3315037190914154, -0.47216328978538513, -0.3048221468925476, 0.18973545730113983, 0.2879125475883484, 0.06851855665445328, -0.07328035682439804, -0.2536048889160156, -0.06693823635578156, -0.040694646537303925, 0.4539332687854767, 0.2050653100013733, 0.008595343679189682, 0.19561626017093658, 0.28343477845191956, -0.11391294002532959, 0.09802816063165665, -0.13803833723068237, -0.003228612244129181, -0.002561848610639572, -0.04887387901544571, 0.08989281207323074, 0.26610660552978516, -0.06258130073547363, 0.45150887966156006, 0.1835642009973526, 0.1438302993774414, 0.2746002674102783, -0.18457795679569244, 0.4849907159805298, -0.33178508281707764, -0.22657091915607452, -0.15366755425930023, -0.2720027565956116, 0.05256687104701996, 0.3774939775466919, 0.35740673542022705, -0.04627688229084015, -0.31503939628601074, -0.10013788938522339, -0.09997926652431488, -0.27838844060897827, 0.13031278550624847, -0.07324207574129105, 0.0630386471748352, -0.21924540400505066, -0.0628320500254631, 0.13175581395626068, 0.030734557658433914, 0.174966961145401, 0.34199368953704834, 0.08951765298843384, 0.002563485875725746, -0.3126135766506195, 0.2293635606765747, -0.34044456481933594, 0.35442060232162476, 0.10723619163036346, -0.2735748291015625, -0.1319562941789627, -0.310249388217926, -0.02974371612071991, -0.057045530527830124, 0.4837830662727356, -0.14306631684303284, -0.07429321855306625, 0.18426105380058289, -0.41230008006095886, -0.10318274050951004, 0.29726213216781616, 0.036462802439928055, 0.3551800549030304, 0.2315155565738678, 0.1336117386817932, -0.2394631803035736, -0.2982739508152008, 0.2556760907173157, 0.1700328141450882, -0.0684099942445755, 0.06746237725019455, -0.018703527748584747, 0.0449376106262207, -0.24472543597221375, -0.12365736812353134, -0.08225701749324799, -0.20662784576416016, 0.030433034524321556, -0.2221044898033142, -0.23852185904979706, -0.26359254121780396, 0.015459142625331879, 0.1650228649377823, 0.3331729769706726, -0.21727479994297028, 0.18017171323299408, 0.31912511587142944, 0.2902679741382599, 0.43443503975868225, 0.7448862195014954, -0.3598412871360779, -0.4550445079803467, 0.08495894074440002, -0.30337345600128174, 0.1730141043663025, 0.21790370345115662, 0.07903870195150375, 0.022899411618709564, 0.05882956087589264, -0.057279184460639954, -0.30208978056907654, -0.3777081072330475, 0.20529447495937347, 0.03495659679174423, -0.2872820198535919, -0.4906783998012543, 0.37712785601615906, 0.01115955039858818, -0.10029815137386322, 0.29010531306266785, 0.42097365856170654, -0.24876569211483002, 0.19934974610805511, -0.11238164454698563, 0.76711505651474, -0.13449735939502716, 0.10335813462734222, 0.07686005532741547, -0.0997561514377594, 0.3124958872795105, -0.34514570236206055, 0.1182636246085167, -0.32409244775772095, -0.19877897202968597, -0.12732908129692078, -0.04731425270438194, 0.05034350976347923, 0.12402696162462234, -0.3946969211101532, 0.08310810476541519, -0.056845810264348984, -0.14700093865394592, -0.24294663965702057, 0.3903099298477173, -0.41749638319015503, -0.0025208573788404465, -0.3736392855644226, 0.2069462388753891, 0.1799982190132141, -0.2190518081188202, -0.1043962761759758, -0.17452968657016754, 0.08519844710826874, 0.09557941555976868, -0.147691547870636, -0.13160133361816406, -0.22534780204296112, 0.09941627830266953, -0.07853098213672638, 0.09447820484638214, 0.13658393919467926, 0.4966995120048523, -0.045726992189884186, -0.05997804179787636, -0.30098775029182434, -0.06786184012889862, -0.1978074312210083, -0.05843934044241905, 0.021960867568850517, -0.04928309842944145, 0.5143634676933289, -0.11395369470119476, 0.0014013946056365967, 0.09747551381587982, -0.11721433699131012, -0.32451725006103516, 0.057188525795936584, 0.015275657176971436, 0.23041485249996185, -0.3192182183265686, -0.07232813537120819, -0.17120146751403809, -0.14023630321025848, -0.21148298680782318, 0.139353409409523, 0.1347419023513794, 0.10716570168733597, -0.0995732769370079, 0.15755054354667664, -0.01958027482032776, -0.09994138777256012, 0.2833784222602844, -0.40486907958984375, -0.07561121881008148, -0.0903359204530716, 0.3632047772407532, -0.2994372844696045, -0.23036226630210876, 0.30659204721450806, 0.18167461454868317, -0.30399519205093384, 0.1402318924665451, 0.07002083957195282, -0.0601339116692543, 0.22146494686603546, 0.3719114065170288, 0.2592393755912781, -0.34014761447906494, -0.16001246869564056, -0.04219838231801987, -0.019753608852624893, 0.387214720249176, -0.009827721863985062, 0.3278220593929291, 0.19984090328216553, -0.4215696156024933, 0.09032408893108368, 0.08505386114120483, -0.3908642828464508, 0.016075940802693367, 0.016414621844887733, -0.1582278609275818, 0.30736401677131653, 0.38684985041618347, 0.12930762767791748, -0.1641359180212021, 0.11870977282524109, -0.15862753987312317, -0.3434668779373169, -0.17247241735458374, -0.02621728926897049, 0.1583627164363861, -0.09682344645261765, 0.16644969582557678, 0.03760075941681862, -0.1459835171699524, -0.20171889662742615, -0.26655858755111694, 0.2079107016324997, 0.0015291273593902588, -0.14268629252910614, -0.006462038494646549, 0.3873749375343323, 0.0026599541306495667, -0.0774981677532196, 0.31635627150535583, 0.23563510179519653, 0.23198367655277252, -0.009877605363726616, -0.04998546838760376, -0.48171931505203247, -0.253262996673584, 0.3867637515068054, 0.5533813834190369, 0.2086791694164276, -0.1789565086364746, 0.49751630425453186, 0.0992787629365921, -0.026835158467292786, 0.2362530678510666, 0.4423343539237976, 0.25217103958129883, 0.09663689881563187, 0.17741060256958008, 0.18162593245506287, 0.1879919171333313, -0.18475331366062164, -0.29147249460220337, 0.10937865078449249, -0.15570226311683655, 0.15861231088638306, 0.26392754912376404, 0.31116101145744324, 0.09069658815860748, -0.04869168996810913, 0.07606161385774612, 0.2962065637111664, -0.11893519759178162, 0.2018497735261917, 0.2835618555545807, -0.0779208391904831, 0.04734285548329353, 0.11313752830028534, 0.15091358125209808, 0.20426520705223083, 0.40325164794921875, -0.19346940517425537, 0.38906538486480713, 0.1948864459991455, 0.11286522448062897, 0.5301024913787842, -0.21214278042316437, 0.15053938329219818, -0.09323905408382416, 0.022494979202747345, 0.0027783140540122986, -0.07872214913368225, 0.6276432871818542, -0.07567135244607925, -0.03842141479253769, -0.26661601662635803, 0.22995425760746002, 0.04047568887472153, -0.0322003997862339, -0.02845899760723114, -0.37259310483932495, -0.024736173450946808, 0.07502512633800507, -0.19859294593334198, -0.09791821241378784, 0.04865773022174835, 0.058742374181747437, 0.42357778549194336, -0.36531633138656616, 0.5924959182739258, -0.18494820594787598, 0.058703236281871796, -0.26811379194259644, 0.06901754438877106, 0.21880783140659332, -0.07806247472763062, 0.3142172694206238, 0.12904098629951477, 0.28691354393959045, 0.044047992676496506, 0.14979468286037445, 0.02322445809841156, -0.4134862422943115, -0.036159079521894455, -0.11884943395853043, -0.05323328077793121, -0.13284197449684143, -0.11734291911125183, 0.46339327096939087, 0.2072727084159851, -0.10292927175760269, -0.18864895403385162, -0.08488437533378601, 0.05627996847033501, -0.30791953206062317, 0.09285067021846771, 0.22335277497768402, -0.258813738822937, 0.14374679327011108, -0.0762205496430397, -0.2570023834705353, -0.05646408349275589, 0.3483569920063019, -0.021921981126070023, -0.08296483755111694, 0.06382492184638977, 0.137471541762352, 0.30955514311790466, 0.4253747761249542, 0.19264230132102966, 0.05701354146003723, 0.09877695143222809, -0.1484185755252838, -0.5715500712394714, -0.10105926543474197, 0.1503126621246338, -0.10811805725097656, 0.1291171908378601, 0.12425795197486877, 0.38623443245887756, 0.3032877445220947, -0.011065155267715454, -0.24981187283992767, 0.3627523183822632, 0.06349421292543411, -0.0787096917629242, -0.1981080174446106, 0.06528103351593018, 0.1046019122004509, -0.060368310660123825, -0.12343037873506546, 0.08570320159196854, -0.0989549309015274, -0.008651744574308395, -0.1724500060081482, 0.153548926115036, -0.10838784277439117, -0.4019586741924286, 0.2503278851509094, -0.08023703098297119, 0.2940327525138855, -0.07519606500864029, -0.15548880398273468, -0.17788366973400116, -0.0710754320025444, -0.280222088098526, 0.10454241186380386, 0.22244423627853394, 0.1623881310224533, -0.2991914749145508, -0.3933945894241333, -0.24262899160385132, 0.24234913289546967, -0.01097063347697258, 0.08975076675415039, -0.3162964880466461, 0.08373788744211197, -0.008323773741722107, 0.006428736262023449, 0.22724907100200653, 0.2576885223388672, -0.01349657028913498, -0.008604924194514751, -0.032362744212150574, -0.13993102312088013, 0.2314283549785614, -0.1624806970357895, 0.12444654107093811, 0.11034756153821945, 0.010006450116634369, 0.36016374826431274, 0.0015756525099277496, -0.4059297442436218, -0.15269538760185242, 0.23661662638187408, 0.11949072033166885, 0.0118027962744236, 0.24070489406585693, 0.043067123740911484, -0.17723195254802704, -0.3418339192867279, 0.1479463130235672, 0.032202381640672684, -0.16706955432891846, -0.18683521449565887, -0.3817098140716553 ]
https://github.com/huggingface/datasets/issues/6756
Support SQLite files?
Considering `Dataset.from_sql`'s (extremely) low usage, I don't think many users are interested in using this format for their datasets. Also, SQLite files are hard/impossible to stream efficiently and require custom logic to define splits/subsets, so IMO we shouldn't encourage people to use SQLite on the Hub. @severo Do you have some real-world examples of datasets published in this format?
### Feature request Support loading a dataset from a SQLite file https://huggingface.co/datasets/severo/test_iris_sqlite/tree/main ### Motivation SQLite is a popular file format. ### Your contribution See discussion on slack: https://huggingface.slack.com/archives/C04L6P8KNQ5/p1702481859117909 (internal) In particular: a SQLite file can contain multiple tables, which might be matched to multiple configs. Maybe the detail of splits and configs should be defined in the README YAML, or use the same format as for ZIP files: `Iris.sqlite::Iris`. See dataset here: https://huggingface.co/datasets/severo/test_iris_sqlite Note: should we also support DuckDB files?
59
Support SQLite files? ### Feature request Support loading a dataset from a SQLite file https://huggingface.co/datasets/severo/test_iris_sqlite/tree/main ### Motivation SQLite is a popular file format. ### Your contribution See discussion on slack: https://huggingface.slack.com/archives/C04L6P8KNQ5/p1702481859117909 (internal) In particular: a SQLite file can contain multiple tables, which might be matched to multiple configs. Maybe the detail of splits and configs should be defined in the README YAML, or use the same format as for ZIP files: `Iris.sqlite::Iris`. See dataset here: https://huggingface.co/datasets/severo/test_iris_sqlite Note: should we also support DuckDB files? Considering `Dataset.from_sql`'s (extremely) low usage, I don't think many users are interested in using this format for their datasets. Also, SQLite files are hard/impossible to stream efficiently and require custom logic to define splits/subsets, so IMO we shouldn't encourage people to use SQLite on the Hub. @severo Do you have some real-world examples of datasets published in this format?
[ -0.5623488426208496, -0.26838648319244385, -0.06109265238046646, 0.33228981494903564, -0.019835900515317917, 0.23736318945884705, -0.11461873352527618, 0.41820529103279114, 0.13700570166110992, 0.08801745623350143, -0.23408222198486328, 0.42525923252105713, -0.13285236060619354, 0.45195719599723816, 0.06003493443131447, -0.06498058140277863, 0.013988547027111053, 0.04321761801838875, -0.0866205096244812, 0.279005765914917, -0.13992449641227722, 0.27931761741638184, 0.14319758117198944, 0.003963835537433624, -0.5163059830665588, 0.06416144222021103, -0.32505491375923157, 0.5339455008506775, -0.529801070690155, -0.33627185225486755, 0.0750538557767868, 0.33250463008880615, 0.1793895661830902, 0.26414671540260315, -0.00010921615466941148, -0.04911777749657631, 0.1448671817779541, -0.03781898692250252, -0.3261401951313019, -0.09960106015205383, -0.2632766664028168, -0.266794353723526, 0.12770241498947144, -0.06022642180323601, -0.19316956400871277, 0.20712478458881378, -0.030314696952700615, 0.06245731562376022, 0.08497129380702972, -0.08765954524278641, 0.15830907225608826, 0.16957680881023407, 0.011500608175992966, -0.4827437400817871, 0.30019599199295044, 0.44766634702682495, -0.37118619680404663, 0.256034791469574, 0.49351149797439575, 0.1428094506263733, -0.17035764455795288, -0.010720145888626575, -0.05215917527675629, -0.023030143231153488, 0.44492897391319275, -0.054461829364299774, 0.04242189973592758, -0.1384829729795456, -0.031059719622135162, 0.3501166105270386, 0.5441923141479492, -0.3001597821712494, -0.4187842607498169, -0.3861580491065979, 0.08257517963647842, -0.16102370619773865, 0.14574363827705383, 0.3876413404941559, 0.07371744513511658, 0.3343842923641205, -0.011774186044931412, -0.6387969255447388, -0.20095279812812805, 0.1698577105998993, -0.048040978610515594, 0.047318752855062485, -0.08588499575853348, -0.125800222158432, 0.23242472112178802, 0.21251767873764038, 0.3443782925605774, -0.05797667056322098, -0.20089739561080933, -0.17203760147094727, -0.15327653288841248, -0.18033556640148163, -0.07613860815763474, 0.4743577837944031, 0.3938143253326416, 0.34490108489990234, 0.09941145032644272, 0.27384883165359497, -0.19351127743721008, 0.12971064448356628, 0.49513354897499084, -0.0673045665025711, 0.30393633246421814, -0.1300356686115265, 0.4278809428215027, 0.16841097176074982, 0.15076018869876862, 0.09577804058790207, -0.22988660633563995, 0.18035577237606049, -0.4714004397392273, -0.13428783416748047, -0.013792485930025578, 0.02399739995598793, -0.01885782741010189, -0.21470075845718384, 0.5163655877113342, 0.03655251860618591, 0.21076460182666779, 0.3137240707874298, 0.07304791361093521, 0.06405665725469589, -0.23093003034591675, 0.32478415966033936, -0.023510625585913658, -0.37891197204589844, -0.07096895575523376, 0.010438653640449047, -0.14191144704818726, 0.17543546855449677, 0.19174711406230927, -0.6465173363685608, 0.06411916017532349, -0.1559569537639618, 0.2984919548034668, -0.02350585162639618, 0.04910174012184143, 0.04625127464532852, 0.013042524456977844, 0.15835952758789062, -0.06906549632549286, -0.15579336881637573, 0.1843189299106598, 0.023040860891342163, -0.3622976541519165, -0.0025406628847122192, -0.3833352327346802, -0.6443014144897461, -0.2582920491695404, 0.08491361141204834, -0.2898906469345093, 0.06890504062175751, -0.0729849562048912, 0.40582796931266785, -0.3753519654273987, -0.24305973947048187, -0.07850158959627151, 0.21028201282024384, -0.36750319600105286, -0.27295827865600586, 0.05740126967430115, 0.5242680311203003, -0.2757861018180847, -0.06659908592700958, -0.08369417488574982, -0.17887741327285767, -0.09448731690645218, 0.06719550490379333, -0.20524507761001587, 0.020624704658985138, -0.2548210024833679, 0.28179484605789185, 0.297111839056015, -0.36277100443840027, -0.11445355415344238, 0.2025810033082962, -0.037975676357746124, -0.07753092050552368, 0.09768495708703995, 0.28048813343048096, 0.28887122869491577, -0.06954356282949448, 0.1916029453277588, 0.08242855221033096, -0.0552675798535347, 0.049834027886390686, -0.21592232584953308, -0.5834744572639465, -0.04167570918798447, 0.5023629069328308, -0.15557321906089783, 0.0473242811858654, 0.1875883936882019, 0.08893878012895584, 0.24722102284431458, -0.047078315168619156, -0.16066288948059082, -0.16312582790851593, -0.0030784830451011658, 0.42684948444366455, -0.14536170661449432, -0.21482601761817932, -0.39489588141441345, 0.2638370990753174, -0.04769976809620857, 0.05027412250638008, 0.10675079375505447, -0.40813714265823364, 0.06581005454063416, 0.01697075180709362, -0.23437316715717316, 0.031715407967567444, 0.02509482204914093, -0.12408562004566193, 0.07385767996311188, -0.07165524363517761, -0.45108330249786377, 0.24387948215007782, -0.1243172436952591, 0.25082167983055115, -0.45681336522102356, 0.4652893841266632, -0.0039365049451589584, 0.03691985830664635, 0.22549918293952942, 0.22818908095359802, -0.09538357704877853, -0.08621834963560104, 0.2804579734802246, 0.38186225295066833, 0.17141678929328918, 0.20445653796195984, 0.43812093138694763, 0.3917010426521301, 0.36279192566871643, 0.19237744808197021, 0.4135289192199707, -0.4443310499191284, -0.16797588765621185, -0.17141428589820862, -0.3914050757884979, 0.4728349447250366, -0.24717576801776886, -0.21752023696899414, -0.000057641416788101196, 0.03186366707086563, 0.07412418723106384, 0.17595307528972626, -0.16484352946281433, -0.16681036353111267, 0.007257696241140366, 0.06405560672283173, -0.3324374556541443, -0.00744255818426609, -0.3042587637901306, 0.08400397002696991, 0.2818489074707031, -0.007017932832241058, 0.4215644598007202, 0.04292360320687294, -0.11078570038080215, -0.032927367836236954, 0.34846919775009155, 0.11525878310203552, 0.3156425356864929, 0.2239302396774292, 0.06505119055509567, 0.11895611882209778, 0.08917509764432907, -0.1707298308610916, 0.2945675253868103, 0.13393676280975342, 0.016765182837843895, 0.18512308597564697, -0.007583690341562033, -0.17170406877994537, -0.2901378571987152, 0.07009847462177277, -0.11827276647090912, -0.10365458577871323, -0.2011583000421524, -0.1813877820968628, -0.12601828575134277, -0.33346861600875854, 0.11009444296360016, -0.0815848857164383, -0.035953011363744736, -0.2893576920032501, 0.3685849905014038, 0.42310965061187744, -0.053413115441799164, -0.09396153688430786, -0.2838316857814789, 0.6913493275642395, -0.24800150096416473, -0.20720824599266052, -0.13611824810504913, -0.05500642955303192, 0.3492085635662079, 0.06428159773349762, 0.2739473879337311, 0.20523163676261902, 0.3367570638656616, -0.11843397468328476, 0.29851585626602173, -0.5600396394729614, -0.08640659600496292, 0.3225070536136627, -0.18954353034496307, 0.15958617627620697, 0.3859800696372986, 0.06985822319984436, 0.009440138936042786, -0.37208685278892517, 0.23081590235233307, -0.012283211573958397, 0.04519069939851761, 0.11531803011894226, 0.1647109091281891, -0.0989340990781784, -0.06151074916124344, -0.26481232047080994, -0.17328643798828125, -0.6769531965255737, 0.4690491557121277, 0.030327755957841873, 0.10700784623622894, -0.09153944998979568, -0.04613630473613739, 0.10633253306150436, -0.33584365248680115, -0.20085163414478302, -0.03734966367483139, -0.38847264647483826, 0.329620361328125, -0.452627032995224, -0.2534954249858856, 0.1245335042476654, 0.3251306414604187, 0.0019144751131534576, -0.19571736454963684, -0.3168824315071106, -0.344001829624176, -0.06761462241411209, 0.4628262519836426, 0.15926337242126465, -0.017963645979762077, 0.22382159531116486, 0.19672942161560059, -0.060752786695957184, 0.11374398320913315, -0.004445290192961693, -0.11268172413110733, 0.3119240403175354, -0.1602841019630432, 0.06146639212965965, -0.03182405233383179, 0.026060428470373154, 0.3057052493095398, 0.3758547604084015, 0.32043471932411194, 0.34443187713623047, 0.041650861501693726, 0.2906407415866852, -0.4159115254878998, -0.17192725837230682, -0.09306323528289795, -0.3338688910007477, 0.018597543239593506, 0.5530757904052734, 0.5701411962509155, 0.029331360012292862, -0.3266243040561676, -0.2910687327384949, -0.092567577958107, -0.2635836601257324, 0.12470177561044693, -0.027056686580181122, -0.031123153865337372, -0.22373415529727936, -0.05868477374315262, 0.08881257474422455, -0.1870337724685669, 0.19628845155239105, 0.40691906213760376, 0.11248086392879486, -0.029386861249804497, -0.3699207305908203, 0.03547903895378113, -0.4328184127807617, 0.27517610788345337, 0.16915294528007507, -0.24168798327445984, -0.123456209897995, -0.1301199495792389, 0.07957068830728531, 0.042067378759384155, 0.5010915994644165, -0.3254850506782532, -0.0772356316447258, 0.0035076625645160675, -0.2652650475502014, -0.2247442901134491, 0.229187473654747, -0.024975823238492012, 0.4657917022705078, 0.06160993129014969, 0.19950808584690094, -0.19874554872512817, -0.33223435282707214, 0.01036316528916359, 0.10049326717853546, 0.02482563629746437, 0.02395925298333168, 0.03142406418919563, 0.05473162978887558, -0.4119340181350708, -0.19562354683876038, 0.04117141664028168, -0.23592674732208252, -0.08699916303157806, -0.2227424830198288, -0.05222718417644501, -0.13403773307800293, 0.04118986427783966, 0.09267778694629669, 0.28248152136802673, -0.15096333622932434, -0.04293547570705414, 0.30287423729896545, 0.1294367015361786, 0.255756139755249, 0.7596093416213989, -0.16010217368602753, -0.3554746210575104, 0.17376267910003662, -0.33729541301727295, -0.02151188999414444, 0.4833862781524658, 0.11628007888793945, 0.02796846628189087, -0.13832183182239532, -0.019577734172344208, -0.4849701225757599, -0.4400968849658966, 0.10401340574026108, -0.13290822505950928, -0.3228703737258911, -0.24137350916862488, 0.5458661317825317, -0.09048949182033539, -0.03258173167705536, 0.3140393793582916, 0.5442551970481873, -0.219466432929039, 0.26724255084991455, -0.1547483503818512, 0.9996769428253174, -0.0038611814379692078, 0.15068098902702332, 0.024750610813498497, 0.011488169431686401, 0.36714327335357666, -0.5099846124649048, 0.09194213896989822, -0.21159018576145172, -0.2414299100637436, -0.2306545078754425, -0.04452177882194519, 0.04023793339729309, 0.22273488342761993, -0.4685501754283905, 0.023068159818649292, -0.013956114649772644, 0.04193299636244774, -0.3082828223705292, 0.41478580236434937, -0.608555257320404, -0.023364335298538208, -0.3316800594329834, 0.1292155534029007, 0.12171187996864319, -0.06209157034754753, -0.11504684388637543, -0.05673932284116745, -0.11705118417739868, 0.15033964812755585, -0.269248902797699, -0.1759207844734192, -0.040785349905490875, 0.09490583091974258, -0.10888628661632538, 0.052363961935043335, 0.1880279779434204, 0.38787341117858887, 0.17552310228347778, -0.023774106055498123, -0.4797906279563904, -0.07452061772346497, -0.19016775488853455, -0.11281681060791016, 0.035846564918756485, -0.08747724443674088, 0.38118433952331543, -0.14046558737754822, -0.1425796002149582, 0.03849172592163086, -0.024022970348596573, -0.4143908619880676, -0.03602050989866257, 0.06611863523721695, 0.1774013638496399, -0.43625161051750183, -0.2218734174966812, -0.05078044533729553, -0.22666600346565247, -0.18050126731395721, 0.08585813641548157, 0.21160735189914703, 0.13908372819423676, 0.012078538537025452, 0.2143182009458542, -0.03839140012860298, -0.15460769832134247, 0.2634243667125702, -0.2524696886539459, -0.14069122076034546, -0.22646456956863403, 0.373003214597702, -0.36689281463623047, -0.2214091420173645, 0.4586178660392761, 0.16920848190784454, -0.3976231813430786, 0.019334550946950912, 0.005622942000627518, -0.10843820124864578, 0.1837034970521927, 0.3412329852581024, 0.31648653745651245, -0.213961660861969, -0.11531978845596313, -0.14344623684883118, 0.174800306558609, 0.5166657567024231, 0.12020473182201385, 0.21028125286102295, 0.10197832435369492, -0.46360161900520325, 0.0569196417927742, 0.07321073859930038, -0.30286574363708496, 0.21093206107616425, -0.008864078670740128, -0.12300100922584534, 0.005956569686532021, 0.2795432209968567, 0.1342853456735611, -0.31928539276123047, -0.023082111030817032, -0.12040151655673981, -0.4405789077281952, -0.10523566603660583, 0.05837072804570198, 0.204384908080101, 0.0028099361807107925, 0.16502633690834045, -0.11162371188402176, -0.1436108946800232, -0.15965454280376434, -0.21756203472614288, 0.33025312423706055, 0.09397990256547928, -0.11455456912517548, 0.016724038869142532, 0.6622505784034729, 0.10681496560573578, -0.20388071238994598, 0.336880624294281, 0.27241432666778564, 0.3681733012199402, 0.030630089342594147, -0.06399578601121902, -0.34396201372146606, -0.2221810519695282, 0.23187869787216187, 0.6380112171173096, 0.23286467790603638, -0.07370004802942276, 0.49615365266799927, 0.18542803823947906, 0.08371621370315552, 0.20219549536705017, 0.37538474798202515, 0.18145129084587097, 0.03818535804748535, 0.12369531393051147, 0.05237697437405586, 0.10852494090795517, -0.029920782893896103, -0.4356195628643036, 0.07786087691783905, -0.058479197323322296, 0.1160113513469696, 0.23866719007492065, 0.47219493985176086, 0.17327332496643066, -0.18928714096546173, 0.10785935074090958, 0.3996220827102661, -0.18034648895263672, 0.17844480276107788, 0.2378598153591156, -0.05881178751587868, -0.009539429098367691, 0.045570142567157745, 0.010280044749379158, 0.013176821172237396, 0.4522321820259094, 0.1059960275888443, 0.49690115451812744, 0.3400038182735443, 0.15699990093708038, 0.5871344208717346, -0.15472085773944855, 0.005488567054271698, -0.10320746898651123, 0.013592541217803955, -0.0807894691824913, -0.061287373304367065, 0.5367565751075745, -0.24295960366725922, 0.006180834490805864, -0.29722461104393005, 0.0020803287625312805, 0.05300077050924301, 0.04723192751407623, -0.047417160123586655, -0.3688947558403015, -0.06553540378808975, -0.024997396394610405, -0.2961273491382599, -0.09408403933048248, 0.03948274999856949, 0.14863702654838562, 0.33137261867523193, -0.17681938409805298, 0.7038325071334839, -0.16011396050453186, 0.23921337723731995, -0.25058817863464355, 0.0357259102165699, 0.16093716025352478, -0.011178441345691681, 0.3215177655220032, 0.13355794548988342, 0.19480136036872864, -0.02607337012887001, 0.019522523507475853, 0.02493390440940857, -0.45285698771476746, -0.0826449766755104, 0.008728176355361938, 0.012947075068950653, 0.008274704217910767, -0.01195380836725235, 0.3837592303752899, 0.19539089500904083, -0.08419915288686752, -0.12264832854270935, -0.14273986220359802, -0.11339940130710602, -0.20049485564231873, 0.29988157749176025, 0.2080855369567871, -0.26540863513946533, 0.21483440697193146, -0.14645791053771973, -0.23729872703552246, -0.0395362488925457, 0.3457309603691101, -0.17680750787258148, -0.05792208015918732, -0.056698959320783615, 0.08847276866436005, 0.21248570084571838, 0.44008317589759827, 0.21593008935451508, -0.021756038069725037, 0.05904239043593407, -0.1629985123872757, -0.2937130928039551, -0.11002541333436966, 0.14403195679187775, -0.03261352330446243, 0.22580502927303314, 0.037216126918792725, 0.25508353114128113, 0.5390040874481201, -0.30056989192962646, -0.13933174312114716, 0.2628040611743927, 0.020539812743663788, -0.16575995087623596, 0.003548208624124527, 0.24761341512203217, 0.16345186531543732, -0.11539874970912933, -0.12827202677726746, 0.22509093582630157, 0.04712093994021416, -0.1267467439174652, -0.12852075695991516, 0.06995247304439545, -0.015214984305202961, -0.350687175989151, 0.1659054458141327, -0.07806188613176346, 0.18353992700576782, -0.06188901886343956, -0.12429096549749374, -0.27685779333114624, -0.19774208962917328, -0.18489958345890045, 0.04002093896269798, 0.12592948973178864, 0.20740975439548492, -0.2804728150367737, -0.3952386677265167, -0.11550699919462204, 0.2148071676492691, -0.13836506009101868, 0.30398187041282654, -0.3293951749801636, -0.03767407685518265, -0.09705973416566849, 0.014761463738977909, 0.1817130744457245, 0.34678930044174194, 0.00735735148191452, -0.037830181419849396, 0.05119611322879791, -0.09432151913642883, 0.25128060579299927, 0.05141158401966095, 0.05802921578288078, 0.10033664852380753, 0.03537756949663162, 0.3858482241630554, 0.009060545824468136, -0.35883092880249023, -0.23691311478614807, 0.0867433249950409, 0.11824323982000351, 0.042467061430215836, 0.3172059655189514, 0.159089133143425, -0.34377145767211914, -0.2697168290615082, 0.15795497596263885, -0.04348749667406082, -0.2677006125450134, -0.09867383539676666, -0.36710071563720703 ]
https://github.com/huggingface/datasets/issues/6755
Small typo on the documentation
Thanks for reporting @fostiropoulos! I've edited your comment to fix the link to the problematic line.
### Describe the bug There is a small typo on https://github.com/huggingface/datasets/blob/d5468836fe94e8be1ae093397dd43d4a2503b926/src/datasets/dataset_dict.py#L938 It should be `caching is enabled`. ### Steps to reproduce the bug Please visit https://github.com/huggingface/datasets/blob/d5468836fe94e8be1ae093397dd43d4a2503b926/src/datasets/dataset_dict.py#L938 ### Expected behavior `caching is enabled` ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.0-101-generic-x86_64-with-glibc2.35 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.10.0
16
Small typo on the documentation ### Describe the bug There is a small typo on https://github.com/huggingface/datasets/blob/d5468836fe94e8be1ae093397dd43d4a2503b926/src/datasets/dataset_dict.py#L938 It should be `caching is enabled`. ### Steps to reproduce the bug Please visit https://github.com/huggingface/datasets/blob/d5468836fe94e8be1ae093397dd43d4a2503b926/src/datasets/dataset_dict.py#L938 ### Expected behavior `caching is enabled` ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.0-101-generic-x86_64-with-glibc2.35 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.10.0 Thanks for reporting @fostiropoulos! I've edited your comment to fix the link to the problematic line.
[ -0.14334550499916077, -0.4649059772491455, -0.03588692098855972, 0.23592206835746765, 0.2400730550289154, -0.06276527047157288, 0.1922130584716797, 0.09662668406963348, 0.13380374014377594, 0.09644681215286255, -0.12876884639263153, 0.12284111231565475, -0.015786945819854736, 0.22396422922611237, 0.0044629378244280815, 0.1357170045375824, 0.2157110571861267, -0.016772113740444183, -0.2519717514514923, -0.07012429088354111, -0.0822654739022255, 0.2385273277759552, -0.189101904630661, -0.12223154306411743, -0.41662928462028503, 0.009678255766630173, -0.15685775876045227, 0.07403195649385452, -0.06887448579072952, -0.3345809578895569, 0.4875633120536804, 0.0592326894402504, -0.19408176839351654, 0.37222933769226074, -0.00010599952656775713, -0.1263943910598755, 0.32771962881088257, -0.026225987821817398, -0.15091539919376373, 0.04005108028650284, -0.12406928092241287, -0.21033789217472076, 0.14362764358520508, -0.11455616354942322, -0.2829420566558838, -0.10146090388298035, 0.12398926913738251, -0.19197635352611542, 0.3601469397544861, 0.14331962168216705, 0.36576053500175476, 0.5044735670089722, 0.23300211131572723, -0.0923522561788559, 0.12166021019220352, 0.015513703227043152, -0.15712474286556244, 0.21577277779579163, 0.03660055249929428, -0.044039078056812286, -0.1501532793045044, 0.31814637780189514, 0.1260390281677246, 0.08834736049175262, 0.37886539101600647, 0.18842501938343048, -0.1766836941242218, -0.10695789754390717, -0.01941131055355072, -0.018994547426700592, 0.3800082504749298, -0.44603198766708374, -0.5468992590904236, -0.36156803369522095, -0.04575448855757713, -0.20269371569156647, 0.24493271112442017, -0.008999038487672806, 0.00029850658029317856, 0.14787717163562775, -0.15167732536792755, -0.13750281929969788, 0.03880240023136139, -0.0020395368337631226, -0.06967426836490631, -0.18292710185050964, -0.3204794228076935, -0.07932636886835098, -0.0502241812646389, -0.13081642985343933, -0.20026472210884094, -0.02692718431353569, 0.06272148340940475, 0.18530626595020294, -0.23998038470745087, -0.10124179720878601, 0.26807692646980286, 0.33998727798461914, 0.14875108003616333, 0.16430334746837616, -0.11839602887630463, -0.08696062117815018, -0.13686709105968475, 0.12870198488235474, -0.05228257551789284, 0.42863929271698, -0.02174808830022812, -0.05434456840157509, 0.3476351499557495, 0.19945628941059113, -0.07637374103069305, -0.10340485721826553, 0.21862798929214478, -0.10979348421096802, 0.06223044916987419, -0.12585127353668213, 0.1863236129283905, -0.18409423530101776, -0.28717106580734253, 0.15688607096672058, 0.19639477133750916, -0.1087653636932373, 0.16782699525356293, 0.3368053138256073, -0.29572930932044983, -0.07624126225709915, -0.15609565377235413, 0.014889562502503395, -0.2307005077600479, 0.042190633714199066, -0.5081099271774292, 0.12828177213668823, -0.1903984397649765, 0.14583584666252136, 0.16415873169898987, -0.26507773995399475, 0.3742394745349884, 0.07103291153907776, 0.1654188334941864, -0.09036734700202942, -0.28603747487068176, -0.042027946561574936, 0.08208154886960983, 0.3197005093097687, -0.1261637657880783, 0.09919142723083496, 0.224239781498909, 0.07381998002529144, -0.2151159644126892, -0.21294254064559937, -0.13656184077262878, -0.24074798822402954, -0.11176316440105438, 0.23595859110355377, -0.2518956661224365, -0.06551428139209747, -0.1021212711930275, 0.02097371593117714, 0.16309896111488342, -0.11100204288959503, 0.10314390063285828, 0.20574188232421875, -0.3240213394165039, -0.23645800352096558, 0.2710201144218445, 0.4890148639678955, 0.017712514847517014, -0.26951366662979126, 0.31941449642181396, -0.013971105217933655, 0.20524972677230835, 0.24322505295276642, -0.16774865984916687, -0.14641278982162476, -0.30056360363960266, 0.11205156147480011, -0.1363869607448578, -0.38327133655548096, -0.5274311900138855, 0.028409957885742188, -0.053880393505096436, 0.12554025650024414, 0.11078371852636337, 0.04324645921587944, -0.04959990829229355, -0.07243023812770844, -0.03404541313648224, 0.043187521398067474, 0.19262108206748962, 0.06464911997318268, -0.3738374710083008, -0.37213584780693054, -0.036104679107666016, -0.10855340957641602, -0.01516507938504219, 0.21871459484100342, 0.01860629767179489, 0.054575130343437195, 0.19840723276138306, -0.021237198263406754, 0.19968077540397644, 0.36524367332458496, 0.4058702886104584, 0.15649107098579407, 0.0047871326096355915, -0.2436390519142151, -0.3684225380420685, 0.2886445224285126, -0.04424353316426277, 0.04508046433329582, -0.03740881383419037, -0.41239362955093384, -0.2714797854423523, -0.05642584711313248, -0.03519781306385994, -0.38531431555747986, 0.178562730550766, 0.04798007756471634, 0.3490320146083832, 0.1857365071773529, -0.22400836646556854, 0.6353957056999207, -0.11505749076604843, 0.1899288445711136, -0.4316404461860657, 0.22550421953201294, -0.06397548317909241, -0.09173740446567535, 0.08792935311794281, 0.06562835723161697, 0.19994410872459412, -0.09537754952907562, 0.01942131295800209, 0.44270774722099304, -0.061126913875341415, 0.3661326766014099, -0.07778120785951614, 0.05414888262748718, 0.18299919366836548, -0.04441608861088753, 0.038688916712999344, -0.044249217957258224, 0.12046703696250916, -0.04681667685508728, -0.168913334608078, 0.43512046337127686, 0.0694286972284317, -0.038037024438381195, 0.15748851001262665, -0.06514953821897507, 0.0875280424952507, 0.05635206773877144, -0.09338271617889404, -0.3878464698791504, 0.18043528497219086, -0.15117253363132477, 0.3651103675365448, 0.09358029812574387, -0.33209511637687683, 0.10178837925195694, 0.46722644567489624, 0.2107551246881485, 0.07278023660182953, 0.20591256022453308, -0.1360752284526825, -0.2067609429359436, 0.36720430850982666, 0.0422060452401638, 0.4079124927520752, 0.31394463777542114, 0.10783294588327408, 0.12117679417133331, -0.11272307485342026, -0.17840617895126343, 0.15238057076931, -0.1567983776330948, 0.079263836145401, -0.014108851552009583, 0.21718211472034454, -0.06041288003325462, -0.49600255489349365, 0.06069859489798546, -0.2015438973903656, 0.14459346234798431, -0.21799221634864807, -0.021362897008657455, -0.28179794549942017, -0.247837632894516, -0.022940821945667267, -0.14391635358333588, -0.34108906984329224, -0.23028995096683502, -0.0038599781692028046, 0.247984379529953, 0.050287727266550064, 0.21631628274917603, -0.09179838001728058, 0.20345306396484375, -0.06076587736606598, 0.037114355713129044, -0.3670612871646881, 0.047617778182029724, -0.09793714433908463, 0.05910811200737953, -0.02812313660979271, -0.07538798451423645, 0.3044428527355194, -0.12355908751487732, -0.009299010038375854, -0.305014431476593, -0.1985551416873932, 0.17337122559547424, -0.13127045333385468, 0.11933843046426773, 0.06939046084880829, 0.0756077766418457, -0.14354479312896729, 0.00044931191951036453, 0.32646042108535767, -0.3697810173034668, -0.35199683904647827, -0.17642486095428467, 0.16147975623607635, 0.1365177035331726, -0.24912075698375702, 0.007901392877101898, -0.11581685394048691, -0.28868991136550903, 0.38754498958587646, 0.10560126602649689, -0.02466929703950882, 0.3510793149471283, -0.048506446182727814, 0.025751721113920212, -0.25177106261253357, 0.22576934099197388, -0.4430049955844879, -0.5055156350135803, 0.21687909960746765, -0.25181320309638977, -0.4220964312553406, -0.0688689649105072, 0.09834150969982147, 0.22604818642139435, -0.19747285544872284, -0.42856425046920776, -0.46587836742401123, -0.4984673261642456, 0.22558146715164185, 0.049143534153699875, 0.24590334296226501, 0.3849308490753174, -0.14453929662704468, -0.21130050718784332, -0.2431674599647522, -0.15676981210708618, 0.0744560956954956, 0.0030862800776958466, -0.014763496816158295, -0.13231709599494934, 0.2259823977947235, 0.09647999703884125, 0.48002129793167114, 0.42230522632598877, -0.014678869396448135, 0.37969648838043213, -0.1801622211933136, 0.5039515495300293, -0.2134127914905548, -0.36636897921562195, 0.013668720610439777, -0.09371441602706909, 0.13776372373104095, 0.1977846324443817, 0.2948319613933563, 0.24147546291351318, -0.2558631896972656, -0.13761787116527557, -0.07097179442644119, -0.18432696163654327, -0.29564136266708374, 0.02847091667354107, 0.12570933997631073, 0.26400354504585266, 0.09353458136320114, -0.1728706955909729, -0.07815752923488617, 0.09743551909923553, 0.12696336209774017, 0.20375974476337433, 0.04733593389391899, -0.09405408799648285, -0.013781270012259483, -0.7629244327545166, 0.09718307107686996, -0.05037115886807442, 0.11477264761924744, -0.09162629395723343, -0.17111897468566895, 0.13431988656520844, -0.11400816589593887, 0.6901869177818298, 0.061547279357910156, 0.056368354707956314, -0.0019780825823545456, -0.203248530626297, -0.407741904258728, 0.018302973359823227, -0.022524967789649963, 0.1585829257965088, 0.1358206570148468, 0.3916730582714081, -0.30718401074409485, -0.24991770088672638, 0.10749972611665726, -0.020222676917910576, -0.0555315837264061, -0.17537672817707062, -0.3680514693260193, -0.20887738466262817, -0.16153696179389954, 0.030102446675300598, 0.1927705854177475, 0.17992497980594635, 0.022325532510876656, 0.13678446412086487, -0.08887370675802231, -0.1318901777267456, 0.04649091884493828, 0.06389079988002777, 0.24014732241630554, 0.013081994839012623, 0.28402721881866455, 0.10689994692802429, 0.11083115637302399, 0.10722334682941437, 0.5703480839729309, -0.09933504462242126, -0.1304696500301361, -0.03515684977173805, 0.1525639146566391, 0.01931636780500412, 0.2635153532028198, -0.28179311752319336, 0.20290541648864746, -0.06288737058639526, 0.22186866402626038, -0.3966013193130493, -0.034212637692689896, 0.26861363649368286, 0.16509802639484406, -0.06961163878440857, -0.19825449585914612, 0.5167254209518433, 0.1718212515115738, -0.0034846439957618713, 0.27797508239746094, 0.5248025059700012, -0.219541534781456, -0.001765331719070673, 0.01913878321647644, 0.8799664378166199, 0.049829594790935516, 0.3886314928531647, 0.2480294108390808, -0.07299311459064484, 0.5788323283195496, 0.11303994059562683, 0.1476137787103653, -0.1942657232284546, -0.2844078540802002, 0.013080058619379997, -0.02014065906405449, 0.12567678093910217, -0.2278696447610855, -0.08406814932823181, 0.30137723684310913, -0.03396317735314369, 0.4259556531906128, -0.16688691079616547, 0.09928064048290253, -0.3367426097393036, -0.21044592559337616, -0.42241838574409485, 0.26829415559768677, 0.1943369209766388, 0.4587845504283905, -0.07592760771512985, 0.02438337542116642, -0.09333072602748871, -0.10935883969068527, -0.2193472683429718, 0.08218010514974594, 0.07989175617694855, 0.14488664269447327, 0.1755509376525879, -0.188938707113266, -0.062050145119428635, 0.2355939745903015, 0.43826645612716675, 0.058605000376701355, -0.3634208142757416, 0.09617459774017334, -0.12133526057004929, 0.11735807359218597, -0.12341005355119705, 0.0312710776925087, 0.392839640378952, -0.08913500607013702, -0.018126636743545532, -0.05372779071331024, -0.009203155525028706, -0.12810716032981873, -0.006167680025100708, 0.17937682569026947, -0.3119836449623108, -0.3343379497528076, -0.003602907992899418, 0.06897347420454025, 0.19631315767765045, -0.3260001838207245, 0.23496709764003754, 0.3062644600868225, -0.06531775742769241, 0.14311234652996063, -0.0444178469479084, -0.083528533577919, -0.2628977596759796, 0.7045518159866333, -0.024228427559137344, -0.027651764452457428, 0.3050229549407959, 0.03378010913729668, -0.36755508184432983, -0.2073042392730713, -0.20756754279136658, 0.13059155642986298, -0.5372668504714966, 0.22849084436893463, 0.050761591643095016, 0.11119212210178375, -0.056603699922561646, 0.27009373903274536, 0.10510297119617462, 0.00865878164768219, 0.07637117803096771, -0.20865191519260406, -0.3485460579395294, 0.12404406070709229, -0.1747024804353714, 0.2579568922519684, 0.15858250856399536, 0.16058561205863953, -0.027784213423728943, -0.002034224569797516, -0.4267197847366333, 0.08220752328634262, -0.28091228008270264, -0.1931353211402893, 0.042807191610336304, -0.12059638649225235, 0.4380604028701782, -0.029118679463863373, 0.1979365199804306, 0.165487602353096, -0.25600293278694153, -0.26844310760498047, -0.013239661231637001, 0.05772559344768524, 0.029512260109186172, -0.16714337468147278, -0.058304641395807266, 0.15827563405036926, -0.25977593660354614, -0.19956770539283752, 0.2196945995092392, 0.5197077989578247, 0.07238829135894775, 0.10186693072319031, 0.154900923371315, 0.06547829508781433, 0.12501269578933716, -0.018687546253204346, 0.09714844822883606, 0.011116132140159607, -0.08872673660516739, 0.10688374936580658, -0.29175612330436707, 0.04308900982141495, 0.26139312982559204, 0.19522976875305176, 0.05566570907831192, -0.026772048324346542, 0.2907058298587799, -0.26001524925231934, -0.1701766550540924, 0.050214968621730804, 0.6185693740844727, 0.07989411056041718, -0.08495591580867767, -0.07869452238082886, 0.27822545170783997, 0.2849085032939911, -0.4023841321468353, -0.1889672577381134, 0.26429474353790283, 0.11208481341600418, 0.23573768138885498, 0.135575532913208, 0.208619624376297, 0.07072369754314423, 0.20208701491355896, 0.23209026455879211, 0.4249628186225891, -0.15746386349201202, 0.06417307257652283, -0.09383411705493927, 0.20002220571041107, 0.08225320279598236, 0.614669144153595, 0.3386721611022949, 0.2664697766304016, 0.37639009952545166, 0.017687968909740448, 0.18526774644851685, -0.23843681812286377, 0.13871319591999054, -0.08219077438116074, -0.3300260603427887, 0.09269914031028748, 0.07740012556314468, -0.18099361658096313, -0.02415034919977188, -0.26972341537475586, 0.5464985370635986, -0.21100637316703796, -0.026635438203811646, -0.22869214415550232, 0.33138570189476013, -0.2541487216949463, -0.2096112072467804, 0.2357425093650818, -0.11494451761245728, 0.13409282267093658, -0.0061883702874183655, -0.07338863611221313, -0.28453654050827026, 0.18815772235393524, -0.18522237241268158, 0.021898716688156128, -0.38468074798583984, 0.05295732617378235, 0.05574306845664978, 0.42527392506599426, -0.054683513939380646, 0.25457313656806946, -0.005844183266162872, -0.09189823269844055, -0.09268800914287567, 0.3992229402065277, 0.4017390012741089, -0.062178872525691986, 0.26430144906044006, 0.012547139078378677, -0.013605313375592232, -0.09494403749704361, -0.15545019507408142, 0.3373550772666931, -0.07424154877662659, -0.003210917115211487, 0.2264816015958786, 0.2112598568201065, -0.25106343626976013, 0.040613025426864624, -0.12440018355846405, 0.24884074926376343, -0.3539644777774811, 0.29822003841400146, -0.4233371913433075, -0.10172813385725021, -0.15635965764522552, 0.22873425483703613, -0.438044935464859, 0.039332639425992966, 0.20040291547775269, -0.10533472150564194, 0.23093947768211365, -0.21845592558383942, 0.1397266983985901, -0.14511935412883759, 0.3986138701438904, 0.36429038643836975, 0.10496755689382553, 0.05084361508488655, -0.24454784393310547, -0.49937161803245544, 0.05866565555334091, 0.01671094447374344, 0.0767114982008934, -0.13996335864067078, 0.17075835168361664, -0.22338664531707764, -0.15288810431957245, 0.14920097589492798, -0.04613981768488884, -0.13153211772441864, -0.10705216228961945, -0.19656509160995483, 0.015712624415755272, -0.3651159405708313, -0.19754451513290405, 0.1480477750301361, -0.07402999699115753, 0.16686969995498657, -0.22050070762634277, 0.15038353204727173, -0.12494221329689026, 0.23685917258262634, -0.15867368876934052, -0.22220242023468018, 0.25559839606285095, 0.13717764616012573, 0.08948559314012527, -0.0689813569188118, -0.07672649621963501, -0.304386168718338, -0.23971737921237946, -0.15255674719810486, 0.034300316125154495, -0.25515663623809814, 0.26674318313598633, -0.2627052664756775, -0.36600035429000854, -0.1917247772216797, 0.4255104660987854, 0.33633363246917725, -0.1859082281589508, -0.001916404813528061, 0.30781492590904236, -0.19340699911117554, -0.10011331737041473, 0.11245997250080109, 0.34393173456192017, -0.09615497291088104, 0.20683935284614563, -0.2731594145298004, -0.51129549741745, 0.656345009803772, -0.35752594470977783, -0.07720109820365906, -0.03148128464818001, 0.3090181052684784, 0.27595144510269165, -0.5946477055549622, -0.5413998961448669, 0.20221635699272156, 0.23537147045135498, 0.15558606386184692, -0.29222992062568665, 0.34073710441589355, -0.23782141506671906, 0.0019293799996376038, -0.11785338819026947, 0.47946470975875854, 0.16238567233085632, -0.0787680521607399, 0.3659651279449463, -0.17063160240650177 ]
https://github.com/huggingface/datasets/issues/6753
Type error when importing datasets on Kaggle
I have the same problem It seems that it only appears when you are using GPU It seems to work fine with the 2.17 version though
### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2
26
Type error when importing datasets on Kaggle ### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2 I have the same problem It seems that it only appears when you are using GPU It seems to work fine with the 2.17 version though
[ -0.26136472821235657, -0.33415448665618896, -0.027415717020630836, 0.36076289415359497, 0.4714803695678711, 0.025852128863334656, 0.08765425533056259, 0.2872433662414551, 0.2096555531024933, 0.12113531678915024, 0.01578827016055584, 0.6355251669883728, -0.12476203590631485, 0.6620275974273682, -0.18277041614055634, -0.21823549270629883, 0.26093676686286926, 0.030670955777168274, -0.17844048142433167, 0.05705270916223526, -0.1720655858516693, 0.13442333042621613, -0.2650320529937744, 0.10747916996479034, -0.35994014143943787, -0.24551922082901, 0.3026162087917328, -0.014529243111610413, -0.45964422821998596, -0.4620351493358612, 0.6299137473106384, -0.2674311399459839, 0.4304746985435486, 0.5246848464012146, -0.00011927213199669495, 0.07878386974334717, 0.4936656355857849, -0.0059339385479688644, -0.20050500333309174, -0.013890787959098816, -0.27870601415634155, -0.3012497127056122, 0.15795661509037018, -0.06152934208512306, 0.33402934670448303, -0.3131406605243683, -0.12783439457416534, -0.4988962709903717, 0.3232024610042572, 0.3253662884235382, 0.1703871786594391, 0.4124352037906647, 0.46104109287261963, -0.010725426487624645, 0.26977109909057617, 0.012213926762342453, -0.25078079104423523, -0.041357558220624924, -0.10311657190322876, 0.16791531443595886, 0.40202829241752625, 0.23019665479660034, 0.007986834272742271, -0.1476389765739441, 0.2358335554599762, -0.06398564577102661, -0.0890234187245369, -0.5767865180969238, 0.03472297638654709, 0.20604544878005981, 0.5398104786872864, -0.3143526017665863, -0.4586033523082733, -0.13926754891872406, -0.06488995254039764, 0.020919660106301308, 0.2324390411376953, -0.09083201736211777, -0.1182178407907486, -0.099845752120018, 0.19998319447040558, -0.12960964441299438, -0.21070972084999084, 0.16352660953998566, -0.28680866956710815, 0.047382939606904984, -0.1717798411846161, 0.22314533591270447, 0.13338693976402283, -0.3824140429496765, 0.3301791548728943, -0.22331304848194122, -0.14766280353069305, 0.03856877610087395, -0.596717894077301, -0.07784666121006012, -0.11188361793756485, -0.2849650979042053, -0.07007903605699539, -0.14478082954883575, -0.2462340146303177, 0.18569839000701904, -0.2581448554992676, 0.23551249504089355, 0.34406688809394836, 0.31901368498802185, 0.5112878084182739, 0.037789758294820786, -0.050245486199855804, -0.08046161383390427, 0.06354518234729767, -0.08151966333389282, -0.10780124366283417, -0.3635713458061218, -0.1441195011138916, 0.10064099729061127, 0.3143145442008972, -0.0680428221821785, -0.26543188095092773, 0.10145582258701324, -0.10846150666475296, 0.08243639022111893, -0.19552406668663025, 0.3701145052909851, 0.001275242306292057, 0.7063905596733093, 0.25611692667007446, 0.12283754348754883, -0.10371248424053192, -0.17282354831695557, -0.03346111997961998, 0.0442325621843338, -0.03722883388400078, -0.2569875121116638, -0.07490838319063187, -0.30618566274642944, 0.0671108290553093, -0.12940700352191925, 0.05153288692235947, 0.02385694533586502, -0.2245299518108368, -0.12920457124710083, -0.20819571614265442, 0.3890308439731598, -0.21319788694381714, 0.1742301881313324, 0.16003362834453583, -0.20126262307167053, -0.08869966864585876, 0.025448784232139587, -0.2379160225391388, -0.14978811144828796, -0.220516636967659, 0.10336694866418839, 0.11772765219211578, -0.14406205713748932, -0.6989132761955261, -0.19794824719429016, -0.006342053413391113, -0.0449710451066494, 0.008792906999588013, -0.29090315103530884, -0.03555544465780258, -0.16599053144454956, 0.029242949560284615, 0.12925469875335693, -0.3085280656814575, -0.08798044919967651, -0.2688230872154236, -0.0850723534822464, 0.26913750171661377, 0.2643228769302368, 0.09086526185274124, 0.15120111405849457, -0.12132105231285095, 0.22755120694637299, 0.5750376582145691, -0.599565327167511, -0.10846292227506638, 0.3927920460700989, 0.14636079967021942, 0.0969635397195816, 0.06570757180452347, -0.0978754460811615, 0.24478654563426971, 0.10309219360351562, 0.18755029141902924, 0.05757312849164009, -0.23242369294166565, -0.03880215436220169, -0.13577032089233398, -0.3379981517791748, 0.07147812098264694, 0.13268299400806427, 0.17506979405879974, -0.11979231983423233, 0.12166497111320496, -0.12475891411304474, 0.15411999821662903, 0.059171419590711594, -0.14757965505123138, 0.050995782017707825, 0.4194006323814392, -0.047689810395240784, -0.07198148965835571, -0.41344165802001953, -0.605878472328186, 0.265687495470047, -0.07041080296039581, 0.07356054335832596, -0.05569946765899658, -0.13217291235923767, -0.3814888596534729, 0.33343374729156494, -0.05320929363369942, 0.06510968506336212, 0.017231710255146027, -0.27886655926704407, -0.2159193754196167, 0.166025772690773, -0.04465118423104286, 0.12059731781482697, -0.07115233689546585, 0.13696224987506866, -0.3262346684932709, 0.20488561689853668, -0.2491409331560135, -0.14427615702152252, 0.0005811117589473724, 0.14254528284072876, 0.18394099175930023, -0.024036826565861702, -0.12286712974309921, 0.2898864150047302, 0.4424312114715576, 0.2490873485803604, -0.042547330260276794, 0.004861593246459961, 0.27654463052749634, -0.2127174735069275, -0.10743314772844315, 0.16557185351848602, 0.28569933772087097, 0.0923774316906929, 0.260417640209198, 0.15281438827514648, 0.14850732684135437, 0.21500264108181, -0.2548845410346985, 0.3084891736507416, 0.2156447470188141, 0.38058847188949585, 0.12257640808820724, -0.23281536996364594, 0.04896274209022522, -0.07672007381916046, -0.09477505832910538, 0.06133773922920227, -0.08702649921178818, 0.07946940511465073, 0.6191005706787109, 0.06057405099272728, 0.075776606798172, 0.07861081510782242, -0.24993357062339783, 0.19472083449363708, 0.34381285309791565, 0.1784525066614151, 0.19397851824760437, 0.14593936502933502, -0.1850079596042633, -0.18100452423095703, 0.08264048397541046, 0.03381740301847458, 0.34196117520332336, 0.11901260912418365, 0.5641045570373535, 0.17472106218338013, 0.11657272279262543, -0.016765356063842773, -0.09491008520126343, 0.05800573155283928, -0.15329253673553467, 0.16051751375198364, -0.33322563767433167, 0.21318311989307404, -0.41972845792770386, -0.22864511609077454, -0.3341604173183441, 0.0009781327098608017, -0.07637014985084534, -0.34499308466911316, -0.264939546585083, 0.05090852081775665, -0.027488091960549355, 0.20314016938209534, 0.19239191710948944, 0.13040882349014282, 0.27721142768859863, -0.05937269330024719, -0.29358139634132385, -0.17029017210006714, -0.31999677419662476, -0.01012096181511879, 0.4217284619808197, -0.09688272327184677, 0.2672584354877472, -0.10308054089546204, 0.23058320581912994, -0.42408862709999084, -0.36322668194770813, 0.042302560061216354, -0.3046068549156189, 0.3154713213443756, 0.32324880361557007, 0.2877095639705658, 0.07032349705696106, -0.2859432101249695, 0.2602946162223816, -0.2453404814004898, -0.34764164686203003, 0.24302390217781067, -0.16021494567394257, -0.14246492087841034, -0.14824330806732178, -0.3094412386417389, -0.34377366304397583, -0.3689435124397278, 0.33018404245376587, 0.0758419781923294, 0.017837490886449814, 0.0301622673869133, 0.31667688488960266, 0.10990825295448303, 0.0015783067792654037, -0.05517681688070297, -0.035151850432157516, 0.0541796050965786, 0.21429292857646942, 0.005849933717399836, -0.3246062397956848, 0.23504957556724548, 0.020807262510061264, 0.007581982761621475, -0.011754216626286507, -0.3302909731864929, -0.036124423146247864, -0.2830454707145691, 0.34285828471183777, -0.037203557789325714, 0.04823092371225357, 0.3321744203567505, 0.19995331764221191, 0.00836029089987278, -0.20103371143341064, -0.12429016828536987, -0.014881350100040436, -0.016176238656044006, 0.13077782094478607, 0.10718279331922531, 0.35855844616889954, 0.026683982461690903, 0.49847906827926636, 0.3639880418777466, -0.12506051361560822, 0.11806628853082657, -0.1965607851743698, 0.13495692610740662, -0.26674097776412964, -0.264699786901474, 0.15087276697158813, -0.3152627944946289, 0.08388131111860275, -0.04020264744758606, -0.16960647702217102, -0.048739105463027954, -0.17401942610740662, 0.11865381896495819, -0.2349722981452942, -0.13228900730609894, 0.009178906679153442, -0.24252194166183472, 0.04532460868358612, -0.10512062907218933, 0.052776776254177094, -0.1036798506975174, 0.052784308791160583, 0.33009517192840576, 0.2006852924823761, -0.09895419329404831, -0.035278938710689545, -0.4419666528701782, -0.39874011278152466, -0.29420745372772217, 0.5004904270172119, 0.14570073783397675, 0.6171104311943054, 0.08990104496479034, 0.05135563015937805, 0.02418769896030426, 0.06809452921152115, 0.6864555478096008, -0.13849768042564392, -0.07306923717260361, 0.047032680362463, 0.12364476919174194, -0.901086151599884, -0.11559945344924927, -0.12589624524116516, -0.05095556005835533, 0.03270580992102623, 0.022464536130428314, -0.39961984753608704, -0.15368935465812683, -0.16099512577056885, 0.06423497200012207, -0.042578984051942825, 0.19325701892375946, -0.3148481547832489, -0.04142339527606964, -0.24698324501514435, -0.35504645109176636, 0.12892194092273712, 0.28018978238105774, -0.18618175387382507, 0.09881897270679474, -0.4716356694698334, -0.04149913415312767, 0.04423011839389801, 0.03576323390007019, 0.359601765871048, 0.06422612071037292, 0.08711734414100647, -0.06068802624940872, 0.13565601408481598, 0.46395042538642883, 0.5445829033851624, -0.03344817832112312, -0.678366482257843, -0.08967063575983047, 0.075589120388031, -0.0157255157828331, 0.1129419207572937, -0.3071531355381012, 0.13199618458747864, 0.0568055622279644, 0.024076640605926514, -0.23261284828186035, 0.24303002655506134, 0.3633400499820709, 0.30950501561164856, -0.10649442672729492, -0.25350987911224365, 0.6353702545166016, 0.27705004811286926, -0.04861544817686081, 0.4924071133136749, 0.2298324704170227, -0.2198508381843567, 0.36865293979644775, 0.10467157512903214, 0.6884196400642395, -0.005179606378078461, 0.11897008121013641, 0.43410977721214294, -0.1891028732061386, 0.3806332051753998, -0.1357099711894989, -0.06586357206106186, -0.30229783058166504, 0.06826555728912354, -0.17292065918445587, -0.12278571724891663, 0.538933515548706, -0.3541916608810425, -0.33625882863998413, -0.021795883774757385, -0.1711127609014511, 0.009939409792423248, 0.041871242225170135, 0.14283670485019684, -0.43609970808029175, -0.2486981749534607, -0.3056187033653259, 0.10168419778347015, -0.11645174026489258, 0.18623988330364227, -0.025813523679971695, -0.12047415971755981, -0.20158959925174713, -0.2519224286079407, -0.3406815826892853, -0.10498180985450745, -0.35068705677986145, 0.16744524240493774, 0.29474976658821106, -0.09386569261550903, 0.258721262216568, 0.5265774726867676, 0.3458613157272339, -0.09979046881198883, -0.3378656804561615, 0.07619616389274597, 0.15959124267101288, -0.07625891268253326, 0.11141525954008102, -0.14405754208564758, 0.10060865432024002, -0.10468762367963791, -0.15221218764781952, 0.25839269161224365, -0.18619632720947266, -0.04318705201148987, 0.2822990417480469, 0.23031501471996307, -0.09350208938121796, -0.17487967014312744, -0.2730582654476166, -0.09183497726917267, 0.09533420205116272, -0.09783028066158295, 0.05403972417116165, -0.06117531657218933, 0.033169254660606384, 0.2683038115501404, 0.16918666660785675, -0.07190880179405212, 0.0935773253440857, 0.17405623197555542, -0.05546914041042328, 0.2785852253437042, 0.3468850553035736, 0.05905852094292641, -0.3013990521430969, -0.21086877584457397, 0.4247443675994873, -0.07099413126707077, -0.14329469203948975, 0.0933040902018547, -0.028732934966683388, -0.3893497586250305, -0.038550082594156265, 0.746148943901062, 0.26037710905075073, -0.12083099037408829, 0.05507541075348854, -0.332498162984848, -0.21022914350032806, 0.34642958641052246, -0.2553941309452057, 0.10542804002761841, -0.08411958813667297, 0.3616868853569031, -0.11534182727336884, -0.13640686869621277, -0.1973676085472107, 0.16582344472408295, -0.19925802946090698, 0.10171869397163391, 0.035174690186977386, 0.1317315697669983, 0.22488947212696075, -0.2688411474227905, -0.024732671678066254, 0.1307651400566101, -0.33261820673942566, -0.11853641271591187, -0.12696294486522675, 0.1255401074886322, 0.08264786005020142, -0.11220517754554749, 0.08419931679964066, -0.07886798679828644, -0.14176155626773834, -0.05927237868309021, 0.02448008581995964, 0.17776143550872803, -0.26837629079818726, 0.3409786522388458, 0.04072341322898865, 0.22789591550827026, -0.17125533521175385, 0.3933192193508148, -0.06304088234901428, 0.18877768516540527, -0.020050404593348503, -0.024776257574558258, 0.01975731924176216, 0.08507445454597473, 0.22542907297611237, 0.10681329667568207, -0.2468515783548355, 0.21727758646011353, 0.23497605323791504, -0.5060950517654419, 0.05043227598071098, 0.1695142239332199, 0.15359634160995483, 0.3891795873641968, -0.3878187835216522, -0.004166681319475174, 0.10733474045991898, 0.11870885640382767, -0.13708584010601044, -0.24161769449710846, 0.3217504620552063, -0.0216972753405571, -0.006266932934522629, 0.11137980222702026, 0.07692848145961761, -0.0882805660367012, -0.025451309978961945, 0.2561064660549164, -0.1560298651456833, -0.033651676028966904, 0.4873669445514679, 0.14487865567207336, 0.023350153118371964, -0.01749773696064949, 0.16317835450172424, 0.12823519110679626, -0.00048182159662246704, 0.4956169128417969, -0.10321184247732162, 0.11126416176557541, 0.034069377928972244, 0.1286126673221588, 0.19522787630558014, -0.4197743833065033, 0.1869688779115677, -0.06254510581493378, -0.39867037534713745, 0.045055389404296875, 0.2503007650375366, 0.3284781575202942, -0.09096276760101318, -0.38155195116996765, -0.11539049446582794, -0.14155544340610504, -0.14272668957710266, 0.027728337794542313, -0.03960343822836876, -0.07147055864334106, 0.2021784782409668, -0.18590356409549713, 0.0893230140209198, -0.24648214876651764, 0.48970240354537964, 0.34426480531692505, -0.18621890246868134, -0.19799776375293732, -0.1033426895737648, 0.11163678020238876, 0.4129222333431244, -0.01965857855975628, 0.21872690320014954, 0.05444444715976715, -0.1613922268152237, 0.026282956823706627, 0.3376774191856384, 0.5282009840011597, 0.2862626016139984, -0.33920153975486755, 0.006901447661221027, 0.035907238721847534, -0.15455812215805054, 0.04958786070346832, 0.1287350058555603, 0.07105226069688797, 0.12383310496807098, 0.30818819999694824, 0.1361977756023407, -0.11223802715539932, -0.3233337998390198, 0.04853147268295288, 0.21357940137386322, -0.27496400475502014, 0.3166980743408203, -0.4078439474105835, 0.07851812988519669, -0.1383112221956253, 0.25319838523864746, -0.46327245235443115, 0.04039512947201729, 0.3761255443096161, -0.12054324895143509, 0.2397303581237793, -0.04950058087706566, 0.03741592541337013, -0.17733792960643768, 0.5054041743278503, 0.008357144892215729, 0.41617417335510254, -0.014227074570953846, -0.03866652399301529, -0.27930721640586853, -0.1269509196281433, 0.12126234173774719, -0.13169485330581665, 0.2128891497850418, 0.06568256765604019, 0.1463431566953659, 0.20962359011173248, 0.2961961328983307, -0.0897015631198883, 0.2780594825744629, 0.2132570892572403, -0.41406336426734924, -0.14633488655090332, 0.10090871900320053, -0.09268537163734436, 0.03172825276851654, -0.5520607829093933, 0.2627524137496948, -0.18913689255714417, 0.035334423184394836, 0.10144282132387161, -0.18943390250205994, 0.08535279333591461, -0.2570386528968811, 0.5332823991775513, 0.17508095502853394, 0.42452341318130493, -0.024605538696050644, -0.1897629201412201, 0.11456116288900375, -0.35631152987480164, -0.11849770694971085, 0.23425838351249695, -0.00782380998134613, 0.5419576168060303, -0.3235219717025757, 0.24840441346168518, -0.1923660933971405, 0.26634636521339417, 0.26379573345184326, 0.028126902878284454, -0.4453626871109009, 0.3799627423286438, -0.2995295226573944, -0.11609435826539993, -0.05967995896935463, 0.2554470896720886, 0.11091281473636627, 0.15485744178295135, -0.13134843111038208, -0.32706987857818604, 0.5934207439422607, -0.17588002979755402, -0.2434270828962326, -0.02990604192018509, -0.05407381057739258, 0.226864755153656, -0.05732312798500061, -0.6813849210739136, -0.03891489654779434, 0.21486671268939972, -0.14334890246391296, 0.016180243343114853, 0.023656263947486877, -0.16782812774181366, -0.000021371990442276, -0.13271549344062805, 0.629635214805603, -0.22085043787956238, 0.043171949684619904, 0.15558375418186188, -0.20794598758220673 ]
https://github.com/huggingface/datasets/issues/6753
Type error when importing datasets on Kaggle
> I have the same problem > It seems that it only appears when you are using GPU > It seems to work fine with the 2.17 version though I downgraded from 2.18 to 2.17, and it works with CPU/GPU .. except now pyarrow complains ``` ... File /opt/conda/lib/python3.10/site-packages/pyarrow/array.pxi:830, in pyarrow.lib._PandasConvertible.to_pandas() File /opt/conda/lib/python3.10/site-packages/pyarrow/table.pxi:3989, in pyarrow.lib.Table._to_pandas() ImportError: cannot import name table_to_blockmanager ``` see also https://www.kaggle.com/competitions/pii-detection-removal-from-educational-data/discussion/487474#2722594
### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2
64
Type error when importing datasets on Kaggle ### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2 > I have the same problem > It seems that it only appears when you are using GPU > It seems to work fine with the 2.17 version though I downgraded from 2.18 to 2.17, and it works with CPU/GPU .. except now pyarrow complains ``` ... File /opt/conda/lib/python3.10/site-packages/pyarrow/array.pxi:830, in pyarrow.lib._PandasConvertible.to_pandas() File /opt/conda/lib/python3.10/site-packages/pyarrow/table.pxi:3989, in pyarrow.lib.Table._to_pandas() ImportError: cannot import name table_to_blockmanager ``` see also https://www.kaggle.com/competitions/pii-detection-removal-from-educational-data/discussion/487474#2722594
[ -0.26136472821235657, -0.33415448665618896, -0.027415717020630836, 0.36076289415359497, 0.4714803695678711, 0.025852128863334656, 0.08765425533056259, 0.2872433662414551, 0.2096555531024933, 0.12113531678915024, 0.01578827016055584, 0.6355251669883728, -0.12476203590631485, 0.6620275974273682, -0.18277041614055634, -0.21823549270629883, 0.26093676686286926, 0.030670955777168274, -0.17844048142433167, 0.05705270916223526, -0.1720655858516693, 0.13442333042621613, -0.2650320529937744, 0.10747916996479034, -0.35994014143943787, -0.24551922082901, 0.3026162087917328, -0.014529243111610413, -0.45964422821998596, -0.4620351493358612, 0.6299137473106384, -0.2674311399459839, 0.4304746985435486, 0.5246848464012146, -0.00011927213199669495, 0.07878386974334717, 0.4936656355857849, -0.0059339385479688644, -0.20050500333309174, -0.013890787959098816, -0.27870601415634155, -0.3012497127056122, 0.15795661509037018, -0.06152934208512306, 0.33402934670448303, -0.3131406605243683, -0.12783439457416534, -0.4988962709903717, 0.3232024610042572, 0.3253662884235382, 0.1703871786594391, 0.4124352037906647, 0.46104109287261963, -0.010725426487624645, 0.26977109909057617, 0.012213926762342453, -0.25078079104423523, -0.041357558220624924, -0.10311657190322876, 0.16791531443595886, 0.40202829241752625, 0.23019665479660034, 0.007986834272742271, -0.1476389765739441, 0.2358335554599762, -0.06398564577102661, -0.0890234187245369, -0.5767865180969238, 0.03472297638654709, 0.20604544878005981, 0.5398104786872864, -0.3143526017665863, -0.4586033523082733, -0.13926754891872406, -0.06488995254039764, 0.020919660106301308, 0.2324390411376953, -0.09083201736211777, -0.1182178407907486, -0.099845752120018, 0.19998319447040558, -0.12960964441299438, -0.21070972084999084, 0.16352660953998566, -0.28680866956710815, 0.047382939606904984, -0.1717798411846161, 0.22314533591270447, 0.13338693976402283, -0.3824140429496765, 0.3301791548728943, -0.22331304848194122, -0.14766280353069305, 0.03856877610087395, -0.596717894077301, -0.07784666121006012, -0.11188361793756485, -0.2849650979042053, -0.07007903605699539, -0.14478082954883575, -0.2462340146303177, 0.18569839000701904, -0.2581448554992676, 0.23551249504089355, 0.34406688809394836, 0.31901368498802185, 0.5112878084182739, 0.037789758294820786, -0.050245486199855804, -0.08046161383390427, 0.06354518234729767, -0.08151966333389282, -0.10780124366283417, -0.3635713458061218, -0.1441195011138916, 0.10064099729061127, 0.3143145442008972, -0.0680428221821785, -0.26543188095092773, 0.10145582258701324, -0.10846150666475296, 0.08243639022111893, -0.19552406668663025, 0.3701145052909851, 0.001275242306292057, 0.7063905596733093, 0.25611692667007446, 0.12283754348754883, -0.10371248424053192, -0.17282354831695557, -0.03346111997961998, 0.0442325621843338, -0.03722883388400078, -0.2569875121116638, -0.07490838319063187, -0.30618566274642944, 0.0671108290553093, -0.12940700352191925, 0.05153288692235947, 0.02385694533586502, -0.2245299518108368, -0.12920457124710083, -0.20819571614265442, 0.3890308439731598, -0.21319788694381714, 0.1742301881313324, 0.16003362834453583, -0.20126262307167053, -0.08869966864585876, 0.025448784232139587, -0.2379160225391388, -0.14978811144828796, -0.220516636967659, 0.10336694866418839, 0.11772765219211578, -0.14406205713748932, -0.6989132761955261, -0.19794824719429016, -0.006342053413391113, -0.0449710451066494, 0.008792906999588013, -0.29090315103530884, -0.03555544465780258, -0.16599053144454956, 0.029242949560284615, 0.12925469875335693, -0.3085280656814575, -0.08798044919967651, -0.2688230872154236, -0.0850723534822464, 0.26913750171661377, 0.2643228769302368, 0.09086526185274124, 0.15120111405849457, -0.12132105231285095, 0.22755120694637299, 0.5750376582145691, -0.599565327167511, -0.10846292227506638, 0.3927920460700989, 0.14636079967021942, 0.0969635397195816, 0.06570757180452347, -0.0978754460811615, 0.24478654563426971, 0.10309219360351562, 0.18755029141902924, 0.05757312849164009, -0.23242369294166565, -0.03880215436220169, -0.13577032089233398, -0.3379981517791748, 0.07147812098264694, 0.13268299400806427, 0.17506979405879974, -0.11979231983423233, 0.12166497111320496, -0.12475891411304474, 0.15411999821662903, 0.059171419590711594, -0.14757965505123138, 0.050995782017707825, 0.4194006323814392, -0.047689810395240784, -0.07198148965835571, -0.41344165802001953, -0.605878472328186, 0.265687495470047, -0.07041080296039581, 0.07356054335832596, -0.05569946765899658, -0.13217291235923767, -0.3814888596534729, 0.33343374729156494, -0.05320929363369942, 0.06510968506336212, 0.017231710255146027, -0.27886655926704407, -0.2159193754196167, 0.166025772690773, -0.04465118423104286, 0.12059731781482697, -0.07115233689546585, 0.13696224987506866, -0.3262346684932709, 0.20488561689853668, -0.2491409331560135, -0.14427615702152252, 0.0005811117589473724, 0.14254528284072876, 0.18394099175930023, -0.024036826565861702, -0.12286712974309921, 0.2898864150047302, 0.4424312114715576, 0.2490873485803604, -0.042547330260276794, 0.004861593246459961, 0.27654463052749634, -0.2127174735069275, -0.10743314772844315, 0.16557185351848602, 0.28569933772087097, 0.0923774316906929, 0.260417640209198, 0.15281438827514648, 0.14850732684135437, 0.21500264108181, -0.2548845410346985, 0.3084891736507416, 0.2156447470188141, 0.38058847188949585, 0.12257640808820724, -0.23281536996364594, 0.04896274209022522, -0.07672007381916046, -0.09477505832910538, 0.06133773922920227, -0.08702649921178818, 0.07946940511465073, 0.6191005706787109, 0.06057405099272728, 0.075776606798172, 0.07861081510782242, -0.24993357062339783, 0.19472083449363708, 0.34381285309791565, 0.1784525066614151, 0.19397851824760437, 0.14593936502933502, -0.1850079596042633, -0.18100452423095703, 0.08264048397541046, 0.03381740301847458, 0.34196117520332336, 0.11901260912418365, 0.5641045570373535, 0.17472106218338013, 0.11657272279262543, -0.016765356063842773, -0.09491008520126343, 0.05800573155283928, -0.15329253673553467, 0.16051751375198364, -0.33322563767433167, 0.21318311989307404, -0.41972845792770386, -0.22864511609077454, -0.3341604173183441, 0.0009781327098608017, -0.07637014985084534, -0.34499308466911316, -0.264939546585083, 0.05090852081775665, -0.027488091960549355, 0.20314016938209534, 0.19239191710948944, 0.13040882349014282, 0.27721142768859863, -0.05937269330024719, -0.29358139634132385, -0.17029017210006714, -0.31999677419662476, -0.01012096181511879, 0.4217284619808197, -0.09688272327184677, 0.2672584354877472, -0.10308054089546204, 0.23058320581912994, -0.42408862709999084, -0.36322668194770813, 0.042302560061216354, -0.3046068549156189, 0.3154713213443756, 0.32324880361557007, 0.2877095639705658, 0.07032349705696106, -0.2859432101249695, 0.2602946162223816, -0.2453404814004898, -0.34764164686203003, 0.24302390217781067, -0.16021494567394257, -0.14246492087841034, -0.14824330806732178, -0.3094412386417389, -0.34377366304397583, -0.3689435124397278, 0.33018404245376587, 0.0758419781923294, 0.017837490886449814, 0.0301622673869133, 0.31667688488960266, 0.10990825295448303, 0.0015783067792654037, -0.05517681688070297, -0.035151850432157516, 0.0541796050965786, 0.21429292857646942, 0.005849933717399836, -0.3246062397956848, 0.23504957556724548, 0.020807262510061264, 0.007581982761621475, -0.011754216626286507, -0.3302909731864929, -0.036124423146247864, -0.2830454707145691, 0.34285828471183777, -0.037203557789325714, 0.04823092371225357, 0.3321744203567505, 0.19995331764221191, 0.00836029089987278, -0.20103371143341064, -0.12429016828536987, -0.014881350100040436, -0.016176238656044006, 0.13077782094478607, 0.10718279331922531, 0.35855844616889954, 0.026683982461690903, 0.49847906827926636, 0.3639880418777466, -0.12506051361560822, 0.11806628853082657, -0.1965607851743698, 0.13495692610740662, -0.26674097776412964, -0.264699786901474, 0.15087276697158813, -0.3152627944946289, 0.08388131111860275, -0.04020264744758606, -0.16960647702217102, -0.048739105463027954, -0.17401942610740662, 0.11865381896495819, -0.2349722981452942, -0.13228900730609894, 0.009178906679153442, -0.24252194166183472, 0.04532460868358612, -0.10512062907218933, 0.052776776254177094, -0.1036798506975174, 0.052784308791160583, 0.33009517192840576, 0.2006852924823761, -0.09895419329404831, -0.035278938710689545, -0.4419666528701782, -0.39874011278152466, -0.29420745372772217, 0.5004904270172119, 0.14570073783397675, 0.6171104311943054, 0.08990104496479034, 0.05135563015937805, 0.02418769896030426, 0.06809452921152115, 0.6864555478096008, -0.13849768042564392, -0.07306923717260361, 0.047032680362463, 0.12364476919174194, -0.901086151599884, -0.11559945344924927, -0.12589624524116516, -0.05095556005835533, 0.03270580992102623, 0.022464536130428314, -0.39961984753608704, -0.15368935465812683, -0.16099512577056885, 0.06423497200012207, -0.042578984051942825, 0.19325701892375946, -0.3148481547832489, -0.04142339527606964, -0.24698324501514435, -0.35504645109176636, 0.12892194092273712, 0.28018978238105774, -0.18618175387382507, 0.09881897270679474, -0.4716356694698334, -0.04149913415312767, 0.04423011839389801, 0.03576323390007019, 0.359601765871048, 0.06422612071037292, 0.08711734414100647, -0.06068802624940872, 0.13565601408481598, 0.46395042538642883, 0.5445829033851624, -0.03344817832112312, -0.678366482257843, -0.08967063575983047, 0.075589120388031, -0.0157255157828331, 0.1129419207572937, -0.3071531355381012, 0.13199618458747864, 0.0568055622279644, 0.024076640605926514, -0.23261284828186035, 0.24303002655506134, 0.3633400499820709, 0.30950501561164856, -0.10649442672729492, -0.25350987911224365, 0.6353702545166016, 0.27705004811286926, -0.04861544817686081, 0.4924071133136749, 0.2298324704170227, -0.2198508381843567, 0.36865293979644775, 0.10467157512903214, 0.6884196400642395, -0.005179606378078461, 0.11897008121013641, 0.43410977721214294, -0.1891028732061386, 0.3806332051753998, -0.1357099711894989, -0.06586357206106186, -0.30229783058166504, 0.06826555728912354, -0.17292065918445587, -0.12278571724891663, 0.538933515548706, -0.3541916608810425, -0.33625882863998413, -0.021795883774757385, -0.1711127609014511, 0.009939409792423248, 0.041871242225170135, 0.14283670485019684, -0.43609970808029175, -0.2486981749534607, -0.3056187033653259, 0.10168419778347015, -0.11645174026489258, 0.18623988330364227, -0.025813523679971695, -0.12047415971755981, -0.20158959925174713, -0.2519224286079407, -0.3406815826892853, -0.10498180985450745, -0.35068705677986145, 0.16744524240493774, 0.29474976658821106, -0.09386569261550903, 0.258721262216568, 0.5265774726867676, 0.3458613157272339, -0.09979046881198883, -0.3378656804561615, 0.07619616389274597, 0.15959124267101288, -0.07625891268253326, 0.11141525954008102, -0.14405754208564758, 0.10060865432024002, -0.10468762367963791, -0.15221218764781952, 0.25839269161224365, -0.18619632720947266, -0.04318705201148987, 0.2822990417480469, 0.23031501471996307, -0.09350208938121796, -0.17487967014312744, -0.2730582654476166, -0.09183497726917267, 0.09533420205116272, -0.09783028066158295, 0.05403972417116165, -0.06117531657218933, 0.033169254660606384, 0.2683038115501404, 0.16918666660785675, -0.07190880179405212, 0.0935773253440857, 0.17405623197555542, -0.05546914041042328, 0.2785852253437042, 0.3468850553035736, 0.05905852094292641, -0.3013990521430969, -0.21086877584457397, 0.4247443675994873, -0.07099413126707077, -0.14329469203948975, 0.0933040902018547, -0.028732934966683388, -0.3893497586250305, -0.038550082594156265, 0.746148943901062, 0.26037710905075073, -0.12083099037408829, 0.05507541075348854, -0.332498162984848, -0.21022914350032806, 0.34642958641052246, -0.2553941309452057, 0.10542804002761841, -0.08411958813667297, 0.3616868853569031, -0.11534182727336884, -0.13640686869621277, -0.1973676085472107, 0.16582344472408295, -0.19925802946090698, 0.10171869397163391, 0.035174690186977386, 0.1317315697669983, 0.22488947212696075, -0.2688411474227905, -0.024732671678066254, 0.1307651400566101, -0.33261820673942566, -0.11853641271591187, -0.12696294486522675, 0.1255401074886322, 0.08264786005020142, -0.11220517754554749, 0.08419931679964066, -0.07886798679828644, -0.14176155626773834, -0.05927237868309021, 0.02448008581995964, 0.17776143550872803, -0.26837629079818726, 0.3409786522388458, 0.04072341322898865, 0.22789591550827026, -0.17125533521175385, 0.3933192193508148, -0.06304088234901428, 0.18877768516540527, -0.020050404593348503, -0.024776257574558258, 0.01975731924176216, 0.08507445454597473, 0.22542907297611237, 0.10681329667568207, -0.2468515783548355, 0.21727758646011353, 0.23497605323791504, -0.5060950517654419, 0.05043227598071098, 0.1695142239332199, 0.15359634160995483, 0.3891795873641968, -0.3878187835216522, -0.004166681319475174, 0.10733474045991898, 0.11870885640382767, -0.13708584010601044, -0.24161769449710846, 0.3217504620552063, -0.0216972753405571, -0.006266932934522629, 0.11137980222702026, 0.07692848145961761, -0.0882805660367012, -0.025451309978961945, 0.2561064660549164, -0.1560298651456833, -0.033651676028966904, 0.4873669445514679, 0.14487865567207336, 0.023350153118371964, -0.01749773696064949, 0.16317835450172424, 0.12823519110679626, -0.00048182159662246704, 0.4956169128417969, -0.10321184247732162, 0.11126416176557541, 0.034069377928972244, 0.1286126673221588, 0.19522787630558014, -0.4197743833065033, 0.1869688779115677, -0.06254510581493378, -0.39867037534713745, 0.045055389404296875, 0.2503007650375366, 0.3284781575202942, -0.09096276760101318, -0.38155195116996765, -0.11539049446582794, -0.14155544340610504, -0.14272668957710266, 0.027728337794542313, -0.03960343822836876, -0.07147055864334106, 0.2021784782409668, -0.18590356409549713, 0.0893230140209198, -0.24648214876651764, 0.48970240354537964, 0.34426480531692505, -0.18621890246868134, -0.19799776375293732, -0.1033426895737648, 0.11163678020238876, 0.4129222333431244, -0.01965857855975628, 0.21872690320014954, 0.05444444715976715, -0.1613922268152237, 0.026282956823706627, 0.3376774191856384, 0.5282009840011597, 0.2862626016139984, -0.33920153975486755, 0.006901447661221027, 0.035907238721847534, -0.15455812215805054, 0.04958786070346832, 0.1287350058555603, 0.07105226069688797, 0.12383310496807098, 0.30818819999694824, 0.1361977756023407, -0.11223802715539932, -0.3233337998390198, 0.04853147268295288, 0.21357940137386322, -0.27496400475502014, 0.3166980743408203, -0.4078439474105835, 0.07851812988519669, -0.1383112221956253, 0.25319838523864746, -0.46327245235443115, 0.04039512947201729, 0.3761255443096161, -0.12054324895143509, 0.2397303581237793, -0.04950058087706566, 0.03741592541337013, -0.17733792960643768, 0.5054041743278503, 0.008357144892215729, 0.41617417335510254, -0.014227074570953846, -0.03866652399301529, -0.27930721640586853, -0.1269509196281433, 0.12126234173774719, -0.13169485330581665, 0.2128891497850418, 0.06568256765604019, 0.1463431566953659, 0.20962359011173248, 0.2961961328983307, -0.0897015631198883, 0.2780594825744629, 0.2132570892572403, -0.41406336426734924, -0.14633488655090332, 0.10090871900320053, -0.09268537163734436, 0.03172825276851654, -0.5520607829093933, 0.2627524137496948, -0.18913689255714417, 0.035334423184394836, 0.10144282132387161, -0.18943390250205994, 0.08535279333591461, -0.2570386528968811, 0.5332823991775513, 0.17508095502853394, 0.42452341318130493, -0.024605538696050644, -0.1897629201412201, 0.11456116288900375, -0.35631152987480164, -0.11849770694971085, 0.23425838351249695, -0.00782380998134613, 0.5419576168060303, -0.3235219717025757, 0.24840441346168518, -0.1923660933971405, 0.26634636521339417, 0.26379573345184326, 0.028126902878284454, -0.4453626871109009, 0.3799627423286438, -0.2995295226573944, -0.11609435826539993, -0.05967995896935463, 0.2554470896720886, 0.11091281473636627, 0.15485744178295135, -0.13134843111038208, -0.32706987857818604, 0.5934207439422607, -0.17588002979755402, -0.2434270828962326, -0.02990604192018509, -0.05407381057739258, 0.226864755153656, -0.05732312798500061, -0.6813849210739136, -0.03891489654779434, 0.21486671268939972, -0.14334890246391296, 0.016180243343114853, 0.023656263947486877, -0.16782812774181366, -0.000021371990442276, -0.13271549344062805, 0.629635214805603, -0.22085043787956238, 0.043171949684619904, 0.15558375418186188, -0.20794598758220673 ]
https://github.com/huggingface/datasets/issues/6753
Type error when importing datasets on Kaggle
I think you should remain open this issue. It works at the previous version but not the latter versions. It is possible as a bug that the maintainer could take note for.
### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2
32
Type error when importing datasets on Kaggle ### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2 I think you should remain open this issue. It works at the previous version but not the latter versions. It is possible as a bug that the maintainer could take note for.
[ -0.26136472821235657, -0.33415448665618896, -0.027415717020630836, 0.36076289415359497, 0.4714803695678711, 0.025852128863334656, 0.08765425533056259, 0.2872433662414551, 0.2096555531024933, 0.12113531678915024, 0.01578827016055584, 0.6355251669883728, -0.12476203590631485, 0.6620275974273682, -0.18277041614055634, -0.21823549270629883, 0.26093676686286926, 0.030670955777168274, -0.17844048142433167, 0.05705270916223526, -0.1720655858516693, 0.13442333042621613, -0.2650320529937744, 0.10747916996479034, -0.35994014143943787, -0.24551922082901, 0.3026162087917328, -0.014529243111610413, -0.45964422821998596, -0.4620351493358612, 0.6299137473106384, -0.2674311399459839, 0.4304746985435486, 0.5246848464012146, -0.00011927213199669495, 0.07878386974334717, 0.4936656355857849, -0.0059339385479688644, -0.20050500333309174, -0.013890787959098816, -0.27870601415634155, -0.3012497127056122, 0.15795661509037018, -0.06152934208512306, 0.33402934670448303, -0.3131406605243683, -0.12783439457416534, -0.4988962709903717, 0.3232024610042572, 0.3253662884235382, 0.1703871786594391, 0.4124352037906647, 0.46104109287261963, -0.010725426487624645, 0.26977109909057617, 0.012213926762342453, -0.25078079104423523, -0.041357558220624924, -0.10311657190322876, 0.16791531443595886, 0.40202829241752625, 0.23019665479660034, 0.007986834272742271, -0.1476389765739441, 0.2358335554599762, -0.06398564577102661, -0.0890234187245369, -0.5767865180969238, 0.03472297638654709, 0.20604544878005981, 0.5398104786872864, -0.3143526017665863, -0.4586033523082733, -0.13926754891872406, -0.06488995254039764, 0.020919660106301308, 0.2324390411376953, -0.09083201736211777, -0.1182178407907486, -0.099845752120018, 0.19998319447040558, -0.12960964441299438, -0.21070972084999084, 0.16352660953998566, -0.28680866956710815, 0.047382939606904984, -0.1717798411846161, 0.22314533591270447, 0.13338693976402283, -0.3824140429496765, 0.3301791548728943, -0.22331304848194122, -0.14766280353069305, 0.03856877610087395, -0.596717894077301, -0.07784666121006012, -0.11188361793756485, -0.2849650979042053, -0.07007903605699539, -0.14478082954883575, -0.2462340146303177, 0.18569839000701904, -0.2581448554992676, 0.23551249504089355, 0.34406688809394836, 0.31901368498802185, 0.5112878084182739, 0.037789758294820786, -0.050245486199855804, -0.08046161383390427, 0.06354518234729767, -0.08151966333389282, -0.10780124366283417, -0.3635713458061218, -0.1441195011138916, 0.10064099729061127, 0.3143145442008972, -0.0680428221821785, -0.26543188095092773, 0.10145582258701324, -0.10846150666475296, 0.08243639022111893, -0.19552406668663025, 0.3701145052909851, 0.001275242306292057, 0.7063905596733093, 0.25611692667007446, 0.12283754348754883, -0.10371248424053192, -0.17282354831695557, -0.03346111997961998, 0.0442325621843338, -0.03722883388400078, -0.2569875121116638, -0.07490838319063187, -0.30618566274642944, 0.0671108290553093, -0.12940700352191925, 0.05153288692235947, 0.02385694533586502, -0.2245299518108368, -0.12920457124710083, -0.20819571614265442, 0.3890308439731598, -0.21319788694381714, 0.1742301881313324, 0.16003362834453583, -0.20126262307167053, -0.08869966864585876, 0.025448784232139587, -0.2379160225391388, -0.14978811144828796, -0.220516636967659, 0.10336694866418839, 0.11772765219211578, -0.14406205713748932, -0.6989132761955261, -0.19794824719429016, -0.006342053413391113, -0.0449710451066494, 0.008792906999588013, -0.29090315103530884, -0.03555544465780258, -0.16599053144454956, 0.029242949560284615, 0.12925469875335693, -0.3085280656814575, -0.08798044919967651, -0.2688230872154236, -0.0850723534822464, 0.26913750171661377, 0.2643228769302368, 0.09086526185274124, 0.15120111405849457, -0.12132105231285095, 0.22755120694637299, 0.5750376582145691, -0.599565327167511, -0.10846292227506638, 0.3927920460700989, 0.14636079967021942, 0.0969635397195816, 0.06570757180452347, -0.0978754460811615, 0.24478654563426971, 0.10309219360351562, 0.18755029141902924, 0.05757312849164009, -0.23242369294166565, -0.03880215436220169, -0.13577032089233398, -0.3379981517791748, 0.07147812098264694, 0.13268299400806427, 0.17506979405879974, -0.11979231983423233, 0.12166497111320496, -0.12475891411304474, 0.15411999821662903, 0.059171419590711594, -0.14757965505123138, 0.050995782017707825, 0.4194006323814392, -0.047689810395240784, -0.07198148965835571, -0.41344165802001953, -0.605878472328186, 0.265687495470047, -0.07041080296039581, 0.07356054335832596, -0.05569946765899658, -0.13217291235923767, -0.3814888596534729, 0.33343374729156494, -0.05320929363369942, 0.06510968506336212, 0.017231710255146027, -0.27886655926704407, -0.2159193754196167, 0.166025772690773, -0.04465118423104286, 0.12059731781482697, -0.07115233689546585, 0.13696224987506866, -0.3262346684932709, 0.20488561689853668, -0.2491409331560135, -0.14427615702152252, 0.0005811117589473724, 0.14254528284072876, 0.18394099175930023, -0.024036826565861702, -0.12286712974309921, 0.2898864150047302, 0.4424312114715576, 0.2490873485803604, -0.042547330260276794, 0.004861593246459961, 0.27654463052749634, -0.2127174735069275, -0.10743314772844315, 0.16557185351848602, 0.28569933772087097, 0.0923774316906929, 0.260417640209198, 0.15281438827514648, 0.14850732684135437, 0.21500264108181, -0.2548845410346985, 0.3084891736507416, 0.2156447470188141, 0.38058847188949585, 0.12257640808820724, -0.23281536996364594, 0.04896274209022522, -0.07672007381916046, -0.09477505832910538, 0.06133773922920227, -0.08702649921178818, 0.07946940511465073, 0.6191005706787109, 0.06057405099272728, 0.075776606798172, 0.07861081510782242, -0.24993357062339783, 0.19472083449363708, 0.34381285309791565, 0.1784525066614151, 0.19397851824760437, 0.14593936502933502, -0.1850079596042633, -0.18100452423095703, 0.08264048397541046, 0.03381740301847458, 0.34196117520332336, 0.11901260912418365, 0.5641045570373535, 0.17472106218338013, 0.11657272279262543, -0.016765356063842773, -0.09491008520126343, 0.05800573155283928, -0.15329253673553467, 0.16051751375198364, -0.33322563767433167, 0.21318311989307404, -0.41972845792770386, -0.22864511609077454, -0.3341604173183441, 0.0009781327098608017, -0.07637014985084534, -0.34499308466911316, -0.264939546585083, 0.05090852081775665, -0.027488091960549355, 0.20314016938209534, 0.19239191710948944, 0.13040882349014282, 0.27721142768859863, -0.05937269330024719, -0.29358139634132385, -0.17029017210006714, -0.31999677419662476, -0.01012096181511879, 0.4217284619808197, -0.09688272327184677, 0.2672584354877472, -0.10308054089546204, 0.23058320581912994, -0.42408862709999084, -0.36322668194770813, 0.042302560061216354, -0.3046068549156189, 0.3154713213443756, 0.32324880361557007, 0.2877095639705658, 0.07032349705696106, -0.2859432101249695, 0.2602946162223816, -0.2453404814004898, -0.34764164686203003, 0.24302390217781067, -0.16021494567394257, -0.14246492087841034, -0.14824330806732178, -0.3094412386417389, -0.34377366304397583, -0.3689435124397278, 0.33018404245376587, 0.0758419781923294, 0.017837490886449814, 0.0301622673869133, 0.31667688488960266, 0.10990825295448303, 0.0015783067792654037, -0.05517681688070297, -0.035151850432157516, 0.0541796050965786, 0.21429292857646942, 0.005849933717399836, -0.3246062397956848, 0.23504957556724548, 0.020807262510061264, 0.007581982761621475, -0.011754216626286507, -0.3302909731864929, -0.036124423146247864, -0.2830454707145691, 0.34285828471183777, -0.037203557789325714, 0.04823092371225357, 0.3321744203567505, 0.19995331764221191, 0.00836029089987278, -0.20103371143341064, -0.12429016828536987, -0.014881350100040436, -0.016176238656044006, 0.13077782094478607, 0.10718279331922531, 0.35855844616889954, 0.026683982461690903, 0.49847906827926636, 0.3639880418777466, -0.12506051361560822, 0.11806628853082657, -0.1965607851743698, 0.13495692610740662, -0.26674097776412964, -0.264699786901474, 0.15087276697158813, -0.3152627944946289, 0.08388131111860275, -0.04020264744758606, -0.16960647702217102, -0.048739105463027954, -0.17401942610740662, 0.11865381896495819, -0.2349722981452942, -0.13228900730609894, 0.009178906679153442, -0.24252194166183472, 0.04532460868358612, -0.10512062907218933, 0.052776776254177094, -0.1036798506975174, 0.052784308791160583, 0.33009517192840576, 0.2006852924823761, -0.09895419329404831, -0.035278938710689545, -0.4419666528701782, -0.39874011278152466, -0.29420745372772217, 0.5004904270172119, 0.14570073783397675, 0.6171104311943054, 0.08990104496479034, 0.05135563015937805, 0.02418769896030426, 0.06809452921152115, 0.6864555478096008, -0.13849768042564392, -0.07306923717260361, 0.047032680362463, 0.12364476919174194, -0.901086151599884, -0.11559945344924927, -0.12589624524116516, -0.05095556005835533, 0.03270580992102623, 0.022464536130428314, -0.39961984753608704, -0.15368935465812683, -0.16099512577056885, 0.06423497200012207, -0.042578984051942825, 0.19325701892375946, -0.3148481547832489, -0.04142339527606964, -0.24698324501514435, -0.35504645109176636, 0.12892194092273712, 0.28018978238105774, -0.18618175387382507, 0.09881897270679474, -0.4716356694698334, -0.04149913415312767, 0.04423011839389801, 0.03576323390007019, 0.359601765871048, 0.06422612071037292, 0.08711734414100647, -0.06068802624940872, 0.13565601408481598, 0.46395042538642883, 0.5445829033851624, -0.03344817832112312, -0.678366482257843, -0.08967063575983047, 0.075589120388031, -0.0157255157828331, 0.1129419207572937, -0.3071531355381012, 0.13199618458747864, 0.0568055622279644, 0.024076640605926514, -0.23261284828186035, 0.24303002655506134, 0.3633400499820709, 0.30950501561164856, -0.10649442672729492, -0.25350987911224365, 0.6353702545166016, 0.27705004811286926, -0.04861544817686081, 0.4924071133136749, 0.2298324704170227, -0.2198508381843567, 0.36865293979644775, 0.10467157512903214, 0.6884196400642395, -0.005179606378078461, 0.11897008121013641, 0.43410977721214294, -0.1891028732061386, 0.3806332051753998, -0.1357099711894989, -0.06586357206106186, -0.30229783058166504, 0.06826555728912354, -0.17292065918445587, -0.12278571724891663, 0.538933515548706, -0.3541916608810425, -0.33625882863998413, -0.021795883774757385, -0.1711127609014511, 0.009939409792423248, 0.041871242225170135, 0.14283670485019684, -0.43609970808029175, -0.2486981749534607, -0.3056187033653259, 0.10168419778347015, -0.11645174026489258, 0.18623988330364227, -0.025813523679971695, -0.12047415971755981, -0.20158959925174713, -0.2519224286079407, -0.3406815826892853, -0.10498180985450745, -0.35068705677986145, 0.16744524240493774, 0.29474976658821106, -0.09386569261550903, 0.258721262216568, 0.5265774726867676, 0.3458613157272339, -0.09979046881198883, -0.3378656804561615, 0.07619616389274597, 0.15959124267101288, -0.07625891268253326, 0.11141525954008102, -0.14405754208564758, 0.10060865432024002, -0.10468762367963791, -0.15221218764781952, 0.25839269161224365, -0.18619632720947266, -0.04318705201148987, 0.2822990417480469, 0.23031501471996307, -0.09350208938121796, -0.17487967014312744, -0.2730582654476166, -0.09183497726917267, 0.09533420205116272, -0.09783028066158295, 0.05403972417116165, -0.06117531657218933, 0.033169254660606384, 0.2683038115501404, 0.16918666660785675, -0.07190880179405212, 0.0935773253440857, 0.17405623197555542, -0.05546914041042328, 0.2785852253437042, 0.3468850553035736, 0.05905852094292641, -0.3013990521430969, -0.21086877584457397, 0.4247443675994873, -0.07099413126707077, -0.14329469203948975, 0.0933040902018547, -0.028732934966683388, -0.3893497586250305, -0.038550082594156265, 0.746148943901062, 0.26037710905075073, -0.12083099037408829, 0.05507541075348854, -0.332498162984848, -0.21022914350032806, 0.34642958641052246, -0.2553941309452057, 0.10542804002761841, -0.08411958813667297, 0.3616868853569031, -0.11534182727336884, -0.13640686869621277, -0.1973676085472107, 0.16582344472408295, -0.19925802946090698, 0.10171869397163391, 0.035174690186977386, 0.1317315697669983, 0.22488947212696075, -0.2688411474227905, -0.024732671678066254, 0.1307651400566101, -0.33261820673942566, -0.11853641271591187, -0.12696294486522675, 0.1255401074886322, 0.08264786005020142, -0.11220517754554749, 0.08419931679964066, -0.07886798679828644, -0.14176155626773834, -0.05927237868309021, 0.02448008581995964, 0.17776143550872803, -0.26837629079818726, 0.3409786522388458, 0.04072341322898865, 0.22789591550827026, -0.17125533521175385, 0.3933192193508148, -0.06304088234901428, 0.18877768516540527, -0.020050404593348503, -0.024776257574558258, 0.01975731924176216, 0.08507445454597473, 0.22542907297611237, 0.10681329667568207, -0.2468515783548355, 0.21727758646011353, 0.23497605323791504, -0.5060950517654419, 0.05043227598071098, 0.1695142239332199, 0.15359634160995483, 0.3891795873641968, -0.3878187835216522, -0.004166681319475174, 0.10733474045991898, 0.11870885640382767, -0.13708584010601044, -0.24161769449710846, 0.3217504620552063, -0.0216972753405571, -0.006266932934522629, 0.11137980222702026, 0.07692848145961761, -0.0882805660367012, -0.025451309978961945, 0.2561064660549164, -0.1560298651456833, -0.033651676028966904, 0.4873669445514679, 0.14487865567207336, 0.023350153118371964, -0.01749773696064949, 0.16317835450172424, 0.12823519110679626, -0.00048182159662246704, 0.4956169128417969, -0.10321184247732162, 0.11126416176557541, 0.034069377928972244, 0.1286126673221588, 0.19522787630558014, -0.4197743833065033, 0.1869688779115677, -0.06254510581493378, -0.39867037534713745, 0.045055389404296875, 0.2503007650375366, 0.3284781575202942, -0.09096276760101318, -0.38155195116996765, -0.11539049446582794, -0.14155544340610504, -0.14272668957710266, 0.027728337794542313, -0.03960343822836876, -0.07147055864334106, 0.2021784782409668, -0.18590356409549713, 0.0893230140209198, -0.24648214876651764, 0.48970240354537964, 0.34426480531692505, -0.18621890246868134, -0.19799776375293732, -0.1033426895737648, 0.11163678020238876, 0.4129222333431244, -0.01965857855975628, 0.21872690320014954, 0.05444444715976715, -0.1613922268152237, 0.026282956823706627, 0.3376774191856384, 0.5282009840011597, 0.2862626016139984, -0.33920153975486755, 0.006901447661221027, 0.035907238721847534, -0.15455812215805054, 0.04958786070346832, 0.1287350058555603, 0.07105226069688797, 0.12383310496807098, 0.30818819999694824, 0.1361977756023407, -0.11223802715539932, -0.3233337998390198, 0.04853147268295288, 0.21357940137386322, -0.27496400475502014, 0.3166980743408203, -0.4078439474105835, 0.07851812988519669, -0.1383112221956253, 0.25319838523864746, -0.46327245235443115, 0.04039512947201729, 0.3761255443096161, -0.12054324895143509, 0.2397303581237793, -0.04950058087706566, 0.03741592541337013, -0.17733792960643768, 0.5054041743278503, 0.008357144892215729, 0.41617417335510254, -0.014227074570953846, -0.03866652399301529, -0.27930721640586853, -0.1269509196281433, 0.12126234173774719, -0.13169485330581665, 0.2128891497850418, 0.06568256765604019, 0.1463431566953659, 0.20962359011173248, 0.2961961328983307, -0.0897015631198883, 0.2780594825744629, 0.2132570892572403, -0.41406336426734924, -0.14633488655090332, 0.10090871900320053, -0.09268537163734436, 0.03172825276851654, -0.5520607829093933, 0.2627524137496948, -0.18913689255714417, 0.035334423184394836, 0.10144282132387161, -0.18943390250205994, 0.08535279333591461, -0.2570386528968811, 0.5332823991775513, 0.17508095502853394, 0.42452341318130493, -0.024605538696050644, -0.1897629201412201, 0.11456116288900375, -0.35631152987480164, -0.11849770694971085, 0.23425838351249695, -0.00782380998134613, 0.5419576168060303, -0.3235219717025757, 0.24840441346168518, -0.1923660933971405, 0.26634636521339417, 0.26379573345184326, 0.028126902878284454, -0.4453626871109009, 0.3799627423286438, -0.2995295226573944, -0.11609435826539993, -0.05967995896935463, 0.2554470896720886, 0.11091281473636627, 0.15485744178295135, -0.13134843111038208, -0.32706987857818604, 0.5934207439422607, -0.17588002979755402, -0.2434270828962326, -0.02990604192018509, -0.05407381057739258, 0.226864755153656, -0.05732312798500061, -0.6813849210739136, -0.03891489654779434, 0.21486671268939972, -0.14334890246391296, 0.016180243343114853, 0.023656263947486877, -0.16782812774181366, -0.000021371990442276, -0.13271549344062805, 0.629635214805603, -0.22085043787956238, 0.043171949684619904, 0.15558375418186188, -0.20794598758220673 ]
https://github.com/huggingface/datasets/issues/6753
Type error when importing datasets on Kaggle
> Solved for me by downgrading `!pip install -U datasets==2.16.0` Works with gpu as well Verified it's working w/ GPU if I make these 3 updates. ``` datasets==2.16.0 fsspec==2023.10.0 gcsfs==2023.10.0 ``` but the issue shouldn't be closed, this is just a workaround until they get the issue with 2.18.0 resolved. See also: https://www.kaggle.com/competitions/pii-detection-removal-from-educational-data/discussion/487474
### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2
53
Type error when importing datasets on Kaggle ### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2 > Solved for me by downgrading `!pip install -U datasets==2.16.0` Works with gpu as well Verified it's working w/ GPU if I make these 3 updates. ``` datasets==2.16.0 fsspec==2023.10.0 gcsfs==2023.10.0 ``` but the issue shouldn't be closed, this is just a workaround until they get the issue with 2.18.0 resolved. See also: https://www.kaggle.com/competitions/pii-detection-removal-from-educational-data/discussion/487474
[ -0.26136472821235657, -0.33415448665618896, -0.027415717020630836, 0.36076289415359497, 0.4714803695678711, 0.025852128863334656, 0.08765425533056259, 0.2872433662414551, 0.2096555531024933, 0.12113531678915024, 0.01578827016055584, 0.6355251669883728, -0.12476203590631485, 0.6620275974273682, -0.18277041614055634, -0.21823549270629883, 0.26093676686286926, 0.030670955777168274, -0.17844048142433167, 0.05705270916223526, -0.1720655858516693, 0.13442333042621613, -0.2650320529937744, 0.10747916996479034, -0.35994014143943787, -0.24551922082901, 0.3026162087917328, -0.014529243111610413, -0.45964422821998596, -0.4620351493358612, 0.6299137473106384, -0.2674311399459839, 0.4304746985435486, 0.5246848464012146, -0.00011927213199669495, 0.07878386974334717, 0.4936656355857849, -0.0059339385479688644, -0.20050500333309174, -0.013890787959098816, -0.27870601415634155, -0.3012497127056122, 0.15795661509037018, -0.06152934208512306, 0.33402934670448303, -0.3131406605243683, -0.12783439457416534, -0.4988962709903717, 0.3232024610042572, 0.3253662884235382, 0.1703871786594391, 0.4124352037906647, 0.46104109287261963, -0.010725426487624645, 0.26977109909057617, 0.012213926762342453, -0.25078079104423523, -0.041357558220624924, -0.10311657190322876, 0.16791531443595886, 0.40202829241752625, 0.23019665479660034, 0.007986834272742271, -0.1476389765739441, 0.2358335554599762, -0.06398564577102661, -0.0890234187245369, -0.5767865180969238, 0.03472297638654709, 0.20604544878005981, 0.5398104786872864, -0.3143526017665863, -0.4586033523082733, -0.13926754891872406, -0.06488995254039764, 0.020919660106301308, 0.2324390411376953, -0.09083201736211777, -0.1182178407907486, -0.099845752120018, 0.19998319447040558, -0.12960964441299438, -0.21070972084999084, 0.16352660953998566, -0.28680866956710815, 0.047382939606904984, -0.1717798411846161, 0.22314533591270447, 0.13338693976402283, -0.3824140429496765, 0.3301791548728943, -0.22331304848194122, -0.14766280353069305, 0.03856877610087395, -0.596717894077301, -0.07784666121006012, -0.11188361793756485, -0.2849650979042053, -0.07007903605699539, -0.14478082954883575, -0.2462340146303177, 0.18569839000701904, -0.2581448554992676, 0.23551249504089355, 0.34406688809394836, 0.31901368498802185, 0.5112878084182739, 0.037789758294820786, -0.050245486199855804, -0.08046161383390427, 0.06354518234729767, -0.08151966333389282, -0.10780124366283417, -0.3635713458061218, -0.1441195011138916, 0.10064099729061127, 0.3143145442008972, -0.0680428221821785, -0.26543188095092773, 0.10145582258701324, -0.10846150666475296, 0.08243639022111893, -0.19552406668663025, 0.3701145052909851, 0.001275242306292057, 0.7063905596733093, 0.25611692667007446, 0.12283754348754883, -0.10371248424053192, -0.17282354831695557, -0.03346111997961998, 0.0442325621843338, -0.03722883388400078, -0.2569875121116638, -0.07490838319063187, -0.30618566274642944, 0.0671108290553093, -0.12940700352191925, 0.05153288692235947, 0.02385694533586502, -0.2245299518108368, -0.12920457124710083, -0.20819571614265442, 0.3890308439731598, -0.21319788694381714, 0.1742301881313324, 0.16003362834453583, -0.20126262307167053, -0.08869966864585876, 0.025448784232139587, -0.2379160225391388, -0.14978811144828796, -0.220516636967659, 0.10336694866418839, 0.11772765219211578, -0.14406205713748932, -0.6989132761955261, -0.19794824719429016, -0.006342053413391113, -0.0449710451066494, 0.008792906999588013, -0.29090315103530884, -0.03555544465780258, -0.16599053144454956, 0.029242949560284615, 0.12925469875335693, -0.3085280656814575, -0.08798044919967651, -0.2688230872154236, -0.0850723534822464, 0.26913750171661377, 0.2643228769302368, 0.09086526185274124, 0.15120111405849457, -0.12132105231285095, 0.22755120694637299, 0.5750376582145691, -0.599565327167511, -0.10846292227506638, 0.3927920460700989, 0.14636079967021942, 0.0969635397195816, 0.06570757180452347, -0.0978754460811615, 0.24478654563426971, 0.10309219360351562, 0.18755029141902924, 0.05757312849164009, -0.23242369294166565, -0.03880215436220169, -0.13577032089233398, -0.3379981517791748, 0.07147812098264694, 0.13268299400806427, 0.17506979405879974, -0.11979231983423233, 0.12166497111320496, -0.12475891411304474, 0.15411999821662903, 0.059171419590711594, -0.14757965505123138, 0.050995782017707825, 0.4194006323814392, -0.047689810395240784, -0.07198148965835571, -0.41344165802001953, -0.605878472328186, 0.265687495470047, -0.07041080296039581, 0.07356054335832596, -0.05569946765899658, -0.13217291235923767, -0.3814888596534729, 0.33343374729156494, -0.05320929363369942, 0.06510968506336212, 0.017231710255146027, -0.27886655926704407, -0.2159193754196167, 0.166025772690773, -0.04465118423104286, 0.12059731781482697, -0.07115233689546585, 0.13696224987506866, -0.3262346684932709, 0.20488561689853668, -0.2491409331560135, -0.14427615702152252, 0.0005811117589473724, 0.14254528284072876, 0.18394099175930023, -0.024036826565861702, -0.12286712974309921, 0.2898864150047302, 0.4424312114715576, 0.2490873485803604, -0.042547330260276794, 0.004861593246459961, 0.27654463052749634, -0.2127174735069275, -0.10743314772844315, 0.16557185351848602, 0.28569933772087097, 0.0923774316906929, 0.260417640209198, 0.15281438827514648, 0.14850732684135437, 0.21500264108181, -0.2548845410346985, 0.3084891736507416, 0.2156447470188141, 0.38058847188949585, 0.12257640808820724, -0.23281536996364594, 0.04896274209022522, -0.07672007381916046, -0.09477505832910538, 0.06133773922920227, -0.08702649921178818, 0.07946940511465073, 0.6191005706787109, 0.06057405099272728, 0.075776606798172, 0.07861081510782242, -0.24993357062339783, 0.19472083449363708, 0.34381285309791565, 0.1784525066614151, 0.19397851824760437, 0.14593936502933502, -0.1850079596042633, -0.18100452423095703, 0.08264048397541046, 0.03381740301847458, 0.34196117520332336, 0.11901260912418365, 0.5641045570373535, 0.17472106218338013, 0.11657272279262543, -0.016765356063842773, -0.09491008520126343, 0.05800573155283928, -0.15329253673553467, 0.16051751375198364, -0.33322563767433167, 0.21318311989307404, -0.41972845792770386, -0.22864511609077454, -0.3341604173183441, 0.0009781327098608017, -0.07637014985084534, -0.34499308466911316, -0.264939546585083, 0.05090852081775665, -0.027488091960549355, 0.20314016938209534, 0.19239191710948944, 0.13040882349014282, 0.27721142768859863, -0.05937269330024719, -0.29358139634132385, -0.17029017210006714, -0.31999677419662476, -0.01012096181511879, 0.4217284619808197, -0.09688272327184677, 0.2672584354877472, -0.10308054089546204, 0.23058320581912994, -0.42408862709999084, -0.36322668194770813, 0.042302560061216354, -0.3046068549156189, 0.3154713213443756, 0.32324880361557007, 0.2877095639705658, 0.07032349705696106, -0.2859432101249695, 0.2602946162223816, -0.2453404814004898, -0.34764164686203003, 0.24302390217781067, -0.16021494567394257, -0.14246492087841034, -0.14824330806732178, -0.3094412386417389, -0.34377366304397583, -0.3689435124397278, 0.33018404245376587, 0.0758419781923294, 0.017837490886449814, 0.0301622673869133, 0.31667688488960266, 0.10990825295448303, 0.0015783067792654037, -0.05517681688070297, -0.035151850432157516, 0.0541796050965786, 0.21429292857646942, 0.005849933717399836, -0.3246062397956848, 0.23504957556724548, 0.020807262510061264, 0.007581982761621475, -0.011754216626286507, -0.3302909731864929, -0.036124423146247864, -0.2830454707145691, 0.34285828471183777, -0.037203557789325714, 0.04823092371225357, 0.3321744203567505, 0.19995331764221191, 0.00836029089987278, -0.20103371143341064, -0.12429016828536987, -0.014881350100040436, -0.016176238656044006, 0.13077782094478607, 0.10718279331922531, 0.35855844616889954, 0.026683982461690903, 0.49847906827926636, 0.3639880418777466, -0.12506051361560822, 0.11806628853082657, -0.1965607851743698, 0.13495692610740662, -0.26674097776412964, -0.264699786901474, 0.15087276697158813, -0.3152627944946289, 0.08388131111860275, -0.04020264744758606, -0.16960647702217102, -0.048739105463027954, -0.17401942610740662, 0.11865381896495819, -0.2349722981452942, -0.13228900730609894, 0.009178906679153442, -0.24252194166183472, 0.04532460868358612, -0.10512062907218933, 0.052776776254177094, -0.1036798506975174, 0.052784308791160583, 0.33009517192840576, 0.2006852924823761, -0.09895419329404831, -0.035278938710689545, -0.4419666528701782, -0.39874011278152466, -0.29420745372772217, 0.5004904270172119, 0.14570073783397675, 0.6171104311943054, 0.08990104496479034, 0.05135563015937805, 0.02418769896030426, 0.06809452921152115, 0.6864555478096008, -0.13849768042564392, -0.07306923717260361, 0.047032680362463, 0.12364476919174194, -0.901086151599884, -0.11559945344924927, -0.12589624524116516, -0.05095556005835533, 0.03270580992102623, 0.022464536130428314, -0.39961984753608704, -0.15368935465812683, -0.16099512577056885, 0.06423497200012207, -0.042578984051942825, 0.19325701892375946, -0.3148481547832489, -0.04142339527606964, -0.24698324501514435, -0.35504645109176636, 0.12892194092273712, 0.28018978238105774, -0.18618175387382507, 0.09881897270679474, -0.4716356694698334, -0.04149913415312767, 0.04423011839389801, 0.03576323390007019, 0.359601765871048, 0.06422612071037292, 0.08711734414100647, -0.06068802624940872, 0.13565601408481598, 0.46395042538642883, 0.5445829033851624, -0.03344817832112312, -0.678366482257843, -0.08967063575983047, 0.075589120388031, -0.0157255157828331, 0.1129419207572937, -0.3071531355381012, 0.13199618458747864, 0.0568055622279644, 0.024076640605926514, -0.23261284828186035, 0.24303002655506134, 0.3633400499820709, 0.30950501561164856, -0.10649442672729492, -0.25350987911224365, 0.6353702545166016, 0.27705004811286926, -0.04861544817686081, 0.4924071133136749, 0.2298324704170227, -0.2198508381843567, 0.36865293979644775, 0.10467157512903214, 0.6884196400642395, -0.005179606378078461, 0.11897008121013641, 0.43410977721214294, -0.1891028732061386, 0.3806332051753998, -0.1357099711894989, -0.06586357206106186, -0.30229783058166504, 0.06826555728912354, -0.17292065918445587, -0.12278571724891663, 0.538933515548706, -0.3541916608810425, -0.33625882863998413, -0.021795883774757385, -0.1711127609014511, 0.009939409792423248, 0.041871242225170135, 0.14283670485019684, -0.43609970808029175, -0.2486981749534607, -0.3056187033653259, 0.10168419778347015, -0.11645174026489258, 0.18623988330364227, -0.025813523679971695, -0.12047415971755981, -0.20158959925174713, -0.2519224286079407, -0.3406815826892853, -0.10498180985450745, -0.35068705677986145, 0.16744524240493774, 0.29474976658821106, -0.09386569261550903, 0.258721262216568, 0.5265774726867676, 0.3458613157272339, -0.09979046881198883, -0.3378656804561615, 0.07619616389274597, 0.15959124267101288, -0.07625891268253326, 0.11141525954008102, -0.14405754208564758, 0.10060865432024002, -0.10468762367963791, -0.15221218764781952, 0.25839269161224365, -0.18619632720947266, -0.04318705201148987, 0.2822990417480469, 0.23031501471996307, -0.09350208938121796, -0.17487967014312744, -0.2730582654476166, -0.09183497726917267, 0.09533420205116272, -0.09783028066158295, 0.05403972417116165, -0.06117531657218933, 0.033169254660606384, 0.2683038115501404, 0.16918666660785675, -0.07190880179405212, 0.0935773253440857, 0.17405623197555542, -0.05546914041042328, 0.2785852253437042, 0.3468850553035736, 0.05905852094292641, -0.3013990521430969, -0.21086877584457397, 0.4247443675994873, -0.07099413126707077, -0.14329469203948975, 0.0933040902018547, -0.028732934966683388, -0.3893497586250305, -0.038550082594156265, 0.746148943901062, 0.26037710905075073, -0.12083099037408829, 0.05507541075348854, -0.332498162984848, -0.21022914350032806, 0.34642958641052246, -0.2553941309452057, 0.10542804002761841, -0.08411958813667297, 0.3616868853569031, -0.11534182727336884, -0.13640686869621277, -0.1973676085472107, 0.16582344472408295, -0.19925802946090698, 0.10171869397163391, 0.035174690186977386, 0.1317315697669983, 0.22488947212696075, -0.2688411474227905, -0.024732671678066254, 0.1307651400566101, -0.33261820673942566, -0.11853641271591187, -0.12696294486522675, 0.1255401074886322, 0.08264786005020142, -0.11220517754554749, 0.08419931679964066, -0.07886798679828644, -0.14176155626773834, -0.05927237868309021, 0.02448008581995964, 0.17776143550872803, -0.26837629079818726, 0.3409786522388458, 0.04072341322898865, 0.22789591550827026, -0.17125533521175385, 0.3933192193508148, -0.06304088234901428, 0.18877768516540527, -0.020050404593348503, -0.024776257574558258, 0.01975731924176216, 0.08507445454597473, 0.22542907297611237, 0.10681329667568207, -0.2468515783548355, 0.21727758646011353, 0.23497605323791504, -0.5060950517654419, 0.05043227598071098, 0.1695142239332199, 0.15359634160995483, 0.3891795873641968, -0.3878187835216522, -0.004166681319475174, 0.10733474045991898, 0.11870885640382767, -0.13708584010601044, -0.24161769449710846, 0.3217504620552063, -0.0216972753405571, -0.006266932934522629, 0.11137980222702026, 0.07692848145961761, -0.0882805660367012, -0.025451309978961945, 0.2561064660549164, -0.1560298651456833, -0.033651676028966904, 0.4873669445514679, 0.14487865567207336, 0.023350153118371964, -0.01749773696064949, 0.16317835450172424, 0.12823519110679626, -0.00048182159662246704, 0.4956169128417969, -0.10321184247732162, 0.11126416176557541, 0.034069377928972244, 0.1286126673221588, 0.19522787630558014, -0.4197743833065033, 0.1869688779115677, -0.06254510581493378, -0.39867037534713745, 0.045055389404296875, 0.2503007650375366, 0.3284781575202942, -0.09096276760101318, -0.38155195116996765, -0.11539049446582794, -0.14155544340610504, -0.14272668957710266, 0.027728337794542313, -0.03960343822836876, -0.07147055864334106, 0.2021784782409668, -0.18590356409549713, 0.0893230140209198, -0.24648214876651764, 0.48970240354537964, 0.34426480531692505, -0.18621890246868134, -0.19799776375293732, -0.1033426895737648, 0.11163678020238876, 0.4129222333431244, -0.01965857855975628, 0.21872690320014954, 0.05444444715976715, -0.1613922268152237, 0.026282956823706627, 0.3376774191856384, 0.5282009840011597, 0.2862626016139984, -0.33920153975486755, 0.006901447661221027, 0.035907238721847534, -0.15455812215805054, 0.04958786070346832, 0.1287350058555603, 0.07105226069688797, 0.12383310496807098, 0.30818819999694824, 0.1361977756023407, -0.11223802715539932, -0.3233337998390198, 0.04853147268295288, 0.21357940137386322, -0.27496400475502014, 0.3166980743408203, -0.4078439474105835, 0.07851812988519669, -0.1383112221956253, 0.25319838523864746, -0.46327245235443115, 0.04039512947201729, 0.3761255443096161, -0.12054324895143509, 0.2397303581237793, -0.04950058087706566, 0.03741592541337013, -0.17733792960643768, 0.5054041743278503, 0.008357144892215729, 0.41617417335510254, -0.014227074570953846, -0.03866652399301529, -0.27930721640586853, -0.1269509196281433, 0.12126234173774719, -0.13169485330581665, 0.2128891497850418, 0.06568256765604019, 0.1463431566953659, 0.20962359011173248, 0.2961961328983307, -0.0897015631198883, 0.2780594825744629, 0.2132570892572403, -0.41406336426734924, -0.14633488655090332, 0.10090871900320053, -0.09268537163734436, 0.03172825276851654, -0.5520607829093933, 0.2627524137496948, -0.18913689255714417, 0.035334423184394836, 0.10144282132387161, -0.18943390250205994, 0.08535279333591461, -0.2570386528968811, 0.5332823991775513, 0.17508095502853394, 0.42452341318130493, -0.024605538696050644, -0.1897629201412201, 0.11456116288900375, -0.35631152987480164, -0.11849770694971085, 0.23425838351249695, -0.00782380998134613, 0.5419576168060303, -0.3235219717025757, 0.24840441346168518, -0.1923660933971405, 0.26634636521339417, 0.26379573345184326, 0.028126902878284454, -0.4453626871109009, 0.3799627423286438, -0.2995295226573944, -0.11609435826539993, -0.05967995896935463, 0.2554470896720886, 0.11091281473636627, 0.15485744178295135, -0.13134843111038208, -0.32706987857818604, 0.5934207439422607, -0.17588002979755402, -0.2434270828962326, -0.02990604192018509, -0.05407381057739258, 0.226864755153656, -0.05732312798500061, -0.6813849210739136, -0.03891489654779434, 0.21486671268939972, -0.14334890246391296, 0.016180243343114853, 0.023656263947486877, -0.16782812774181366, -0.000021371990442276, -0.13271549344062805, 0.629635214805603, -0.22085043787956238, 0.043171949684619904, 0.15558375418186188, -0.20794598758220673 ]
https://github.com/huggingface/datasets/issues/6753
Type error when importing datasets on Kaggle
> > Solved for me by downgrading `!pip install -U datasets==2.16.0` Works with gpu as well > > Verified it's working w/ GPU if I make these 3 updates. > > ``` > datasets==2.16.0 > fsspec==2023.10.0 > gcsfs==2023.10.0 > ``` > > but the issue shouldn't be closed, this is just a workaround until they get the issue with 2.18.0 resolved. > > See also: https://www.kaggle.com/competitions/pii-detection-removal-from-educational-data/discussion/487474 This also works for me, thanks
### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2
72
Type error when importing datasets on Kaggle ### Describe the bug When trying to run ``` import datasets print(datasets.__version__) ``` It generates the following error ``` TypeError: expected string or bytes-like object ``` It looks like It cannot find the valid versions of `fsspec` though fsspec version is fine when I checked Via command ``` import fsspec print(fsspec.__version__) ​ # output: 2024.3.1 ``` Detailed crash report ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import datasets 2 print(datasets.__version__) File /opt/conda/lib/python3.10/site-packages/datasets/__init__.py:18 1 # ruff: noqa 2 # Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. 3 # (...) 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 16 __version__ = "2.18.0" ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:66 63 from multiprocess import Pool 64 from tqdm.contrib.concurrent import thread_map ---> 66 from . import config 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence File /opt/conda/lib/python3.10/site-packages/datasets/config.py:41 39 # Imports 40 DILL_VERSION = version.parse(importlib.metadata.version("dill")) ---> 41 FSSPEC_VERSION = version.parse(importlib.metadata.version("fsspec")) 42 PANDAS_VERSION = version.parse(importlib.metadata.version("pandas")) 43 PYARROW_VERSION = version.parse(importlib.metadata.version("pyarrow")) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:49, in parse(version) 43 """ 44 Parse the given version string and return either a :class:`Version` object 45 or a :class:`LegacyVersion` object depending on if the given version is 46 a valid PEP 440 version or a legacy version. 47 """ 48 try: ---> 49 return Version(version) 50 except InvalidVersion: 51 return LegacyVersion(version) File /opt/conda/lib/python3.10/site-packages/packaging/version.py:264, in Version.__init__(self, version) 261 def __init__(self, version: str) -> None: 262 263 # Validate the version and parse it into pieces --> 264 match = self._regex.search(version) 265 if not match: 266 raise InvalidVersion(f"Invalid version: '{version}'") TypeError: expected string or bytes-like object ``` ### Steps to reproduce the bug 1. run `!pip install -U datasets` on kaggle 2. check datasets is installed via ``` import datasets print(datasets.__version__) ``` ### Expected behavior Expected to print datasets version, like `2.18.0` ### Environment info Running on Kaggle, latest enviornment , here is the notebook https://www.kaggle.com/code/jtv199/mistrial-7b-part2 > > Solved for me by downgrading `!pip install -U datasets==2.16.0` Works with gpu as well > > Verified it's working w/ GPU if I make these 3 updates. > > ``` > datasets==2.16.0 > fsspec==2023.10.0 > gcsfs==2023.10.0 > ``` > > but the issue shouldn't be closed, this is just a workaround until they get the issue with 2.18.0 resolved. > > See also: https://www.kaggle.com/competitions/pii-detection-removal-from-educational-data/discussion/487474 This also works for me, thanks
[ -0.26136472821235657, -0.33415448665618896, -0.027415717020630836, 0.36076289415359497, 0.4714803695678711, 0.025852128863334656, 0.08765425533056259, 0.2872433662414551, 0.2096555531024933, 0.12113531678915024, 0.01578827016055584, 0.6355251669883728, -0.12476203590631485, 0.6620275974273682, -0.18277041614055634, -0.21823549270629883, 0.26093676686286926, 0.030670955777168274, -0.17844048142433167, 0.05705270916223526, -0.1720655858516693, 0.13442333042621613, -0.2650320529937744, 0.10747916996479034, -0.35994014143943787, -0.24551922082901, 0.3026162087917328, -0.014529243111610413, -0.45964422821998596, -0.4620351493358612, 0.6299137473106384, -0.2674311399459839, 0.4304746985435486, 0.5246848464012146, -0.00011927213199669495, 0.07878386974334717, 0.4936656355857849, -0.0059339385479688644, -0.20050500333309174, -0.013890787959098816, -0.27870601415634155, -0.3012497127056122, 0.15795661509037018, -0.06152934208512306, 0.33402934670448303, -0.3131406605243683, -0.12783439457416534, -0.4988962709903717, 0.3232024610042572, 0.3253662884235382, 0.1703871786594391, 0.4124352037906647, 0.46104109287261963, -0.010725426487624645, 0.26977109909057617, 0.012213926762342453, -0.25078079104423523, -0.041357558220624924, -0.10311657190322876, 0.16791531443595886, 0.40202829241752625, 0.23019665479660034, 0.007986834272742271, -0.1476389765739441, 0.2358335554599762, -0.06398564577102661, -0.0890234187245369, -0.5767865180969238, 0.03472297638654709, 0.20604544878005981, 0.5398104786872864, -0.3143526017665863, -0.4586033523082733, -0.13926754891872406, -0.06488995254039764, 0.020919660106301308, 0.2324390411376953, -0.09083201736211777, -0.1182178407907486, -0.099845752120018, 0.19998319447040558, -0.12960964441299438, -0.21070972084999084, 0.16352660953998566, -0.28680866956710815, 0.047382939606904984, -0.1717798411846161, 0.22314533591270447, 0.13338693976402283, -0.3824140429496765, 0.3301791548728943, -0.22331304848194122, -0.14766280353069305, 0.03856877610087395, -0.596717894077301, -0.07784666121006012, -0.11188361793756485, -0.2849650979042053, -0.07007903605699539, -0.14478082954883575, -0.2462340146303177, 0.18569839000701904, -0.2581448554992676, 0.23551249504089355, 0.34406688809394836, 0.31901368498802185, 0.5112878084182739, 0.037789758294820786, -0.050245486199855804, -0.08046161383390427, 0.06354518234729767, -0.08151966333389282, -0.10780124366283417, -0.3635713458061218, -0.1441195011138916, 0.10064099729061127, 0.3143145442008972, -0.0680428221821785, -0.26543188095092773, 0.10145582258701324, -0.10846150666475296, 0.08243639022111893, -0.19552406668663025, 0.3701145052909851, 0.001275242306292057, 0.7063905596733093, 0.25611692667007446, 0.12283754348754883, -0.10371248424053192, -0.17282354831695557, -0.03346111997961998, 0.0442325621843338, -0.03722883388400078, -0.2569875121116638, -0.07490838319063187, -0.30618566274642944, 0.0671108290553093, -0.12940700352191925, 0.05153288692235947, 0.02385694533586502, -0.2245299518108368, -0.12920457124710083, -0.20819571614265442, 0.3890308439731598, -0.21319788694381714, 0.1742301881313324, 0.16003362834453583, -0.20126262307167053, -0.08869966864585876, 0.025448784232139587, -0.2379160225391388, -0.14978811144828796, -0.220516636967659, 0.10336694866418839, 0.11772765219211578, -0.14406205713748932, -0.6989132761955261, -0.19794824719429016, -0.006342053413391113, -0.0449710451066494, 0.008792906999588013, -0.29090315103530884, -0.03555544465780258, -0.16599053144454956, 0.029242949560284615, 0.12925469875335693, -0.3085280656814575, -0.08798044919967651, -0.2688230872154236, -0.0850723534822464, 0.26913750171661377, 0.2643228769302368, 0.09086526185274124, 0.15120111405849457, -0.12132105231285095, 0.22755120694637299, 0.5750376582145691, -0.599565327167511, -0.10846292227506638, 0.3927920460700989, 0.14636079967021942, 0.0969635397195816, 0.06570757180452347, -0.0978754460811615, 0.24478654563426971, 0.10309219360351562, 0.18755029141902924, 0.05757312849164009, -0.23242369294166565, -0.03880215436220169, -0.13577032089233398, -0.3379981517791748, 0.07147812098264694, 0.13268299400806427, 0.17506979405879974, -0.11979231983423233, 0.12166497111320496, -0.12475891411304474, 0.15411999821662903, 0.059171419590711594, -0.14757965505123138, 0.050995782017707825, 0.4194006323814392, -0.047689810395240784, -0.07198148965835571, -0.41344165802001953, -0.605878472328186, 0.265687495470047, -0.07041080296039581, 0.07356054335832596, -0.05569946765899658, -0.13217291235923767, -0.3814888596534729, 0.33343374729156494, -0.05320929363369942, 0.06510968506336212, 0.017231710255146027, -0.27886655926704407, -0.2159193754196167, 0.166025772690773, -0.04465118423104286, 0.12059731781482697, -0.07115233689546585, 0.13696224987506866, -0.3262346684932709, 0.20488561689853668, -0.2491409331560135, -0.14427615702152252, 0.0005811117589473724, 0.14254528284072876, 0.18394099175930023, -0.024036826565861702, -0.12286712974309921, 0.2898864150047302, 0.4424312114715576, 0.2490873485803604, -0.042547330260276794, 0.004861593246459961, 0.27654463052749634, -0.2127174735069275, -0.10743314772844315, 0.16557185351848602, 0.28569933772087097, 0.0923774316906929, 0.260417640209198, 0.15281438827514648, 0.14850732684135437, 0.21500264108181, -0.2548845410346985, 0.3084891736507416, 0.2156447470188141, 0.38058847188949585, 0.12257640808820724, -0.23281536996364594, 0.04896274209022522, -0.07672007381916046, -0.09477505832910538, 0.06133773922920227, -0.08702649921178818, 0.07946940511465073, 0.6191005706787109, 0.06057405099272728, 0.075776606798172, 0.07861081510782242, -0.24993357062339783, 0.19472083449363708, 0.34381285309791565, 0.1784525066614151, 0.19397851824760437, 0.14593936502933502, -0.1850079596042633, -0.18100452423095703, 0.08264048397541046, 0.03381740301847458, 0.34196117520332336, 0.11901260912418365, 0.5641045570373535, 0.17472106218338013, 0.11657272279262543, -0.016765356063842773, -0.09491008520126343, 0.05800573155283928, -0.15329253673553467, 0.16051751375198364, -0.33322563767433167, 0.21318311989307404, -0.41972845792770386, -0.22864511609077454, -0.3341604173183441, 0.0009781327098608017, -0.07637014985084534, -0.34499308466911316, -0.264939546585083, 0.05090852081775665, -0.027488091960549355, 0.20314016938209534, 0.19239191710948944, 0.13040882349014282, 0.27721142768859863, -0.05937269330024719, -0.29358139634132385, -0.17029017210006714, -0.31999677419662476, -0.01012096181511879, 0.4217284619808197, -0.09688272327184677, 0.2672584354877472, -0.10308054089546204, 0.23058320581912994, -0.42408862709999084, -0.36322668194770813, 0.042302560061216354, -0.3046068549156189, 0.3154713213443756, 0.32324880361557007, 0.2877095639705658, 0.07032349705696106, -0.2859432101249695, 0.2602946162223816, -0.2453404814004898, -0.34764164686203003, 0.24302390217781067, -0.16021494567394257, -0.14246492087841034, -0.14824330806732178, -0.3094412386417389, -0.34377366304397583, -0.3689435124397278, 0.33018404245376587, 0.0758419781923294, 0.017837490886449814, 0.0301622673869133, 0.31667688488960266, 0.10990825295448303, 0.0015783067792654037, -0.05517681688070297, -0.035151850432157516, 0.0541796050965786, 0.21429292857646942, 0.005849933717399836, -0.3246062397956848, 0.23504957556724548, 0.020807262510061264, 0.007581982761621475, -0.011754216626286507, -0.3302909731864929, -0.036124423146247864, -0.2830454707145691, 0.34285828471183777, -0.037203557789325714, 0.04823092371225357, 0.3321744203567505, 0.19995331764221191, 0.00836029089987278, -0.20103371143341064, -0.12429016828536987, -0.014881350100040436, -0.016176238656044006, 0.13077782094478607, 0.10718279331922531, 0.35855844616889954, 0.026683982461690903, 0.49847906827926636, 0.3639880418777466, -0.12506051361560822, 0.11806628853082657, -0.1965607851743698, 0.13495692610740662, -0.26674097776412964, -0.264699786901474, 0.15087276697158813, -0.3152627944946289, 0.08388131111860275, -0.04020264744758606, -0.16960647702217102, -0.048739105463027954, -0.17401942610740662, 0.11865381896495819, -0.2349722981452942, -0.13228900730609894, 0.009178906679153442, -0.24252194166183472, 0.04532460868358612, -0.10512062907218933, 0.052776776254177094, -0.1036798506975174, 0.052784308791160583, 0.33009517192840576, 0.2006852924823761, -0.09895419329404831, -0.035278938710689545, -0.4419666528701782, -0.39874011278152466, -0.29420745372772217, 0.5004904270172119, 0.14570073783397675, 0.6171104311943054, 0.08990104496479034, 0.05135563015937805, 0.02418769896030426, 0.06809452921152115, 0.6864555478096008, -0.13849768042564392, -0.07306923717260361, 0.047032680362463, 0.12364476919174194, -0.901086151599884, -0.11559945344924927, -0.12589624524116516, -0.05095556005835533, 0.03270580992102623, 0.022464536130428314, -0.39961984753608704, -0.15368935465812683, -0.16099512577056885, 0.06423497200012207, -0.042578984051942825, 0.19325701892375946, -0.3148481547832489, -0.04142339527606964, -0.24698324501514435, -0.35504645109176636, 0.12892194092273712, 0.28018978238105774, -0.18618175387382507, 0.09881897270679474, -0.4716356694698334, -0.04149913415312767, 0.04423011839389801, 0.03576323390007019, 0.359601765871048, 0.06422612071037292, 0.08711734414100647, -0.06068802624940872, 0.13565601408481598, 0.46395042538642883, 0.5445829033851624, -0.03344817832112312, -0.678366482257843, -0.08967063575983047, 0.075589120388031, -0.0157255157828331, 0.1129419207572937, -0.3071531355381012, 0.13199618458747864, 0.0568055622279644, 0.024076640605926514, -0.23261284828186035, 0.24303002655506134, 0.3633400499820709, 0.30950501561164856, -0.10649442672729492, -0.25350987911224365, 0.6353702545166016, 0.27705004811286926, -0.04861544817686081, 0.4924071133136749, 0.2298324704170227, -0.2198508381843567, 0.36865293979644775, 0.10467157512903214, 0.6884196400642395, -0.005179606378078461, 0.11897008121013641, 0.43410977721214294, -0.1891028732061386, 0.3806332051753998, -0.1357099711894989, -0.06586357206106186, -0.30229783058166504, 0.06826555728912354, -0.17292065918445587, -0.12278571724891663, 0.538933515548706, -0.3541916608810425, -0.33625882863998413, -0.021795883774757385, -0.1711127609014511, 0.009939409792423248, 0.041871242225170135, 0.14283670485019684, -0.43609970808029175, -0.2486981749534607, -0.3056187033653259, 0.10168419778347015, -0.11645174026489258, 0.18623988330364227, -0.025813523679971695, -0.12047415971755981, -0.20158959925174713, -0.2519224286079407, -0.3406815826892853, -0.10498180985450745, -0.35068705677986145, 0.16744524240493774, 0.29474976658821106, -0.09386569261550903, 0.258721262216568, 0.5265774726867676, 0.3458613157272339, -0.09979046881198883, -0.3378656804561615, 0.07619616389274597, 0.15959124267101288, -0.07625891268253326, 0.11141525954008102, -0.14405754208564758, 0.10060865432024002, -0.10468762367963791, -0.15221218764781952, 0.25839269161224365, -0.18619632720947266, -0.04318705201148987, 0.2822990417480469, 0.23031501471996307, -0.09350208938121796, -0.17487967014312744, -0.2730582654476166, -0.09183497726917267, 0.09533420205116272, -0.09783028066158295, 0.05403972417116165, -0.06117531657218933, 0.033169254660606384, 0.2683038115501404, 0.16918666660785675, -0.07190880179405212, 0.0935773253440857, 0.17405623197555542, -0.05546914041042328, 0.2785852253437042, 0.3468850553035736, 0.05905852094292641, -0.3013990521430969, -0.21086877584457397, 0.4247443675994873, -0.07099413126707077, -0.14329469203948975, 0.0933040902018547, -0.028732934966683388, -0.3893497586250305, -0.038550082594156265, 0.746148943901062, 0.26037710905075073, -0.12083099037408829, 0.05507541075348854, -0.332498162984848, -0.21022914350032806, 0.34642958641052246, -0.2553941309452057, 0.10542804002761841, -0.08411958813667297, 0.3616868853569031, -0.11534182727336884, -0.13640686869621277, -0.1973676085472107, 0.16582344472408295, -0.19925802946090698, 0.10171869397163391, 0.035174690186977386, 0.1317315697669983, 0.22488947212696075, -0.2688411474227905, -0.024732671678066254, 0.1307651400566101, -0.33261820673942566, -0.11853641271591187, -0.12696294486522675, 0.1255401074886322, 0.08264786005020142, -0.11220517754554749, 0.08419931679964066, -0.07886798679828644, -0.14176155626773834, -0.05927237868309021, 0.02448008581995964, 0.17776143550872803, -0.26837629079818726, 0.3409786522388458, 0.04072341322898865, 0.22789591550827026, -0.17125533521175385, 0.3933192193508148, -0.06304088234901428, 0.18877768516540527, -0.020050404593348503, -0.024776257574558258, 0.01975731924176216, 0.08507445454597473, 0.22542907297611237, 0.10681329667568207, -0.2468515783548355, 0.21727758646011353, 0.23497605323791504, -0.5060950517654419, 0.05043227598071098, 0.1695142239332199, 0.15359634160995483, 0.3891795873641968, -0.3878187835216522, -0.004166681319475174, 0.10733474045991898, 0.11870885640382767, -0.13708584010601044, -0.24161769449710846, 0.3217504620552063, -0.0216972753405571, -0.006266932934522629, 0.11137980222702026, 0.07692848145961761, -0.0882805660367012, -0.025451309978961945, 0.2561064660549164, -0.1560298651456833, -0.033651676028966904, 0.4873669445514679, 0.14487865567207336, 0.023350153118371964, -0.01749773696064949, 0.16317835450172424, 0.12823519110679626, -0.00048182159662246704, 0.4956169128417969, -0.10321184247732162, 0.11126416176557541, 0.034069377928972244, 0.1286126673221588, 0.19522787630558014, -0.4197743833065033, 0.1869688779115677, -0.06254510581493378, -0.39867037534713745, 0.045055389404296875, 0.2503007650375366, 0.3284781575202942, -0.09096276760101318, -0.38155195116996765, -0.11539049446582794, -0.14155544340610504, -0.14272668957710266, 0.027728337794542313, -0.03960343822836876, -0.07147055864334106, 0.2021784782409668, -0.18590356409549713, 0.0893230140209198, -0.24648214876651764, 0.48970240354537964, 0.34426480531692505, -0.18621890246868134, -0.19799776375293732, -0.1033426895737648, 0.11163678020238876, 0.4129222333431244, -0.01965857855975628, 0.21872690320014954, 0.05444444715976715, -0.1613922268152237, 0.026282956823706627, 0.3376774191856384, 0.5282009840011597, 0.2862626016139984, -0.33920153975486755, 0.006901447661221027, 0.035907238721847534, -0.15455812215805054, 0.04958786070346832, 0.1287350058555603, 0.07105226069688797, 0.12383310496807098, 0.30818819999694824, 0.1361977756023407, -0.11223802715539932, -0.3233337998390198, 0.04853147268295288, 0.21357940137386322, -0.27496400475502014, 0.3166980743408203, -0.4078439474105835, 0.07851812988519669, -0.1383112221956253, 0.25319838523864746, -0.46327245235443115, 0.04039512947201729, 0.3761255443096161, -0.12054324895143509, 0.2397303581237793, -0.04950058087706566, 0.03741592541337013, -0.17733792960643768, 0.5054041743278503, 0.008357144892215729, 0.41617417335510254, -0.014227074570953846, -0.03866652399301529, -0.27930721640586853, -0.1269509196281433, 0.12126234173774719, -0.13169485330581665, 0.2128891497850418, 0.06568256765604019, 0.1463431566953659, 0.20962359011173248, 0.2961961328983307, -0.0897015631198883, 0.2780594825744629, 0.2132570892572403, -0.41406336426734924, -0.14633488655090332, 0.10090871900320053, -0.09268537163734436, 0.03172825276851654, -0.5520607829093933, 0.2627524137496948, -0.18913689255714417, 0.035334423184394836, 0.10144282132387161, -0.18943390250205994, 0.08535279333591461, -0.2570386528968811, 0.5332823991775513, 0.17508095502853394, 0.42452341318130493, -0.024605538696050644, -0.1897629201412201, 0.11456116288900375, -0.35631152987480164, -0.11849770694971085, 0.23425838351249695, -0.00782380998134613, 0.5419576168060303, -0.3235219717025757, 0.24840441346168518, -0.1923660933971405, 0.26634636521339417, 0.26379573345184326, 0.028126902878284454, -0.4453626871109009, 0.3799627423286438, -0.2995295226573944, -0.11609435826539993, -0.05967995896935463, 0.2554470896720886, 0.11091281473636627, 0.15485744178295135, -0.13134843111038208, -0.32706987857818604, 0.5934207439422607, -0.17588002979755402, -0.2434270828962326, -0.02990604192018509, -0.05407381057739258, 0.226864755153656, -0.05732312798500061, -0.6813849210739136, -0.03891489654779434, 0.21486671268939972, -0.14334890246391296, 0.016180243343114853, 0.023656263947486877, -0.16782812774181366, -0.000021371990442276, -0.13271549344062805, 0.629635214805603, -0.22085043787956238, 0.043171949684619904, 0.15558375418186188, -0.20794598758220673 ]
https://github.com/huggingface/datasets/issues/6752
Precision being changed from float16 to float32 unexpectedly
This is because of the formatter (`torch` in this case). It defaults to `float32`. You can load it in `float16` using `dataset.set_format("torch", dtype=torch.float16)`.
### Describe the bug I'm loading a HuggingFace Dataset for images. I'm running a preprocessing (map operation) step that runs a few operations, one of them being conversion to float16. The Dataset features also say that the 'img' is of type float16. Whenever I take an image from that HuggingFace Dataset instance, the type turns out to be float32. ### Steps to reproduce the bug ```python import torchvision.transforms.v2 as transforms from datasets import load_dataset dataset = load_dataset('cifar10', split='test') dataset = dataset.with_format("torch") data_transform = transforms.Compose([transforms.Resize((32, 32)), transforms.ToDtype(torch.float16, scale=True), transforms.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]), ]) def _preprocess(examples): # Permutes from (BS x H x W x C) to (BS x C x H x W) images = torch.permute(examples['img'], (0, 3, 2, 1)) examples['img'] = data_transform(images) return examples dataset = dataset.map(_preprocess, batched=True, batch_size=8) ``` Now at this point the dataset.features are showing float16 which is great because that's what I want. ```python print(data_loader.features['img']) Sequence(feature=Sequence(feature=Sequence(feature=Value(dtype='float16', id=None), length=-1, id=None), length=-1, id=None), length=-1, id=None) ``` But when I try to sample an image from this dataloader; I'm getting a float32 image, when I'm expecting float16: ```python print(next(iter(data_loader))['img'].dtype) torch.float32 ``` ### Expected behavior I'm expecting the images loaded after the transformation to stay in float16. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.9 - `huggingface_hub` version: 0.21.4 - PyArrow version: 14.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
23
Precision being changed from float16 to float32 unexpectedly ### Describe the bug I'm loading a HuggingFace Dataset for images. I'm running a preprocessing (map operation) step that runs a few operations, one of them being conversion to float16. The Dataset features also say that the 'img' is of type float16. Whenever I take an image from that HuggingFace Dataset instance, the type turns out to be float32. ### Steps to reproduce the bug ```python import torchvision.transforms.v2 as transforms from datasets import load_dataset dataset = load_dataset('cifar10', split='test') dataset = dataset.with_format("torch") data_transform = transforms.Compose([transforms.Resize((32, 32)), transforms.ToDtype(torch.float16, scale=True), transforms.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]), ]) def _preprocess(examples): # Permutes from (BS x H x W x C) to (BS x C x H x W) images = torch.permute(examples['img'], (0, 3, 2, 1)) examples['img'] = data_transform(images) return examples dataset = dataset.map(_preprocess, batched=True, batch_size=8) ``` Now at this point the dataset.features are showing float16 which is great because that's what I want. ```python print(data_loader.features['img']) Sequence(feature=Sequence(feature=Sequence(feature=Value(dtype='float16', id=None), length=-1, id=None), length=-1, id=None), length=-1, id=None) ``` But when I try to sample an image from this dataloader; I'm getting a float32 image, when I'm expecting float16: ```python print(next(iter(data_loader))['img'].dtype) torch.float32 ``` ### Expected behavior I'm expecting the images loaded after the transformation to stay in float16. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 - Python version: 3.10.9 - `huggingface_hub` version: 0.21.4 - PyArrow version: 14.0.2 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0 This is because of the formatter (`torch` in this case). It defaults to `float32`. You can load it in `float16` using `dataset.set_format("torch", dtype=torch.float16)`.
[ -0.17743724584579468, -0.672585129737854, -0.01951872557401657, 0.1344832479953766, 0.5093412399291992, -0.11940473318099976, 0.2055831253528595, 0.07493767142295837, -0.1030128002166748, 0.1838420033454895, -0.02054315246641636, 0.15689395368099213, 0.16301490366458893, -0.2456800639629364, -0.14969192445278168, -0.3254585564136505, 0.31905558705329895, -0.1727645993232727, -0.5001132488250732, -0.2504381537437439, -0.26194143295288086, -0.012968910858035088, -0.24886451661586761, -0.11457543075084686, -0.03763994202017784, 0.10208617150783539, 0.09148260951042175, -0.08335129171609879, 0.12812702357769012, 0.007708444260060787, 0.015008268877863884, -0.022719603031873703, 0.24843281507492065, 0.6248456239700317, -0.0001217284079757519, -0.09075020253658295, 0.20497553050518036, -0.0663846954703331, -0.12363007664680481, 0.18638461828231812, 0.369591623544693, -0.2425345629453659, -0.017304880544543266, -0.1626376211643219, -0.2717103660106659, -0.010172479785978794, -0.1197652667760849, -0.6073985695838928, 0.11779800057411194, 0.10297734290361404, 0.17459146678447723, 0.3448520600795746, -0.09649360179901123, 0.27173158526420593, 0.008934453129768372, 0.4461187720298767, -0.06159617379307747, 0.10416549444198608, 0.033408984541893005, 0.12415134906768799, 0.13304094970226288, 0.2887723743915558, -0.30603474378585815, -0.054062847048044205, 0.08735556155443192, 0.26325613260269165, -0.0957157090306282, -0.37314265966415405, 0.13800475001335144, 0.0663323700428009, -0.09879323095083237, -0.03480754792690277, -0.28995007276535034, -0.31995105743408203, -0.31798261404037476, -0.28356218338012695, -0.11570153385400772, 0.18483808636665344, 0.016329340636730194, -0.1289331465959549, -0.3362339437007904, 0.2724616527557373, 0.09359252452850342, 0.05791359767317772, -0.2742583155632019, 0.2127397358417511, -0.2546946406364441, 0.37270113825798035, -0.23761852085590363, -0.27241379022598267, -0.17790919542312622, -0.12574808299541473, 0.12864191830158234, 0.2651980519294739, 0.023172888904809952, 0.14173363149166107, -0.008301615715026855, 0.027113646268844604, -0.07755476236343384, -0.3086068630218506, 0.32023587822914124, 0.16336137056350708, -0.24667558073997498, -0.1283053159713745, 0.20606626570224762, 0.16106761991977692, -0.20475521683692932, 0.3511323034763336, 0.11767319589853287, 0.1753087043762207, 0.13503265380859375, 0.04867762327194214, 0.47962072491645813, -0.10901635140180588, 0.1696464717388153, 0.1421479880809784, 0.2855527997016907, -0.22446128726005554, -0.18985387682914734, 0.14070892333984375, -0.004124511033296585, 0.21402128040790558, -0.11106953769922256, -0.10948241502046585, -0.15835438668727875, 0.35056906938552856, 0.39912647008895874, 0.2948719263076782, -0.32491496205329895, -0.06726819276809692, -0.17813733220100403, -0.4395263195037842, -0.011655475944280624, 0.0034281089901924133, -0.10154061019420624, 0.0420389249920845, 0.014098845422267914, 0.37142375111579895, -0.1540214568376541, -0.10845503211021423, -0.14939193427562714, -0.05694812163710594, 0.47645896673202515, 0.14015331864356995, -0.5033705830574036, 0.24753038585186005, 0.1549503207206726, 0.11407114565372467, -0.1581026017665863, 0.28720465302467346, -0.2357102930545807, 0.220642551779747, -0.19955886900424957, 0.08662927895784378, -0.08587157726287842, 0.014660125598311424, -0.09053989499807358, 0.19927862286567688, 0.3645666539669037, -0.10676619410514832, 0.38171038031578064, -0.5592848658561707, -0.2759791612625122, -0.20073653757572174, 0.04756703972816467, 0.300952672958374, 0.05837460979819298, -0.17004090547561646, 0.18670548498630524, -0.011926122009754181, 0.5184354782104492, 0.11363054811954498, 0.08552740514278412, -0.03695410490036011, -0.3300568759441376, -0.160142183303833, -0.0022957995533943176, -0.1588636040687561, -0.2074768841266632, -0.016610421240329742, -0.20977343618869781, 0.2821810245513916, -0.25745105743408203, 0.1648777574300766, 0.06475310027599335, -0.10461708903312683, 0.15470680594444275, 0.38029325008392334, -0.15856511890888214, 0.48922985792160034, -0.16213983297348022, 0.011811910197138786, 0.22708794474601746, 0.06360508501529694, -0.2089470773935318, 0.044132132083177567, 0.06105176731944084, -0.16559669375419617, 0.4513297975063324, -0.12309670448303223, -0.04074127972126007, 0.06040486320853233, -0.0328606478869915, 0.1419583559036255, 0.013470098376274109, 0.028117749840021133, -0.10995041579008102, -0.03433392941951752, 0.17339076101779938, 0.15801453590393066, -0.08495533466339111, -0.006491433829069138, 0.012842277064919472, 0.08043002337217331, 0.06571751087903976, -0.10940408706665039, 0.030204452574253082, 0.17740586400032043, -0.09907098114490509, 0.07209020853042603, 0.28953737020492554, -0.05866166949272156, 0.06709951162338257, 0.15379934012889862, -0.40244823694229126, -0.10792901366949081, 0.2520613968372345, -0.21354533731937408, -0.3886387348175049, 0.14170107245445251, 0.17660504579544067, -0.1375523954629898, -0.4574856460094452, 0.4928397238254547, 0.011499615386128426, 0.3850746750831604, -0.386065810918808, 0.2864342927932739, 0.3021469712257385, -0.01021040603518486, 0.29542240500450134, 0.24474239349365234, 0.10888902097940445, 0.1616469919681549, 0.16621264815330505, 0.6369256973266602, -0.17950983345508575, 0.19952276349067688, -0.3395920991897583, 0.04045434296131134, 0.200875386595726, 0.2125895917415619, -0.17102190852165222, -0.1413441151380539, 0.14727643132209778, 0.040101874619722366, 0.18586595356464386, 0.05765756964683533, -0.2203623652458191, 0.2574206590652466, 0.018303032964468002, -0.22423312067985535, 0.19056394696235657, 0.12222548574209213, -0.26538416743278503, 0.21607619524002075, 0.09431251138448715, -0.24045586585998535, 0.49890756607055664, -0.07350843399763107, 0.054060447961091995, -0.025372778996825218, 0.009306740947067738, 0.03835875168442726, 0.1692739725112915, 0.12870675325393677, 0.05257877707481384, 0.023188646882772446, 0.3386610746383667, 0.16639657318592072, -0.18983310461044312, 0.3988647162914276, -0.33300474286079407, -0.13627298176288605, -0.32488542795181274, 0.4051177501678467, -0.1473427265882492, 0.3691481649875641, -0.5540132522583008, -0.13447944819927216, -0.24555006623268127, -0.17098663747310638, -0.1783924102783203, 0.14765724539756775, -0.2314550131559372, -0.021799856796860695, -0.012708859518170357, 0.136246919631958, 0.18823333084583282, -0.2773434519767761, 0.041144855320453644, 0.1885368674993515, -0.3915543258190155, -0.10990358889102936, 0.049786943942308426, -0.3222469389438629, 0.3280373811721802, -0.14956063032150269, -0.06963847577571869, -0.4957582354545593, -0.5344318747520447, -0.03166425973176956, -0.2442718893289566, 0.324510395526886, 0.24218054115772247, -0.04337848722934723, 0.38147222995758057, 0.16163083910942078, 0.19418306648731232, -0.061712369322776794, -0.033013299107551575, 0.06610554456710815, -0.1991870105266571, 0.018902091309428215, -0.23161090910434723, 0.037418901920318604, -0.17843852937221527, 0.07889515161514282, 0.14485621452331543, -0.06727372109889984, -0.0845957100391388, 0.03319130837917328, 0.016027327626943588, -0.30680012702941895, 0.07094977796077728, 0.25930583477020264, -0.3752208948135376, -0.11422905325889587, -0.06812381744384766, -0.0016171536408364773, -0.30824384093284607, -0.2784334421157837, -0.06640376150608063, -0.11111125349998474, 0.22597354650497437, -0.397016704082489, -0.051967255771160126, -0.42210671305656433, 0.44029104709625244, -0.2351284921169281, 0.14443296194076538, 0.22317782044410706, -0.07492382079362869, 0.17757578194141388, -0.19798988103866577, -0.1838284432888031, -0.1383412480354309, -0.0660097748041153, 0.3390471339225769, 0.05512430518865585, 0.3317006826400757, -0.08525380492210388, 0.4781205654144287, -0.16898378729820251, -0.5946882963180542, 0.24465052783489227, -0.2702871263027191, 0.16919444501399994, -0.3776586353778839, -0.15738818049430847, 0.19710958003997803, 0.006373301148414612, -0.26595497131347656, -0.06318724155426025, -0.15975803136825562, -0.0621597021818161, 0.11219313740730286, 0.10656094551086426, -0.4264270067214966, -0.37176236510276794, 0.2681274116039276, 0.016136184334754944, 0.11696965992450714, -0.05166822671890259, 0.1600581705570221, -0.3680492639541626, -0.28059011697769165, 0.007787046954035759, -0.047133758664131165, 0.23975658416748047, -0.005001826677471399, -0.2577337622642517, -0.2875891327857971, -0.27391135692596436, 0.4727674722671509, 0.19214150309562683, 0.49402764439582825, -0.0036293677985668182, -0.3979145288467407, 0.01854833960533142, 0.24695253372192383, 0.5130801796913147, 0.1587173044681549, 0.16166269779205322, -0.10844218730926514, -0.24420760571956635, -0.4554629325866699, -0.442050039768219, -0.2057151347398758, 0.37885916233062744, 0.20376750826835632, 0.4070571959018707, -0.23709043860435486, -0.18789330124855042, 0.23528923094272614, 0.3380949795246124, -0.23274652659893036, 0.06809726357460022, -0.32311174273490906, -0.23658466339111328, 0.12867091596126556, -0.1337544322013855, 0.09023645520210266, 0.13563977181911469, -0.3101431727409363, -0.042214058339595795, -0.1743052899837494, 0.00012371502816677094, -0.07739803194999695, -0.05221739783883095, 0.36345982551574707, 0.14116306602954865, 0.06755894422531128, 0.13203638792037964, 0.3599149286746979, -0.14662843942642212, 0.4144878089427948, 0.16604818403720856, -0.3027229905128479, 0.1515566110610962, 0.09555830806493759, 0.01876474916934967, 0.3144816756248474, 0.2084323763847351, -0.10275096446275711, -0.06423216313123703, 0.49435508251190186, -0.6951274275779724, 0.1738014966249466, 0.47566935420036316, 0.43445906043052673, -0.3609367907047272, -0.021914616227149963, 0.5180588364601135, 0.2952304780483246, -0.19033865630626678, 0.19505412876605988, -0.3162732720375061, -0.39584800601005554, 0.42516660690307617, 0.4675234258174896, 0.7305808067321777, -0.05842042714357376, 0.1182115375995636, 0.2365538477897644, -0.00602809339761734, 0.33384969830513, 0.22319082915782928, 0.047605786472558975, -0.5332037806510925, -0.15963588654994965, -0.03754282742738724, -0.1027279943227768, -0.07791473716497421, -0.3822590112686157, -0.011347562074661255, 0.19027526676654816, -0.5185453295707703, 0.22682003676891327, 0.007408359088003635, -0.3539556562900543, -0.09555202722549438, -0.2757765054702759, 0.029139075428247452, 0.07288308441638947, -0.026874743402004242, 0.35979926586151123, -0.10533817112445831, 0.1802084743976593, -0.2462308555841446, -0.3050991892814636, -0.24466873705387115, -0.21210283041000366, -0.27952510118484497, 0.07488882541656494, 0.26271525025367737, -0.2099865972995758, -0.30852729082107544, 0.36201217770576477, 0.4318375587463379, 0.009946342557668686, -0.01749360002577305, 0.08197573572397232, 0.17611053586006165, 0.3177017569541931, 0.3075745403766632, -0.06212310492992401, 0.22366896271705627, 0.14686903357505798, -0.18531480431556702, -0.19730830192565918, 0.00687775295227766, 0.04136127233505249, -0.45557159185409546, -0.0164480060338974, 0.17497161030769348, -0.345684289932251, -0.1402529627084732, -0.2863466143608093, 0.4034419357776642, 0.07208681106567383, 0.042975425720214844, -0.07551082968711853, 0.08798899501562119, 0.25408104062080383, -0.011814147233963013, -0.4262787997722626, -0.19625785946846008, 0.2658422589302063, 0.015214232727885246, -0.42573466897010803, 0.3679347038269043, -0.001325368881225586, 0.12411914765834808, 0.03891877084970474, 0.314536452293396, 0.04475664719939232, -0.34522876143455505, 0.10011743754148483, -0.23839914798736572, -0.27764570713043213, -0.20783205330371857, 0.21588198840618134, 0.2755734920501709, -0.2561435103416443, -0.34721338748931885, -0.11811915040016174, -0.15998299419879913, -0.12919911742210388, 0.0479847714304924, 0.15152494609355927, -0.08046633005142212, 0.08438606560230255, -0.03224499523639679, -0.24025043845176697, -0.18010519444942474, 0.0444345623254776, 0.19345253705978394, 0.2913261353969574, 0.21377761662006378, 0.25562918186187744, -0.11305885761976242, 0.14468596875667572, 0.11544635891914368, 0.37557435035705566, -0.04160938411951065, -0.1038307398557663, -0.17457616329193115, 0.12372687458992004, -0.12133703380823135, -0.36713725328445435, -0.1681322157382965, 0.06459211558103561, 0.15631242096424103, -0.2886281907558441, 0.12313883006572723, 0.24590536952018738, 0.11653900891542435, 0.10486967861652374, 0.0729040578007698, 0.23431137204170227, 0.5747838616371155, 0.21170055866241455, 0.01842380315065384, 0.3148576021194458, 0.12223635613918304, 0.28769803047180176, 0.005379094742238522, -0.14113864302635193, -0.12857848405838013, 0.007675006985664368, -0.05468590557575226, 0.19017845392227173, 0.2263820469379425, -0.20315445959568024, 0.09410437941551208, 0.19176433980464935, 0.19298437237739563, 0.017112087458372116, -0.4988868534564972, -0.15177123248577118, -0.24042236804962158, 0.14197373390197754, 0.06270252168178558, -0.0707826316356659, 0.12068353593349457, 0.15582357347011566, -0.11506715416908264, 0.4290046691894531, -0.014932915568351746, 0.20337113738059998, -0.058005645871162415, -0.13750334084033966, 0.20700260996818542, -0.052680566906929016, 0.24534589052200317, 0.3910907804965973, -0.2011261284351349, 0.18301203846931458, 0.2549327313899994, -0.2528970241546631, -0.010550417006015778, 0.36762768030166626, 0.022307001054286957, 0.5006586909294128, 0.06317123770713806, 0.043713025748729706, 0.16371366381645203, -0.38010072708129883, 0.27686432003974915, -0.05933992564678192, -0.28267940878868103, 0.4367341101169586, 0.23197273910045624, 0.3267613351345062, -0.4399535357952118, -0.4369335174560547, -0.5009794235229492, 0.10750775039196014, -0.2806044816970825, -0.19434350728988647, -0.2586914300918579, -0.013622239232063293, -0.08449392020702362, 0.026018481701612473, -0.2007741779088974, 0.026010829955339432, 0.4531555771827698, 0.08534342795610428, -0.27431052923202515, -0.16862870752811432, -0.5086246132850647, -0.10684997588396072, 0.20155927538871765, -0.06018438562750816, 0.05600019916892052, 0.3221009075641632, -0.0622175931930542, 0.2788918912410736, 0.23741765320301056, 0.35651451349258423, 0.7589360475540161, -0.22709134221076965, 0.22506985068321228, 0.08676429092884064, 0.12538807094097137, 0.06644964218139648, 0.11866559833288193, -0.19686779379844666, 0.027832094579935074, 0.16333092749118805, 0.15125791728496552, -0.07866867631673813, 0.12379875779151917, -0.10137593746185303, 0.49340400099754333, -0.2243148237466812, 0.24302712082862854, -0.45130082964897156, 0.21738490462303162, -0.1968940943479538, -0.14900100231170654, -0.13170303404331207, 0.11890694499015808, 0.17924050986766815, -0.029786288738250732, 0.28506648540496826, 0.06552135199308395, 0.026380635797977448, 0.12571950256824493, 0.289787620306015, 0.09836950898170471, 0.022356275469064713, -0.05942180007696152, 0.07606269419193268, -0.3929094076156616, 0.1441224366426468, 0.4604461193084717, -0.0004846584051847458, 0.011438112705945969, 0.13266946375370026, 0.13405422866344452, 0.1986367255449295, 0.44268059730529785, -0.4887731373310089, 0.47246310114860535, 0.22040407359600067, -0.23023506999015808, -0.3521590232849121, -0.3591436743736267, 0.058123424649238586, 0.10109290480613708, -0.3707963526248932, 0.40683579444885254, 0.02206137776374817, 0.12278091162443161, -0.3389011025428772, 0.0011737197637557983, -0.23473548889160156, 0.13586686551570892, 0.4504179358482361, 0.4391525983810425, 0.010342404246330261, -0.11975681781768799, -0.15782217681407928, -0.3005973994731903, -0.20370928943157196, -0.38762977719306946, 0.18321430683135986, -0.4241257607936859, 0.3774258494377136, 0.057723067700862885, -0.2066396325826645, -0.20279371738433838, 0.11693743616342545, 0.3977685570716858, -0.22849589586257935, -0.5400433540344238, 0.25189200043678284, -0.20934060215950012, -0.11660891771316528, -0.03281056135892868, 0.4217703938484192, 0.2214302122592926, 0.5486186146736145, 0.050841689109802246, -0.48546692728996277, 0.6052567958831787, -0.16418251395225525, -0.09896308183670044, -0.009746182709932327, 0.05056106299161911, -0.18729698657989502, -0.14003337919712067, -0.5664055347442627, -0.06609144061803818, 0.2538280487060547, -0.1307673454284668, 0.02444913238286972, 0.332108736038208, -0.14941689372062683, -0.07842662185430527, -0.10745760798454285, 0.7175195217132568, 0.05324874073266983, 0.04432426393032074, 0.3364403247833252, -0.05374579876661301 ]
https://github.com/huggingface/datasets/issues/6750
`load_dataset` requires a network connection for local download?
> Are you using `HF_DATASETS_OFFLINE=1` ? This doesn't work for me. `datasets=2.18.0` `test.py`: ``` import datasets datasets.utils.logging.set_verbosity_info() ds = datasets.load_dataset('C-MTEB/AFQMC', revision='b44c3b011063adb25877c13823db83bb193913c4') print(ds) ``` run `python test.py` ``` Generating dataset afqmc (/home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4) Downloading and preparing dataset afqmc/default to /home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4... Dataset not on Hf google storage. Downloading and preparing it from source hf://datasets/C-MTEB/AFQMC@b44c3b011063adb25877c13823db83bb193913c4/data/validation-00000-of-00001-b8fc393b5ddedac7.parquet not found in cache or force_download set to True, downloading to /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b.incomplete Downloading data: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 240k/240k [00:01<00:00, 178kB/s] storing hf://datasets/C-MTEB/AFQMC@b44c3b011063adb25877c13823db83bb193913c4/data/validation-00000-of-00001-b8fc393b5ddedac7.parquet in cache at /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b creating metadata file for /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b Downloading took 0.0 min Checksum Computation took 0.0 min Generating test split Generating test split: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3861/3861 [00:00<00:00, 3972.00 examples/s] Generating train split Generating train split: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34334/34334 [00:00<00:00, 34355.50 examples/s] Generating validation split Generating validation split: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4316/4316 [00:00<00:00, 4477.00 examples/s] All the splits matched successfully. Dataset afqmc downloaded and prepared to /home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4. Subsequent calls will reuse this data. DatasetDict({ test: Dataset({ features: ['sentence1', 'sentence2', 'score', 'idx'], num_rows: 3861 }) train: Dataset({ features: ['sentence1', 'sentence2', 'score', 'idx'], num_rows: 34334 }) validation: Dataset({ features: ['sentence1', 'sentence2', 'score', 'idx'], num_rows: 4316 }) }) ``` Then run `HF_DATASETS_OFFLINE=1 python test.py` ``` Traceback (most recent call last): File "test.py", line 9, in <module> ds = datasets.load_dataset('C-MTEB/AFQMC', revision='b44c3b011063adb25877c13823db83bb193913c4') File "/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise ConnectionError(f"Couldn't reach the Hugging Face Hub for dataset '{path}': {e1}") from None ConnectionError: Couldn't reach the Hugging Face Hub for dataset 'C-MTEB/AFQMC': Offline mode is enabled. ```
### Describe the bug Hi all - I see that in the past a network dependency has been mistakenly introduced into `load_dataset` even for local loads. Is it possible this has happened again? ### Steps to reproduce the bug ``` >>> import datasets >>> datasets.load_dataset("hh-rlhf") Repo card metadata block was not found. Setting CardData to empty. *hangs bc i'm firewalled* ```` stack trace from ctrl-c: ``` ^CTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/load.py", line 2582, in load_dataset builder_instance.download_and_prepare( output_path = get_from_cache( [0/122] File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 532, in get_from_cache response = http_head( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 419, in http_head response = _request_with_retry( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 304, in _request_with_retry response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/adapters.py", line 487, in send resp = conn.urlopen( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) KeyboardInterrupt ``` ### Expected behavior loads the dataset ### Environment info ``` > pip show datasets Name: datasets Version: 2.18.0 ``` Python 3.10.2
246
`load_dataset` requires a network connection for local download? ### Describe the bug Hi all - I see that in the past a network dependency has been mistakenly introduced into `load_dataset` even for local loads. Is it possible this has happened again? ### Steps to reproduce the bug ``` >>> import datasets >>> datasets.load_dataset("hh-rlhf") Repo card metadata block was not found. Setting CardData to empty. *hangs bc i'm firewalled* ```` stack trace from ctrl-c: ``` ^CTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/load.py", line 2582, in load_dataset builder_instance.download_and_prepare( output_path = get_from_cache( [0/122] File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 532, in get_from_cache response = http_head( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 419, in http_head response = _request_with_retry( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 304, in _request_with_retry response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/adapters.py", line 487, in send resp = conn.urlopen( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) KeyboardInterrupt ``` ### Expected behavior loads the dataset ### Environment info ``` > pip show datasets Name: datasets Version: 2.18.0 ``` Python 3.10.2 > Are you using `HF_DATASETS_OFFLINE=1` ? This doesn't work for me. `datasets=2.18.0` `test.py`: ``` import datasets datasets.utils.logging.set_verbosity_info() ds = datasets.load_dataset('C-MTEB/AFQMC', revision='b44c3b011063adb25877c13823db83bb193913c4') print(ds) ``` run `python test.py` ``` Generating dataset afqmc (/home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4) Downloading and preparing dataset afqmc/default to /home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4... Dataset not on Hf google storage. Downloading and preparing it from source hf://datasets/C-MTEB/AFQMC@b44c3b011063adb25877c13823db83bb193913c4/data/validation-00000-of-00001-b8fc393b5ddedac7.parquet not found in cache or force_download set to True, downloading to /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b.incomplete Downloading data: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 240k/240k [00:01<00:00, 178kB/s] storing hf://datasets/C-MTEB/AFQMC@b44c3b011063adb25877c13823db83bb193913c4/data/validation-00000-of-00001-b8fc393b5ddedac7.parquet in cache at /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b creating metadata file for /home/data/.cache/huggingface/datasets/downloads/78949f93104662359f4f3d5a2f7ec1ae37af5a5af44420a51212ea08c0be966b Downloading took 0.0 min Checksum Computation took 0.0 min Generating test split Generating test split: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3861/3861 [00:00<00:00, 3972.00 examples/s] Generating train split Generating train split: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34334/34334 [00:00<00:00, 34355.50 examples/s] Generating validation split Generating validation split: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4316/4316 [00:00<00:00, 4477.00 examples/s] All the splits matched successfully. Dataset afqmc downloaded and prepared to /home/data/.cache/huggingface/datasets/C-MTEB___afqmc/default/0.0.0/b44c3b011063adb25877c13823db83bb193913c4. Subsequent calls will reuse this data. DatasetDict({ test: Dataset({ features: ['sentence1', 'sentence2', 'score', 'idx'], num_rows: 3861 }) train: Dataset({ features: ['sentence1', 'sentence2', 'score', 'idx'], num_rows: 34334 }) validation: Dataset({ features: ['sentence1', 'sentence2', 'score', 'idx'], num_rows: 4316 }) }) ``` Then run `HF_DATASETS_OFFLINE=1 python test.py` ``` Traceback (most recent call last): File "test.py", line 9, in <module> ds = datasets.load_dataset('C-MTEB/AFQMC', revision='b44c3b011063adb25877c13823db83bb193913c4') File "/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/dev/shm/tmp_env/lib/python3.10/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise ConnectionError(f"Couldn't reach the Hugging Face Hub for dataset '{path}': {e1}") from None ConnectionError: Couldn't reach the Hugging Face Hub for dataset 'C-MTEB/AFQMC': Offline mode is enabled. ```
[ -0.41168439388275146, 0.31381863355636597, -0.01289613451808691, 0.17014291882514954, 0.27653050422668457, -0.015546474605798721, 0.5256739854812622, 0.09215858578681946, 0.21692651510238647, -0.10878269374370575, 0.016505425795912743, 0.39275413751602173, 0.22251856327056885, 0.1687614470720291, 0.33551278710365295, 0.07511406391859055, 0.002565324306488037, 0.1470976173877716, -0.05242830514907837, -0.027189556509256363, -0.21306389570236206, 0.1695331633090973, -0.031172271817922592, -0.14436544477939606, -0.14680705964565277, -0.07890837639570236, -0.04420815408229828, 0.2409706711769104, -0.176668182015419, -0.5821489095687866, 0.6547712087631226, 0.23569971323013306, 0.12037698924541473, 0.3264332711696625, -0.00011594990064622834, 0.027888059616088867, 0.2475978285074234, 0.07242411375045776, -0.384733110666275, -0.42582041025161743, -0.2988447844982147, -0.18660789728164673, 0.3440858721733093, -0.15159866213798523, 0.1451062560081482, -0.07019966095685959, -0.22359894216060638, -0.3440468907356262, 0.22260010242462158, 0.06742782890796661, 0.18123334646224976, 0.21960221230983734, -0.10185796767473221, -0.20355120301246643, 0.225211501121521, 0.07420194894075394, -0.06630893796682358, 0.6658664345741272, 0.27972498536109924, -0.3167645335197449, -0.046999938786029816, 0.09433603286743164, 0.1682220995426178, 0.028875239193439484, 0.4014459550380707, -0.1055913195014, 0.20461910963058472, -0.316317081451416, 0.07389336079359055, 0.22617104649543762, 0.4528161883354187, -0.19067561626434326, -0.2283286601305008, -0.08023124188184738, 0.020932096987962723, 0.02163042686879635, 0.43107911944389343, 0.2277139574289322, -0.2452407330274582, 0.15456831455230713, -0.2328268140554428, -0.27871257066726685, 0.13139577209949493, 0.10895006358623505, -0.3290746510028839, 0.3540937304496765, 0.06841864436864853, 0.17865994572639465, -0.04723723605275154, 0.21426460146903992, 0.36258038878440857, -0.16461847722530365, 0.017279306426644325, 0.0919058620929718, -0.19020332396030426, 0.1952138990163803, 0.3552027642726898, 0.15506698191165924, 0.02693653106689453, 0.18321336805820465, -0.35790419578552246, -0.03751526027917862, -0.16958940029144287, 0.15165525674819946, 0.32999762892723083, -0.09785796701908112, -0.06633507460355759, 0.1317257434129715, 0.26514604687690735, 0.26735156774520874, 0.0417373962700367, -0.023014958947896957, -0.044815242290496826, 0.23611600697040558, 0.14853069186210632, -0.11785133928060532, 0.27023452520370483, -0.2366941273212433, -0.027467822656035423, 0.10306375473737717, -0.10613654553890228, 0.20061732828617096, 0.07547077536582947, 0.22670480608940125, -0.24132797122001648, 0.14752833545207977, 0.32605910301208496, -0.03833083063364029, 0.16989707946777344, 0.1898079812526703, -0.12396376579999924, -0.3576572835445404, -0.11971977353096008, 0.00264654029160738, 0.14726442098617554, -0.2062535136938095, 0.23091758787631989, 0.13504469394683838, 0.018674127757549286, 0.20896750688552856, 0.16271379590034485, -0.15791605412960052, -0.13136741518974304, 0.5368015170097351, -0.13044480979442596, 0.1690203845500946, 0.11419598758220673, 0.20659665763378143, -0.17245298624038696, 0.10800246149301529, -0.24789440631866455, -0.217449352145195, -0.1716962456703186, 0.15977823734283447, -0.04265277832746506, -0.03194597363471985, -0.11079516261816025, -0.43317005038261414, -0.005328327417373657, -0.3314262628555298, 0.0329132005572319, -0.3451005220413208, -0.2920820415019989, -0.12519316375255585, 0.1957072913646698, 0.47447073459625244, -0.44795337319374084, -0.23066599667072296, -0.08372840285301208, -0.24731594324111938, 0.10656082630157471, 0.06419914960861206, -0.5689592361450195, 0.3777969479560852, -0.41720208525657654, -0.1491612195968628, 0.4114401340484619, -0.5339081287384033, -0.6044668555259705, 0.6522333025932312, -0.388194739818573, 0.15940271317958832, -0.23090162873268127, 0.19457027316093445, -0.11306644231081009, 0.07231860607862473, 0.3597649335861206, 0.6262301206588745, -0.23156026005744934, 0.07050614804029465, -0.20156095921993256, -0.30683428049087524, 0.07846391201019287, 0.2827805280685425, 0.1039140373468399, 0.23030972480773926, 0.11161676049232483, 0.04604111984372139, 0.3721241056919098, 0.11373177915811539, 0.05526689440011978, 0.1351996660232544, 0.4990551173686981, 0.20547567307949066, 0.0763389840722084, 0.022757019847631454, -0.4841349720954895, 0.3338701128959656, -0.20971925556659698, 0.31786099076271057, -0.3440576195716858, -0.21339668333530426, -0.41294053196907043, -0.04406319558620453, -0.24162940680980682, 0.1641813963651657, 0.027581632137298584, 0.21143031120300293, -0.16317681968212128, 0.12294125556945801, -0.1519388109445572, 0.39298033714294434, -0.16347163915634155, 0.0344763919711113, -0.09038543701171875, 0.20107118785381317, -0.157677561044693, 0.2194201648235321, 0.01252835988998413, -0.12605997920036316, 0.12876233458518982, -0.1828053593635559, -0.19976580142974854, 0.431831955909729, -0.02695220150053501, 0.19352783262729645, -0.1934376358985901, -0.15504620969295502, 0.28696250915527344, 0.062264684587717056, 0.02658005617558956, 0.15695320069789886, 0.2868719696998596, -0.3404996693134308, -0.006057269871234894, 0.23663604259490967, -0.0059240758419036865, 0.19742316007614136, 0.018785521388053894, 0.15795636177062988, 0.4099763035774231, 0.026161137968301773, -0.17084449529647827, -0.0402505099773407, 0.18569836020469666, 0.1184261292219162, 0.5769628882408142, -0.0900934562087059, -0.05511198192834854, 0.21019291877746582, 0.1492815911769867, 0.14541731774806976, 0.14979058504104614, 0.02821589820086956, 0.11137895286083221, -0.16369876265525818, 0.2210209220647812, 0.4713790714740753, 0.6337587833404541, -0.03153195232152939, 0.04356738179922104, 0.2395143210887909, -0.11928657442331314, -0.3448837101459503, 0.12024412304162979, 0.03192364051938057, 0.2101748287677765, 0.1785581409931183, 0.16527609527111053, -0.018406860530376434, -0.19092151522636414, -0.37654468417167664, 0.029002206400036812, 0.06101532280445099, -0.3065478503704071, 0.21760421991348267, -0.29768145084381104, -0.3940754532814026, -0.10768209397792816, -0.1568637639284134, -0.2964072823524475, -0.4905245304107666, -0.21298417448997498, 0.0506560280919075, 0.14237956702709198, 0.16604092717170715, -0.43468162417411804, 0.2943548262119293, -0.022686148062348366, -0.3896893262863159, -0.1948442906141281, -0.23410743474960327, -0.1831115186214447, -0.014359413646161556, 0.29580560326576233, -0.034612324088811874, 0.38087907433509827, -0.19143834710121155, -0.19568432867527008, -0.18559905886650085, -0.19157251715660095, 0.18725809454917908, -0.06732261925935745, 0.274361252784729, 0.44010472297668457, 0.2819369435310364, -0.05634459853172302, 0.14878304302692413, 0.3333151936531067, -0.07550952583551407, -0.01971357688307762, -0.08442819863557816, -0.13800475001335144, 0.024181043729186058, -0.3193505108356476, -0.41934606432914734, -0.3772360384464264, -0.3509697914123535, 0.15644586086273193, 0.07712416350841522, 0.20538833737373352, 0.3024430274963379, -0.08417095988988876, 0.1401108056306839, -0.11009953171014786, -0.08543503284454346, -0.18080973625183105, -0.6269147396087646, -0.10365910828113556, -0.1393541842699051, -0.3402688205242157, 0.028708700090646744, 0.058607034385204315, 0.2813270092010498, 0.2577663064002991, -0.6490302085876465, -0.01736319437623024, -0.1817704290151596, 0.5137753486633301, -0.38181743025779724, 0.0047578588128089905, 0.40264493227005005, 0.061947889626026154, -0.0059189219027757645, -0.07285597175359726, 0.10122700035572052, 0.03485049679875374, 0.034654323011636734, 0.12463266402482986, 0.19880080223083496, 0.5795663595199585, -0.2916385531425476, 0.3204626739025116, -0.16929490864276886, 0.13055427372455597, 0.5554033517837524, -0.1636914759874344, 0.4223286211490631, -0.30109068751335144, -0.3347335755825043, -0.13995686173439026, -0.10002908110618591, -0.07717657089233398, -0.10360126197338104, -0.062368154525756836, -0.22218850255012512, -0.49037590622901917, -0.3607032001018524, 0.0589224249124527, -0.14542578160762787, 0.1247897520661354, -0.2789660394191742, 0.18730992078781128, 0.1707928478717804, -0.08359196782112122, -0.10693688690662384, 0.05363468825817108, -0.013061783276498318, 0.19633974134922028, 0.29456788301467896, -0.05313635244965553, -0.29305192828178406, 0.13288894295692444, -0.15839827060699463, -0.1439998596906662, 0.1806381791830063, 0.4877054691314697, -0.10242209583520889, 0.17468717694282532, 0.022055596113204956, -0.1711679995059967, 0.46893560886383057, -0.19460250437259674, 0.23076024651527405, 0.33424487709999084, 0.04259597510099411, -0.5386934280395508, -0.13598808646202087, -0.08474302291870117, 0.07351291179656982, 0.27893775701522827, 0.38956573605537415, -0.04377011954784393, -0.08402478694915771, 0.12793153524398804, 0.17653325200080872, -0.22745658457279205, -0.40464192628860474, -0.31952205300331116, -0.17779725790023804, -0.24708764255046844, 0.00930139422416687, -0.13209004700183868, 0.07786930352449417, 0.12356215715408325, -0.08060332387685776, -0.007121678441762924, 0.15396130084991455, -0.31292593479156494, -0.04202885925769806, -0.1954856812953949, -0.1315005123615265, 0.3663407564163208, -0.08078739047050476, 0.0004367716610431671, 0.29591748118400574, 0.720767080783844, 0.055154599249362946, 0.015430651605129242, -0.029879994690418243, 0.02800947055220604, 0.033188410103321075, 0.3846558928489685, -0.13052816689014435, 0.018169142305850983, 0.0016498733311891556, 0.02492789551615715, -0.17407359182834625, -0.09440941363573074, 0.15725621581077576, -0.5087775588035583, -0.07357756048440933, -0.4791135787963867, 0.29857131838798523, -0.08575110137462616, -0.18953506648540497, 0.5650403499603271, 0.11639034003019333, -0.1638970673084259, 0.19207067787647247, -0.1944015622138977, 0.90947026014328, 0.25128310918807983, 0.05071974918246269, 0.33879148960113525, -0.08636732399463654, 0.3556085526943207, -0.3589733839035034, 0.07385806739330292, -0.17627203464508057, -0.021879803389310837, -0.19425082206726074, -0.2647388279438019, 0.19753655791282654, -0.030882082879543304, -0.10124765336513519, 0.2652929127216339, -0.3312256932258606, 0.2253243774175644, 0.0759672150015831, 0.12437304854393005, -0.47726792097091675, -0.1900974065065384, -0.2797807455062866, 0.18201808631420135, -0.01896803081035614, 0.35073333978652954, -0.28328582644462585, 0.012892678380012512, -0.11646297574043274, -0.2767217755317688, -0.06948335468769073, 0.2621554732322693, -0.3025052845478058, 0.16600455343723297, -0.11668378114700317, 0.2059791535139084, 0.11615860462188721, -0.11561226844787598, -0.07518219947814941, 0.1746816337108612, -0.29776766896247864, 0.24949418008327484, -0.22878757119178772, 0.09422697126865387, 0.18334315717220306, 0.11151435971260071, 0.35141825675964355, -0.2177945077419281, -0.43693241477012634, -0.164424866437912, -0.35664185881614685, -0.1912357211112976, 0.15103381872177124, 0.12247629463672638, 0.20796599984169006, -0.05106326565146446, -0.1151052713394165, 0.0034304559230804443, 0.25005006790161133, -0.15766777098178864, 0.1145147830247879, 0.06330259889364243, 0.036203112453222275, 0.17822261154651642, -0.03051748499274254, -0.13217538595199585, -0.14126130938529968, 0.8560205101966858, -0.06589587777853012, -0.019458115100860596, 0.2178729921579361, 0.06943993270397186, -0.14094427227973938, -0.2899564802646637, 0.17662709951400757, 0.15269584953784943, -0.3377578854560852, -0.1376771479845047, -0.03967217355966568, 0.07721610367298126, -0.18626020848751068, 0.1610516458749771, 0.078762948513031, -0.09598737210035324, 0.05632835254073143, -0.5397212505340576, -0.2311210036277771, -0.12075316905975342, -0.005738783627748489, -0.017406467348337173, 0.16944479942321777, -0.021773654967546463, 0.30362027883529663, 0.09244301170110703, -0.2957051396369934, 0.20798979699611664, -0.18796852231025696, 0.24323692917823792, 0.03914140164852142, 0.15640205144882202, 0.3095382750034332, -0.23083874583244324, 0.082128144800663, 0.15238745510578156, -0.11233433336019516, -0.16135483980178833, -0.03866135701537132, 0.14402401447296143, 0.08595748245716095, -0.23730400204658508, -0.017884057015180588, -0.3857787251472473, -0.2513221800327301, 0.13681863248348236, 0.24254965782165527, 0.032272882759571075, -0.03213045001029968, -0.16699618101119995, 0.142068013548851, 0.17691823840141296, -0.16737623512744904, 0.3681618869304657, 0.03752560541033745, 0.057742953300476074, -0.07005230337381363, 0.10761440545320511, -0.01718190126121044, -0.11511627584695816, -0.2593359649181366, 0.03195175901055336, -0.016665689647197723, 0.20010870695114136, 0.4836670756340027, -0.26991742849349976, 0.1714915931224823, 0.10538564622402191, 0.3910943567752838, 0.4826149344444275, -0.1595352590084076, -0.07492708414793015, 0.1478407084941864, 0.18650250136852264, -0.27209508419036865, -0.20341604948043823, 0.246226966381073, 0.22601832449436188, -0.04669095575809479, 0.11829490959644318, 0.383693665266037, -0.26892101764678955, -0.19032849371433258, 0.04345477372407913, 0.6880826354026794, -0.016696445643901825, 0.1015026718378067, 0.3369082510471344, 0.04496706649661064, 0.16241061687469482, 0.04065097123384476, 0.22533971071243286, 0.09645403921604156, 0.49813032150268555, -0.23713013529777527, 0.07907366752624512, 0.14923787117004395, 0.10697414726018906, 0.2291419506072998, -0.49817919731140137, 0.15515241026878357, 0.2824087142944336, -0.20935040712356567, -0.26524385809898376, -0.12300270795822144, 0.1124681606888771, -0.2845880091190338, -0.22110864520072937, -0.19915109872817993, 0.23758891224861145, -0.20078572630882263, 0.2012571543455124, -0.2608298063278198, -0.14868642389774323, -0.07266455143690109, -0.01120641641318798, 0.0693436935544014, -0.05988068878650665, 0.1346457600593567, 0.2258347123861313, -0.07451626658439636, -0.391234815120697, -0.15792417526245117, -0.02083321288228035, 0.0040621086955070496, -0.2969684302806854, 0.18750274181365967, 0.10256548225879669, -0.0325406938791275, -0.12275272607803345, 0.34276407957077026, 0.3815208673477173, 0.4522961974143982, 0.26194724440574646, 0.12906646728515625, 0.1619439721107483, -0.07305964827537537, -0.11834051460027695, 0.021837878972291946, 0.02056884765625, 0.3862791061401367, 0.14872218668460846, 0.15246546268463135, -0.1509103924036026, 0.16807444393634796, 0.09467025101184845, 0.3439394235610962, -0.24851791560649872, 0.5371449589729309, -0.2408280372619629, -0.022974856197834015, -0.18634279072284698, 0.18692746758460999, -0.20419251918792725, 0.2343316525220871, 0.5973926782608032, 0.10328508913516998, 0.1369418203830719, -0.3331526219844818, 0.07911049574613571, -0.2073317915201187, 0.5979251861572266, 0.15002770721912384, -0.1162654235959053, -0.2075999528169632, -0.34375423192977905, -0.6168921589851379, 0.02405974268913269, -0.15079157054424286, 0.017546089366078377, 0.07563085854053497, 0.06527502089738846, -0.049528785049915314, 0.22884543240070343, -0.18412543833255768, 0.1603521853685379, 0.2159242033958435, -0.11161111295223236, -0.1439758539199829, -0.21986491978168488, -0.013909772038459778, 0.054516956210136414, -0.21836470067501068, -0.46093714237213135, 0.2799002230167389, -0.38520848751068115, 0.08526752144098282, -0.04720912128686905, -0.4516133666038513, 0.05130115523934364, 0.03891131281852722, 0.6060331463813782, 0.021491795778274536, 0.4924464225769043, 0.10436414927244186, -0.19256749749183655, -0.2243315577507019, -0.37911808490753174, 0.0700673833489418, 0.21188831329345703, -0.06645739078521729, 0.10484440624713898, -0.23382613062858582, 0.061918340623378754, -0.502463698387146, 0.31057918071746826, -0.104245126247406, 0.34654754400253296, -0.12324558198451996, -0.1373598426580429, -0.2439221739768982, 0.2387813776731491, 0.06000342592597008, -0.04015955328941345, 0.028402918949723244, 0.12213519215583801, -0.3819405436515808, -0.423258900642395, 0.41894981265068054, -0.11973223835229874, -0.15104718506336212, -0.1329255998134613, 0.33398765325546265, -0.22877606749534607, -0.18549375236034393, -0.4162139594554901, 0.10641606897115707, 0.34708964824676514, -0.09985791891813278, -0.07929348945617676, 0.15183109045028687, -0.07783374190330505, 0.27044975757598877, -0.1217913031578064, 0.13012437522411346, -0.1585482954978943, -0.08292555809020996, -0.11450296640396118, -0.13128012418746948 ]
https://github.com/huggingface/datasets/issues/6750
`load_dataset` requires a network connection for local download?
I was having similar inexplicable issues. Doing this I *think* helped, but, `datasets` still *clearly* does not want to respect the cache: ```python pip install --upgrade datasets # now it is 2.18.0 HF_DATASETS_OFFLINE="1" python blah.py ``` Or similarly, I must spacify that env var to resuse the cache, IE, no arg to `load_dataset` helps it reuse the cache: ```python import os os.environ["HF_DATASETS_OFFLINE"] = "1" import logging logging.basicConfig(level=logging.DEBUG) import datasets # >>> datasets.__version__ # '2.18.0' datasets.utils.logging.set_verbosity_info() data = datasets.load_dataset("c-s-ale/dolly-15k-instruction-alpaca-format") ```
### Describe the bug Hi all - I see that in the past a network dependency has been mistakenly introduced into `load_dataset` even for local loads. Is it possible this has happened again? ### Steps to reproduce the bug ``` >>> import datasets >>> datasets.load_dataset("hh-rlhf") Repo card metadata block was not found. Setting CardData to empty. *hangs bc i'm firewalled* ```` stack trace from ctrl-c: ``` ^CTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/load.py", line 2582, in load_dataset builder_instance.download_and_prepare( output_path = get_from_cache( [0/122] File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 532, in get_from_cache response = http_head( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 419, in http_head response = _request_with_retry( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 304, in _request_with_retry response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/adapters.py", line 487, in send resp = conn.urlopen( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) KeyboardInterrupt ``` ### Expected behavior loads the dataset ### Environment info ``` > pip show datasets Name: datasets Version: 2.18.0 ``` Python 3.10.2
79
`load_dataset` requires a network connection for local download? ### Describe the bug Hi all - I see that in the past a network dependency has been mistakenly introduced into `load_dataset` even for local loads. Is it possible this has happened again? ### Steps to reproduce the bug ``` >>> import datasets >>> datasets.load_dataset("hh-rlhf") Repo card metadata block was not found. Setting CardData to empty. *hangs bc i'm firewalled* ```` stack trace from ctrl-c: ``` ^CTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/load.py", line 2582, in load_dataset builder_instance.download_and_prepare( output_path = get_from_cache( [0/122] File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 532, in get_from_cache response = http_head( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 419, in http_head response = _request_with_retry( File "/home/jobuser/.local/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 304, in _request_with_retry response = requests.request(method=method.upper(), url=url, timeout=timeout, **params) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/requests/adapters.py", line 487, in send resp = conn.urlopen( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/home/jobuser/build/lipy-flytekit-image/environments/satellites/python/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) KeyboardInterrupt ``` ### Expected behavior loads the dataset ### Environment info ``` > pip show datasets Name: datasets Version: 2.18.0 ``` Python 3.10.2 I was having similar inexplicable issues. Doing this I *think* helped, but, `datasets` still *clearly* does not want to respect the cache: ```python pip install --upgrade datasets # now it is 2.18.0 HF_DATASETS_OFFLINE="1" python blah.py ``` Or similarly, I must spacify that env var to resuse the cache, IE, no arg to `load_dataset` helps it reuse the cache: ```python import os os.environ["HF_DATASETS_OFFLINE"] = "1" import logging logging.basicConfig(level=logging.DEBUG) import datasets # >>> datasets.__version__ # '2.18.0' datasets.utils.logging.set_verbosity_info() data = datasets.load_dataset("c-s-ale/dolly-15k-instruction-alpaca-format") ```
[ -0.41168439388275146, 0.31381863355636597, -0.01289613451808691, 0.17014291882514954, 0.27653050422668457, -0.015546474605798721, 0.5256739854812622, 0.09215858578681946, 0.21692651510238647, -0.10878269374370575, 0.016505425795912743, 0.39275413751602173, 0.22251856327056885, 0.1687614470720291, 0.33551278710365295, 0.07511406391859055, 0.002565324306488037, 0.1470976173877716, -0.05242830514907837, -0.027189556509256363, -0.21306389570236206, 0.1695331633090973, -0.031172271817922592, -0.14436544477939606, -0.14680705964565277, -0.07890837639570236, -0.04420815408229828, 0.2409706711769104, -0.176668182015419, -0.5821489095687866, 0.6547712087631226, 0.23569971323013306, 0.12037698924541473, 0.3264332711696625, -0.00011594990064622834, 0.027888059616088867, 0.2475978285074234, 0.07242411375045776, -0.384733110666275, -0.42582041025161743, -0.2988447844982147, -0.18660789728164673, 0.3440858721733093, -0.15159866213798523, 0.1451062560081482, -0.07019966095685959, -0.22359894216060638, -0.3440468907356262, 0.22260010242462158, 0.06742782890796661, 0.18123334646224976, 0.21960221230983734, -0.10185796767473221, -0.20355120301246643, 0.225211501121521, 0.07420194894075394, -0.06630893796682358, 0.6658664345741272, 0.27972498536109924, -0.3167645335197449, -0.046999938786029816, 0.09433603286743164, 0.1682220995426178, 0.028875239193439484, 0.4014459550380707, -0.1055913195014, 0.20461910963058472, -0.316317081451416, 0.07389336079359055, 0.22617104649543762, 0.4528161883354187, -0.19067561626434326, -0.2283286601305008, -0.08023124188184738, 0.020932096987962723, 0.02163042686879635, 0.43107911944389343, 0.2277139574289322, -0.2452407330274582, 0.15456831455230713, -0.2328268140554428, -0.27871257066726685, 0.13139577209949493, 0.10895006358623505, -0.3290746510028839, 0.3540937304496765, 0.06841864436864853, 0.17865994572639465, -0.04723723605275154, 0.21426460146903992, 0.36258038878440857, -0.16461847722530365, 0.017279306426644325, 0.0919058620929718, -0.19020332396030426, 0.1952138990163803, 0.3552027642726898, 0.15506698191165924, 0.02693653106689453, 0.18321336805820465, -0.35790419578552246, -0.03751526027917862, -0.16958940029144287, 0.15165525674819946, 0.32999762892723083, -0.09785796701908112, -0.06633507460355759, 0.1317257434129715, 0.26514604687690735, 0.26735156774520874, 0.0417373962700367, -0.023014958947896957, -0.044815242290496826, 0.23611600697040558, 0.14853069186210632, -0.11785133928060532, 0.27023452520370483, -0.2366941273212433, -0.027467822656035423, 0.10306375473737717, -0.10613654553890228, 0.20061732828617096, 0.07547077536582947, 0.22670480608940125, -0.24132797122001648, 0.14752833545207977, 0.32605910301208496, -0.03833083063364029, 0.16989707946777344, 0.1898079812526703, -0.12396376579999924, -0.3576572835445404, -0.11971977353096008, 0.00264654029160738, 0.14726442098617554, -0.2062535136938095, 0.23091758787631989, 0.13504469394683838, 0.018674127757549286, 0.20896750688552856, 0.16271379590034485, -0.15791605412960052, -0.13136741518974304, 0.5368015170097351, -0.13044480979442596, 0.1690203845500946, 0.11419598758220673, 0.20659665763378143, -0.17245298624038696, 0.10800246149301529, -0.24789440631866455, -0.217449352145195, -0.1716962456703186, 0.15977823734283447, -0.04265277832746506, -0.03194597363471985, -0.11079516261816025, -0.43317005038261414, -0.005328327417373657, -0.3314262628555298, 0.0329132005572319, -0.3451005220413208, -0.2920820415019989, -0.12519316375255585, 0.1957072913646698, 0.47447073459625244, -0.44795337319374084, -0.23066599667072296, -0.08372840285301208, -0.24731594324111938, 0.10656082630157471, 0.06419914960861206, -0.5689592361450195, 0.3777969479560852, -0.41720208525657654, -0.1491612195968628, 0.4114401340484619, -0.5339081287384033, -0.6044668555259705, 0.6522333025932312, -0.388194739818573, 0.15940271317958832, -0.23090162873268127, 0.19457027316093445, -0.11306644231081009, 0.07231860607862473, 0.3597649335861206, 0.6262301206588745, -0.23156026005744934, 0.07050614804029465, -0.20156095921993256, -0.30683428049087524, 0.07846391201019287, 0.2827805280685425, 0.1039140373468399, 0.23030972480773926, 0.11161676049232483, 0.04604111984372139, 0.3721241056919098, 0.11373177915811539, 0.05526689440011978, 0.1351996660232544, 0.4990551173686981, 0.20547567307949066, 0.0763389840722084, 0.022757019847631454, -0.4841349720954895, 0.3338701128959656, -0.20971925556659698, 0.31786099076271057, -0.3440576195716858, -0.21339668333530426, -0.41294053196907043, -0.04406319558620453, -0.24162940680980682, 0.1641813963651657, 0.027581632137298584, 0.21143031120300293, -0.16317681968212128, 0.12294125556945801, -0.1519388109445572, 0.39298033714294434, -0.16347163915634155, 0.0344763919711113, -0.09038543701171875, 0.20107118785381317, -0.157677561044693, 0.2194201648235321, 0.01252835988998413, -0.12605997920036316, 0.12876233458518982, -0.1828053593635559, -0.19976580142974854, 0.431831955909729, -0.02695220150053501, 0.19352783262729645, -0.1934376358985901, -0.15504620969295502, 0.28696250915527344, 0.062264684587717056, 0.02658005617558956, 0.15695320069789886, 0.2868719696998596, -0.3404996693134308, -0.006057269871234894, 0.23663604259490967, -0.0059240758419036865, 0.19742316007614136, 0.018785521388053894, 0.15795636177062988, 0.4099763035774231, 0.026161137968301773, -0.17084449529647827, -0.0402505099773407, 0.18569836020469666, 0.1184261292219162, 0.5769628882408142, -0.0900934562087059, -0.05511198192834854, 0.21019291877746582, 0.1492815911769867, 0.14541731774806976, 0.14979058504104614, 0.02821589820086956, 0.11137895286083221, -0.16369876265525818, 0.2210209220647812, 0.4713790714740753, 0.6337587833404541, -0.03153195232152939, 0.04356738179922104, 0.2395143210887909, -0.11928657442331314, -0.3448837101459503, 0.12024412304162979, 0.03192364051938057, 0.2101748287677765, 0.1785581409931183, 0.16527609527111053, -0.018406860530376434, -0.19092151522636414, -0.37654468417167664, 0.029002206400036812, 0.06101532280445099, -0.3065478503704071, 0.21760421991348267, -0.29768145084381104, -0.3940754532814026, -0.10768209397792816, -0.1568637639284134, -0.2964072823524475, -0.4905245304107666, -0.21298417448997498, 0.0506560280919075, 0.14237956702709198, 0.16604092717170715, -0.43468162417411804, 0.2943548262119293, -0.022686148062348366, -0.3896893262863159, -0.1948442906141281, -0.23410743474960327, -0.1831115186214447, -0.014359413646161556, 0.29580560326576233, -0.034612324088811874, 0.38087907433509827, -0.19143834710121155, -0.19568432867527008, -0.18559905886650085, -0.19157251715660095, 0.18725809454917908, -0.06732261925935745, 0.274361252784729, 0.44010472297668457, 0.2819369435310364, -0.05634459853172302, 0.14878304302692413, 0.3333151936531067, -0.07550952583551407, -0.01971357688307762, -0.08442819863557816, -0.13800475001335144, 0.024181043729186058, -0.3193505108356476, -0.41934606432914734, -0.3772360384464264, -0.3509697914123535, 0.15644586086273193, 0.07712416350841522, 0.20538833737373352, 0.3024430274963379, -0.08417095988988876, 0.1401108056306839, -0.11009953171014786, -0.08543503284454346, -0.18080973625183105, -0.6269147396087646, -0.10365910828113556, -0.1393541842699051, -0.3402688205242157, 0.028708700090646744, 0.058607034385204315, 0.2813270092010498, 0.2577663064002991, -0.6490302085876465, -0.01736319437623024, -0.1817704290151596, 0.5137753486633301, -0.38181743025779724, 0.0047578588128089905, 0.40264493227005005, 0.061947889626026154, -0.0059189219027757645, -0.07285597175359726, 0.10122700035572052, 0.03485049679875374, 0.034654323011636734, 0.12463266402482986, 0.19880080223083496, 0.5795663595199585, -0.2916385531425476, 0.3204626739025116, -0.16929490864276886, 0.13055427372455597, 0.5554033517837524, -0.1636914759874344, 0.4223286211490631, -0.30109068751335144, -0.3347335755825043, -0.13995686173439026, -0.10002908110618591, -0.07717657089233398, -0.10360126197338104, -0.062368154525756836, -0.22218850255012512, -0.49037590622901917, -0.3607032001018524, 0.0589224249124527, -0.14542578160762787, 0.1247897520661354, -0.2789660394191742, 0.18730992078781128, 0.1707928478717804, -0.08359196782112122, -0.10693688690662384, 0.05363468825817108, -0.013061783276498318, 0.19633974134922028, 0.29456788301467896, -0.05313635244965553, -0.29305192828178406, 0.13288894295692444, -0.15839827060699463, -0.1439998596906662, 0.1806381791830063, 0.4877054691314697, -0.10242209583520889, 0.17468717694282532, 0.022055596113204956, -0.1711679995059967, 0.46893560886383057, -0.19460250437259674, 0.23076024651527405, 0.33424487709999084, 0.04259597510099411, -0.5386934280395508, -0.13598808646202087, -0.08474302291870117, 0.07351291179656982, 0.27893775701522827, 0.38956573605537415, -0.04377011954784393, -0.08402478694915771, 0.12793153524398804, 0.17653325200080872, -0.22745658457279205, -0.40464192628860474, -0.31952205300331116, -0.17779725790023804, -0.24708764255046844, 0.00930139422416687, -0.13209004700183868, 0.07786930352449417, 0.12356215715408325, -0.08060332387685776, -0.007121678441762924, 0.15396130084991455, -0.31292593479156494, -0.04202885925769806, -0.1954856812953949, -0.1315005123615265, 0.3663407564163208, -0.08078739047050476, 0.0004367716610431671, 0.29591748118400574, 0.720767080783844, 0.055154599249362946, 0.015430651605129242, -0.029879994690418243, 0.02800947055220604, 0.033188410103321075, 0.3846558928489685, -0.13052816689014435, 0.018169142305850983, 0.0016498733311891556, 0.02492789551615715, -0.17407359182834625, -0.09440941363573074, 0.15725621581077576, -0.5087775588035583, -0.07357756048440933, -0.4791135787963867, 0.29857131838798523, -0.08575110137462616, -0.18953506648540497, 0.5650403499603271, 0.11639034003019333, -0.1638970673084259, 0.19207067787647247, -0.1944015622138977, 0.90947026014328, 0.25128310918807983, 0.05071974918246269, 0.33879148960113525, -0.08636732399463654, 0.3556085526943207, -0.3589733839035034, 0.07385806739330292, -0.17627203464508057, -0.021879803389310837, -0.19425082206726074, -0.2647388279438019, 0.19753655791282654, -0.030882082879543304, -0.10124765336513519, 0.2652929127216339, -0.3312256932258606, 0.2253243774175644, 0.0759672150015831, 0.12437304854393005, -0.47726792097091675, -0.1900974065065384, -0.2797807455062866, 0.18201808631420135, -0.01896803081035614, 0.35073333978652954, -0.28328582644462585, 0.012892678380012512, -0.11646297574043274, -0.2767217755317688, -0.06948335468769073, 0.2621554732322693, -0.3025052845478058, 0.16600455343723297, -0.11668378114700317, 0.2059791535139084, 0.11615860462188721, -0.11561226844787598, -0.07518219947814941, 0.1746816337108612, -0.29776766896247864, 0.24949418008327484, -0.22878757119178772, 0.09422697126865387, 0.18334315717220306, 0.11151435971260071, 0.35141825675964355, -0.2177945077419281, -0.43693241477012634, -0.164424866437912, -0.35664185881614685, -0.1912357211112976, 0.15103381872177124, 0.12247629463672638, 0.20796599984169006, -0.05106326565146446, -0.1151052713394165, 0.0034304559230804443, 0.25005006790161133, -0.15766777098178864, 0.1145147830247879, 0.06330259889364243, 0.036203112453222275, 0.17822261154651642, -0.03051748499274254, -0.13217538595199585, -0.14126130938529968, 0.8560205101966858, -0.06589587777853012, -0.019458115100860596, 0.2178729921579361, 0.06943993270397186, -0.14094427227973938, -0.2899564802646637, 0.17662709951400757, 0.15269584953784943, -0.3377578854560852, -0.1376771479845047, -0.03967217355966568, 0.07721610367298126, -0.18626020848751068, 0.1610516458749771, 0.078762948513031, -0.09598737210035324, 0.05632835254073143, -0.5397212505340576, -0.2311210036277771, -0.12075316905975342, -0.005738783627748489, -0.017406467348337173, 0.16944479942321777, -0.021773654967546463, 0.30362027883529663, 0.09244301170110703, -0.2957051396369934, 0.20798979699611664, -0.18796852231025696, 0.24323692917823792, 0.03914140164852142, 0.15640205144882202, 0.3095382750034332, -0.23083874583244324, 0.082128144800663, 0.15238745510578156, -0.11233433336019516, -0.16135483980178833, -0.03866135701537132, 0.14402401447296143, 0.08595748245716095, -0.23730400204658508, -0.017884057015180588, -0.3857787251472473, -0.2513221800327301, 0.13681863248348236, 0.24254965782165527, 0.032272882759571075, -0.03213045001029968, -0.16699618101119995, 0.142068013548851, 0.17691823840141296, -0.16737623512744904, 0.3681618869304657, 0.03752560541033745, 0.057742953300476074, -0.07005230337381363, 0.10761440545320511, -0.01718190126121044, -0.11511627584695816, -0.2593359649181366, 0.03195175901055336, -0.016665689647197723, 0.20010870695114136, 0.4836670756340027, -0.26991742849349976, 0.1714915931224823, 0.10538564622402191, 0.3910943567752838, 0.4826149344444275, -0.1595352590084076, -0.07492708414793015, 0.1478407084941864, 0.18650250136852264, -0.27209508419036865, -0.20341604948043823, 0.246226966381073, 0.22601832449436188, -0.04669095575809479, 0.11829490959644318, 0.383693665266037, -0.26892101764678955, -0.19032849371433258, 0.04345477372407913, 0.6880826354026794, -0.016696445643901825, 0.1015026718378067, 0.3369082510471344, 0.04496706649661064, 0.16241061687469482, 0.04065097123384476, 0.22533971071243286, 0.09645403921604156, 0.49813032150268555, -0.23713013529777527, 0.07907366752624512, 0.14923787117004395, 0.10697414726018906, 0.2291419506072998, -0.49817919731140137, 0.15515241026878357, 0.2824087142944336, -0.20935040712356567, -0.26524385809898376, -0.12300270795822144, 0.1124681606888771, -0.2845880091190338, -0.22110864520072937, -0.19915109872817993, 0.23758891224861145, -0.20078572630882263, 0.2012571543455124, -0.2608298063278198, -0.14868642389774323, -0.07266455143690109, -0.01120641641318798, 0.0693436935544014, -0.05988068878650665, 0.1346457600593567, 0.2258347123861313, -0.07451626658439636, -0.391234815120697, -0.15792417526245117, -0.02083321288228035, 0.0040621086955070496, -0.2969684302806854, 0.18750274181365967, 0.10256548225879669, -0.0325406938791275, -0.12275272607803345, 0.34276407957077026, 0.3815208673477173, 0.4522961974143982, 0.26194724440574646, 0.12906646728515625, 0.1619439721107483, -0.07305964827537537, -0.11834051460027695, 0.021837878972291946, 0.02056884765625, 0.3862791061401367, 0.14872218668460846, 0.15246546268463135, -0.1509103924036026, 0.16807444393634796, 0.09467025101184845, 0.3439394235610962, -0.24851791560649872, 0.5371449589729309, -0.2408280372619629, -0.022974856197834015, -0.18634279072284698, 0.18692746758460999, -0.20419251918792725, 0.2343316525220871, 0.5973926782608032, 0.10328508913516998, 0.1369418203830719, -0.3331526219844818, 0.07911049574613571, -0.2073317915201187, 0.5979251861572266, 0.15002770721912384, -0.1162654235959053, -0.2075999528169632, -0.34375423192977905, -0.6168921589851379, 0.02405974268913269, -0.15079157054424286, 0.017546089366078377, 0.07563085854053497, 0.06527502089738846, -0.049528785049915314, 0.22884543240070343, -0.18412543833255768, 0.1603521853685379, 0.2159242033958435, -0.11161111295223236, -0.1439758539199829, -0.21986491978168488, -0.013909772038459778, 0.054516956210136414, -0.21836470067501068, -0.46093714237213135, 0.2799002230167389, -0.38520848751068115, 0.08526752144098282, -0.04720912128686905, -0.4516133666038513, 0.05130115523934364, 0.03891131281852722, 0.6060331463813782, 0.021491795778274536, 0.4924464225769043, 0.10436414927244186, -0.19256749749183655, -0.2243315577507019, -0.37911808490753174, 0.0700673833489418, 0.21188831329345703, -0.06645739078521729, 0.10484440624713898, -0.23382613062858582, 0.061918340623378754, -0.502463698387146, 0.31057918071746826, -0.104245126247406, 0.34654754400253296, -0.12324558198451996, -0.1373598426580429, -0.2439221739768982, 0.2387813776731491, 0.06000342592597008, -0.04015955328941345, 0.028402918949723244, 0.12213519215583801, -0.3819405436515808, -0.423258900642395, 0.41894981265068054, -0.11973223835229874, -0.15104718506336212, -0.1329255998134613, 0.33398765325546265, -0.22877606749534607, -0.18549375236034393, -0.4162139594554901, 0.10641606897115707, 0.34708964824676514, -0.09985791891813278, -0.07929348945617676, 0.15183109045028687, -0.07783374190330505, 0.27044975757598877, -0.1217913031578064, 0.13012437522411346, -0.1585482954978943, -0.08292555809020996, -0.11450296640396118, -0.13128012418746948 ]
https://github.com/huggingface/datasets/issues/6748
Strange slicing behavior
As explained in the [docs](https://huggingface.co/docs/datasets/v2.18.0/en/access#slicing), slicing a `Dataset` returns a dictionary that maps its column names to their values. So, `len(dataset[:300])=2` is expected, assuming your dataset has 2 columns (the returned dict has 2 keys, but each value in the dict has 300 items). `
### Describe the bug I have loaded a dataset, and then slice first 300 samples using `:` ops, however, the resulting dataset is not expected, as the output below: ```bash len(dataset)=1050324 len(dataset[:300])=2 len(dataset[0:300])=2 len(dataset.select(range(300)))=300 ``` ### Steps to reproduce the bug load a dataset then: ```bash dataset = load_from_disk(args.train_data_dir) print(f"{len(dataset)=}", flush=True) print(f"{len(dataset[:300])=}", flush=True) print(f"{len(dataset[0:300])=}", flush=True) print(f"{len(dataset.select(range(300)))=}", flush=True) ``` ### Expected behavior ```bash len(dataset)=1050324 len(dataset[:300])=300 len(dataset[0:300])=300 len(dataset.select(range(300)))=300 ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - `huggingface_hub` version: 0.20.2 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
45
Strange slicing behavior ### Describe the bug I have loaded a dataset, and then slice first 300 samples using `:` ops, however, the resulting dataset is not expected, as the output below: ```bash len(dataset)=1050324 len(dataset[:300])=2 len(dataset[0:300])=2 len(dataset.select(range(300)))=300 ``` ### Steps to reproduce the bug load a dataset then: ```bash dataset = load_from_disk(args.train_data_dir) print(f"{len(dataset)=}", flush=True) print(f"{len(dataset[:300])=}", flush=True) print(f"{len(dataset[0:300])=}", flush=True) print(f"{len(dataset.select(range(300)))=}", flush=True) ``` ### Expected behavior ```bash len(dataset)=1050324 len(dataset[:300])=300 len(dataset[0:300])=300 len(dataset.select(range(300)))=300 ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35 - Python version: 3.10.11 - `huggingface_hub` version: 0.20.2 - PyArrow version: 10.0.1 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0 As explained in the [docs](https://huggingface.co/docs/datasets/v2.18.0/en/access#slicing), slicing a `Dataset` returns a dictionary that maps its column names to their values. So, `len(dataset[:300])=2` is expected, assuming your dataset has 2 columns (the returned dict has 2 keys, but each value in the dict has 300 items). `
[ -0.022191021591424942, -0.4173964858055115, -0.03937358036637306, 0.21162284910678864, 0.3818480372428894, -0.22799047827720642, 0.27848371863365173, 0.12123659253120422, -0.1306924968957901, 0.449577271938324, -0.1268230825662613, 0.5206926465034485, 0.047084104269742966, 0.41319209337234497, -0.05275346338748932, -0.19030094146728516, 0.20297569036483765, 0.048548102378845215, -0.41562777757644653, -0.15782196819782257, -0.14228267967700958, 0.13329124450683594, -0.36952418088912964, -0.04671835899353027, -0.16177691519260406, -0.0003551505506038666, 0.017637019976973534, 0.3440139591693878, 0.15996520221233368, -0.1878647804260254, 0.12438270449638367, -0.23527929186820984, 0.14373302459716797, 0.4232633709907532, -0.00012155438889749348, -0.006124474108219147, 0.03615567088127136, 0.033884599804878235, -0.2702913284301758, -0.09748391807079315, 0.2033572793006897, -0.06392905861139297, 0.24369759857654572, -0.35139700770378113, 0.03574773669242859, 0.10650315135717392, -0.2866401672363281, -0.4004271924495697, 0.2128019630908966, 0.060166288167238235, 0.15239471197128296, 0.3257784843444824, -0.43060335516929626, 0.00452222628518939, 0.12315494567155838, 0.49105095863342285, -0.18424537777900696, -0.3032195270061493, 0.060766998678445816, 0.23804910480976105, 0.05376693233847618, 0.20111830532550812, -0.03720340505242348, 0.0479656457901001, -0.05319942533969879, 0.27410659193992615, -0.09089239686727524, -0.24009963870048523, 0.051368728280067444, 0.2406907081604004, 0.07748789340257645, -0.20777660608291626, -0.25661808252334595, -0.30716755986213684, -0.2026040256023407, -0.27418088912963867, -0.12141964584589005, 0.19302313029766083, 0.003237685188651085, 0.11561067402362823, -0.28853997588157654, 0.17022977769374847, -0.07686443626880646, -0.0023149698972702026, -0.1552402526140213, 0.18125583231449127, -0.35402628779411316, 0.23031902313232422, 0.09814713150262833, -0.013534542173147202, -0.2466164529323578, -0.11437635123729706, -0.0038141347467899323, 0.32319051027297974, -0.07479366660118103, 0.016792237758636475, 0.20609059929847717, 0.5043858885765076, 0.42386630177497864, 0.26475563645362854, -0.10529477894306183, 0.08200927078723907, -0.16366727650165558, -0.039302438497543335, 0.4327097535133362, -0.026476357132196426, 0.1624428629875183, 0.13623329997062683, -0.010457418859004974, 0.13079191744327545, -0.014507278800010681, -0.0662236362695694, 0.4455671012401581, 0.10485571622848511, 0.02109196037054062, -0.24402785301208496, 0.25632065534591675, -0.05462298542261124, -0.4249975085258484, 0.23584605753421783, -0.24055972695350647, 0.04064733162522316, 0.1537654846906662, 0.2283937633037567, -0.09714803099632263, 0.061071962118148804, -0.23348303139209747, 0.32043665647506714, -0.5191614031791687, -0.07021806389093399, -0.3185206353664398, -0.07325957715511322, -0.03860398009419441, -0.25167208909988403, -0.047360651195049286, -0.15704382956027985, 0.032369717955589294, 0.358289897441864, 0.20271895825862885, -0.2523120045661926, -0.24957777559757233, 0.014276189729571342, 0.293565571308136, 0.34072816371917725, -0.000530194491147995, 0.2591709792613983, 0.15748754143714905, -0.17007486522197723, -0.049842022359371185, 0.13928094506263733, -0.06255676597356796, -0.06451770663261414, -0.13840121030807495, 0.07979017496109009, -0.1025703176856041, 0.40170517563819885, -0.1641339361667633, 0.1483834683895111, 0.14570556581020355, -0.052620962262153625, -0.09540051966905594, -0.07032185792922974, -0.3122403025627136, -0.23413048684597015, 0.44662463665008545, 0.2328912317752838, -0.4521191716194153, -0.2239571213722229, -0.04934661090373993, -0.03711201623082161, 0.4558878242969513, 0.33189716935157776, -0.11176419258117676, -0.07808639854192734, -0.2716933786869049, 0.31046921014785767, 0.028335556387901306, 0.03914816305041313, -0.45069900155067444, 0.14350998401641846, -0.12476390600204468, 0.35902056097984314, 0.06097979471087456, -0.22093482315540314, 0.25217846035957336, -0.11173009127378464, -0.02019505202770233, 0.15689361095428467, -0.11150656640529633, 0.061497025191783905, -0.22531938552856445, -0.13925328850746155, 0.21500295400619507, -0.009687989950180054, -0.008074566721916199, -0.0017716363072395325, 0.22157680988311768, -0.11945357918739319, 0.578576385974884, 0.05528093874454498, 0.23704193532466888, -0.10084247589111328, 0.12112347781658173, 0.0552227720618248, 0.3023155927658081, -0.3024618923664093, -0.20106786489486694, 0.18202918767929077, 0.03995776176452637, -0.26350560784339905, -0.1369132399559021, -0.30467087030410767, -0.1785004436969757, 0.27530935406684875, -0.007643740624189377, -0.1849842071533203, 0.004166610538959503, 0.012458540499210358, 0.2237454056739807, 0.10140609741210938, -0.07995417714118958, 0.12546567618846893, -0.048697829246520996, 0.16835203766822815, -0.5643144845962524, 0.38734033703804016, 0.0519101545214653, -0.1280258744955063, -0.4608083963394165, 0.34289029240608215, 0.1566326916217804, -0.23521053791046143, 0.09523526579141617, 0.4395575225353241, 0.40378811955451965, -0.13324058055877686, -0.44453752040863037, -0.004549086093902588, 0.23293885588645935, -0.08990202844142914, -0.08489662408828735, -0.18793778121471405, 0.21378488838672638, -0.04124170541763306, -0.3943875730037689, 0.36570340394973755, -0.4808959662914276, 0.20091702044010162, -0.18307146430015564, 0.013609806075692177, 0.12011273205280304, 0.16911256313323975, -0.1331208199262619, -0.40534940361976624, 0.20884229242801666, 0.1658647060394287, 0.03851639851927757, 0.06871429830789566, -0.39283329248428345, 0.1698910892009735, 0.20319624245166779, -0.2755580544471741, -0.07689698785543442, 0.021113526076078415, -0.004671230912208557, 0.1033354327082634, 0.05394722521305084, 0.022239509969949722, 0.40063053369522095, 0.13411074876785278, 0.12801355123519897, -0.2364879548549652, 0.08967974781990051, -0.2615029811859131, 0.010074138641357422, 0.36920028924942017, -0.16992177069187164, -0.08039434999227524, 0.14836587011814117, -0.010718847624957561, -0.25736838579177856, 0.38991156220436096, 0.054088786244392395, 0.04636283591389656, -0.29262688755989075, 0.35222938656806946, -0.3315531313419342, 0.16684004664421082, 0.05819227546453476, -0.38377535343170166, -0.2130357027053833, -0.288337767124176, -0.07686030119657516, 0.18879933655261993, -0.09317520260810852, 0.08014216274023056, 0.10305200517177582, 0.20931032299995422, -0.10950250178575516, 0.25441986322402954, -0.04566877335309982, 0.299575537443161, -0.16470485925674438, -0.010070456191897392, -0.10292703658342361, 0.1261599212884903, 0.014006705954670906, 0.2203041911125183, -0.253255158662796, -0.043217673897743225, -0.2560213804244995, 0.12788279354572296, -0.20357289910316467, 0.6450600624084473, 0.13332879543304443, -0.145869180560112, -0.1348859667778015, -0.008182156831026077, 0.1819572150707245, 0.15473198890686035, -0.08781325817108154, 0.11295732855796814, 0.19286596775054932, 0.022158009931445122, -0.2509010136127472, 0.07243464887142181, -0.2901235520839691, -0.04856855794787407, 0.3479633927345276, 0.10223008692264557, 0.06291317194700241, 0.12813353538513184, -0.15519165992736816, -0.08986002951860428, -0.06057483330368996, 0.03773324191570282, -0.46944138407707214, -0.17534615099430084, -0.005136128515005112, -0.24592231214046478, -0.26467016339302063, -0.3074054718017578, -0.19760237634181976, -0.0034989453852176666, -0.06933854520320892, -0.38748008012771606, 0.1532798707485199, -0.38516440987586975, 0.16297918558120728, -0.1095871776342392, 0.3038748800754547, 0.35980695486068726, -0.23106621205806732, 0.04628399759531021, -0.36729827523231506, -0.15473175048828125, 0.09803292155265808, -0.03795473277568817, -0.20858564972877502, 0.04396968334913254, 0.4596567749977112, 0.18129515647888184, 0.3854527473449707, 0.2861977219581604, 0.22167861461639404, 0.267145574092865, -0.08330017328262329, 0.4741547703742981, -0.27634772658348083, -0.2627127170562744, 0.2663390636444092, -0.08634929358959198, -0.3372002840042114, 0.22983397543430328, 0.28591078519821167, 0.1568938046693802, 0.270332008600235, 0.04689573869109154, -0.23409393429756165, -0.40762051939964294, -0.06875178217887878, -0.14666949212551117, -0.1356971263885498, 0.16026782989501953, 0.3271099030971527, -0.07967188954353333, -0.08600129932165146, -0.27620309591293335, -0.11421459913253784, 0.44376447796821594, -0.10416318476200104, -0.5122236609458923, -0.24407990276813507, -0.49947893619537354, 0.20438723266124725, 0.17430849373340607, 0.1676875203847885, -0.05885232612490654, -0.398762583732605, 0.4033070206642151, 0.19760090112686157, 1.1094460487365723, 0.10590086877346039, -0.030513860285282135, 0.0015762988477945328, -0.3717191517353058, -0.641909658908844, 0.028291475027799606, -0.22989808022975922, 0.44225621223449707, 0.2806720733642578, 0.24567802250385284, -0.32176876068115234, -0.03997218981385231, 0.223680317401886, 0.0672249123454094, 0.04677703604102135, -0.03050461784005165, -0.118497833609581, 0.1007060632109642, 0.07948771119117737, 0.05031569302082062, 0.09276442229747772, 0.22799360752105713, -0.3479164242744446, -0.11432786285877228, -0.07877633720636368, -0.4009949266910553, -0.00005904585123062134, -0.03667839989066124, 0.33562541007995605, 0.10522168129682541, 0.11198499798774719, 0.06231800839304924, -0.11887596547603607, 0.0345367006957531, 0.6030310392379761, -0.1210877001285553, -0.1640447974205017, 0.0861097127199173, -0.05372083559632301, 0.4165200889110565, 0.34993883967399597, -0.13069771230220795, 0.00237853080034256, -0.26736462116241455, 0.3432788848876953, -0.3730889856815338, -0.2408534288406372, 0.3655884265899658, -0.09831666201353073, -0.3303733468055725, -0.04144557565450668, 0.4779888987541199, 0.11036588251590729, -0.270500123500824, 0.48199549317359924, 0.33666086196899414, -0.14646026492118835, 0.3469886779785156, -0.05106978863477707, 0.7342966198921204, -0.04551853984594345, 0.17241807281970978, 0.24519842863082886, 0.06912264972925186, 0.7324509620666504, 0.11983400583267212, 0.12623214721679688, -0.4052274525165558, -0.25553998351097107, -0.015932200476527214, -0.06296347826719284, -0.03859280049800873, -0.007707681506872177, -0.010522637516260147, -0.0008287499658763409, -0.5782009363174438, 0.07089997082948685, -0.25209635496139526, -0.3123725354671478, -0.10067105293273926, -0.2798929810523987, -0.237687885761261, 0.027106087654829025, 0.10533539205789566, 0.13491880893707275, 0.003312109038233757, 0.2002757340669632, -0.10467822849750519, -0.35389000177383423, -0.19668853282928467, 0.07526811957359314, -0.14496365189552307, 0.11185558885335922, 0.5291224718093872, -0.4766864776611328, 0.12527114152908325, 0.43807974457740784, 0.207611083984375, 0.26020053029060364, -0.03393646329641342, 0.13644646108150482, -0.09760231524705887, 0.31084129214286804, 0.20077010989189148, -0.13475747406482697, 0.13062746822834015, 0.2787366211414337, -0.20292538404464722, -0.059108562767505646, -0.09710465371608734, -0.06653475016355515, -0.2454085648059845, 0.5095349550247192, 0.2132481336593628, -0.6773603558540344, -0.05738862231373787, -0.2468860149383545, 0.30358049273490906, -0.2355048805475235, 0.015224003233015537, 0.14623920619487762, -0.3031328022480011, 0.4383024275302887, 0.09620197117328644, -0.1663721203804016, -0.19517120718955994, 0.3743572235107422, 0.008680125698447227, 0.23247289657592773, 0.3430044949054718, 0.36577585339546204, -0.09601721167564392, -0.14348751306533813, 0.3382965922355652, 0.30278462171554565, -0.21793755888938904, 0.15751433372497559, -0.12685099244117737, 0.11166109144687653, 0.06956744939088821, 0.25093114376068115, -0.12271550297737122, -0.10557135194540024, -0.41077661514282227, -0.3838660418987274, 0.1190648302435875, 0.07906951010227203, 0.1432974934577942, 0.09148123115301132, 0.33314087986946106, 0.27112406492233276, -0.19740772247314453, 0.25674450397491455, -0.19246390461921692, 0.3055073320865631, -0.019743802025914192, 0.22434493899345398, -0.19153770804405212, 0.052874159067869186, 0.23807230591773987, -0.1132490336894989, 0.07705865800380707, 0.3461526036262512, -0.11994010210037231, -0.17863088846206665, -0.34194278717041016, 0.15089073777198792, 0.031409621238708496, -0.36259815096855164, -0.0965408906340599, 0.262820303440094, -0.11277975142002106, -0.39917072653770447, 0.3257410526275635, 0.26104021072387695, 0.12970080971717834, -0.03077239915728569, 0.5797362923622131, 0.07966214418411255, 0.12479878962039948, 0.17652885615825653, -0.23770174384117126, 0.3542499542236328, 0.1235138326883316, 0.31617146730422974, -0.16626377403736115, 0.013969212770462036, -0.12101750075817108, -0.009407185018062592, 0.03223228454589844, -0.056046463549137115, 0.12333672493696213, -0.4277649521827698, -0.1675753891468048, 0.12220609188079834, 0.7756847143173218, 0.1720915138721466, 0.03258272632956505, 0.04299280792474747, -0.22296428680419922, 0.15430191159248352, 0.04526444524526596, -0.492148220539093, 0.1571226418018341, 0.4571305811405182, 0.133184552192688, 0.45186638832092285, -0.11572197079658508, 0.005084581673145294, 0.23983192443847656, -0.10455666482448578, 0.4508199095726013, 0.03006875142455101, 0.23445932567119598, 0.48798856139183044, -0.13982905447483063, 0.002329796552658081, 0.03183050826191902, -0.20695047080516815, 0.07753132283687592, 0.6368890404701233, -0.021456032991409302, 0.2890934646129608, -0.06816820055246353, 0.057601362466812134, 0.06577818095684052, -0.5409703850746155, -0.13066411018371582, -0.04558388888835907, -0.2694655954837799, 0.10528656840324402, -0.028549067676067352, 0.4481692612171173, -0.24527738988399506, -0.12740547955036163, -0.2936781644821167, 0.13324511051177979, -0.2188318371772766, -0.21544094383716583, -0.15562784671783447, -0.12982578575611115, 0.1128707081079483, -0.13271859288215637, -0.0723768025636673, -0.18905039131641388, 0.5409653186798096, -0.026910103857517242, 0.020215190947055817, -0.34591740369796753, -0.2877214848995209, -0.12480329722166061, 0.13413771986961365, -0.2507856488227844, 0.20047028362751007, 0.1311793327331543, 0.04394698888063431, 0.21166867017745972, -0.28658533096313477, 0.459960401058197, -0.09478923678398132, -0.10250155627727509, -0.12005067616701126, -0.18219271302223206, 0.024592163041234016, -0.07538828253746033, 0.32169145345687866, -0.05876287817955017, 0.41482070088386536, 0.26808691024780273, 0.10276319831609726, -0.07516781240701675, -0.12762126326560974, 0.38539934158325195, 0.29198330640792847, -0.6902539134025574, 0.22126144170761108, -0.4485008418560028, 0.03695801645517349, -0.5302461385726929, -0.20884543657302856, -0.19993233680725098, 0.049717508256435394, -0.06519991159439087, -0.20831558108329773, 0.18779921531677246, 0.013848808594048023, 0.0376816987991333, -0.06686682999134064, 0.18304842710494995, 0.15689988434314728, -0.043165139853954315, -0.24530678987503052, -0.15135355293750763, -0.027157433331012726, -0.0003643035888671875, -0.11022533476352692, 0.09870818257331848, 0.2119653820991516, 0.22146137058734894, -0.001473650336265564, 0.12480445206165314, 0.06333644688129425, 0.19402505457401276, -0.14897747337818146, 0.30956026911735535, -0.15335218608379364, -0.15342958271503448, -0.30967849493026733, -0.21550381183624268, -0.07059040665626526, -0.2901250720024109, 0.2706124186515808, -0.302936315536499, -0.06967196613550186, -0.1286010593175888, 0.058368973433971405, -0.10138912498950958, -0.01589735597372055, 0.11134123057126999, 0.5160232782363892, 0.07032617926597595, 0.021856088191270828, -0.18866528570652008, -0.2977759838104248, -0.12358155846595764, -0.14732566475868225, 0.3216191232204437, -0.26922452449798584, 0.4139036536216736, -0.19139963388442993, -0.5104519724845886, 0.03400709107518196, 0.14004650712013245, 0.28247153759002686, 0.14921249449253082, -0.11557254940271378, 0.1824014037847519, -0.4362886846065521, 0.1531711369752884, 0.14154119789600372, 0.436705619096756, -0.0001399703323841095, 0.47291773557662964, 0.26800304651260376, -0.3901948630809784, 0.5399009585380554, -0.4686983525753021, -0.157388836145401, -0.27068132162094116, 0.18624961376190186, 0.10571570694446564, -0.6103461384773254, -0.09610655903816223, -0.1255834549665451, 0.28785088658332825, -0.2821447551250458, 0.06194781884551048, 0.10066397488117218, -0.06463271379470825, -0.22764216363430023, 0.011434167623519897, 0.4640808403491974, 0.32912683486938477, -0.13286277651786804, 0.6663262248039246, -0.2782147526741028 ]
https://github.com/huggingface/datasets/issues/6746
ExpectedMoreSplits error when loading C4 dataset
Hi ! We updated the `allenai/c4` repository to allow people to specify which language to load easily (the the [c4 dataset page](https://huggingface.co/datasets/allenai/c4)) To fix this issue **you can update** `datasets` and remove the mention of the legacy configuration name "allenai--c4": ```python traindata = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train') valdata = load_dataset('allenai/c4', data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'}, split='validation') ```
### Describe the bug I encounter bug when running the example command line ```python python main.py \ --model decapoda-research/llama-7b-hf \ --prune_method wanda \ --sparsity_ratio 0.5 \ --sparsity_type unstructured \ --save out/llama_7b/unstructured/wanda/ ``` The bug occurred at these lines of code (when loading c4 dataset) ```python traindata = load_dataset('allenai/c4', 'allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train') valdata = load_dataset('allenai/c4', 'allenai--c4', data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'}, split='validation') ``` The error message states: ``` raise ExpectedMoreSplits(str(set(expected_splits) - set(recorded_splits))) datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} ``` ### Steps to reproduce the bug 1. I encounter bug when running the example command line ### Expected behavior The error message states: ``` raise ExpectedMoreSplits(str(set(expected_splits) - set(recorded_splits))) datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} ``` ### Environment info I'm using cuda 12.4, so I use ```pip install pytorch``` instead of conda provided in install.md Also, I've tried another environment using the same commands in install.md, but the same bug occured
54
ExpectedMoreSplits error when loading C4 dataset ### Describe the bug I encounter bug when running the example command line ```python python main.py \ --model decapoda-research/llama-7b-hf \ --prune_method wanda \ --sparsity_ratio 0.5 \ --sparsity_type unstructured \ --save out/llama_7b/unstructured/wanda/ ``` The bug occurred at these lines of code (when loading c4 dataset) ```python traindata = load_dataset('allenai/c4', 'allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train') valdata = load_dataset('allenai/c4', 'allenai--c4', data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'}, split='validation') ``` The error message states: ``` raise ExpectedMoreSplits(str(set(expected_splits) - set(recorded_splits))) datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} ``` ### Steps to reproduce the bug 1. I encounter bug when running the example command line ### Expected behavior The error message states: ``` raise ExpectedMoreSplits(str(set(expected_splits) - set(recorded_splits))) datasets.utils.info_utils.ExpectedMoreSplits: {'validation'} ``` ### Environment info I'm using cuda 12.4, so I use ```pip install pytorch``` instead of conda provided in install.md Also, I've tried another environment using the same commands in install.md, but the same bug occured Hi ! We updated the `allenai/c4` repository to allow people to specify which language to load easily (the the [c4 dataset page](https://huggingface.co/datasets/allenai/c4)) To fix this issue **you can update** `datasets` and remove the mention of the legacy configuration name "allenai--c4": ```python traindata = load_dataset('allenai/c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train') valdata = load_dataset('allenai/c4', data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'}, split='validation') ```
[ -0.2093273401260376, -0.08629315346479416, 0.005980711430311203, 0.5380087494850159, 0.549832284450531, -0.1093844622373581, 0.09734025597572327, 0.16330640017986298, 0.05141580477356911, 0.3361155092716217, 0.20857207477092743, 0.14479252696037292, -0.33590787649154663, 0.07389578223228455, -0.04043630510568619, -0.2346228063106537, 0.09406609833240509, 0.12836188077926636, -0.009085804224014282, 0.17791351675987244, -0.14535710215568542, 0.17008860409259796, -0.22288163006305695, -0.10907155275344849, -0.3304511308670044, 0.13413089513778687, -0.02269088476896286, 0.16896486282348633, 0.10712223500013351, -0.7576596736907959, 0.49666649103164673, -0.19902637600898743, 0.41258084774017334, 0.3682074248790741, -0.00012370091280899942, -0.15523558855056763, 0.3560125231742859, -0.24711887538433075, -0.20946475863456726, -0.04067544639110565, -0.6049741506576538, -0.3476962447166443, 0.053397879004478455, -0.39626020193099976, 0.137090802192688, -0.12209690362215042, -0.25709038972854614, -0.3579184114933014, 0.03238823264837265, 0.4654102027416229, 0.09948693215847015, 0.22737133502960205, -0.12394896149635315, -0.02351776324212551, -0.2302410900592804, -0.031256698071956635, 0.028538627550005913, 0.21356239914894104, -0.06619752943515778, 0.03689099848270416, 0.04300709813833237, 0.10107877850532532, -0.025214873254299164, 0.12076452374458313, 0.10163962095975876, 0.11608372628688812, 0.0414479561150074, -0.03900176286697388, 0.1820678412914276, 0.047315604984760284, 0.26958557963371277, -0.2705627977848053, -0.29160457849502563, -0.26735982298851013, -0.008736448362469673, -0.369616836309433, 0.3771423399448395, 0.4579129219055176, 0.016535364091396332, 0.16567659378051758, -0.09788142889738083, 0.2810688018798828, -0.3341296315193176, 0.2288774847984314, -0.13666033744812012, 0.21470974385738373, 0.0038544852286577225, 0.07443076372146606, 0.34961801767349243, -0.019980527460575104, 0.2759977877140045, -0.13732539117336273, -0.2635132074356079, 0.2605730891227722, -0.4421004056930542, 0.02891138195991516, -0.12088661640882492, 0.41060879826545715, 0.008405894041061401, 0.1513032764196396, 0.052560534328222275, 0.06296737492084503, 0.17160455882549286, 0.03806542977690697, 0.13038119673728943, 0.15633618831634521, 0.014482259750366211, 0.43655961751937866, 0.15850085020065308, 0.21608459949493408, 0.07218363881111145, -0.17972368001937866, 0.06422238051891327, -0.2645159661769867, 0.27488264441490173, 0.23929911851882935, -0.038339823484420776, -0.40552759170532227, -0.5515313744544983, 0.3857393264770508, -0.6417445540428162, -0.2929549813270569, -0.12923109531402588, 0.2958841323852539, -0.048978034406900406, 0.504591166973114, 0.028889387845993042, 0.28173190355300903, -0.050694309175014496, -0.30877622961997986, -0.13149553537368774, -0.0695464164018631, -0.38388267159461975, -0.04118411988019943, 0.18088741600513458, -0.12862370908260345, 0.213969886302948, -0.006749358028173447, 0.17768417298793793, -0.24297821521759033, 0.08090297132730484, -0.05574672296643257, 0.030413202941417694, 0.34008511900901794, -0.2593836784362793, -0.04732995107769966, 0.03667329251766205, -0.028451595455408096, 0.010630615055561066, 0.3316862881183624, 0.09307445585727692, -0.3565142750740051, -0.13389421999454498, 0.05873876437544823, -0.11311052739620209, 0.2458571046590805, -0.4485556185245514, -0.03117850050330162, 0.2189994603395462, 0.017783179879188538, 0.19796618819236755, -0.20455653965473175, 0.2540566027164459, -0.10665173828601837, 0.15311451256275177, 0.5402294993400574, -0.4495624601840973, -0.0389762818813324, 0.08843160420656204, -0.2332945466041565, 0.5131142139434814, 0.07394389808177948, -0.16045866906642914, 0.2563117444515228, -0.2787737548351288, 0.09084899723529816, -0.16480767726898193, -0.517403244972229, -0.6147682666778564, -0.0008572147926315665, 0.062414154410362244, 0.5140894651412964, 0.06763610243797302, -0.12159065157175064, -0.11964672803878784, 0.14358963072299957, 0.038564372807741165, 0.0764678567647934, -0.017192302271723747, 0.026838233694434166, -0.45794758200645447, -0.061586372554302216, 0.6156100034713745, -0.08193459361791611, 0.2708381712436676, -0.23406946659088135, 0.04143012315034866, 0.2149755209684372, 0.4049859642982483, -0.3682490587234497, -0.15487532317638397, -0.15814068913459778, 0.22644618153572083, 0.07643575966358185, 0.014344707131385803, -0.09339527785778046, -0.3823331296443939, 0.22662383317947388, -0.1347702145576477, 0.2018560767173767, -0.29930293560028076, 0.0032001957297325134, -0.09782411903142929, 0.07205735146999359, -0.30272355675697327, -0.328521192073822, -0.03727063536643982, 0.1950029730796814, 0.12263721227645874, -0.14216753840446472, 0.08562764525413513, 0.8040101528167725, -0.35000959038734436, 0.20854976773262024, 0.045646220445632935, 0.4049832820892334, -0.3362653851509094, -0.18378537893295288, -0.15874996781349182, 0.1892324686050415, 0.18119609355926514, -0.24076470732688904, -0.3599591553211212, 0.3411729633808136, 0.3904222846031189, -0.032845571637153625, -0.4743657410144806, 0.1288701593875885, 0.49318253993988037, -0.2531563937664032, 0.12384797632694244, 0.3007848262786865, -0.042064566165208817, 0.1581610143184662, 0.13734619319438934, 0.2428417205810547, 0.11583283543586731, 0.1958174854516983, -0.17947615683078766, -0.20891128480434418, 0.2437542974948883, -0.015348140150308609, 0.1053134948015213, -0.43077948689460754, 0.08193778991699219, 0.18360242247581482, 0.2649971842765808, -0.1139608770608902, -0.2814362049102783, -0.16456452012062073, 0.33071649074554443, -0.10950817167758942, -0.08405786007642746, 0.04061247035861015, 0.051441751420497894, -0.04411044716835022, 0.3436930477619171, 0.17236705124378204, 0.49240320920944214, 0.10136920213699341, -0.5300121307373047, -0.006261872127652168, 0.022096041589975357, -0.19606834650039673, 0.23265907168388367, 0.18827904760837555, -0.0700063705444336, 0.3272760510444641, 0.28140589594841003, 0.13666868209838867, -0.1785363256931305, -0.2457605004310608, -0.1720568984746933, 0.1985015720129013, -0.25673675537109375, 0.1252121925354004, -0.24434815347194672, -0.09198220819234848, -0.12439720332622528, 0.042676977813243866, 0.11514908075332642, -0.002935578115284443, -0.29955583810806274, -0.25885388255119324, -0.16732679307460785, 0.11347438395023346, -0.4616524875164032, 0.13800202310085297, -0.0033162906765937805, -0.039139799773693085, 0.031605228781700134, 0.2583226263523102, -0.42280352115631104, -0.1167687475681305, 0.3600005805492401, 0.030440645292401314, 0.24617378413677216, -0.1422179937362671, 0.07951130717992783, 0.11568276584148407, -0.3437027037143707, -0.09932310879230499, 0.14760525524616241, 0.182938814163208, 0.04063201695680618, -0.1762305349111557, 0.33024734258651733, -0.3981795608997345, 0.12717214226722717, 0.17037080228328705, -0.17159989476203918, 0.08633539080619812, 0.17759813368320465, 0.0061959573067724705, -0.0813770592212677, -0.40282106399536133, -0.2649058401584625, -0.2643168568611145, -0.13225799798965454, 0.304627925157547, 0.021234437823295593, -0.28117111325263977, 0.16739968955516815, 0.03695662319660187, 0.017203448340296745, -0.3837011158466339, -0.05949325114488602, 0.3363402187824249, -0.03832223638892174, 0.054091211408376694, -0.14241191744804382, -0.1711234152317047, -0.2156134396791458, 0.40388408303260803, -0.04188038408756256, -0.3158887028694153, 0.26468732953071594, -0.3145133852958679, 0.6062678694725037, -0.2646850645542145, -0.19035296142101288, 0.5931571125984192, 0.19885119795799255, 0.07345792651176453, -0.1415983885526657, -0.11813859641551971, 0.29120925068855286, -0.13943323493003845, -0.040078647434711456, -0.2099725604057312, 0.17254474759101868, -0.03109271079301834, 0.32105445861816406, 0.17393562197685242, -0.32763054966926575, 0.15961596369743347, 0.13887636363506317, 0.12332682311534882, -0.012893833220005035, -0.31075745820999146, 0.2390582114458084, -0.0018783807754516602, 0.0600324347615242, 0.290063738822937, -0.31011804938316345, -0.1884702891111374, 0.007298480719327927, -0.09760314226150513, -0.12852905690670013, -0.05989738553762436, 0.15490172803401947, 0.01704695075750351, 0.2709985673427582, 0.06602434813976288, 0.16943633556365967, 0.11559239029884338, 0.04048755392432213, 0.1669340431690216, -0.042761266231536865, 0.009565532207489014, -0.05267755314707756, -0.3588196933269501, -0.022946015000343323, -0.31318399310112, 0.43970364332199097, 0.40157371759414673, 0.4105915129184723, 0.2954232394695282, -0.05812535434961319, -0.10866926610469818, -0.12923279404640198, 0.3532799184322357, -0.07117002457380295, -0.12433913350105286, 0.01380254328250885, 0.10104838013648987, -0.14572341740131378, -0.3479319214820862, -0.398589551448822, 0.0797126293182373, 0.3586958944797516, 0.5753391981124878, -0.19609303772449493, -0.17406409978866577, 0.285116970539093, 0.48618191480636597, -0.09667007625102997, -0.2625669836997986, -0.1646394580602646, 0.10880190879106522, -0.22360777854919434, 0.3144632875919342, 0.03585609793663025, 0.5402654409408569, -0.2781326174736023, -0.19663786888122559, 0.05371192842721939, -0.07487261295318604, 0.1232658326625824, 0.26827946305274963, 0.3124561607837677, -0.23600871860980988, 0.13180528581142426, 0.022256936877965927, 0.1158774122595787, 0.5160976648330688, 0.36863404512405396, -0.2169654369354248, -0.23749575018882751, -0.16478297114372253, 0.013997447676956654, 0.22203558683395386, 0.1115063726902008, -0.04338258132338524, 0.017622098326683044, 0.014909414574503899, 0.09517031162977219, -0.2844419777393341, 0.31233999133110046, 0.30824488401412964, 0.26854565739631653, -0.5108645558357239, -0.3991760313510895, 0.3024868071079254, -0.09947307407855988, -0.04721618443727493, 0.2834671139717102, 0.3939158320426941, -0.4844020903110504, 0.005278273485600948, 0.3617277443408966, 0.8234009146690369, 0.3040260672569275, 0.08135433495044708, 0.3196479082107544, -0.19369608163833618, 0.022497715428471565, -0.3597651720046997, 0.13363152742385864, -0.2872694730758667, 0.1825559437274933, -0.046393632888793945, -0.2403436005115509, 0.39872246980667114, 0.2085217982530594, -0.3045877516269684, -0.01142920833081007, -0.2878172993659973, -0.27393490076065063, 0.15815123915672302, 0.35635906457901, -0.13703250885009766, -0.2107149064540863, -0.2201664000749588, -0.02807728201150894, 0.028697213158011436, -0.036390241235494614, -0.1669575273990631, 0.06880013644695282, -0.04490473121404648, -0.43620169162750244, -0.5023338794708252, 0.3674914836883545, -0.6028167605400085, 0.04617907106876373, 0.05630745738744736, -0.295285701751709, 0.380209743976593, 0.18613877892494202, 0.018709618598222733, 0.4119929373264313, -0.030136486515402794, 0.06767960637807846, -0.21203234791755676, -0.14493966102600098, 0.24675190448760986, -0.12629172205924988, 0.11220383644104004, 0.011174649000167847, -0.5042926073074341, 0.12121753394603729, -0.17008695006370544, -0.1578909158706665, 0.10980445146560669, 0.33960461616516113, -0.1934158354997635, -0.4514053463935852, -0.5540481805801392, 0.16372516751289368, 0.1468750685453415, -0.25687992572784424, 0.03434561938047409, -0.01113031804561615, -0.1956629604101181, 0.1504857838153839, 0.08093777298927307, -0.37849584221839905, -0.17893144488334656, 0.2696269750595093, -0.01830010488629341, -0.29260072112083435, 0.4925994277000427, -0.09815780818462372, -0.19212476909160614, -0.18103662133216858, -0.12448600679636002, 0.20262080430984497, -0.5602433681488037, 0.13855499029159546, -0.055489715188741684, -0.1039319783449173, 0.08961895108222961, 0.2615927457809448, 0.16976583003997803, -0.06300642341375351, -0.0608455054461956, -0.4359830319881439, -0.22967486083507538, -0.060859277844429016, -0.04434921219944954, 0.21377798914909363, 0.048276931047439575, 0.29227516055107117, -0.40508371591567993, 0.17047640681266785, -0.12568216025829315, -0.06865481287240982, -0.11426108330488205, 0.10142990946769714, 0.13281124830245972, 0.01440887525677681, 0.20837990939617157, 0.05183824151754379, 0.0394769012928009, 0.276242196559906, 0.16818855702877045, -0.11004924774169922, -0.3725564181804657, 0.16413137316703796, 0.21310752630233765, -0.17479963600635529, 0.020768750458955765, 0.05803100764751434, 0.2165142297744751, -0.19994796812534332, 0.26675742864608765, 0.22078174352645874, -0.16198475658893585, 0.3356940448284149, 0.19928522408008575, -0.03274167329072952, -0.03360796719789505, 0.24269522726535797, -0.11350889503955841, 0.022474803030490875, 0.24514685571193695, 0.19411398470401764, 0.06329934298992157, 0.06355676054954529, 0.03573450818657875, 0.18391349911689758, -0.008787810802459717, 0.4924299716949463, -0.0006377846002578735, -0.3819115161895752, -0.00978650152683258, 0.21804355084896088, -0.024103224277496338, 0.10413073748350143, -0.05158243700861931, -0.17408514022827148, 0.22722843289375305, 0.12067815661430359, -0.4538547396659851, -0.15560731291770935, 0.13745997846126556, -0.08636587858200073, -0.04998546838760376, 0.29605355858802795, 0.13266754150390625, -0.40046876668930054, 0.263672411441803, 0.06339256465435028, 0.2465747743844986, -0.043464288115501404, 0.35328879952430725, 0.5143928527832031, 0.04034578427672386, 0.09441466629505157, 0.3127778470516205, -0.33762380480766296, 0.4436108469963074, 0.40202265977859497, -0.21865063905715942, 0.17147111892700195, 0.2326374650001526, 0.12777535617351532, 0.05415057763457298, -0.5133435726165771, -0.3790271580219269, -0.0071794092655181885, -0.21760931611061096, 0.1659855842590332, 0.19492679834365845, 0.28950977325439453, -0.14441435039043427, -0.21332238614559174, -0.1760544776916504, -0.3998658359050751, -0.27827996015548706, 0.18246157467365265, 0.27483874559402466, -0.27178850769996643, 0.018541552126407623, 0.13536083698272705, 0.07232721149921417, 0.07863941788673401, 0.2591555714607239, 0.10606466978788376, -0.26508092880249023, -0.20871829986572266, 0.019814349710941315, 0.21072641015052795, 0.16326087713241577, -0.24815526604652405, 0.3168593645095825, 0.5592113733291626, -0.12576094269752502, -0.12949642539024353, 0.14244981110095978, 0.5412123203277588, 0.5681048631668091, 0.13587890565395355, -0.13001549243927002, -0.12079273164272308, 0.11343783140182495, 0.03188991919159889, 0.39438825845718384, 0.10792658478021622, 0.12040340900421143, 0.0922941118478775, 0.018817419186234474, -0.15192735195159912, 0.056781839579343796, 0.44823727011680603, 0.10527804493904114, -0.37269383668899536, 0.049627240747213364, 0.052634842693805695, 0.0038326457142829895, -0.2834274470806122, 0.20969092845916748, -0.31000834703445435, 0.17822331190109253, 0.1059807687997818, -0.05298158526420593, 0.1000247597694397, 0.03974808007478714, 0.0022026896476745605, -0.07281619310379028, 0.40515464544296265, 0.1268300712108612, 0.3481983244419098, -0.4350050687789917, -0.22280669212341309, -0.36872339248657227, 0.18048050999641418, -0.2374114990234375, 0.08699394762516022, -0.26863712072372437, -0.0609867200255394, -0.28223177790641785, 0.0270236749202013, 0.28300726413726807, 0.36823636293411255, 0.28944680094718933, 0.06687695533037186, -0.4232805371284485, -0.03914180025458336, 0.1709754467010498, -0.18302595615386963, -0.011136885732412338, -0.5396419763565063, -0.07410226762294769, 0.25252893567085266, -0.1007641851902008, -0.13284815847873688, -0.09759342670440674, -0.05959593877196312, 0.3187081813812256, 0.551425576210022, 0.3868027329444885, 0.638907790184021, -0.01251266524195671, -0.166166290640831, -0.145106703042984, -0.14084744453430176, 0.031824741512537, 0.17494674026966095, 0.26986032724380493, 0.5409852266311646, -0.24217206239700317, 0.033934738487005234, -0.23207351565361023, 0.5451724529266357, 0.2076818197965622, 0.004133588634431362, -0.24200041592121124, 0.03875313699245453, -0.3791421353816986, -0.2066306322813034, 0.14037179946899414, 0.1985016167163849, 0.15594850480556488, 0.04639957845211029, -0.07992324233055115, -0.08082173019647598, 0.24976004660129547, -0.620457112789154, -0.09722232818603516, -0.230107843875885, 0.01259942352771759, 0.07245105504989624, -0.3338422477245331, -0.5739365220069885, -0.01210092008113861, 0.4680688977241516, 0.022063611075282097, -0.10907693207263947, 0.1221146434545517, -0.04975418001413345, -0.04877597466111183, -0.08841833472251892, 0.5131634473800659, 0.13880722224712372, -0.10755428671836853, 0.19051052629947662, -0.2664225101470947 ]
https://github.com/huggingface/datasets/issues/6737
Invalid pattern: '**' can only be an entire path component
I couldn't reproduce the issue on my side on MacOS, I guess the issue comes from the recent `fsspec` on Windows. Can you try downgrading to `fsspec==2023.9.2` for now ? It would also be great to investigate this and see if we need a fix in `datasets` or `fsspec`
### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
49
Invalid pattern: '**' can only be an entire path component ### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2 I couldn't reproduce the issue on my side on MacOS, I guess the issue comes from the recent `fsspec` on Windows. Can you try downgrading to `fsspec==2023.9.2` for now ? It would also be great to investigate this and see if we need a fix in `datasets` or `fsspec`
[ -0.3025323152542114, -0.04351227730512619, 0.018823906779289246, 0.2451896071434021, 0.35056746006011963, -0.3282299041748047, 0.2884999215602875, 0.3534834384918213, -0.08888503909111023, 0.029443316161632538, 0.20205074548721313, 0.31757164001464844, -0.21063332259655, 0.37324464321136475, -0.13365481793880463, 0.04266172647476196, -0.05781684070825577, 0.3280687928199768, -0.32682234048843384, -0.01162659376859665, -0.10766308009624481, 0.3213805556297302, -0.04802129790186882, 0.26496538519859314, -0.3798738718032837, 0.12065044045448303, -0.004242178052663803, 0.1513962745666504, -0.1573769599199295, -0.47943994402885437, 0.22643081843852997, -0.23884007334709167, 0.07248059660196304, 0.40660130977630615, -0.0001132836114265956, 0.0961487740278244, 0.372724711894989, 0.11324799060821533, -0.0175153911113739, -0.4247133731842041, -0.4075888991355896, 0.059526555240154266, 0.33065861463546753, -0.10177040100097656, -0.15527600049972534, -0.018240567296743393, -0.018662942573428154, 0.2081705629825592, 0.45115453004837036, 0.6279250383377075, 0.21608421206474304, 0.3266376852989197, -0.0498819537460804, -0.16716916859149933, 0.24360230565071106, 0.1788073182106018, 0.0961822047829628, -0.11894427239894867, 0.0684821680188179, -0.3774791955947876, -0.019959360361099243, -0.103200763463974, 0.051845960319042206, 0.06669171154499054, 0.410637766122818, -0.02603030949831009, 0.33832430839538574, -0.2538397014141083, -0.04551316052675247, 0.28982412815093994, 0.37222400307655334, -0.10929911583662033, -0.17149120569229126, -0.11066623032093048, -0.32939884066581726, -0.08473134785890579, 0.22835874557495117, 0.12039808928966522, -0.14522206783294678, 0.12140800058841705, 0.399002343416214, 0.07173050194978714, -0.11690070480108261, 0.177875354886055, -0.22482149302959442, 0.2305743396282196, -0.08115971833467484, -0.020587846636772156, -0.027149226516485214, -0.21647755801677704, 0.12363235652446747, -0.06596547365188599, -0.04769451543688774, 0.08253098279237747, -0.2185031920671463, 0.0918266773223877, 0.23323330283164978, 0.15893223881721497, -0.0489400289952755, 0.21357032656669617, -0.0037570828571915627, 0.04624021798372269, -0.2037004828453064, 0.33273133635520935, -0.0700862854719162, 0.25548020005226135, 0.1635775864124298, -0.07622598856687546, 0.46080273389816284, 0.10251177102327347, -0.11010187864303589, -0.12719112634658813, -0.08254203200340271, -0.33896997570991516, -0.3130300045013428, -0.09942422807216644, 0.2652220129966736, -0.22461649775505066, -0.6875318288803101, -0.14435593783855438, 0.19121426343917847, -0.13481397926807404, 0.37551721930503845, 0.5115334391593933, 0.1364980936050415, 0.3381473422050476, 0.07115906476974487, 0.28746283054351807, 0.06269435584545135, 0.05873857066035271, -0.1698249727487564, 0.11785441637039185, -0.4913102984428406, -0.0641866996884346, 0.16434578597545624, -0.023270022124052048, 0.1967889666557312, 0.11790304630994797, 0.01643640175461769, -0.10362370312213898, -0.21857674419879913, -0.029545223340392113, -0.198466956615448, 0.31790977716445923, -0.400481253862381, 0.1030140295624733, 0.43197038769721985, -0.0707087516784668, -0.04846160113811493, 0.14485657215118408, -0.057750798761844635, -0.22468632459640503, 0.03979349508881569, 0.1625981628894806, -0.27697980403900146, -0.0031341277062892914, -0.27952736616134644, 0.01767122372984886, -0.006098389625549316, 0.05296913906931877, -0.08862980455160141, -0.02982337772846222, -0.18654944002628326, -0.20576953887939453, 0.11818564683198929, 0.28939005732536316, -0.27563604712486267, -0.24855417013168335, 0.21927213668823242, -0.26408135890960693, 0.14235588908195496, 0.48574158549308777, -0.2825697660446167, 0.3341115713119507, -0.3989379107952118, 0.3110470771789551, 0.1995861530303955, -0.26952099800109863, -0.022941580042243004, 0.2026202231645584, -0.0893138200044632, 0.053797997534275055, 0.21104876697063446, -0.37697285413742065, 0.1310921311378479, -0.13830584287643433, -0.034933388233184814, 0.33327072858810425, 0.2713015079498291, 0.014869561418890953, -0.2738954424858093, -0.29367968440055847, 0.23457634449005127, 0.08807146549224854, 0.2638554871082306, 0.18466080725193024, 0.042434897273778915, -0.08480949699878693, 0.26359865069389343, -0.21709918975830078, -0.11023783683776855, 0.22249525785446167, 0.6043698191642761, 0.1603967249393463, 0.11115793138742447, -0.3697330355644226, -0.06822226196527481, 0.10967392474412918, -0.12965548038482666, -0.14443272352218628, -0.10555537045001984, -0.20629064738750458, -0.1814030110836029, -0.08595036715269089, -0.08624669909477234, -0.027409516274929047, 0.1013331413269043, 0.17131556570529938, -0.1299487054347992, -0.036880120635032654, -0.3820991814136505, 0.3982163369655609, 0.059895820915699005, 0.19570615887641907, 0.009013012051582336, 0.5369556546211243, -0.07042279094457626, -0.25417453050613403, 0.2573549151420593, 0.258861243724823, 0.4574679732322693, -0.2876709997653961, -0.020470082759857178, 0.3851187527179718, 0.24853765964508057, -0.0579545795917511, -0.3240388333797455, 0.2836385667324066, 0.13795562088489532, -0.26152995228767395, -0.26435256004333496, 0.3870713710784912, 0.22768718004226685, -0.21281099319458008, -0.042692892253398895, 0.16719584167003632, 0.03533783555030823, 0.32565367221832275, 0.01912202686071396, 0.07803815603256226, 0.21742698550224304, -0.2956722676753998, -0.11283989250659943, -0.06322403252124786, 0.47988805174827576, -0.1616515964269638, -0.011483602225780487, 0.10260485112667084, -0.2414701133966446, -0.14391368627548218, 0.26051920652389526, -0.009226987138390541, 0.03726464882493019, 0.2668776214122772, -0.01307637244462967, 0.2025102972984314, 0.01757507584989071, 0.08286230266094208, 0.4343366026878357, 0.10561896860599518, -0.3786894679069519, 0.14166447520256042, -0.04778368026018143, -0.2563430070877075, 0.2160196304321289, 0.18141555786132812, 0.047952696681022644, 0.08066890388727188, 0.020965056493878365, 0.14415177702903748, -0.3856593370437622, -0.38950270414352417, 0.12502573430538177, 0.20698241889476776, -0.43459948897361755, -0.04763900861144066, -0.41804009675979614, -0.1399955153465271, -0.09485071152448654, -0.24493972957134247, -0.03160100057721138, -0.0899987444281578, -0.21708790957927704, 0.3374256491661072, -0.05520109832286835, 0.24942044913768768, 0.16438578069210052, 0.25035327672958374, -0.047838255763053894, -0.04106121510267258, -0.33884820342063904, 0.09018348902463913, -0.024056918919086456, 0.0010969527065753937, 0.366824209690094, 0.5284340977668762, -0.09841540455818176, -0.1877078413963318, 0.1702706515789032, -0.2909103035926819, -0.3235419690608978, 0.032478757202625275, 0.07434044778347015, 0.34123462438583374, 0.12798438966274261, 0.13785497844219208, 0.020561348646879196, -0.36590325832366943, 0.32049795985221863, -0.2004961371421814, 0.018600547686219215, 0.047280631959438324, -0.08948840200901031, -0.27248191833496094, -0.27510949969291687, 0.021267622709274292, -0.117896668612957, -0.41841042041778564, 0.17706245183944702, -0.04295874387025833, 0.15760758519172668, 0.04035964980721474, -0.10357265174388885, 0.14966325461864471, -0.22566621005535126, -0.10596761852502823, -0.1029299944639206, 0.03590044006705284, 0.3354576528072357, -0.2011287957429886, -0.4551261067390442, -0.041512805968523026, -0.1074143499135971, 0.207221120595932, -0.3954887390136719, -0.4564046263694763, -0.38466566801071167, -0.6347349882125854, 0.3892679810523987, -0.038323141634464264, 0.14555104076862335, 0.3342360854148865, -0.02978920377790928, -0.07384005934000015, -0.20980378985404968, -0.266915500164032, 0.2629971206188202, -0.12111451476812363, 0.09251909703016281, 0.18833985924720764, 0.47079625725746155, 0.042914267629384995, 0.5769585371017456, 0.10709291696548462, -0.09420192241668701, 0.5535889863967896, -0.07308471202850342, 0.31044793128967285, -0.16201964020729065, -0.3273022472858429, 0.03624474257230759, -0.15624427795410156, 0.05604434013366699, 0.1316211074590683, -0.04065834730863571, 0.12443078309297562, -0.016593391075730324, -0.05865340307354927, -0.061065807938575745, -0.2083018273115158, 0.01823367178440094, -0.17247696220874786, 0.04275782033801079, 0.13043014705181122, 0.1514030396938324, 0.16885311901569366, 0.04788033664226532, 0.3140537440776825, 0.561735987663269, -0.045015059411525726, -0.24460437893867493, -0.3958441913127899, -0.11847536265850067, -0.4052976965904236, 0.14447739720344543, -0.13523799180984497, 0.33148664236068726, -0.2060498297214508, 0.20991921424865723, -0.06980130076408386, -0.143605574965477, 0.7989399433135986, 0.23479437828063965, 0.10967350006103516, 0.29325664043426514, -0.029219046235084534, -0.49409404397010803, -0.13913850486278534, -0.07643214613199234, 0.09374455362558365, 0.23096956312656403, 0.2921329736709595, -0.2787694036960602, -0.2631100118160248, -0.3307287096977234, 0.119919553399086, 0.024884972721338272, -0.23743651807308197, -0.2740933299064636, -0.22670334577560425, -0.3755640983581543, 0.06441468745470047, 0.34581896662712097, 0.2826403081417084, 0.0033362589310854673, 0.14722281694412231, -0.26920029520988464, -0.3057169020175934, 0.12967166304588318, 0.07595899701118469, 0.3447578251361847, -0.23178088665008545, 0.3032297194004059, -0.06437699496746063, -0.030062943696975708, 0.033248428255319595, 0.3038816452026367, -0.26181191205978394, -0.29632043838500977, -0.062254756689071655, -0.07023391872644424, 0.1269739270210266, 0.4029068350791931, -0.26954567432403564, 0.09141387790441513, -0.17758511006832123, 0.07648508995771408, -0.099704809486866, 0.23901912569999695, 0.1196700781583786, 0.25051814317703247, -0.1424153447151184, -0.22715790569782257, 0.39000043272972107, -0.029244564473628998, -0.21203690767288208, 0.21595899760723114, 0.6541876196861267, -0.37240323424339294, 0.6181684732437134, -0.35990533232688904, 0.7185625433921814, 0.11859533190727234, 0.25349581241607666, 0.40042680501937866, -0.03611072152853012, -0.03949455916881561, 0.08834013342857361, 0.08111266046762466, -0.31232061982154846, -0.3641214370727539, 0.027890456840395927, -0.23003359138965607, 0.3034414052963257, 0.17208431661128998, -0.26847320795059204, 0.18777573108673096, -0.09452605247497559, 0.2525177597999573, 0.17966267466545105, 0.19139619171619415, 0.0587712898850441, -0.1682506650686264, -0.2221606820821762, 0.15300728380680084, 0.028567535802721977, 0.2285373955965042, -0.14652884006500244, -0.05220084264874458, 0.18695640563964844, -0.3516020178794861, -0.4087335467338562, 0.15584257245063782, -0.4947386384010315, 0.18154560029506683, 0.37480583786964417, 0.02728971093893051, 0.09266993403434753, 0.1802980750799179, 0.2476702481508255, 0.061930447816848755, -0.15171584486961365, 0.3998635411262512, -0.08732431381940842, 0.05501466989517212, -0.3804342448711395, -0.029364831745624542, 0.23653464019298553, -0.1583462506532669, -0.1485685408115387, 0.004317980259656906, -0.2156606912612915, -0.23832303285598755, 0.15447410941123962, 0.2947676479816437, 0.05120552331209183, -0.2310129851102829, -0.2902810573577881, -0.019546136260032654, 0.2210308015346527, -0.3455812335014343, 0.15135382115840912, 0.38614118099212646, -0.2901502549648285, 0.4195520281791687, 0.04307667911052704, -0.2410980612039566, 0.007344698533415794, 0.1534518301486969, -0.4612673223018646, -0.08604035526514053, 0.5675266981124878, 0.04644088074564934, -0.15063947439193726, -0.24208229780197144, 0.35953056812286377, 0.33650481700897217, -0.1285378336906433, 0.12095760554075241, -0.20288851857185364, -0.24825415015220642, 0.1540738344192505, 0.5451750755310059, 0.30533111095428467, 0.14736995100975037, -0.016981542110443115, -0.7350445985794067, -0.12878121435642242, 0.10257650911808014, 0.03545435890555382, 0.18882238864898682, -0.02696077525615692, 0.18407127261161804, 0.02888519875705242, -0.06440673023462296, -0.3131377100944519, 0.430433452129364, -0.04531379044055939, 0.19447274506092072, -0.027598366141319275, -0.29015815258026123, 0.4894515872001648, -0.08246912062168121, 0.023458024486899376, 0.18609251081943512, -0.0888926237821579, -0.1797890067100525, -0.3610111176967621, 0.14302776753902435, 0.3198821246623993, -0.10850062966346741, 0.026121094822883606, 0.001987999305129051, 0.01835549995303154, -0.06345954537391663, 0.03819900378584862, 0.2611909508705139, -0.23891471326351166, 0.0724310651421547, 0.1200556755065918, -0.07928762584924698, 0.012931771576404572, 0.006344124674797058, -0.23375624418258667, 0.15354910492897034, 0.14128592610359192, 0.16894474625587463, -0.34040799736976624, 0.020710356533527374, 0.13555894792079926, 0.0019152015447616577, 0.06655766814947128, 0.2305157482624054, -0.15398725867271423, -0.34726887941360474, -0.09936138987541199, 0.15271557867527008, 0.28133898973464966, 0.22387345135211945, -0.28185898065567017, 0.18605855107307434, 0.6457948684692383, 0.19570377469062805, -0.17544499039649963, -0.06109476834535599, 0.19747646152973175, 0.277551531791687, 0.19265997409820557, 0.12608182430267334, 0.25070932507514954, -0.4981691539287567, 0.19245684146881104, 0.12224935740232468, 0.35161638259887695, -0.04349198937416077, 0.2249622941017151, 0.18596568703651428, -0.12985111773014069, 0.0549454428255558, 0.3967759609222412, 0.2645931839942932, -0.017757058143615723, 0.8174810409545898, -0.28722915053367615, 0.10786986351013184, -0.08056344091892242, -0.04068508371710777, 0.15893974900245667, -0.22992976009845734, -0.139527827501297, 0.013943776488304138, 0.11320924758911133, -0.15364223718643188, -0.11077070236206055, 0.2891794443130493, -0.3821665644645691, -0.18776844441890717, 0.07578983157873154, 0.02144700102508068, -0.1997230052947998, -0.2386152744293213, 0.02288394421339035, 0.011343412101268768, 0.03635265678167343, -0.0670238733291626, 0.013449981808662415, -0.1163882315158844, 0.15026246011257172, 0.023586947470903397, -0.054569363594055176, -0.29890984296798706, -0.011369206011295319, 0.18379276990890503, 0.13969041407108307, -0.14556103944778442, 0.3376075327396393, -0.16917254030704498, -0.1827978789806366, 0.19605332612991333, 0.17058977484703064, 0.4282589256763458, 0.5244581699371338, -0.03852985054254532, -0.09839321672916412, -0.489120751619339, -0.08657292276620865, 0.03614481911063194, 0.16174641251564026, -0.03943357616662979, 0.3486795425415039, 0.47133052349090576, 0.1233692616224289, -0.24531234800815582, 0.20514367520809174, -0.03396281972527504, 0.06964688003063202, -0.3255888819694519, 0.19663569331169128, 0.03341090679168701, 0.022716999053955078, -0.20144465565681458, 0.017120204865932465, -0.3794233798980713, -0.0389518178999424, 0.31003138422966003, -0.09064795076847076, 0.17307186126708984, -0.1108780950307846, 0.06611303985118866, 0.02733542025089264, 0.09039857983589172, 0.23056577146053314, 0.2563493251800537, -0.23215386271476746, -0.2304874211549759, -0.6446479558944702, -0.033168040215969086, -0.2666333317756653, -0.06122361123561859, 0.2052604854106903, -0.05281943082809448, -0.46467140316963196, -0.10654531419277191, 0.22578850388526917, 0.2561832368373871, -0.10960135608911514, -0.11695972084999084, -0.39757364988327026, 0.258073091506958, -0.10648433864116669, 0.1861630082130432, 0.12572282552719116, -0.38459086418151855, 0.11720110476016998, 0.14812038838863373, 0.10650775581598282, -0.010258939117193222, -0.11486000567674637, -0.4286036491394043, -0.17916174232959747, 0.21300679445266724, 0.1740197390317917, 0.0966375470161438, -0.0016322284936904907, 0.06920397281646729, -0.177647203207016, -0.39569222927093506, -0.3020488917827606, 0.11706489324569702, 0.10239122807979584, 0.3601517677307129, -0.23176269233226776, -0.024144794791936874, -0.35106971859931946, 0.24269352853298187, -0.008533768355846405, -0.3360781967639923, -0.27160975337028503, 0.443037211894989, -0.1654447317123413, 0.0160998422652483, -0.0015637865290045738, 0.2493237853050232, -0.11908507347106934, 0.10900236666202545, -0.1768871545791626, -0.4126441478729248, 0.7708541750907898, -0.8647271394729614, -0.5014863014221191, -0.10792799293994904, 0.14318996667861938, 0.06724141538143158, -0.1888895332813263, -0.37246984243392944, -0.2668190896511078, 0.11162616312503815, 0.08816500008106232, -0.403132826089859, -0.15607944130897522, 0.033749986439943314, -0.09381302446126938, -0.13099992275238037, 0.21754683554172516, 0.4346500337123871, -0.3319960832595825, 0.09846948087215424, -0.4843049645423889 ]
https://github.com/huggingface/datasets/issues/6737
Invalid pattern: '**' can only be an entire path component
I had the same issue! Downgrading to fsspec from 2023.10.0 to 2023.9.2 solved it for me. (env: python 3.11.7, datasets version: 2.15.0, Windows 10 22H2, Build 19045.4170) Thanks a lot!
### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
30
Invalid pattern: '**' can only be an entire path component ### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2 I had the same issue! Downgrading to fsspec from 2023.10.0 to 2023.9.2 solved it for me. (env: python 3.11.7, datasets version: 2.15.0, Windows 10 22H2, Build 19045.4170) Thanks a lot!
[ -0.2605041265487671, -0.1179552972316742, 0.03574439510703087, 0.3273494243621826, 0.35942989587783813, -0.3289887607097626, 0.3662753999233246, 0.33789050579071045, -0.1032349169254303, 0.068104088306427, 0.18261969089508057, 0.3011226952075958, -0.12948967516422272, 0.44747740030288696, -0.053804486989974976, -0.04797264188528061, -0.10190250724554062, 0.36084792017936707, -0.3096877932548523, 0.032760053873062134, -0.09439292550086975, 0.34596163034439087, -0.09942422807216644, 0.3005240559577942, -0.4326830506324768, 0.13972525298595428, 0.029455294832587242, 0.1373864710330963, -0.1115732416510582, -0.5213574767112732, 0.28838199377059937, -0.27185457944869995, 0.14782625436782837, 0.3704741597175598, -0.00011112511128885671, 0.0689304918050766, 0.37752920389175415, 0.10868488252162933, -0.017142942175269127, -0.38097161054611206, -0.36147111654281616, 0.030881816521286964, 0.3776462972164154, -0.07203840464353561, -0.22746095061302185, -0.07655620574951172, -0.07450791448354721, 0.2395821213722229, 0.461505651473999, 0.5237792730331421, 0.2441326528787613, 0.3706042766571045, -0.024581527337431908, -0.22307410836219788, 0.22240066528320312, 0.048254966735839844, 0.06640952080488205, -0.16600044071674347, 0.07511462271213531, -0.30434074997901917, -0.08949669450521469, -0.10896739363670349, 0.08977121114730835, 0.10819724202156067, 0.46829840540885925, -0.01860271766781807, 0.34360983967781067, -0.23520979285240173, 0.02217303402721882, 0.3089476227760315, 0.43776029348373413, -0.16240933537483215, -0.126867413520813, -0.1090080589056015, -0.3061385750770569, -0.13996684551239014, 0.17768484354019165, 0.015787295997142792, -0.10581471025943756, 0.10750970244407654, 0.44968101382255554, 0.09531229734420776, -0.1145668476819992, 0.08937881886959076, -0.1915765404701233, 0.2665172815322876, -0.1113399937748909, -0.012535512447357178, -0.1013219952583313, -0.2103969305753708, 0.10173758864402771, -0.1263658106327057, 0.002208668738603592, 0.13135609030723572, -0.20227132737636566, 0.08551980555057526, 0.20655596256256104, 0.13527286052703857, -0.017158377915620804, 0.3301777243614197, 0.014901917427778244, 0.12956950068473816, -0.14128024876117706, 0.259538859128952, -0.05598612502217293, 0.2806362211704254, 0.15669861435890198, -0.03781198710203171, 0.4601104259490967, 0.19049063324928284, -0.09471665322780609, -0.11570035666227341, -0.07531770318746567, -0.24917079508304596, -0.20277811586856842, -0.10974124819040298, 0.2501637935638428, -0.23385319113731384, -0.6253257393836975, -0.13723717629909515, 0.1349569857120514, -0.13117475807666779, 0.35383161902427673, 0.498787522315979, 0.10823642462491989, 0.291770339012146, 0.06623565405607224, 0.2395676076412201, 0.09368857741355896, 0.02929917722940445, -0.24432015419006348, 0.09340474009513855, -0.4451932907104492, -0.04514557123184204, 0.17683850228786469, -0.09867127239704132, 0.22620443999767303, 0.0638185665011406, 0.04986962676048279, -0.0766139104962349, -0.224286288022995, -0.005850620102137327, -0.16979268193244934, 0.28330424427986145, -0.32738471031188965, 0.11355792731046677, 0.41837379336357117, -0.19720526039600372, 0.002029217779636383, 0.08278838545084, -0.010202988982200623, -0.24305130541324615, 0.0745970755815506, 0.1858968883752823, -0.2649507522583008, 0.011220438405871391, -0.29988738894462585, -0.03814837709069252, 0.03306575119495392, 0.022191088646650314, -0.12281348556280136, 0.02319454774260521, -0.18690773844718933, -0.19578275084495544, 0.2321060299873352, 0.33831632137298584, -0.27290409803390503, -0.27876704931259155, 0.2263432890176773, -0.274728000164032, 0.1345820277929306, 0.41976234316825867, -0.2910768389701843, 0.3032875061035156, -0.42480897903442383, 0.36362606287002563, 0.14672969281673431, -0.25847694277763367, -0.07751019299030304, 0.23080573976039886, -0.13256026804447174, 0.09879907220602036, 0.2414226233959198, -0.3414464294910431, 0.16678501665592194, -0.17248643934726715, 0.038661710917949677, 0.33629584312438965, 0.27514979243278503, 0.029870236292481422, -0.31984469294548035, -0.24370266497135162, 0.18206599354743958, 0.023762788623571396, 0.2937015891075134, 0.19463439285755157, 0.024241819977760315, -0.05017238110303879, 0.2778562903404236, -0.1606220304965973, -0.014920990914106369, 0.18570928275585175, 0.5381190180778503, 0.1578122079372406, 0.10486903786659241, -0.37694886326789856, -0.1438252329826355, 0.13819533586502075, -0.20038680732250214, -0.1248759776353836, -0.023631110787391663, -0.21720002591609955, -0.2687539756298065, -0.16057419776916504, -0.18787327408790588, -0.0885409265756607, 0.15398871898651123, 0.16346657276153564, -0.13960063457489014, -0.035446107387542725, -0.37215787172317505, 0.401157021522522, 0.06032964587211609, 0.2039978802204132, -0.009415524080395699, 0.5967615246772766, -0.051806360483169556, -0.2494981586933136, 0.25642457604408264, 0.2871110141277313, 0.473375529050827, -0.23771849274635315, -0.039874184876680374, 0.3424173891544342, 0.1608090102672577, -0.005624271929264069, -0.3341567814350128, 0.21400736272335052, 0.14459273219108582, -0.28044232726097107, -0.2765292823314667, 0.28981661796569824, 0.2317870557308197, -0.27406609058380127, 0.05333360657095909, 0.13771525025367737, 0.05318794026970863, 0.32226815819740295, 0.05335160344839096, 0.03965692222118378, 0.21499788761138916, -0.2677823603153229, -0.16706964373588562, -0.034828171133995056, 0.425556480884552, -0.0886358916759491, 0.10897345840930939, 0.11718403548002243, -0.25876712799072266, -0.175086110830307, 0.22272956371307373, 0.033320847898721695, 0.02554505318403244, 0.2044004201889038, -0.134940505027771, 0.20267608761787415, 0.051103733479976654, 0.16631664335727692, 0.3823760747909546, 0.16975198686122894, -0.3155156075954437, 0.13450942933559418, -0.037876758724451065, -0.22466440498828888, 0.20194363594055176, 0.1941722333431244, 0.14896143972873688, 0.15153908729553223, -0.01826365664601326, 0.13072694838047028, -0.4087492525577545, -0.34904944896698, 0.06626270711421967, 0.16516540944576263, -0.4535279870033264, -0.09230995178222656, -0.3982457220554352, -0.1344420611858368, -0.08980986475944519, -0.29558950662612915, 0.007202150300145149, -0.096652090549469, -0.2257576435804367, 0.2960473299026489, -0.016333479434251785, 0.2784949839115143, 0.14396919310092926, 0.2755764424800873, -0.10449829697608948, -0.025417378172278404, -0.3605737090110779, 0.13026925921440125, -0.10713634639978409, 0.02402413636445999, 0.3293912410736084, 0.563109278678894, -0.042737364768981934, -0.15662114322185516, 0.19562946259975433, -0.2985667586326599, -0.3137185573577881, 0.07201158255338669, 0.07303851842880249, 0.3405231535434723, 0.15458372235298157, 0.15110750496387482, 0.041914090514183044, -0.2992558777332306, 0.36728906631469727, -0.17499861121177673, 0.037319913506507874, 0.07851188629865646, -0.09232642501592636, -0.2381538599729538, -0.21684807538986206, -0.015974611043930054, -0.12155482918024063, -0.4286637306213379, 0.14358274638652802, -0.031207792460918427, 0.10949744284152985, 0.011467529460787773, -0.1442219763994217, 0.1883729100227356, -0.19569410383701324, -0.10274346172809601, -0.08371235430240631, 0.038761239498853683, 0.3080505430698395, -0.25711333751678467, -0.426893025636673, -0.03257548436522484, -0.12163744866847992, 0.1983368694782257, -0.45250576734542847, -0.35343068838119507, -0.4250236749649048, -0.6132418513298035, 0.29981836676597595, -0.0050875283777713776, 0.09609723091125488, 0.3521735966205597, -0.014727747067809105, -0.10769283771514893, -0.1929180920124054, -0.27354925870895386, 0.2972164452075958, -0.15987089276313782, 0.02683664858341217, 0.16203072667121887, 0.42743366956710815, 0.09719575941562653, 0.5411455631256104, 0.16919969022274017, -0.09384137392044067, 0.5885686874389648, -0.05942337214946747, 0.23229122161865234, -0.2343428134918213, -0.3097977042198181, -0.10119249671697617, -0.2166241705417633, 0.12762583792209625, 0.10717743635177612, -0.03352496400475502, 0.17905938625335693, -0.02722770906984806, -0.12214721739292145, -0.010297898203134537, -0.1944591999053955, -0.07708266377449036, -0.12118233740329742, 0.06824138015508652, 0.16438059508800507, 0.08388703316450119, 0.15813449025154114, 0.035085029900074005, 0.29643213748931885, 0.4765656590461731, -0.037468649446964264, -0.21529927849769592, -0.3041671812534332, -0.10744917392730713, -0.42608970403671265, 0.18461480736732483, -0.10170062631368637, 0.25154411792755127, -0.1828927844762802, 0.1730879843235016, -0.04305599629878998, -0.11353050917387009, 0.7388790845870972, 0.18361859023571014, 0.15767493844032288, 0.253864049911499, -0.08879919350147247, -0.47081953287124634, -0.12081307172775269, -0.06126198172569275, 0.03497806936502457, 0.1815548688173294, 0.3353620171546936, -0.34418556094169617, -0.3142196834087372, -0.21711820363998413, 0.09454391151666641, -0.001212824136018753, -0.17255409061908722, -0.29671981930732727, -0.2342206835746765, -0.39646944403648376, 0.10559650510549545, 0.34532609581947327, 0.3053075075149536, 0.0006908448413014412, 0.0817008912563324, -0.21200428903102875, -0.2796529233455658, 0.06807887554168701, 0.07034185528755188, 0.3720585107803345, -0.18497732281684875, 0.28772419691085815, 0.006297573447227478, -0.0016345195472240448, 0.0176666509360075, 0.258720338344574, -0.22343400120735168, -0.2769870460033417, -0.08498688042163849, -0.06738981604576111, 0.18022066354751587, 0.3904888331890106, -0.2516500651836395, 0.12629514932632446, -0.1871492713689804, 0.08295586705207825, -0.0884382426738739, 0.12956367433071136, 0.1216631606221199, 0.18634513020515442, -0.07997804135084152, -0.25387224555015564, 0.4442709982395172, -0.060906119644641876, -0.1910279095172882, 0.16343483328819275, 0.7162913084030151, -0.4014679193496704, 0.5789797902107239, -0.3850674033164978, 0.6935863494873047, 0.1648845374584198, 0.22879160940647125, 0.4104123115539551, -0.0278179794549942, -0.04941246658563614, 0.20220546424388885, 0.06026860699057579, -0.40580037236213684, -0.38812074065208435, 0.019251970574259758, -0.2072984129190445, 0.28646615147590637, 0.1046343520283699, -0.22789494693279266, 0.24313780665397644, -0.12165772914886475, 0.25905391573905945, 0.17107506096363068, 0.22565466165542603, 0.037608131766319275, -0.15979821979999542, -0.24930673837661743, 0.1660192310810089, -0.0015447288751602173, 0.2597517669200897, -0.12808823585510254, -0.11740905046463013, 0.20507952570915222, -0.40064382553100586, -0.3298901319503784, 0.14636683464050293, -0.4416581988334656, 0.15717773139476776, 0.31229180097579956, -0.023741967976093292, 0.1212300956249237, 0.17217637598514557, 0.18411511182785034, 0.05093700438737869, -0.17150412499904633, 0.35266152024269104, -0.11325239390134811, 0.017688656225800514, -0.4195781648159027, 0.006295350380241871, 0.23212134838104248, -0.1932479739189148, -0.1714186668395996, -0.0019794106483459473, -0.20193451642990112, -0.22543266415596008, 0.17005321383476257, 0.27431195974349976, 0.14034977555274963, -0.25397759675979614, -0.26509737968444824, -0.0024809464812278748, 0.15526248514652252, -0.3936065435409546, 0.18032218515872955, 0.3395017981529236, -0.34830155968666077, 0.274806946516037, 0.20700068771839142, -0.21904854476451874, 0.04691476747393608, 0.20466262102127075, -0.45853176712989807, -0.009663378819823265, 0.6647289991378784, 0.06561516225337982, -0.17201562225818634, -0.23997575044631958, 0.3290748596191406, 0.38634103536605835, -0.22322165966033936, 0.13994812965393066, -0.18147949874401093, -0.20126086473464966, 0.11748937517404556, 0.5714302659034729, 0.28578490018844604, 0.09587285667657852, -0.017849255353212357, -0.6587508916854858, -0.15220241248607635, 0.14575868844985962, 0.034067876636981964, 0.23408493399620056, -0.03813091665506363, 0.24874664843082428, 0.060889072716236115, -0.006254415959119797, -0.3467058837413788, 0.4583743214607239, -0.11665167659521103, 0.18912287056446075, -0.04998047649860382, -0.29623448848724365, 0.441453218460083, -0.012280638329684734, 0.05144289880990982, 0.2797499895095825, -0.09777595102787018, -0.23579975962638855, -0.31739526987075806, 0.11679380387067795, 0.3058105707168579, -0.16818515956401825, 0.004690411500632763, 0.05847914516925812, 0.0076858121901750565, -0.063176728785038, 0.08263754844665527, 0.24898892641067505, -0.20026995241641998, 0.07682912796735764, 0.18922291696071625, -0.06537168473005295, -0.02250988595187664, 0.004665251821279526, -0.2228512167930603, 0.09953416138887405, 0.10895399749279022, 0.09915308654308319, -0.3210771977901459, 0.023822903633117676, 0.17808708548545837, 0.011023111641407013, 0.1249096691608429, 0.18282806873321533, -0.0993695929646492, -0.3885362148284912, -0.10204337537288666, 0.1736709177494049, 0.24184513092041016, 0.16290515661239624, -0.2790755331516266, 0.18508155643939972, 0.5549813508987427, 0.21336466073989868, -0.23312558233737946, -0.04165853559970856, 0.1897953450679779, 0.21256723999977112, 0.18390533328056335, 0.07873515784740448, 0.2603251039981842, -0.41742202639579773, 0.11736869812011719, 0.1587180495262146, 0.3899725675582886, -0.12123218178749084, 0.18525004386901855, 0.13800442218780518, -0.1423252522945404, 0.09028099477291107, 0.40701669454574585, 0.2310859113931656, -0.05486752837896347, 0.7812199592590332, -0.2702002227306366, 0.10638788342475891, -0.19672182202339172, -0.026900995522737503, 0.10382485389709473, -0.29592132568359375, -0.09840349853038788, 0.0773058757185936, 0.06092327833175659, -0.1790030300617218, -0.11267153918743134, 0.34172746539115906, -0.335109680891037, -0.09331521391868591, -0.004586687311530113, 0.059498660266399384, -0.24057254195213318, -0.2282915860414505, -0.02446512132883072, -0.041805967688560486, 0.029128000140190125, -0.08696886897087097, 0.02532101236283779, -0.07929399609565735, 0.16872809827327728, -0.039905428886413574, -0.03002219647169113, -0.27116450667381287, -0.03696353733539581, 0.1895124912261963, 0.12005159258842468, -0.16562287509441376, 0.3179580867290497, -0.13717028498649597, -0.16906322538852692, 0.15327000617980957, 0.18348844349384308, 0.3746945858001709, 0.45731908082962036, -0.056502778083086014, -0.10322121530771255, -0.45002564787864685, -0.12693481147289276, 0.020417828112840652, 0.1376425325870514, 0.005039915442466736, 0.27980631589889526, 0.47441548109054565, 0.15035183727741241, -0.2812902629375458, 0.14552117884159088, -0.014294158667325974, 0.1251961886882782, -0.3311823606491089, 0.30058175325393677, 0.0071234386414289474, 0.00912843644618988, -0.1898268163204193, -0.012280702590942383, -0.3593885004520416, 0.017561156302690506, 0.3076941668987274, -0.08244553208351135, 0.18468445539474487, -0.12921461462974548, 0.07841513305902481, 0.0096015315502882, 0.10122758150100708, 0.1877676248550415, 0.1252032071352005, -0.2995811700820923, -0.21238531172275543, -0.7209382653236389, -0.011496350169181824, -0.18744376301765442, -0.005108673125505447, 0.2600054442882538, -0.005100622773170471, -0.4527374804019928, -0.12286359071731567, 0.22747331857681274, 0.26562824845314026, -0.07356609404087067, -0.08647660911083221, -0.3666864037513733, 0.23630137741565704, -0.07103279232978821, 0.18407616019248962, 0.09536220878362656, -0.3896953761577606, 0.05467291176319122, 0.17484025657176971, 0.13889756798744202, 0.011805196292698383, -0.0914287269115448, -0.35717645287513733, -0.2349075973033905, 0.193221777677536, 0.13585349917411804, 0.1813713163137436, -0.04257923364639282, 0.12422444671392441, -0.11871291697025299, -0.36425304412841797, -0.25612252950668335, 0.09760499000549316, 0.07407417893409729, 0.3513767421245575, -0.15930213034152985, -0.0795726627111435, -0.3977659046649933, 0.2103690654039383, -0.011914301663637161, -0.24481484293937683, -0.3332214057445526, 0.4114258587360382, -0.1339842677116394, -0.005113375838845968, -0.02631925791501999, 0.25951114296913147, -0.1593881994485855, 0.05278109014034271, -0.1631639003753662, -0.4631425142288208, 0.8112621903419495, -0.8483594059944153, -0.5266152024269104, -0.12158661335706711, 0.1850978136062622, 0.11011472344398499, -0.25030264258384705, -0.2717569172382355, -0.2291315197944641, 0.12591256201267242, 0.06051495671272278, -0.39440810680389404, -0.07158026099205017, -0.0116527508944273, -0.05210719257593155, -0.10887761414051056, 0.20889495313167572, 0.41679853200912476, -0.28517648577690125, 0.02451377734541893, -0.512821614742279 ]
https://github.com/huggingface/datasets/issues/6737
Invalid pattern: '**' can only be an entire path component
Ubuntu 20.04 had the same issue python 3.9 File "/home/delight-gpu/Workspace2/azuryl/FLAP/main.py", line 112, in <module> main() File "/home/delight-gpu/Workspace2/azuryl/FLAP/main.py", line 85, in main prune_flap(args, model, tokenizer, device) File "/home/delight-gpu/Workspace2/azuryl/FLAP/lib/prune.py", line 294, in prune_flap dataloader, _ = get_loaders("wikitext2", nsamples=args.nsamples,seed=args.seed,seqlen=model.seqlen,tokenizer=tokenizer) File "/home/delight-gpu/Workspace2/azuryl/FLAP/lib/data.py", line 159, in get_loaders return get_wikitext2(nsamples, seed, seqlen, tokenizer) File "/home/delight-gpu/Workspace2/azuryl/FLAP/lib/data.py", line 79, in get_wikitext2 traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 1767, in load_dataset builder_instance = load_dataset_builder( File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 1498, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 1215, in dataset_module_factory raise e1 from None File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 1192, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 765, in get_module else get_data_patterns_in_dataset_repository(hfh_dataset_info, self.data_dir) File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/data_files.py", line 675, in get_data_patterns_in_dataset_repository return _get_data_files_patterns(resolver) File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/data_files.py", line 236, in _get_data_files_patterns data_files = pattern_resolver(pattern) File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/data_files.py", line 486, in _resolve_single_pattern_in_dataset_repository glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/fsspec/spec.py", line 606, in glob pattern = glob_translate(path + ("/" if ends_with_sep else "")) File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/fsspec/utils.py", line 734, in glob_translate raise ValueError( ValueError: Invalid pattern: '**' can only be an entire path component
### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
169
Invalid pattern: '**' can only be an entire path component ### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2 Ubuntu 20.04 had the same issue python 3.9 File "/home/delight-gpu/Workspace2/azuryl/FLAP/main.py", line 112, in <module> main() File "/home/delight-gpu/Workspace2/azuryl/FLAP/main.py", line 85, in main prune_flap(args, model, tokenizer, device) File "/home/delight-gpu/Workspace2/azuryl/FLAP/lib/prune.py", line 294, in prune_flap dataloader, _ = get_loaders("wikitext2", nsamples=args.nsamples,seed=args.seed,seqlen=model.seqlen,tokenizer=tokenizer) File "/home/delight-gpu/Workspace2/azuryl/FLAP/lib/data.py", line 159, in get_loaders return get_wikitext2(nsamples, seed, seqlen, tokenizer) File "/home/delight-gpu/Workspace2/azuryl/FLAP/lib/data.py", line 79, in get_wikitext2 traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 1767, in load_dataset builder_instance = load_dataset_builder( File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 1498, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 1215, in dataset_module_factory raise e1 from None File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 1192, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/load.py", line 765, in get_module else get_data_patterns_in_dataset_repository(hfh_dataset_info, self.data_dir) File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/data_files.py", line 675, in get_data_patterns_in_dataset_repository return _get_data_files_patterns(resolver) File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/data_files.py", line 236, in _get_data_files_patterns data_files = pattern_resolver(pattern) File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/datasets/data_files.py", line 486, in _resolve_single_pattern_in_dataset_repository glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/fsspec/spec.py", line 606, in glob pattern = glob_translate(path + ("/" if ends_with_sep else "")) File "/home/azuryl/anaconda3/envs/flap/lib/python3.9/site-packages/fsspec/utils.py", line 734, in glob_translate raise ValueError( ValueError: Invalid pattern: '**' can only be an entire path component
[ -0.1276732236146927, -0.20990151166915894, 0.05513617768883705, 0.28894224762916565, 0.21175365149974823, -0.3680422306060791, 0.4355716407299042, 0.422148197889328, -0.15210570394992828, 0.04226110875606537, 0.14200562238693237, 0.35292762517929077, -0.1570034921169281, 0.39865222573280334, -0.0852656215429306, -0.11268027126789093, -0.054621659219264984, 0.3904743194580078, -0.14515390992164612, 0.07743202149868011, -0.07907558977603912, 0.39916834235191345, -0.14751288294792175, 0.4312528967857361, -0.4418729245662689, 0.07984817773103714, 0.10395383834838867, 0.07976926118135452, -0.071840800344944, -0.5024265646934509, 0.3573610186576843, -0.22440096735954285, 0.07247938960790634, 0.35915446281433105, -0.00011882572289323434, 0.13107943534851074, 0.2520166039466858, 0.08304957300424576, -0.13095402717590332, -0.33214932680130005, -0.21480444073677063, 0.1903393715620041, 0.3246458172798157, -0.15234343707561493, -0.15108025074005127, -0.1100098267197609, -0.31044790148735046, 0.20725902915000916, 0.46845656633377075, 0.5644078850746155, 0.14236724376678467, 0.4384234547615051, 0.00209253653883934, -0.14428769052028656, 0.332683265209198, -0.09658175706863403, 0.003879046067595482, -0.0835990160703659, 0.18703976273536682, -0.2530253827571869, -0.10924168676137924, -0.11703468859195709, 0.13005681335926056, 0.07956531643867493, 0.3852708339691162, 0.06054135039448738, 0.33898258209228516, -0.2447606325149536, 0.037129949778318405, 0.3831217885017395, 0.3568459451198578, -0.21824365854263306, -0.08990609645843506, -0.21077969670295715, -0.2685438096523285, 0.008180489763617516, 0.19379332661628723, 0.11463673412799835, -0.18003851175308228, 0.2517155408859253, 0.254965603351593, 0.18062056601047516, -0.152673602104187, 0.09866848587989807, -0.1113044023513794, 0.4328756332397461, 0.0038879711646586657, 0.06578333675861359, -0.07800541818141937, -0.12867841124534607, 0.23112696409225464, -0.0651337206363678, -0.018782537430524826, 0.14017117023468018, -0.22861497104167938, 0.022928684949874878, 0.10244018584489822, 0.13168609142303467, 0.07719095796346664, 0.2941179871559143, 0.005431411787867546, 0.11312554031610489, -0.016114113852381706, 0.2685413062572479, -0.05304938927292824, 0.16496019065380096, 0.06968225538730621, -0.06426598131656647, 0.281596302986145, 0.21581138670444489, -0.0402844175696373, -0.06786025315523148, 0.03445469215512276, -0.13870000839233398, -0.22634351253509521, -0.21742403507232666, 0.23601268231868744, -0.16084842383861542, -0.6625658273696899, -0.18996579945087433, -0.118336983025074, -0.05199287086725235, 0.45728063583374023, 0.42141303420066833, 0.12707661092281342, 0.4244571626186371, 0.11104236543178558, 0.25201931595802307, 0.17042627930641174, 0.08450260013341904, -0.2384248822927475, 0.17525614798069, -0.35017499327659607, -0.01490958034992218, 0.035704877227544785, -0.08243259787559509, 0.21074286103248596, 0.21798889338970184, 0.02899884432554245, -0.1207645833492279, -0.14283134043216705, -0.12008461356163025, -0.051075808703899384, 0.16186745464801788, -0.4613777697086334, 0.15166310966014862, 0.45055049657821655, -0.12605348229408264, -0.04096996784210205, 0.0672403946518898, -0.19541671872138977, -0.3551534414291382, 0.017044495791196823, 0.1420344114303589, -0.20662015676498413, 0.06530456244945526, -0.14114198088645935, -0.05586293712258339, 0.08083774894475937, -0.08358099311590195, -0.14573457837104797, -0.0440070778131485, -0.15253718197345734, -0.23463214933872223, 0.3313482701778412, 0.1820695996284485, -0.25881755352020264, -0.2684824466705322, 0.22369970381259918, -0.16760241985321045, 0.22014501690864563, 0.3591727018356323, -0.4847714304924011, 0.5036065578460693, -0.529294490814209, 0.4759594798088074, 0.18163201212882996, -0.17699488997459412, -0.1890055239200592, 0.17831498384475708, -0.1673365831375122, 0.16358239948749542, 0.16185246407985687, -0.36448320746421814, 0.01291770301759243, -0.19818392395973206, -0.028047338128089905, 0.2689288258552551, 0.3872533440589905, 0.06883645057678223, -0.30088239908218384, -0.32126662135124207, 0.21223026514053345, 0.01473316177725792, 0.274807333946228, 0.09462528675794601, -0.05330579727888107, 0.13142792880535126, 0.3768061697483063, -0.1948380172252655, -0.04022469371557236, 0.22936715185642242, 0.4839475154876709, 0.10097238421440125, 0.12509596347808838, -0.3853190541267395, -0.18508675694465637, 0.1977159082889557, -0.3302777111530304, -0.2972176969051361, -0.1101430207490921, -0.26187026500701904, -0.42948997020721436, -0.11514093726873398, -0.22601963579654694, -0.21071642637252808, 0.11434119939804077, 0.27745091915130615, 0.003687705844640732, -0.007768813520669937, -0.453884482383728, 0.40511420369148254, 0.03783369064331055, 0.1797187626361847, 0.14109763503074646, 0.6212792992591858, -0.037398241460323334, -0.2789327800273895, 0.1574174463748932, 0.27510684728622437, 0.3871561586856842, -0.24437181651592255, -0.04445445165038109, 0.4829387962818146, 0.13727374374866486, -0.057339563965797424, -0.36992961168289185, -0.03923366963863373, 0.07570888847112656, -0.12172459065914154, -0.39734187722206116, 0.2196871042251587, 0.2275846153497696, -0.19860023260116577, 0.06251782178878784, 0.21866375207901, -0.011843807995319366, 0.24141746759414673, 0.04635993391275406, -0.009241688996553421, 0.08944624662399292, -0.32876911759376526, -0.021133465692400932, -0.03128303959965706, 0.3668336868286133, -0.15983250737190247, 0.2216884046792984, 0.08574549108743668, -0.10410131514072418, -0.14167404174804688, 0.29640641808509827, 0.0491037555038929, 0.1422777622938156, 0.19076666235923767, -0.058701418340206146, 0.15294614434242249, -0.026614250615239143, 0.22328852117061615, 0.4032220244407654, 0.09696250408887863, -0.2937644422054291, -0.007307453081011772, -0.022601168602705002, -0.17543844878673553, 0.26751235127449036, 0.2457071840763092, 0.14618198573589325, 0.24182990193367004, -0.014382237568497658, 0.03262147307395935, -0.39692291617393494, -0.33322060108184814, 0.22842015326023102, 0.23677891492843628, -0.380631685256958, -0.05157959461212158, -0.3552786409854889, 0.04923982918262482, -0.01910785585641861, -0.35031643509864807, 0.05008033290505409, -0.10108545422554016, -0.21234726905822754, 0.268057256937027, -0.0222732312977314, 0.284249871969223, 0.05836211517453194, 0.20722763240337372, -0.03329966589808464, -0.10696504265069962, -0.40654507279396057, 0.18761523067951202, -0.22408154606819153, -0.025375643745064735, 0.20593036711215973, 0.45168808102607727, -0.04060778766870499, -0.09617874771356583, 0.03529403731226921, -0.29798662662506104, -0.27340662479400635, 0.12715497612953186, 0.11093680560588837, 0.21028296649456024, 0.16114221513271332, 0.18148259818553925, -0.1390313357114792, -0.42765092849731445, 0.42254555225372314, -0.22629082202911377, -0.03545652702450752, 0.07233812659978867, 0.024133028462529182, -0.09430669993162155, -0.2235967516899109, -0.06601432710886002, -0.15484793484210968, -0.40803852677345276, 0.14065566658973694, -0.10560862720012665, 0.13961604237556458, 0.0013651587069034576, -0.16687828302383423, 0.2953459918498993, -0.25258803367614746, -0.09474863111972809, -0.0385526679456234, -0.1567884385585785, 0.31745579838752747, -0.08623189479112625, -0.3353617489337921, -0.11526145040988922, -0.20360644161701202, 0.19699923694133759, -0.15335802733898163, -0.31444263458251953, -0.5727209448814392, -0.5700323581695557, 0.3454523980617523, -0.08836403489112854, 0.08536996692419052, 0.35470402240753174, -0.045482780784368515, -0.0053636785596609116, -0.19120916724205017, -0.2181447297334671, 0.41585078835487366, -0.1736709475517273, 0.06511468440294266, 0.2795381546020508, 0.31425681710243225, 0.24983486533164978, 0.5798680186271667, 0.2515026330947876, -0.0007939636707305908, 0.5860631465911865, -0.09624969214200974, 0.13470111787319183, -0.15653321146965027, -0.2634715437889099, -0.016304705291986465, -0.20348328351974487, 0.18107010424137115, 0.16410388052463531, -0.17127948999404907, 0.07490767538547516, -0.04906393215060234, -0.10003754496574402, -0.15435604751110077, -0.2218811959028244, -0.052139438688755035, 0.056519169360399246, 0.23761072754859924, 0.04172355309128761, 0.10207030922174454, 0.17450286448001862, 0.06348587572574615, 0.37924277782440186, 0.32526201009750366, 0.02172102779150009, -0.14396438002586365, -0.42663171887397766, -0.02600179612636566, -0.33962467312812805, 0.14754647016525269, 0.024922193959355354, 0.27009114623069763, -0.08437815308570862, 0.1522754430770874, -0.004360206425189972, -0.11218323558568954, 0.6934729218482971, 0.048745058476924896, 0.19957232475280762, 0.20017249882221222, -0.08546216785907745, -0.5025530457496643, -0.23858901858329773, -0.18569371104240417, 0.04025157913565636, 0.340725839138031, 0.38338541984558105, -0.4683738946914673, -0.30100464820861816, -0.1865672469139099, 0.08189290761947632, 0.009826626628637314, -0.14872042834758759, -0.21316763758659363, -0.3797747492790222, -0.3949319124221802, 0.2167172133922577, 0.38943687081336975, 0.4755870997905731, 0.06799271702766418, 0.026889484375715256, -0.2929084002971649, -0.30963677167892456, 0.044891420751810074, 0.06026757135987282, 0.4796251356601715, -0.1189771294593811, 0.25753527879714966, -0.12903538346290588, 0.09619798511266708, -0.004119148477911949, 0.276014506816864, -0.13732390105724335, -0.2943461537361145, -0.10998567193746567, -0.06514977663755417, 0.21290257573127747, 0.4558282792568207, -0.25881585478782654, 0.2693369388580322, -0.19519264996051788, 0.2502845525741577, 0.042904164642095566, 0.2637987732887268, 0.1973387748003006, -0.03622562065720558, 0.0013322060694918036, -0.2652607858181, 0.42905712127685547, 0.0026695095002651215, -0.19440364837646484, -0.018553107976913452, 0.7093638181686401, -0.40440383553504944, 0.45737797021865845, -0.15609648823738098, 0.8028731942176819, 0.2362445741891861, 0.1380435973405838, 0.5435698628425598, -0.08938833326101303, 0.06473681330680847, 0.03591213375329971, 0.12849363684654236, -0.4635949730873108, -0.34507399797439575, -0.03777780011296272, -0.31030014157295227, 0.22072166204452515, 0.06224833428859711, -0.3166085183620453, 0.1477743685245514, -0.11200250685214996, 0.41057419776916504, 0.19435833394527435, 0.10264433920383453, -0.15832765400409698, -0.09467141330242157, -0.1691223382949829, 0.041922055184841156, -0.1265619397163391, 0.2586374580860138, -0.11433973163366318, -0.19847062230110168, 0.05919830873608589, -0.4841393828392029, -0.24684327840805054, 0.1433870792388916, -0.6562666893005371, 0.29014939069747925, 0.23410211503505707, -0.19086489081382751, 0.01941264048218727, 0.3989163041114807, 0.17990583181381226, 0.0042031146585941315, -0.09819125384092331, 0.33288443088531494, -0.2963515818119049, -0.09313859790563583, -0.4071955680847168, 0.006316691637039185, 0.24486419558525085, -0.1559823900461197, -0.16049355268478394, 0.045308999717235565, -0.27248746156692505, -0.20831350982189178, -0.040403395891189575, 0.3726170063018799, 0.39615076780319214, -0.2809516489505768, -0.36105260252952576, -0.09302006661891937, -0.005714148283004761, -0.3805575668811798, 0.088768869638443, 0.33942556381225586, -0.42920130491256714, 0.20548751950263977, 0.010815788060426712, -0.3160879611968994, 0.03920901566743851, 0.2096012830734253, -0.3155357241630554, 0.06736674159765244, 0.7846019268035889, -0.07439491897821426, -0.10074421018362045, -0.1811852753162384, 0.3232037127017975, 0.479610800743103, -0.3316434621810913, 0.13324180245399475, -0.16690431535243988, -0.21943098306655884, 0.028355516493320465, 0.3900940716266632, 0.3051586151123047, 0.2687109112739563, -0.08886656165122986, -0.7250746488571167, -0.1478339433670044, 0.1298050880432129, 0.1138717532157898, 0.2721007764339447, 0.04423324763774872, 0.14106079936027527, 0.04461061209440231, 0.016435964033007622, -0.26239892840385437, 0.45526543259620667, -0.08192872256040573, 0.16957128047943115, -0.2407899796962738, -0.40101736783981323, 0.4652754068374634, -0.02191832661628723, -0.0013119224458932877, 0.33582812547683716, -0.04015035554766655, -0.15550494194030762, -0.41424626111984253, 0.15521475672721863, 0.28615880012512207, -0.1858559101819992, -0.06490029394626617, 0.1033167839050293, 0.035427968949079514, -0.09572233259677887, 0.16221930086612701, 0.2002612054347992, -0.07883962988853455, 0.02822810411453247, 0.2808815836906433, -0.07297395914793015, -0.20979954302310944, -0.09585803747177124, -0.2567834258079529, 0.003373660147190094, 0.13002550601959229, 0.11747628450393677, -0.2943812906742096, -0.04380910098552704, 0.21011106669902802, -0.08321034163236618, 0.15580527484416962, 0.08958218991756439, -0.0942637100815773, -0.44559603929519653, -0.17042425274848938, 0.03533397242426872, 0.2915734052658081, 0.3497500717639923, -0.31664568185806274, 0.10518297553062439, 0.6074190139770508, 0.14338745176792145, -0.1968304067850113, -0.21206246316432953, 0.1873023957014084, 0.12029363214969635, 0.14416006207466125, 0.12473651766777039, 0.1737241894006729, -0.46794649958610535, -0.06436675786972046, 0.07747673243284225, 0.2995138466358185, -0.06669367104768753, 0.13005447387695312, 0.42106419801712036, -0.10958340764045715, 0.08972074091434479, 0.23524293303489685, 0.2624669075012207, 0.008936256170272827, 0.6526457667350769, -0.251639723777771, 0.20945025980472565, -0.22413906455039978, -0.0241246335208416, 0.16850373148918152, -0.1815517693758011, -0.2213708609342575, 0.23362985253334045, 0.06403053551912308, -0.1277330219745636, -0.09813587367534637, 0.23818084597587585, -0.2568521797657013, -0.13932205736637115, 0.01793353445827961, 0.07596264779567719, -0.30557918548583984, -0.21329668164253235, 0.007387503981590271, -0.07883548736572266, -0.07531729340553284, -0.037074629217386246, 0.032799482345581055, -0.14933983981609344, 0.132764995098114, 0.1182127594947815, -0.02855759859085083, -0.17317207157611847, -0.17572680115699768, 0.44569024443626404, 0.18795046210289001, -0.2774367928504944, 0.2878091633319855, 0.010337434709072113, -0.1844746172428131, 0.05675160139799118, 0.18551014363765717, 0.32211771607398987, 0.5531295537948608, -0.12050436437129974, -0.09847655892372131, -0.3316449224948883, -0.08852769434452057, 0.008840333670377731, 0.031196970492601395, 0.0653267577290535, 0.2979873716831207, 0.5592052936553955, 0.0702793300151825, -0.2463517189025879, 0.042891208082437515, -0.09428223967552185, 0.24958308041095734, -0.3711110055446625, 0.40765130519866943, -0.0037067942321300507, -0.046751126646995544, -0.10109908878803253, -0.02329641580581665, -0.31690144538879395, 0.014866236597299576, 0.059402771294116974, 0.1370423585176468, 0.2377430498600006, -0.015201536938548088, 0.045278556644916534, 0.05907018855214119, 0.07290584594011307, 0.17651736736297607, -0.03192697465419769, -0.2942075729370117, -0.31913435459136963, -0.5126477479934692, -0.016343332827091217, -0.25748521089553833, -0.13912220299243927, 0.41879186034202576, -0.08204257488250732, -0.4773077070713043, -0.03300691395998001, 0.24356424808502197, 0.2516067624092102, 0.016767822206020355, 0.03657019883394241, -0.4075194299221039, 0.24318663775920868, 0.0936737060546875, 0.1779792457818985, 0.17726753652095795, -0.4024565815925598, 0.16748471558094025, 0.20541059970855713, 0.08252456039190292, 0.05038641393184662, 0.018102973699569702, -0.25166934728622437, -0.34275805950164795, 0.16713955998420715, 0.1453540027141571, 0.08064383268356323, -0.0673544853925705, 0.1887146383523941, -0.10580523312091827, -0.23673711717128754, -0.2156333476305008, 0.1960027813911438, 0.08247451484203339, 0.46248579025268555, -0.15922586619853973, -0.284367173910141, -0.38609084486961365, 0.212045356631279, 0.054822541773319244, -0.15413399040699005, -0.12800896167755127, 0.22862426936626434, 0.03328178822994232, 0.06325767934322357, 0.19599416851997375, 0.2849147617816925, -0.23584705591201782, 0.10749173164367676, -0.2193564474582672, -0.5455414056777954, 0.8332521319389343, -0.727351188659668, -0.566511332988739, -0.032042812556028366, 0.2239919900894165, 0.08252450078725815, -0.10971208661794662, -0.2950887084007263, -0.20580999553203583, 0.19673526287078857, 0.03142786771059036, -0.39474186301231384, -0.04616178944706917, 0.13551151752471924, 0.022030059248209, -0.06006235629320145, 0.2793453633785248, 0.36314764618873596, -0.3559337556362152, 0.038794633001089096, -0.4938342571258545 ]
https://github.com/huggingface/datasets/issues/6737
Invalid pattern: '**' can only be an entire path component
on ubuntu you just need to have the latest `datasets` and `fsspec` ``` pip install -U datasets fsspec ```
### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
19
Invalid pattern: '**' can only be an entire path component ### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2 on ubuntu you just need to have the latest `datasets` and `fsspec` ``` pip install -U datasets fsspec ```
[ -0.3318611681461334, -0.15121078491210938, -0.026008201763033867, 0.3540918231010437, 0.3105986714363098, -0.2765226364135742, 0.3181052505970001, 0.35003605484962463, -0.046847619116306305, 0.04758822172880173, 0.1681751310825348, 0.3472265303134918, -0.18957993388175964, 0.37525680661201477, -0.08563686162233353, -0.05019232630729675, -0.1384657621383667, 0.3741283416748047, -0.3302100896835327, 0.04080817103385925, -0.07579335570335388, 0.3542317748069763, -0.10395246744155884, 0.29254984855651855, -0.29187867045402527, 0.07770483195781708, 0.07890056818723679, 0.11825816333293915, -0.14519359171390533, -0.5299200415611267, 0.32714948058128357, -0.24906069040298462, 0.1412263959646225, 0.46009963750839233, -0.00010963858949253336, 0.06484724581241608, 0.34936362504959106, 0.0639793649315834, -0.003716803155839443, -0.3745609521865845, -0.4315885007381439, -0.0578358918428421, 0.30378425121307373, -0.168473482131958, -0.17270871996879578, -0.08527842909097672, -0.06974395364522934, 0.17578910291194916, 0.4858812689781189, 0.5591673851013184, 0.2538602948188782, 0.33830729126930237, 0.005541905760765076, -0.19703522324562073, 0.20548611879348755, 0.03412003815174103, 0.11570120602846146, -0.15941204130649567, 0.0899655744433403, -0.18879994750022888, -0.025364592671394348, -0.013179709203541279, -0.037015486508607864, 0.09646351635456085, 0.38399672508239746, -0.026908554136753082, 0.3328302800655365, -0.25349897146224976, -0.024082206189632416, 0.32828211784362793, 0.46254056692123413, -0.20911413431167603, -0.13383175432682037, -0.06413600593805313, -0.33918291330337524, -0.09275449812412262, 0.1342839002609253, 0.06301244348287582, -0.16003739833831787, 0.16086743772029877, 0.4280736446380615, 0.054907139390707016, -0.1439608931541443, 0.0984010398387909, -0.11874425411224365, 0.30368876457214355, -0.10317491739988327, -0.020183533430099487, -0.1257987767457962, -0.19408610463142395, 0.1844468116760254, -0.12720230221748352, -0.014411535114049911, 0.16737419366836548, -0.15113039314746857, 0.02831161767244339, 0.1701245754957199, 0.12317357957363129, 0.012235373258590698, 0.2665550112724304, 0.02691185101866722, 0.129535973072052, -0.13205404579639435, 0.3062485456466675, -0.1057339459657669, 0.21501606702804565, 0.08383092284202576, 0.05039967596530914, 0.44669318199157715, 0.17237235605716705, -0.026293357834219933, -0.13558167219161987, -0.059747617691755295, -0.2771468162536621, -0.21873125433921814, -0.030859418213367462, 0.28685349225997925, -0.2521860897541046, -0.6255257725715637, -0.11405223608016968, 0.18215414881706238, -0.18313834071159363, 0.3687925934791565, 0.524719774723053, 0.06250543147325516, 0.2770652174949646, 0.07686370611190796, 0.18950140476226807, 0.10924511402845383, 0.03806091472506523, -0.2291579693555832, 0.11948849260807037, -0.33994850516319275, -0.1446104794740677, 0.13792860507965088, -0.10287688672542572, 0.24476584792137146, 0.08527962863445282, 0.07232539355754852, -0.028742587193846703, -0.17224392294883728, -0.022729214280843735, -0.1562887728214264, 0.2881307899951935, -0.348562091588974, 0.07825413346290588, 0.44150233268737793, -0.16254685819149017, -0.04933676868677139, 0.06657658517360687, -0.10511703044176102, -0.22402749955654144, 0.019240602850914, 0.20906837284564972, -0.23317205905914307, 0.016781650483608246, -0.32439133524894714, -0.05713364854454994, 0.026763804256916046, -0.11265815794467926, -0.0857798382639885, 0.020473439246416092, -0.09028436243534088, -0.21815407276153564, 0.2467329204082489, 0.3260487914085388, -0.26129549741744995, -0.2705407738685608, 0.2045733779668808, -0.273751437664032, 0.19294695556163788, 0.37183791399002075, -0.2987029552459717, 0.35358166694641113, -0.430513858795166, 0.2835221290588379, 0.327362984418869, -0.3476339280605316, -0.13521522283554077, 0.20675930380821228, -0.10179993510246277, 0.07286109775304794, 0.2728608548641205, -0.30571430921554565, 0.15001878142356873, -0.17942538857460022, -0.022618241608142853, 0.33912593126296997, 0.27199438214302063, -0.017024189233779907, -0.3079884350299835, -0.2809555232524872, 0.1769062876701355, -0.02644691988825798, 0.3116925060749054, 0.18461352586746216, 0.04591401666402817, -0.008988174609839916, 0.25250333547592163, -0.14165769517421722, -0.07171347737312317, 0.16299593448638916, 0.5399159789085388, 0.15437424182891846, 0.12086765468120575, -0.4586293399333954, -0.10702226310968399, 0.1036272719502449, -0.2140425741672516, -0.21263673901557922, -0.11976675689220428, -0.26287132501602173, -0.30370232462882996, -0.14162583649158478, -0.15598604083061218, -0.08671309053897858, 0.1809106171131134, 0.18282824754714966, -0.0732460767030716, -0.12409926950931549, -0.39844581484794617, 0.4340955913066864, 0.10337862372398376, 0.21394644677639008, -0.016032755374908447, 0.548651397228241, -0.1171201542019844, -0.20750142633914948, 0.2490825057029724, 0.3128746747970581, 0.4475456774234772, -0.2508031725883484, -0.0393906906247139, 0.35171377658843994, 0.11148371547460556, -0.053853437304496765, -0.2953989505767822, 0.11650002747774124, 0.09264056384563446, -0.3052091598510742, -0.23479178547859192, 0.32771173119544983, 0.2835996448993683, -0.20241954922676086, -0.005692467093467712, 0.11782047897577286, -0.0030608922243118286, 0.28795331716537476, 0.057069629430770874, 0.0575285479426384, 0.27915066480636597, -0.22275911271572113, -0.1558031141757965, -0.035139329731464386, 0.4346019923686981, -0.14142295718193054, 0.07887323200702667, 0.04371854290366173, -0.23872649669647217, -0.21176362037658691, 0.251995712518692, 0.04101244732737541, 0.09796858578920364, 0.19376307725906372, -0.07035406678915024, 0.23198524117469788, 0.05057572200894356, 0.1526164412498474, 0.353163480758667, 0.20324017107486725, -0.3622306287288666, 0.05386951193213463, -0.029811710119247437, -0.1967802494764328, 0.18808063864707947, 0.19162730872631073, 0.04928134009242058, 0.17421893775463104, -0.05655704438686371, 0.1405574381351471, -0.3058088421821594, -0.4278438985347748, 0.007777508348226547, 0.19837816059589386, -0.4266136884689331, -0.07241027057170868, -0.3999956548213959, -0.14802667498588562, -0.10460509359836578, -0.3514586389064789, 0.072166308760643, -0.080693818628788, -0.23642592132091522, 0.1627252995967865, 0.013676866888999939, 0.2916131019592285, 0.11523973941802979, 0.24133270978927612, -0.08737679570913315, -0.07308191061019897, -0.3816058039665222, 0.1459856480360031, -0.07510378211736679, 0.043776679784059525, 0.30580437183380127, 0.5852651596069336, 0.01190740056335926, -0.20344939827919006, 0.1635848879814148, -0.26127779483795166, -0.2737802267074585, 0.08099506795406342, 0.10249505937099457, 0.3677253723144531, 0.2171069085597992, 0.1578902006149292, 0.06398525089025497, -0.3240640461444855, 0.35972899198532104, -0.10934101045131683, 0.02944130264222622, 0.06812988221645355, -0.08847203105688095, -0.2148037552833557, -0.17983660101890564, -0.039954669773578644, -0.21581679582595825, -0.4721218943595886, 0.08511991798877716, 0.03619740530848503, 0.2112945169210434, -0.07465539127588272, -0.1186286062002182, 0.2591412365436554, -0.19128885865211487, -0.022990962490439415, -0.05598142743110657, 0.0227811299264431, 0.33246752619743347, -0.23702503740787506, -0.3781554400920868, -0.047634728252887726, -0.14557024836540222, 0.2804786264896393, -0.4340277910232544, -0.354279100894928, -0.44202569127082825, -0.5787597298622131, 0.3466823101043701, -0.015510015189647675, 0.16122370958328247, 0.37112006545066833, 0.03680233284831047, -0.09573835879564285, -0.19932031631469727, -0.2062729448080063, 0.20477309823036194, -0.1925046443939209, 0.021966636180877686, 0.16619062423706055, 0.4835117757320404, 0.0863691121339798, 0.5478528141975403, 0.1858748346567154, -0.040122102946043015, 0.54475998878479, -0.08386500179767609, 0.2617088854312897, -0.18214043974876404, -0.35720035433769226, -0.11101991683244705, -0.15134140849113464, 0.0987384170293808, 0.030520252883434296, -0.07071925699710846, 0.20237396657466888, -0.0597296804189682, -0.10111866891384125, -0.09616362303495407, -0.14382247626781464, -0.08112892508506775, -0.0680941715836525, 0.05289740115404129, 0.13413871824741364, 0.06489048153162003, 0.12713328003883362, 0.07039236277341843, 0.32494762539863586, 0.5516866445541382, -0.09421166032552719, -0.16181935369968414, -0.31458696722984314, -0.15813691914081573, -0.34243959188461304, 0.24132439494132996, -0.1243566945195198, 0.20575454831123352, -0.14993879199028015, 0.2578688859939575, -0.07738068699836731, -0.1463150680065155, 0.680393397808075, 0.1255960464477539, 0.11211831867694855, 0.2565172612667084, 0.03445234149694443, -0.4764084815979004, -0.10028742253780365, -0.12444436550140381, 0.09621402621269226, 0.20803582668304443, 0.3295177221298218, -0.3572210967540741, -0.2776324450969696, -0.10859084129333496, 0.13085876405239105, -0.03804430738091469, -0.19287577271461487, -0.31708386540412903, -0.2621280252933502, -0.4293648898601532, 0.1286105513572693, 0.36397457122802734, 0.30306094884872437, 0.10348370671272278, 0.04316721484065056, -0.27804189920425415, -0.23944488167762756, 0.08251059800386429, 0.0888005942106247, 0.3968956768512726, -0.2303720861673355, 0.20061157643795013, -0.039611898362636566, -0.027496621012687683, 0.0035613607615232468, 0.3436962068080902, -0.29558658599853516, -0.20357561111450195, -0.10947761684656143, -0.03059915080666542, 0.18498651683330536, 0.31143051385879517, -0.3048197031021118, 0.09574300795793533, -0.12374570965766907, 0.08756004273891449, -0.11063770204782486, 0.15955406427383423, 0.11507101356983185, 0.23652571439743042, -0.12507425248622894, -0.33860868215560913, 0.45200175046920776, -0.01999741606414318, -0.23700429499149323, 0.16603940725326538, 0.6400777697563171, -0.40115925669670105, 0.5736521482467651, -0.34407609701156616, 0.6966957449913025, 0.19430433213710785, 0.15793433785438538, 0.4383849799633026, -0.041200872510671616, -0.027563173323869705, 0.1366422176361084, 0.0402059480547905, -0.3176897466182709, -0.3487512469291687, -0.015173070132732391, -0.22925570607185364, 0.3294159173965454, 0.13726729154586792, -0.36582228541374207, 0.3167077898979187, -0.08918780833482742, 0.21270550787448883, 0.14561378955841064, 0.19506973028182983, 0.048929259181022644, -0.1492517590522766, -0.2637189030647278, 0.18771617114543915, -0.04194130003452301, 0.2719758152961731, -0.14192074537277222, -0.07057828456163406, 0.14303861558437347, -0.4521564245223999, -0.35673588514328003, 0.08336983621120453, -0.429979532957077, 0.15281152725219727, 0.2806054353713989, -0.04838451370596886, 0.09501053392887115, 0.2053910195827484, 0.15088745951652527, 0.1506861299276352, -0.1428011953830719, 0.3098658621311188, -0.11384127289056778, -0.015977121889591217, -0.4009290933609009, 0.04734257981181145, 0.22162412106990814, -0.18564888834953308, -0.12467797845602036, 0.04757910221815109, -0.19026143848896027, -0.21016943454742432, 0.23969420790672302, 0.28423410654067993, 0.1487988382577896, -0.26822343468666077, -0.3471873998641968, -0.01862660050392151, 0.16682501137256622, -0.36645644903182983, 0.19272105395793915, 0.36913931369781494, -0.38233402371406555, 0.33898934721946716, 0.1997310370206833, -0.20735305547714233, 0.03180335834622383, 0.16979020833969116, -0.3853895366191864, -0.06413973867893219, 0.612563967704773, 0.04831704869866371, -0.19990921020507812, -0.2740078568458557, 0.30177608132362366, 0.38853490352630615, -0.2289220094680786, 0.16830119490623474, -0.2083446979522705, -0.22444090247154236, 0.07996800541877747, 0.5136752128601074, 0.31666743755340576, 0.08836530894041061, -0.07136288285255432, -0.681397557258606, -0.18850888311862946, 0.1589636504650116, 0.07333613187074661, 0.2055879682302475, 0.01259332150220871, 0.1152476966381073, 0.05679944157600403, 0.048244409263134, -0.36642053723335266, 0.4124128222465515, -0.1390189379453659, 0.17968575656414032, -0.04901020973920822, -0.23694685101509094, 0.4384758770465851, -0.019424233585596085, 0.07069085538387299, 0.2235705405473709, -0.06302601844072342, -0.2708647847175598, -0.29012370109558105, 0.11288632452487946, 0.2318638563156128, -0.15590938925743103, 0.000017418060451745987, 0.02615813910961151, -0.005479192361235619, -0.04998595267534256, 0.041234154254198074, 0.21557509899139404, -0.15262237191200256, 0.11707498133182526, 0.18135307729244232, -0.12306702882051468, -0.03877439349889755, 0.00354979932308197, -0.24194639921188354, 0.10051549971103668, 0.11451543122529984, 0.16623495519161224, -0.2555082440376282, -0.025806855410337448, 0.17032353579998016, 0.0040945857763290405, 0.1857498586177826, 0.15674573183059692, -0.043857015669345856, -0.3806533217430115, -0.052068281918764114, 0.24354277551174164, 0.2299778312444687, 0.1382938027381897, -0.290164053440094, 0.1920236498117447, 0.5740640163421631, 0.22339953482151031, -0.27126818895339966, -0.07745562493801117, 0.1928660273551941, 0.1920667141675949, 0.1938779652118683, 0.12770335376262665, 0.2302255928516388, -0.43473100662231445, 0.08587777614593506, 0.13816875219345093, 0.4029168486595154, -0.1347215473651886, 0.1918592005968094, 0.2371608465909958, -0.10275159776210785, 0.06894726306200027, 0.37248003482818604, 0.2809792757034302, -0.011318936944007874, 0.7606695294380188, -0.31207138299942017, 0.11444523930549622, -0.07049398124217987, -0.026562172919511795, 0.11889369040727615, -0.26026201248168945, -0.0798724889755249, 0.03225401043891907, 0.08392131328582764, -0.1441294550895691, -0.08008570969104767, 0.26432856917381287, -0.3516891300678253, -0.0523366741836071, 0.03218896687030792, 0.02502945251762867, -0.23317039012908936, -0.233830988407135, -0.005660170689225197, -0.036061741411685944, 0.017295457422733307, -0.15555021166801453, 0.05161916837096214, -0.05998142808675766, 0.09455413371324539, -0.045065686106681824, -0.0017536133527755737, -0.22945833206176758, 0.011285239830613136, 0.22595813870429993, 0.11238323897123337, -0.21063575148582458, 0.3256753087043762, -0.07728166878223419, -0.16516387462615967, 0.09546567499637604, 0.2508157789707184, 0.4194471836090088, 0.4595135748386383, -0.03928360342979431, -0.12737885117530823, -0.45790523290634155, -0.15655763447284698, -0.008466348052024841, 0.15568608045578003, -0.06056089699268341, 0.30582475662231445, 0.42621156573295593, 0.18516004085540771, -0.3065229654312134, 0.14487993717193604, -0.008998986333608627, 0.11816476285457611, -0.322700560092926, 0.31159815192222595, -0.0039131976664066315, -0.04148906096816063, -0.1807686984539032, 0.00966671109199524, -0.4182243049144745, 0.017571132630109787, 0.3134797215461731, -0.07949668914079666, 0.1867314875125885, -0.10296721011400223, 0.08969303220510483, 0.0432940348982811, 0.09145950525999069, 0.21565726399421692, 0.21981030702590942, -0.23537681996822357, -0.1770400106906891, -0.6878979206085205, -0.06731153279542923, -0.2389727532863617, -0.08788783103227615, 0.26203423738479614, -0.021994175389409065, -0.4647804796695709, -0.049055106937885284, 0.27716946601867676, 0.20813056826591492, -0.036166414618492126, -0.06868851184844971, -0.3192746937274933, 0.19144366681575775, -0.051559410989284515, 0.2162109911441803, 0.11853139102458954, -0.419020414352417, 0.036967936903238297, 0.15576355159282684, 0.149379163980484, 0.008242501877248287, -0.09149736166000366, -0.3094896972179413, -0.24381080269813538, 0.1860423982143402, 0.16734358668327332, 0.13100886344909668, -0.0915970653295517, 0.17085294425487518, -0.09793023765087128, -0.3191543519496918, -0.2670455574989319, 0.1333702802658081, 0.10974693298339844, 0.34979671239852905, -0.20802386105060577, -0.12703189253807068, -0.3845188021659851, 0.22100332379341125, -0.021072467789053917, -0.2769313454627991, -0.29710274934768677, 0.35966184735298157, -0.14097169041633606, -0.03371432423591614, -0.011406262405216694, 0.21098175644874573, -0.13638918101787567, 0.0950327068567276, -0.12830385565757751, -0.454432874917984, 0.7457051277160645, -0.793450117111206, -0.5109341740608215, -0.14480595290660858, 0.23009179532527924, 0.09412921965122223, -0.18502698838710785, -0.3371383249759674, -0.19501212239265442, 0.18570755422115326, 0.08597990870475769, -0.31346002221107483, -0.05132954940199852, 0.014709774404764175, -0.005648020654916763, -0.09201040863990784, 0.17073136568069458, 0.4018458127975464, -0.27299314737319946, 0.005920950323343277, -0.5219898819923401 ]
https://github.com/huggingface/datasets/issues/6737
Invalid pattern: '**' can only be an entire path component
The issue was caused by an incompatibility between the versions of `datasets`, `huggingface-hub` and `fsspec`. The issue was fixed in: - huggingface-hub-0.21.2: https://github.com/huggingface/huggingface_hub/pull/2056 - and datasets-2.18.0: https://github.com/huggingface/datasets/pull/6687 - datasets-2.19.1 fixed the minimum requirement huggingface-hub >= 0.21.2: https://github.com/huggingface/datasets/pull/6713
### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2
37
Invalid pattern: '**' can only be an entire path component ### Describe the bug ValueError: Invalid pattern: '**' can only be an entire path component when loading any dataset ### Steps to reproduce the bug import datasets ds = datasets.load_dataset("TokenBender/code_instructions_122k_alpaca_style") ### Expected behavior loading the dataset successfully ### Environment info - `datasets` version: 2.18.0 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.7 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2023.12.2 The issue was caused by an incompatibility between the versions of `datasets`, `huggingface-hub` and `fsspec`. The issue was fixed in: - huggingface-hub-0.21.2: https://github.com/huggingface/huggingface_hub/pull/2056 - and datasets-2.18.0: https://github.com/huggingface/datasets/pull/6687 - datasets-2.19.1 fixed the minimum requirement huggingface-hub >= 0.21.2: https://github.com/huggingface/datasets/pull/6713
[ -0.2559811472892761, -0.2970866560935974, 0.03356429189443588, 0.3065558671951294, 0.3228911757469177, -0.2919846177101135, 0.260703980922699, 0.3723161518573761, -0.10775737464427948, 0.03460223227739334, 0.06914541870355606, 0.2735200524330139, -0.19906926155090332, 0.3654455244541168, -0.04743487760424614, -0.0640907883644104, -0.10571204870939255, 0.36097636818885803, -0.2740396559238434, 0.07935787737369537, -0.09003783017396927, 0.44120946526527405, -0.07463037222623825, 0.2959100008010864, -0.42618441581726074, 0.15263058245182037, 0.031820498406887054, 0.15762853622436523, -0.13090988993644714, -0.49077484011650085, 0.3669922351837158, -0.22334200143814087, 0.071332648396492, 0.35430440306663513, -0.00011251527030253783, 0.11040665209293365, 0.38113850355148315, 0.09204059094190598, -0.07502453029155731, -0.49076300859451294, -0.31788018345832825, 0.027158791199326515, 0.3244860768318176, -0.031526222825050354, -0.20003417134284973, -0.009014478884637356, -0.07877267152070999, 0.2403864860534668, 0.5246690511703491, 0.45408105850219727, 0.2194274216890335, 0.46589401364326477, 0.04430912807583809, -0.23243914544582367, 0.17954757809638977, 0.18216565251350403, 0.08505650609731674, 0.05313066020607948, 0.07039405405521393, -0.19868183135986328, -0.07666628807783127, -0.025746960192918777, 0.09480834007263184, 0.07686960697174072, 0.5209998488426208, -0.05180928856134415, 0.2188037633895874, -0.16648104786872864, -0.002825230360031128, 0.34575727581977844, 0.29823100566864014, -0.2608213722705841, -0.15433445572853088, -0.20949187874794006, -0.3028313219547272, -0.12280292063951492, 0.237787127494812, 0.03125059977173805, -0.1168878972530365, 0.10156907886266708, 0.31046009063720703, 0.09878165274858475, -0.14364513754844666, 0.05389164388179779, -0.1006661206483841, 0.2113417387008667, -0.1523890644311905, -0.025877878069877625, -0.062470052391290665, -0.2078942507505417, -0.08082948625087738, -0.03340521082282066, -0.04414347931742668, 0.20254984498023987, -0.1767197847366333, 0.014792799949645996, 0.19469234347343445, 0.2685399651527405, 0.09697119146585464, 0.3053366541862488, 0.015804830938577652, 0.13184961676597595, -0.13933038711547852, 0.24766254425048828, -0.07279616594314575, 0.28245827555656433, 0.16228461265563965, -0.17144203186035156, 0.37572282552719116, 0.24453726410865784, -0.0022577717900276184, -0.09724923223257065, -0.011275650933384895, -0.22806048393249512, -0.27240562438964844, -0.1336730420589447, 0.27610069513320923, -0.243925541639328, -0.559646725654602, -0.1444919854402542, 0.0967899039387703, -0.1171315535902977, 0.39921835064888, 0.4842148423194885, 0.12498924136161804, 0.22455477714538574, 0.06685314327478409, 0.23421743512153625, 0.09020516276359558, 0.10572800785303116, -0.24872992932796478, 0.1062556803226471, -0.37577465176582336, -0.05623268336057663, 0.15784971415996552, -0.2571382224559784, 0.27450788021087646, 0.10864271968603134, 0.1531645953655243, -0.11793160438537598, -0.24160735309123993, 0.05022819712758064, -0.12873634696006775, 0.22270619869232178, -0.38424327969551086, 0.10832411795854568, 0.4511459469795227, -0.11867183446884155, -0.08221480250358582, -0.0732400044798851, -0.04043012857437134, -0.27782151103019714, 0.09401921182870865, 0.16340719163417816, -0.2727561593055725, 0.07628519833087921, -0.25265130400657654, 0.0014533624053001404, -0.012002132833003998, -0.03147232159972191, -0.10012412816286087, 0.12751983106136322, -0.2263333648443222, -0.14309179782867432, 0.33064883947372437, 0.37262725830078125, -0.08554103225469589, -0.4150612950325012, 0.2517035901546478, -0.3061353266239166, 0.08031165599822998, 0.3693310618400574, -0.2869332432746887, 0.24071434140205383, -0.4544282555580139, 0.2865714430809021, 0.10224796831607819, -0.28987792134284973, -0.0941389799118042, 0.2472488284111023, -0.17192663252353668, 0.17400449514389038, 0.20440173149108887, -0.3520764708518982, 0.030357131734490395, -0.16010314226150513, 0.05050256848335266, 0.23659037053585052, 0.30431896448135376, -0.01580130122601986, -0.32551470398902893, -0.31911250948905945, 0.10309044271707535, -0.028824344277381897, 0.2213069200515747, 0.20451214909553528, 0.014445580542087555, 0.034910671412944794, 0.2707604467868805, -0.0528457872569561, -0.04650282859802246, 0.20911858975887299, 0.49815309047698975, 0.14669503271579742, 0.05919092893600464, -0.4010520875453949, -0.22287875413894653, 0.15681421756744385, -0.1952745020389557, -0.11594143509864807, -0.1131938248872757, -0.29615259170532227, -0.30384159088134766, -0.11394443362951279, -0.06596092879772186, -0.1197318583726883, 0.13233797252178192, 0.14855271577835083, -0.013198815286159515, -0.062061525881290436, -0.3879214823246002, 0.49584537744522095, 0.12029321491718292, 0.24362240731716156, -0.13860322535037994, 0.5537669062614441, -0.045209236443042755, -0.2031659632921219, 0.27362993359565735, 0.3373188078403473, 0.42161256074905396, -0.2861798405647278, 0.0005353493615984917, 0.40790581703186035, 0.024989314377307892, 0.09132172167301178, -0.37608596682548523, 0.09640897065401077, 0.15877322852611542, -0.2123498022556305, -0.3164692521095276, 0.1423858255147934, 0.17247812449932098, -0.21063658595085144, -0.010120593011379242, 0.18627136945724487, -0.03877920284867287, 0.32051554322242737, 0.07125086337327957, 0.048046864569187164, 0.15142805874347687, -0.2222718447446823, -0.23321543633937836, -0.11443581432104111, 0.48453348875045776, -0.20937271416187286, 0.18782220780849457, 0.1482287049293518, -0.25764501094818115, -0.21591374278068542, 0.2328750342130661, 0.10632933676242828, 0.056458696722984314, 0.19586163759231567, -0.10140254348516464, 0.18860650062561035, 0.037632912397384644, 0.09753406047821045, 0.34487396478652954, 0.1593310683965683, -0.329610139131546, 0.12479262053966522, -0.0591566264629364, -0.22676801681518555, 0.19067418575286865, 0.22055229544639587, 0.09406261891126633, 0.11021523177623749, -0.07238876819610596, 0.14507481455802917, -0.40108951926231384, -0.31897833943367004, -0.004291415214538574, 0.13252727687358856, -0.4199770390987396, -0.1461205929517746, -0.3668726086616516, -0.13864195346832275, -0.1291801780462265, -0.3743678033351898, -0.10314062237739563, -0.11009962856769562, -0.23156549036502838, 0.25474676489830017, -0.031684163957834244, 0.28601396083831787, 0.23144468665122986, 0.25590813159942627, -0.17997968196868896, -0.07214903086423874, -0.4441899061203003, 0.17586612701416016, -0.041893310844898224, 0.00707804411649704, 0.27162623405456543, 0.540367066860199, -0.08580402284860611, -0.23192749917507172, 0.15790095925331116, -0.21454231441020966, -0.3289504945278168, 0.10553024709224701, 0.00815296545624733, 0.32383993268013, 0.22544938325881958, 0.1552969515323639, 0.00922577828168869, -0.32006481289863586, 0.4063556492328644, -0.17337709665298462, -0.0175018310546875, 0.0727759450674057, -0.05117371305823326, -0.15821972489356995, -0.2561793923377991, 0.06078600883483887, -0.07016255706548691, -0.4661470651626587, 0.27071982622146606, -0.03461246192455292, 0.1370510458946228, 0.04719621315598488, -0.09182815253734589, 0.2603664696216583, -0.3340691328048706, -0.030696233734488487, -0.057292819023132324, -0.046227987855672836, 0.2647916078567505, -0.1935599148273468, -0.3449951112270355, -0.10092613101005554, -0.084986113011837, 0.31854018568992615, -0.4322628974914551, -0.31975793838500977, -0.47003740072250366, -0.6136964559555054, 0.29141223430633545, -0.03402591496706009, 0.0478481724858284, 0.33607208728790283, 0.02929304912686348, -0.09739428013563156, -0.17487981915473938, -0.26380085945129395, 0.305859237909317, -0.25943270325660706, -0.04268031567335129, 0.15133744478225708, 0.4455054700374603, 0.11934925615787506, 0.5580881834030151, 0.2584041357040405, -0.08066143095493317, 0.5745069980621338, -0.02598661743104458, 0.3598986566066742, -0.22099581360816956, -0.38506847620010376, -0.07103867083787918, -0.0986437052488327, 0.19904613494873047, 0.1481131613254547, 0.009577982127666473, 0.2926783263683319, -0.05421781912446022, -0.2689228951931, -0.0052385516464710236, -0.20454172790050507, -0.09422547370195389, -0.052422523498535156, 0.04751763120293617, 0.14645978808403015, 0.0627078041434288, 0.11267611384391785, 0.04309719428420067, 0.31287524104118347, 0.5003277063369751, 0.003344520926475525, -0.12473668158054352, -0.31750616431236267, -0.056086622178554535, -0.47310447692871094, 0.203626349568367, -0.08765080571174622, 0.21769683063030243, -0.13607273995876312, 0.14240247011184692, -0.12516270577907562, -0.08403539657592773, 0.7611600160598755, 0.3043805956840515, 0.17120197415351868, 0.1867646872997284, -0.0867631584405899, -0.5398945212364197, 0.01599062979221344, -0.03397982195019722, 0.10825511068105698, 0.26046451926231384, 0.5579777956008911, -0.3884538412094116, -0.37336984276771545, -0.16226018965244293, 0.0734650045633316, 0.05882955715060234, -0.20062194764614105, -0.3294990062713623, -0.21162813901901245, -0.3997301459312439, 0.13485176861286163, 0.3532103896141052, 0.32478392124176025, 0.09404933452606201, 0.06165388599038124, -0.19641980528831482, -0.3872802257537842, 0.11982262134552002, 0.05840672180056572, 0.3655848801136017, -0.17371800541877747, 0.28087106347084045, 0.04811163619160652, 0.012972835451364517, 0.02167007513344288, 0.3482813835144043, -0.2383807897567749, -0.22544822096824646, -0.10527027398347855, 0.02318836748600006, 0.17062455415725708, 0.4271767735481262, -0.25646132230758667, 0.20277082920074463, -0.12589335441589355, 0.1299249678850174, -0.22463133931159973, 0.12861503660678864, 0.06316777318716049, 0.21664386987686157, -0.06748867779970169, -0.13484790921211243, 0.4602073132991791, -0.07239013910293579, -0.18959668278694153, 0.14802715182304382, 0.8594629168510437, -0.38363078236579895, 0.4110994338989258, -0.3020504415035248, 0.7553350925445557, 0.2113245725631714, 0.1829243302345276, 0.4473157227039337, -0.07553598284721375, 0.1336369812488556, 0.2264738827943802, 0.05620397999882698, -0.3157390058040619, -0.38298335671424866, 0.056731246411800385, -0.20283246040344238, 0.2846248149871826, 0.05685421824455261, -0.2499941736459732, 0.18214473128318787, -0.029610320925712585, 0.3482978343963623, 0.11701896786689758, 0.18546587228775024, -0.15451695024967194, -0.2023814618587494, -0.282047301530838, 0.14871259033679962, -0.006041683256626129, 0.3327593505382538, -0.11348729580640793, -0.15477515757083893, 0.20908159017562866, -0.45014792680740356, -0.29416871070861816, 0.09871187061071396, -0.4062865674495697, 0.08655359596014023, 0.38321414589881897, 0.00420023500919342, 0.17140311002731323, 0.15216605365276337, 0.27589112520217896, 0.13821901381015778, -0.22802883386611938, 0.30373644828796387, -0.22923731803894043, -0.017141398042440414, -0.4138695001602173, 0.02153700217604637, 0.22037285566329956, -0.15532030165195465, -0.08383718132972717, -0.06137486547231674, -0.1688775271177292, -0.1322556734085083, 0.13586673140525818, 0.2554459571838379, -0.0029509812593460083, -0.24326583743095398, -0.2797721326351166, -0.04152458906173706, 0.20261065661907196, -0.3892836570739746, 0.1529809534549713, 0.3360823392868042, -0.33265629410743713, 0.16399559378623962, 0.168226957321167, -0.24974700808525085, 0.006805459037423134, 0.291639506816864, -0.4432210326194763, -0.0873703882098198, 0.6339277029037476, 0.05244393274188042, -0.1622619330883026, -0.23494163155555725, 0.2858276069164276, 0.45926856994628906, -0.39129015803337097, 0.1909947395324707, -0.1508273333311081, -0.16401733458042145, 0.028943924233317375, 0.47484445571899414, 0.3129080533981323, 0.11327049136161804, 0.039141517132520676, -0.6024550199508667, -0.22316370904445648, 0.23094698786735535, 0.05184553563594818, 0.21448379755020142, -0.024866338819265366, 0.22919660806655884, 0.058158911764621735, 0.12544608116149902, -0.33131638169288635, 0.4006134867668152, -0.11562271416187286, 0.13742251694202423, -0.09487996250391006, -0.2859879434108734, 0.4925892651081085, -0.08882158994674683, 0.031614936888217926, 0.3545237183570862, -0.15908806025981903, -0.19312599301338196, -0.3390081226825714, 0.11842550337314606, 0.23054403066635132, -0.194434255361557, 0.03295531123876572, 0.1651155799627304, 0.00444604828953743, -0.12262669205665588, 0.11570152640342712, 0.2622554302215576, -0.15217553079128265, -0.010982377454638481, 0.21802383661270142, -0.019385404884815216, -0.0407816506922245, -0.06169455498456955, -0.19161710143089294, 0.0654371976852417, 0.10851186513900757, 0.04671204090118408, -0.3749167025089264, -0.018012192100286484, 0.214666947722435, 0.05068527162075043, 0.1449558436870575, 0.11984747648239136, -0.09617378562688828, -0.2716856002807617, -0.21136024594306946, 0.1533193588256836, 0.289669930934906, 0.1309911608695984, -0.19484364986419678, 0.16591982543468475, 0.5298762321472168, 0.180336132645607, -0.19822277128696442, -0.012524405494332314, 0.15694212913513184, 0.1910666972398758, 0.20347294211387634, 0.13283748924732208, 0.23539456725120544, -0.32836025953292847, 0.13948900997638702, 0.161502867937088, 0.45856207609176636, -0.04307727515697479, 0.15317679941654205, 0.1442515254020691, -0.08878795802593231, 0.027048852294683456, 0.3610372245311737, 0.28823190927505493, 0.07296083867549896, 0.5782309770584106, -0.36432579159736633, 0.131138876080513, -0.2875053882598877, -0.011122617870569229, 0.1886293590068817, -0.259070485830307, -0.18803153932094574, 0.12687517702579498, 0.05544431507587433, -0.12651053071022034, -0.15768983960151672, 0.44168323278427124, -0.4311388432979584, -0.12873609364032745, 0.011453913524746895, 0.060660380870103836, -0.22132521867752075, -0.2749902009963989, 0.02527163177728653, -0.09784063696861267, -0.08949385583400726, -0.11910504102706909, 0.013755843043327332, -0.14620043337345123, 0.13968057930469513, -0.08158841729164124, -0.017163746058940887, -0.3134368658065796, -0.06333082169294357, 0.26296934485435486, 0.12155864387750626, -0.1985742449760437, 0.3322424590587616, -0.029490336775779724, -0.19523555040359497, 0.17354755103588104, 0.226083442568779, 0.4106315076351166, 0.3998161256313324, 0.1011587381362915, -0.08047005534172058, -0.38391804695129395, -0.1110321506857872, -0.012198456563055515, 0.15167976915836334, -0.028899893164634705, 0.2993318438529968, 0.4414101541042328, 0.1552450805902481, -0.2908553183078766, 0.08750955760478973, -0.05561588332056999, 0.27057090401649475, -0.35101810097694397, 0.3232749402523041, -0.1629355102777481, 0.012370891869068146, -0.1691710650920868, 0.03780098259449005, -0.4070464074611664, 0.058325186371803284, 0.1720157265663147, -0.008859982714056969, 0.14075425267219543, -0.1493486613035202, 0.07539939135313034, 0.07953350991010666, 0.18721264600753784, 0.2182473987340927, 0.10617876797914505, -0.26007401943206787, -0.2683413624763489, -0.6612222790718079, -0.04657351225614548, -0.14644429087638855, 0.054942719638347626, 0.21800386905670166, -0.06079551577568054, -0.4282626211643219, -0.1490997076034546, 0.1606692373752594, 0.20547300577163696, -0.02417013980448246, -0.25455883145332336, -0.275026798248291, 0.2549959123134613, -0.07053175568580627, 0.10305063426494598, 0.16919907927513123, -0.2813093364238739, 0.08107627183198929, 0.1426784098148346, 0.096429742872715, -0.02794986218214035, 0.005147062242031097, -0.3587445616722107, -0.27979493141174316, 0.12095122039318085, 0.1690327674150467, -0.00918230414390564, -0.08148105442523956, 0.06791990250349045, -0.18230600655078888, -0.3061061203479767, -0.22863344848155975, 0.11260596662759781, 0.07944726943969727, 0.44013720750808716, -0.2593502402305603, -0.21047620475292206, -0.36931413412094116, 0.22770050168037415, -0.021082084625959396, -0.2357507199048996, -0.23986747860908508, 0.3976856470108032, -0.18300044536590576, -0.02969006448984146, 0.06880307197570801, 0.3122514486312866, -0.14087514579296112, 0.09506785869598389, -0.18412074446678162, -0.4637446701526642, 0.8130992650985718, -0.7791670560836792, -0.4409387707710266, -0.08325699716806412, 0.2412106990814209, 0.2715342938899994, -0.32988008856773376, -0.3885938823223114, -0.1861041635274887, 0.13906942307949066, 0.1516222059726715, -0.32340875267982483, -0.027848847210407257, -0.028604790568351746, -0.06407669186592102, -0.12027283012866974, 0.18817606568336487, 0.4484305679798126, -0.27416515350341797, 0.1500924825668335, -0.4568982720375061 ]
https://github.com/huggingface/datasets/issues/6736
Mosaic Streaming (MDS) Support
Hi ! that would be great :) Though note that `datasets` doesn't implement format-specific resuming when streaming, so in general I think it's better if users can use the mosaic-streaming library to read their MDS datasets. I wonder if they support `hf://` paths though... Anyway for those interested, the code for WebDataset is a single file here: https://github.com/huggingface/datasets/blob/main/src/datasets/packaged_modules/webdataset/webdataset.py. It implements `_split_generators` that downloads files and returns the lists of splits (train/validation/test) and `_split_generators` to generate examples (dicts) from the downloaded files. Streaming is automatically supported by making download steps lazy and by extending `open()` to work with remote URLs.
### Feature request I'm a huge fan of the current HF Datasets `webdataset` integration (especially the built-in streaming support). However, I'd love to upload some robotics and multimodal datasets I've processed for use with [Mosaic Streaming](https://docs.mosaicml.com/projects/streaming/en/stable/), specifically their [MDS Format](https://docs.mosaicml.com/projects/streaming/en/stable/fundamentals/dataset_format.html#mds). Because the shard files have similar semantics to WebDataset, I'm hoping that adding such support won't be too much trouble? ### Motivation One of the downsides with WebDataset is a lack of out-of-the-box determinism (especially for large-scale training and reproducibility), easy job resumption, and the ability to quickly debug / visualize individual examples. Mosaic Streaming provides a [great interface for this out of the box](https://docs.mosaicml.com/projects/streaming/en/stable/#key-features), so I'd love to see it supported in HF Datasets. ### Your contribution Happy to help test things / provide example data. Can potentially submit a PR if maintainers could point me to the necessary WebDataset logic / steps for adding a new streaming format!
99
Mosaic Streaming (MDS) Support ### Feature request I'm a huge fan of the current HF Datasets `webdataset` integration (especially the built-in streaming support). However, I'd love to upload some robotics and multimodal datasets I've processed for use with [Mosaic Streaming](https://docs.mosaicml.com/projects/streaming/en/stable/), specifically their [MDS Format](https://docs.mosaicml.com/projects/streaming/en/stable/fundamentals/dataset_format.html#mds). Because the shard files have similar semantics to WebDataset, I'm hoping that adding such support won't be too much trouble? ### Motivation One of the downsides with WebDataset is a lack of out-of-the-box determinism (especially for large-scale training and reproducibility), easy job resumption, and the ability to quickly debug / visualize individual examples. Mosaic Streaming provides a [great interface for this out of the box](https://docs.mosaicml.com/projects/streaming/en/stable/#key-features), so I'd love to see it supported in HF Datasets. ### Your contribution Happy to help test things / provide example data. Can potentially submit a PR if maintainers could point me to the necessary WebDataset logic / steps for adding a new streaming format! Hi ! that would be great :) Though note that `datasets` doesn't implement format-specific resuming when streaming, so in general I think it's better if users can use the mosaic-streaming library to read their MDS datasets. I wonder if they support `hf://` paths though... Anyway for those interested, the code for WebDataset is a single file here: https://github.com/huggingface/datasets/blob/main/src/datasets/packaged_modules/webdataset/webdataset.py. It implements `_split_generators` that downloads files and returns the lists of splits (train/validation/test) and `_split_generators` to generate examples (dicts) from the downloaded files. Streaming is automatically supported by making download steps lazy and by extending `open()` to work with remote URLs.
[ -0.4146052300930023, -0.04355272650718689, -0.032325077801942825, -0.4573640823364258, 0.020029135048389435, -0.13412955403327942, 0.30479830503463745, 0.23967790603637695, 0.005834711715579033, -0.10335679352283478, -0.5010004043579102, -0.3480696976184845, -0.34583404660224915, 0.5153269171714783, 0.20460788905620575, -0.18794295191764832, 0.1188793033361435, 0.023082450032234192, -0.16254599392414093, 0.060078151524066925, 0.27453699707984924, -0.07729756087064743, -0.038282085210084915, -0.18357069790363312, -0.03527560457587242, 0.2563883364200592, -0.2840988039970398, 0.2840283215045929, -0.1585429161787033, -0.07262460142374039, 0.06246902048587799, 0.5628833174705505, 0.3719300627708435, 0.5897576808929443, -0.00011769746924983338, -0.20324911177158356, 0.2832936942577362, -0.12924298644065857, -0.23790594935417175, 0.029073797166347504, -0.29108643531799316, -0.10314546525478363, -0.18746186792850494, 0.035235695540905, 0.05790848284959793, 0.18993014097213745, -0.016083134338259697, -0.4660983085632324, 0.16996687650680542, 0.16239593923091888, 0.08917804807424545, 0.16137073934078217, -0.1875152885913849, 0.07676973193883896, 0.3388335108757019, 0.544390082359314, -0.14244121313095093, 0.18700407445430756, 0.2887691855430603, -0.13028930127620697, -0.11711499840021133, 0.3636394143104553, -0.2675130069255829, -0.011136319488286972, 0.03847058117389679, -0.10934091359376907, 0.09867031127214432, -0.11314515769481659, -0.060380250215530396, 0.45311039686203003, 0.7570244073867798, -0.1770476996898651, -0.571130633354187, -0.23298829793930054, -0.06549788266420364, 0.02885347045958042, -0.25448185205459595, 0.3629848062992096, -0.04639304801821709, 0.2287595272064209, -0.4156571924686432, -0.35636886954307556, -0.23467516899108887, 0.18150648474693298, -0.027551379054784775, 0.20507758855819702, 0.03482300043106079, -0.2159394919872284, -0.06740647554397583, -0.1397596001625061, 0.4128243923187256, -0.35793638229370117, 0.058293215930461884, 0.05710781365633011, -0.42146825790405273, -0.31637638807296753, -0.3111361563205719, 0.2010001540184021, 0.3710651695728302, 0.07297783344984055, 0.07957633584737778, 0.23349350690841675, -0.08397376537322998, 0.1536763459444046, 0.03281770646572113, -0.27262261509895325, -0.11825051158666611, -0.4345034062862396, 0.08691156655550003, 0.08134687691926956, 0.2097925841808319, -0.04729962348937988, 0.0765153020620346, -0.02802424132823944, -0.4345276355743408, -0.31406256556510925, -0.1192593052983284, -0.1906445026397705, 0.08483576774597168, -0.03141539916396141, -0.010301411151885986, -0.22283801436424255, -0.027957681566476822, 0.2588683068752289, 0.03495953232049942, 0.2777268588542938, -0.2607716917991638, 0.21501295268535614, -0.1501474529504776, -0.45649704337120056, -0.05709567293524742, 0.05665433779358864, -0.20285646617412567, 0.30444806814193726, 0.07288059592247009, 0.06397844851016998, -0.09232930094003677, -0.09181280434131622, 0.6172334551811218, 0.528566837310791, -0.09143316000699997, -0.050889186561107635, 0.15431305766105652, 0.3481559157371521, -0.0922691598534584, 0.1730782836675644, 0.12781935930252075, 0.1290522813796997, 0.004176720976829529, -0.13790610432624817, -0.03693301975727081, -0.22727341949939728, -0.14971734583377838, 0.030085891485214233, -0.2095412015914917, -0.050248950719833374, -0.6386755108833313, 0.2980576157569885, -0.3578924238681793, -0.09015661478042603, -0.17299601435661316, -0.0934794694185257, -0.14353959262371063, -0.23154011368751526, 0.2565925717353821, 0.366907000541687, -0.14174209535121918, -0.027115993201732635, -0.08176546543836594, 0.14594420790672302, 0.12780073285102844, -0.004491992294788361, -0.2418029010295868, -0.1321670413017273, -0.02180328406393528, 0.2617715001106262, 0.4987994134426117, -0.2637084424495697, 0.061843566596508026, 0.28190720081329346, 0.3181039094924927, 0.27024927735328674, 0.1156754121184349, -0.2371358871459961, 0.3664322793483734, -0.2176709771156311, -0.3607703745365143, 0.49257755279541016, -0.1959863305091858, 0.05344408005475998, -0.15014450252056122, -0.37835684418678284, -0.08185844123363495, 0.3864508271217346, 0.29999181628227234, 0.06854652613401413, 0.41294100880622864, -0.04977148398756981, 0.29384273290634155, -0.19725409150123596, 0.2949357330799103, -0.2145531177520752, 0.2295757532119751, 0.322563111782074, 0.06529299169778824, -0.34819167852401733, -0.21665659546852112, 0.2149367332458496, 0.2706874907016754, -0.2789773643016815, -0.05086784064769745, -0.13838548958301544, 0.06203968822956085, -0.1867990642786026, -0.0023697614669799805, -0.22425201535224915, 0.02920394390821457, 0.3320161998271942, -0.009055675938725471, 0.010208986699581146, -0.26608002185821533, 0.3199065029621124, -0.07945974171161652, -0.01804489642381668, 0.11685337126255035, 0.7181031703948975, 0.06872900575399399, -0.0744226947426796, 0.06824671477079391, 0.12038995325565338, -0.10372834652662277, -0.15841840207576752, 0.07068654894828796, 0.41621676087379456, -0.21864551305770874, 0.18634864687919617, 0.48767170310020447, 0.561254620552063, 0.19191710650920868, -0.18352444469928741, 0.31412822008132935, -0.2889156639575958, 0.10842639952898026, -0.1344250738620758, -0.06414220482110977, 0.22860154509544373, -0.3535759747028351, 0.08229506015777588, 0.11885121464729309, 0.1484445184469223, 0.381445050239563, 0.06981678307056427, -0.17808648943901062, 0.12166087329387665, -0.01865648850798607, -0.19545204937458038, -0.33713677525520325, -0.6120777726173401, -0.29383713006973267, 0.1342768371105194, 0.43291354179382324, -0.2449152022600174, -0.16517996788024902, 0.12227806448936462, -0.18519821763038635, 0.049783870577812195, 0.44499555230140686, 0.27432143688201904, 0.34185850620269775, 0.2303902804851532, 0.20525482296943665, -0.0450851172208786, 0.10309111326932907, -0.06972828507423401, 0.01730407029390335, 0.11155910044908524, -0.07866102457046509, 0.12346556782722473, 0.034624624997377396, 0.03248794004321098, -0.08516833931207657, -0.26844480633735657, -0.06039087474346161, -0.21668866276741028, -0.13811056315898895, 0.15155847370624542, -0.24388332664966583, -0.12307949364185333, -0.2275240570306778, -0.17643725872039795, -0.15916675329208374, -0.33566099405288696, -0.10384082794189453, 0.3246639668941498, 0.03842689469456673, 0.07779946178197861, 0.07660709321498871, 0.31119513511657715, -0.2323518693447113, 0.4208756685256958, -0.14162161946296692, -0.04639206826686859, 0.1140756607055664, 0.06893670558929443, 0.30176445841789246, 0.1386103481054306, 0.23518744111061096, 0.03358828276395798, 0.3281877636909485, -0.6406849026679993, -0.18061579763889313, 0.14665603637695312, 0.09331073611974716, 0.0033781789243221283, -0.1379305124282837, 0.08401437848806381, -0.03347260132431984, -0.12618803977966309, -0.05424417927861214, -0.2172735333442688, 0.14650271832942963, -0.013761887326836586, 0.0766918733716011, 0.07944390922784805, -0.1669030338525772, 0.35412925481796265, -0.46549761295318604, -0.3618081510066986, -0.10844632983207703, -0.08893433213233948, -0.05834108591079712, -0.1809803694486618, -0.1592114269733429, 0.03203408792614937, -0.2896399199962616, 0.06746327877044678, -0.15626807510852814, -0.4490480124950409, 0.35225170850753784, -0.3217540681362152, -0.5058043599128723, 0.35520777106285095, -0.0792379230260849, -0.03739326819777489, 0.8098019957542419, -0.009731978178024292, 0.0753018781542778, 0.1661098450422287, -0.2187468707561493, -0.04330090433359146, -0.036015525460243225, 0.21423153579235077, -0.165668323636055, 0.0971374660730362, -0.26470717787742615, 0.15282636880874634, -0.2821887135505676, 0.21136105060577393, 0.0752241313457489, 0.10698413848876953, 0.34708333015441895, 0.3558463752269745, 0.8911809325218201, 0.0937170535326004, 0.06271730363368988, 0.09347306191921234, 0.34143275022506714, 0.24772271513938904, 0.052254270762205124, 0.0245176013559103, 0.24006830155849457, -0.09138968586921692, 0.26134657859802246, 0.49409371614456177, 0.09282638877630234, -0.11626555770635605, -0.3169157803058624, 0.1827486902475357, -0.25243446230888367, -0.2040819674730301, 0.13169939815998077, -0.4420816898345947, 0.33210358023643494, 0.05873836949467659, -0.13083063066005707, 0.009136779233813286, -0.08677514642477036, 0.24041897058486938, 0.9009700417518616, 0.08655776083469391, 0.20501092076301575, 0.15855270624160767, 0.04958309978246689, -0.031902849674224854, 0.12754416465759277, 0.31585830450057983, 0.16527844965457916, -0.16807422041893005, -0.13746967911720276, -0.007263660430908203, -0.003277501557022333, 0.4531664252281189, -0.8070036768913269, -0.2718632221221924, 0.04815598204731941, -0.023624032735824585, 0.11878929287195206, -0.2599947452545166, -0.06449120491743088, 0.0065287514589726925, -0.29519444704055786, 0.07352670282125473, -0.05215713009238243, -0.25977423787117004, -0.04421611875295639, -0.14865951240062714, 0.04071600362658501, -0.07249794155359268, 0.11659562587738037, 0.2286681830883026, -0.2805652320384979, -0.17758670449256897, -0.013922576792538166, -0.2160753309726715, -0.38226553797721863, -0.06181171536445618, -0.08023446798324585, 0.05795527994632721, 0.18896082043647766, 0.13056209683418274, -0.03714693710207939, 0.15491949021816254, -0.04188597947359085, 0.10963322967290878, 0.16004447638988495, 0.3028903901576996, 0.07951240986585617, 0.1532452255487442, -0.031149864196777344, 0.11251724511384964, -0.1726968139410019, 0.20946359634399414, 0.36907947063446045, 0.17123953998088837, 0.054778311401605606, 0.030476968735456467, 0.015984341502189636, -0.3546542227268219, 0.17584766447544098, 0.21511204540729523, -0.07598011940717697, -0.26062318682670593, -0.5606212019920349, 0.2864793539047241, -0.3471984565258026, -0.074210986495018, 0.010020345449447632, 0.3637086749076843, -0.04116121679544449, 0.12320849299430847, 0.031059931963682175, 1.0324594974517822, -0.17161059379577637, 0.11647368967533112, 0.09285535663366318, -0.39840245246887207, -0.117251455783844, -0.2987428307533264, -0.2173437774181366, 0.027890410274267197, -0.07485642284154892, -0.30065688490867615, -0.060594283044338226, 0.47495272755622864, 0.1348555088043213, -0.16883844137191772, 0.14040039479732513, 0.4372696280479431, 0.8123124837875366, 0.1592954844236374, 0.16319206357002258, 0.13575462996959686, -0.32334110140800476, -0.3633352816104889, 0.12474861741065979, -0.16359923779964447, -0.2499452829360962, -0.13926219940185547, -0.2878287434577942, 0.0643710047006607, 0.39275944232940674, -0.35890984535217285, 0.01659879833459854, 0.4148302674293518, 0.01202388759702444, -0.3421168923377991, -0.2234775573015213, 0.28544434905052185, -0.10658983886241913, 0.20243681967258453, -0.0696917325258255, -0.2951482832431793, 0.09898251295089722, -0.04092233628034592, 0.20895496010780334, -0.36478376388549805, -0.2231568694114685, 0.3418208360671997, -0.09118957817554474, 0.12143170088529587, 0.2025224268436432, 0.24335196614265442, -0.2119094729423523, -0.24490368366241455, -0.04762449115514755, 0.7161819934844971, -0.012259839102625847, 0.22407621145248413, 0.16028524935245514, -0.0014836154878139496, 0.13688768446445465, 0.03364836052060127, 0.23064479231834412, 0.02674867957830429, 0.1677350401878357, -0.2655240297317505, 0.3194137513637543, -0.23499487340450287, 0.3212921917438507, -0.07060687988996506, 0.00894366204738617, -0.059868767857551575, -0.02724887803196907, -0.42584681510925293, -0.02066107839345932, -0.18057429790496826, -0.17428968846797943, -0.15989452600479126, -0.1374697983264923, -0.1905711144208908, -0.054489634931087494, 0.20677703619003296, -0.2409047782421112, 0.008163850754499435, -0.39647266268730164, -0.17630267143249512, -0.2999234199523926, 0.3174945116043091, 0.04564168304204941, -0.5836746096611023, 0.07524777948856354, 0.06146271526813507, 0.26562878489494324, -0.1507926881313324, -0.07989663630723953, -0.23795390129089355, 0.05302043259143829, 0.38194194436073303, 0.13517676293849945, -0.08353132754564285, -0.17058822512626648, 0.07038376480340958, -0.240790456533432, -0.09614738821983337, -0.027099136263132095, -0.4006405174732208, -0.05610553175210953, -0.131402388215065, 0.20862159132957458, 0.3179866671562195, 0.05906596779823303, 0.21465805172920227, 0.02388128638267517, -0.30833935737609863, -0.2079116702079773, 0.2061198204755783, -0.12970703840255737, -0.0850781798362732, 0.04191213846206665, 1.0357810258865356, -0.20078399777412415, -0.2574581503868103, -0.018184486776590347, 0.1772986501455307, 0.18352237343788147, -0.04217777028679848, 0.03210826963186264, -0.10584159195423126, -0.17726992070674896, -0.03543993830680847, 0.44851478934288025, 0.2873963713645935, -0.06733310967683792, 0.7349017262458801, -0.015277817845344543, 0.12939780950546265, 0.003528935369104147, 0.5957785844802856, -0.03720984607934952, -0.0623779334127903, -0.32177314162254333, 0.4735908806324005, 0.029924564063549042, 0.05290018022060394, -0.19478052854537964, 0.15090312063694, -0.14344902336597443, 0.15807360410690308, 0.040992945432662964, 0.41435232758522034, -0.03361060470342636, 0.13082821667194366, 0.1379004418849945, 0.1248563602566719, -0.1998709887266159, 0.15968701243400574, 0.3418792486190796, 0.2642173767089844, 0.2529204189777374, -0.08319350332021713, 0.07610473781824112, 0.09820771962404251, 0.43836385011672974, -0.1072004958987236, 0.4154498875141144, 0.20023465156555176, -0.06745773553848267, 0.21389585733413696, -0.6187958121299744, -0.05308083817362785, 0.0022627711296081543, 0.1478099226951599, 0.35811465978622437, 0.01498287171125412, 0.14121891558170319, 0.20740841329097748, -0.17488008737564087, -0.052198052406311035, 0.04291502386331558, 0.24494299292564392, 0.10129603743553162, 0.29961568117141724, 0.008465595543384552, -0.31442832946777344, 0.049535397440195084, -0.15403665602207184, 0.025649547576904297, 0.3896840810775757, 0.047025226056575775, 0.3564424514770508, -0.05292336642742157, 0.11166658252477646, -0.041511811316013336, 0.14248254895210266, -0.14312505722045898, -0.10524258762598038, 0.27449432015419006, -0.21049007773399353, 0.2940368354320526, -0.1282387226819992, 0.005426220595836639, 0.041824810206890106, -0.053431201726198196, 0.04796634614467621, 0.10598953068256378, -0.052617430686950684, 0.2566218972206116, 0.08311770856380463, 0.015727929770946503, -0.12940095365047455, 0.2741774618625641, 0.09064587205648422, -0.05969405174255371, 0.027845071628689766, -0.1695876568555832, -0.031679946929216385, -0.3533857464790344, 0.019864775240421295, 0.17834751307964325, 0.29697850346565247, 0.0012955926358699799, 0.060490019619464874, -0.38275134563446045, -0.3442629873752594, 0.022046685218811035, -0.1314946711063385, -0.050760313868522644, 0.05754884332418442, 0.004648489877581596, 0.16686300933361053, 0.44565367698669434, 0.07206142693758011, 0.018650460988283157, 0.19785763323307037, -0.2972109317779541, -0.3887005150318146, -0.2903755009174347, -0.0259665809571743, 0.14796441793441772, 0.15456034243106842, 0.19516800343990326, 0.30315670371055603, 0.2721942663192749, -0.02568453550338745, -0.22318169474601746, 0.024971403181552887, 0.02343086525797844, -0.2785259783267975, -0.279058039188385, 0.015102244913578033, 0.059045322239398956, -0.16751018166542053, -0.04045150801539421, 0.314510315656662, 0.20303262770175934, 0.0027381740510463715, 0.1842469871044159, -0.08733877539634705, 0.10282936692237854, -0.4221818745136261, -0.19810736179351807, -0.1625049114227295, 0.005124203860759735, -0.10506413131952286, -0.18160390853881836, -0.1266254186630249, -0.005279256496578455, -0.07452697306871414, -0.061945267021656036, -0.3093056082725525, 0.6321080923080444, -0.13147369027137756, -0.029430706053972244, -0.1461770087480545, 0.33945131301879883, -0.09356071054935455, -0.013711122795939445, -0.18768131732940674, 0.13795122504234314, -0.10733602941036224, 0.276690810918808, 0.10627777874469757, 0.08588996529579163, -0.13831424713134766, 0.2241484522819519, -0.12362271547317505, -0.12856781482696533, 0.5932526588439941, -0.30539992451667786, -0.2115686684846878, -0.12402279675006866, -0.026586145162582397, -0.031203679740428925, 0.2432963252067566, -0.5759153366088867, -0.11666427552700043, 0.11495567113161087, 0.04383005201816559, 0.24803802371025085, 0.45965123176574707, 0.3296626806259155, -0.19746610522270203, -0.13435763120651245, -0.2656738758087158, 0.016361486166715622, -0.13220012187957764, -0.037720780819654465, -0.21045395731925964 ]
https://github.com/huggingface/datasets/issues/6734
Tokenization slows towards end of dataset
Hi ! First note that if the dataset is not heterogeneous / shuffled, there might be places in the data with shorter texts that are faster to tokenize. Moreover, the way `num_proc` works is by slicing the dataset and passing each slice to a process to run the `map()` function. So at the very end of `map()`, some processes might have finished transforming their slice of data while others are still running, causing the throughput to become lower.
### Describe the bug Mapped tokenization slows down substantially towards end of dataset. train set started off very slow, caught up to 20k then tapered off til the end. what's particularly strange is that the tokenization crashed a few times before due to errors with invalid tokens somewhere or corrupted downloads, and the speed ups/downs consistently happened the same times ```bash Running tokenizer on dataset (num_proc=48): 0%| | 847000/881416735 [12:18<252:45:45, 967.72 examples/s] Running tokenizer on dataset (num_proc=48): 0%| | 848000/881416735 [12:19<224:16:10, 1090.66 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84964000/881416735 [3:48:00<11:21:34, 19476.01 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84967000/881416735 [3:48:00<12:04:01, 18333.79 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538631977/881416735 [13:46:40<27:50:04, 3420.84 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538632977/881416735 [13:46:40<23:48:20, 3999.77 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881365886/881416735 [38:30:19<04:34, 185.10 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881366886/881416735 [38:30:25<04:36, 180.57 examples/s] ``` and validation set as well ```bash Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41544000/46390354 [28:44<02:37, 30798.76 examples/s] Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41550000/46390354 [28:44<02:08, 37698.08 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:15:48<12:22:44, 36.87 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:16:00<12:22:44, 36.87 examples/s] ``` ### Steps to reproduce the bug using the following kwargs ```python with accelerator.main_process_first(): lm_datasets = tokenized_datasets.map( group_texts, batched=True, num_proc=48 load_from_cache_file=True, desc=f"Grouping texts in chunks of {block_size}", ) ``` running through slurm script ```bash #SBATCH --partition=gpu-nvidia-a100 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --gpus-per-task=8 #SBATCH --cpus-per-task=96 ``` using this dataset https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T ### Expected behavior Constant speed throughout ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-5.15.0-1049-aws-x86_64-with-glibc2.10 - Python version: 3.8.18 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
78
Tokenization slows towards end of dataset ### Describe the bug Mapped tokenization slows down substantially towards end of dataset. train set started off very slow, caught up to 20k then tapered off til the end. what's particularly strange is that the tokenization crashed a few times before due to errors with invalid tokens somewhere or corrupted downloads, and the speed ups/downs consistently happened the same times ```bash Running tokenizer on dataset (num_proc=48): 0%| | 847000/881416735 [12:18<252:45:45, 967.72 examples/s] Running tokenizer on dataset (num_proc=48): 0%| | 848000/881416735 [12:19<224:16:10, 1090.66 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84964000/881416735 [3:48:00<11:21:34, 19476.01 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84967000/881416735 [3:48:00<12:04:01, 18333.79 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538631977/881416735 [13:46:40<27:50:04, 3420.84 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538632977/881416735 [13:46:40<23:48:20, 3999.77 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881365886/881416735 [38:30:19<04:34, 185.10 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881366886/881416735 [38:30:25<04:36, 180.57 examples/s] ``` and validation set as well ```bash Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41544000/46390354 [28:44<02:37, 30798.76 examples/s] Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41550000/46390354 [28:44<02:08, 37698.08 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:15:48<12:22:44, 36.87 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:16:00<12:22:44, 36.87 examples/s] ``` ### Steps to reproduce the bug using the following kwargs ```python with accelerator.main_process_first(): lm_datasets = tokenized_datasets.map( group_texts, batched=True, num_proc=48 load_from_cache_file=True, desc=f"Grouping texts in chunks of {block_size}", ) ``` running through slurm script ```bash #SBATCH --partition=gpu-nvidia-a100 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --gpus-per-task=8 #SBATCH --cpus-per-task=96 ``` using this dataset https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T ### Expected behavior Constant speed throughout ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-5.15.0-1049-aws-x86_64-with-glibc2.10 - Python version: 3.8.18 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0 Hi ! First note that if the dataset is not heterogeneous / shuffled, there might be places in the data with shorter texts that are faster to tokenize. Moreover, the way `num_proc` works is by slicing the dataset and passing each slice to a process to run the `map()` function. So at the very end of `map()`, some processes might have finished transforming their slice of data while others are still running, causing the throughput to become lower.
[ -0.44143927097320557, 0.04940517246723175, -0.08252695947885513, 0.10362903773784637, 0.3059098720550537, -0.17579758167266846, 0.24827998876571655, 0.37538379430770874, -0.3185052275657654, 0.14226257801055908, 0.18136216700077057, 0.49972817301750183, -0.111054427921772, -0.1634110063314438, -0.08602093905210495, -0.11565445363521576, 0.21469330787658691, 0.07804543524980545, 0.025786880403757095, -0.017286743968725204, 0.18273040652275085, -0.013504495844244957, -0.23493963479995728, 0.1311577707529068, -0.2631019353866577, -0.16415739059448242, 0.12260539829730988, -0.25714215636253357, -0.3150815963745117, -0.4975307881832123, -0.09119019657373428, 0.08907754719257355, -0.09130018204450607, 0.35260385274887085, -0.00010542925156187266, -0.12927933037281036, 0.018030166625976562, 0.3359244763851166, -0.0024002641439437866, 0.12935973703861237, 0.11064689606428146, -0.2394494265317917, -0.1630263328552246, 0.006374634802341461, 0.0007241591811180115, -0.0655115619301796, -0.11668109893798828, -0.1115259975194931, 0.23207640647888184, 0.2193603813648224, 0.26776379346847534, 0.1563020795583725, -0.23467783629894257, -0.028462927788496017, 0.007535718381404877, -0.07347148656845093, -0.24808251857757568, 0.032838307321071625, 0.32287007570266724, -0.175649955868721, -0.20636478066444397, 0.14963491261005402, 0.023766061291098595, -0.302198588848114, 0.19816771149635315, -0.06342020630836487, 0.09829659759998322, -0.14988262951374054, 0.12258584052324295, 0.06863860785961151, 0.016214214265346527, -0.015996001660823822, -0.12558646500110626, -0.30161166191101074, -0.13145041465759277, -0.45854809880256653, 0.1978071928024292, -0.3698260188102722, -0.008916476741433144, 0.048242393881082535, -0.44874307513237, 0.18559834361076355, -0.0005270913243293762, 0.17283403873443604, -0.2814420461654663, 0.4715214967727661, 0.03798617795109749, 0.05092931166291237, -0.09320288896560669, -0.3054620623588562, -0.2230248600244522, -0.1343982219696045, -0.08169098198413849, 0.15384915471076965, -0.29386159777641296, -0.21951919794082642, 0.05773311108350754, -0.18109098076820374, 0.085005983710289, 0.25719666481018066, -0.2911766469478607, 0.40370699763298035, 0.18351170420646667, -0.02608831226825714, 0.31336474418640137, 0.2442850023508072, -0.09456237405538559, 0.37772253155708313, 0.3134448528289795, -0.16281898319721222, -0.13975459337234497, 0.026022378355264664, -0.24729067087173462, 0.0039256252348423, 0.2104068100452423, -0.00540531799197197, -0.24217340350151062, -0.14755453169345856, -0.3058595061302185, 0.1991625726222992, -0.20060616731643677, 0.2811760902404785, 0.30636918544769287, 0.31379979848861694, -0.0765487402677536, 0.07767082005739212, -0.48295629024505615, -0.2977341413497925, -0.20033791661262512, 0.20289644598960876, -0.11577204614877701, -0.10132704675197601, -0.4456021189689636, -0.06772171705961227, -0.012560993432998657, 0.08272464573383331, 0.01826620101928711, 0.2288832664489746, -0.2047499567270279, -0.11104320734739304, 0.13291878998279572, -0.22886903584003448, 0.07241186499595642, -0.057257670909166336, -0.3286837637424469, 0.27552366256713867, -0.15564505755901337, 0.13834165036678314, -0.25501933693885803, -0.14705368876457214, -0.21130326390266418, -0.1914665699005127, -0.038320720195770264, 0.3269493281841278, -0.10823233425617218, -0.138047993183136, -0.2015845775604248, 0.18238186836242676, 0.15660163760185242, 0.05132528766989708, 0.020406730473041534, -0.2239534705877304, -0.21559828519821167, -0.06547798961400986, 0.2967362403869629, 0.07948768138885498, -0.12288551032543182, -0.14991632103919983, -0.02635779231786728, 0.1445431113243103, 0.47481662034988403, 0.44930949807167053, -0.1352919191122055, 0.334079772233963, -0.3656613528728485, 0.5560070872306824, 0.22587110102176666, -0.13187851011753082, -0.3691479563713074, 0.11471523344516754, -0.46882516145706177, 0.14354650676250458, -0.30154651403427124, -0.04931935667991638, 0.608967661857605, -0.13469962775707245, 0.19142304360866547, 0.18506190180778503, -0.005546929314732552, 0.024457523599267006, -0.471303254365921, 0.0337415412068367, 0.20057432353496552, 0.037561316043138504, 0.13461577892303467, -0.3576030135154724, -0.10740175098180771, 0.15571990609169006, 0.026257872581481934, 0.13296876847743988, 0.041333675384521484, 0.02038867585361004, 0.29411157965660095, 0.009711816906929016, 0.08137530088424683, -0.2989855408668518, 0.16799943149089813, 0.20482274889945984, 0.12187525629997253, -0.11284421384334564, 0.041791241616010666, -0.2171262800693512, -0.23030692338943481, -0.04000450670719147, -0.1433211714029312, -0.06259883940219879, 0.23131069540977478, -0.08909286558628082, -0.21450528502464294, 0.07671865820884705, -0.1960226446390152, -0.2104906588792801, 0.030090635642409325, 0.08819187432527542, 0.32847610116004944, 0.11957903206348419, -0.09962470084428787, -0.10920991003513336, -0.12885306775569916, 0.22079885005950928, 0.1931721568107605, -0.28936025500297546, 0.011657469905912876, 0.5026166439056396, 0.2797914147377014, 0.10530566424131393, -0.11586115509271622, 0.1490880697965622, 0.25495612621307373, 0.28614020347595215, 0.03684021905064583, 0.07822352647781372, -0.27121591567993164, -0.14819423854351044, 0.21070021390914917, 0.4184178113937378, 0.365620881319046, 0.08369041979312897, 0.009785812348127365, 0.07978552579879761, 0.1688908487558365, -0.010866839438676834, 0.09274716675281525, -0.1995728313922882, 0.3027912974357605, -0.04898667708039284, 0.1696029007434845, -0.0509001761674881, -0.08733613789081573, 0.3657347857952118, 0.3732052147388458, -0.09315735101699829, 0.016583625227212906, 0.06756598502397537, -0.0354643240571022, -0.12369003146886826, 0.029770899564027786, -0.043875835835933685, 0.09441524744033813, 0.10896455496549606, 0.25616171956062317, -0.03129943460226059, -0.05864882469177246, -0.18783770501613617, 0.20477032661437988, -0.01991649717092514, -0.025530997663736343, 0.34767842292785645, -0.02746172808110714, 0.2558315098285675, -0.32749295234680176, -0.435272216796875, 0.013974374160170555, 0.28279420733451843, -0.19821640849113464, 0.11532606929540634, -0.4370192289352417, 0.03581196069717407, -0.1237853467464447, -0.12651337683200836, -0.11705896258354187, -0.26805350184440613, 0.20463714003562927, -0.054141607135534286, -0.08016808331012726, 0.4149782061576843, -0.1478062868118286, 0.21917039155960083, 0.057534217834472656, 0.33163052797317505, -0.1093512699007988, -0.0026870956644415855, -0.578693687915802, 0.1537916660308838, 0.44353073835372925, -0.14883486926555634, 0.42521175742149353, 0.10221605747938156, -0.2492421567440033, -0.13013611733913422, -0.6257583498954773, 0.01999116688966751, -0.1159839928150177, 0.138202965259552, 0.2166212499141693, -0.14564569294452667, -0.3452885150909424, -0.11540181189775467, 0.1723870486021042, -0.05277322605252266, -0.21094942092895508, -0.04260072857141495, -0.05564595386385918, -0.15691471099853516, -0.10977105796337128, -0.024513565003871918, 0.03888791799545288, -0.13352692127227783, 0.055258944630622864, -0.2348913699388504, 0.0813753679394722, 0.2253914326429367, -0.22304576635360718, 0.2431066483259201, -0.25220489501953125, -0.190174400806427, -0.10566967725753784, -0.05316144973039627, 0.11313889920711517, -0.049013651907444, -0.12612612545490265, -0.042543862015008926, 0.10697901248931885, 0.07653766870498657, 0.14021651446819305, -0.3057903051376343, 0.2854154706001282, -0.06549431383609772, 0.3278283476829529, -0.21954470872879028, -0.43605300784111023, 0.23301833868026733, 0.08731219917535782, -0.20302683115005493, 0.12655147910118103, -0.0250057652592659, -0.04698944836854935, -0.31772756576538086, 0.054093316197395325, -0.4451938271522522, 0.4118499159812927, 0.311952143907547, 0.7117326855659485, -0.06046028807759285, -0.21832726895809174, -0.12022386491298676, -0.024421265348792076, -0.04538804665207863, -0.2673661708831787, -0.23236225545406342, 0.24963226914405823, -0.039344385266304016, -0.20280614495277405, 0.1392543911933899, -0.03457028046250343, -0.21727636456489563, 0.2834959328174591, -0.1309288591146469, 0.35788121819496155, -0.20193049311637878, 0.12840363383293152, -0.3741109073162079, 0.15343067049980164, -0.16584870219230652, 0.44812843203544617, -0.1743561029434204, -0.0720420628786087, 0.22447341680526733, -0.03417082130908966, -0.00032223761081695557, -0.40053313970565796, -0.919368326663971, 0.1717377007007599, -0.44862478971481323, 0.10081499069929123, 0.01158030703663826, 0.5115516185760498, -0.08118384331464767, 0.09289895743131638, 0.1452581137418747, -0.03595331311225891, 0.3962228298187256, 0.07183072715997696, 0.11578451842069626, 0.20733971893787384, -0.10351892560720444, -0.2366633415222168, -0.25995561480522156, 0.023779984563589096, 0.24790985882282257, 0.6036767363548279, 0.7584445476531982, -0.23846742510795593, -0.27365490794181824, 0.1728936731815338, -0.10960040241479874, 0.08150087296962738, 0.02572764828801155, 0.06776300072669983, 0.07771928608417511, 0.15870510041713715, 0.45299652218818665, -0.006444569677114487, 0.10226201266050339, -0.021674707531929016, -0.5794144868850708, -0.009322980418801308, -0.20258307456970215, 0.14588487148284912, 0.12160421907901764, 0.04369616508483887, -0.1077534481883049, 0.438344269990921, -0.03931465744972229, 0.12285368144512177, 0.23049654066562653, -0.19851155579090118, 0.2510741055011749, -0.20134320855140686, 0.13844144344329834, 0.10856463760137558, 0.12127029895782471, 0.3958379924297333, -0.0864868089556694, 0.2609017491340637, -0.2238028645515442, 0.35990703105926514, -0.25730621814727783, 0.4584426283836365, 0.3117169439792633, 0.2122112661600113, -0.6865146160125732, 0.04489494860172272, -0.011782288551330566, 0.07348935306072235, -0.2446104884147644, 0.3726252019405365, -0.1656985729932785, -0.3993048369884491, 0.4372851252555847, 0.3267151713371277, 0.7956240177154541, 0.07965335249900818, -0.0492384172976017, 0.1399346888065338, 0.026547595858573914, 0.041659001260995865, -0.4772910475730896, 0.12568798661231995, -0.33470362424850464, -0.01082101371139288, 0.06599891185760498, -0.03753963112831116, 0.057830940932035446, 0.11825643479824066, -0.1430034190416336, -0.2044798880815506, -0.056216780096292496, 0.624270498752594, -0.20732779800891876, 0.21581658720970154, -0.022100066766142845, -0.1022048145532608, 0.05203565955162048, 0.2523425221443176, 0.03077329508960247, -0.03336634114384651, -0.053994011133909225, 0.06057753786444664, -0.12195833027362823, -0.1055934727191925, -0.3498836159706116, -0.12973034381866455, -0.2947461009025574, 0.26117730140686035, -0.13484792411327362, 0.02827078104019165, 0.06215764209628105, -0.2730048894882202, 0.07429441064596176, 0.4309588372707367, 0.044883884489536285, 0.3858833312988281, -0.0427868515253067, 0.07465869188308716, 0.4342058002948761, -0.39281904697418213, 0.02399732545018196, -0.139752596616745, 0.04007352143526077, -0.15084394812583923, 0.07453013211488724, -0.09127963334321976, -0.3024047017097473, 0.01938902959227562, 0.4087233543395996, -0.2502921223640442, 0.10899771749973297, 0.08187101781368256, 0.13797707855701447, -0.2522251307964325, 0.21890535950660706, 0.030416693538427353, 0.08755066245794296, 0.32320502400398254, -0.09282781183719635, -0.059033047407865524, -0.08546574413776398, 0.2948545515537262, -0.12836125493049622, -0.1741763949394226, 0.5462303161621094, -0.17215974628925323, -0.27162402868270874, -0.29205456376075745, 0.3407755494117737, 0.37594306468963623, -0.06602026522159576, -0.007262342609465122, -0.4076385796070099, -0.060170091688632965, 0.029609518125653267, 0.2701917588710785, 0.10922421514987946, -0.20572462677955627, -0.29099664092063904, -0.2045852690935135, -0.2171829342842102, -0.16297759115695953, 0.007902216166257858, 0.22391778230667114, -0.25878506898880005, 0.3276292681694031, -0.4287753403186798, 0.10281233489513397, -0.37734687328338623, 0.017983701080083847, -0.17962360382080078, 0.17603826522827148, -0.37728622555732727, -0.18563619256019592, -0.0793338194489479, -0.17413797974586487, 0.18973462283611298, 0.15993869304656982, -0.13148793578147888, -0.2762955129146576, -0.10274696350097656, 0.0737767219543457, -0.06445696204900742, -0.3663560152053833, 0.1846054047346115, 0.1938423067331314, -0.1224871426820755, -0.23874521255493164, 0.02142113447189331, 0.10046156495809555, -0.011135891079902649, -0.025734618306159973, 0.3659619688987732, 0.18312039971351624, 0.2284780591726303, -0.216437429189682, 0.13536667823791504, 0.2762121260166168, 0.14611631631851196, 0.30785611271858215, 0.12932908535003662, -0.15143057703971863, -0.13994577527046204, 0.3117644786834717, 0.10076451301574707, 0.18425801396369934, 0.4181608259677887, -0.08069328963756561, -0.1550954431295395, 0.4013727307319641, -0.10335396975278854, 0.6772356629371643, -0.23926106095314026, -0.49645763635635376, 0.25881195068359375, 0.3289862275123596, 0.19866806268692017, -0.2203681468963623, 0.32656773924827576, 0.04163128137588501, -0.08646558225154877, -0.10156280547380447, 0.1497255265712738, -0.16335448622703552, -0.07786671817302704, 0.15456289052963257, 0.47032326459884644, -0.14829128980636597, 0.18304823338985443, 0.08731542527675629, -0.015006471425294876, -0.061735186725854874, 0.1453966647386551, -0.10496291518211365, 0.19187495112419128, 0.44125622510910034, 0.10146239399909973, 0.44047364592552185, 0.315170019865036, 0.4728415608406067, -0.06322800368070602, -0.09206436574459076, -0.14870713651180267, 0.3639112114906311, -0.17122840881347656, 0.10094834864139557, 0.1717463880777359, 0.24057573080062866, -0.1258019059896469, -0.4555239975452423, -0.1307336688041687, 0.12705473601818085, -0.399075448513031, -0.0026431907899677753, -0.25268784165382385, -0.015772774815559387, -0.1096416637301445, 0.17987188696861267, -0.03650319203734398, 0.17894914746284485, -0.09734216332435608, -0.0035022199153900146, -0.20966346561908722, -0.20470687747001648, -0.01632063463330269, -0.08994748443365097, 0.41320016980171204, -0.26496168971061707, 0.3434886932373047, -0.2144080251455307, 0.10197819769382477, -0.13060948252677917, 0.11263056844472885, 0.3520074188709259, 0.39697396755218506, -0.0040612053126096725, -0.00706080999225378, -0.10942971706390381, 0.06703295558691025, 0.0693986639380455, 0.5786603093147278, -0.12057247757911682, -0.083195760846138, 0.16261865198612213, 0.11274074018001556, -0.23713351786136627, -0.1381778120994568, 0.17043989896774292, -0.06091359630227089, 0.013182276859879494, -0.037619449198246, 0.05772370100021362, -0.16233199834823608, -0.10619586706161499, 0.043153587728738785, 0.17933285236358643, -0.07078828662633896, 0.2192729115486145, 0.08901958167552948, 0.1492910385131836, -0.2369145154953003, 0.1356884241104126, 0.06031406670808792, 0.3695826530456543, 0.22567085921764374, -0.049619004130363464, -0.4611213505268097, -0.42165637016296387, -0.0434635728597641, 0.20536647737026215, -0.13136939704418182, -0.04695907235145569, -0.08442237228155136, 0.08574717491865158, -0.13723161816596985, -0.030595101416110992, 0.15284819900989532, 0.16263966262340546, -0.1731678992509842, 0.20205071568489075, -0.27510005235671997, 0.42753589153289795, -0.16566088795661926, 0.03805488348007202, -0.0000015031546354293823, -0.26437094807624817, 0.5535087585449219, 0.032607585191726685, 0.06537046283483505, 0.16214124858379364, -0.1672155261039734, -0.003338271751999855, -0.01051531732082367, 0.5119613409042358, 0.17202354967594147, 0.12407099455595016, 0.10894802957773209, 0.1731783002614975, -0.37562796473503113, -0.22050374746322632, -0.22283317148685455, 0.25114890933036804, 0.14691665768623352, 0.047810398042201996, 0.21093900501728058, -0.09385821223258972, -0.08499262481927872, 0.04937705770134926, 0.14471369981765747, -0.20483346283435822, -0.06246892362833023, 0.09866049140691757, 0.1870439648628235, 0.1788209080696106, -0.29690316319465637, 0.2595278322696686, 0.20453907549381256, 0.18713441491127014, -0.36080580949783325, -0.418401837348938, 0.18995033204555511, -0.31680312752723694, -0.21674208343029022, -0.2509932219982147, 0.23789429664611816, 0.38774919509887695, 0.015338929370045662, -0.458467036485672, -0.40456604957580566, 0.44557392597198486, 0.006599428132176399, -0.1870124340057373, 0.18086585402488708, 0.07230706512928009, -0.08113805949687958, -0.10763345658779144, 0.5177510976791382, -0.1583487093448639, -0.14584431052207947, 0.2677958607673645, -0.16802427172660828 ]
https://github.com/huggingface/datasets/issues/6734
Tokenization slows towards end of dataset
I did see some comments about how num_proc=None could help and outputting numpy arrays can also help in the docs, but this seems quite odd now dropping down to 1it/s ```bash Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46048888/46390354 [12:33:30<4:20:32, 21.84 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46049888/46390354 [12:36:11<8:37:59, 10.95 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46050888/46390354 [12:46:35<24:56:56, 3.78 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46051888/46390354 [12:56:43<35:08:10, 2.68 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46052888/46390354 [13:06:58<42:05:41, 2.23 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46053888/46390354 [13:16:01<44:40:18, 2.09 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46054888/46390354 [13:25:11<46:35:28, 2.00 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46055888/46390354 [13:34:23<47:55:34, 1.94 examples/s] ```
### Describe the bug Mapped tokenization slows down substantially towards end of dataset. train set started off very slow, caught up to 20k then tapered off til the end. what's particularly strange is that the tokenization crashed a few times before due to errors with invalid tokens somewhere or corrupted downloads, and the speed ups/downs consistently happened the same times ```bash Running tokenizer on dataset (num_proc=48): 0%| | 847000/881416735 [12:18<252:45:45, 967.72 examples/s] Running tokenizer on dataset (num_proc=48): 0%| | 848000/881416735 [12:19<224:16:10, 1090.66 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84964000/881416735 [3:48:00<11:21:34, 19476.01 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84967000/881416735 [3:48:00<12:04:01, 18333.79 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538631977/881416735 [13:46:40<27:50:04, 3420.84 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538632977/881416735 [13:46:40<23:48:20, 3999.77 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881365886/881416735 [38:30:19<04:34, 185.10 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881366886/881416735 [38:30:25<04:36, 180.57 examples/s] ``` and validation set as well ```bash Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41544000/46390354 [28:44<02:37, 30798.76 examples/s] Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41550000/46390354 [28:44<02:08, 37698.08 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:15:48<12:22:44, 36.87 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:16:00<12:22:44, 36.87 examples/s] ``` ### Steps to reproduce the bug using the following kwargs ```python with accelerator.main_process_first(): lm_datasets = tokenized_datasets.map( group_texts, batched=True, num_proc=48 load_from_cache_file=True, desc=f"Grouping texts in chunks of {block_size}", ) ``` running through slurm script ```bash #SBATCH --partition=gpu-nvidia-a100 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --gpus-per-task=8 #SBATCH --cpus-per-task=96 ``` using this dataset https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T ### Expected behavior Constant speed throughout ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-5.15.0-1049-aws-x86_64-with-glibc2.10 - Python version: 3.8.18 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0
112
Tokenization slows towards end of dataset ### Describe the bug Mapped tokenization slows down substantially towards end of dataset. train set started off very slow, caught up to 20k then tapered off til the end. what's particularly strange is that the tokenization crashed a few times before due to errors with invalid tokens somewhere or corrupted downloads, and the speed ups/downs consistently happened the same times ```bash Running tokenizer on dataset (num_proc=48): 0%| | 847000/881416735 [12:18<252:45:45, 967.72 examples/s] Running tokenizer on dataset (num_proc=48): 0%| | 848000/881416735 [12:19<224:16:10, 1090.66 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84964000/881416735 [3:48:00<11:21:34, 19476.01 examples/s] Running tokenizer on dataset (num_proc=48): 10%|▉ | 84967000/881416735 [3:48:00<12:04:01, 18333.79 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538631977/881416735 [13:46:40<27:50:04, 3420.84 examples/s] Running tokenizer on dataset (num_proc=48): 61%|██████ | 538632977/881416735 [13:46:40<23:48:20, 3999.77 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881365886/881416735 [38:30:19<04:34, 185.10 examples/s] Running tokenizer on dataset (num_proc=48): 100%|█████████▉| 881366886/881416735 [38:30:25<04:36, 180.57 examples/s] ``` and validation set as well ```bash Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41544000/46390354 [28:44<02:37, 30798.76 examples/s] Running tokenizer on dataset (num_proc=48): 90%|████████▉ | 41550000/46390354 [28:44<02:08, 37698.08 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:15:48<12:22:44, 36.87 examples/s] Running tokenizer on dataset (num_proc=48): 96%|█████████▋| 44747422/46390354 [2:16:00<12:22:44, 36.87 examples/s] ``` ### Steps to reproduce the bug using the following kwargs ```python with accelerator.main_process_first(): lm_datasets = tokenized_datasets.map( group_texts, batched=True, num_proc=48 load_from_cache_file=True, desc=f"Grouping texts in chunks of {block_size}", ) ``` running through slurm script ```bash #SBATCH --partition=gpu-nvidia-a100 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --gpus-per-task=8 #SBATCH --cpus-per-task=96 ``` using this dataset https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T ### Expected behavior Constant speed throughout ### Environment info - `datasets` version: 2.15.0 - Platform: Linux-5.15.0-1049-aws-x86_64-with-glibc2.10 - Python version: 3.8.18 - `huggingface_hub` version: 0.19.4 - PyArrow version: 14.0.1 - Pandas version: 2.0.3 - `fsspec` version: 2023.10.0 I did see some comments about how num_proc=None could help and outputting numpy arrays can also help in the docs, but this seems quite odd now dropping down to 1it/s ```bash Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46048888/46390354 [12:33:30<4:20:32, 21.84 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46049888/46390354 [12:36:11<8:37:59, 10.95 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46050888/46390354 [12:46:35<24:56:56, 3.78 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46051888/46390354 [12:56:43<35:08:10, 2.68 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46052888/46390354 [13:06:58<42:05:41, 2.23 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46053888/46390354 [13:16:01<44:40:18, 2.09 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46054888/46390354 [13:25:11<46:35:28, 2.00 examples/s] Running tokenizer on dataset (num_proc=48): 99%|█████████▉| 46055888/46390354 [13:34:23<47:55:34, 1.94 examples/s] ```
[ -0.44143927097320557, 0.04940517246723175, -0.08252695947885513, 0.10362903773784637, 0.3059098720550537, -0.17579758167266846, 0.24827998876571655, 0.37538379430770874, -0.3185052275657654, 0.14226257801055908, 0.18136216700077057, 0.49972817301750183, -0.111054427921772, -0.1634110063314438, -0.08602093905210495, -0.11565445363521576, 0.21469330787658691, 0.07804543524980545, 0.025786880403757095, -0.017286743968725204, 0.18273040652275085, -0.013504495844244957, -0.23493963479995728, 0.1311577707529068, -0.2631019353866577, -0.16415739059448242, 0.12260539829730988, -0.25714215636253357, -0.3150815963745117, -0.4975307881832123, -0.09119019657373428, 0.08907754719257355, -0.09130018204450607, 0.35260385274887085, -0.00010542925156187266, -0.12927933037281036, 0.018030166625976562, 0.3359244763851166, -0.0024002641439437866, 0.12935973703861237, 0.11064689606428146, -0.2394494265317917, -0.1630263328552246, 0.006374634802341461, 0.0007241591811180115, -0.0655115619301796, -0.11668109893798828, -0.1115259975194931, 0.23207640647888184, 0.2193603813648224, 0.26776379346847534, 0.1563020795583725, -0.23467783629894257, -0.028462927788496017, 0.007535718381404877, -0.07347148656845093, -0.24808251857757568, 0.032838307321071625, 0.32287007570266724, -0.175649955868721, -0.20636478066444397, 0.14963491261005402, 0.023766061291098595, -0.302198588848114, 0.19816771149635315, -0.06342020630836487, 0.09829659759998322, -0.14988262951374054, 0.12258584052324295, 0.06863860785961151, 0.016214214265346527, -0.015996001660823822, -0.12558646500110626, -0.30161166191101074, -0.13145041465759277, -0.45854809880256653, 0.1978071928024292, -0.3698260188102722, -0.008916476741433144, 0.048242393881082535, -0.44874307513237, 0.18559834361076355, -0.0005270913243293762, 0.17283403873443604, -0.2814420461654663, 0.4715214967727661, 0.03798617795109749, 0.05092931166291237, -0.09320288896560669, -0.3054620623588562, -0.2230248600244522, -0.1343982219696045, -0.08169098198413849, 0.15384915471076965, -0.29386159777641296, -0.21951919794082642, 0.05773311108350754, -0.18109098076820374, 0.085005983710289, 0.25719666481018066, -0.2911766469478607, 0.40370699763298035, 0.18351170420646667, -0.02608831226825714, 0.31336474418640137, 0.2442850023508072, -0.09456237405538559, 0.37772253155708313, 0.3134448528289795, -0.16281898319721222, -0.13975459337234497, 0.026022378355264664, -0.24729067087173462, 0.0039256252348423, 0.2104068100452423, -0.00540531799197197, -0.24217340350151062, -0.14755453169345856, -0.3058595061302185, 0.1991625726222992, -0.20060616731643677, 0.2811760902404785, 0.30636918544769287, 0.31379979848861694, -0.0765487402677536, 0.07767082005739212, -0.48295629024505615, -0.2977341413497925, -0.20033791661262512, 0.20289644598960876, -0.11577204614877701, -0.10132704675197601, -0.4456021189689636, -0.06772171705961227, -0.012560993432998657, 0.08272464573383331, 0.01826620101928711, 0.2288832664489746, -0.2047499567270279, -0.11104320734739304, 0.13291878998279572, -0.22886903584003448, 0.07241186499595642, -0.057257670909166336, -0.3286837637424469, 0.27552366256713867, -0.15564505755901337, 0.13834165036678314, -0.25501933693885803, -0.14705368876457214, -0.21130326390266418, -0.1914665699005127, -0.038320720195770264, 0.3269493281841278, -0.10823233425617218, -0.138047993183136, -0.2015845775604248, 0.18238186836242676, 0.15660163760185242, 0.05132528766989708, 0.020406730473041534, -0.2239534705877304, -0.21559828519821167, -0.06547798961400986, 0.2967362403869629, 0.07948768138885498, -0.12288551032543182, -0.14991632103919983, -0.02635779231786728, 0.1445431113243103, 0.47481662034988403, 0.44930949807167053, -0.1352919191122055, 0.334079772233963, -0.3656613528728485, 0.5560070872306824, 0.22587110102176666, -0.13187851011753082, -0.3691479563713074, 0.11471523344516754, -0.46882516145706177, 0.14354650676250458, -0.30154651403427124, -0.04931935667991638, 0.608967661857605, -0.13469962775707245, 0.19142304360866547, 0.18506190180778503, -0.005546929314732552, 0.024457523599267006, -0.471303254365921, 0.0337415412068367, 0.20057432353496552, 0.037561316043138504, 0.13461577892303467, -0.3576030135154724, -0.10740175098180771, 0.15571990609169006, 0.026257872581481934, 0.13296876847743988, 0.041333675384521484, 0.02038867585361004, 0.29411157965660095, 0.009711816906929016, 0.08137530088424683, -0.2989855408668518, 0.16799943149089813, 0.20482274889945984, 0.12187525629997253, -0.11284421384334564, 0.041791241616010666, -0.2171262800693512, -0.23030692338943481, -0.04000450670719147, -0.1433211714029312, -0.06259883940219879, 0.23131069540977478, -0.08909286558628082, -0.21450528502464294, 0.07671865820884705, -0.1960226446390152, -0.2104906588792801, 0.030090635642409325, 0.08819187432527542, 0.32847610116004944, 0.11957903206348419, -0.09962470084428787, -0.10920991003513336, -0.12885306775569916, 0.22079885005950928, 0.1931721568107605, -0.28936025500297546, 0.011657469905912876, 0.5026166439056396, 0.2797914147377014, 0.10530566424131393, -0.11586115509271622, 0.1490880697965622, 0.25495612621307373, 0.28614020347595215, 0.03684021905064583, 0.07822352647781372, -0.27121591567993164, -0.14819423854351044, 0.21070021390914917, 0.4184178113937378, 0.365620881319046, 0.08369041979312897, 0.009785812348127365, 0.07978552579879761, 0.1688908487558365, -0.010866839438676834, 0.09274716675281525, -0.1995728313922882, 0.3027912974357605, -0.04898667708039284, 0.1696029007434845, -0.0509001761674881, -0.08733613789081573, 0.3657347857952118, 0.3732052147388458, -0.09315735101699829, 0.016583625227212906, 0.06756598502397537, -0.0354643240571022, -0.12369003146886826, 0.029770899564027786, -0.043875835835933685, 0.09441524744033813, 0.10896455496549606, 0.25616171956062317, -0.03129943460226059, -0.05864882469177246, -0.18783770501613617, 0.20477032661437988, -0.01991649717092514, -0.025530997663736343, 0.34767842292785645, -0.02746172808110714, 0.2558315098285675, -0.32749295234680176, -0.435272216796875, 0.013974374160170555, 0.28279420733451843, -0.19821640849113464, 0.11532606929540634, -0.4370192289352417, 0.03581196069717407, -0.1237853467464447, -0.12651337683200836, -0.11705896258354187, -0.26805350184440613, 0.20463714003562927, -0.054141607135534286, -0.08016808331012726, 0.4149782061576843, -0.1478062868118286, 0.21917039155960083, 0.057534217834472656, 0.33163052797317505, -0.1093512699007988, -0.0026870956644415855, -0.578693687915802, 0.1537916660308838, 0.44353073835372925, -0.14883486926555634, 0.42521175742149353, 0.10221605747938156, -0.2492421567440033, -0.13013611733913422, -0.6257583498954773, 0.01999116688966751, -0.1159839928150177, 0.138202965259552, 0.2166212499141693, -0.14564569294452667, -0.3452885150909424, -0.11540181189775467, 0.1723870486021042, -0.05277322605252266, -0.21094942092895508, -0.04260072857141495, -0.05564595386385918, -0.15691471099853516, -0.10977105796337128, -0.024513565003871918, 0.03888791799545288, -0.13352692127227783, 0.055258944630622864, -0.2348913699388504, 0.0813753679394722, 0.2253914326429367, -0.22304576635360718, 0.2431066483259201, -0.25220489501953125, -0.190174400806427, -0.10566967725753784, -0.05316144973039627, 0.11313889920711517, -0.049013651907444, -0.12612612545490265, -0.042543862015008926, 0.10697901248931885, 0.07653766870498657, 0.14021651446819305, -0.3057903051376343, 0.2854154706001282, -0.06549431383609772, 0.3278283476829529, -0.21954470872879028, -0.43605300784111023, 0.23301833868026733, 0.08731219917535782, -0.20302683115005493, 0.12655147910118103, -0.0250057652592659, -0.04698944836854935, -0.31772756576538086, 0.054093316197395325, -0.4451938271522522, 0.4118499159812927, 0.311952143907547, 0.7117326855659485, -0.06046028807759285, -0.21832726895809174, -0.12022386491298676, -0.024421265348792076, -0.04538804665207863, -0.2673661708831787, -0.23236225545406342, 0.24963226914405823, -0.039344385266304016, -0.20280614495277405, 0.1392543911933899, -0.03457028046250343, -0.21727636456489563, 0.2834959328174591, -0.1309288591146469, 0.35788121819496155, -0.20193049311637878, 0.12840363383293152, -0.3741109073162079, 0.15343067049980164, -0.16584870219230652, 0.44812843203544617, -0.1743561029434204, -0.0720420628786087, 0.22447341680526733, -0.03417082130908966, -0.00032223761081695557, -0.40053313970565796, -0.919368326663971, 0.1717377007007599, -0.44862478971481323, 0.10081499069929123, 0.01158030703663826, 0.5115516185760498, -0.08118384331464767, 0.09289895743131638, 0.1452581137418747, -0.03595331311225891, 0.3962228298187256, 0.07183072715997696, 0.11578451842069626, 0.20733971893787384, -0.10351892560720444, -0.2366633415222168, -0.25995561480522156, 0.023779984563589096, 0.24790985882282257, 0.6036767363548279, 0.7584445476531982, -0.23846742510795593, -0.27365490794181824, 0.1728936731815338, -0.10960040241479874, 0.08150087296962738, 0.02572764828801155, 0.06776300072669983, 0.07771928608417511, 0.15870510041713715, 0.45299652218818665, -0.006444569677114487, 0.10226201266050339, -0.021674707531929016, -0.5794144868850708, -0.009322980418801308, -0.20258307456970215, 0.14588487148284912, 0.12160421907901764, 0.04369616508483887, -0.1077534481883049, 0.438344269990921, -0.03931465744972229, 0.12285368144512177, 0.23049654066562653, -0.19851155579090118, 0.2510741055011749, -0.20134320855140686, 0.13844144344329834, 0.10856463760137558, 0.12127029895782471, 0.3958379924297333, -0.0864868089556694, 0.2609017491340637, -0.2238028645515442, 0.35990703105926514, -0.25730621814727783, 0.4584426283836365, 0.3117169439792633, 0.2122112661600113, -0.6865146160125732, 0.04489494860172272, -0.011782288551330566, 0.07348935306072235, -0.2446104884147644, 0.3726252019405365, -0.1656985729932785, -0.3993048369884491, 0.4372851252555847, 0.3267151713371277, 0.7956240177154541, 0.07965335249900818, -0.0492384172976017, 0.1399346888065338, 0.026547595858573914, 0.041659001260995865, -0.4772910475730896, 0.12568798661231995, -0.33470362424850464, -0.01082101371139288, 0.06599891185760498, -0.03753963112831116, 0.057830940932035446, 0.11825643479824066, -0.1430034190416336, -0.2044798880815506, -0.056216780096292496, 0.624270498752594, -0.20732779800891876, 0.21581658720970154, -0.022100066766142845, -0.1022048145532608, 0.05203565955162048, 0.2523425221443176, 0.03077329508960247, -0.03336634114384651, -0.053994011133909225, 0.06057753786444664, -0.12195833027362823, -0.1055934727191925, -0.3498836159706116, -0.12973034381866455, -0.2947461009025574, 0.26117730140686035, -0.13484792411327362, 0.02827078104019165, 0.06215764209628105, -0.2730048894882202, 0.07429441064596176, 0.4309588372707367, 0.044883884489536285, 0.3858833312988281, -0.0427868515253067, 0.07465869188308716, 0.4342058002948761, -0.39281904697418213, 0.02399732545018196, -0.139752596616745, 0.04007352143526077, -0.15084394812583923, 0.07453013211488724, -0.09127963334321976, -0.3024047017097473, 0.01938902959227562, 0.4087233543395996, -0.2502921223640442, 0.10899771749973297, 0.08187101781368256, 0.13797707855701447, -0.2522251307964325, 0.21890535950660706, 0.030416693538427353, 0.08755066245794296, 0.32320502400398254, -0.09282781183719635, -0.059033047407865524, -0.08546574413776398, 0.2948545515537262, -0.12836125493049622, -0.1741763949394226, 0.5462303161621094, -0.17215974628925323, -0.27162402868270874, -0.29205456376075745, 0.3407755494117737, 0.37594306468963623, -0.06602026522159576, -0.007262342609465122, -0.4076385796070099, -0.060170091688632965, 0.029609518125653267, 0.2701917588710785, 0.10922421514987946, -0.20572462677955627, -0.29099664092063904, -0.2045852690935135, -0.2171829342842102, -0.16297759115695953, 0.007902216166257858, 0.22391778230667114, -0.25878506898880005, 0.3276292681694031, -0.4287753403186798, 0.10281233489513397, -0.37734687328338623, 0.017983701080083847, -0.17962360382080078, 0.17603826522827148, -0.37728622555732727, -0.18563619256019592, -0.0793338194489479, -0.17413797974586487, 0.18973462283611298, 0.15993869304656982, -0.13148793578147888, -0.2762955129146576, -0.10274696350097656, 0.0737767219543457, -0.06445696204900742, -0.3663560152053833, 0.1846054047346115, 0.1938423067331314, -0.1224871426820755, -0.23874521255493164, 0.02142113447189331, 0.10046156495809555, -0.011135891079902649, -0.025734618306159973, 0.3659619688987732, 0.18312039971351624, 0.2284780591726303, -0.216437429189682, 0.13536667823791504, 0.2762121260166168, 0.14611631631851196, 0.30785611271858215, 0.12932908535003662, -0.15143057703971863, -0.13994577527046204, 0.3117644786834717, 0.10076451301574707, 0.18425801396369934, 0.4181608259677887, -0.08069328963756561, -0.1550954431295395, 0.4013727307319641, -0.10335396975278854, 0.6772356629371643, -0.23926106095314026, -0.49645763635635376, 0.25881195068359375, 0.3289862275123596, 0.19866806268692017, -0.2203681468963623, 0.32656773924827576, 0.04163128137588501, -0.08646558225154877, -0.10156280547380447, 0.1497255265712738, -0.16335448622703552, -0.07786671817302704, 0.15456289052963257, 0.47032326459884644, -0.14829128980636597, 0.18304823338985443, 0.08731542527675629, -0.015006471425294876, -0.061735186725854874, 0.1453966647386551, -0.10496291518211365, 0.19187495112419128, 0.44125622510910034, 0.10146239399909973, 0.44047364592552185, 0.315170019865036, 0.4728415608406067, -0.06322800368070602, -0.09206436574459076, -0.14870713651180267, 0.3639112114906311, -0.17122840881347656, 0.10094834864139557, 0.1717463880777359, 0.24057573080062866, -0.1258019059896469, -0.4555239975452423, -0.1307336688041687, 0.12705473601818085, -0.399075448513031, -0.0026431907899677753, -0.25268784165382385, -0.015772774815559387, -0.1096416637301445, 0.17987188696861267, -0.03650319203734398, 0.17894914746284485, -0.09734216332435608, -0.0035022199153900146, -0.20966346561908722, -0.20470687747001648, -0.01632063463330269, -0.08994748443365097, 0.41320016980171204, -0.26496168971061707, 0.3434886932373047, -0.2144080251455307, 0.10197819769382477, -0.13060948252677917, 0.11263056844472885, 0.3520074188709259, 0.39697396755218506, -0.0040612053126096725, -0.00706080999225378, -0.10942971706390381, 0.06703295558691025, 0.0693986639380455, 0.5786603093147278, -0.12057247757911682, -0.083195760846138, 0.16261865198612213, 0.11274074018001556, -0.23713351786136627, -0.1381778120994568, 0.17043989896774292, -0.06091359630227089, 0.013182276859879494, -0.037619449198246, 0.05772370100021362, -0.16233199834823608, -0.10619586706161499, 0.043153587728738785, 0.17933285236358643, -0.07078828662633896, 0.2192729115486145, 0.08901958167552948, 0.1492910385131836, -0.2369145154953003, 0.1356884241104126, 0.06031406670808792, 0.3695826530456543, 0.22567085921764374, -0.049619004130363464, -0.4611213505268097, -0.42165637016296387, -0.0434635728597641, 0.20536647737026215, -0.13136939704418182, -0.04695907235145569, -0.08442237228155136, 0.08574717491865158, -0.13723161816596985, -0.030595101416110992, 0.15284819900989532, 0.16263966262340546, -0.1731678992509842, 0.20205071568489075, -0.27510005235671997, 0.42753589153289795, -0.16566088795661926, 0.03805488348007202, -0.0000015031546354293823, -0.26437094807624817, 0.5535087585449219, 0.032607585191726685, 0.06537046283483505, 0.16214124858379364, -0.1672155261039734, -0.003338271751999855, -0.01051531732082367, 0.5119613409042358, 0.17202354967594147, 0.12407099455595016, 0.10894802957773209, 0.1731783002614975, -0.37562796473503113, -0.22050374746322632, -0.22283317148685455, 0.25114890933036804, 0.14691665768623352, 0.047810398042201996, 0.21093900501728058, -0.09385821223258972, -0.08499262481927872, 0.04937705770134926, 0.14471369981765747, -0.20483346283435822, -0.06246892362833023, 0.09866049140691757, 0.1870439648628235, 0.1788209080696106, -0.29690316319465637, 0.2595278322696686, 0.20453907549381256, 0.18713441491127014, -0.36080580949783325, -0.418401837348938, 0.18995033204555511, -0.31680312752723694, -0.21674208343029022, -0.2509932219982147, 0.23789429664611816, 0.38774919509887695, 0.015338929370045662, -0.458467036485672, -0.40456604957580566, 0.44557392597198486, 0.006599428132176399, -0.1870124340057373, 0.18086585402488708, 0.07230706512928009, -0.08113805949687958, -0.10763345658779144, 0.5177510976791382, -0.1583487093448639, -0.14584431052207947, 0.2677958607673645, -0.16802427172660828 ]
https://github.com/huggingface/datasets/issues/6733
EmptyDatasetError when loading dataset downloaded with HuggingFace cli
Hi! `datasets` is not compatible with `huggingface_hub`'s cache structure, hence the error. You can track https://github.com/huggingface/datasets/issues/5080 to get notified when this is implemented.
### Describe the bug I am using a cluster that does not have access to the internet when given a job. I tried downloading the dataset using the huggingface-cli command and then loading it with load_dataset but I get an error: ```raise EmptyDatasetError(f"The directory at {base_path} doesn't contain any data files") from None``` The dataset I'm using is "lmsys/chatbot_arena_conversations". The folder structure is - README.md - data - train-00000-of-00001-cced8514c7ed782a.parquet ### Steps to reproduce the bug 1. Download dataset using HuggingFace CLI: ```huggingface-cli download lmsys/chatbot_arena_conversations --local-dir ./lmsys/chatbot_arena_conversations``` 2. In Python ``` from datasets import load_dataset load_dataset("lmsys/chatbot_arena_conversations") ``` ### Expected behavior Should return a Dataset Dict in the form of ``` DatasetDict({ train: Dataset({ features: [...], num_rows: 33,000 }) }) ``` ### Environment info Python 3.11.5 Datasets 2.18.0 Transformers 4.38.2 Pytorch 2.2.0 Pyarrow 15.0.1 Rocky Linux release 8.9 (Green Obsidian)
23
EmptyDatasetError when loading dataset downloaded with HuggingFace cli ### Describe the bug I am using a cluster that does not have access to the internet when given a job. I tried downloading the dataset using the huggingface-cli command and then loading it with load_dataset but I get an error: ```raise EmptyDatasetError(f"The directory at {base_path} doesn't contain any data files") from None``` The dataset I'm using is "lmsys/chatbot_arena_conversations". The folder structure is - README.md - data - train-00000-of-00001-cced8514c7ed782a.parquet ### Steps to reproduce the bug 1. Download dataset using HuggingFace CLI: ```huggingface-cli download lmsys/chatbot_arena_conversations --local-dir ./lmsys/chatbot_arena_conversations``` 2. In Python ``` from datasets import load_dataset load_dataset("lmsys/chatbot_arena_conversations") ``` ### Expected behavior Should return a Dataset Dict in the form of ``` DatasetDict({ train: Dataset({ features: [...], num_rows: 33,000 }) }) ``` ### Environment info Python 3.11.5 Datasets 2.18.0 Transformers 4.38.2 Pytorch 2.2.0 Pyarrow 15.0.1 Rocky Linux release 8.9 (Green Obsidian) Hi! `datasets` is not compatible with `huggingface_hub`'s cache structure, hence the error. You can track https://github.com/huggingface/datasets/issues/5080 to get notified when this is implemented.
[ -0.15917807817459106, -0.2600245475769043, 0.08427518606185913, 0.4541172385215759, 0.15736033022403717, 0.016504593193531036, 0.127852201461792, 0.22305187582969666, 0.451858252286911, 0.16147887706756592, -0.07710544764995575, 0.007277769967913628, -0.28315919637680054, 0.08897988498210907, 0.003947301767766476, 0.07025487720966339, 0.07399384677410126, 0.13850164413452148, -0.20813995599746704, -0.025561612099409103, -0.08298446238040924, 0.1891394853591919, -0.0887380838394165, -0.15449745953083038, -0.31922048330307007, -0.00043156184256076813, -0.16088569164276123, 0.43880942463874817, 0.09278106689453125, -0.24331356585025787, 0.4993143081665039, -0.1552295982837677, 0.14336425065994263, 0.7477596402168274, -0.00012487993808463216, 0.18553419411182404, 0.454520583152771, -0.16920766234397888, -0.6644373536109924, -0.5063466429710388, -0.08519156277179718, -0.27208322286605835, 0.2617567479610443, -0.15325453877449036, -0.13734973967075348, 0.24844393134117126, 0.008966783061623573, -0.3651798963546753, 0.5127630233764648, 0.26387882232666016, 0.0894942432641983, 0.45181605219841003, -0.08514740318059921, -0.10765309631824493, -0.07111998647451401, 0.35920393466949463, 0.10582122951745987, 0.3813888728618622, 0.10908989608287811, 0.020369449630379677, 0.2185347080230713, 0.18685948848724365, -0.1919274777173996, -0.01306314766407013, 0.33214956521987915, 0.06548996269702911, -0.1714244782924652, -0.29863080382347107, 0.2205837368965149, 0.2849017381668091, 0.41270503401756287, -0.32075923681259155, -0.4658564031124115, -0.3096543550491333, 0.11508342623710632, -0.07628343999385834, 0.2971142530441284, 0.26747533679008484, -0.24031582474708557, 0.13519172370433807, -0.16409356892108917, -0.20951035618782043, -0.008768465369939804, 0.07876723259687424, -0.02761176973581314, 0.07795237004756927, -0.16142475605010986, -0.037990227341651917, -0.051850978285074234, 0.10687924921512604, -0.2830318808555603, -0.17479683458805084, -0.07800696790218353, 0.3628923296928406, -0.1076047420501709, 0.10365423560142517, 0.1465575397014618, 0.4151093065738678, 0.20437994599342346, 0.13787800073623657, -0.18247292935848236, -0.163213849067688, -0.009279736317694187, 0.0163893923163414, 0.2596123218536377, -0.08701814711093903, 0.1555236279964447, -0.13821004331111908, 0.25831449031829834, 0.20981881022453308, 0.19195596873760223, -0.1553119719028473, -0.07901492714881897, 0.1429920345544815, -0.16320595145225525, -0.1830742359161377, 0.3742488622665405, -0.04268205165863037, -0.24245868623256683, 0.010931126773357391, -0.004427209496498108, 0.09124411642551422, 0.03425823152065277, 0.3277420103549957, -0.21112242341041565, 0.002294875681400299, 0.1279173046350479, 0.2933998703956604, -0.0886663943529129, -0.23468735814094543, -0.28024622797966003, -0.12334945797920227, 0.049925077706575394, 0.1912069469690323, 0.2819023132324219, -0.1572120487689972, 0.29535049200057983, 0.059362269937992096, -0.12101078033447266, 0.04100867360830307, -0.07632484287023544, -0.08328951895236969, -0.11532887071371078, 0.5345642566680908, 0.168463796377182, 0.21589596569538116, 0.2113061398267746, -0.29375171661376953, -0.06820055842399597, 0.1386103332042694, -0.2270732820034027, -0.29017260670661926, -0.2522716522216797, -0.007530617527663708, -0.42178547382354736, 0.0929366871714592, -0.6208081841468811, 0.0788312703371048, -0.20810142159461975, -0.19867196679115295, -0.006829649209976196, 0.17541557550430298, -0.056375883519649506, -0.13979659974575043, 0.4638059437274933, 1.077997088432312, -0.24488957226276398, -0.2528802156448364, -0.10444730520248413, -0.2938372492790222, 0.005843907594680786, 0.0815325379371643, -0.05036737397313118, 0.22403213381767273, -0.3976573944091797, 0.12339358031749725, 0.1689407378435135, -0.4497418701648712, -0.564587414264679, 0.2906673848628998, -0.31363487243652344, 0.31695523858070374, 0.14030736684799194, 0.04717510938644409, -0.05447501689195633, 0.11193078011274338, 0.06393127143383026, 0.1702619343996048, 0.0034395642578601837, -0.009334633126854897, -0.1912631243467331, -0.32613614201545715, 0.0962447077035904, 0.012484598904848099, 0.03877651318907738, 0.25700095295906067, 0.060513295233249664, 0.07357025891542435, 0.38931751251220703, 0.03252214193344116, 0.14697907865047455, 0.3861468434333801, 0.19934497773647308, 0.2079935520887375, -0.10244444757699966, -0.06248936802148819, -0.8359866738319397, 0.32207512855529785, 0.04211723059415817, 0.23760925233364105, -0.5705026388168335, -0.23906870186328888, -0.10468835383653641, -0.023802991956472397, -0.11935871839523315, 0.050861380994319916, -0.04421690106391907, -0.022932901978492737, 0.2622133195400238, 0.08378307521343231, -0.2731935977935791, 0.5592045187950134, -0.2867904007434845, 0.2417200803756714, -0.2810288667678833, 0.6597199440002441, 0.1453542411327362, -0.12612193822860718, -0.26166582107543945, 0.12763309478759766, -0.04710441082715988, -0.2241949737071991, 0.07305186986923218, 0.3753874897956848, -0.0008914908394217491, 0.05720322206616402, 0.0719749704003334, -0.009411469101905823, 0.1953439861536026, -0.07940132915973663, -0.043741822242736816, 0.14424282312393188, 0.3224743604660034, -0.08684542775154114, -0.19940337538719177, 0.06289331614971161, 0.06464052200317383, 0.3341478407382965, 0.05930410325527191, -0.0008524693548679352, 0.23555836081504822, 0.011598873883485794, -0.10926271975040436, -0.17055177688598633, 0.0925556868314743, -0.1293071210384369, 0.479645311832428, 0.04451330006122589, -0.3362453281879425, -0.14883974194526672, -0.04092109575867653, 0.006281331181526184, 0.22290608286857605, 0.12938664853572845, -0.463301420211792, -0.01170262135565281, 0.16375567018985748, 0.06425611674785614, 0.41208046674728394, 0.04266859591007233, -0.06054181978106499, 0.08945555239915848, 0.30167368054389954, -0.07665041089057922, -0.03719141334295273, 0.08321322500705719, 0.013713100925087929, 0.13613933324813843, -0.040556035935878754, 0.23742707073688507, -0.23027923703193665, -0.14092910289764404, -0.10395175218582153, 0.1440844088792801, -0.3072056472301483, -0.10083018988370895, -0.11197329312562943, -0.2610764801502228, 0.04984565079212189, 0.06398647278547287, -0.530582845211029, -0.07221221923828125, -0.3912580609321594, 0.1975051909685135, -0.015785928815603256, -0.16607876121997833, -0.16144505143165588, 0.32639485597610474, 0.002159448340535164, -0.5103653073310852, -0.2988993525505066, -0.06361624598503113, -0.2699499726295471, -0.1512562781572342, 0.27050894498825073, 0.13155578076839447, 0.06838137656450272, -0.32917678356170654, 0.1328471451997757, -0.3139578104019165, -0.051053859293460846, -0.003383401781320572, 0.08145225048065186, 0.1991802155971527, 0.07320857048034668, 0.5044596195220947, -0.11586448550224304, -0.009627409279346466, 0.22633127868175507, -0.0276179239153862, -0.174196258187294, -0.0010617561638355255, 0.10852016508579254, 0.270065039396286, -0.28395283222198486, -0.011749520897865295, -0.5103268623352051, -0.3464016914367676, 0.22126825153827667, -0.05818590149283409, -0.08163119852542877, 0.071867436170578, 0.014814882539212704, 0.3040792644023895, -0.14294423162937164, 0.031352683901786804, 0.048283811658620834, -0.4046146869659424, 0.1461556851863861, -0.0509677417576313, -0.4371543824672699, 0.16514964401721954, -0.1403653770685196, 0.20714499056339264, 0.04842798411846161, -0.7301474213600159, -0.30091342329978943, -0.04914005100727081, 0.2681763768196106, -0.01743251085281372, -0.007228689268231392, 0.40314435958862305, -0.05886043235659599, 0.13322831690311432, 0.031685419380664825, -0.10532146692276001, 0.09685260057449341, -0.1491483449935913, 0.0957145094871521, 0.043184421956539154, 0.3138541281223297, -0.12758207321166992, 0.4987010359764099, 0.2177094966173172, 0.05375203117728233, 0.34163913130760193, -0.07582756131887436, 0.7717538475990295, -0.24655577540397644, -0.22478042542934418, -0.052898455411195755, 0.18908588588237762, -0.09252509474754333, 0.3142794966697693, 0.22108995914459229, 0.1678454428911209, -0.361621618270874, -0.30534541606903076, -0.3121829628944397, -0.2086164504289627, -0.015420963987708092, -0.08863997459411621, -0.05324495583772659, 0.1013345718383789, 0.11125729233026505, -0.150080144405365, -0.2924702763557434, 0.05088158696889877, 0.6045259237289429, 0.19262035191059113, 0.1959548145532608, -0.2764923572540283, 0.024346081539988518, -0.4787527322769165, 0.16866359114646912, 0.06407080590724945, 0.188439279794693, -0.05746870115399361, -0.032698046416044235, 0.02756159007549286, 0.11402978003025055, 0.6465497016906738, 0.0829697847366333, 0.09873375296592712, 0.05692173168063164, -0.08260710537433624, -0.593673586845398, 0.012023597955703735, -0.09684223681688309, 0.24477125704288483, 0.22003836929798126, 0.7504438757896423, -0.2992458641529083, -0.1047380268573761, -0.18181370198726654, 0.2382138967514038, -0.1389048546552658, -0.1988290548324585, -0.33814460039138794, -0.22670260071754456, -0.1269577592611313, 0.03833043575286865, 0.06692423671483994, 0.34556490182876587, 0.19242991507053375, 0.10156013071537018, -0.11041216552257538, -0.04391026496887207, 0.11655847728252411, -0.05824457108974457, 0.47353339195251465, 0.10213848203420639, 0.07406666874885559, 0.3034411668777466, 0.41294747591018677, 0.13774201273918152, 0.6471838355064392, -0.20149579644203186, -0.2327621877193451, -0.04893352836370468, 0.003944799304008484, 0.2501470446586609, 0.32143548130989075, 0.03319757804274559, -0.014111459255218506, 0.14749275147914886, 0.15331752598285675, -0.40613654255867004, 0.20448720455169678, 0.007567465305328369, -0.042990632355213165, -0.24396465718746185, -0.14951419830322266, 0.394130140542984, 0.07340200245380402, 0.10455465316772461, 0.2637737989425659, 0.6776699423789978, -0.15233884751796722, 0.13774703443050385, -0.28671780228614807, 0.7146856188774109, 0.08445683121681213, 0.3167082369327545, 0.4364422559738159, 0.12327462434768677, 0.7470763325691223, -0.1382620483636856, 0.07637034356594086, 0.0503421314060688, -0.30376139283180237, -0.06827259063720703, 0.049298543483018875, 0.08022932708263397, 0.3126372694969177, 0.018638204783201218, 0.39235392212867737, -0.29835057258605957, 0.2531541585922241, 0.1433003544807434, 0.09522831439971924, -0.08284521847963333, -0.17726649343967438, -0.3858606219291687, 0.04371679574251175, 0.00290047749876976, 0.5978202223777771, -0.15860384702682495, -0.029239866882562637, -0.18908120691776276, -0.05042027682065964, -0.13972057402133942, 0.19382116198539734, -0.15683521330356598, 0.06878545880317688, 0.2500148415565491, -0.1253162920475006, -0.19491815567016602, 0.38847431540489197, 0.22165988385677338, 0.11317449808120728, -0.29579490423202515, 0.12079152464866638, -0.48498988151550293, -0.008678204379975796, -0.013146779499948025, 0.20417088270187378, 0.4081471860408783, 0.040697380900382996, -0.21516650915145874, 0.022881127893924713, -0.3954513669013977, -0.1597488820552826, 0.28123608231544495, 0.013982761651277542, -0.07600674033164978, -0.07194770127534866, -0.3580259084701538, -0.028155498206615448, 0.3721126914024353, 0.02750101312994957, -0.013205654919147491, 0.17259696125984192, -0.08350945264101028, -0.21661436557769775, 0.1080111563205719, -0.3627844750881195, -0.13465547561645508, 0.6661524772644043, -0.16712921857833862, -0.3981640934944153, 0.51881343126297, 0.08935704827308655, -0.04019080474972725, -0.11722055077552795, -0.007631421089172363, 0.30664685368537903, -0.4446088671684265, 0.31953176856040955, 0.11588515341281891, 0.11927251517772675, -0.21942509710788727, 0.16640298068523407, 0.28695347905158997, -0.19668811559677124, -0.025075197219848633, -0.468333899974823, -0.3733856678009033, 0.3682199716567993, 0.021201683208346367, 0.020379917696118355, 0.23541826009750366, -0.13640287518501282, 0.2964414656162262, -0.33157846331596375, -0.1527886986732483, 0.07699873298406601, -0.25033244490623474, -0.06609561294317245, 0.41641029715538025, 0.051658809185028076, 0.5624632239341736, -0.17265066504478455, 0.006643576547503471, -0.0707688108086586, -0.030766967684030533, -0.05090761184692383, -0.029097668826580048, 0.19412724673748016, 0.03669126331806183, -0.03140149265527725, 0.1299266219139099, -0.2459125965833664, -0.08080317080020905, -0.22328796982765198, 0.2235182672739029, 0.24725472927093506, -0.06581097841262817, -0.10638003051280975, 0.2505294978618622, 0.40529921650886536, -0.5119709372520447, 0.21847844123840332, 0.11790245026350021, 0.048492416739463806, -0.06572963297367096, 0.011610444635152817, 0.033030133694410324, 0.07706886529922485, 0.05828563868999481, -0.004908457398414612, 0.09796421974897385, -0.0931774154305458, 0.29230213165283203, -0.3664054274559021, 0.06066923961043358, 0.24827618896961212, 0.22043028473854065, 0.08362413942813873, -0.2251139134168625, 0.004736347123980522, 0.40882208943367004, 0.0836791843175888, -0.20291736721992493, 0.0018458656268194318, 0.41665610671043396, 0.35036757588386536, 0.033511389046907425, 0.14419403672218323, 0.044072289019823074, -0.1997031569480896, -0.11994007229804993, 0.1275683045387268, 0.4508023262023926, -0.011553443968296051, 0.25245651602745056, 0.22610248625278473, 0.023178454488515854, 0.11668817698955536, 0.08860620111227036, 0.29894113540649414, 0.13272890448570251, 0.3941202759742737, -0.30303412675857544, 0.34574657678604126, -0.2645372748374939, -0.011882413178682327, -0.04252681881189346, -0.6535964608192444, -0.11242444813251495, -0.022853001952171326, 0.0026097968220710754, -0.03117389976978302, -0.3216855525970459, 0.37515997886657715, -0.4456840455532074, -0.2268385887145996, -0.14902913570404053, -0.10718731582164764, -0.339038223028183, -0.03078286536037922, 0.20668378472328186, -0.1164526417851448, 0.07390594482421875, -0.06513570994138718, 0.10539387166500092, -0.4126754403114319, 0.14328047633171082, -0.016773678362369537, -0.004864886403083801, -0.20122672617435455, -0.2608160674571991, 0.4314848780632019, -0.04767916351556778, -0.036819495260715485, 0.22846870124340057, 0.2948669195175171, -0.14801189303398132, 0.2545399069786072, 0.25809794664382935, 0.37505313754081726, 0.29913222789764404, 0.14889030158519745, 0.14391107857227325, 0.16733214259147644, -0.08174052089452744, -0.1794552505016327, 0.18376541137695312, 0.14386454224586487, 0.1563926637172699, 0.14763538539409637, 0.06469365209341049, -0.08256985247135162, 0.1322595477104187, -0.12326180934906006, 0.46533694863319397, -0.23507481813430786, 0.27028152346611023, -0.4503629207611084, -0.1161637157201767, -0.380915105342865, 0.0034637451171875, -0.5024608373641968, 0.007505022920668125, 0.23368868231773376, 0.05128411576151848, 0.05139639228582382, -0.07412361353635788, -0.0017580501735210419, -0.08507022261619568, 0.37289106845855713, 0.5611476898193359, 0.07087217271327972, -0.04421569034457207, -0.19046734273433685, -0.7869667410850525, 0.0731821060180664, -0.09231416881084442, 0.11062377691268921, -0.08973228186368942, 0.15187431871891022, -0.22072702646255493, -0.14762546122074127, -0.11085543036460876, 0.12629318237304688, -0.09603941440582275, -0.4502926766872406, -0.2956274449825287, -0.27877044677734375, -0.42397308349609375, -0.0017839577049016953, 0.06836801767349243, -0.23153382539749146, 0.06759890913963318, -0.18863257765769958, -0.100601926445961, 0.06077718734741211, -0.0029115527868270874, -0.296281099319458, 0.06439323723316193, 0.3276069760322571, -0.01798897422850132, 0.3582812547683716, 0.10126327723264694, -0.25974127650260925, -0.3043842911720276, 0.008204163983464241, -0.14008112251758575, 0.20784425735473633, -0.05529836192727089, 0.4118296205997467, -0.4446636736392975, 0.13560894131660461, -0.09745749831199646, 0.08996044844388962, 0.1347285956144333, -0.043283045291900635, -0.37368065118789673, 0.1337326318025589, -0.4078434407711029, 0.18530996143817902, 0.21321943402290344, 0.10820119827985764, -0.13081778585910797, -0.003376707434654236, -0.04692472517490387, -0.15283332765102386, 0.5324105024337769, -0.4765685200691223, 0.05131169781088829, -0.3644828498363495, 0.30252885818481445, 0.04725320637226105, -0.2616767883300781, -0.5013699531555176, 0.026732444763183594, 0.2568936347961426, -0.1267963945865631, -0.1718578338623047, -0.013495910912752151, -0.27548322081565857, -0.12058636546134949, -0.08719217777252197, 0.2307344675064087, -0.02557108923792839, -0.23118312656879425, 0.35712096095085144, -0.2544403374195099 ]
https://github.com/huggingface/datasets/issues/6731
Unexpected behavior when using load_dataset with streaming=True in a for loop
This is normal behavior in python when using `lambda`: the `i` defined in your `lambda` refers to the global variable `i` in your loop, and `i` equals to `1` when you run your `for e in res[0]` line. You should pass `fn_kwargs` that will be passed to your `lambda` instead of using the global variable: ```python from datasets import load_dataset res=[] for i in [0,1]: di = load_dataset( "json", data_files='path_to.json', split='train', streaming=True, ).map(lambda x, source: {"source": source}, fn_kwargs={"source": i}) res.append(di) for e in res[0]: print(e) ``` This doesn't happen in non-streaming since in that case `map` is executed while the variable `i` has the right value. In streaming mode, `map` is executed on-the-fly when you iterate on the dataset.
### Describe the bug ### My Code ``` from datasets import load_dataset res=[] for i in [0,1]: di=load_dataset( "json", data_files='path_to.json', split='train', streaming=True, ).map(lambda x: {"source": i}) res.append(di) for e in res[0]: print(e) ``` ### Unexpected Behavior Data in `res[0]` has `source=1`. However the expected value is 0. ### FYI I further switch `streaming` to `False`. And the output value is as expected (0). So there may exist bugs in setting `streaming=True` in a for loop. ### Environment Python 3.8.0 datasets==2.18.0 transformers==4.28.1 ### Steps to reproduce the bug 1. Create a Json file with any content. 2. Run the provided code. 3. Switch `streaming` to `False` and run again to see the expected behavior. ### Expected behavior The expected behavior is the data are mapped with its corresponding value in the for loop. ### Environment info Python 3.8.0 datasets==2.18.0 transformers==4.28.1 Ubuntu 20.04
119
Unexpected behavior when using load_dataset with streaming=True in a for loop ### Describe the bug ### My Code ``` from datasets import load_dataset res=[] for i in [0,1]: di=load_dataset( "json", data_files='path_to.json', split='train', streaming=True, ).map(lambda x: {"source": i}) res.append(di) for e in res[0]: print(e) ``` ### Unexpected Behavior Data in `res[0]` has `source=1`. However the expected value is 0. ### FYI I further switch `streaming` to `False`. And the output value is as expected (0). So there may exist bugs in setting `streaming=True` in a for loop. ### Environment Python 3.8.0 datasets==2.18.0 transformers==4.28.1 ### Steps to reproduce the bug 1. Create a Json file with any content. 2. Run the provided code. 3. Switch `streaming` to `False` and run again to see the expected behavior. ### Expected behavior The expected behavior is the data are mapped with its corresponding value in the for loop. ### Environment info Python 3.8.0 datasets==2.18.0 transformers==4.28.1 Ubuntu 20.04 This is normal behavior in python when using `lambda`: the `i` defined in your `lambda` refers to the global variable `i` in your loop, and `i` equals to `1` when you run your `for e in res[0]` line. You should pass `fn_kwargs` that will be passed to your `lambda` instead of using the global variable: ```python from datasets import load_dataset res=[] for i in [0,1]: di = load_dataset( "json", data_files='path_to.json', split='train', streaming=True, ).map(lambda x, source: {"source": source}, fn_kwargs={"source": i}) res.append(di) for e in res[0]: print(e) ``` This doesn't happen in non-streaming since in that case `map` is executed while the variable `i` has the right value. In streaming mode, `map` is executed on-the-fly when you iterate on the dataset.
[ -0.07609681040048599, -0.359355092048645, -0.06182356923818588, 0.33564746379852295, 0.07727647572755814, -0.04816568270325661, 0.3788203001022339, 0.02928072400391102, 0.21879591047763824, 0.02997703105211258, 0.19003428518772125, 0.39369815587997437, -0.04790274798870087, 0.15319019556045532, -0.12885582447052002, -0.16268427670001984, 0.3618050515651703, 0.14250299334526062, 0.006367772817611694, -0.25803232192993164, -0.045785918831825256, 0.12368795275688171, -0.3258896470069885, -0.33987337350845337, -0.1777850091457367, 0.16939464211463928, -0.10671162605285645, -0.04920545965433121, 0.35936450958251953, -0.2482350617647171, -0.06887549161911011, -0.06467853486537933, -0.044053226709365845, 0.297547847032547, -0.00011393173190299422, 0.03734636306762695, 0.3630433678627014, -0.1346692442893982, -0.4002562463283539, -0.22632940113544464, -0.33634549379348755, -0.09938735514879227, 0.09250081330537796, -0.1473228931427002, 0.10032891482114792, -0.17358863353729248, -0.23767568171024323, -0.6733461618423462, 0.06663897633552551, 0.17536750435829163, 0.1908678412437439, 0.17711889743804932, -0.22188882529735565, 0.3350256085395813, 0.24071788787841797, 0.03160395473241806, -0.038560569286346436, -0.08506667613983154, 0.400370717048645, 0.2404550313949585, -0.07264193147420883, 0.18451687693595886, -0.3604917526245117, 0.18326857686042786, 0.2621104419231415, 0.18103057146072388, -0.11324416846036911, -0.524958610534668, 0.04839744791388512, 0.2026834487915039, 0.5118669867515564, -0.0953909233212471, -0.2716625928878784, -0.26544299721717834, -0.1720816195011139, -0.3121173679828644, 0.19998565316200256, 0.29582837224006653, -0.25259166955947876, 0.05957924947142601, -0.275402694940567, 0.10141424089670181, 0.007005028426647186, 0.39857542514801025, 0.010930560529232025, 0.2157234400510788, -0.06110915541648865, 0.19271469116210938, -0.3486248552799225, 0.15831607580184937, 0.0668201893568039, -0.5926414132118225, -0.01677050068974495, 0.04691189154982567, -0.39847010374069214, 0.04455216974020004, 0.0903998613357544, -0.15060046315193176, -0.14055219292640686, 0.13646773993968964, 0.33614030480384827, -0.11688729375600815, 0.09075091779232025, 0.2847267687320709, 0.27366843819618225, 0.09842541813850403, -0.026427030563354492, 0.051261235028505325, 0.045894283801317215, -0.10053093731403351, -0.08743263781070709, -0.055820755660533905, 0.2815713882446289, 0.023603543639183044, 0.3603556752204895, -0.23789021372795105, 0.4108206629753113, -0.012958720326423645, -0.32695573568344116, -0.015964902937412262, -0.8191840052604675, 0.08503549546003342, 0.19738534092903137, 0.19395315647125244, -0.013476983644068241, 0.10444357991218567, -0.0028282292187213898, 0.37521064281463623, -0.10087843984365463, -0.1676441729068756, -0.23351162672042847, -0.3115676939487457, 0.06679685413837433, 0.1481986790895462, 0.3305111825466156, -0.17093797028064728, 0.3483056426048279, 0.3509542942047119, -0.19335578382015228, -0.15306521952152252, 0.06892649084329605, -0.1786833256483078, 0.3706521987915039, 0.20603138208389282, -0.061463743448257446, 0.335529625415802, 0.08596409857273102, 0.03519605100154877, 0.16006618738174438, 0.43692439794540405, -0.1621527075767517, 0.010730039328336716, 0.14543510973453522, 0.13625819981098175, -0.30000442266464233, -0.2215663194656372, -0.3916853368282318, 0.48698651790618896, 0.01497737318277359, -0.1201106458902359, 0.11134028434753418, -0.08856387436389923, -0.27077481150627136, -0.2801904082298279, 0.2331896424293518, 0.4035272002220154, -0.14109252393245697, -0.029337160289287567, 0.01778736524283886, 0.04655925929546356, 0.22568148374557495, -0.021134208887815475, -0.2535942792892456, 0.17391225695610046, -0.19897043704986572, 0.006118260324001312, 0.21893924474716187, -0.0593758299946785, -0.45274099707603455, 0.42314413189888, -0.2917478680610657, 0.4531826972961426, 0.012748390436172485, 0.16974885761737823, 0.23838157951831818, 0.020376620814204216, 0.21656611561775208, 0.18856209516525269, 0.28095927834510803, 0.36159878969192505, -0.20751503109931946, 0.13335658609867096, 0.16635337471961975, 0.02645064890384674, -0.33120352029800415, 0.5107095241546631, 0.1356753408908844, -0.15830373764038086, 0.39937934279441833, -0.09723907709121704, 0.16781164705753326, 0.3324400782585144, 0.1841830015182495, 0.013938087970018387, -0.04165882244706154, 0.17984914779663086, -0.470414400100708, 0.18187040090560913, 0.13575178384780884, -0.17868100106716156, -0.15062956511974335, 0.07274939119815826, 0.11889860779047012, 0.031708747148513794, -0.23465217649936676, -0.169464573264122, 0.15260131657123566, 0.2718522250652313, -0.011754089966416359, 0.15380215644836426, -0.09637835621833801, 0.33417487144470215, -0.20155629515647888, 0.0348040834069252, -0.2010374665260315, 0.5129740238189697, 0.40760064125061035, -0.21471817791461945, 0.036781586706638336, -0.1879023313522339, 0.3899502158164978, 0.02563459798693657, -0.2820446193218231, 0.4054334759712219, 0.037111394107341766, 0.40025174617767334, -0.26878923177719116, 0.1114497259259224, 0.18300829827785492, -0.18523061275482178, 0.00470668263733387, 0.621941089630127, 0.37196558713912964, -0.10477560013532639, -0.21511292457580566, 0.4767272472381592, 0.03045666590332985, 0.206986665725708, -0.18272726237773895, -0.16882355511188507, 0.05969744920730591, 0.026493843644857407, -0.3764607012271881, 0.1227746456861496, 0.07858390361070633, -0.09572356939315796, 0.32996657490730286, 0.10066726803779602, -0.18717575073242188, 0.09808864444494247, 0.29831600189208984, -0.09236457943916321, -0.06137942522764206, -0.04954400658607483, -0.32552799582481384, -0.032979607582092285, 0.18201632797718048, 0.22932593524456024, 0.6211112141609192, 0.20157718658447266, 0.03230511397123337, -0.021445615217089653, 0.1320682168006897, -0.24349822103977203, 0.3071584701538086, 0.3797776699066162, -0.0055482289753854275, 0.22791814804077148, 0.5474688410758972, -0.15266790986061096, -0.46786296367645264, -0.17181973159313202, 0.07541356235742569, 0.23348842561244965, -0.32774487137794495, 0.3054161071777344, -0.14426806569099426, 0.18864747881889343, -0.3608951270580292, -0.12427394837141037, -0.09272217750549316, -0.2619894742965698, -0.0965563952922821, 0.4525080621242523, -0.05700073391199112, -0.0513608455657959, 0.046135175973176956, 0.10076681524515152, 0.2115645706653595, -0.4297287166118622, -0.4505479037761688, 0.1683347076177597, -0.3724772036075592, -0.018810611218214035, -0.11270175129175186, -0.26857706904411316, -0.02771594189107418, 0.2743379771709442, -0.06795290112495422, -0.36924076080322266, -0.11364392936229706, -0.03164604306221008, -0.30637848377227783, -0.04879259318113327, -0.2501826286315918, 0.06330196559429169, 0.10818418860435486, -0.07859670370817184, 0.010508501902222633, -0.2826694846153259, -0.013117733411490917, 0.2493216097354889, 0.14683976769447327, 0.08750155568122864, -0.07512733340263367, -0.3593497574329376, -0.020982274785637856, -0.24742929637432098, 0.17137426137924194, -0.04234730452299118, 0.04399637505412102, 0.055175043642520905, 0.2665974199771881, 0.15874779224395752, 0.3874552845954895, -0.026826171204447746, -0.123086117208004, -0.34438204765319824, 0.4434196650981903, -0.030194969847798347, -0.3168586194515228, 0.07494795322418213, -0.11237087100744247, -0.16866274178028107, 0.31737011671066284, -0.5654841661453247, 0.23473280668258667, -0.09955757111310959, 0.053198520094156265, -0.025475971400737762, -0.13614638149738312, -0.09760414063930511, 0.033776648342609406, 0.00011178292334079742, -0.1994577944278717, -0.007124152034521103, 0.07314956188201904, 0.0698971152305603, 0.1740342378616333, 0.18336516618728638, 0.22969204187393188, 0.02006298303604126, 0.30088719725608826, 0.42912134528160095, -0.10868746042251587, 0.34877312183380127, -0.05463133007287979, 0.08371677994728088, -0.10122322291135788, -0.3116857707500458, -0.07109209895133972, -0.13431620597839355, -0.2215249389410019, 0.07031726837158203, -0.033748090267181396, -0.5332115888595581, -0.19809262454509735, 0.015243154019117355, -0.284714937210083, -0.1695358008146286, 0.10013817995786667, -0.3392287790775299, 0.019255686551332474, -0.07254640012979507, 0.36690929532051086, 0.038396552205085754, -0.2542939782142639, -0.3534032702445984, -0.07680127024650574, 0.27793556451797485, 0.034438423812389374, -0.10361336916685104, -0.08739475160837173, -0.463273286819458, 0.26621705293655396, -0.19031590223312378, 0.29436469078063965, 0.13247141242027283, -0.056863680481910706, 0.2706283926963806, 0.01831379346549511, 0.713804304599762, -0.20058193802833557, -0.10210062563419342, 0.04717385396361351, -0.05436239764094353, -0.4418446719646454, -0.06834731251001358, -0.4037265479564667, 0.32513049244880676, 0.10324777662754059, 0.2047143131494522, -0.17423474788665771, -0.06264985352754593, 0.01009177416563034, 0.020956872031092644, 0.02563938871026039, -0.3545108139514923, -0.397036075592041, -0.10984966903924942, -0.19711585342884064, -0.0321071520447731, -0.03968522697687149, 0.22100116312503815, -0.40564996004104614, -0.24027594923973083, 0.09222396463155746, 0.09413863718509674, -0.07007279992103577, -0.2276843935251236, 0.22242745757102966, 0.21045538783073425, -0.0041359420865774155, 0.2241918295621872, 0.2724941670894623, 0.13292808830738068, 0.32694417238235474, 0.23535175621509552, -0.17208924889564514, 0.06356270611286163, -0.031059477478265762, 0.07844004034996033, 0.4704940915107727, -0.048590946942567825, -0.09501760452985764, 0.25170987844467163, 0.04289413243532181, -0.11237858235836029, -0.19071272015571594, 0.5793476700782776, -0.036943476647138596, -0.036911457777023315, -0.6708922982215881, 0.5367708206176758, -0.03237998113036156, 0.005856059491634369, 0.7534705400466919, -0.4200053811073303, -0.19857825338840485, 0.3863617777824402, -0.2929736077785492, 0.6866660118103027, 0.507655143737793, 0.09010982513427734, 0.5519822239875793, -0.24977107346057892, 0.10207796096801758, -0.22475305199623108, 0.2800530791282654, -0.1800532042980194, -0.20479099452495575, -0.08991678059101105, -0.22633199393749237, 0.09797696769237518, 0.2505555748939514, -0.31055405735969543, 0.07373480498790741, -0.23639217019081116, 0.2617470324039459, 0.034467458724975586, 0.01133200153708458, -0.020330635830760002, -0.20651496946811676, -0.5985265970230103, 0.12377028167247772, -0.021428585052490234, 0.2796165645122528, 0.14380034804344177, -0.26641666889190674, -0.24533142149448395, -0.2398228496313095, -0.08838077634572983, 0.2146282196044922, -0.17396196722984314, 0.04207965359091759, -0.07275807857513428, -0.20123356580734253, -0.18951217830181122, 0.4394003748893738, -0.3207740783691406, -0.1665235310792923, -0.09954427182674408, 0.056218378245830536, 0.2735067903995514, 0.5244097113609314, 0.10523776710033417, -0.3418077528476715, 0.08651688694953918, 0.17591023445129395, -0.3450964093208313, 0.5220166444778442, -0.1021340861916542, -0.26299163699150085, -0.21961438655853271, 0.10190337896347046, 0.06425154209136963, -0.14405018091201782, 0.0016989251598715782, 0.11252975463867188, -0.0824114978313446, -0.2146129608154297, 0.11902275681495667, 0.03999440371990204, -0.2517944872379303, 0.079507015645504, -0.2771660387516022, -0.35381847620010376, -0.18942305445671082, 0.7877117991447449, 0.09729920327663422, 0.029492393136024475, 0.37514418363571167, -0.0050226375460624695, 0.015834305435419083, -0.061506547033786774, 0.4282684326171875, -0.18806092441082, -0.26341235637664795, 0.19191691279411316, -0.16651074588298798, 0.28162825107574463, -0.1766568422317505, 0.23840877413749695, -0.43710339069366455, 0.1780625581741333, -0.042987287044525146, -0.2864828109741211, -0.2895054817199707, -0.1279974728822708, 0.12170654535293579, 0.1813470423221588, -0.006976000964641571, -0.2507108747959137, 0.15805505216121674, -0.10305503010749817, -0.28626102209091187, -0.1744292825460434, 0.20059047639369965, -0.02145380899310112, 0.2071692943572998, 0.09845913201570511, 0.2713356614112854, -0.07931669056415558, 0.14767558872699738, 0.01850748434662819, -0.12993188202381134, -0.19007590413093567, -0.1822880208492279, 0.13499991595745087, 0.20193973183631897, -0.08563727885484695, -0.3544759750366211, -0.28802037239074707, -0.1133895218372345, -0.1740884929895401, 0.3118469715118408, 0.25625744462013245, -0.030312813818454742, 0.14657045900821686, 0.2160670906305313, 0.009640533477067947, 0.010995745658874512, -0.4247319996356964, -0.278895765542984, -0.14564722776412964, 0.08455840498209, 0.15686270594596863, 0.21499881148338318, -0.07106449455022812, -0.23902840912342072, -0.021536409854888916, -0.21710063517093658, 0.2555447816848755, 0.49753323197364807, -0.5038707256317139, 0.17055994272232056, -0.1695633977651596, 0.2614331841468811, 0.2877464294433594, -0.27735719084739685, -0.20508746802806854, -0.18834424018859863, 0.18821604549884796, 0.03742746263742447, -0.12131473422050476, 0.2712608277797699, 0.41761884093284607, 0.13852809369564056, 0.12975680828094482, -0.08353087306022644, -0.3581084907054901, -0.11865751445293427, -0.017883174121379852, 0.27596768736839294, -0.1019640862941742, 0.18650421500205994, 0.3063735365867615, -0.03585400432348251, 0.2639881670475006, -0.031021447852253914, 0.24074621498584747, 0.06835111975669861, 0.5069845914840698, 0.2907540798187256, 0.12078949809074402, 0.03339479863643646, -0.023199815303087234, -0.40071266889572144, -0.33298346400260925, -0.01731664314866066, 0.13413193821907043, -0.37849798798561096, 0.426439493894577, 0.1271260678768158, -0.11945538967847824, 0.009396309964358807, -0.13459813594818115, -0.2631901204586029, 0.18436844646930695, -0.1396312713623047, -0.17237170040607452, -0.19734913110733032, -0.174104243516922, -0.0416102334856987, 0.13416849076747894, 0.12659786641597748, -0.0030363351106643677, 0.24176418781280518, 0.25005361437797546, -0.007560804486274719, -0.3849064111709595, 0.1310407519340515, 0.15025866031646729, 0.23184889554977417, -0.10594990849494934, 0.12699183821678162, 0.11558795720338821, 0.1752290427684784, 0.18465355038642883, -0.08723654597997665, 0.3235315680503845, 0.3434107005596161, 0.14682188630104065, 0.13139279186725616, 0.08408613502979279, -0.14341537654399872, -0.1329280138015747, 0.39535993337631226, 0.17622312903404236, -0.03738267347216606, 0.38758835196495056, 0.10403664410114288, -0.07649032026529312, 0.1798645704984665, 0.1695648729801178, 0.45211803913116455, -0.553195595741272, 0.44255009293556213, -0.1209360808134079, 0.05611736327409744, -0.2790670096874237, -0.4544973075389862, -0.27640625834465027, -0.049139250069856644, 0.16171833872795105, -0.0010815863497555256, 0.11606555432081223, -0.04044700413942337, 0.04535980522632599, -0.16417722404003143, 0.2905357778072357, -0.026748929172754288, 0.04856013506650925, -0.33352136611938477, 0.08072096109390259, -0.45061349868774414, 0.09845630079507828, -0.01332036778330803, 0.23858392238616943, 0.013205050490796566, 0.3132292926311493, 0.09117904305458069, 0.2059248685836792, 0.017313681542873383, -0.15441568195819855, -0.25085675716400146, 0.3385939300060272, -0.1553066521883011, -0.29168418049812317, -0.18065056204795837, 0.16094696521759033, -0.06394444406032562, -0.04865962266921997, 0.2169896364212036, -0.25205644965171814, 0.20038503408432007, -0.006713110953569412, -0.18335410952568054, -0.05499302223324776, 0.08348030596971512, 0.34711092710494995, 0.07897412031888962, 0.10079816728830338, -0.10411405563354492, -0.16499380767345428, -0.3037084639072418, -0.1083415150642395, -0.2490731179714203, 0.12881988286972046, -0.2057732492685318, 0.5006871223449707, -0.13901446759700775, -0.14795511960983276, -0.21264922618865967, 0.28943806886672974, 0.22734759747982025, -0.4218948483467102, -0.2297268658876419, 0.20326471328735352, -0.31833988428115845, 0.4425256550312042, -0.18383315205574036, 0.29477033019065857, -0.08309492468833923, 0.14051903784275055, -0.2469671219587326, -0.18970264494419098, 0.4790702760219574, -0.6237896084785461, -0.19665169715881348, 0.0415775366127491, 0.22136618196964264, 0.24997246265411377, 0.2585327923297882, -0.08916092664003372, 0.0948062315583229, 0.5001993775367737, -0.38801732659339905, -0.16444943845272064, 0.2184208631515503, -0.1071304976940155, 0.15268279612064362, -0.02635376900434494, -0.129106804728508, 0.22419524192810059, -0.3103608787059784, 0.3052401542663574, -0.22670882940292358 ]
https://github.com/huggingface/datasets/issues/6729
Support zipfiles that span multiple disks?
No. cc @albertvillanova @lhoestq @polinaeterna for an evaluation of what it would take to support this feature.
See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream The dataset viewer gives the following error: ``` Error code: ConfigNamesError Exception: BadZipFile Message: zipfiles that span multiple disks are not supported Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 347, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1846, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1240, in get_module module_name, default_builder_kwargs = infer_module_for_data_files( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 584, in infer_module_for_data_files split_modules = { File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 585, in <dictcomp> split: infer_module_for_data_files_list(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 526, in infer_module_for_data_files_list return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 554, in infer_module_for_data_files_list_in_archives for f in xglob(extracted, recursive=True, download_config=download_config)[ File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 576, in xglob fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 622, in get_fs_token_paths fs = filesystem(protocol, **inkwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/registry.py", line 290, in filesystem return cls(**storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 79, in __call__ obj = super().__call__(*args, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py", line 57, in __init__ self.zip = zipfile.ZipFile( File "/usr/local/lib/python3.9/zipfile.py", line 1266, in __init__ self._RealGetContents() File "/usr/local/lib/python3.9/zipfile.py", line 1329, in _RealGetContents endrec = _EndRecData(fp) File "/usr/local/lib/python3.9/zipfile.py", line 286, in _EndRecData return _EndRecData64(fpin, -sizeEndCentDir, endrec) File "/usr/local/lib/python3.9/zipfile.py", line 232, in _EndRecData64 raise BadZipFile("zipfiles that span multiple disks are not supported") zipfile.BadZipFile: zipfiles that span multiple disks are not supported ``` The files (https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data) are: <img width="629" alt="Capture d’écran 2024-03-11 à 22 07 30" src="https://github.com/huggingface/datasets/assets/1676121/0bb15a51-d54f-4d73-8572-e427ea644b36">
17
Support zipfiles that span multiple disks? See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream The dataset viewer gives the following error: ``` Error code: ConfigNamesError Exception: BadZipFile Message: zipfiles that span multiple disks are not supported Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 347, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1846, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1240, in get_module module_name, default_builder_kwargs = infer_module_for_data_files( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 584, in infer_module_for_data_files split_modules = { File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 585, in <dictcomp> split: infer_module_for_data_files_list(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 526, in infer_module_for_data_files_list return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 554, in infer_module_for_data_files_list_in_archives for f in xglob(extracted, recursive=True, download_config=download_config)[ File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 576, in xglob fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 622, in get_fs_token_paths fs = filesystem(protocol, **inkwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/registry.py", line 290, in filesystem return cls(**storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 79, in __call__ obj = super().__call__(*args, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py", line 57, in __init__ self.zip = zipfile.ZipFile( File "/usr/local/lib/python3.9/zipfile.py", line 1266, in __init__ self._RealGetContents() File "/usr/local/lib/python3.9/zipfile.py", line 1329, in _RealGetContents endrec = _EndRecData(fp) File "/usr/local/lib/python3.9/zipfile.py", line 286, in _EndRecData return _EndRecData64(fpin, -sizeEndCentDir, endrec) File "/usr/local/lib/python3.9/zipfile.py", line 232, in _EndRecData64 raise BadZipFile("zipfiles that span multiple disks are not supported") zipfile.BadZipFile: zipfiles that span multiple disks are not supported ``` The files (https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data) are: <img width="629" alt="Capture d’écran 2024-03-11 à 22 07 30" src="https://github.com/huggingface/datasets/assets/1676121/0bb15a51-d54f-4d73-8572-e427ea644b36"> No. cc @albertvillanova @lhoestq @polinaeterna for an evaluation of what it would take to support this feature.
[ -0.781411349773407, -0.14386536180973053, -0.07546406984329224, 0.2898322343826294, 0.1265450119972229, 0.0779995247721672, 0.3441186845302582, 0.2277972251176834, -0.13403397798538208, 0.18954811990261078, -0.22090083360671997, 0.5121448636054993, -0.03472064808011055, 0.35409972071647644, -0.0899806022644043, -0.16690145432949066, 0.013325244188308716, 0.21858030557632446, -0.16041600704193115, 0.2322355955839157, -0.21059918403625488, 0.21529194712638855, -0.18125922977924347, -0.24256940186023712, -0.0537218376994133, -0.11916149407625198, -0.319355845451355, 0.1019645556807518, -0.08887666463851929, -0.1896035224199295, 0.13839475810527802, 0.26018232107162476, 0.026513397693634033, 0.4721429944038391, -0.00011715666187228635, 0.2636623978614807, 0.10581560432910919, -0.010990683920681477, -0.24411055445671082, -0.21662776172161102, -0.033450283110141754, -0.3704122304916382, 0.04283439368009567, -0.23635417222976685, -0.11270198971033096, -0.061959292739629745, -0.04171071946620941, -0.24133719503879547, 0.4857810139656067, -0.04156842827796936, 0.17419052124023438, 0.3230039179325104, 0.16967415809631348, -0.1709267646074295, 0.01573079079389572, 0.1724446564912796, -0.23838260769844055, -0.0051091257482767105, 0.16014602780342102, -0.041121434420347214, -0.20579522848129272, 0.02602151408791542, 0.057911090552806854, 0.41484707593917847, 0.15850557386875153, -0.09452185779809952, 0.10334965586662292, -0.366530179977417, 0.07159500569105148, 0.1915237009525299, 0.6841384768486023, -0.219432532787323, -0.4752497375011444, -0.3816981911659241, -0.082553431391716, -0.055951524525880814, 0.13839468359947205, 0.41623517870903015, -0.15627296268939972, 0.15449956059455872, -0.07751619815826416, -0.1571124792098999, -0.22009673714637756, 0.03343967720866203, -0.473675012588501, 0.607668399810791, -0.1320466548204422, 0.1276792585849762, 0.6268149614334106, 0.0017669536173343658, 0.2312208116054535, 0.08131985366344452, 0.006531175225973129, -0.2564067840576172, -0.05999360606074333, -0.2002163529396057, -0.1384408175945282, 0.13861101865768433, 0.1736835539340973, 0.0654565840959549, 0.10951937735080719, 0.23863595724105835, -0.12911242246627808, 0.2442539930343628, 0.4560483396053314, -0.14955779910087585, -0.07342415302991867, 0.6297595500946045, 0.22029873728752136, 0.34160277247428894, 0.1972246617078781, -0.0660601556301117, -0.031216595321893692, -0.4330288767814636, -0.34849029779434204, -0.056716322898864746, 0.15327811241149902, -0.06511527299880981, -0.2279931604862213, -0.27556756138801575, 0.16366347670555115, -0.22652316093444824, 0.14189226925373077, 0.24260810017585754, -0.09174767136573792, 0.3066049814224243, -0.35874640941619873, 0.20269949734210968, 0.11816110461950302, 0.07017774134874344, -0.07755012065172195, -0.01906193420290947, -0.057549551129341125, 0.12184611707925797, 0.13551390171051025, -0.332530677318573, 0.25468194484710693, -0.17350377142429352, 0.12234599888324738, 0.0819663256406784, 0.029777927324175835, -0.24953018128871918, -0.17694944143295288, 0.2558611035346985, 0.12403625249862671, -0.023167407140135765, -0.019941337406635284, -0.022072501480579376, -0.09904011338949203, 0.0434357188642025, -0.16664254665374756, -0.12727946043014526, -0.10142019391059875, 0.07301243394613266, -0.1489652693271637, 0.0811481922864914, -0.29150548577308655, -0.014630768448114395, -0.03562382608652115, -0.31665465235710144, -0.15905851125717163, 0.013978246599435806, -0.3408544361591339, -0.16255538165569305, 0.0996682420372963, 0.4798092246055603, -0.4491877555847168, -0.09527140110731125, -0.17852693796157837, -0.12154288589954376, 0.015151098370552063, 0.044951729476451874, -0.14194579422473907, -0.14099758863449097, -0.3664179742336273, -0.030370280146598816, 0.32918471097946167, -0.5454297065734863, -0.36258116364479065, 0.5703824758529663, 0.10274292528629303, -0.12281760573387146, 0.32207584381103516, -0.2760239243507385, 0.18103599548339844, -0.19259880483150482, -0.2263188660144806, 0.3572533130645752, -0.04868186265230179, 0.04900430887937546, -0.23768460750579834, -0.26429566740989685, 0.1072729155421257, 0.44959762692451477, 0.19537140429019928, -0.19328352808952332, 0.16006939113140106, -0.08176520466804504, 0.5748259425163269, 0.043528083711862564, 0.11582617461681366, 0.32691675424575806, 0.16680525243282318, 0.25431233644485474, -0.0861576572060585, -0.03815679997205734, -0.46304255723953247, 0.16881117224693298, 0.04454951733350754, -0.20708909630775452, 0.03262805938720703, -0.013116147369146347, 0.0020361170172691345, -0.14177018404006958, -0.49095991253852844, -0.1896974742412567, 0.1263844221830368, 0.33263567090034485, 0.0455344058573246, -0.19456160068511963, -0.07172354310750961, 0.30790218710899353, 0.5289881825447083, 0.28418436646461487, -0.48439836502075195, 0.6486112475395203, -0.17322717607021332, 0.26215696334838867, 0.027627237141132355, 0.13983865082263947, 0.24697375297546387, -0.3400690257549286, 0.14523252844810486, 0.30960530042648315, 0.020383134484291077, 0.09613583236932755, 0.26981252431869507, -0.04975809156894684, 0.4669802784919739, -0.3655828535556793, 0.21704359352588654, 0.17519617080688477, -0.09873685240745544, -0.02477419748902321, -0.35242071747779846, 0.023661650717258453, -0.271432489156723, 0.0815349742770195, 0.13792943954467773, 0.1622810661792755, 0.3600626289844513, -0.02098039537668228, -0.175327330827713, -0.3449781835079193, 0.0064774975180625916, 0.0728713795542717, 0.5753844976425171, -0.10901355743408203, -0.1020677238702774, -0.18880367279052734, 0.02768959477543831, 0.063990518450737, 0.04172185808420181, 0.14617976546287537, 0.09580540657043457, 0.01096724346280098, 0.1966487169265747, 0.5581321120262146, 0.40650761127471924, 0.2978293001651764, 0.3309984803199768, 0.10502766817808151, -0.18400374054908752, -0.15999460220336914, 0.07284069061279297, -0.006296053528785706, 0.34041887521743774, 0.42322903871536255, -0.14679594337940216, -0.1856638491153717, -0.07737154513597488, -0.5058631896972656, 0.32926416397094727, 0.11852602660655975, -0.14109069108963013, -0.08802072703838348, -0.28393620252609253, -0.2395733892917633, -0.1547185480594635, -0.14356441795825958, -0.15825262665748596, -0.26713839173316956, -0.04822631925344467, 0.3959108591079712, -0.12114863097667694, 0.28623732924461365, 0.036082569509744644, 0.04745103418827057, -0.04892383888363838, 0.05581291764974594, -0.2440251260995865, 0.07340920716524124, 0.2273012399673462, 0.07569102942943573, 0.3483896255493164, 0.13148976862430573, -0.008515195921063423, -0.03746725618839264, -0.1987878531217575, -0.6125218272209167, 0.1570817530155182, 0.24926891922950745, -0.05280984938144684, 0.3172295391559601, 0.23309294879436493, 0.030469506978988647, 0.23461304605007172, -0.04662691801786423, 0.36879727244377136, 0.10472863912582397, 0.13453644514083862, -0.013817884959280491, -0.003510157112032175, -0.0478968620300293, -0.17418651282787323, 0.04923355579376221, -0.39741674065589905, -0.5977883338928223, 0.3137366771697998, 0.12626101076602936, 0.07550368458032608, 0.20204325020313263, 0.2086443454027176, -0.15937750041484833, -0.05618758872151375, -0.27912792563438416, -0.10052968561649323, -0.2919052541255951, 0.28783929347991943, -0.23296912014484406, -0.13801249861717224, -0.1720082312822342, 0.04223674535751343, 0.29467612504959106, 0.1684539020061493, -0.3758494257926941, -0.4079686403274536, -0.005944840610027313, 0.1323137730360031, -0.2180781066417694, 0.12215112149715424, 0.38973358273506165, 0.1156613677740097, 0.008555145934224129, -0.06244104355573654, -0.16700708866119385, -0.04573049396276474, -0.06081470102071762, 0.12152516841888428, -0.007315486669540405, 0.014730064198374748, 0.009219236671924591, 0.10247376561164856, 0.44103601574897766, 0.2588089406490326, 0.41435378789901733, 0.04797938093543053, 0.478802889585495, 0.16847211122512817, -0.2912519872188568, -0.013633967377245426, -0.07710427045822144, -0.12615054845809937, 0.2543320059776306, -0.0267464742064476, -0.37267783284187317, -0.3121179938316345, 0.05308670923113823, -0.21108782291412354, -0.16414842009544373, -0.17895109951496124, -0.05125837028026581, 0.046467073261737823, -0.15574467182159424, 0.04990130662918091, -0.019300730898976326, 0.14815360307693481, -0.14963199198246002, 0.07854890823364258, 0.14891913533210754, -0.17932574450969696, -0.06003446877002716, 0.036304887384176254, -0.3061727285385132, 0.2106776237487793, -0.04716930165886879, 0.02199946716427803, -0.0037575624883174896, 0.19180408120155334, -0.07779476046562195, -0.18046970665454865, 0.8574663400650024, -0.43100103735923767, 0.27221742272377014, 0.3176080882549286, -0.10243593901395798, -0.5561642646789551, -0.1591375768184662, -0.33211591839790344, 0.09828458726406097, -0.15648587048053741, 0.6079915761947632, -0.299553245306015, -0.11134830862283707, 0.10974232852458954, -0.027068128809332848, 0.0017396807670593262, -0.14270122349262238, -0.1022176668047905, -0.24294018745422363, -0.2518455684185028, -0.05136699229478836, 0.022025132551789284, 0.0017917309887707233, 0.013099247589707375, -0.18540549278259277, 0.11986677348613739, -0.3928377330303192, -0.05451872944831848, 0.2569463849067688, 0.2815631330013275, -0.24008899927139282, 0.1826719343662262, 0.3548608124256134, 0.2494058907032013, 0.3941250145435333, 0.5376423597335815, -0.24597933888435364, -0.26671525835990906, 0.13573181629180908, -0.09414760023355484, 0.13897959887981415, 0.13715653121471405, -0.05217964947223663, -0.2549562156200409, -0.15896867215633392, 0.36477768421173096, -0.14271757006645203, -0.06000962480902672, 0.24339857697486877, -0.04904213547706604, -0.1945957988500595, -0.3038634657859802, 0.28083205223083496, 0.36052897572517395, -0.0054947808384895325, 0.35497599840164185, -0.23566420376300812, -0.12307384610176086, 0.24053272604942322, 0.05029606446623802, 0.5726490020751953, 0.08038223534822464, -0.08622124791145325, 0.21913975477218628, -0.17125430703163147, 0.1776956021785736, -0.47429656982421875, 0.24137622117996216, -0.3087617754936218, -0.25978678464889526, -0.10566838830709457, 0.02022523805499077, 0.4335983693599701, 0.2670215368270874, -0.543012261390686, 0.3097033202648163, 0.37205255031585693, -0.3321502208709717, -0.1957560032606125, -0.019229331985116005, -0.43089038133621216, -0.18223805725574493, -0.3198221027851105, 0.08370118588209152, -0.07638895511627197, -0.05991830304265022, -0.20048123598098755, -0.17391973733901978, 0.1832275092601776, -0.16857004165649414, -0.3055250644683838, 0.06439922749996185, -0.364185631275177, 0.15472383797168732, 0.12551310658454895, -0.010716952383518219, 0.20093907415866852, 0.2620634138584137, -0.005549125373363495, 0.03375917673110962, -0.2725333571434021, -0.028678465634584427, -0.3822820484638214, -0.10779277235269547, -0.36326274275779724, 0.06628468632698059, 0.16686886548995972, -0.12091249972581863, -0.2875455915927887, -0.19265466928482056, -0.10109283030033112, -0.23905648291110992, 0.1319616734981537, 0.24733780324459076, 0.19334222376346588, -0.14257997274398804, 0.19480028748512268, -0.0795789510011673, -0.08454473316669464, -0.37841808795928955, 0.045419029891490936, -0.05093497037887573, -0.30811208486557007, 0.33166250586509705, -0.04597898945212364, -0.09758810698986053, -0.046512532979249954, 0.17572912573814392, -0.28095901012420654, 0.3190942704677582, -0.04353434592485428, -0.05031094327569008, -0.14282318949699402, -0.2521248161792755, 0.12091445177793503, -0.03741517663002014, -0.22685128450393677, 0.04248514026403427, 0.025658540427684784, -0.22039031982421875, 0.03462280333042145, -0.013729799538850784, 0.24880258738994598, 0.3306849002838135, -0.17999015748500824, -0.33806586265563965, 0.0829167440533638, 0.10936686396598816, -0.23347292840480804, 0.28190430998802185, 0.05510042607784271, 0.07377859950065613, 0.27953454852104187, 0.028001055121421814, -0.2529776692390442, 0.23519879579544067, -0.11888781934976578, -0.09209124743938446, 0.2504845857620239, -0.21178880333900452, -0.09721486270427704, -0.005362931173294783, 0.11154894530773163, 0.3653631806373596, -0.24861183762550354, -0.08702309429645538, 0.14121505618095398, 0.11212527751922607, 0.16909313201904297, -0.15814493596553802, -0.006384746171534061, 0.1170133501291275, -0.2513653337955475, -0.2263987809419632, 0.08333098888397217, 0.055357642471790314, 0.143314927816391, 0.11505676805973053, 0.47763821482658386, -0.02103981375694275, -0.25683048367500305, 0.11289439350366592, 0.19537506997585297, 0.02694196254014969, -0.0889100506901741, 0.354585736989975, -0.10691668838262558, -0.07979964464902878, -0.19752579927444458, 0.16868780553340912, 0.4058803915977478, 0.25842398405075073, 0.24061790108680725, -0.14422567188739777, 0.19068798422813416, 0.3473091423511505, 0.6864913702011108, 0.41929104924201965, 0.12212599813938141, 0.07025281339883804, 0.3771710693836212, 0.18626773357391357, -0.29223090410232544, -0.35426631569862366, 0.5240906476974487, 0.09197864681482315, 0.4204317629337311, 0.2773999273777008, 0.24793028831481934, -0.12709979712963104, 0.02157636731863022, 0.10781737416982651, 0.548623263835907, 0.08766405284404755, 0.3112560510635376, 0.6322576403617859, -0.2705278694629669, -0.02526548132300377, 0.17061647772789001, 0.11029013991355896, 0.3664473295211792, 0.6016941070556641, -0.1940951943397522, 0.48346713185310364, -0.22651514410972595, -0.14964808523654938, 0.18208655714988708, -0.5295386910438538, 0.15294760465621948, -0.07058140635490417, 0.07081623375415802, -0.13406884670257568, -0.2654874920845032, 0.4132744073867798, -0.5916467905044556, 0.03597776219248772, -0.3526347279548645, 0.08759045600891113, -0.08562519401311874, -0.06568576395511627, 0.05621075630187988, -0.17077264189720154, -0.2666894793510437, 0.08634039759635925, -0.02719864621758461, -0.09629063308238983, 0.5279749631881714, -0.1466905176639557, 0.014285922050476074, -0.0470752939581871, 0.3993658423423767, 0.06363487988710403, -0.03526539355516434, -0.29414165019989014, 0.3062668740749359, 0.22692656517028809, -0.1668677181005478, -0.19492004811763763, 0.26609331369400024, 0.5214283466339111, -0.14711618423461914, 0.24226295948028564, -0.25753945112228394, -0.39845630526542664, 0.015627393499016762, -0.19473353028297424, -0.09945802390575409, -0.05808788537979126, 0.04436879605054855, 0.5313539505004883, 0.14729206264019012, -0.06979179382324219, 0.3038061261177063, 0.02711046114563942, 0.25172969698905945, -0.31811508536338806, -0.033846937119960785, -0.1835162192583084, -0.19469138979911804, 0.1537676453590393, -0.25078991055488586, -0.6294853091239929, -0.10280739516019821, 0.1619487702846527, -0.28398361802101135, 0.05872296541929245, 0.04893454909324646, 0.040312692523002625, 0.18245156109333038, 0.3255651593208313, 0.3269385099411011, -0.13663294911384583, -0.037799663841724396, -0.24760301411151886, -0.7768654227256775, 0.134374737739563, -0.06258966028690338, -0.12628211081027985, -0.11754518747329712, 0.20591521263122559, 0.16437101364135742, 0.28635644912719727, 0.2562100887298584, 0.35619184374809265, 0.3381927013397217, 0.10453194379806519, -0.36891865730285645, 0.03417623043060303, 0.39051681756973267, 0.25342631340026855, 0.23810717463493347, -0.41530004143714905, 0.12335743010044098, 0.057231355458498, 0.033589355647563934, 0.13082410395145416, 0.027037374675273895, -0.16286401450634003, -0.38312631845474243, 0.04237115755677223, -0.07827887684106827, 0.43960240483283997, -0.07966943085193634, -0.05430186167359352, -0.12285664677619934, 0.11557465046644211, -0.10365541279315948, -0.0008394867181777954, 0.2412225902080536, 0.4143393337726593, -0.3832382261753082, -0.07415598630905151, -0.2703026533126831, -0.06708566844463348, -0.11435569822788239, 0.32217395305633545, -0.008002092130482197, 0.020506499335169792, 0.16442060470581055, -0.09365968406200409, 0.15809109807014465, 0.10669596493244171, -0.09992106258869171, -0.12519630789756775, -0.14216293394565582, -0.5135589241981506, 0.25656819343566895, 0.16945824027061462, -0.29540249705314636, -0.3195949196815491, -0.10673423111438751, 0.2133079469203949, 0.0743841901421547, -0.3615954518318176, 0.13217410445213318, 0.22136592864990234, 0.16019880771636963, 0.002155788242816925, -0.005565181374549866, -0.13115927577018738, -0.27700358629226685, -0.11307434737682343, 0.17339485883712769, 0.14034222066402435, -0.3119938373565674, 0.22582384943962097, -0.043725915253162384 ]
https://github.com/huggingface/datasets/issues/6729
Support zipfiles that span multiple disks?
The underlying issue issue is that the dataset repository has used split ZIP archive files: https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data ``` downstream_dataset_patches_npzip.z01 downstream_dataset_patches_npzip.z02 ... downstream_dataset_patches_npzip.zip ``` and these are not supported by the Python standard library package `zipfile`.
See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream The dataset viewer gives the following error: ``` Error code: ConfigNamesError Exception: BadZipFile Message: zipfiles that span multiple disks are not supported Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 347, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1846, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1240, in get_module module_name, default_builder_kwargs = infer_module_for_data_files( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 584, in infer_module_for_data_files split_modules = { File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 585, in <dictcomp> split: infer_module_for_data_files_list(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 526, in infer_module_for_data_files_list return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 554, in infer_module_for_data_files_list_in_archives for f in xglob(extracted, recursive=True, download_config=download_config)[ File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 576, in xglob fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 622, in get_fs_token_paths fs = filesystem(protocol, **inkwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/registry.py", line 290, in filesystem return cls(**storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 79, in __call__ obj = super().__call__(*args, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py", line 57, in __init__ self.zip = zipfile.ZipFile( File "/usr/local/lib/python3.9/zipfile.py", line 1266, in __init__ self._RealGetContents() File "/usr/local/lib/python3.9/zipfile.py", line 1329, in _RealGetContents endrec = _EndRecData(fp) File "/usr/local/lib/python3.9/zipfile.py", line 286, in _EndRecData return _EndRecData64(fpin, -sizeEndCentDir, endrec) File "/usr/local/lib/python3.9/zipfile.py", line 232, in _EndRecData64 raise BadZipFile("zipfiles that span multiple disks are not supported") zipfile.BadZipFile: zipfiles that span multiple disks are not supported ``` The files (https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data) are: <img width="629" alt="Capture d’écran 2024-03-11 à 22 07 30" src="https://github.com/huggingface/datasets/assets/1676121/0bb15a51-d54f-4d73-8572-e427ea644b36">
34
Support zipfiles that span multiple disks? See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream The dataset viewer gives the following error: ``` Error code: ConfigNamesError Exception: BadZipFile Message: zipfiles that span multiple disks are not supported Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 347, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1846, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1240, in get_module module_name, default_builder_kwargs = infer_module_for_data_files( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 584, in infer_module_for_data_files split_modules = { File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 585, in <dictcomp> split: infer_module_for_data_files_list(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 526, in infer_module_for_data_files_list return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 554, in infer_module_for_data_files_list_in_archives for f in xglob(extracted, recursive=True, download_config=download_config)[ File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 576, in xglob fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 622, in get_fs_token_paths fs = filesystem(protocol, **inkwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/registry.py", line 290, in filesystem return cls(**storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 79, in __call__ obj = super().__call__(*args, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py", line 57, in __init__ self.zip = zipfile.ZipFile( File "/usr/local/lib/python3.9/zipfile.py", line 1266, in __init__ self._RealGetContents() File "/usr/local/lib/python3.9/zipfile.py", line 1329, in _RealGetContents endrec = _EndRecData(fp) File "/usr/local/lib/python3.9/zipfile.py", line 286, in _EndRecData return _EndRecData64(fpin, -sizeEndCentDir, endrec) File "/usr/local/lib/python3.9/zipfile.py", line 232, in _EndRecData64 raise BadZipFile("zipfiles that span multiple disks are not supported") zipfile.BadZipFile: zipfiles that span multiple disks are not supported ``` The files (https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data) are: <img width="629" alt="Capture d’écran 2024-03-11 à 22 07 30" src="https://github.com/huggingface/datasets/assets/1676121/0bb15a51-d54f-4d73-8572-e427ea644b36"> The underlying issue issue is that the dataset repository has used split ZIP archive files: https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data ``` downstream_dataset_patches_npzip.z01 downstream_dataset_patches_npzip.z02 ... downstream_dataset_patches_npzip.zip ``` and these are not supported by the Python standard library package `zipfile`.
[ -0.781411349773407, -0.14386536180973053, -0.07546406984329224, 0.2898322343826294, 0.1265450119972229, 0.0779995247721672, 0.3441186845302582, 0.2277972251176834, -0.13403397798538208, 0.18954811990261078, -0.22090083360671997, 0.5121448636054993, -0.03472064808011055, 0.35409972071647644, -0.0899806022644043, -0.16690145432949066, 0.013325244188308716, 0.21858030557632446, -0.16041600704193115, 0.2322355955839157, -0.21059918403625488, 0.21529194712638855, -0.18125922977924347, -0.24256940186023712, -0.0537218376994133, -0.11916149407625198, -0.319355845451355, 0.1019645556807518, -0.08887666463851929, -0.1896035224199295, 0.13839475810527802, 0.26018232107162476, 0.026513397693634033, 0.4721429944038391, -0.00011715666187228635, 0.2636623978614807, 0.10581560432910919, -0.010990683920681477, -0.24411055445671082, -0.21662776172161102, -0.033450283110141754, -0.3704122304916382, 0.04283439368009567, -0.23635417222976685, -0.11270198971033096, -0.061959292739629745, -0.04171071946620941, -0.24133719503879547, 0.4857810139656067, -0.04156842827796936, 0.17419052124023438, 0.3230039179325104, 0.16967415809631348, -0.1709267646074295, 0.01573079079389572, 0.1724446564912796, -0.23838260769844055, -0.0051091257482767105, 0.16014602780342102, -0.041121434420347214, -0.20579522848129272, 0.02602151408791542, 0.057911090552806854, 0.41484707593917847, 0.15850557386875153, -0.09452185779809952, 0.10334965586662292, -0.366530179977417, 0.07159500569105148, 0.1915237009525299, 0.6841384768486023, -0.219432532787323, -0.4752497375011444, -0.3816981911659241, -0.082553431391716, -0.055951524525880814, 0.13839468359947205, 0.41623517870903015, -0.15627296268939972, 0.15449956059455872, -0.07751619815826416, -0.1571124792098999, -0.22009673714637756, 0.03343967720866203, -0.473675012588501, 0.607668399810791, -0.1320466548204422, 0.1276792585849762, 0.6268149614334106, 0.0017669536173343658, 0.2312208116054535, 0.08131985366344452, 0.006531175225973129, -0.2564067840576172, -0.05999360606074333, -0.2002163529396057, -0.1384408175945282, 0.13861101865768433, 0.1736835539340973, 0.0654565840959549, 0.10951937735080719, 0.23863595724105835, -0.12911242246627808, 0.2442539930343628, 0.4560483396053314, -0.14955779910087585, -0.07342415302991867, 0.6297595500946045, 0.22029873728752136, 0.34160277247428894, 0.1972246617078781, -0.0660601556301117, -0.031216595321893692, -0.4330288767814636, -0.34849029779434204, -0.056716322898864746, 0.15327811241149902, -0.06511527299880981, -0.2279931604862213, -0.27556756138801575, 0.16366347670555115, -0.22652316093444824, 0.14189226925373077, 0.24260810017585754, -0.09174767136573792, 0.3066049814224243, -0.35874640941619873, 0.20269949734210968, 0.11816110461950302, 0.07017774134874344, -0.07755012065172195, -0.01906193420290947, -0.057549551129341125, 0.12184611707925797, 0.13551390171051025, -0.332530677318573, 0.25468194484710693, -0.17350377142429352, 0.12234599888324738, 0.0819663256406784, 0.029777927324175835, -0.24953018128871918, -0.17694944143295288, 0.2558611035346985, 0.12403625249862671, -0.023167407140135765, -0.019941337406635284, -0.022072501480579376, -0.09904011338949203, 0.0434357188642025, -0.16664254665374756, -0.12727946043014526, -0.10142019391059875, 0.07301243394613266, -0.1489652693271637, 0.0811481922864914, -0.29150548577308655, -0.014630768448114395, -0.03562382608652115, -0.31665465235710144, -0.15905851125717163, 0.013978246599435806, -0.3408544361591339, -0.16255538165569305, 0.0996682420372963, 0.4798092246055603, -0.4491877555847168, -0.09527140110731125, -0.17852693796157837, -0.12154288589954376, 0.015151098370552063, 0.044951729476451874, -0.14194579422473907, -0.14099758863449097, -0.3664179742336273, -0.030370280146598816, 0.32918471097946167, -0.5454297065734863, -0.36258116364479065, 0.5703824758529663, 0.10274292528629303, -0.12281760573387146, 0.32207584381103516, -0.2760239243507385, 0.18103599548339844, -0.19259880483150482, -0.2263188660144806, 0.3572533130645752, -0.04868186265230179, 0.04900430887937546, -0.23768460750579834, -0.26429566740989685, 0.1072729155421257, 0.44959762692451477, 0.19537140429019928, -0.19328352808952332, 0.16006939113140106, -0.08176520466804504, 0.5748259425163269, 0.043528083711862564, 0.11582617461681366, 0.32691675424575806, 0.16680525243282318, 0.25431233644485474, -0.0861576572060585, -0.03815679997205734, -0.46304255723953247, 0.16881117224693298, 0.04454951733350754, -0.20708909630775452, 0.03262805938720703, -0.013116147369146347, 0.0020361170172691345, -0.14177018404006958, -0.49095991253852844, -0.1896974742412567, 0.1263844221830368, 0.33263567090034485, 0.0455344058573246, -0.19456160068511963, -0.07172354310750961, 0.30790218710899353, 0.5289881825447083, 0.28418436646461487, -0.48439836502075195, 0.6486112475395203, -0.17322717607021332, 0.26215696334838867, 0.027627237141132355, 0.13983865082263947, 0.24697375297546387, -0.3400690257549286, 0.14523252844810486, 0.30960530042648315, 0.020383134484291077, 0.09613583236932755, 0.26981252431869507, -0.04975809156894684, 0.4669802784919739, -0.3655828535556793, 0.21704359352588654, 0.17519617080688477, -0.09873685240745544, -0.02477419748902321, -0.35242071747779846, 0.023661650717258453, -0.271432489156723, 0.0815349742770195, 0.13792943954467773, 0.1622810661792755, 0.3600626289844513, -0.02098039537668228, -0.175327330827713, -0.3449781835079193, 0.0064774975180625916, 0.0728713795542717, 0.5753844976425171, -0.10901355743408203, -0.1020677238702774, -0.18880367279052734, 0.02768959477543831, 0.063990518450737, 0.04172185808420181, 0.14617976546287537, 0.09580540657043457, 0.01096724346280098, 0.1966487169265747, 0.5581321120262146, 0.40650761127471924, 0.2978293001651764, 0.3309984803199768, 0.10502766817808151, -0.18400374054908752, -0.15999460220336914, 0.07284069061279297, -0.006296053528785706, 0.34041887521743774, 0.42322903871536255, -0.14679594337940216, -0.1856638491153717, -0.07737154513597488, -0.5058631896972656, 0.32926416397094727, 0.11852602660655975, -0.14109069108963013, -0.08802072703838348, -0.28393620252609253, -0.2395733892917633, -0.1547185480594635, -0.14356441795825958, -0.15825262665748596, -0.26713839173316956, -0.04822631925344467, 0.3959108591079712, -0.12114863097667694, 0.28623732924461365, 0.036082569509744644, 0.04745103418827057, -0.04892383888363838, 0.05581291764974594, -0.2440251260995865, 0.07340920716524124, 0.2273012399673462, 0.07569102942943573, 0.3483896255493164, 0.13148976862430573, -0.008515195921063423, -0.03746725618839264, -0.1987878531217575, -0.6125218272209167, 0.1570817530155182, 0.24926891922950745, -0.05280984938144684, 0.3172295391559601, 0.23309294879436493, 0.030469506978988647, 0.23461304605007172, -0.04662691801786423, 0.36879727244377136, 0.10472863912582397, 0.13453644514083862, -0.013817884959280491, -0.003510157112032175, -0.0478968620300293, -0.17418651282787323, 0.04923355579376221, -0.39741674065589905, -0.5977883338928223, 0.3137366771697998, 0.12626101076602936, 0.07550368458032608, 0.20204325020313263, 0.2086443454027176, -0.15937750041484833, -0.05618758872151375, -0.27912792563438416, -0.10052968561649323, -0.2919052541255951, 0.28783929347991943, -0.23296912014484406, -0.13801249861717224, -0.1720082312822342, 0.04223674535751343, 0.29467612504959106, 0.1684539020061493, -0.3758494257926941, -0.4079686403274536, -0.005944840610027313, 0.1323137730360031, -0.2180781066417694, 0.12215112149715424, 0.38973358273506165, 0.1156613677740097, 0.008555145934224129, -0.06244104355573654, -0.16700708866119385, -0.04573049396276474, -0.06081470102071762, 0.12152516841888428, -0.007315486669540405, 0.014730064198374748, 0.009219236671924591, 0.10247376561164856, 0.44103601574897766, 0.2588089406490326, 0.41435378789901733, 0.04797938093543053, 0.478802889585495, 0.16847211122512817, -0.2912519872188568, -0.013633967377245426, -0.07710427045822144, -0.12615054845809937, 0.2543320059776306, -0.0267464742064476, -0.37267783284187317, -0.3121179938316345, 0.05308670923113823, -0.21108782291412354, -0.16414842009544373, -0.17895109951496124, -0.05125837028026581, 0.046467073261737823, -0.15574467182159424, 0.04990130662918091, -0.019300730898976326, 0.14815360307693481, -0.14963199198246002, 0.07854890823364258, 0.14891913533210754, -0.17932574450969696, -0.06003446877002716, 0.036304887384176254, -0.3061727285385132, 0.2106776237487793, -0.04716930165886879, 0.02199946716427803, -0.0037575624883174896, 0.19180408120155334, -0.07779476046562195, -0.18046970665454865, 0.8574663400650024, -0.43100103735923767, 0.27221742272377014, 0.3176080882549286, -0.10243593901395798, -0.5561642646789551, -0.1591375768184662, -0.33211591839790344, 0.09828458726406097, -0.15648587048053741, 0.6079915761947632, -0.299553245306015, -0.11134830862283707, 0.10974232852458954, -0.027068128809332848, 0.0017396807670593262, -0.14270122349262238, -0.1022176668047905, -0.24294018745422363, -0.2518455684185028, -0.05136699229478836, 0.022025132551789284, 0.0017917309887707233, 0.013099247589707375, -0.18540549278259277, 0.11986677348613739, -0.3928377330303192, -0.05451872944831848, 0.2569463849067688, 0.2815631330013275, -0.24008899927139282, 0.1826719343662262, 0.3548608124256134, 0.2494058907032013, 0.3941250145435333, 0.5376423597335815, -0.24597933888435364, -0.26671525835990906, 0.13573181629180908, -0.09414760023355484, 0.13897959887981415, 0.13715653121471405, -0.05217964947223663, -0.2549562156200409, -0.15896867215633392, 0.36477768421173096, -0.14271757006645203, -0.06000962480902672, 0.24339857697486877, -0.04904213547706604, -0.1945957988500595, -0.3038634657859802, 0.28083205223083496, 0.36052897572517395, -0.0054947808384895325, 0.35497599840164185, -0.23566420376300812, -0.12307384610176086, 0.24053272604942322, 0.05029606446623802, 0.5726490020751953, 0.08038223534822464, -0.08622124791145325, 0.21913975477218628, -0.17125430703163147, 0.1776956021785736, -0.47429656982421875, 0.24137622117996216, -0.3087617754936218, -0.25978678464889526, -0.10566838830709457, 0.02022523805499077, 0.4335983693599701, 0.2670215368270874, -0.543012261390686, 0.3097033202648163, 0.37205255031585693, -0.3321502208709717, -0.1957560032606125, -0.019229331985116005, -0.43089038133621216, -0.18223805725574493, -0.3198221027851105, 0.08370118588209152, -0.07638895511627197, -0.05991830304265022, -0.20048123598098755, -0.17391973733901978, 0.1832275092601776, -0.16857004165649414, -0.3055250644683838, 0.06439922749996185, -0.364185631275177, 0.15472383797168732, 0.12551310658454895, -0.010716952383518219, 0.20093907415866852, 0.2620634138584137, -0.005549125373363495, 0.03375917673110962, -0.2725333571434021, -0.028678465634584427, -0.3822820484638214, -0.10779277235269547, -0.36326274275779724, 0.06628468632698059, 0.16686886548995972, -0.12091249972581863, -0.2875455915927887, -0.19265466928482056, -0.10109283030033112, -0.23905648291110992, 0.1319616734981537, 0.24733780324459076, 0.19334222376346588, -0.14257997274398804, 0.19480028748512268, -0.0795789510011673, -0.08454473316669464, -0.37841808795928955, 0.045419029891490936, -0.05093497037887573, -0.30811208486557007, 0.33166250586509705, -0.04597898945212364, -0.09758810698986053, -0.046512532979249954, 0.17572912573814392, -0.28095901012420654, 0.3190942704677582, -0.04353434592485428, -0.05031094327569008, -0.14282318949699402, -0.2521248161792755, 0.12091445177793503, -0.03741517663002014, -0.22685128450393677, 0.04248514026403427, 0.025658540427684784, -0.22039031982421875, 0.03462280333042145, -0.013729799538850784, 0.24880258738994598, 0.3306849002838135, -0.17999015748500824, -0.33806586265563965, 0.0829167440533638, 0.10936686396598816, -0.23347292840480804, 0.28190430998802185, 0.05510042607784271, 0.07377859950065613, 0.27953454852104187, 0.028001055121421814, -0.2529776692390442, 0.23519879579544067, -0.11888781934976578, -0.09209124743938446, 0.2504845857620239, -0.21178880333900452, -0.09721486270427704, -0.005362931173294783, 0.11154894530773163, 0.3653631806373596, -0.24861183762550354, -0.08702309429645538, 0.14121505618095398, 0.11212527751922607, 0.16909313201904297, -0.15814493596553802, -0.006384746171534061, 0.1170133501291275, -0.2513653337955475, -0.2263987809419632, 0.08333098888397217, 0.055357642471790314, 0.143314927816391, 0.11505676805973053, 0.47763821482658386, -0.02103981375694275, -0.25683048367500305, 0.11289439350366592, 0.19537506997585297, 0.02694196254014969, -0.0889100506901741, 0.354585736989975, -0.10691668838262558, -0.07979964464902878, -0.19752579927444458, 0.16868780553340912, 0.4058803915977478, 0.25842398405075073, 0.24061790108680725, -0.14422567188739777, 0.19068798422813416, 0.3473091423511505, 0.6864913702011108, 0.41929104924201965, 0.12212599813938141, 0.07025281339883804, 0.3771710693836212, 0.18626773357391357, -0.29223090410232544, -0.35426631569862366, 0.5240906476974487, 0.09197864681482315, 0.4204317629337311, 0.2773999273777008, 0.24793028831481934, -0.12709979712963104, 0.02157636731863022, 0.10781737416982651, 0.548623263835907, 0.08766405284404755, 0.3112560510635376, 0.6322576403617859, -0.2705278694629669, -0.02526548132300377, 0.17061647772789001, 0.11029013991355896, 0.3664473295211792, 0.6016941070556641, -0.1940951943397522, 0.48346713185310364, -0.22651514410972595, -0.14964808523654938, 0.18208655714988708, -0.5295386910438538, 0.15294760465621948, -0.07058140635490417, 0.07081623375415802, -0.13406884670257568, -0.2654874920845032, 0.4132744073867798, -0.5916467905044556, 0.03597776219248772, -0.3526347279548645, 0.08759045600891113, -0.08562519401311874, -0.06568576395511627, 0.05621075630187988, -0.17077264189720154, -0.2666894793510437, 0.08634039759635925, -0.02719864621758461, -0.09629063308238983, 0.5279749631881714, -0.1466905176639557, 0.014285922050476074, -0.0470752939581871, 0.3993658423423767, 0.06363487988710403, -0.03526539355516434, -0.29414165019989014, 0.3062668740749359, 0.22692656517028809, -0.1668677181005478, -0.19492004811763763, 0.26609331369400024, 0.5214283466339111, -0.14711618423461914, 0.24226295948028564, -0.25753945112228394, -0.39845630526542664, 0.015627393499016762, -0.19473353028297424, -0.09945802390575409, -0.05808788537979126, 0.04436879605054855, 0.5313539505004883, 0.14729206264019012, -0.06979179382324219, 0.3038061261177063, 0.02711046114563942, 0.25172969698905945, -0.31811508536338806, -0.033846937119960785, -0.1835162192583084, -0.19469138979911804, 0.1537676453590393, -0.25078991055488586, -0.6294853091239929, -0.10280739516019821, 0.1619487702846527, -0.28398361802101135, 0.05872296541929245, 0.04893454909324646, 0.040312692523002625, 0.18245156109333038, 0.3255651593208313, 0.3269385099411011, -0.13663294911384583, -0.037799663841724396, -0.24760301411151886, -0.7768654227256775, 0.134374737739563, -0.06258966028690338, -0.12628211081027985, -0.11754518747329712, 0.20591521263122559, 0.16437101364135742, 0.28635644912719727, 0.2562100887298584, 0.35619184374809265, 0.3381927013397217, 0.10453194379806519, -0.36891865730285645, 0.03417623043060303, 0.39051681756973267, 0.25342631340026855, 0.23810717463493347, -0.41530004143714905, 0.12335743010044098, 0.057231355458498, 0.033589355647563934, 0.13082410395145416, 0.027037374675273895, -0.16286401450634003, -0.38312631845474243, 0.04237115755677223, -0.07827887684106827, 0.43960240483283997, -0.07966943085193634, -0.05430186167359352, -0.12285664677619934, 0.11557465046644211, -0.10365541279315948, -0.0008394867181777954, 0.2412225902080536, 0.4143393337726593, -0.3832382261753082, -0.07415598630905151, -0.2703026533126831, -0.06708566844463348, -0.11435569822788239, 0.32217395305633545, -0.008002092130482197, 0.020506499335169792, 0.16442060470581055, -0.09365968406200409, 0.15809109807014465, 0.10669596493244171, -0.09992106258869171, -0.12519630789756775, -0.14216293394565582, -0.5135589241981506, 0.25656819343566895, 0.16945824027061462, -0.29540249705314636, -0.3195949196815491, -0.10673423111438751, 0.2133079469203949, 0.0743841901421547, -0.3615954518318176, 0.13217410445213318, 0.22136592864990234, 0.16019880771636963, 0.002155788242816925, -0.005565181374549866, -0.13115927577018738, -0.27700358629226685, -0.11307434737682343, 0.17339485883712769, 0.14034222066402435, -0.3119938373565674, 0.22582384943962097, -0.043725915253162384 ]
https://github.com/huggingface/datasets/issues/6729
Support zipfiles that span multiple disks?
It's a pretty bad way to share a dataset since one needs to download the full dataset to use it. We likely won't support this format.
See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream The dataset viewer gives the following error: ``` Error code: ConfigNamesError Exception: BadZipFile Message: zipfiles that span multiple disks are not supported Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 347, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1846, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1240, in get_module module_name, default_builder_kwargs = infer_module_for_data_files( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 584, in infer_module_for_data_files split_modules = { File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 585, in <dictcomp> split: infer_module_for_data_files_list(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 526, in infer_module_for_data_files_list return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 554, in infer_module_for_data_files_list_in_archives for f in xglob(extracted, recursive=True, download_config=download_config)[ File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 576, in xglob fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 622, in get_fs_token_paths fs = filesystem(protocol, **inkwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/registry.py", line 290, in filesystem return cls(**storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 79, in __call__ obj = super().__call__(*args, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py", line 57, in __init__ self.zip = zipfile.ZipFile( File "/usr/local/lib/python3.9/zipfile.py", line 1266, in __init__ self._RealGetContents() File "/usr/local/lib/python3.9/zipfile.py", line 1329, in _RealGetContents endrec = _EndRecData(fp) File "/usr/local/lib/python3.9/zipfile.py", line 286, in _EndRecData return _EndRecData64(fpin, -sizeEndCentDir, endrec) File "/usr/local/lib/python3.9/zipfile.py", line 232, in _EndRecData64 raise BadZipFile("zipfiles that span multiple disks are not supported") zipfile.BadZipFile: zipfiles that span multiple disks are not supported ``` The files (https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data) are: <img width="629" alt="Capture d’écran 2024-03-11 à 22 07 30" src="https://github.com/huggingface/datasets/assets/1676121/0bb15a51-d54f-4d73-8572-e427ea644b36">
26
Support zipfiles that span multiple disks? See https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream The dataset viewer gives the following error: ``` Error code: ConfigNamesError Exception: BadZipFile Message: zipfiles that span multiple disks are not supported Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 347, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1871, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1846, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1240, in get_module module_name, default_builder_kwargs = infer_module_for_data_files( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 584, in infer_module_for_data_files split_modules = { File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 585, in <dictcomp> split: infer_module_for_data_files_list(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 526, in infer_module_for_data_files_list return infer_module_for_data_files_list_in_archives(data_files_list, download_config=download_config) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 554, in infer_module_for_data_files_list_in_archives for f in xglob(extracted, recursive=True, download_config=download_config)[ File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/download/streaming_download_manager.py", line 576, in xglob fs, *_ = fsspec.get_fs_token_paths(urlpath, storage_options=storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/core.py", line 622, in get_fs_token_paths fs = filesystem(protocol, **inkwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/registry.py", line 290, in filesystem return cls(**storage_options) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/spec.py", line 79, in __call__ obj = super().__call__(*args, **kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/fsspec/implementations/zip.py", line 57, in __init__ self.zip = zipfile.ZipFile( File "/usr/local/lib/python3.9/zipfile.py", line 1266, in __init__ self._RealGetContents() File "/usr/local/lib/python3.9/zipfile.py", line 1329, in _RealGetContents endrec = _EndRecData(fp) File "/usr/local/lib/python3.9/zipfile.py", line 286, in _EndRecData return _EndRecData64(fpin, -sizeEndCentDir, endrec) File "/usr/local/lib/python3.9/zipfile.py", line 232, in _EndRecData64 raise BadZipFile("zipfiles that span multiple disks are not supported") zipfile.BadZipFile: zipfiles that span multiple disks are not supported ``` The files (https://huggingface.co/datasets/PhilEO-community/PhilEO-downstream/tree/main/data) are: <img width="629" alt="Capture d’écran 2024-03-11 à 22 07 30" src="https://github.com/huggingface/datasets/assets/1676121/0bb15a51-d54f-4d73-8572-e427ea644b36"> It's a pretty bad way to share a dataset since one needs to download the full dataset to use it. We likely won't support this format.
[ -0.781411349773407, -0.14386536180973053, -0.07546406984329224, 0.2898322343826294, 0.1265450119972229, 0.0779995247721672, 0.3441186845302582, 0.2277972251176834, -0.13403397798538208, 0.18954811990261078, -0.22090083360671997, 0.5121448636054993, -0.03472064808011055, 0.35409972071647644, -0.0899806022644043, -0.16690145432949066, 0.013325244188308716, 0.21858030557632446, -0.16041600704193115, 0.2322355955839157, -0.21059918403625488, 0.21529194712638855, -0.18125922977924347, -0.24256940186023712, -0.0537218376994133, -0.11916149407625198, -0.319355845451355, 0.1019645556807518, -0.08887666463851929, -0.1896035224199295, 0.13839475810527802, 0.26018232107162476, 0.026513397693634033, 0.4721429944038391, -0.00011715666187228635, 0.2636623978614807, 0.10581560432910919, -0.010990683920681477, -0.24411055445671082, -0.21662776172161102, -0.033450283110141754, -0.3704122304916382, 0.04283439368009567, -0.23635417222976685, -0.11270198971033096, -0.061959292739629745, -0.04171071946620941, -0.24133719503879547, 0.4857810139656067, -0.04156842827796936, 0.17419052124023438, 0.3230039179325104, 0.16967415809631348, -0.1709267646074295, 0.01573079079389572, 0.1724446564912796, -0.23838260769844055, -0.0051091257482767105, 0.16014602780342102, -0.041121434420347214, -0.20579522848129272, 0.02602151408791542, 0.057911090552806854, 0.41484707593917847, 0.15850557386875153, -0.09452185779809952, 0.10334965586662292, -0.366530179977417, 0.07159500569105148, 0.1915237009525299, 0.6841384768486023, -0.219432532787323, -0.4752497375011444, -0.3816981911659241, -0.082553431391716, -0.055951524525880814, 0.13839468359947205, 0.41623517870903015, -0.15627296268939972, 0.15449956059455872, -0.07751619815826416, -0.1571124792098999, -0.22009673714637756, 0.03343967720866203, -0.473675012588501, 0.607668399810791, -0.1320466548204422, 0.1276792585849762, 0.6268149614334106, 0.0017669536173343658, 0.2312208116054535, 0.08131985366344452, 0.006531175225973129, -0.2564067840576172, -0.05999360606074333, -0.2002163529396057, -0.1384408175945282, 0.13861101865768433, 0.1736835539340973, 0.0654565840959549, 0.10951937735080719, 0.23863595724105835, -0.12911242246627808, 0.2442539930343628, 0.4560483396053314, -0.14955779910087585, -0.07342415302991867, 0.6297595500946045, 0.22029873728752136, 0.34160277247428894, 0.1972246617078781, -0.0660601556301117, -0.031216595321893692, -0.4330288767814636, -0.34849029779434204, -0.056716322898864746, 0.15327811241149902, -0.06511527299880981, -0.2279931604862213, -0.27556756138801575, 0.16366347670555115, -0.22652316093444824, 0.14189226925373077, 0.24260810017585754, -0.09174767136573792, 0.3066049814224243, -0.35874640941619873, 0.20269949734210968, 0.11816110461950302, 0.07017774134874344, -0.07755012065172195, -0.01906193420290947, -0.057549551129341125, 0.12184611707925797, 0.13551390171051025, -0.332530677318573, 0.25468194484710693, -0.17350377142429352, 0.12234599888324738, 0.0819663256406784, 0.029777927324175835, -0.24953018128871918, -0.17694944143295288, 0.2558611035346985, 0.12403625249862671, -0.023167407140135765, -0.019941337406635284, -0.022072501480579376, -0.09904011338949203, 0.0434357188642025, -0.16664254665374756, -0.12727946043014526, -0.10142019391059875, 0.07301243394613266, -0.1489652693271637, 0.0811481922864914, -0.29150548577308655, -0.014630768448114395, -0.03562382608652115, -0.31665465235710144, -0.15905851125717163, 0.013978246599435806, -0.3408544361591339, -0.16255538165569305, 0.0996682420372963, 0.4798092246055603, -0.4491877555847168, -0.09527140110731125, -0.17852693796157837, -0.12154288589954376, 0.015151098370552063, 0.044951729476451874, -0.14194579422473907, -0.14099758863449097, -0.3664179742336273, -0.030370280146598816, 0.32918471097946167, -0.5454297065734863, -0.36258116364479065, 0.5703824758529663, 0.10274292528629303, -0.12281760573387146, 0.32207584381103516, -0.2760239243507385, 0.18103599548339844, -0.19259880483150482, -0.2263188660144806, 0.3572533130645752, -0.04868186265230179, 0.04900430887937546, -0.23768460750579834, -0.26429566740989685, 0.1072729155421257, 0.44959762692451477, 0.19537140429019928, -0.19328352808952332, 0.16006939113140106, -0.08176520466804504, 0.5748259425163269, 0.043528083711862564, 0.11582617461681366, 0.32691675424575806, 0.16680525243282318, 0.25431233644485474, -0.0861576572060585, -0.03815679997205734, -0.46304255723953247, 0.16881117224693298, 0.04454951733350754, -0.20708909630775452, 0.03262805938720703, -0.013116147369146347, 0.0020361170172691345, -0.14177018404006958, -0.49095991253852844, -0.1896974742412567, 0.1263844221830368, 0.33263567090034485, 0.0455344058573246, -0.19456160068511963, -0.07172354310750961, 0.30790218710899353, 0.5289881825447083, 0.28418436646461487, -0.48439836502075195, 0.6486112475395203, -0.17322717607021332, 0.26215696334838867, 0.027627237141132355, 0.13983865082263947, 0.24697375297546387, -0.3400690257549286, 0.14523252844810486, 0.30960530042648315, 0.020383134484291077, 0.09613583236932755, 0.26981252431869507, -0.04975809156894684, 0.4669802784919739, -0.3655828535556793, 0.21704359352588654, 0.17519617080688477, -0.09873685240745544, -0.02477419748902321, -0.35242071747779846, 0.023661650717258453, -0.271432489156723, 0.0815349742770195, 0.13792943954467773, 0.1622810661792755, 0.3600626289844513, -0.02098039537668228, -0.175327330827713, -0.3449781835079193, 0.0064774975180625916, 0.0728713795542717, 0.5753844976425171, -0.10901355743408203, -0.1020677238702774, -0.18880367279052734, 0.02768959477543831, 0.063990518450737, 0.04172185808420181, 0.14617976546287537, 0.09580540657043457, 0.01096724346280098, 0.1966487169265747, 0.5581321120262146, 0.40650761127471924, 0.2978293001651764, 0.3309984803199768, 0.10502766817808151, -0.18400374054908752, -0.15999460220336914, 0.07284069061279297, -0.006296053528785706, 0.34041887521743774, 0.42322903871536255, -0.14679594337940216, -0.1856638491153717, -0.07737154513597488, -0.5058631896972656, 0.32926416397094727, 0.11852602660655975, -0.14109069108963013, -0.08802072703838348, -0.28393620252609253, -0.2395733892917633, -0.1547185480594635, -0.14356441795825958, -0.15825262665748596, -0.26713839173316956, -0.04822631925344467, 0.3959108591079712, -0.12114863097667694, 0.28623732924461365, 0.036082569509744644, 0.04745103418827057, -0.04892383888363838, 0.05581291764974594, -0.2440251260995865, 0.07340920716524124, 0.2273012399673462, 0.07569102942943573, 0.3483896255493164, 0.13148976862430573, -0.008515195921063423, -0.03746725618839264, -0.1987878531217575, -0.6125218272209167, 0.1570817530155182, 0.24926891922950745, -0.05280984938144684, 0.3172295391559601, 0.23309294879436493, 0.030469506978988647, 0.23461304605007172, -0.04662691801786423, 0.36879727244377136, 0.10472863912582397, 0.13453644514083862, -0.013817884959280491, -0.003510157112032175, -0.0478968620300293, -0.17418651282787323, 0.04923355579376221, -0.39741674065589905, -0.5977883338928223, 0.3137366771697998, 0.12626101076602936, 0.07550368458032608, 0.20204325020313263, 0.2086443454027176, -0.15937750041484833, -0.05618758872151375, -0.27912792563438416, -0.10052968561649323, -0.2919052541255951, 0.28783929347991943, -0.23296912014484406, -0.13801249861717224, -0.1720082312822342, 0.04223674535751343, 0.29467612504959106, 0.1684539020061493, -0.3758494257926941, -0.4079686403274536, -0.005944840610027313, 0.1323137730360031, -0.2180781066417694, 0.12215112149715424, 0.38973358273506165, 0.1156613677740097, 0.008555145934224129, -0.06244104355573654, -0.16700708866119385, -0.04573049396276474, -0.06081470102071762, 0.12152516841888428, -0.007315486669540405, 0.014730064198374748, 0.009219236671924591, 0.10247376561164856, 0.44103601574897766, 0.2588089406490326, 0.41435378789901733, 0.04797938093543053, 0.478802889585495, 0.16847211122512817, -0.2912519872188568, -0.013633967377245426, -0.07710427045822144, -0.12615054845809937, 0.2543320059776306, -0.0267464742064476, -0.37267783284187317, -0.3121179938316345, 0.05308670923113823, -0.21108782291412354, -0.16414842009544373, -0.17895109951496124, -0.05125837028026581, 0.046467073261737823, -0.15574467182159424, 0.04990130662918091, -0.019300730898976326, 0.14815360307693481, -0.14963199198246002, 0.07854890823364258, 0.14891913533210754, -0.17932574450969696, -0.06003446877002716, 0.036304887384176254, -0.3061727285385132, 0.2106776237487793, -0.04716930165886879, 0.02199946716427803, -0.0037575624883174896, 0.19180408120155334, -0.07779476046562195, -0.18046970665454865, 0.8574663400650024, -0.43100103735923767, 0.27221742272377014, 0.3176080882549286, -0.10243593901395798, -0.5561642646789551, -0.1591375768184662, -0.33211591839790344, 0.09828458726406097, -0.15648587048053741, 0.6079915761947632, -0.299553245306015, -0.11134830862283707, 0.10974232852458954, -0.027068128809332848, 0.0017396807670593262, -0.14270122349262238, -0.1022176668047905, -0.24294018745422363, -0.2518455684185028, -0.05136699229478836, 0.022025132551789284, 0.0017917309887707233, 0.013099247589707375, -0.18540549278259277, 0.11986677348613739, -0.3928377330303192, -0.05451872944831848, 0.2569463849067688, 0.2815631330013275, -0.24008899927139282, 0.1826719343662262, 0.3548608124256134, 0.2494058907032013, 0.3941250145435333, 0.5376423597335815, -0.24597933888435364, -0.26671525835990906, 0.13573181629180908, -0.09414760023355484, 0.13897959887981415, 0.13715653121471405, -0.05217964947223663, -0.2549562156200409, -0.15896867215633392, 0.36477768421173096, -0.14271757006645203, -0.06000962480902672, 0.24339857697486877, -0.04904213547706604, -0.1945957988500595, -0.3038634657859802, 0.28083205223083496, 0.36052897572517395, -0.0054947808384895325, 0.35497599840164185, -0.23566420376300812, -0.12307384610176086, 0.24053272604942322, 0.05029606446623802, 0.5726490020751953, 0.08038223534822464, -0.08622124791145325, 0.21913975477218628, -0.17125430703163147, 0.1776956021785736, -0.47429656982421875, 0.24137622117996216, -0.3087617754936218, -0.25978678464889526, -0.10566838830709457, 0.02022523805499077, 0.4335983693599701, 0.2670215368270874, -0.543012261390686, 0.3097033202648163, 0.37205255031585693, -0.3321502208709717, -0.1957560032606125, -0.019229331985116005, -0.43089038133621216, -0.18223805725574493, -0.3198221027851105, 0.08370118588209152, -0.07638895511627197, -0.05991830304265022, -0.20048123598098755, -0.17391973733901978, 0.1832275092601776, -0.16857004165649414, -0.3055250644683838, 0.06439922749996185, -0.364185631275177, 0.15472383797168732, 0.12551310658454895, -0.010716952383518219, 0.20093907415866852, 0.2620634138584137, -0.005549125373363495, 0.03375917673110962, -0.2725333571434021, -0.028678465634584427, -0.3822820484638214, -0.10779277235269547, -0.36326274275779724, 0.06628468632698059, 0.16686886548995972, -0.12091249972581863, -0.2875455915927887, -0.19265466928482056, -0.10109283030033112, -0.23905648291110992, 0.1319616734981537, 0.24733780324459076, 0.19334222376346588, -0.14257997274398804, 0.19480028748512268, -0.0795789510011673, -0.08454473316669464, -0.37841808795928955, 0.045419029891490936, -0.05093497037887573, -0.30811208486557007, 0.33166250586509705, -0.04597898945212364, -0.09758810698986053, -0.046512532979249954, 0.17572912573814392, -0.28095901012420654, 0.3190942704677582, -0.04353434592485428, -0.05031094327569008, -0.14282318949699402, -0.2521248161792755, 0.12091445177793503, -0.03741517663002014, -0.22685128450393677, 0.04248514026403427, 0.025658540427684784, -0.22039031982421875, 0.03462280333042145, -0.013729799538850784, 0.24880258738994598, 0.3306849002838135, -0.17999015748500824, -0.33806586265563965, 0.0829167440533638, 0.10936686396598816, -0.23347292840480804, 0.28190430998802185, 0.05510042607784271, 0.07377859950065613, 0.27953454852104187, 0.028001055121421814, -0.2529776692390442, 0.23519879579544067, -0.11888781934976578, -0.09209124743938446, 0.2504845857620239, -0.21178880333900452, -0.09721486270427704, -0.005362931173294783, 0.11154894530773163, 0.3653631806373596, -0.24861183762550354, -0.08702309429645538, 0.14121505618095398, 0.11212527751922607, 0.16909313201904297, -0.15814493596553802, -0.006384746171534061, 0.1170133501291275, -0.2513653337955475, -0.2263987809419632, 0.08333098888397217, 0.055357642471790314, 0.143314927816391, 0.11505676805973053, 0.47763821482658386, -0.02103981375694275, -0.25683048367500305, 0.11289439350366592, 0.19537506997585297, 0.02694196254014969, -0.0889100506901741, 0.354585736989975, -0.10691668838262558, -0.07979964464902878, -0.19752579927444458, 0.16868780553340912, 0.4058803915977478, 0.25842398405075073, 0.24061790108680725, -0.14422567188739777, 0.19068798422813416, 0.3473091423511505, 0.6864913702011108, 0.41929104924201965, 0.12212599813938141, 0.07025281339883804, 0.3771710693836212, 0.18626773357391357, -0.29223090410232544, -0.35426631569862366, 0.5240906476974487, 0.09197864681482315, 0.4204317629337311, 0.2773999273777008, 0.24793028831481934, -0.12709979712963104, 0.02157636731863022, 0.10781737416982651, 0.548623263835907, 0.08766405284404755, 0.3112560510635376, 0.6322576403617859, -0.2705278694629669, -0.02526548132300377, 0.17061647772789001, 0.11029013991355896, 0.3664473295211792, 0.6016941070556641, -0.1940951943397522, 0.48346713185310364, -0.22651514410972595, -0.14964808523654938, 0.18208655714988708, -0.5295386910438538, 0.15294760465621948, -0.07058140635490417, 0.07081623375415802, -0.13406884670257568, -0.2654874920845032, 0.4132744073867798, -0.5916467905044556, 0.03597776219248772, -0.3526347279548645, 0.08759045600891113, -0.08562519401311874, -0.06568576395511627, 0.05621075630187988, -0.17077264189720154, -0.2666894793510437, 0.08634039759635925, -0.02719864621758461, -0.09629063308238983, 0.5279749631881714, -0.1466905176639557, 0.014285922050476074, -0.0470752939581871, 0.3993658423423767, 0.06363487988710403, -0.03526539355516434, -0.29414165019989014, 0.3062668740749359, 0.22692656517028809, -0.1668677181005478, -0.19492004811763763, 0.26609331369400024, 0.5214283466339111, -0.14711618423461914, 0.24226295948028564, -0.25753945112228394, -0.39845630526542664, 0.015627393499016762, -0.19473353028297424, -0.09945802390575409, -0.05808788537979126, 0.04436879605054855, 0.5313539505004883, 0.14729206264019012, -0.06979179382324219, 0.3038061261177063, 0.02711046114563942, 0.25172969698905945, -0.31811508536338806, -0.033846937119960785, -0.1835162192583084, -0.19469138979911804, 0.1537676453590393, -0.25078991055488586, -0.6294853091239929, -0.10280739516019821, 0.1619487702846527, -0.28398361802101135, 0.05872296541929245, 0.04893454909324646, 0.040312692523002625, 0.18245156109333038, 0.3255651593208313, 0.3269385099411011, -0.13663294911384583, -0.037799663841724396, -0.24760301411151886, -0.7768654227256775, 0.134374737739563, -0.06258966028690338, -0.12628211081027985, -0.11754518747329712, 0.20591521263122559, 0.16437101364135742, 0.28635644912719727, 0.2562100887298584, 0.35619184374809265, 0.3381927013397217, 0.10453194379806519, -0.36891865730285645, 0.03417623043060303, 0.39051681756973267, 0.25342631340026855, 0.23810717463493347, -0.41530004143714905, 0.12335743010044098, 0.057231355458498, 0.033589355647563934, 0.13082410395145416, 0.027037374675273895, -0.16286401450634003, -0.38312631845474243, 0.04237115755677223, -0.07827887684106827, 0.43960240483283997, -0.07966943085193634, -0.05430186167359352, -0.12285664677619934, 0.11557465046644211, -0.10365541279315948, -0.0008394867181777954, 0.2412225902080536, 0.4143393337726593, -0.3832382261753082, -0.07415598630905151, -0.2703026533126831, -0.06708566844463348, -0.11435569822788239, 0.32217395305633545, -0.008002092130482197, 0.020506499335169792, 0.16442060470581055, -0.09365968406200409, 0.15809109807014465, 0.10669596493244171, -0.09992106258869171, -0.12519630789756775, -0.14216293394565582, -0.5135589241981506, 0.25656819343566895, 0.16945824027061462, -0.29540249705314636, -0.3195949196815491, -0.10673423111438751, 0.2133079469203949, 0.0743841901421547, -0.3615954518318176, 0.13217410445213318, 0.22136592864990234, 0.16019880771636963, 0.002155788242816925, -0.005565181374549866, -0.13115927577018738, -0.27700358629226685, -0.11307434737682343, 0.17339485883712769, 0.14034222066402435, -0.3119938373565674, 0.22582384943962097, -0.043725915253162384 ]
https://github.com/huggingface/datasets/issues/6728
Issue Downloading Certain Datasets After Setting Custom `HF_ENDPOINT`
Through debugging, I found a potential solution is to modify the code in the error handling module of `huggingface_hub`: https://github.com/huggingface/huggingface_hub/commit/56d6c798c44e83d2a3167e74c022737d8fcbe822
### Describe the bug This bug is triggered under the following conditions: - datasets repo ids without organization names trigger errors, such as `bookcorpus`, `gsm8k`, `wikipedia`, rather than in the form of `A/B`. - If `HF_ENDPOINT` is set and the hostname is not in the form of `(hub-ci.)?huggingface.co`. - This issue occurs with `datasets>2.15.0` or `huggingface-hub>0.19.4`. For example, using the latest versions: `datasets==2.18.0` and `huggingface-hub==0.21.4`, ### Steps to reproduce the bug the issue can be reproduced with the following code: 1. install specific datasets and huggingface_hub. ```bash pip install datasets==2.18.0 pip install huggingface_hub==0.21.4 ``` 2. execute python code. ```Python import os os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' from datasets import load_dataset bookcorpus = load_dataset('bookcorpus', split='train') ``` console output: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1830, in dataset_module_factory with fs.open(f"datasets/{path}/{filename}", "r", encoding="utf-8") as f: File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1295, in open self.open( File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1307, in open f = self._open( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 228, in _open return HfFileSystemFile(self, path, mode=mode, revision=revision, block_size=block_size, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 615, in __init__ self.resolved_path = fs.resolve_path(path, revision=revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 180, in resolve_path repo_and_revision_exist, err = self._repo_and_revision_exist(repo_type, repo_id, revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 117, in _repo_and_revision_exist self._api.repo_info(repo_id, revision=revision, repo_type=repo_type) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2413, in repo_info return method( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2286, in dataset_info hf_raise_for_status(r) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 362, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://hf-mirror.com/api/datasets/bookcorpus/bookcorpus.py (Request ID: Root=1-65ee8659-5ab10eec5960c63e71f2bb58;b00bdbea-fd6e-4a74-8fe0-bc4682ae090e) ``` ### Expected behavior The dataset was downloaded correctly without any errors. ### Environment info datasets==2.18.0 huggingface-hub==0.21.4
20
Issue Downloading Certain Datasets After Setting Custom `HF_ENDPOINT` ### Describe the bug This bug is triggered under the following conditions: - datasets repo ids without organization names trigger errors, such as `bookcorpus`, `gsm8k`, `wikipedia`, rather than in the form of `A/B`. - If `HF_ENDPOINT` is set and the hostname is not in the form of `(hub-ci.)?huggingface.co`. - This issue occurs with `datasets>2.15.0` or `huggingface-hub>0.19.4`. For example, using the latest versions: `datasets==2.18.0` and `huggingface-hub==0.21.4`, ### Steps to reproduce the bug the issue can be reproduced with the following code: 1. install specific datasets and huggingface_hub. ```bash pip install datasets==2.18.0 pip install huggingface_hub==0.21.4 ``` 2. execute python code. ```Python import os os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' from datasets import load_dataset bookcorpus = load_dataset('bookcorpus', split='train') ``` console output: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1830, in dataset_module_factory with fs.open(f"datasets/{path}/{filename}", "r", encoding="utf-8") as f: File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1295, in open self.open( File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1307, in open f = self._open( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 228, in _open return HfFileSystemFile(self, path, mode=mode, revision=revision, block_size=block_size, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 615, in __init__ self.resolved_path = fs.resolve_path(path, revision=revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 180, in resolve_path repo_and_revision_exist, err = self._repo_and_revision_exist(repo_type, repo_id, revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 117, in _repo_and_revision_exist self._api.repo_info(repo_id, revision=revision, repo_type=repo_type) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2413, in repo_info return method( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2286, in dataset_info hf_raise_for_status(r) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 362, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://hf-mirror.com/api/datasets/bookcorpus/bookcorpus.py (Request ID: Root=1-65ee8659-5ab10eec5960c63e71f2bb58;b00bdbea-fd6e-4a74-8fe0-bc4682ae090e) ``` ### Expected behavior The dataset was downloaded correctly without any errors. ### Environment info datasets==2.18.0 huggingface-hub==0.21.4 Through debugging, I found a potential solution is to modify the code in the error handling module of `huggingface_hub`: https://github.com/huggingface/huggingface_hub/commit/56d6c798c44e83d2a3167e74c022737d8fcbe822
[ -0.1914752870798111, -0.1797131896018982, 0.09339338541030884, 0.23099510371685028, 0.17678934335708618, -0.1634978950023651, 0.216958150267601, 0.1139768660068512, 0.25537243485450745, 0.04573971778154373, -0.5113677382469177, 0.26526182889938354, 0.07376639544963837, 0.14197935163974762, -0.09658180177211761, -0.04955296963453293, -0.1514316201210022, 0.1024283841252327, -0.1047324687242508, -0.3260986804962158, -0.49539893865585327, 0.3339139223098755, 0.05218231678009033, 0.15859012305736542, -0.1759358048439026, 0.0907122939825058, -0.030954929068684578, 0.4404793679714203, -0.08188504725694656, -0.29618701338768005, 0.41744619607925415, 0.21773703396320343, -0.13441380858421326, 0.34370923042297363, -0.00012035874533466995, 0.03829219937324524, 0.02219828963279724, -0.11038077622652054, -0.37925466895103455, -0.3326900005340576, -0.1408548653125763, -0.11387013643980026, -0.017940454185009003, -0.2951996624469757, 0.24094802141189575, -0.06082649156451225, -0.08046472817659378, -0.04017146676778793, 0.3306348919868469, 0.4760805070400238, 0.12912040948867798, 0.3296438157558441, 0.1449752151966095, -0.06913553178310394, 0.4035246968269348, 0.2317478209733963, -0.16242526471614838, 0.1731133759021759, -0.001865290105342865, 0.016468441113829613, 0.1832161396741867, 0.16945607960224152, 0.0214389581233263, 0.12834089994430542, 0.23990398645401, 0.0734856128692627, -0.03468284010887146, -0.2789285480976105, -0.006576422601938248, 0.39454373717308044, 0.13829338550567627, -0.2934381365776062, -0.500176191329956, -0.3446071743965149, -0.09606579691171646, -0.0650145635008812, 0.3438822329044342, 0.1792701929807663, -0.022247839719057083, 0.16737858951091766, -0.16198015213012695, 0.0263210441917181, -0.07466257363557816, 0.22337615489959717, -0.06773015111684799, 0.1978863775730133, -0.037317533046007156, 0.16222095489501953, -0.10170140862464905, -0.18879595398902893, -0.2527327239513397, -0.36121174693107605, -0.11672714352607727, 0.1999102383852005, -0.23931656777858734, -0.095881387591362, -0.017034612596035004, 0.12921884655952454, 0.17031902074813843, 0.20993711054325104, -0.18248015642166138, 0.34734871983528137, -0.20496922731399536, 0.08528298139572144, -0.09298720955848694, -0.08456112444400787, 0.12722298502922058, 0.17771464586257935, 0.35117822885513306, 0.3655078411102295, 0.15070129930973053, 0.08611490577459335, 0.045642971992492676, 0.03699763864278793, -0.2996952533721924, -0.09516050666570663, 0.16522255539894104, -0.2568764090538025, -0.28449973464012146, 0.26639989018440247, -0.2193787395954132, 0.21892863512039185, 0.14050818979740143, 0.2783880829811096, -0.15569640696048737, 0.07767094671726227, 0.06444618850946426, 0.3615860939025879, -0.32748091220855713, 0.2439362108707428, -0.05074073001742363, -0.26718154549598694, 0.01649397984147072, 0.0360729843378067, 0.38387662172317505, -0.20493899285793304, 0.35879430174827576, 0.07299190759658813, 0.04382633417844772, -0.03186593949794769, -0.17637313902378082, -0.2696918249130249, -0.07929440587759018, 0.3380984365940094, 0.06358255445957184, 0.3233625888824463, -0.0029342249035835266, 0.008541218936443329, -0.07520758360624313, -0.21258556842803955, -0.348349004983902, -0.2645390033721924, -0.14773425459861755, 0.18324607610702515, -0.27558791637420654, -0.012152686715126038, -0.1488102376461029, -0.15041524171829224, 0.022745907306671143, 0.20940867066383362, 0.16786083579063416, -0.067025326192379, -0.2556120455265045, -0.07943372428417206, 0.10313419252634048, 0.506943941116333, 0.027558308094739914, -0.2631785571575165, 0.08604270219802856, -0.34512555599212646, 0.08136219531297684, 0.16315311193466187, -0.12618498504161835, 0.036379311233758926, -0.4237394630908966, 0.172709122300148, 0.07866144180297852, -0.49890488386154175, -0.4157234728336334, 0.1645127534866333, -0.11205151677131653, 0.2591463327407837, 0.06706894934177399, -0.14904527366161346, -0.006236325018107891, 0.019791634753346443, 0.04497897997498512, 0.21255671977996826, 0.279232382774353, 0.10377336293458939, -0.08833642303943634, -0.2621850073337555, -0.5349475741386414, 0.2405736893415451, 0.23293088376522064, 0.13398128747940063, 0.16205045580863953, -0.07956371456384659, 0.18351441621780396, -0.0551220066845417, 0.15518030524253845, 0.13347727060317993, 0.32191237807273865, 0.23268158733844757, 0.09827299416065216, -0.21358352899551392, -0.5109003782272339, 0.32405054569244385, -0.19174332916736603, 0.07851266115903854, -0.28154611587524414, -0.2528197765350342, -0.49656763672828674, 0.007944926619529724, -0.10216201841831207, 0.07362393289804459, 0.041553907096385956, 0.08680175989866257, 0.1418767273426056, 0.040289413183927536, -0.028405562043190002, 0.5481114387512207, -0.2509509027004242, 0.41063860058784485, -0.055095214396715164, 0.546615481376648, 0.10828876495361328, -0.010942156426608562, -0.1466071754693985, 0.21340757608413696, 0.30987513065338135, -0.10441507399082184, 0.048455700278282166, 0.3813198506832123, 0.1023247018456459, 0.12439186871051788, 0.21324992179870605, 0.13770906627178192, 0.17336498200893402, -0.12539947032928467, 0.11821143329143524, 0.21736401319503784, 0.215859517455101, -0.06311576068401337, -0.06061805039644241, 0.427018940448761, 0.1753741204738617, 0.3584766387939453, 0.13805612921714783, 0.03977111726999283, 0.20331034064292908, -0.32262122631073, 0.1256219893693924, -0.32541099190711975, 0.3363572657108307, -0.07932710647583008, 0.08323432505130768, -0.034176766872406006, -0.32211026549339294, 0.007563337683677673, 0.39729639887809753, -0.03134257346391678, 0.19354259967803955, 0.28780871629714966, -0.08002770692110062, 0.12514349818229675, 0.10381032526493073, 0.21119926869869232, 0.4277579188346863, 0.06752316653728485, -0.19612842798233032, 0.40078750252723694, -0.15627561509609222, -0.17494851350784302, 0.3061881363391876, 0.15800896286964417, -0.23285220563411713, 0.3959919512271881, 0.29719477891921997, -0.037811655551195145, -0.40771353244781494, -0.3516859710216522, 0.02848844788968563, 0.014637366868555546, -0.727495014667511, -0.07521099597215652, -0.23656480014324188, -0.15740475058555603, -0.2912483811378479, -0.2227952927350998, -0.4637451171875, -0.506074070930481, 0.04994623735547066, 0.24513918161392212, -0.048983342945575714, 0.0681496188044548, -0.1080145388841629, 0.21803641319274902, -0.14017367362976074, -0.22133006155490875, -0.19285635650157928, 0.2601201832294464, -0.16788485646247864, -0.03389717638492584, -0.12217534333467484, 0.15998411178588867, 0.3200417459011078, -0.573516309261322, -0.17502392828464508, -0.4332394003868103, -0.23100227117538452, 0.16895970702171326, 0.08091181516647339, 0.21433240175247192, 0.517380952835083, -0.04893353581428528, 0.1352875977754593, -0.20279695093631744, 0.30445045232772827, 0.07207320630550385, -0.1587623506784439, 0.07818881422281265, -0.10680198669433594, 0.27001455426216125, -0.28482410311698914, -0.06715769320726395, -0.21683752536773682, -0.26906290650367737, 0.04395764693617821, 0.024032901972532272, 0.372164249420166, 0.3916187882423401, -0.13157866895198822, 0.20640242099761963, -0.12742291390895844, -0.1646609902381897, -0.3241948187351227, -0.2641112804412842, 0.4211343824863434, -0.3607320785522461, -0.23906268179416656, 0.16105201840400696, -0.073459193110466, -0.034612853080034256, 0.2375161498785019, -0.5976617336273193, -0.44579213857650757, -0.19743329286575317, 0.301720529794693, -0.07030775398015976, 0.20546028017997742, -0.08863626420497894, -0.10225389897823334, -0.01291421428322792, -0.2927666902542114, -0.15392883121967316, 0.3595183789730072, -0.030697308480739594, 0.16781367361545563, -0.004991624504327774, 0.17249760031700134, -0.22436735033988953, 0.6548646092414856, 0.18104682862758636, 0.08641162514686584, 0.5882953405380249, -0.08727066963911057, 0.20682786405086517, -0.2088240087032318, -0.3508751392364502, -0.10660416632890701, -0.027292653918266296, 0.39231741428375244, 0.3154434561729431, 0.12458305060863495, 0.20474587380886078, -0.2205224335193634, 0.1271626055240631, 0.07523191720247269, -0.29361942410469055, -0.15904949605464935, -0.013999544084072113, 0.21147844195365906, 0.21261686086654663, 0.33426058292388916, -0.1898232400417328, -0.12818625569343567, 0.09760406613349915, 0.2693326473236084, -0.10638710111379623, -0.0431266650557518, -0.35849156975746155, 0.02623511292040348, -0.24915173649787903, 0.3745054602622986, 0.07500692456960678, 0.2064966857433319, -0.05394383892416954, 0.195069819688797, 0.10045821219682693, 0.10333909094333649, 0.3820456266403198, -0.2242743968963623, 0.2923419773578644, -0.056176140904426575, -0.05343161150813103, -0.4693624973297119, -0.07902014255523682, -0.17857126891613007, 0.15428055822849274, 0.09844799339771271, 0.6521432995796204, -0.5284984707832336, -0.27450689673423767, 0.31893983483314514, -0.04127814620733261, -0.023445947095751762, 0.018376197665929794, -0.0062821172177791595, -0.2201504409313202, -0.32331690192222595, -0.10173139721155167, -0.02718501351773739, 0.1244557574391365, -0.22474879026412964, -0.100863978266716, 0.04155489057302475, 0.13799172639846802, 0.0899159163236618, 0.015979714691638947, 0.08499645441770554, 0.045025523751974106, 0.2936672866344452, 0.1870606541633606, 0.09032207727432251, 0.6572005152702332, 0.9994668960571289, -0.10368576645851135, -0.5924181342124939, -0.008935082703828812, -0.03231176733970642, -0.1416427195072174, 0.5738316774368286, 0.12016410380601883, 0.09284036606550217, 0.07313655316829681, 0.28180599212646484, -0.2496551275253296, 0.17901307344436646, 0.37318459153175354, -0.05459299683570862, -0.3190705180168152, -0.02072129212319851, 0.3331463038921356, -0.2160220891237259, -0.08532610535621643, 0.11876524984836578, 0.6302427649497986, -0.36036261916160583, 0.1800588071346283, -0.1701737344264984, 0.7994489073753357, 0.28345322608947754, -0.028103675693273544, 0.3881688117980957, -0.6875998377799988, 0.24877436459064484, -0.07030200213193893, -0.2670069932937622, -0.14765600860118866, 0.10938908159732819, -0.1368316411972046, -0.06040613353252411, 0.1982250213623047, 0.2129497528076172, 0.07066987454891205, 0.32179805636405945, -0.12530900537967682, 0.20814920961856842, -0.06936945021152496, 0.16275809705257416, -0.3640628755092621, -0.560699999332428, -0.43550676107406616, 0.08627631515264511, -0.19685856997966766, 0.44924432039260864, -0.026080526411533356, -0.05305275321006775, -0.31282922625541687, -0.4362603425979614, -0.16721603274345398, 0.12548810243606567, -0.25569164752960205, -0.06431590020656586, 0.026932284235954285, 0.03328287601470947, 0.2469474971294403, -0.31801244616508484, 0.329708993434906, 0.20571792125701904, -0.2568138837814331, 0.19628804922103882, -0.02165837585926056, 0.19972510635852814, 0.15025247633457184, -0.03343389555811882, -0.06553972512483597, 0.02712075412273407, -0.27569469809532166, -0.19246011972427368, -0.1060519739985466, -0.0033551305532455444, 0.23350995779037476, -0.26445138454437256, -0.02531345933675766, -0.27554547786712646, 0.1410968005657196, -0.17631042003631592, 0.23803669214248657, -0.24029389023780823, 0.033354178071022034, -0.21437300741672516, -0.02117689698934555, 0.015045277774333954, -0.07383616268634796, -0.2749316692352295, -0.3055844008922577, 0.5205773115158081, -0.3393259048461914, -0.06424953043460846, 0.585054874420166, 0.07620127499103546, -0.25436896085739136, -0.23378008604049683, 0.05110226571559906, 0.07459894567728043, -0.8749387264251709, 0.04210402071475983, -0.016889026388525963, -0.22631944715976715, -0.1680639088153839, 0.4652521312236786, 0.04217809811234474, 0.11652101576328278, 0.1381223499774933, -0.4886860251426697, -0.08099637180566788, -0.0018333718180656433, -0.14200928807258606, 0.07989636808633804, -0.07017847150564194, 0.04681415483355522, -0.0948222354054451, -0.07310305535793304, -0.24717269837856293, 0.2918991446495056, -0.30133360624313354, 0.04862154275178909, -0.10789148509502411, -0.010108120739459991, 0.3214268982410431, -0.18955515325069427, 0.03888784348964691, 0.03978254646062851, -0.37390220165252686, -0.07336056232452393, -0.46007901430130005, 0.17201654613018036, 0.023853501304984093, -0.4572848677635193, 0.07574779540300369, -0.12368360161781311, -0.14531415700912476, -0.058964356780052185, 0.2956708073616028, 0.46632516384124756, 0.032155707478523254, -0.02029425837099552, 0.3590119481086731, 0.06580464541912079, -0.08212850987911224, 0.11102187633514404, 0.03945402428507805, 0.2511075437068939, -0.11374723166227341, 0.13008809089660645, -0.5609502792358398, -0.04531022906303406, 0.03718625754117966, 0.08449319750070572, 0.08010298758745193, 0.02262905240058899, 0.5154011249542236, -0.27483195066452026, -0.08298006653785706, 0.3471159040927887, 0.30396154522895813, 0.31573420763015747, -0.2711555063724518, -0.32371336221694946, 0.28661873936653137, 0.14556293189525604, -0.15755368769168854, -0.2413777858018875, 0.4924928843975067, 0.04248357564210892, 0.0801672488451004, 0.3300936818122864, 0.36160025000572205, -0.13906531035900116, 0.0921826884150505, 0.08716969192028046, 0.4342743754386902, 0.3716360926628113, 0.21528011560440063, 0.5452843904495239, -0.14572009444236755, 0.2381581962108612, 0.17704428732395172, 0.1107776015996933, 0.09111350774765015, 0.3049882650375366, -0.08384504169225693, 0.06824377179145813, 0.11590343713760376, 0.24257713556289673, 0.3691008687019348, -0.5083164572715759, -0.24498511850833893, -0.28728148341178894, -0.10505630075931549, 0.1705518364906311, -0.07833497226238251, 0.2038263976573944, -0.33734840154647827, -0.11651132255792618, -0.3093540072441101, 0.24337045848369598, -0.07354629039764404, -0.1558619737625122, -0.12155389785766602, -0.19191549718379974, -0.17005173861980438, -0.005202125757932663, -0.15060774981975555, -0.42863571643829346, 0.32377713918685913, 0.002284102141857147, -0.11492849886417389, -0.5493252277374268, -0.11294581741094589, -0.07729790359735489, 0.4279475510120392, -0.3459463119506836, 0.10554300248622894, 0.13319365680217743, -0.004919841885566711, 0.2278229296207428, 0.4473538100719452, 0.32127973437309265, 0.21904292702674866, 0.13044829666614532, 0.0669143870472908, 0.18457216024398804, 0.1674022376537323, 0.022008512169122696, 0.16120651364326477, 0.07174267619848251, -0.06035706773400307, 0.42075881361961365, 0.08060518652200699, -0.17374463379383087, -0.22684477269649506, 0.021093949675559998, 0.37232860922813416, -0.17144791781902313, 0.44521790742874146, -0.3677186369895935, 0.34575384855270386, -0.06701214611530304, -0.03777075558900833, -0.20289230346679688, 0.15108998119831085, 0.1734745055437088, 0.1044037789106369, 0.30611738562583923, -0.11473734676837921, 0.04969426244497299, -0.1780073493719101, 0.5373780727386475, 0.38532742857933044, 0.0677373856306076, -0.2565004527568817, -0.10782395303249359, -0.22709880769252777, 0.13740400969982147, -0.14051823318004608, -0.08892528712749481, 0.11472201347351074, -0.02014077641069889, -0.09943564981222153, -0.005263220518827438, 0.000053241848945617676, -0.07213440537452698, 0.20572571456432343, 0.3754265606403351, -0.2746448516845703, -0.014942806214094162, -0.3162984848022461, -0.08300688862800598, 0.09289964288473129, -0.4306231141090393, 0.24819695949554443, 0.2241017371416092, -0.1016976535320282, 0.2007448375225067, -0.059036433696746826, 0.17955689132213593, -0.3250561058521271, 0.35271239280700684, 0.02175712212920189, 0.241766557097435, -0.04783538728952408, -0.08688461780548096, -0.1682969629764557, -0.38985419273376465, -0.2603866755962372, 0.18384584784507751, -0.1149522066116333, 0.3310996890068054, 0.1749885231256485, -0.05427492782473564, -0.192487433552742, 0.06329166144132614, 0.23725254833698273, 0.2441737800836563, -0.11600662022829056, 0.30455076694488525, -0.09910260140895844, -0.15778060257434845, -0.0198074821382761, 0.15652552247047424, 0.02608688920736313, 0.22217130661010742, -0.24058924615383148, -0.5654608607292175, 0.6518410444259644, -0.0548967607319355, -0.10858777165412903, 0.004229051060974598, 0.48561781644821167, 0.18284964561462402, -0.4275307357311249, -0.5279927253723145, 0.14031466841697693, 0.44892582297325134, -0.2608148455619812, -0.2602415382862091, -0.11840303242206573, -0.13248829543590546, -0.10810202360153198, -0.07297800481319427, 0.000716380774974823, 0.08286768943071365, -0.14765743911266327, 0.3078881800174713, -0.04713067412376404 ]
https://github.com/huggingface/datasets/issues/6728
Issue Downloading Certain Datasets After Setting Custom `HF_ENDPOINT`
Thanks for investigating and reporting the bug @padeoe! I've opened a PR in `huggingface_hub` with your suggested fix! :) https://github.com/huggingface/huggingface_hub/pull/2119
### Describe the bug This bug is triggered under the following conditions: - datasets repo ids without organization names trigger errors, such as `bookcorpus`, `gsm8k`, `wikipedia`, rather than in the form of `A/B`. - If `HF_ENDPOINT` is set and the hostname is not in the form of `(hub-ci.)?huggingface.co`. - This issue occurs with `datasets>2.15.0` or `huggingface-hub>0.19.4`. For example, using the latest versions: `datasets==2.18.0` and `huggingface-hub==0.21.4`, ### Steps to reproduce the bug the issue can be reproduced with the following code: 1. install specific datasets and huggingface_hub. ```bash pip install datasets==2.18.0 pip install huggingface_hub==0.21.4 ``` 2. execute python code. ```Python import os os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' from datasets import load_dataset bookcorpus = load_dataset('bookcorpus', split='train') ``` console output: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1830, in dataset_module_factory with fs.open(f"datasets/{path}/{filename}", "r", encoding="utf-8") as f: File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1295, in open self.open( File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1307, in open f = self._open( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 228, in _open return HfFileSystemFile(self, path, mode=mode, revision=revision, block_size=block_size, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 615, in __init__ self.resolved_path = fs.resolve_path(path, revision=revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 180, in resolve_path repo_and_revision_exist, err = self._repo_and_revision_exist(repo_type, repo_id, revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 117, in _repo_and_revision_exist self._api.repo_info(repo_id, revision=revision, repo_type=repo_type) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2413, in repo_info return method( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2286, in dataset_info hf_raise_for_status(r) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 362, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://hf-mirror.com/api/datasets/bookcorpus/bookcorpus.py (Request ID: Root=1-65ee8659-5ab10eec5960c63e71f2bb58;b00bdbea-fd6e-4a74-8fe0-bc4682ae090e) ``` ### Expected behavior The dataset was downloaded correctly without any errors. ### Environment info datasets==2.18.0 huggingface-hub==0.21.4
20
Issue Downloading Certain Datasets After Setting Custom `HF_ENDPOINT` ### Describe the bug This bug is triggered under the following conditions: - datasets repo ids without organization names trigger errors, such as `bookcorpus`, `gsm8k`, `wikipedia`, rather than in the form of `A/B`. - If `HF_ENDPOINT` is set and the hostname is not in the form of `(hub-ci.)?huggingface.co`. - This issue occurs with `datasets>2.15.0` or `huggingface-hub>0.19.4`. For example, using the latest versions: `datasets==2.18.0` and `huggingface-hub==0.21.4`, ### Steps to reproduce the bug the issue can be reproduced with the following code: 1. install specific datasets and huggingface_hub. ```bash pip install datasets==2.18.0 pip install huggingface_hub==0.21.4 ``` 2. execute python code. ```Python import os os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' from datasets import load_dataset bookcorpus = load_dataset('bookcorpus', split='train') ``` console output: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset builder_instance = load_dataset_builder( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 2228, in load_dataset_builder dataset_module = dataset_module_factory( File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1879, in dataset_module_factory raise e1 from None File "/home/padeoe/.local/lib/python3.10/site-packages/datasets/load.py", line 1830, in dataset_module_factory with fs.open(f"datasets/{path}/{filename}", "r", encoding="utf-8") as f: File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1295, in open self.open( File "/home/padeoe/.local/lib/python3.10/site-packages/fsspec/spec.py", line 1307, in open f = self._open( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 228, in _open return HfFileSystemFile(self, path, mode=mode, revision=revision, block_size=block_size, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 615, in __init__ self.resolved_path = fs.resolve_path(path, revision=revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 180, in resolve_path repo_and_revision_exist, err = self._repo_and_revision_exist(repo_type, repo_id, revision) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 117, in _repo_and_revision_exist self._api.repo_info(repo_id, revision=revision, repo_type=repo_type) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2413, in repo_info return method( File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2286, in dataset_info hf_raise_for_status(r) File "/home/padeoe/.local/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 362, in hf_raise_for_status raise HfHubHTTPError(str(e), response=response) from e huggingface_hub.utils._errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://hf-mirror.com/api/datasets/bookcorpus/bookcorpus.py (Request ID: Root=1-65ee8659-5ab10eec5960c63e71f2bb58;b00bdbea-fd6e-4a74-8fe0-bc4682ae090e) ``` ### Expected behavior The dataset was downloaded correctly without any errors. ### Environment info datasets==2.18.0 huggingface-hub==0.21.4 Thanks for investigating and reporting the bug @padeoe! I've opened a PR in `huggingface_hub` with your suggested fix! :) https://github.com/huggingface/huggingface_hub/pull/2119
[ -0.1914752870798111, -0.1797131896018982, 0.09339338541030884, 0.23099510371685028, 0.17678934335708618, -0.1634978950023651, 0.216958150267601, 0.1139768660068512, 0.25537243485450745, 0.04573971778154373, -0.5113677382469177, 0.26526182889938354, 0.07376639544963837, 0.14197935163974762, -0.09658180177211761, -0.04955296963453293, -0.1514316201210022, 0.1024283841252327, -0.1047324687242508, -0.3260986804962158, -0.49539893865585327, 0.3339139223098755, 0.05218231678009033, 0.15859012305736542, -0.1759358048439026, 0.0907122939825058, -0.030954929068684578, 0.4404793679714203, -0.08188504725694656, -0.29618701338768005, 0.41744619607925415, 0.21773703396320343, -0.13441380858421326, 0.34370923042297363, -0.00012035874533466995, 0.03829219937324524, 0.02219828963279724, -0.11038077622652054, -0.37925466895103455, -0.3326900005340576, -0.1408548653125763, -0.11387013643980026, -0.017940454185009003, -0.2951996624469757, 0.24094802141189575, -0.06082649156451225, -0.08046472817659378, -0.04017146676778793, 0.3306348919868469, 0.4760805070400238, 0.12912040948867798, 0.3296438157558441, 0.1449752151966095, -0.06913553178310394, 0.4035246968269348, 0.2317478209733963, -0.16242526471614838, 0.1731133759021759, -0.001865290105342865, 0.016468441113829613, 0.1832161396741867, 0.16945607960224152, 0.0214389581233263, 0.12834089994430542, 0.23990398645401, 0.0734856128692627, -0.03468284010887146, -0.2789285480976105, -0.006576422601938248, 0.39454373717308044, 0.13829338550567627, -0.2934381365776062, -0.500176191329956, -0.3446071743965149, -0.09606579691171646, -0.0650145635008812, 0.3438822329044342, 0.1792701929807663, -0.022247839719057083, 0.16737858951091766, -0.16198015213012695, 0.0263210441917181, -0.07466257363557816, 0.22337615489959717, -0.06773015111684799, 0.1978863775730133, -0.037317533046007156, 0.16222095489501953, -0.10170140862464905, -0.18879595398902893, -0.2527327239513397, -0.36121174693107605, -0.11672714352607727, 0.1999102383852005, -0.23931656777858734, -0.095881387591362, -0.017034612596035004, 0.12921884655952454, 0.17031902074813843, 0.20993711054325104, -0.18248015642166138, 0.34734871983528137, -0.20496922731399536, 0.08528298139572144, -0.09298720955848694, -0.08456112444400787, 0.12722298502922058, 0.17771464586257935, 0.35117822885513306, 0.3655078411102295, 0.15070129930973053, 0.08611490577459335, 0.045642971992492676, 0.03699763864278793, -0.2996952533721924, -0.09516050666570663, 0.16522255539894104, -0.2568764090538025, -0.28449973464012146, 0.26639989018440247, -0.2193787395954132, 0.21892863512039185, 0.14050818979740143, 0.2783880829811096, -0.15569640696048737, 0.07767094671726227, 0.06444618850946426, 0.3615860939025879, -0.32748091220855713, 0.2439362108707428, -0.05074073001742363, -0.26718154549598694, 0.01649397984147072, 0.0360729843378067, 0.38387662172317505, -0.20493899285793304, 0.35879430174827576, 0.07299190759658813, 0.04382633417844772, -0.03186593949794769, -0.17637313902378082, -0.2696918249130249, -0.07929440587759018, 0.3380984365940094, 0.06358255445957184, 0.3233625888824463, -0.0029342249035835266, 0.008541218936443329, -0.07520758360624313, -0.21258556842803955, -0.348349004983902, -0.2645390033721924, -0.14773425459861755, 0.18324607610702515, -0.27558791637420654, -0.012152686715126038, -0.1488102376461029, -0.15041524171829224, 0.022745907306671143, 0.20940867066383362, 0.16786083579063416, -0.067025326192379, -0.2556120455265045, -0.07943372428417206, 0.10313419252634048, 0.506943941116333, 0.027558308094739914, -0.2631785571575165, 0.08604270219802856, -0.34512555599212646, 0.08136219531297684, 0.16315311193466187, -0.12618498504161835, 0.036379311233758926, -0.4237394630908966, 0.172709122300148, 0.07866144180297852, -0.49890488386154175, -0.4157234728336334, 0.1645127534866333, -0.11205151677131653, 0.2591463327407837, 0.06706894934177399, -0.14904527366161346, -0.006236325018107891, 0.019791634753346443, 0.04497897997498512, 0.21255671977996826, 0.279232382774353, 0.10377336293458939, -0.08833642303943634, -0.2621850073337555, -0.5349475741386414, 0.2405736893415451, 0.23293088376522064, 0.13398128747940063, 0.16205045580863953, -0.07956371456384659, 0.18351441621780396, -0.0551220066845417, 0.15518030524253845, 0.13347727060317993, 0.32191237807273865, 0.23268158733844757, 0.09827299416065216, -0.21358352899551392, -0.5109003782272339, 0.32405054569244385, -0.19174332916736603, 0.07851266115903854, -0.28154611587524414, -0.2528197765350342, -0.49656763672828674, 0.007944926619529724, -0.10216201841831207, 0.07362393289804459, 0.041553907096385956, 0.08680175989866257, 0.1418767273426056, 0.040289413183927536, -0.028405562043190002, 0.5481114387512207, -0.2509509027004242, 0.41063860058784485, -0.055095214396715164, 0.546615481376648, 0.10828876495361328, -0.010942156426608562, -0.1466071754693985, 0.21340757608413696, 0.30987513065338135, -0.10441507399082184, 0.048455700278282166, 0.3813198506832123, 0.1023247018456459, 0.12439186871051788, 0.21324992179870605, 0.13770906627178192, 0.17336498200893402, -0.12539947032928467, 0.11821143329143524, 0.21736401319503784, 0.215859517455101, -0.06311576068401337, -0.06061805039644241, 0.427018940448761, 0.1753741204738617, 0.3584766387939453, 0.13805612921714783, 0.03977111726999283, 0.20331034064292908, -0.32262122631073, 0.1256219893693924, -0.32541099190711975, 0.3363572657108307, -0.07932710647583008, 0.08323432505130768, -0.034176766872406006, -0.32211026549339294, 0.007563337683677673, 0.39729639887809753, -0.03134257346391678, 0.19354259967803955, 0.28780871629714966, -0.08002770692110062, 0.12514349818229675, 0.10381032526493073, 0.21119926869869232, 0.4277579188346863, 0.06752316653728485, -0.19612842798233032, 0.40078750252723694, -0.15627561509609222, -0.17494851350784302, 0.3061881363391876, 0.15800896286964417, -0.23285220563411713, 0.3959919512271881, 0.29719477891921997, -0.037811655551195145, -0.40771353244781494, -0.3516859710216522, 0.02848844788968563, 0.014637366868555546, -0.727495014667511, -0.07521099597215652, -0.23656480014324188, -0.15740475058555603, -0.2912483811378479, -0.2227952927350998, -0.4637451171875, -0.506074070930481, 0.04994623735547066, 0.24513918161392212, -0.048983342945575714, 0.0681496188044548, -0.1080145388841629, 0.21803641319274902, -0.14017367362976074, -0.22133006155490875, -0.19285635650157928, 0.2601201832294464, -0.16788485646247864, -0.03389717638492584, -0.12217534333467484, 0.15998411178588867, 0.3200417459011078, -0.573516309261322, -0.17502392828464508, -0.4332394003868103, -0.23100227117538452, 0.16895970702171326, 0.08091181516647339, 0.21433240175247192, 0.517380952835083, -0.04893353581428528, 0.1352875977754593, -0.20279695093631744, 0.30445045232772827, 0.07207320630550385, -0.1587623506784439, 0.07818881422281265, -0.10680198669433594, 0.27001455426216125, -0.28482410311698914, -0.06715769320726395, -0.21683752536773682, -0.26906290650367737, 0.04395764693617821, 0.024032901972532272, 0.372164249420166, 0.3916187882423401, -0.13157866895198822, 0.20640242099761963, -0.12742291390895844, -0.1646609902381897, -0.3241948187351227, -0.2641112804412842, 0.4211343824863434, -0.3607320785522461, -0.23906268179416656, 0.16105201840400696, -0.073459193110466, -0.034612853080034256, 0.2375161498785019, -0.5976617336273193, -0.44579213857650757, -0.19743329286575317, 0.301720529794693, -0.07030775398015976, 0.20546028017997742, -0.08863626420497894, -0.10225389897823334, -0.01291421428322792, -0.2927666902542114, -0.15392883121967316, 0.3595183789730072, -0.030697308480739594, 0.16781367361545563, -0.004991624504327774, 0.17249760031700134, -0.22436735033988953, 0.6548646092414856, 0.18104682862758636, 0.08641162514686584, 0.5882953405380249, -0.08727066963911057, 0.20682786405086517, -0.2088240087032318, -0.3508751392364502, -0.10660416632890701, -0.027292653918266296, 0.39231741428375244, 0.3154434561729431, 0.12458305060863495, 0.20474587380886078, -0.2205224335193634, 0.1271626055240631, 0.07523191720247269, -0.29361942410469055, -0.15904949605464935, -0.013999544084072113, 0.21147844195365906, 0.21261686086654663, 0.33426058292388916, -0.1898232400417328, -0.12818625569343567, 0.09760406613349915, 0.2693326473236084, -0.10638710111379623, -0.0431266650557518, -0.35849156975746155, 0.02623511292040348, -0.24915173649787903, 0.3745054602622986, 0.07500692456960678, 0.2064966857433319, -0.05394383892416954, 0.195069819688797, 0.10045821219682693, 0.10333909094333649, 0.3820456266403198, -0.2242743968963623, 0.2923419773578644, -0.056176140904426575, -0.05343161150813103, -0.4693624973297119, -0.07902014255523682, -0.17857126891613007, 0.15428055822849274, 0.09844799339771271, 0.6521432995796204, -0.5284984707832336, -0.27450689673423767, 0.31893983483314514, -0.04127814620733261, -0.023445947095751762, 0.018376197665929794, -0.0062821172177791595, -0.2201504409313202, -0.32331690192222595, -0.10173139721155167, -0.02718501351773739, 0.1244557574391365, -0.22474879026412964, -0.100863978266716, 0.04155489057302475, 0.13799172639846802, 0.0899159163236618, 0.015979714691638947, 0.08499645441770554, 0.045025523751974106, 0.2936672866344452, 0.1870606541633606, 0.09032207727432251, 0.6572005152702332, 0.9994668960571289, -0.10368576645851135, -0.5924181342124939, -0.008935082703828812, -0.03231176733970642, -0.1416427195072174, 0.5738316774368286, 0.12016410380601883, 0.09284036606550217, 0.07313655316829681, 0.28180599212646484, -0.2496551275253296, 0.17901307344436646, 0.37318459153175354, -0.05459299683570862, -0.3190705180168152, -0.02072129212319851, 0.3331463038921356, -0.2160220891237259, -0.08532610535621643, 0.11876524984836578, 0.6302427649497986, -0.36036261916160583, 0.1800588071346283, -0.1701737344264984, 0.7994489073753357, 0.28345322608947754, -0.028103675693273544, 0.3881688117980957, -0.6875998377799988, 0.24877436459064484, -0.07030200213193893, -0.2670069932937622, -0.14765600860118866, 0.10938908159732819, -0.1368316411972046, -0.06040613353252411, 0.1982250213623047, 0.2129497528076172, 0.07066987454891205, 0.32179805636405945, -0.12530900537967682, 0.20814920961856842, -0.06936945021152496, 0.16275809705257416, -0.3640628755092621, -0.560699999332428, -0.43550676107406616, 0.08627631515264511, -0.19685856997966766, 0.44924432039260864, -0.026080526411533356, -0.05305275321006775, -0.31282922625541687, -0.4362603425979614, -0.16721603274345398, 0.12548810243606567, -0.25569164752960205, -0.06431590020656586, 0.026932284235954285, 0.03328287601470947, 0.2469474971294403, -0.31801244616508484, 0.329708993434906, 0.20571792125701904, -0.2568138837814331, 0.19628804922103882, -0.02165837585926056, 0.19972510635852814, 0.15025247633457184, -0.03343389555811882, -0.06553972512483597, 0.02712075412273407, -0.27569469809532166, -0.19246011972427368, -0.1060519739985466, -0.0033551305532455444, 0.23350995779037476, -0.26445138454437256, -0.02531345933675766, -0.27554547786712646, 0.1410968005657196, -0.17631042003631592, 0.23803669214248657, -0.24029389023780823, 0.033354178071022034, -0.21437300741672516, -0.02117689698934555, 0.015045277774333954, -0.07383616268634796, -0.2749316692352295, -0.3055844008922577, 0.5205773115158081, -0.3393259048461914, -0.06424953043460846, 0.585054874420166, 0.07620127499103546, -0.25436896085739136, -0.23378008604049683, 0.05110226571559906, 0.07459894567728043, -0.8749387264251709, 0.04210402071475983, -0.016889026388525963, -0.22631944715976715, -0.1680639088153839, 0.4652521312236786, 0.04217809811234474, 0.11652101576328278, 0.1381223499774933, -0.4886860251426697, -0.08099637180566788, -0.0018333718180656433, -0.14200928807258606, 0.07989636808633804, -0.07017847150564194, 0.04681415483355522, -0.0948222354054451, -0.07310305535793304, -0.24717269837856293, 0.2918991446495056, -0.30133360624313354, 0.04862154275178909, -0.10789148509502411, -0.010108120739459991, 0.3214268982410431, -0.18955515325069427, 0.03888784348964691, 0.03978254646062851, -0.37390220165252686, -0.07336056232452393, -0.46007901430130005, 0.17201654613018036, 0.023853501304984093, -0.4572848677635193, 0.07574779540300369, -0.12368360161781311, -0.14531415700912476, -0.058964356780052185, 0.2956708073616028, 0.46632516384124756, 0.032155707478523254, -0.02029425837099552, 0.3590119481086731, 0.06580464541912079, -0.08212850987911224, 0.11102187633514404, 0.03945402428507805, 0.2511075437068939, -0.11374723166227341, 0.13008809089660645, -0.5609502792358398, -0.04531022906303406, 0.03718625754117966, 0.08449319750070572, 0.08010298758745193, 0.02262905240058899, 0.5154011249542236, -0.27483195066452026, -0.08298006653785706, 0.3471159040927887, 0.30396154522895813, 0.31573420763015747, -0.2711555063724518, -0.32371336221694946, 0.28661873936653137, 0.14556293189525604, -0.15755368769168854, -0.2413777858018875, 0.4924928843975067, 0.04248357564210892, 0.0801672488451004, 0.3300936818122864, 0.36160025000572205, -0.13906531035900116, 0.0921826884150505, 0.08716969192028046, 0.4342743754386902, 0.3716360926628113, 0.21528011560440063, 0.5452843904495239, -0.14572009444236755, 0.2381581962108612, 0.17704428732395172, 0.1107776015996933, 0.09111350774765015, 0.3049882650375366, -0.08384504169225693, 0.06824377179145813, 0.11590343713760376, 0.24257713556289673, 0.3691008687019348, -0.5083164572715759, -0.24498511850833893, -0.28728148341178894, -0.10505630075931549, 0.1705518364906311, -0.07833497226238251, 0.2038263976573944, -0.33734840154647827, -0.11651132255792618, -0.3093540072441101, 0.24337045848369598, -0.07354629039764404, -0.1558619737625122, -0.12155389785766602, -0.19191549718379974, -0.17005173861980438, -0.005202125757932663, -0.15060774981975555, -0.42863571643829346, 0.32377713918685913, 0.002284102141857147, -0.11492849886417389, -0.5493252277374268, -0.11294581741094589, -0.07729790359735489, 0.4279475510120392, -0.3459463119506836, 0.10554300248622894, 0.13319365680217743, -0.004919841885566711, 0.2278229296207428, 0.4473538100719452, 0.32127973437309265, 0.21904292702674866, 0.13044829666614532, 0.0669143870472908, 0.18457216024398804, 0.1674022376537323, 0.022008512169122696, 0.16120651364326477, 0.07174267619848251, -0.06035706773400307, 0.42075881361961365, 0.08060518652200699, -0.17374463379383087, -0.22684477269649506, 0.021093949675559998, 0.37232860922813416, -0.17144791781902313, 0.44521790742874146, -0.3677186369895935, 0.34575384855270386, -0.06701214611530304, -0.03777075558900833, -0.20289230346679688, 0.15108998119831085, 0.1734745055437088, 0.1044037789106369, 0.30611738562583923, -0.11473734676837921, 0.04969426244497299, -0.1780073493719101, 0.5373780727386475, 0.38532742857933044, 0.0677373856306076, -0.2565004527568817, -0.10782395303249359, -0.22709880769252777, 0.13740400969982147, -0.14051823318004608, -0.08892528712749481, 0.11472201347351074, -0.02014077641069889, -0.09943564981222153, -0.005263220518827438, 0.000053241848945617676, -0.07213440537452698, 0.20572571456432343, 0.3754265606403351, -0.2746448516845703, -0.014942806214094162, -0.3162984848022461, -0.08300688862800598, 0.09289964288473129, -0.4306231141090393, 0.24819695949554443, 0.2241017371416092, -0.1016976535320282, 0.2007448375225067, -0.059036433696746826, 0.17955689132213593, -0.3250561058521271, 0.35271239280700684, 0.02175712212920189, 0.241766557097435, -0.04783538728952408, -0.08688461780548096, -0.1682969629764557, -0.38985419273376465, -0.2603866755962372, 0.18384584784507751, -0.1149522066116333, 0.3310996890068054, 0.1749885231256485, -0.05427492782473564, -0.192487433552742, 0.06329166144132614, 0.23725254833698273, 0.2441737800836563, -0.11600662022829056, 0.30455076694488525, -0.09910260140895844, -0.15778060257434845, -0.0198074821382761, 0.15652552247047424, 0.02608688920736313, 0.22217130661010742, -0.24058924615383148, -0.5654608607292175, 0.6518410444259644, -0.0548967607319355, -0.10858777165412903, 0.004229051060974598, 0.48561781644821167, 0.18284964561462402, -0.4275307357311249, -0.5279927253723145, 0.14031466841697693, 0.44892582297325134, -0.2608148455619812, -0.2602415382862091, -0.11840303242206573, -0.13248829543590546, -0.10810202360153198, -0.07297800481319427, 0.000716380774974823, 0.08286768943071365, -0.14765743911266327, 0.3078881800174713, -0.04713067412376404 ]
https://github.com/huggingface/datasets/issues/6726
Profiling for HF Filesystem shows there are easy performance gains to be made
Oh I forgot to mention you can also cache resolve_pattern, and that seemed to also substantially improves things, if you want to load a dataset twice for whatever reason.
### Describe the bug # Let's make it faster First, an evidence... ![image](https://github.com/huggingface/datasets/assets/159512661/a703a82c-43a0-426c-9d99-24c563d70965) Figure 1: CProfile for loading 3 files from cerebras/SlimPajama-627B train split, and 3 files from test split using streaming=True. X axis is 1106 seconds long. See? It's pretty slow. What is resolve pattern doing? ``` resolve_pattern called with **/train/** and hf://datasets/cerebras/SlimPajama-627B@2d0accdd58c5d5511943ca1f5ff0e3eb5e293543 resolve_pattern took 20.815081119537354 seconds ``` Makes sense. How to improve it? ## Bigger project, biggest payoff Databricks (and consequently, spark) store a compressed manifest file of the files contained in the remote filesystem. Then, you download one tiny file, decompress it, and all the operations are local instead of this shenanigans. It seems pretty straightforward to make dataset uploads compute a manifest and upload it alongside their data. This would make resolution time so fast that nobody would ever think about it again. It also means you either need to have the uploader compute it _every time_, or have a hook that computes it. ## Smaller project, immediate payoff: Be diligent in avoiding deepcopy Revise the _ls_tree method to avoid deepcopy: ``` def _ls_tree( self, path: str, recursive: bool = False, refresh: bool = False, revision: Optional[str] = None, expand_info: bool = True, ): ..... omitted ..... for path_info in tree: if isinstance(path_info, RepoFile): cache_path_info = { "name": root_path + "/" + path_info.path, "size": path_info.size, "type": "file", "blob_id": path_info.blob_id, "lfs": path_info.lfs, "last_commit": path_info.last_commit, "security": path_info.security, } else: cache_path_info = { "name": root_path + "/" + path_info.path, "size": 0, "type": "directory", "tree_id": path_info.tree_id, "last_commit": path_info.last_commit, } parent_path = self._parent(cache_path_info["name"]) self.dircache.setdefault(parent_path, []).append(cache_path_info) out.append(cache_path_info) return copy.deepcopy(out) # copy to not let users modify the dircache ``` Observe this deepcopy at the end. It is making a copy of a very simple data structure. We do not need to copy. We can simply generate the data structure twice instead. It will be much faster. ``` def _ls_tree( self, path: str, recursive: bool = False, refresh: bool = False, revision: Optional[str] = None, expand_info: bool = True, ): ..... omitted ..... def make_cache_path_info(path_info): if isinstance(path_info, RepoFile): return { "name": root_path + "/" + path_info.path, "size": path_info.size, "type": "file", "blob_id": path_info.blob_id, "lfs": path_info.lfs, "last_commit": path_info.last_commit, "security": path_info.security, } else: return { "name": root_path + "/" + path_info.path, "size": 0, "type": "directory", "tree_id": path_info.tree_id, "last_commit": path_info.last_commit, } for path_info in tree: cache_path_info = make_cache_path_info(path_info) out_cache_path_info = make_cache_path_info(path_info) # copy to not let users modify the dircache parent_path = self._parent(cache_path_info["name"]) self.dircache.setdefault(parent_path, []).append(cache_path_info) out.append(out_cache_path_info) return out ``` Note there is no longer a deepcopy in this method. We have replaced it with generating the output twice. This is substantially faster. For me, the entire resolution went from 1100s to 360s. ## Medium project, medium payoff After the above change, we have this profile: ![image](https://github.com/huggingface/datasets/assets/159512661/db7b83da-2dfc-4c2e-abab-0ede9477876c) Figure 2: x-axis is 355 seconds. Note that globbing and _ls_tree deep copy is gone. No surprise there. It's much faster now, but we still spend ~187seconds in get_fs_token_paths. Well get_fs_token_paths is part of fsspec. We don't need to fix that because we can trust their developers to write high performance code. Probably the caller has misconfigured something. Let's take a look at the storage_options being provided to the filesystem that is constructed during this call. Ah yes, streaming_download_manager::_prepare_single_hop_path_and_storage_options. We know streaming download manager is not compatible with async right now, but we really need this specific part of the code to be async. We're spending so much time checking isDir on the remote filesystem, it's a huge waste. We can make the call easily 20-30x faster by using async, removing this performance bottleneck almost entirely (and reducing the total time of this part of the code to <30s. There is no reason to block async isDir calls for streaming. I'm not going to mess w/ this one myself; I didn't write the streaming impl, and I don't know how it works, but I know the isDir check can be async. ### Steps to reproduce the bug ``` with cProfile.Profile() as pr: pr.enable() # Begin Data if not os.path.exists(data_cache_dir): os.makedirs(data_cache_dir, exist_ok=True) training_dataset = load_dataset(training_dataset_name, split=training_split, cache_dir=data_cache_dir, streaming=True).take(training_slice) eval_dataset = load_dataset(eval_dataset_name, split=eval_split, cache_dir=data_cache_dir, streaming=True).take(eval_slice) # End Data pr.disable() pr.create_stats() if not os.path.exists(profiling_path): os.makedirs(profiling_path, exist_ok=True) pr.dump_stats(os.path.join(profiling_path, "cprofile.prof")) ``` run this code for "cerebras/SlimPajama-627B" and whatever other params ### Expected behavior Something better. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2024.2.0
29
Profiling for HF Filesystem shows there are easy performance gains to be made ### Describe the bug # Let's make it faster First, an evidence... ![image](https://github.com/huggingface/datasets/assets/159512661/a703a82c-43a0-426c-9d99-24c563d70965) Figure 1: CProfile for loading 3 files from cerebras/SlimPajama-627B train split, and 3 files from test split using streaming=True. X axis is 1106 seconds long. See? It's pretty slow. What is resolve pattern doing? ``` resolve_pattern called with **/train/** and hf://datasets/cerebras/SlimPajama-627B@2d0accdd58c5d5511943ca1f5ff0e3eb5e293543 resolve_pattern took 20.815081119537354 seconds ``` Makes sense. How to improve it? ## Bigger project, biggest payoff Databricks (and consequently, spark) store a compressed manifest file of the files contained in the remote filesystem. Then, you download one tiny file, decompress it, and all the operations are local instead of this shenanigans. It seems pretty straightforward to make dataset uploads compute a manifest and upload it alongside their data. This would make resolution time so fast that nobody would ever think about it again. It also means you either need to have the uploader compute it _every time_, or have a hook that computes it. ## Smaller project, immediate payoff: Be diligent in avoiding deepcopy Revise the _ls_tree method to avoid deepcopy: ``` def _ls_tree( self, path: str, recursive: bool = False, refresh: bool = False, revision: Optional[str] = None, expand_info: bool = True, ): ..... omitted ..... for path_info in tree: if isinstance(path_info, RepoFile): cache_path_info = { "name": root_path + "/" + path_info.path, "size": path_info.size, "type": "file", "blob_id": path_info.blob_id, "lfs": path_info.lfs, "last_commit": path_info.last_commit, "security": path_info.security, } else: cache_path_info = { "name": root_path + "/" + path_info.path, "size": 0, "type": "directory", "tree_id": path_info.tree_id, "last_commit": path_info.last_commit, } parent_path = self._parent(cache_path_info["name"]) self.dircache.setdefault(parent_path, []).append(cache_path_info) out.append(cache_path_info) return copy.deepcopy(out) # copy to not let users modify the dircache ``` Observe this deepcopy at the end. It is making a copy of a very simple data structure. We do not need to copy. We can simply generate the data structure twice instead. It will be much faster. ``` def _ls_tree( self, path: str, recursive: bool = False, refresh: bool = False, revision: Optional[str] = None, expand_info: bool = True, ): ..... omitted ..... def make_cache_path_info(path_info): if isinstance(path_info, RepoFile): return { "name": root_path + "/" + path_info.path, "size": path_info.size, "type": "file", "blob_id": path_info.blob_id, "lfs": path_info.lfs, "last_commit": path_info.last_commit, "security": path_info.security, } else: return { "name": root_path + "/" + path_info.path, "size": 0, "type": "directory", "tree_id": path_info.tree_id, "last_commit": path_info.last_commit, } for path_info in tree: cache_path_info = make_cache_path_info(path_info) out_cache_path_info = make_cache_path_info(path_info) # copy to not let users modify the dircache parent_path = self._parent(cache_path_info["name"]) self.dircache.setdefault(parent_path, []).append(cache_path_info) out.append(out_cache_path_info) return out ``` Note there is no longer a deepcopy in this method. We have replaced it with generating the output twice. This is substantially faster. For me, the entire resolution went from 1100s to 360s. ## Medium project, medium payoff After the above change, we have this profile: ![image](https://github.com/huggingface/datasets/assets/159512661/db7b83da-2dfc-4c2e-abab-0ede9477876c) Figure 2: x-axis is 355 seconds. Note that globbing and _ls_tree deep copy is gone. No surprise there. It's much faster now, but we still spend ~187seconds in get_fs_token_paths. Well get_fs_token_paths is part of fsspec. We don't need to fix that because we can trust their developers to write high performance code. Probably the caller has misconfigured something. Let's take a look at the storage_options being provided to the filesystem that is constructed during this call. Ah yes, streaming_download_manager::_prepare_single_hop_path_and_storage_options. We know streaming download manager is not compatible with async right now, but we really need this specific part of the code to be async. We're spending so much time checking isDir on the remote filesystem, it's a huge waste. We can make the call easily 20-30x faster by using async, removing this performance bottleneck almost entirely (and reducing the total time of this part of the code to <30s. There is no reason to block async isDir calls for streaming. I'm not going to mess w/ this one myself; I didn't write the streaming impl, and I don't know how it works, but I know the isDir check can be async. ### Steps to reproduce the bug ``` with cProfile.Profile() as pr: pr.enable() # Begin Data if not os.path.exists(data_cache_dir): os.makedirs(data_cache_dir, exist_ok=True) training_dataset = load_dataset(training_dataset_name, split=training_split, cache_dir=data_cache_dir, streaming=True).take(training_slice) eval_dataset = load_dataset(eval_dataset_name, split=eval_split, cache_dir=data_cache_dir, streaming=True).take(eval_slice) # End Data pr.disable() pr.create_stats() if not os.path.exists(profiling_path): os.makedirs(profiling_path, exist_ok=True) pr.dump_stats(os.path.join(profiling_path, "cprofile.prof")) ``` run this code for "cerebras/SlimPajama-627B" and whatever other params ### Expected behavior Something better. ### Environment info - `datasets` version: 2.18.0 - Platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.1 - `fsspec` version: 2024.2.0 Oh I forgot to mention you can also cache resolve_pattern, and that seemed to also substantially improves things, if you want to load a dataset twice for whatever reason.
[ -0.4390822649002075, -0.129923015832901, -0.01116255298256874, 0.30568891763687134, 0.03608936816453934, -0.030317626893520355, 0.10912622511386871, 0.5356101989746094, 0.04119584336876869, 0.18496552109718323, -0.4971758723258972, 0.29557475447654724, 0.10940773785114288, 0.12598523497581482, -0.04891835153102875, -0.2534630298614502, 0.20698626339435577, -0.031056538224220276, -0.3278934955596924, -0.32380640506744385, -0.07943488657474518, -0.19170407950878143, 0.08700315654277802, -0.3684866428375244, -0.48457401990890503, 0.14293603599071503, -0.33625349402427673, 0.2119397521018982, -0.049698151648044586, -0.030030589550733566, 0.0005178172141313553, 0.5385094881057739, 0.07811354845762253, 0.3161042332649231, -0.00011180776346009225, -0.0777212381362915, 0.169291689991951, 0.05890890955924988, -0.19272902607917786, 0.398776113986969, -0.0056449174880981445, -0.2765462100505829, -0.2582213878631592, -0.1474742293357849, -0.020321831107139587, -0.09337121993303299, -0.023742692545056343, -0.05014657974243164, 0.1555391550064087, -0.0758812427520752, 0.10332219302654266, 0.08003603667020798, -0.508414089679718, -0.09273818880319595, 0.41682425141334534, 0.5882059931755066, -0.10301347076892853, 0.28384846448898315, 0.0846681073307991, -0.23759956657886505, -0.4097626209259033, 0.3074361979961395, -0.1508760005235672, -0.022019878029823303, 0.2772268056869507, -0.034247785806655884, -0.25714510679244995, 0.0240192711353302, -0.03592333197593689, 0.42501354217529297, 0.12696456909179688, 0.15985068678855896, -0.44979798793792725, -0.27438467741012573, -0.25358399748802185, -0.2190989851951599, 0.2829022705554962, 0.05563972890377045, -0.04653046280145645, 0.046507056802511215, -0.026445096358656883, -0.056416429579257965, 0.1296011060476303, -0.04013046622276306, 0.10184088349342346, -0.008526317775249481, 0.06379280984401703, 0.0040881335735321045, 0.36575910449028015, 0.2929285764694214, 0.037176430225372314, -0.44031262397766113, 0.20864857733249664, -0.004978940822184086, -0.40024450421333313, -0.06815376877784729, 0.14615944027900696, 0.10002213716506958, -0.010367942973971367, 0.31397736072540283, -0.11520682275295258, 0.21900853514671326, -0.020829040557146072, -0.01963912695646286, -0.13605374097824097, -0.05207959935069084, -0.2701188623905182, 0.17888933420181274, 0.23256798088550568, 0.38239169120788574, -0.14195097982883453, -0.07154154032468796, -0.16109220683574677, 0.028997331857681274, -0.4226415753364563, -0.06346267461776733, -0.40669381618499756, -0.15263979136943817, -0.05843779444694519, -0.1485767960548401, -0.08494803309440613, -0.3033580482006073, 0.10311973839998245, 0.48226580023765564, -0.15946738421916962, 0.2691963016986847, -0.20124851167201996, -0.18745525181293488, -0.2332283854484558, 0.06088155880570412, -0.19027891755104065, 0.1943809688091278, -0.19573746621608734, 0.29568713903427124, -0.015155190601944923, -0.43037158250808716, -0.09936391562223434, 0.009632994420826435, -0.016195863485336304, 0.43273404240608215, -0.03868090733885765, -0.2797566056251526, -0.004663728177547455, 0.25281983613967896, -0.389365017414093, -0.025190023705363274, 0.02338133193552494, 0.3558483123779297, -0.33917316794395447, -0.09309754520654678, -0.26641324162483215, -0.3938978314399719, -0.17642977833747864, 0.07322563976049423, 0.08981860429048538, 0.1853637397289276, -0.5562212467193604, 0.20041565597057343, -0.2885500192642212, -0.01350974291563034, 0.08944304287433624, 0.021371442824602127, -0.27449288964271545, 0.01747702993452549, 0.24780765175819397, 0.4404255747795105, -0.44984135031700134, 0.08447082340717316, -0.13870671391487122, 0.08063169568777084, 0.3261530101299286, 0.4070953130722046, -0.2053392231464386, 0.06334879249334335, -0.3232501447200775, 0.4036228060722351, 0.22092273831367493, -0.2500719726085663, -0.4918998181819916, 0.5042704939842224, 0.0759686529636383, 0.05917432904243469, 0.46322229504585266, 0.024305930361151695, 0.31791990995407104, -0.2958778142929077, 0.12000027298927307, 0.19030991196632385, 0.1504872441291809, 0.034483738243579865, -0.48013758659362793, -0.3914182186126709, -0.32102978229522705, 0.28586310148239136, 0.08984991908073425, -0.045622341334819794, 0.22662174701690674, -0.14629502594470978, 0.431259423494339, -0.049700137227773666, 0.1226116493344307, 0.04591146484017372, 0.34084293246269226, 0.18623539805412292, -0.04051085188984871, 0.11376487463712692, -0.12072082608938217, 0.37423792481422424, 0.04643305391073227, -0.0798143595457077, 0.12683755159378052, -0.3396477699279785, 0.16288861632347107, -0.1000346690416336, -0.11061142385005951, -0.06790657341480255, -0.04445170983672142, 0.21319033205509186, 0.058089930564165115, -0.12421299517154694, -0.08855009078979492, 0.3636080026626587, -0.25392699241638184, 0.009198008105158806, 0.14974677562713623, 0.6992926597595215, 0.10821980237960815, 0.11837423592805862, -0.19249364733695984, -0.12439680844545364, 0.04378269240260124, -0.14596375823020935, -0.09714879840612411, 0.27428606152534485, 0.016496919095516205, 0.3463130295276642, 0.28553900122642517, 0.427324503660202, 0.05618120729923248, 0.07491014897823334, 0.23727205395698547, -0.11893405020236969, 0.07837750762701035, 0.18173179030418396, -0.4881496727466583, 0.22048112750053406, 0.10462296009063721, 0.30475038290023804, 0.09293442964553833, -0.19743295013904572, -0.0813494399189949, 0.06065322086215019, 0.13476423919200897, 0.2287892997264862, 0.35743793845176697, 0.2394961267709732, 0.3762700855731964, 0.337733656167984, -0.23014284670352936, 0.5425319671630859, 0.817675769329071, -0.213780015707016, -0.4833031892776489, 0.3855965733528137, -0.01542334258556366, -0.4008195698261261, 0.5667116045951843, 0.40860605239868164, 0.3197214603424072, 0.313884973526001, 0.3094519078731537, 0.09336017072200775, 0.02730431780219078, 0.025261666625738144, 0.22104837000370026, -0.026449277997016907, -0.04730008915066719, 0.32857951521873474, 0.03853348270058632, 0.18467281758785248, -0.18429318070411682, -0.23630015552043915, -0.06388160586357117, -0.006097238510847092, -0.2171875238418579, 0.10813643783330917, -0.2873062491416931, -0.03161676973104477, 0.013717555440962315, 0.21253538131713867, -0.00281534343957901, -0.3464175760746002, 0.08551551401615143, 0.3563803434371948, -0.20438723266124725, 0.11809086054563522, 0.058715399354696274, 0.2215479016304016, -0.02971840277314186, -0.2876511812210083, -0.5584646463394165, 0.15492597222328186, 0.0008214227855205536, 0.030116412788629532, 0.32180994749069214, 0.12160708010196686, 0.15618814527988434, 0.004558369517326355, -0.1074889674782753, -0.42400211095809937, -0.2053426206111908, 0.19587425887584686, -0.1672346442937851, 0.0611770898103714, 0.20218776166439056, -0.15544411540031433, -0.3174937963485718, -0.17464783787727356, 0.09417161345481873, -0.09458321332931519, -0.12740157544612885, -0.16621935367584229, -0.03011653572320938, 0.1917380541563034, -0.02435346320271492, -0.14808249473571777, -0.23773764073848724, -0.5035758018493652, 0.3575361371040344, -0.22810445725917816, 0.07032348215579987, -0.08677700161933899, -0.05415543541312218, 0.3257496953010559, -0.15085884928703308, -0.12671318650245667, -0.18812766671180725, -0.5087857246398926, 0.2848973572254181, -0.041377440094947815, -0.3279043734073639, -0.40103158354759216, -0.26792895793914795, -0.2588031589984894, 0.21274933218955994, -0.6623076796531677, -0.34617409110069275, -0.13751010596752167, 0.32777780294418335, -0.08640478551387787, 0.11986909061670303, 0.30104339122772217, 0.0026652414817363024, -0.1372094750404358, -0.028776176273822784, 0.19153743982315063, -0.02445155382156372, 0.2549612522125244, 0.09439604729413986, -0.1663908064365387, 0.35980841517448425, 0.13729654252529144, 0.5991984605789185, 0.17811252176761627, 0.19694925844669342, 0.5879652500152588, 0.060348302125930786, 0.25155699253082275, -0.297911673784256, -0.07859958708286285, 0.26815685629844666, -0.23782199621200562, -0.05989188700914383, 0.2945184111595154, 0.024608448147773743, -0.08139193058013916, 0.10100540518760681, -0.2736875116825104, 0.21412169933319092, -0.26680198311805725, 0.39231058955192566, -0.22593700885772705, -0.013276465237140656, -0.04066988080739975, 0.03905531018972397, 0.02397463098168373, -0.09839968383312225, 0.3992026746273041, 0.10908479243516922, 0.2619823217391968, 0.0025471991393715143, -0.07646165788173676, 0.019505005329847336, -0.4869120121002197, 0.08504967391490936, 0.34089645743370056, -0.3145313858985901, -0.0712706446647644, -0.0853051096200943, 0.18795418739318848, -0.15728074312210083, 0.6501412987709045, -0.12320082634687424, -0.09670625627040863, 0.13591015338897705, -0.29836371541023254, -0.09484315663576126, -0.12163184583187103, -0.16379636526107788, -0.12895965576171875, -0.21868695318698883, 0.6721529960632324, -0.17263263463974, -0.4245438277721405, 0.11915196478366852, 0.036067329347133636, 0.0410611517727375, -0.016226399689912796, -0.022338155657052994, -0.14999184012413025, -0.2115633636713028, 0.03810563683509827, -0.04516395553946495, -0.04677059128880501, -0.22722986340522766, -0.13348841667175293, -0.04547867178916931, 0.1631738543510437, 0.11442511528730392, 0.039395205676555634, 0.22042647004127502, -0.07439890503883362, 0.22152796387672424, 0.008323721587657928, 0.40615835785865784, 0.22628077864646912, 0.3891443908214569, -0.2250249683856964, 0.3449593484401703, 0.19048383831977844, -0.07903493940830231, 0.22983434796333313, 0.48692914843559265, -0.0696982592344284, 0.011308170855045319, -0.29397547245025635, 0.4648085832595825, -0.6124302744865417, 0.3270936906337738, 0.29956457018852234, 0.050045982003211975, -0.37866896390914917, -0.3608047068119049, 0.5852223634719849, 0.02467859536409378, -0.10948684066534042, 0.1449892818927765, 0.5938470363616943, 0.12905341386795044, 0.24446223676204681, 0.026125576347112656, 0.9815288186073303, -0.008468389511108398, 0.3678823709487915, 0.22986385226249695, -0.024688780307769775, 0.2425786703824997, -0.7202091813087463, 0.024854261428117752, -0.12406805157661438, -0.42478442192077637, -0.1347230076789856, 0.013635728508234024, 0.0132121741771698, 0.20505072176456451, -0.08220738917589188, 0.3040248453617096, 0.2190885990858078, 0.0627414882183075, -0.3283511996269226, 0.022338494658470154, -0.09647956490516663, -0.3214099407196045, -0.1562330722808838, 0.15595224499702454, 0.2193506360054016, -0.0010396651923656464, 0.046574607491493225, 0.09354835003614426, -0.1706543117761612, -0.06406845152378082, 0.09760747849941254, -0.03157449886202812, -0.02114318311214447, 0.22673115134239197, -0.21687686443328857, 0.0016065016388893127, -0.13184818625450134, -0.09557205438613892, -0.2897079586982727, -0.029972035437822342, -0.002053176984190941, 0.11577260494232178, 0.04156210646033287, 0.3486589789390564, 0.2353380173444748, -0.4362052381038666, 0.4559633731842041, -0.04338167980313301, -0.1305806040763855, -0.2737646996974945, -0.14509540796279907, -0.33881694078445435, 0.3253883719444275, -0.07006582617759705, 0.20341965556144714, -0.005174502730369568, -0.02762692980468273, 0.07841452211141586, -0.26438140869140625, -0.14480523765087128, 0.07688549160957336, -0.05077984184026718, -0.0709671750664711, 0.32714933156967163, 0.046225689351558685, -0.07119903713464737, -0.280780166387558, 0.524376392364502, -0.1860153079032898, 0.23302796483039856, 0.046499401330947876, -0.031586308032274246, -0.4712589979171753, -0.12023556977510452, 0.14849409461021423, 0.32874903082847595, -0.48596668243408203, -0.031170234084129333, -0.30505284667015076, -0.2643605172634125, -0.1465149074792862, 0.08843798190355301, 0.26794910430908203, -0.2579365670681, -0.23804952204227448, -0.009420130401849747, -0.3135460913181305, 0.2440519481897354, -0.23363201320171356, 0.3023694157600403, -0.011173538863658905, -0.0677788108587265, -0.17171618342399597, 0.04478172957897186, -0.3117627203464508, 0.08376949280500412, -0.10073047876358032, -0.1100732833147049, -0.021139036864042282, -0.006657242774963379, 0.5226131677627563, -0.10489019751548767, 0.08604398369789124, 0.27804598212242126, -0.3292890787124634, -0.1694284975528717, -0.28934207558631897, 0.1431691199541092, -0.05120459198951721, -0.17810355126857758, 0.18866266310214996, -0.04449191689491272, -0.2685069441795349, -0.3076953589916229, 0.15922115743160248, -0.05082680657505989, 0.03397320583462715, -0.11036526411771774, 0.46574538946151733, -0.22645840048789978, -0.1298235058784485, 0.34369543194770813, 0.37607088685035706, 0.14129333198070526, -0.2426089197397232, 0.028233638033270836, -0.12051165848970413, -0.20806480944156647, -0.15951783955097198, 0.2543903589248657, 0.42094504833221436, 0.07068915665149689, 0.4714251160621643, 0.3145090341567993, -0.11290496587753296, -0.20431704819202423, 0.6164219379425049, 0.15169808268547058, 0.16550253331661224, -0.29234275221824646, 0.3300880789756775, 0.15061257779598236, -0.16255676746368408, -0.2358832210302353, 0.04265458136796951, -0.18913446366786957, 0.22218018770217896, 0.044255100190639496, 0.4022993743419647, 0.4015803039073944, -0.24224264919757843, 0.10026418417692184, 0.10096466541290283, 0.02256532572209835, -0.04475934058427811, 0.5216217041015625, 0.24533970654010773, 0.201144739985466, 0.3275345265865326, -0.028664235025644302, 0.1783081293106079, 0.30418819189071655, -0.03021782636642456, 0.36471253633499146, 0.05265429988503456, 0.3946169316768646, 0.07512429356575012, -0.43590953946113586, 0.2399231493473053, 0.18611274659633636, -0.2035597264766693, 0.03495365008711815, -0.2302122414112091, 0.3538350760936737, -0.22265082597732544, -0.34219226241111755, -0.11064590513706207, 0.48314619064331055, -0.16710329055786133, -0.22902075946331024, 0.4224449396133423, -0.19356998801231384, -0.33191585540771484, 0.2616422772407532, -0.07184766232967377, 0.14643806219100952, 0.607745885848999, 0.23893490433692932, 0.42048680782318115, 0.06558915972709656, 0.0011271275579929352, -0.09099221974611282, 0.5389196276664734, -0.1727858930826187, -0.09389685094356537, 0.1191713884472847, 0.014995705336332321, 0.023641925305128098, -0.006354687735438347, 0.22854897379875183, -0.12522989511489868, -0.019746512174606323, -0.1897832751274109, 0.15848560631275177, 0.15280546247959137, 0.05225629359483719, 0.031915564090013504, -0.25281357765197754, -0.10343402624130249, 0.2430163472890854, 0.027238843962550163, -0.2526468336582184, 0.108464315533638, -0.39546579122543335, 0.140189990401268, -0.26840344071388245, 0.42953285574913025, 0.12725554406642914, 0.0033763721585273743, 0.015585685148835182, 0.028045497834682465, -0.2640588879585266, 0.020161505788564682, 0.3548048734664917, -0.3011072874069214, 0.1699565351009369, -0.019852474331855774, 0.09852509945631027, -0.1397465169429779, 0.5652040839195251, 0.19024984538555145, -0.11634510010480881, -0.18448898196220398, -0.03807713836431503, -0.31917789578437805, -0.26496484875679016, 0.06519035249948502, -0.017728110775351524, 0.04468119889497757, 0.17800241708755493, 0.018408268690109253, -0.08246726542711258, 0.04421128332614899, -0.21414905786514282, 0.152572363615036, 0.10124193876981735, -0.18638476729393005, -0.05555477365851402, -0.13556307554244995, -0.04373759776353836, -0.07600543648004532, -0.5651198625564575, 0.19242185354232788, 0.3049839437007904, -0.01619119569659233, 0.1008799821138382, -0.13001517951488495, 0.28738462924957275, -0.16945518553256989, 0.297119140625, -0.04912727326154709, 0.049124471843242645, -0.18813887238502502, -0.29971224069595337, -0.0640421211719513, -0.11436817049980164, -0.1577136069536209, -0.3904798924922943, -0.3494570255279541, 0.5498994588851929, -0.05987526476383209, -0.017150655388832092, -0.23415809869766235, 0.10661482810974121, -0.03919259458780289, 0.016170401126146317, -0.3264656960964203, -0.006016814149916172, -0.3123055696487427, 0.18398615717887878, 0.005016951821744442, 0.2901266813278198, 0.1016448587179184, -0.05237223207950592, -0.27759242057800293, -0.3984740376472473, 0.5235073566436768, -0.2353009283542633, -0.05007988214492798, -0.08190108835697174, 0.08633816242218018, 0.4719477891921997, 0.15317218005657196, -0.33561474084854126, -0.18795353174209595, 0.14137008786201477, 0.06674320995807648, 0.024684205651283264, 0.4782544672489166, -0.022454872727394104, 0.10307548940181732, -0.13356998562812805, -0.013024836778640747, -0.25057485699653625, -0.20317089557647705, 0.1670106202363968, -0.27579784393310547 ]
https://github.com/huggingface/datasets/issues/6721
Hi,do you know how to load the dataset from local file now?
@Gera001 # Loading Dataset from Local Files Using 🤗Hugging Face. To load a dataset from local files using the Hugging Face datasets library, you can use the `load_dataset` function. ``` from datasets import load_dataset dataset = load_dataset('csv', data_files={'train': 'path/to/train.csv', 'test': 'path/to/test.csv'}) ``` Reference to [HF Datasets docs for loading from local](https://huggingface.co/docs/datasets/en/loading#csv). @albertvillanova this issue can be closed here.
Hi, if I want to load the dataset from local file, then how to specify the configuration name? _Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_
58
Hi,do you know how to load the dataset from local file now? Hi, if I want to load the dataset from local file, then how to specify the configuration name? _Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_ @Gera001 # Loading Dataset from Local Files Using 🤗Hugging Face. To load a dataset from local files using the Hugging Face datasets library, you can use the `load_dataset` function. ``` from datasets import load_dataset dataset = load_dataset('csv', data_files={'train': 'path/to/train.csv', 'test': 'path/to/test.csv'}) ``` Reference to [HF Datasets docs for loading from local](https://huggingface.co/docs/datasets/en/loading#csv). @albertvillanova this issue can be closed here.
[ -0.19802147150039673, -0.3678835928440094, -0.02126273885369301, 0.10082454979419708, 0.2918880581855774, 0.06909789890050888, 0.2471809685230255, 0.2844804525375366, 0.4740714728832245, 0.29825717210769653, -0.21148689091205597, -0.03576800972223282, 0.05183638259768486, 0.4644051492214203, 0.22770173847675323, -0.1807350218296051, -0.008661232888698578, 0.18155641853809357, -0.2520504295825958, -0.08939307183027267, -0.14599111676216125, 0.32655295729637146, 0.12420055270195007, 0.1301649808883667, -0.07654033601284027, 0.20439237356185913, -0.014627229422330856, 0.4601757228374481, -0.03000004030764103, -0.29902172088623047, 0.238106831908226, 0.06244649738073349, 0.20119820535182953, 0.4476310610771179, -0.00010251197090838104, 0.19580496847629547, 0.12292401492595673, -0.11201087385416031, -0.15016905963420868, -0.4377257227897644, 0.016044050455093384, -0.24171724915504456, 0.25476765632629395, -0.09433700889348984, -0.3855767548084259, -0.13845780491828918, 0.06604255735874176, -0.19798941910266876, 0.45054036378860474, 0.26031190156936646, 0.29035019874572754, 0.3265942335128784, -0.09370480477809906, -0.19317308068275452, 0.050453074276447296, 0.18748241662979126, 0.009230716153979301, 0.3508070409297943, -0.011807680130004883, -0.22467070817947388, 0.0751422792673111, 0.20662876963615417, 0.12233421206474304, 0.09295457601547241, 0.280070960521698, 0.13032062351703644, -0.23562929034233093, -0.10236476361751556, 0.17839795351028442, 0.27200794219970703, 0.3395899534225464, -0.16183453798294067, -0.1805877983570099, -0.10942074656486511, 0.008331334218382835, -0.22540630400180817, 0.23438557982444763, 0.1931920200586319, -0.1278778612613678, 0.22296574711799622, -0.12380893528461456, -0.10123270750045776, -0.09923821687698364, -0.0035186707973480225, -0.0366995595395565, -0.012553192675113678, -0.20099006593227386, 0.051390163600444794, 0.2837904691696167, -0.09277737140655518, -0.2794163227081299, 0.14691996574401855, 0.04181760549545288, 0.3445212244987488, -0.3409219980239868, 0.2335655689239502, 0.10336814075708389, 0.09687964618206024, 0.20354494452476501, -0.14451687037944794, -0.09899106621742249, 0.08619709312915802, -0.05452810227870941, 0.1549614816904068, 0.23602263629436493, 0.07008910179138184, 0.16518154740333557, -0.15067316591739655, 0.16455307602882385, 0.317002534866333, -0.034288037568330765, -0.16943278908729553, -0.06677735596895218, -0.388596773147583, -0.2856003940105438, -0.19914507865905762, 0.06772728264331818, -0.36850306391716003, -0.07649876922369003, 0.10150348395109177, 0.23795130848884583, -0.045240920037031174, 0.11927427351474762, 0.6995383501052856, -0.14001983404159546, -0.05378180742263794, 0.17860879004001617, -0.011930454522371292, -0.30707839131355286, 0.005454531870782375, -0.3180331587791443, 0.03374013677239418, -0.14195382595062256, 0.01812010444700718, 0.0670805275440216, -0.40797415375709534, 0.39081868529319763, -0.016357069835066795, 0.3170325756072998, 0.08357849717140198, -0.1962784379720688, 0.041401397436857224, 0.04507465660572052, 0.3842744827270508, 0.12982165813446045, 0.0038974620401859283, 0.32755017280578613, -0.27029359340667725, -0.11125344038009644, -0.181456059217453, -0.3055664896965027, -0.34000274538993835, -0.16165027022361755, 0.2580801844596863, -0.0971025750041008, 0.11275441199541092, -0.20830008387565613, 0.024114100262522697, -0.17722466588020325, 0.1359131634235382, -0.11843878775835037, -0.02608931064605713, -0.21450425684452057, -0.03971366211771965, 0.4089915156364441, 0.5018095970153809, -0.3541404604911804, -0.28053635358810425, 0.335233598947525, -0.2903512120246887, -0.06753147393465042, 0.2902897298336029, -0.3624849021434784, -0.045625798404216766, -0.3339560329914093, -0.06241191178560257, 0.04082033038139343, -0.27413737773895264, -0.14081700146198273, 0.40022385120391846, -0.21639007329940796, 0.04095834493637085, 0.002307102084159851, -0.11875743418931961, -0.212570920586586, 0.1736259162425995, 0.18641486763954163, 0.15357258915901184, 0.018081653863191605, 0.10216962546110153, -0.15886259078979492, -0.2415720671415329, -0.13798753917217255, 0.25123289227485657, -0.08751316368579865, 0.14464741945266724, 0.10111884027719498, -0.3369843363761902, 0.3802420198917389, -0.21344313025474548, -0.01635439693927765, 0.4150528907775879, 0.17823094129562378, 0.39360952377319336, 0.08739703893661499, 0.08934427797794342, -0.31432315707206726, 0.2684088349342346, -0.06361109018325806, 0.1442018449306488, -0.06006835401058197, -0.24889104068279266, -0.3316994607448578, -0.05162860080599785, -0.2968546748161316, -0.13603241741657257, 0.10653126239776611, 0.19419094920158386, 0.03125252574682236, 0.05398264899849892, -0.32811686396598816, 0.4044058918952942, -0.17828534543514252, 0.11740314215421677, -0.4420385956764221, 0.20625300705432892, -0.04505855590105057, 0.07657726854085922, 0.07274019718170166, 0.01795816421508789, 0.0539785698056221, -0.25909286737442017, -0.13764530420303345, 0.3730512857437134, 0.011676156893372536, 0.24284064769744873, 0.07796497642993927, 0.0001535862684249878, 0.04594240337610245, -0.17121760547161102, -0.02904028259217739, -0.1915958672761917, 0.09737883508205414, 0.05145999789237976, -0.2416975200176239, 0.45734357833862305, -0.026901450008153915, 0.08000883460044861, 0.11071610450744629, -0.13233627378940582, 0.361145943403244, -0.01622229814529419, -0.16287635266780853, -0.20742887258529663, 0.15421661734580994, -0.06360766291618347, 0.2804945707321167, -0.036500848829746246, -0.5947152972221375, -0.24651890993118286, 0.30707231163978577, 0.029541175812482834, -0.20491227507591248, 0.07695290446281433, -0.06103651970624924, 0.06613011658191681, 0.17506149411201477, -0.10342878848314285, 0.2831653952598572, 0.20916181802749634, -0.18440502882003784, 0.30548542737960815, 0.0647728219628334, -0.1285102218389511, 0.018925204873085022, -0.17418764531612396, 0.06803468614816666, 0.15093091130256653, -0.12105587869882584, -0.15431830286979675, -0.5095571279525757, -0.017887132242321968, -0.18636342883110046, 0.12684889137744904, -0.33102652430534363, 0.0504322424530983, -0.2704136371612549, -0.2667263448238373, -0.27170130610466003, -0.0019326619803905487, -0.32901105284690857, 0.00001717638224363327, -0.2060282975435257, 0.0990227609872818, -0.051949165761470795, 0.05623161047697067, -0.04550028592348099, 0.136534184217453, -0.05788622796535492, -0.18527624011039734, -0.07168108224868774, -0.023870617151260376, -0.1758822202682495, 0.12129203975200653, 0.08802647888660431, 0.09461387991905212, 0.3260592520236969, -0.35624220967292786, -0.1270671933889389, -0.15486666560173035, -0.1480633020401001, 0.17882785201072693, -0.1526392251253128, 0.4372868537902832, 0.17771315574645996, 0.34514427185058594, -0.3413773775100708, -0.06289966404438019, 0.37550875544548035, -0.16905662417411804, -0.15285423398017883, -0.14639361202716827, -0.02055748924612999, -0.040132030844688416, -0.1463298350572586, -0.3159238398075104, -0.3237527012825012, -0.33992999792099, 0.3912757635116577, 0.1430605947971344, 0.07117315381765366, 0.21827420592308044, 0.01407362800091505, 0.1932935118675232, -0.18150310218334198, 0.02049838751554489, -0.2750169038772583, -0.6343337893486023, 0.12037459760904312, -0.4476114809513092, -0.5369141697883606, 0.12136399745941162, 0.11474235355854034, 0.14544570446014404, -0.25655311346054077, -0.40401190519332886, -0.2682683765888214, -0.04009253531694412, 0.12779676914215088, 0.023059727624058723, 0.1516171246767044, 0.15489301085472107, -0.2198559045791626, -0.12757937610149384, -0.13992378115653992, -0.30429354310035706, 0.16224730014801025, 0.17340034246444702, 0.008186087012290955, 0.12841348350048065, 0.28002384305000305, -0.18268898129463196, 0.5224882364273071, 0.021832812577486038, 0.04352634772658348, 0.4348868727684021, -0.28560250997543335, 0.34909820556640625, -0.34921374917030334, -0.4203129708766937, 0.0037311429623514414, 0.12221609055995941, -0.031756557524204254, 0.31072941422462463, 0.16207438707351685, 0.2696947455406189, -0.35869812965393066, -0.06339769810438156, -0.19353502988815308, -0.20744679868221283, 0.018126489594578743, 0.3481042683124542, 0.16925287246704102, 0.028863251209259033, -0.03504971042275429, -0.016555093228816986, 0.06031576544046402, 0.22797740995883942, 0.5450549125671387, -0.004275977611541748, 0.07490722835063934, -0.4668646454811096, 0.008322915062308311, -0.4170394241809845, 0.2935131788253784, -0.015825452283024788, 0.14307905733585358, -0.20819619297981262, -0.1319827139377594, 0.07831878215074539, -0.05912933871150017, 0.687359094619751, 0.19472569227218628, 0.1241675540804863, 0.10205702483654022, -0.5283217430114746, -0.2558574974536896, 0.006547670811414719, 0.10075129568576813, -0.15162122249603271, -0.08147519826889038, 0.5984269976615906, -0.06452997028827667, -0.5333595275878906, 0.12793125212192535, 0.16317252814769745, -0.2958402633666992, -0.21956372261047363, -0.3941674530506134, -0.23335537314414978, -0.1756165474653244, -0.05919010192155838, -0.20588237047195435, 0.2896237075328827, 0.08327677845954895, 0.1311720758676529, 0.08260247856378555, 0.02781863883137703, 0.2057417631149292, 0.17378105223178864, 0.21350207924842834, 0.16754354536533356, 0.06015963479876518, 0.43651774525642395, 0.327222615480423, 0.2483525574207306, 0.8059167861938477, -0.2521152198314667, -0.43861716985702515, 0.03315353766083717, 0.12928637862205505, 0.24868479371070862, 0.2669372856616974, -0.07721798866987228, 0.04383210092782974, 0.37037527561187744, 0.26122474670410156, -0.2735435962677002, 0.2904326319694519, 0.08756785839796066, 0.1739993393421173, -0.0055200462229549885, -0.43207940459251404, 0.2841857075691223, -0.11347922682762146, 0.014434538781642914, 0.01943983882665634, 0.27475157380104065, -0.13328373432159424, 0.37365156412124634, -0.09697460383176804, 0.6349682211875916, -0.3065793514251709, 0.15469887852668762, 0.27188822627067566, -0.16628234088420868, 0.2213563323020935, -0.09479350596666336, -0.08960193395614624, -0.38189950585365295, -0.16430601477622986, -0.04390530288219452, -0.012607358396053314, 0.3680923283100128, -0.07402355968952179, 0.19456005096435547, 0.30008819699287415, 0.07078522443771362, 0.2579687237739563, -0.1746087521314621, 0.28586748242378235, 0.01376299373805523, -0.3453574478626251, -0.48293620347976685, 0.21906821429729462, -0.05774783343076706, 0.459148645401001, -0.05386750027537346, -0.1543024629354477, -0.027438458055257797, -0.1498827040195465, 0.21387545764446259, 0.01778288558125496, -0.2361839860677719, -0.012317940592765808, 0.1000988632440567, -0.20701980590820312, -0.06698311865329742, 0.355730265378952, 0.21131964027881622, 0.12264016270637512, -0.24939796328544617, 0.1663464456796646, -0.06484765559434891, -0.112458236515522, -0.3236542046070099, 0.09191039949655533, 0.24324898421764374, -0.0925176739692688, -0.2825230360031128, -0.09583381563425064, -0.007511296309530735, -0.11676696687936783, 0.09176459908485413, -0.020651526749134064, 0.002117212861776352, -0.29333555698394775, -0.297698974609375, -0.12545166909694672, 0.32605716586112976, -0.06970691680908203, 0.20505544543266296, 0.012432776391506195, -0.13802312314510345, -0.25804686546325684, 0.4539068043231964, -0.2877550721168518, -0.16965113580226898, 0.581214964389801, -0.2738429009914398, -0.13993124663829803, 0.38379618525505066, 0.2536730170249939, -0.09767869114875793, -0.22786012291908264, -0.08693859726190567, 0.49091145396232605, -0.31985488533973694, -0.12463501840829849, 0.36874061822891235, 0.024723172187805176, 0.007270304951816797, 0.3057658076286316, 0.2461186796426773, -0.3490006923675537, 0.09995447099208832, -0.30476805567741394, -0.523823618888855, 0.21432846784591675, -0.0226561538875103, 0.17201921343803406, 0.4451758563518524, 0.21755552291870117, 0.021145926788449287, 0.009464467875659466, -0.40990281105041504, 0.06337320804595947, -0.18417085707187653, 0.05047464370727539, 0.24345822632312775, -0.030571892857551575, 0.3998054265975952, -0.10854339599609375, 0.2861224412918091, -0.08303634077310562, -0.4534997344017029, -0.3351665437221527, -0.16149885952472687, 0.07089957594871521, -0.13432207703590393, -0.0947614461183548, -0.03894763067364693, -0.1516384482383728, -0.10715122520923615, -0.16925311088562012, 0.39896416664123535, 0.26260432600975037, -0.10421893000602722, 0.19405654072761536, 0.07163790613412857, -0.14996135234832764, -0.1325356662273407, 0.07323390990495682, 0.11386725306510925, 0.10077400505542755, 0.03812811151146889, -0.17477519810199738, -0.4736502766609192, -0.12793892621994019, 0.1578703373670578, 0.14363634586334229, 0.09599021822214127, 0.1154521182179451, 0.20171505212783813, -0.16773763298988342, -0.009648583829402924, 0.05542107671499252, 0.5459214448928833, -0.0022136494517326355, -0.21321408450603485, 0.1939939558506012, 0.4510309100151062, 0.24076269567012787, -0.30050480365753174, -0.13442952930927277, 0.18763935565948486, -0.015550556592643261, 0.13316819071769714, 0.22755369544029236, 0.39860817790031433, 0.029965266585350037, -0.008923284709453583, -0.007835032418370247, 0.2367635816335678, 0.09304989129304886, -0.1187540739774704, 0.30693918466567993, -0.10766954720020294, 0.07401064038276672, 0.12414102256298065, 0.32538002729415894, 0.214427188038826, 0.3635939359664917, -0.19266167283058167, -0.10486534237861633, -0.17472070455551147, 0.43724682927131653, -0.047505103051662445, -0.7238820791244507, 0.17550121247768402, 0.048794224858284, -0.364646852016449, 0.00690624862909317, -0.19389674067497253, 0.6581074595451355, -0.06950073689222336, -0.2955494821071625, -0.012191807851195335, 0.3718152344226837, -0.1878919005393982, -0.21242858469486237, -0.029535027220845222, -0.0394730344414711, -0.12482063472270966, 0.2285657525062561, 0.012688104063272476, -0.12013399600982666, 0.16265173256397247, -0.030781760811805725, 0.02885735034942627, 0.010548879392445087, -0.12686237692832947, 0.0663638710975647, 0.01473495364189148, -0.008164864033460617, 0.20824550092220306, 0.026988863945007324, 0.09209795296192169, 0.2513843774795532, 0.0714007243514061, 0.15875990688800812, 0.08598180115222931, 0.255462110042572, 0.11824280023574829, 0.04595014452934265, -0.004173945635557175, -0.11586857587099075, -0.10803286731243134, -0.09388063848018646, 0.22341473400592804, 0.3669902980327606, 0.26786935329437256, -0.21940046548843384, 0.02184111624956131, -0.20522014796733856, 0.3311510980129242, -0.3181475102901459, 0.04077495262026787, 0.01791638508439064, 0.03367319703102112, -0.3249620199203491, -0.018009081482887268, -0.45025426149368286, 0.08787737786769867, 0.27518174052238464, 0.06781293451786041, 0.29046738147735596, -0.06517216563224792, 0.12330619990825653, 0.019339419901371002, 0.4121367335319519, 0.1325470358133316, 0.23798289895057678, -0.1579531580209732, -0.2523099184036255, -0.5851051211357117, -0.031096063554286957, 0.0978689044713974, 0.08027136325836182, 0.12431342899799347, -0.010205835103988647, 0.15689319372177124, -0.06109464168548584, 0.05032874643802643, -0.19740895926952362, 0.0007796073332428932, -0.03544265031814575, -0.00589592382311821, -0.09374500811100006, -0.2574390172958374, 0.1678076684474945, 0.16670919954776764, -0.1599038541316986, 0.12694185972213745, -0.03372941166162491, 0.07549536228179932, -0.1410210132598877, 0.163612961769104, -0.11184744536876678, -0.44742345809936523, 0.37600478529930115, -0.08026744425296783, 0.18626131117343903, -0.17371231317520142, 0.0006736051291227341, 0.04325229674577713, -0.2060982584953308, -0.1231839582324028, 0.1855667233467102, -0.09445653855800629, 0.3135664165019989, -0.08986113220453262, -0.3413020670413971, -0.3219551146030426, 0.2177305668592453, 0.11879236996173859, -0.04342431575059891, -0.13151967525482178, 0.10129076987504959, 0.06325773149728775, -0.1238970160484314, 0.1864251345396042, 0.5191927552223206, -0.038937248289585114, -0.054932497441768646, -0.16542980074882507, -0.17992468178272247, 0.8071268796920776, -0.3119736313819885, -0.03036273643374443, 0.09989549964666367, 0.16089579463005066, 0.21049684286117554, -0.3594610095024109, -0.4332844018936157, 0.2779563069343567, 0.1851150244474411, 0.07412274181842804, -0.21705731749534607, 0.23300768435001373, -0.2834518551826477, 0.02299543097615242, -0.07788600027561188, 0.2265939712524414, 0.22587436437606812, -0.11803670972585678, -0.01063758134841919, -0.21698127686977386 ]
https://github.com/huggingface/datasets/issues/6721
Hi,do you know how to load the dataset from local file now?
@ge00009 > like this: from datasets import load_from_disk dataset = load_from_disk(data_path) Loads a dataset that was previously saved using `save_to_disk()`. Reference link: https://huggingface.co/docs/datasets/en/package_reference/loading_methods#datasets.load_from_disk.example
Hi, if I want to load the dataset from local file, then how to specify the configuration name? _Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_
23
Hi,do you know how to load the dataset from local file now? Hi, if I want to load the dataset from local file, then how to specify the configuration name? _Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222_ @ge00009 > like this: from datasets import load_from_disk dataset = load_from_disk(data_path) Loads a dataset that was previously saved using `save_to_disk()`. Reference link: https://huggingface.co/docs/datasets/en/package_reference/loading_methods#datasets.load_from_disk.example
[ -0.2701813876628876, -0.4022340774536133, -0.026236072182655334, 0.2153710126876831, 0.2627391815185547, 0.07305721193552017, 0.1281583607196808, 0.17334644496440887, 0.3208651542663574, 0.2776947617530823, -0.26834169030189514, 0.23004445433616638, 0.026228390634059906, 0.4014463722705841, 0.3282169997692108, -0.09428344666957855, 0.032568059861660004, 0.17010155320167542, -0.270305335521698, -0.04915705323219299, -0.22232992947101593, 0.3233712911605835, 0.06895197927951813, 0.005942873656749725, -0.1310485601425171, 0.14072401821613312, -0.0033344030380249023, 0.4716119170188904, -0.13006983697414398, -0.34816646575927734, 0.34352219104766846, 0.11080007255077362, 0.23801112174987793, 0.34385770559310913, -0.00010662490967661142, 0.08218474686145782, 0.16270717978477478, -0.24184966087341309, -0.20004314184188843, -0.2914625406265259, -0.1551157832145691, -0.11336510628461838, 0.3088865578174591, -0.250654399394989, -0.29694831371307373, -0.08529482781887054, 0.09490425139665604, -0.3101080358028412, 0.23347541689872742, 0.07683468610048294, 0.23809508979320526, 0.32680925726890564, 0.013759266585111618, -0.22600001096725464, -0.13861337304115295, 0.22467435896396637, -0.028182847425341606, 0.5613584518432617, 0.24361814558506012, 0.056494638323783875, 0.10559991747140884, 0.1562267690896988, 0.0799144059419632, 0.1888868659734726, 0.3485897183418274, 0.09505145996809006, -0.12181051820516586, -0.09995338320732117, 0.21635708212852478, 0.2432439923286438, 0.6399329900741577, -0.3389860689640045, -0.23603136837482452, -0.11506886780261993, 0.10244578123092651, -0.27793627977371216, 0.25976547598838806, 0.07087114453315735, -0.24701951444149017, 0.28789159655570984, -0.12014767527580261, -0.3631514012813568, -0.20106211304664612, 0.03447810187935829, -0.0665922462940216, 0.07954282313585281, -0.3772624731063843, 0.03868694603443146, 0.1977766901254654, -0.08043329417705536, -0.2187746912240982, 0.10929165035486221, 0.02070249803364277, 0.33195337653160095, -0.2695007026195526, 0.05902703106403351, 0.10388331115245819, 0.29782575368881226, 0.16390109062194824, 0.06771756708621979, -0.06973395496606827, 0.1340399980545044, -0.0034197880886495113, 0.1797683835029602, 0.20609328150749207, 0.09411992132663727, 0.3657616972923279, -0.16270627081394196, 0.12893758714199066, 0.15579579770565033, -0.004178531467914581, -0.1861666738986969, -0.05724870041012764, -0.2670416533946991, -0.11258305609226227, -0.33728957176208496, 0.255037784576416, -0.39495423436164856, 0.014966366812586784, 0.00006243307143449783, 0.3132025897502899, -0.1321430802345276, 0.15853388607501984, 0.5643653273582458, -0.08919872343540192, -0.10271688550710678, 0.08756986260414124, -0.024765972048044205, -0.19736789166927338, 0.08642071485519409, -0.2713705003261566, -0.09163545072078705, -0.07849931716918945, 0.06053929775953293, 0.12938910722732544, -0.4282495081424713, 0.4877069890499115, 0.013062329031527042, 0.11645524203777313, 0.05176261067390442, -0.17290595173835754, 0.14324215054512024, -0.028666295111179352, 0.3156178593635559, 0.12146906554698944, 0.05561477690935135, 0.24364714324474335, -0.2928518056869507, -0.2269141674041748, -0.04288537800312042, -0.30082282423973083, -0.42565110325813293, -0.24427072703838348, 0.2128150463104248, -0.24560080468654633, -0.02303561568260193, -0.33007603883743286, 0.020611705258488655, -0.17787647247314453, 0.1528523564338684, -0.19990354776382446, 0.11502808332443237, -0.2633567750453949, -0.054222702980041504, 0.34862878918647766, 0.36409538984298706, -0.3956385850906372, -0.23024235665798187, 0.2100927233695984, -0.439236044883728, -0.06431523710489273, 0.06732890754938126, -0.3016781508922577, 0.07994088530540466, -0.293154776096344, 0.09825675189495087, 0.29483968019485474, -0.29334118962287903, -0.14672528207302094, 0.4507077932357788, -0.17714926600456238, -0.05206356942653656, 0.0454963855445385, -0.056491151452064514, -0.1160137951374054, 0.11558537930250168, 0.28021085262298584, 0.2562273144721985, 0.017009519040584564, 0.03708603233098984, -0.08009529858827591, -0.1404499113559723, -0.22820450365543365, 0.19615179300308228, -0.2003716379404068, 0.17040422558784485, 0.16738054156303406, -0.18561246991157532, 0.3830990791320801, -0.11594544351100922, -0.021786950528621674, 0.49248605966567993, 0.3054184019565582, 0.31477004289627075, 0.025137316435575485, -0.0701560229063034, -0.4440572261810303, 0.29631730914115906, 0.03924766182899475, 0.014521121978759766, 0.007661938667297363, -0.11868876963853836, -0.42024192214012146, -0.048242561519145966, -0.4113272726535797, -0.053019728511571884, 0.06180389225482941, 0.23456624150276184, 0.10378848016262054, -0.011798907071352005, -0.45177316665649414, 0.3083072006702423, -0.24114972352981567, 0.16847893595695496, -0.5234986543655396, 0.14396528899669647, 0.05249420553445816, -0.05326569452881813, -0.042821597307920456, -0.1340576708316803, 0.05056396871805191, -0.2658769488334656, -0.12378523498773575, 0.5408808588981628, 0.06776487827301025, 0.37592577934265137, 0.03783699497580528, 0.02012394368648529, 0.0690949335694313, 0.01241232082247734, 0.13241532444953918, -0.19314934313297272, 0.16032257676124573, 0.024500280618667603, -0.2635246813297272, 0.3643442392349243, -0.05297444388270378, 0.014676950871944427, 0.07815137505531311, -0.12905488908290863, 0.3942926228046417, -0.018597528338432312, -0.17237026989459991, -0.2470528930425644, 0.1505996137857437, -0.0029739420861005783, 0.47980159521102905, -0.015476671978831291, -0.5557417273521423, -0.24996978044509888, 0.17198872566223145, -0.028408341109752655, -0.09388237446546555, -0.005751818418502808, -0.14166417717933655, 0.06831710785627365, 0.1253027468919754, 0.16906236112117767, 0.510377824306488, 0.21323956549167633, 0.018961086869239807, 0.18679022789001465, -0.015754401683807373, -0.13866180181503296, 0.14031028747558594, -0.14236018061637878, 0.13984136283397675, 0.15251415967941284, -0.2257053703069687, -0.26068925857543945, -0.47260063886642456, 0.04891740903258324, -0.08448661118745804, 0.1516653299331665, -0.33842310309410095, -0.08979421854019165, -0.20003309845924377, -0.36934149265289307, -0.4707268178462982, -0.10914299637079239, -0.3480401635169983, -0.08218563348054886, -0.2044462412595749, 0.2946120500564575, 0.07988756895065308, 0.11607778817415237, -0.013227095827460289, 0.021165907382965088, -0.15572918951511383, -0.22017987072467804, -0.17426221072673798, 0.04704267531633377, -0.05377498269081116, 0.05884607508778572, 0.10529647767543793, 0.10370670258998871, 0.4860037565231323, -0.42317691445350647, -0.0573708713054657, -0.266462117433548, -0.014354445040225983, 0.20681047439575195, -0.10132808983325958, 0.5733199715614319, 0.1531905233860016, 0.35152488946914673, -0.24298134446144104, -0.0615178607404232, 0.41798269748687744, -0.037216756492853165, -0.17345786094665527, -0.16486339271068573, 0.03148911893367767, 0.05020534247159958, -0.06539646536111832, -0.35375869274139404, -0.3085702359676361, -0.30068954825401306, 0.3088477849960327, 0.20561127364635468, 0.10019319504499435, 0.21762540936470032, -0.1104128435254097, 0.24667507410049438, -0.1238647997379303, 0.18471580743789673, -0.25135037302970886, -0.7009997367858887, 0.17673194408416748, -0.42719438672065735, -0.34788745641708374, 0.10813829302787781, 0.21737763285636902, 0.18560338020324707, -0.18277540802955627, -0.26553231477737427, -0.3820909559726715, -0.10216465592384338, 0.06432360410690308, 0.02342318184673786, 0.3550710082054138, 0.18707141280174255, -0.08926144987344742, -0.04109945148229599, -0.15097008645534515, -0.2684272229671478, 0.0831478163599968, 0.07038815319538116, 0.034803904592990875, 0.21042197942733765, 0.18759816884994507, -0.24386189877986908, 0.43849992752075195, 0.03999663144350052, 0.12352469563484192, 0.37150314450263977, -0.3381434679031372, 0.4124084413051605, -0.2714954912662506, -0.36966535449028015, -0.00021824194118380547, 0.11886314302682877, -0.058156777173280716, 0.23742149770259857, 0.2706882059574127, 0.22390392422676086, -0.37326136231422424, -0.1529734879732132, -0.2192569077014923, -0.16808801889419556, -0.029251879081130028, 0.2837117910385132, 0.1348942220211029, -0.02713899128139019, -0.03814532607793808, -0.03919543698430061, 0.071040078997612, 0.044094689190387726, 0.5562442541122437, -0.06365328282117844, 0.07709231227636337, -0.6144060492515564, 0.03424661606550217, -0.4984756112098694, 0.3037218451499939, -0.05583168938755989, 0.10199139267206192, -0.041003696620464325, -0.16120170056819916, 0.1520603597164154, 0.05455188453197479, 0.548103392124176, 0.18348592519760132, 0.12641988694667816, 0.17086240649223328, -0.45989271998405457, -0.31951555609703064, 0.12396934628486633, 0.05832844600081444, -0.006576073355972767, -0.020962074398994446, 0.6275326609611511, -0.05060126259922981, -0.5494834184646606, 0.041828133165836334, 0.32687777280807495, -0.38493090867996216, -0.3037737011909485, -0.3690057396888733, -0.30344483256340027, -0.2592201232910156, -0.15526655316352844, -0.20321492850780487, 0.3482378125190735, 0.2550373673439026, 0.2595886290073395, -0.022491207346320152, 0.07788623124361038, 0.17508400976657867, 0.1375025510787964, 0.2668752074241638, 0.1209300085902214, 0.04141965135931969, 0.32582616806030273, 0.39181652665138245, 0.1778201311826706, 0.6374348402023315, -0.31031477451324463, -0.25342851877212524, -0.03952842950820923, 0.11899708211421967, 0.38130438327789307, 0.18742257356643677, -0.04672042652964592, -0.04050300270318985, 0.22138403356075287, 0.11864836513996124, -0.4242574870586395, 0.16458803415298462, -0.051613010466098785, 0.1270311176776886, -0.011988102458417416, -0.5234235525131226, 0.46402373909950256, 0.007381737232208252, -0.05489574372768402, 0.21125419437885284, 0.2517542839050293, -0.2110753208398819, 0.16867122054100037, -0.10004153102636337, 0.5726583003997803, -0.27282363176345825, 0.1120418831706047, 0.3114102780818939, -0.0806291252374649, 0.2031230628490448, 0.03977402299642563, -0.101340152323246, -0.392426073551178, -0.05117394030094147, 0.006077101454138756, 0.0009524896740913391, 0.40469780564308167, -0.0075993649661540985, 0.07561938464641571, 0.32906126976013184, 0.11571571230888367, 0.1495043784379959, -0.22370858490467072, 0.33805546164512634, -0.23334431648254395, -0.39731162786483765, -0.5951718091964722, 0.15007628500461578, -0.0964386910200119, 0.4531897008419037, -0.11094980686903, -0.00019180122762918472, 0.08411355316638947, -0.2164132297039032, 0.19007094204425812, -0.09481672942638397, -0.31755533814430237, 0.059867843985557556, 0.0398135781288147, -0.30607375502586365, -0.22200419008731842, 0.5139409899711609, 0.15414384007453918, 0.14690622687339783, -0.26490795612335205, 0.16042138636112213, -0.04875950515270233, -0.09932741522789001, -0.1897413581609726, 0.1117820292711258, 0.3150482773780823, -0.12214784324169159, -0.14977923035621643, -0.1930522620677948, 0.019419461488723755, -0.15611034631729126, 0.06381985545158386, 0.002160586416721344, 0.13149981200695038, -0.3701614737510681, -0.44884753227233887, -0.058092325925827026, 0.4088062345981598, -0.10921797156333923, 0.16312208771705627, 0.18870767951011658, -0.1886695772409439, 0.023617133498191833, 0.23529446125030518, -0.22979778051376343, -0.14493513107299805, 0.589362382888794, -0.20669770240783691, -0.26632848381996155, 0.29168376326560974, 0.09117501974105835, -0.07930057495832443, -0.20785266160964966, 0.23777011036872864, 0.28149232268333435, -0.22455427050590515, -0.061855632811784744, 0.486270546913147, 0.12403152883052826, -0.0019325020257383585, 0.24869109690189362, 0.23059773445129395, -0.25316858291625977, 0.03096574917435646, -0.269388884305954, -0.5020562410354614, 0.20392350852489471, 0.17874154448509216, 0.3003247082233429, 0.3447156250476837, 0.06805536150932312, 0.04110235720872879, -0.025161707773804665, -0.37108296155929565, 0.17925606667995453, -0.15326762199401855, 0.062105607241392136, 0.4003535509109497, 0.13257411122322083, 0.33263421058654785, -0.09039151668548584, 0.25015780329704285, -0.20720414817333221, -0.39477401971817017, -0.26305311918258667, -0.1929636001586914, 0.0926155224442482, -0.21483924984931946, -0.14607740938663483, -0.10674422234296799, -0.2947996258735657, -0.08238229155540466, -0.1943163424730301, 0.3156459927558899, 0.33374208211898804, -0.0505472794175148, 0.2605170011520386, 0.23067909479141235, -0.04654845595359802, -0.22570952773094177, 0.18873335421085358, 0.11893239617347717, 0.10955123603343964, -0.04202461615204811, -0.10192801058292389, -0.4971188008785248, -0.15160170197486877, 0.02840678207576275, 0.09819582849740982, 0.10897305607795715, 0.1109519824385643, 0.1269165277481079, -0.05637381970882416, -0.05086176469922066, 0.11506479978561401, 0.5896638631820679, 0.04467964172363281, -0.18117591738700867, 0.18299248814582825, 0.43618080019950867, 0.22516776621341705, -0.1912810504436493, -0.17058195173740387, 0.33011460304260254, -0.07033603638410568, 0.01599709317088127, 0.24755150079727173, 0.1937585175037384, 0.07007758319377899, -0.06073790788650513, -0.10079024732112885, 0.2464178502559662, 0.07233898341655731, -0.07779979705810547, 0.315666139125824, -0.057106051594018936, 0.027180900797247887, 0.20320430397987366, 0.49362900853157043, 0.27142271399497986, 0.4211530089378357, -0.26528027653694153, 0.035880740731954575, -0.25005412101745605, 0.32436051964759827, -0.040966011583805084, -0.5779895782470703, 0.16754326224327087, 0.0899214893579483, -0.419072687625885, 0.053995274007320404, -0.18662649393081665, 0.6218886375427246, -0.25809401273727417, -0.16379013657569885, -0.05282878875732422, 0.33031848073005676, -0.216731458902359, -0.2743315100669861, -0.1035272553563118, -0.13478459417819977, 0.10022024810314178, 0.18312306702136993, -0.11019285023212433, -0.20109908282756805, 0.18438392877578735, -0.029776543378829956, 0.09339865297079086, -0.09115906059741974, -0.004165820777416229, 0.07355926930904388, -0.057907335460186005, -0.13825350999832153, 0.1930721253156662, -0.027068138122558594, 0.13470518589019775, 0.17274096608161926, 0.1883697658777237, 0.15311570465564728, 0.11557763814926147, 0.2884542644023895, 0.10515478998422623, 0.013408306986093521, -0.06651633977890015, -0.12137602269649506, -0.11434559524059296, -0.18811234831809998, 0.2000480592250824, 0.4424128532409668, 0.26664209365844727, -0.133323073387146, 0.01749292202293873, -0.10087092220783234, 0.2311663180589676, -0.2539560794830322, 0.1289728730916977, -0.031009264290332794, -0.07471375167369843, -0.2312166690826416, 0.13039736449718475, -0.4862287938594818, 0.09572261571884155, 0.31988993287086487, 0.07285123318433762, 0.1945803165435791, -0.11684882640838623, 0.10154983401298523, 0.01136821135878563, 0.3650825619697571, 0.16068600118160248, 0.08740964531898499, -0.20725083351135254, -0.35196882486343384, -0.6366586685180664, -0.024476997554302216, 0.3491533398628235, -0.07468006014823914, 0.09093855321407318, 0.06439578533172607, 0.13318535685539246, 0.045564182102680206, -0.04492081701755524, -0.2612594962120056, -0.016765199601650238, 0.03626779094338417, -0.025911884382367134, -0.2466040402650833, -0.11692188680171967, 0.19228897988796234, 0.13557027280330658, -0.22067958116531372, 0.0332418717443943, -0.15653085708618164, 0.03519821912050247, -0.2940340042114258, 0.247264564037323, 0.007393732666969299, -0.27766934037208557, 0.32352691888809204, -0.09069693833589554, 0.17992143332958221, -0.11785343289375305, 0.005121052265167236, 0.14090143144130707, -0.16893377900123596, -0.1826745569705963, 0.10955414175987244, -0.09922507405281067, 0.2744540870189667, -0.24346786737442017, -0.19656765460968018, -0.37198606133461, 0.17803694307804108, -0.02809152938425541, 0.01177655253559351, -0.111512690782547, 0.04313866049051285, -0.014533624053001404, -0.16561870276927948, 0.2654463052749634, 0.5668109059333801, -0.07418400049209595, 0.21488085389137268, -0.19310003519058228, -0.1288052797317505, 0.789480984210968, -0.1854018270969391, -0.03621267154812813, 0.051848698407411575, 0.13462993502616882, 0.13655886054039001, -0.2879408597946167, -0.5414737462997437, 0.29188621044158936, 0.3302943706512451, 0.027346353977918625, -0.18138247728347778, 0.423501580953598, -0.1804117113351822, -0.01659274473786354, -0.03072807937860489, 0.33621662855148315, 0.16649466753005981, -0.05999736487865448, -0.10664202272891998, -0.1709623485803604 ]
https://github.com/huggingface/datasets/issues/6720
TypeError: 'str' object is not callable
Hi ! I opened a PR to fix an issue in the Features defined in your code Basically changing ```python Sequence("float32") ``` to ```python Sequence(Value("float32")) ``` https://huggingface.co/datasets/BramVanroy/hplt_mono_v1_2/discussions/1
### Describe the bug I am trying to get the HPLT datasets on the hub. Downloading/re-uploading would be too time- and resource consuming so I wrote [a dataset loader script](https://huggingface.co/datasets/BramVanroy/hplt_mono_v1_2/blob/main/hplt_mono_v1_2.py). I think I am very close but for some reason I always get the error below. It happens during the clean-up phase where the directory cannot be removed because it is not empty. My only guess would be that this may have to do with zstandard ``` Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1744, in _prepare_split_single writer.write(example, key) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 492, in write self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1753, in _prepare_split_single num_examples, num_bytes = writer.finalize() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 588, in finalize self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 959, in incomplete_dir yield tmp_dir File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1005, in download_and_prepare self._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1767, in _download_and_prepare super()._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1100, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1605, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1762, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pricie/vanroy/.config/JetBrains/PyCharm2023.3/scratches/scratch_5.py", line 4, in <module> ds = load_dataset( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/load.py", line 2549, in load_dataset builder_instance.download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 985, in download_and_prepare with incomplete_dir(self._output_dir) as tmp_output_dir: File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 966, in incomplete_dir shutil.rmtree(tmp_dir) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 731, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 729, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete' ``` Interestingly, though, this directory _does_ appear to be empty: ```shell > cd /home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete > ls -lah total 0 drwxr-xr-x. 1 vanroy vanroy 0 Mar 7 12:01 . drwxr-xr-x. 1 vanroy vanroy 304 Mar 7 11:52 .. > cd .. > ls 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47_builder.lock 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete ``` ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset( "BramVanroy/hplt_mono_v1_2", "ky", trust_remote_code=True ) ``` ### Expected behavior No error. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.1 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0
27
TypeError: 'str' object is not callable ### Describe the bug I am trying to get the HPLT datasets on the hub. Downloading/re-uploading would be too time- and resource consuming so I wrote [a dataset loader script](https://huggingface.co/datasets/BramVanroy/hplt_mono_v1_2/blob/main/hplt_mono_v1_2.py). I think I am very close but for some reason I always get the error below. It happens during the clean-up phase where the directory cannot be removed because it is not empty. My only guess would be that this may have to do with zstandard ``` Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1744, in _prepare_split_single writer.write(example, key) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 492, in write self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1753, in _prepare_split_single num_examples, num_bytes = writer.finalize() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 588, in finalize self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 959, in incomplete_dir yield tmp_dir File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1005, in download_and_prepare self._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1767, in _download_and_prepare super()._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1100, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1605, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1762, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pricie/vanroy/.config/JetBrains/PyCharm2023.3/scratches/scratch_5.py", line 4, in <module> ds = load_dataset( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/load.py", line 2549, in load_dataset builder_instance.download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 985, in download_and_prepare with incomplete_dir(self._output_dir) as tmp_output_dir: File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 966, in incomplete_dir shutil.rmtree(tmp_dir) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 731, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 729, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete' ``` Interestingly, though, this directory _does_ appear to be empty: ```shell > cd /home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete > ls -lah total 0 drwxr-xr-x. 1 vanroy vanroy 0 Mar 7 12:01 . drwxr-xr-x. 1 vanroy vanroy 304 Mar 7 11:52 .. > cd .. > ls 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47_builder.lock 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete ``` ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset( "BramVanroy/hplt_mono_v1_2", "ky", trust_remote_code=True ) ``` ### Expected behavior No error. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.1 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0 Hi ! I opened a PR to fix an issue in the Features defined in your code Basically changing ```python Sequence("float32") ``` to ```python Sequence(Value("float32")) ``` https://huggingface.co/datasets/BramVanroy/hplt_mono_v1_2/discussions/1
[ -0.16167008876800537, -0.2945093512535095, 0.1827983856201172, 0.301986426115036, 0.34105372428894043, -0.004187747836112976, 0.2907615303993225, 0.019499151036143303, 0.11874857544898987, 0.13143810629844666, 0.027880044654011726, 0.1734614223241806, -0.2581363916397095, 0.22743766009807587, -0.21855714917182922, 0.038118183612823486, -0.19708549976348877, 0.3628482520580292, -0.15858149528503418, 0.020588189363479614, -0.25331956148147583, 0.32562872767448425, -0.2513088583946228, 0.30911868810653687, -0.01624412089586258, -0.1386009007692337, 0.0074470508843660355, 0.3300698697566986, -0.20709724724292755, -0.2222854346036911, 0.3503400385379791, 0.032215602695941925, 0.4926452338695526, 0.4235745370388031, -0.00012971292017027736, 0.0006711632013320923, 0.31063568592071533, -0.13137264549732208, -0.2500198185443878, -0.3199169635772705, -0.17854556441307068, -0.15348626673221588, 0.01625215820968151, -0.017638757824897766, 0.34124556183815, -0.22883084416389465, -0.1712689995765686, -0.1940430849790573, -0.07674694061279297, 0.3444456160068512, 0.07161562144756317, 0.4766462743282318, 0.1327124685049057, -0.21885620057582855, 0.20931529998779297, 0.3144574761390686, -0.2266874760389328, 0.21489256620407104, 0.1892521232366562, -0.04914020001888275, 0.14994649589061737, 0.18972696363925934, -0.14423875510692596, -0.24060951173305511, 0.36896440386772156, 0.03352971374988556, 0.357907772064209, -0.03841544687747955, -0.06030145287513733, 0.12947702407836914, 0.6653164625167847, -0.33606088161468506, -0.08844966441392899, -0.20274201035499573, -0.03195555880665779, 0.10150749981403351, 0.3415900766849518, 0.09293180704116821, -0.2968088686466217, 0.2208210825920105, 0.06699193269014359, -0.24867776036262512, -0.11163243651390076, 0.027617238461971283, 0.3795813322067261, -0.16655680537223816, 0.07914159446954727, 0.23016846179962158, 0.3602187931537628, 0.022273633629083633, 0.3439525365829468, -0.1741430163383484, -0.01187654584646225, 0.28591981530189514, -0.021195057779550552, -0.0069509632885456085, -0.05295019596815109, 0.07944194972515106, -0.20884361863136292, -0.02173897624015808, 0.4965176582336426, -0.13586077094078064, -0.007782472297549248, 0.3125048577785492, 0.3516947329044342, 0.32401418685913086, 0.09647203981876373, -0.38632476329803467, 0.243051216006279, 0.17390981316566467, 0.09219381213188171, -0.0740390494465828, -0.03978534787893295, -0.10325977206230164, 0.021507684141397476, 0.33249515295028687, 0.426708459854126, -0.15403932332992554, -0.2192603200674057, 0.14935579895973206, -0.24547290802001953, 0.05161859467625618, 0.26559075713157654, 0.3722561299800873, 0.19477319717407227, 0.3987300992012024, 0.26267993450164795, 0.07417270541191101, -0.3045283854007721, -0.17473579943180084, 0.04238400235772133, 0.5389202833175659, -0.09571322053670883, -0.23968105018138885, -0.06683795899152756, 0.02658163197338581, -0.32652658224105835, 0.12205993384122849, 0.16897277534008026, -0.04170123115181923, 0.19297760725021362, -0.26086196303367615, 0.14232945442199707, 0.20099563896656036, 0.17614425718784332, 0.057824864983558655, 0.28357139229774475, -0.3152162432670593, -0.26121896505355835, 0.26564741134643555, -0.234530508518219, -0.5400826930999756, -0.3407173454761505, 0.041725434362888336, -0.007807823829352856, 0.22790734469890594, -0.2913873493671417, -0.44011154770851135, 0.22070565819740295, -0.3287043273448944, 0.007368117570877075, -0.4867045283317566, 0.16436704993247986, -0.10245968401432037, -0.2514883875846863, 0.5497753024101257, -0.506998598575592, 0.05556274950504303, -0.36109086871147156, -0.07942992448806763, 0.505769670009613, -0.1639261096715927, -0.13282345235347748, 0.7032921314239502, -0.5687271356582642, -0.17414695024490356, 0.4734939634799957, -0.6814272999763489, -0.11804243922233582, 0.18624341487884521, -0.35537731647491455, -0.09049304574728012, 0.06699667870998383, 0.14678633213043213, -0.16822552680969238, 0.10784294456243515, -0.32926931977272034, 0.020545104518532753, 0.11719396710395813, -0.07898252457380295, -0.16719134151935577, 0.009368645027279854, 0.05903783068060875, 0.02359829843044281, 0.3155674934387207, 0.18166691064834595, -0.056877680122852325, 0.37042945623397827, 0.1497649848461151, -0.11901962757110596, 0.3804634213447571, 0.20724700391292572, 0.4340994954109192, 0.15575265884399414, 0.01477542519569397, -0.2717444896697998, -0.3368094563484192, -0.06662438064813614, -0.3568703234195709, 0.4466346204280853, -0.11927267909049988, -0.021181846037507057, -0.0965547040104866, 0.09256727993488312, -0.27750691771507263, 0.1924886256456375, -0.01352834701538086, 0.30933111906051636, -0.03375719487667084, -0.14210763573646545, -0.09723170101642609, 0.5721306204795837, -0.1355605572462082, 0.23277230560779572, -0.450042188167572, 0.37528491020202637, -0.2613676190376282, -0.3585973083972931, 0.004641983658075333, 0.17017321288585663, 0.1895514726638794, -0.11667464673519135, -0.12547704577445984, 0.18503999710083008, 0.23998446762561798, -0.07819010317325592, -0.03320351243019104, -0.2082263082265854, 0.013560936786234379, -0.08543207496404648, -0.01228628121316433, 0.28934428095817566, 0.3058602213859558, -0.030607186257839203, 0.04214846342802048, 0.46538954973220825, -0.3472139835357666, 0.32125499844551086, 0.08795662224292755, 0.22985374927520752, 0.040543437004089355, -0.08437752723693848, 0.05102371424436569, -0.25431132316589355, 0.3191922605037689, 0.0047479234635829926, 0.01044682040810585, -0.017255393788218498, -0.023619361221790314, -0.09264860302209854, 0.26499438285827637, 0.18014618754386902, 0.19642695784568787, 0.2739351987838745, 0.22842910885810852, 0.03270348906517029, 0.28379014134407043, -0.07538243383169174, 0.3515293598175049, -0.06803607195615768, -0.3486117124557495, -0.09651517122983932, 0.06280239671468735, 0.07189558446407318, 0.06543882191181183, 0.09249341487884521, 0.1094442680478096, 0.31544190645217896, 0.0656227320432663, 0.0021324260160326958, -0.31306302547454834, -0.523674488067627, -0.13050080835819244, 0.41839078068733215, -0.19088409841060638, -0.04590195417404175, -0.15526627004146576, -0.0004892349243164062, -0.21840614080429077, -0.3090619444847107, -0.19140087068080902, -0.4171092212200165, -0.26832085847854614, 0.4353749454021454, -0.004186064004898071, 0.03040628507733345, -0.32226163148880005, 0.18409672379493713, 0.13353191316127777, 0.09733407944440842, -0.23866769671440125, 0.09601306915283203, -0.23504409193992615, -0.17750729620456696, 0.0342358760535717, -0.004172295331954956, 0.15975739061832428, -0.04273422807455063, 0.13643866777420044, -0.17911075055599213, 0.021172434091567993, 0.41606685519218445, 0.03296063840389252, -0.21982868015766144, 0.47828546166419983, 0.03423605114221573, 0.06476082652807236, -0.12126802653074265, 0.31716054677963257, -0.3049350678920746, -0.11734501272439957, 0.4180142283439636, -0.03627312555909157, 0.006062125787138939, -0.16443009674549103, -0.08362222462892532, -0.3555704355239868, -0.4805610775947571, -0.11735257506370544, 0.02902832254767418, 0.15867215394973755, -0.08108292520046234, 0.08276693522930145, 0.0638992190361023, 0.016820060089230537, -0.0763537585735321, 0.12235907465219498, -0.19169539213180542, -0.060941603034734726, 0.02948087826371193, -0.22553743422031403, 0.003909878432750702, 0.1257898509502411, 0.10569515079259872, -0.2170235514640808, -0.36595577001571655, -0.3221578001976013, -0.08479172736406326, 0.1984974443912506, -0.43228521943092346, -0.053053222596645355, 0.5043966174125671, 0.4489648938179016, 0.024122828617691994, -0.07891949266195297, 0.13358131051063538, 0.030695579946041107, 0.17584672570228577, 0.05785256624221802, 0.26874393224716187, 0.21160069108009338, -0.053768083453178406, 0.09491176158189774, -0.04724478721618652, 0.07123766839504242, 0.5458665490150452, 0.054330192506313324, 0.35485410690307617, -0.23537659645080566, -0.6878170371055603, -0.10397258400917053, -0.03789760172367096, -0.14602607488632202, 0.21534210443496704, -0.14620736241340637, 0.32691067457199097, -0.20508481562137604, -0.034582994878292084, 0.14374640583992004, -0.20917005836963654, 0.11048832535743713, -0.014950897544622421, -0.10078529268503189, -0.17498649656772614, -0.10155406594276428, -0.39956289529800415, -0.19802603125572205, 0.31842708587646484, 0.3052394986152649, 0.2990387976169586, 0.0944283977150917, -0.5736430883407593, -0.05674782022833824, -0.14257675409317017, 0.18712565302848816, 0.12762169539928436, 0.43254703283309937, -0.19734114408493042, -0.0633881464600563, -0.01798945665359497, 0.009871968999505043, 0.6498661637306213, 0.201702281832695, 0.2566314935684204, 0.2696082592010498, -0.1230483204126358, -0.3161478340625763, -0.06367550790309906, -0.246877983212471, 0.40785861015319824, 0.17728319764137268, 0.3589799404144287, -0.15891551971435547, -0.13636194169521332, 0.01664382964372635, 0.0796901285648346, -0.34072309732437134, -0.043800462037324905, -0.08854758739471436, -0.4749930799007416, -0.39140763878822327, -0.05814848095178604, 0.027275586500763893, 0.5286033749580383, 0.07943369448184967, 0.14116065204143524, 0.21621407568454742, -0.32548439502716064, 0.33511102199554443, -0.07999704778194427, 0.16794413328170776, -0.28673315048217773, -0.01320488192141056, -0.20875045657157898, 0.11814464628696442, 0.30139976739883423, 0.48648446798324585, 0.07527301460504532, -0.4854097366333008, 0.23327535390853882, -0.18974818289279938, 0.4991493225097656, 0.2052423357963562, -0.11317343264818192, 0.12411600351333618, -0.3275740444660187, 0.39781033992767334, -0.49861419200897217, 0.20276786386966705, 0.03624598681926727, -0.2641269266605377, -0.5103643536567688, -0.04382375627756119, 0.2876223921775818, -0.11716453731060028, -0.08735783398151398, 0.1713901162147522, 0.5132016539573669, -0.3443802297115326, 0.44620561599731445, 0.10807481408119202, 1.3879485130310059, 0.02175077795982361, 0.18278563022613525, 0.15935799479484558, 0.026673920452594757, 0.23852090537548065, -0.18081940710544586, 0.23881959915161133, -0.38048964738845825, -0.061596401035785675, -0.2738809585571289, -0.183411106467247, 0.1716182827949524, 0.11478498578071594, -0.29378026723861694, 0.12197842448949814, -0.07437051087617874, 0.3552912771701813, 0.03394172340631485, 0.2051398754119873, -0.2105666846036911, -0.3545438349246979, -0.11900465190410614, -0.06253902614116669, 0.022905979305505753, 0.30133357644081116, -0.1302521824836731, -0.09906291961669922, -0.025560736656188965, -0.4298033118247986, 0.017441265285015106, 0.012270629405975342, 0.09169328212738037, 0.024455536156892776, -0.14701581001281738, -0.29977524280548096, -0.08358396589756012, 0.3005845844745636, 0.03206022456288338, 0.032347410917282104, 0.0826183333992958, -0.28786733746528625, 0.0278811976313591, -0.11917687952518463, -0.09700949490070343, 0.3094971776008606, 0.060948118567466736, 0.0239897221326828, -0.08930636942386627, 0.10345596075057983, -0.03313204273581505, -0.11292143166065216, -0.18410669267177582, 0.1575460284948349, 0.06565514951944351, -0.4619143009185791, -0.14179138839244843, -0.27095964550971985, -0.06281503289937973, -0.24032548069953918, -0.04032861068844795, 0.14510497450828552, -0.3076009750366211, -0.06030859798192978, 0.003057103604078293, -0.21932411193847656, -0.035721492022275925, 0.3607275187969208, 0.25265663862228394, 0.4027751088142395, 0.3630673587322235, 0.41719740629196167, -0.21963906288146973, -0.23509663343429565, 0.2510417401790619, 0.2844768762588501, -0.40589702129364014, 0.5672101378440857, -0.04802717640995979, -0.40952181816101074, -0.029740404337644577, 0.27163535356521606, 0.07987066358327866, -0.1743292212486267, -0.27746888995170593, -0.5948523283004761, -0.31903886795043945, 0.08421047031879425, 0.3060401976108551, 0.17197534441947937, 0.11526947468519211, 0.2684706747531891, -0.0666637122631073, -0.2040206342935562, -0.14559292793273926, -0.024099547415971756, -0.39056840538978577, 0.1235845610499382, -0.16577300429344177, -0.16400223970413208, -0.15374480187892914, -0.040900204330682755, -0.07630671560764313, -0.05824726074934006, 0.07755202054977417, 0.08082207292318344, -0.18175208568572998, 0.2392897605895996, 0.25423723459243774, 0.03703460097312927, 0.0016089673154056072, -0.0717611014842987, -0.05107176676392555, -0.3469938635826111, 0.07793615758419037, 0.4382708668708801, -0.19483666121959686, 0.2951063811779022, 0.3815777897834778, -0.22647985816001892, -0.1995982825756073, 0.41877472400665283, 0.13058003783226013, 0.20815977454185486, 0.08426778763532639, 0.1782485395669937, -0.06859520077705383, 0.06233710050582886, 0.10790622979402542, 0.18742221593856812, 0.28534457087516785, -0.2038564682006836, 0.3295699954032898, -0.17308200895786285, 0.030308131128549576, -0.16781319677829742, 0.33856600522994995, 0.10874177515506744, -0.15382780134677887, 0.07770368456840515, -0.21408048272132874, -0.0886383131146431, -0.26383543014526367, -0.38276639580726624, 0.05214785039424896, -0.22816672921180725, -0.044357676059007645, 0.3953162133693695, -0.23828546702861786, -0.2162335067987442, -0.14948417246341705, -0.0083598168566823, 1.0211085081100464, 0.03809936344623566, -0.2508339583873749, 0.31216755509376526, -0.31198650598526, 0.09171031415462494, 0.3038187623023987, 0.16839538514614105, 0.1258908361196518, 0.4840658903121948, -0.03447861224412918, 0.146040678024292, 0.02948598377406597, 0.11441856622695923, 0.13329686224460602, -0.5954619646072388, -0.10043074190616608, 0.6391294002532959, 0.5129042863845825, 0.003939405083656311, -0.08019141852855682, 0.10449980199337006, -0.32421550154685974, -0.028956890106201172, -0.2971497178077698, -0.017176520079374313, -0.3450135886669159, 0.07656499743461609, -0.09904321283102036, -0.2716340124607086, -0.1895882934331894, -0.08622347563505173, 0.2338622361421585, -0.19270245730876923, 0.1201750859618187, 0.021525312215089798, 0.06333629786968231, 0.013294734992086887, -0.16790005564689636, 0.130278080701828, -0.15682420134544373, -0.32499948143959045, 0.014278564602136612, 0.261379599571228, 0.3044613301753998, 0.027068814262747765, -0.016710268333554268, 0.5313928723335266, 0.43436652421951294, -0.30479052662849426, -0.10132105648517609, -0.04610193148255348, -0.07669436931610107, -0.2851656675338745, 0.42303434014320374, -0.30941393971443176, 0.4727456867694855, 0.13705983757972717, -0.034103743731975555, -0.023008711636066437, 0.0012596771121025085, 0.32832005620002747, -0.04977532848715782, 0.2600943148136139, 0.6417092084884644, -0.09352986514568329, -0.21642711758613586, 0.011740202084183693, 0.17884838581085205, -0.1295594424009323, -0.17690639197826385, 0.4298243820667267, -0.04432421177625656, 0.18320995569229126, 0.015526614151895046, -0.04628651589155197, -0.1966448426246643, 0.167852982878685, 0.4735924005508423, -0.1787441372871399, -0.35094818472862244, -0.07704166322946548, -0.4391516447067261, 0.4183194637298584, -0.2034929394721985, -0.31138545274734497, -0.026084348559379578, -0.14429175853729248, 0.03395894914865494, 0.02940525859594345, 0.1907312273979187, 0.21170681715011597, 0.034898143261671066, 0.15340185165405273, -0.23572231829166412, -0.32652977108955383, 0.19707591831684113, -0.025081178173422813, -0.06939561665058136, -0.4523140788078308, 0.13202527165412903, 0.18302291631698608, -0.02000756934285164, -0.09226379543542862, -0.2248142510652542, -0.04834786802530289, -0.12982450425624847, 0.269131600856781, 0.15955302119255066, 0.3901244103908539, -0.010266929864883423, -0.2846347391605377, 0.09196294099092484, -0.02970207668840885, 0.02306327223777771, 0.03142787516117096, 0.003591686487197876, 0.15931227803230286, -0.21972665190696716, 0.38528865575790405, -0.5325149893760681, -0.0017948708264157176, 0.07626225799322128, 0.5195135474205017, -0.6110800504684448, 0.42672842741012573, -0.5688522458076477, 0.020213795825839043, 0.06462438404560089, 0.03107115998864174, 0.21820856630802155, 0.1226348876953125, -0.5164263844490051, -0.22150979936122894, 0.8104947805404663, -0.07674144208431244, -0.3140103816986084, -0.06277340650558472, 0.08024643361568451, -0.36391836404800415, -0.1370583027601242, -0.42853593826293945, -0.041449546813964844, 0.1382027268409729, 0.11425931006669998, 0.03294048085808754, -0.1600104421377182, -0.1677093207836151, -0.05352778732776642, -0.03172451630234718, 0.32495811581611633, 0.1215771809220314, 0.05717381089925766, 0.26327255368232727, 0.04189208894968033 ]
https://github.com/huggingface/datasets/issues/6720
TypeError: 'str' object is not callable
D'oh! Was wondering why the `str() is not callable` was in there. Glad the error is my end though, and not related to zstandard (which I had not used in the past). Thanks a lot!
### Describe the bug I am trying to get the HPLT datasets on the hub. Downloading/re-uploading would be too time- and resource consuming so I wrote [a dataset loader script](https://huggingface.co/datasets/BramVanroy/hplt_mono_v1_2/blob/main/hplt_mono_v1_2.py). I think I am very close but for some reason I always get the error below. It happens during the clean-up phase where the directory cannot be removed because it is not empty. My only guess would be that this may have to do with zstandard ``` Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1744, in _prepare_split_single writer.write(example, key) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 492, in write self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1753, in _prepare_split_single num_examples, num_bytes = writer.finalize() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 588, in finalize self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 959, in incomplete_dir yield tmp_dir File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1005, in download_and_prepare self._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1767, in _download_and_prepare super()._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1100, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1605, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1762, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pricie/vanroy/.config/JetBrains/PyCharm2023.3/scratches/scratch_5.py", line 4, in <module> ds = load_dataset( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/load.py", line 2549, in load_dataset builder_instance.download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 985, in download_and_prepare with incomplete_dir(self._output_dir) as tmp_output_dir: File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 966, in incomplete_dir shutil.rmtree(tmp_dir) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 731, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 729, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete' ``` Interestingly, though, this directory _does_ appear to be empty: ```shell > cd /home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete > ls -lah total 0 drwxr-xr-x. 1 vanroy vanroy 0 Mar 7 12:01 . drwxr-xr-x. 1 vanroy vanroy 304 Mar 7 11:52 .. > cd .. > ls 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47_builder.lock 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete ``` ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset( "BramVanroy/hplt_mono_v1_2", "ky", trust_remote_code=True ) ``` ### Expected behavior No error. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.1 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0
35
TypeError: 'str' object is not callable ### Describe the bug I am trying to get the HPLT datasets on the hub. Downloading/re-uploading would be too time- and resource consuming so I wrote [a dataset loader script](https://huggingface.co/datasets/BramVanroy/hplt_mono_v1_2/blob/main/hplt_mono_v1_2.py). I think I am very close but for some reason I always get the error below. It happens during the clean-up phase where the directory cannot be removed because it is not empty. My only guess would be that this may have to do with zstandard ``` Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1744, in _prepare_split_single writer.write(example, key) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 492, in write self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1753, in _prepare_split_single num_examples, num_bytes = writer.finalize() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 588, in finalize self.write_examples_on_file() File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 434, in write_examples_on_file if self.schema File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/arrow_writer.py", line 409, in schema else (pa.schema(self._features.type) if self._features is not None else None) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1643, in type return get_nested_type(self) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in get_nested_type {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1209, in <dictcomp> {key: get_nested_type(schema[key]) for key in schema} File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1221, in get_nested_type value_type = get_nested_type(schema.feature) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/features/features.py", line 1228, in get_nested_type return schema() TypeError: 'str' object is not callable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 959, in incomplete_dir yield tmp_dir File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1005, in download_and_prepare self._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1767, in _download_and_prepare super()._download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1100, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1605, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 1762, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pricie/vanroy/.config/JetBrains/PyCharm2023.3/scratches/scratch_5.py", line 4, in <module> ds = load_dataset( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/load.py", line 2549, in load_dataset builder_instance.download_and_prepare( File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 985, in download_and_prepare with incomplete_dir(self._output_dir) as tmp_output_dir: File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/contextlib.py", line 153, in __exit__ self.gen.throw(typ, value, traceback) File "/home/local/vanroy/dutch-instruction-datasets/.venv/lib/python3.10/site-packages/datasets/builder.py", line 966, in incomplete_dir shutil.rmtree(tmp_dir) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 731, in rmtree onerror(os.rmdir, path, sys.exc_info()) File "/home/pricie/vanroy/.pyenv/versions/3.10.13/lib/python3.10/shutil.py", line 729, in rmtree os.rmdir(path) OSError: [Errno 39] Directory not empty: '/home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete' ``` Interestingly, though, this directory _does_ appear to be empty: ```shell > cd /home/pricie/vanroy/.cache/huggingface/datasets/BramVanroy___hplt_mono_v1_2/ky/1.2.0/7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete > ls -lah total 0 drwxr-xr-x. 1 vanroy vanroy 0 Mar 7 12:01 . drwxr-xr-x. 1 vanroy vanroy 304 Mar 7 11:52 .. > cd .. > ls 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47_builder.lock 7ab138629fe7e9e29fe93ce63d809d5ef9d963273b829f61ab538e012dc9cc47.incomplete ``` ### Steps to reproduce the bug ```python from datasets import load_dataset ds = load_dataset( "BramVanroy/hplt_mono_v1_2", "ky", trust_remote_code=True ) ``` ### Expected behavior No error. ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.14.0-284.25.1.el9_2.x86_64-x86_64-with-glibc2.34 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.1 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0 D'oh! Was wondering why the `str() is not callable` was in there. Glad the error is my end though, and not related to zstandard (which I had not used in the past). Thanks a lot!
[ -0.16167008876800537, -0.2945093512535095, 0.1827983856201172, 0.301986426115036, 0.34105372428894043, -0.004187747836112976, 0.2907615303993225, 0.019499151036143303, 0.11874857544898987, 0.13143810629844666, 0.027880044654011726, 0.1734614223241806, -0.2581363916397095, 0.22743766009807587, -0.21855714917182922, 0.038118183612823486, -0.19708549976348877, 0.3628482520580292, -0.15858149528503418, 0.020588189363479614, -0.25331956148147583, 0.32562872767448425, -0.2513088583946228, 0.30911868810653687, -0.01624412089586258, -0.1386009007692337, 0.0074470508843660355, 0.3300698697566986, -0.20709724724292755, -0.2222854346036911, 0.3503400385379791, 0.032215602695941925, 0.4926452338695526, 0.4235745370388031, -0.00012971292017027736, 0.0006711632013320923, 0.31063568592071533, -0.13137264549732208, -0.2500198185443878, -0.3199169635772705, -0.17854556441307068, -0.15348626673221588, 0.01625215820968151, -0.017638757824897766, 0.34124556183815, -0.22883084416389465, -0.1712689995765686, -0.1940430849790573, -0.07674694061279297, 0.3444456160068512, 0.07161562144756317, 0.4766462743282318, 0.1327124685049057, -0.21885620057582855, 0.20931529998779297, 0.3144574761390686, -0.2266874760389328, 0.21489256620407104, 0.1892521232366562, -0.04914020001888275, 0.14994649589061737, 0.18972696363925934, -0.14423875510692596, -0.24060951173305511, 0.36896440386772156, 0.03352971374988556, 0.357907772064209, -0.03841544687747955, -0.06030145287513733, 0.12947702407836914, 0.6653164625167847, -0.33606088161468506, -0.08844966441392899, -0.20274201035499573, -0.03195555880665779, 0.10150749981403351, 0.3415900766849518, 0.09293180704116821, -0.2968088686466217, 0.2208210825920105, 0.06699193269014359, -0.24867776036262512, -0.11163243651390076, 0.027617238461971283, 0.3795813322067261, -0.16655680537223816, 0.07914159446954727, 0.23016846179962158, 0.3602187931537628, 0.022273633629083633, 0.3439525365829468, -0.1741430163383484, -0.01187654584646225, 0.28591981530189514, -0.021195057779550552, -0.0069509632885456085, -0.05295019596815109, 0.07944194972515106, -0.20884361863136292, -0.02173897624015808, 0.4965176582336426, -0.13586077094078064, -0.007782472297549248, 0.3125048577785492, 0.3516947329044342, 0.32401418685913086, 0.09647203981876373, -0.38632476329803467, 0.243051216006279, 0.17390981316566467, 0.09219381213188171, -0.0740390494465828, -0.03978534787893295, -0.10325977206230164, 0.021507684141397476, 0.33249515295028687, 0.426708459854126, -0.15403932332992554, -0.2192603200674057, 0.14935579895973206, -0.24547290802001953, 0.05161859467625618, 0.26559075713157654, 0.3722561299800873, 0.19477319717407227, 0.3987300992012024, 0.26267993450164795, 0.07417270541191101, -0.3045283854007721, -0.17473579943180084, 0.04238400235772133, 0.5389202833175659, -0.09571322053670883, -0.23968105018138885, -0.06683795899152756, 0.02658163197338581, -0.32652658224105835, 0.12205993384122849, 0.16897277534008026, -0.04170123115181923, 0.19297760725021362, -0.26086196303367615, 0.14232945442199707, 0.20099563896656036, 0.17614425718784332, 0.057824864983558655, 0.28357139229774475, -0.3152162432670593, -0.26121896505355835, 0.26564741134643555, -0.234530508518219, -0.5400826930999756, -0.3407173454761505, 0.041725434362888336, -0.007807823829352856, 0.22790734469890594, -0.2913873493671417, -0.44011154770851135, 0.22070565819740295, -0.3287043273448944, 0.007368117570877075, -0.4867045283317566, 0.16436704993247986, -0.10245968401432037, -0.2514883875846863, 0.5497753024101257, -0.506998598575592, 0.05556274950504303, -0.36109086871147156, -0.07942992448806763, 0.505769670009613, -0.1639261096715927, -0.13282345235347748, 0.7032921314239502, -0.5687271356582642, -0.17414695024490356, 0.4734939634799957, -0.6814272999763489, -0.11804243922233582, 0.18624341487884521, -0.35537731647491455, -0.09049304574728012, 0.06699667870998383, 0.14678633213043213, -0.16822552680969238, 0.10784294456243515, -0.32926931977272034, 0.020545104518532753, 0.11719396710395813, -0.07898252457380295, -0.16719134151935577, 0.009368645027279854, 0.05903783068060875, 0.02359829843044281, 0.3155674934387207, 0.18166691064834595, -0.056877680122852325, 0.37042945623397827, 0.1497649848461151, -0.11901962757110596, 0.3804634213447571, 0.20724700391292572, 0.4340994954109192, 0.15575265884399414, 0.01477542519569397, -0.2717444896697998, -0.3368094563484192, -0.06662438064813614, -0.3568703234195709, 0.4466346204280853, -0.11927267909049988, -0.021181846037507057, -0.0965547040104866, 0.09256727993488312, -0.27750691771507263, 0.1924886256456375, -0.01352834701538086, 0.30933111906051636, -0.03375719487667084, -0.14210763573646545, -0.09723170101642609, 0.5721306204795837, -0.1355605572462082, 0.23277230560779572, -0.450042188167572, 0.37528491020202637, -0.2613676190376282, -0.3585973083972931, 0.004641983658075333, 0.17017321288585663, 0.1895514726638794, -0.11667464673519135, -0.12547704577445984, 0.18503999710083008, 0.23998446762561798, -0.07819010317325592, -0.03320351243019104, -0.2082263082265854, 0.013560936786234379, -0.08543207496404648, -0.01228628121316433, 0.28934428095817566, 0.3058602213859558, -0.030607186257839203, 0.04214846342802048, 0.46538954973220825, -0.3472139835357666, 0.32125499844551086, 0.08795662224292755, 0.22985374927520752, 0.040543437004089355, -0.08437752723693848, 0.05102371424436569, -0.25431132316589355, 0.3191922605037689, 0.0047479234635829926, 0.01044682040810585, -0.017255393788218498, -0.023619361221790314, -0.09264860302209854, 0.26499438285827637, 0.18014618754386902, 0.19642695784568787, 0.2739351987838745, 0.22842910885810852, 0.03270348906517029, 0.28379014134407043, -0.07538243383169174, 0.3515293598175049, -0.06803607195615768, -0.3486117124557495, -0.09651517122983932, 0.06280239671468735, 0.07189558446407318, 0.06543882191181183, 0.09249341487884521, 0.1094442680478096, 0.31544190645217896, 0.0656227320432663, 0.0021324260160326958, -0.31306302547454834, -0.523674488067627, -0.13050080835819244, 0.41839078068733215, -0.19088409841060638, -0.04590195417404175, -0.15526627004146576, -0.0004892349243164062, -0.21840614080429077, -0.3090619444847107, -0.19140087068080902, -0.4171092212200165, -0.26832085847854614, 0.4353749454021454, -0.004186064004898071, 0.03040628507733345, -0.32226163148880005, 0.18409672379493713, 0.13353191316127777, 0.09733407944440842, -0.23866769671440125, 0.09601306915283203, -0.23504409193992615, -0.17750729620456696, 0.0342358760535717, -0.004172295331954956, 0.15975739061832428, -0.04273422807455063, 0.13643866777420044, -0.17911075055599213, 0.021172434091567993, 0.41606685519218445, 0.03296063840389252, -0.21982868015766144, 0.47828546166419983, 0.03423605114221573, 0.06476082652807236, -0.12126802653074265, 0.31716054677963257, -0.3049350678920746, -0.11734501272439957, 0.4180142283439636, -0.03627312555909157, 0.006062125787138939, -0.16443009674549103, -0.08362222462892532, -0.3555704355239868, -0.4805610775947571, -0.11735257506370544, 0.02902832254767418, 0.15867215394973755, -0.08108292520046234, 0.08276693522930145, 0.0638992190361023, 0.016820060089230537, -0.0763537585735321, 0.12235907465219498, -0.19169539213180542, -0.060941603034734726, 0.02948087826371193, -0.22553743422031403, 0.003909878432750702, 0.1257898509502411, 0.10569515079259872, -0.2170235514640808, -0.36595577001571655, -0.3221578001976013, -0.08479172736406326, 0.1984974443912506, -0.43228521943092346, -0.053053222596645355, 0.5043966174125671, 0.4489648938179016, 0.024122828617691994, -0.07891949266195297, 0.13358131051063538, 0.030695579946041107, 0.17584672570228577, 0.05785256624221802, 0.26874393224716187, 0.21160069108009338, -0.053768083453178406, 0.09491176158189774, -0.04724478721618652, 0.07123766839504242, 0.5458665490150452, 0.054330192506313324, 0.35485410690307617, -0.23537659645080566, -0.6878170371055603, -0.10397258400917053, -0.03789760172367096, -0.14602607488632202, 0.21534210443496704, -0.14620736241340637, 0.32691067457199097, -0.20508481562137604, -0.034582994878292084, 0.14374640583992004, -0.20917005836963654, 0.11048832535743713, -0.014950897544622421, -0.10078529268503189, -0.17498649656772614, -0.10155406594276428, -0.39956289529800415, -0.19802603125572205, 0.31842708587646484, 0.3052394986152649, 0.2990387976169586, 0.0944283977150917, -0.5736430883407593, -0.05674782022833824, -0.14257675409317017, 0.18712565302848816, 0.12762169539928436, 0.43254703283309937, -0.19734114408493042, -0.0633881464600563, -0.01798945665359497, 0.009871968999505043, 0.6498661637306213, 0.201702281832695, 0.2566314935684204, 0.2696082592010498, -0.1230483204126358, -0.3161478340625763, -0.06367550790309906, -0.246877983212471, 0.40785861015319824, 0.17728319764137268, 0.3589799404144287, -0.15891551971435547, -0.13636194169521332, 0.01664382964372635, 0.0796901285648346, -0.34072309732437134, -0.043800462037324905, -0.08854758739471436, -0.4749930799007416, -0.39140763878822327, -0.05814848095178604, 0.027275586500763893, 0.5286033749580383, 0.07943369448184967, 0.14116065204143524, 0.21621407568454742, -0.32548439502716064, 0.33511102199554443, -0.07999704778194427, 0.16794413328170776, -0.28673315048217773, -0.01320488192141056, -0.20875045657157898, 0.11814464628696442, 0.30139976739883423, 0.48648446798324585, 0.07527301460504532, -0.4854097366333008, 0.23327535390853882, -0.18974818289279938, 0.4991493225097656, 0.2052423357963562, -0.11317343264818192, 0.12411600351333618, -0.3275740444660187, 0.39781033992767334, -0.49861419200897217, 0.20276786386966705, 0.03624598681926727, -0.2641269266605377, -0.5103643536567688, -0.04382375627756119, 0.2876223921775818, -0.11716453731060028, -0.08735783398151398, 0.1713901162147522, 0.5132016539573669, -0.3443802297115326, 0.44620561599731445, 0.10807481408119202, 1.3879485130310059, 0.02175077795982361, 0.18278563022613525, 0.15935799479484558, 0.026673920452594757, 0.23852090537548065, -0.18081940710544586, 0.23881959915161133, -0.38048964738845825, -0.061596401035785675, -0.2738809585571289, -0.183411106467247, 0.1716182827949524, 0.11478498578071594, -0.29378026723861694, 0.12197842448949814, -0.07437051087617874, 0.3552912771701813, 0.03394172340631485, 0.2051398754119873, -0.2105666846036911, -0.3545438349246979, -0.11900465190410614, -0.06253902614116669, 0.022905979305505753, 0.30133357644081116, -0.1302521824836731, -0.09906291961669922, -0.025560736656188965, -0.4298033118247986, 0.017441265285015106, 0.012270629405975342, 0.09169328212738037, 0.024455536156892776, -0.14701581001281738, -0.29977524280548096, -0.08358396589756012, 0.3005845844745636, 0.03206022456288338, 0.032347410917282104, 0.0826183333992958, -0.28786733746528625, 0.0278811976313591, -0.11917687952518463, -0.09700949490070343, 0.3094971776008606, 0.060948118567466736, 0.0239897221326828, -0.08930636942386627, 0.10345596075057983, -0.03313204273581505, -0.11292143166065216, -0.18410669267177582, 0.1575460284948349, 0.06565514951944351, -0.4619143009185791, -0.14179138839244843, -0.27095964550971985, -0.06281503289937973, -0.24032548069953918, -0.04032861068844795, 0.14510497450828552, -0.3076009750366211, -0.06030859798192978, 0.003057103604078293, -0.21932411193847656, -0.035721492022275925, 0.3607275187969208, 0.25265663862228394, 0.4027751088142395, 0.3630673587322235, 0.41719740629196167, -0.21963906288146973, -0.23509663343429565, 0.2510417401790619, 0.2844768762588501, -0.40589702129364014, 0.5672101378440857, -0.04802717640995979, -0.40952181816101074, -0.029740404337644577, 0.27163535356521606, 0.07987066358327866, -0.1743292212486267, -0.27746888995170593, -0.5948523283004761, -0.31903886795043945, 0.08421047031879425, 0.3060401976108551, 0.17197534441947937, 0.11526947468519211, 0.2684706747531891, -0.0666637122631073, -0.2040206342935562, -0.14559292793273926, -0.024099547415971756, -0.39056840538978577, 0.1235845610499382, -0.16577300429344177, -0.16400223970413208, -0.15374480187892914, -0.040900204330682755, -0.07630671560764313, -0.05824726074934006, 0.07755202054977417, 0.08082207292318344, -0.18175208568572998, 0.2392897605895996, 0.25423723459243774, 0.03703460097312927, 0.0016089673154056072, -0.0717611014842987, -0.05107176676392555, -0.3469938635826111, 0.07793615758419037, 0.4382708668708801, -0.19483666121959686, 0.2951063811779022, 0.3815777897834778, -0.22647985816001892, -0.1995982825756073, 0.41877472400665283, 0.13058003783226013, 0.20815977454185486, 0.08426778763532639, 0.1782485395669937, -0.06859520077705383, 0.06233710050582886, 0.10790622979402542, 0.18742221593856812, 0.28534457087516785, -0.2038564682006836, 0.3295699954032898, -0.17308200895786285, 0.030308131128549576, -0.16781319677829742, 0.33856600522994995, 0.10874177515506744, -0.15382780134677887, 0.07770368456840515, -0.21408048272132874, -0.0886383131146431, -0.26383543014526367, -0.38276639580726624, 0.05214785039424896, -0.22816672921180725, -0.044357676059007645, 0.3953162133693695, -0.23828546702861786, -0.2162335067987442, -0.14948417246341705, -0.0083598168566823, 1.0211085081100464, 0.03809936344623566, -0.2508339583873749, 0.31216755509376526, -0.31198650598526, 0.09171031415462494, 0.3038187623023987, 0.16839538514614105, 0.1258908361196518, 0.4840658903121948, -0.03447861224412918, 0.146040678024292, 0.02948598377406597, 0.11441856622695923, 0.13329686224460602, -0.5954619646072388, -0.10043074190616608, 0.6391294002532959, 0.5129042863845825, 0.003939405083656311, -0.08019141852855682, 0.10449980199337006, -0.32421550154685974, -0.028956890106201172, -0.2971497178077698, -0.017176520079374313, -0.3450135886669159, 0.07656499743461609, -0.09904321283102036, -0.2716340124607086, -0.1895882934331894, -0.08622347563505173, 0.2338622361421585, -0.19270245730876923, 0.1201750859618187, 0.021525312215089798, 0.06333629786968231, 0.013294734992086887, -0.16790005564689636, 0.130278080701828, -0.15682420134544373, -0.32499948143959045, 0.014278564602136612, 0.261379599571228, 0.3044613301753998, 0.027068814262747765, -0.016710268333554268, 0.5313928723335266, 0.43436652421951294, -0.30479052662849426, -0.10132105648517609, -0.04610193148255348, -0.07669436931610107, -0.2851656675338745, 0.42303434014320374, -0.30941393971443176, 0.4727456867694855, 0.13705983757972717, -0.034103743731975555, -0.023008711636066437, 0.0012596771121025085, 0.32832005620002747, -0.04977532848715782, 0.2600943148136139, 0.6417092084884644, -0.09352986514568329, -0.21642711758613586, 0.011740202084183693, 0.17884838581085205, -0.1295594424009323, -0.17690639197826385, 0.4298243820667267, -0.04432421177625656, 0.18320995569229126, 0.015526614151895046, -0.04628651589155197, -0.1966448426246643, 0.167852982878685, 0.4735924005508423, -0.1787441372871399, -0.35094818472862244, -0.07704166322946548, -0.4391516447067261, 0.4183194637298584, -0.2034929394721985, -0.31138545274734497, -0.026084348559379578, -0.14429175853729248, 0.03395894914865494, 0.02940525859594345, 0.1907312273979187, 0.21170681715011597, 0.034898143261671066, 0.15340185165405273, -0.23572231829166412, -0.32652977108955383, 0.19707591831684113, -0.025081178173422813, -0.06939561665058136, -0.4523140788078308, 0.13202527165412903, 0.18302291631698608, -0.02000756934285164, -0.09226379543542862, -0.2248142510652542, -0.04834786802530289, -0.12982450425624847, 0.269131600856781, 0.15955302119255066, 0.3901244103908539, -0.010266929864883423, -0.2846347391605377, 0.09196294099092484, -0.02970207668840885, 0.02306327223777771, 0.03142787516117096, 0.003591686487197876, 0.15931227803230286, -0.21972665190696716, 0.38528865575790405, -0.5325149893760681, -0.0017948708264157176, 0.07626225799322128, 0.5195135474205017, -0.6110800504684448, 0.42672842741012573, -0.5688522458076477, 0.020213795825839043, 0.06462438404560089, 0.03107115998864174, 0.21820856630802155, 0.1226348876953125, -0.5164263844490051, -0.22150979936122894, 0.8104947805404663, -0.07674144208431244, -0.3140103816986084, -0.06277340650558472, 0.08024643361568451, -0.36391836404800415, -0.1370583027601242, -0.42853593826293945, -0.041449546813964844, 0.1382027268409729, 0.11425931006669998, 0.03294048085808754, -0.1600104421377182, -0.1677093207836151, -0.05352778732776642, -0.03172451630234718, 0.32495811581611633, 0.1215771809220314, 0.05717381089925766, 0.26327255368232727, 0.04189208894968033 ]
https://github.com/huggingface/datasets/issues/6716
Non-deterministic `Dataset.builder_name` value
When `rotten_tomatoes` is printed out, the following warning message is also printed out: ``` You can avoid this message in future by passing the argument `trust_remote_code=True`. Passing `trust_remote_code=True` will be mandatory to load this dataset from the next major release of `datasets`. ```
### Describe the bug I'm not sure if this is a bug, but `print(ds.builder_name)` in the following code sometimes prints out `rotten_tomatoes` instead of `parquet`: ```python import datasets for _ in range(100): ds = datasets.load_dataset("rotten_tomatoes", split="train") print(ds.builder_name) # prints out "rotten_tomatoes" sometimes instead of "parquet" ``` Output: ``` ... parquet parquet parquet rotten_tomatoes parquet parquet parquet ... ``` Here's a reproduction using GitHub Actions: https://github.com/mlflow/mlflow/actions/runs/8153247984/job/22284263613?pr=11329#step:12:241 One of our tests is flaky because `builder_name` is not deterministic. ### Steps to reproduce the bug 1. Run the code above. ### Expected behavior Always prints out `parquet`? ### Environment info ``` Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-1015-azure-x86_64-with-glibc2.34 - Python version: 3.8.18 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0 ```
43
Non-deterministic `Dataset.builder_name` value ### Describe the bug I'm not sure if this is a bug, but `print(ds.builder_name)` in the following code sometimes prints out `rotten_tomatoes` instead of `parquet`: ```python import datasets for _ in range(100): ds = datasets.load_dataset("rotten_tomatoes", split="train") print(ds.builder_name) # prints out "rotten_tomatoes" sometimes instead of "parquet" ``` Output: ``` ... parquet parquet parquet rotten_tomatoes parquet parquet parquet ... ``` Here's a reproduction using GitHub Actions: https://github.com/mlflow/mlflow/actions/runs/8153247984/job/22284263613?pr=11329#step:12:241 One of our tests is flaky because `builder_name` is not deterministic. ### Steps to reproduce the bug 1. Run the code above. ### Expected behavior Always prints out `parquet`? ### Environment info ``` Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-1015-azure-x86_64-with-glibc2.34 - Python version: 3.8.18 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0 ``` When `rotten_tomatoes` is printed out, the following warning message is also printed out: ``` You can avoid this message in future by passing the argument `trust_remote_code=True`. Passing `trust_remote_code=True` will be mandatory to load this dataset from the next major release of `datasets`. ```
[ -0.22831767797470093, 0.1902737319469452, -0.021880939602851868, 0.18115636706352234, 0.31367260217666626, -0.1290479302406311, 0.42048895359039307, 0.13688793778419495, -0.04137015342712402, 0.49882322549819946, 0.2722196877002716, 0.6589347124099731, 0.017034290358424187, 0.10211846977472305, -0.023526743054389954, 0.0363493487238884, 0.14183413982391357, 0.027021005749702454, 0.42112261056900024, -0.19438232481479645, -0.14236193895339966, -0.045802630484104156, -0.06362231820821762, 0.013533905148506165, -0.17590032517910004, -0.0405525341629982, 0.004554493352770805, -0.14278903603553772, 0.06882062554359436, -0.37304919958114624, 0.19656410813331604, 0.002848435193300247, -0.15962451696395874, 0.4389597773551941, -0.00012119691382395104, -0.0035787150263786316, 0.4249614477157593, 0.015636174008250237, -0.32673579454421997, -0.5028325915336609, -0.05055587738752365, -0.07430696487426758, 0.2726256847381592, -0.49892374873161316, -0.2931796908378601, -0.07860612124204636, 0.09436577558517456, -0.1906098574399948, -0.18648011982440948, 0.2319212257862091, 0.13649579882621765, 0.08263616263866425, -0.06584955751895905, 0.05263274908065796, 0.06752374023199081, 0.04491782933473587, -0.22636781632900238, 0.06730692088603973, 0.18580901622772217, 0.24434423446655273, -0.1074751541018486, 0.2327727973461151, 0.08214239776134491, 0.17400479316711426, 0.1882714331150055, 0.35969656705856323, 0.8308892250061035, -0.276351660490036, 0.24244391918182373, 0.3766949772834778, 0.24476569890975952, -0.18279051780700684, -0.07733787596225739, -0.41320478916168213, 0.08732915669679642, -0.07994288206100464, 0.12838399410247803, 0.10875102132558823, -0.2952919006347656, -0.06921595335006714, -0.004007862880825996, 0.08318670839071274, -0.03945901244878769, 0.1834706962108612, -0.0417906790971756, 0.6141539812088013, -0.10559583455324173, 0.22918763756752014, -0.24084322154521942, -0.07619951665401459, 0.4155520796775818, -0.4661340117454529, -0.03562638536095619, -0.23124121129512787, -0.18842874467372894, -0.059002235531806946, 0.006807237863540649, 0.0584840252995491, -0.2426987886428833, 0.021444521844387054, 0.0814153328537941, -0.12741181254386902, 0.23557215929031372, 0.07959669828414917, 0.1944390833377838, -0.05256563052535057, 0.0775853618979454, 0.24891678988933563, 0.036961063742637634, 0.27474597096443176, 0.05352230742573738, 0.05351751297712326, 0.14736855030059814, -0.21893002092838287, 0.24116598069667816, -0.2823522090911865, 0.5497967600822449, -0.1595488041639328, -0.4789964556694031, 0.2057037204504013, -0.22466906905174255, 0.123284250497818, 0.22815726697444916, 0.39119064807891846, -0.25157397985458374, 0.0034940633922815323, -0.2445647418498993, 0.20597447454929352, 0.032166726887226105, -0.2920140027999878, -0.28253546357154846, -0.12748514115810394, -0.3816037178039551, -0.4207361042499542, -0.05522126704454422, -0.1328679323196411, 0.06472134590148926, 0.28498023748397827, 0.08100073784589767, -0.3097570836544037, -0.3118656277656555, -0.18793167173862457, 0.09268178790807724, 0.1341039389371872, -0.33770009875297546, 0.07959600538015366, 0.018642637878656387, -0.4549825191497803, -0.1593778133392334, 0.12581872940063477, -0.1525643765926361, -0.05718905106186867, -0.0939098373055458, 0.0841330736875534, -0.06778432428836823, -0.10867342352867126, -0.1129864826798439, 0.31963491439819336, 0.2512681782245636, 0.2680482268333435, 0.05622778460383415, -0.17193104326725006, -0.14608266949653625, -0.20763878524303436, 0.10961466282606125, 0.16402369737625122, -0.1818600445985794, 0.008931905031204224, -0.15594282746315002, 0.13934502005577087, 0.3407379686832428, 0.003943882882595062, -0.0006290657911449671, 0.03258750960230827, 0.04745117574930191, -0.4100624918937683, 0.2515895962715149, 0.05024481937289238, -0.010105062276124954, 0.27614378929138184, -0.10326753556728363, 0.21994103491306305, 0.1397644728422165, 0.0013838504673913121, 0.06698060780763626, 0.01952231489121914, 0.18087945878505707, 0.043734923005104065, 0.1165180429816246, -0.055878955870866776, -0.16289642453193665, -0.33902090787887573, 0.13671875, 0.08772633969783783, 0.16930031776428223, 0.15348997712135315, -0.12596553564071655, -0.12088259309530258, 0.3103031814098358, -0.031935881823301315, -0.18906058371067047, -0.12106484174728394, 0.5831246376037598, 0.3752536177635193, -0.0024403808638453484, -0.2662094533443451, -0.37813687324523926, 0.22132563591003418, -0.054761406034231186, -0.12795980274677277, -0.07681219279766083, -0.16689833998680115, -0.06765308976173401, 0.23667071759700775, -0.028055671602487564, -0.006615873426198959, 0.07095342874526978, 0.41458553075790405, -0.009582845494151115, 0.1945953071117401, -0.12717781960964203, -0.03846259415149689, -0.42737412452697754, 0.051328595727682114, -0.1943320482969284, 0.38894516229629517, 0.24184799194335938, -0.2317337989807129, -0.13875964283943176, 0.1633281707763672, 0.3066868185997009, -0.09237633645534515, -0.07934897392988205, 0.5014960765838623, -0.1277059018611908, 0.27710485458374023, -0.25840675830841064, 0.11309890449047089, 0.04731805622577667, 0.09262825548648834, 0.17644982039928436, 0.4118862450122833, -0.018054189160466194, 0.05202644318342209, 0.1879584789276123, 0.5605281591415405, -0.016259130090475082, 0.341956228017807, -0.34055274724960327, -0.10880131274461746, 0.13346102833747864, -0.0585031695663929, 0.00446409173309803, -0.19280225038528442, 0.2847858965396881, -0.22384552657604218, 0.36905813217163086, -0.023301688954234123, -0.6957493424415588, -0.03748118132352829, 0.2507289946079254, -0.10184016823768616, -0.05842836946249008, -0.08675285428762436, 0.12836915254592896, 0.029977060854434967, 0.06508038938045502, 0.34990593791007996, 0.2195165902376175, 0.1889011561870575, -0.18591640889644623, -0.06845097988843918, -0.5279596447944641, -0.22366048395633698, 0.2985975742340088, 0.24233397841453552, 0.09405598044395447, 0.13407528400421143, 0.3632747530937195, -0.13807737827301025, -0.6324788331985474, -0.03221753239631653, 0.2675260901451111, 0.03163839876651764, -0.2041417360305786, 0.4208375811576843, -0.1963266134262085, 0.1368502676486969, -0.48008671402931213, -0.07539869099855423, -0.22480681538581848, -0.3870995044708252, 0.030080663040280342, 0.3685208261013031, -0.21351604163646698, 0.2651519477367401, 0.14901381731033325, 0.18239659070968628, -0.25919681787490845, -0.33278414607048035, -0.4819759428501129, -0.07879134267568588, -0.35039451718330383, -0.023534642532467842, -0.002202293835580349, -0.09315170347690582, 0.2641834616661072, -0.12691009044647217, -0.12881147861480713, -0.3742533326148987, -0.5071821212768555, 0.1437012404203415, -0.13492056727409363, 0.5007911920547485, 0.1622081995010376, -0.11039866507053375, 0.38830554485321045, -0.16218355298042297, 0.292716383934021, -0.07205038517713547, 0.17877082526683807, 0.0349745899438858, 0.018938075751066208, -0.12653516232967377, 0.0006859824061393738, -0.17206576466560364, -0.091465525329113, 0.002928406000137329, 0.03452782332897186, 0.09690581262111664, -0.06770855188369751, 0.016178809106349945, -0.001978190615773201, -0.09493279457092285, -0.09869369864463806, 0.234584778547287, -0.3112245798110962, -0.20799192786216736, 0.13327494263648987, 0.15449151396751404, 0.07658354192972183, -0.24039170145988464, -0.12376103550195694, -0.010343950241804123, -0.2582288384437561, -0.5839773416519165, 0.15300898253917694, -0.22934286296367645, 0.09777577221393585, 0.14115047454833984, -0.23623840510845184, 0.06576795130968094, -0.05589388310909271, 0.0018512848764657974, -0.05690537765622139, -0.1715971678495407, 0.1547718197107315, 0.23128917813301086, 0.4639992117881775, 0.22882378101348877, 0.20870697498321533, -0.03226188197731972, 0.261832058429718, 0.0034478195011615753, -0.5548515915870667, 0.1593068540096283, -0.26030734181404114, 0.3869677484035492, -0.16332489252090454, -0.15673735737800598, 0.05557363107800484, 0.08310900628566742, -0.33064067363739014, 0.15199434757232666, -0.39463648200035095, -0.1041124165058136, 0.006953030824661255, 0.21335411071777344, 0.19928866624832153, -0.34803736209869385, -0.09703417122364044, -0.3787243962287903, -0.24895459413528442, 0.2613036334514618, 0.4067820906639099, -0.02775890752673149, -0.3502581715583801, -0.14827178418636322, 0.22800400853157043, -0.19404691457748413, -0.10911659151315689, 0.10915692150592804, 0.12801013886928558, -0.5031792521476746, 0.17571988701820374, -0.34024181962013245, 0.06834828853607178, -0.046869296580553055, 0.1323176622390747, 0.3795837163925171, 0.02637263759970665, 0.7005910277366638, -0.24955759942531586, 0.3536766767501831, 0.0329417884349823, -0.2039688229560852, 0.027189048007130623, -0.3313717544078827, -0.5468499064445496, 0.041455600410699844, 0.2995077967643738, 0.354358971118927, -0.4602058231830597, -0.23131094872951508, 0.3395855724811554, -0.16957683861255646, -0.131870836019516, -0.3224331736564636, -0.4356822967529297, 0.29513657093048096, -0.09179136902093887, 0.2798745632171631, 0.025876114144921303, 0.45751237869262695, -0.05639927089214325, -0.07850213348865509, -0.26366692781448364, 0.20702961087226868, 0.23606117069721222, 0.21435964107513428, 0.2209644615650177, -0.08275844901800156, 0.06399832665920258, 0.10114824771881104, 0.5740933418273926, 0.3230811655521393, 0.2615145742893219, -0.11454032361507416, -0.5272433757781982, 0.023452796041965485, -0.11973772943019867, 0.41922643780708313, 0.5469720959663391, -0.2114415168762207, -0.28358861804008484, -0.10955506563186646, 0.4867953658103943, -0.38641977310180664, 0.0866866186261177, 0.5844115614891052, 0.18889965116977692, -0.1997806429862976, -0.49092215299606323, 0.5368963479995728, -0.17593495547771454, -0.21546681225299835, 0.3229842185974121, -0.00416458398103714, -0.4770272374153137, 0.585978090763092, 0.28114059567451477, 0.9284662008285522, 0.0818057656288147, 0.015609610825777054, 0.15166926383972168, -0.02989506721496582, 0.27416104078292847, -0.08903111517429352, -0.026133503764867783, -0.4904276132583618, 0.04264003410935402, 0.06266868114471436, -0.02307051233947277, 0.3578997254371643, 0.34509050846099854, -0.047318603843450546, 0.5300698280334473, -0.07107697427272797, 0.4751759171485901, -0.060073837637901306, 0.12084229290485382, -0.002429492771625519, -0.08238573372364044, -0.24761706590652466, 0.025566797703504562, 0.1567060947418213, 0.11604596674442291, -0.0628974586725235, -0.0278167687356472, 0.16011230647563934, -0.22392931580543518, -0.22901029884815216, 0.023330453783273697, -0.19147606194019318, -0.026592910289764404, 0.4202856123447418, -0.3027789890766144, -0.04831366613507271, 0.22021207213401794, 0.1950007975101471, 0.32266077399253845, -0.16164721548557281, 0.2896733283996582, 0.3987373411655426, 0.18620139360427856, 0.006678438279777765, -0.11119498312473297, 0.23614221811294556, 0.27882590889930725, -0.31025078892707825, 0.015688102692365646, -0.17279011011123657, -0.13892364501953125, -0.09266331791877747, -0.053183749318122864, 0.15267226099967957, -0.2814813256263733, -0.10603758692741394, -0.18747085332870483, 0.04987740144133568, -0.16650357842445374, 0.09076844155788422, -0.06266263127326965, -0.1663731038570404, -0.03919965773820877, -0.14650125801563263, -0.5632365942001343, -0.2608626186847687, 0.08674073964357376, 0.0637306272983551, 0.2441050410270691, 0.2528953552246094, -0.24639494717121124, -0.12991417944431305, -0.24228131771087646, -0.08658625930547714, -0.04449555650353432, -0.232934832572937, 0.27161192893981934, -0.04599471390247345, -0.232418030500412, 0.2106861025094986, 0.136307030916214, 0.1376725435256958, 0.2831748425960541, -0.3274257183074951, -0.35185226798057556, 0.26691287755966187, -0.047369688749313354, 0.19120191037654877, 0.3235449492931366, 0.0276680588722229, 0.38128116726875305, -0.1174110397696495, -0.20823431015014648, -0.2550607919692993, -0.0674629658460617, -0.1578163057565689, 0.33031195402145386, -0.41817712783813477, 0.22094321250915527, 0.13338269293308258, 0.018194111064076424, 0.12011297047138214, -0.01668822392821312, -0.11834494769573212, -0.15858766436576843, -0.2599959671497345, 0.14825847744941711, 0.0979987159371376, 0.4239686131477356, -0.3267101049423218, -0.3079445958137512, -0.30321308970451355, -0.2883799076080322, 0.13401131331920624, 0.15274950861930847, 0.11539290845394135, 0.04962827265262604, 0.5193303823471069, 0.23661774396896362, 0.12027904391288757, -0.1340876817703247, -0.23393884301185608, 0.23237989842891693, -0.13534700870513916, 0.3125065267086029, -0.2869516611099243, 0.15890581905841827, -0.11846031993627548, 0.019471440464258194, -0.3188908100128174, 0.1337967813014984, 0.21562889218330383, -0.12242573499679565, -0.05720129236578941, -0.01642797328531742, 0.32005175948143005, 0.5937966108322144, -0.11944212019443512, -0.5382640361785889, 0.0989643856883049, 0.1398865133523941, -0.2578524053096771, -0.013782868161797523, -0.07929784059524536, 0.3102060854434967, 0.23455098271369934, 0.3698621690273285, 0.17451369762420654, 0.10609497129917145, -0.3968743085861206, 0.00810730829834938, 0.41742610931396484, -0.3945305347442627, 0.23679009079933167, 0.4401567280292511, 0.07073783874511719, 0.33828526735305786, 0.5558522939682007, 0.049889206886291504, -0.27350369095802307, 0.6857873201370239, 0.24145996570587158, 0.07346207648515701, 0.1371653825044632, 0.028784826397895813, 0.16882923245429993, 0.2761927843093872, 0.23278966546058655, 0.5823862552642822, -0.23163220286369324, 0.2910361886024475, 0.0739167332649231, 0.14308880269527435, -0.2380780577659607, -0.017928648740053177, -0.6868544220924377, -0.03625214472413063, -0.23933109641075134, -0.24446417391300201, -0.2996869385242462, -0.24338456988334656, -0.1597578227519989, 0.05441008880734444, -0.05590379610657692, -0.00236675888299942, 0.013873785734176636, 0.06696730852127075, 0.14667169749736786, -0.5840581655502319, 0.029070662334561348, -0.14880549907684326, 0.2771764099597931, -0.3584761917591095, 0.3830978274345398, -0.04823809862136841, -0.1693243831396103, 0.11328168213367462, 0.16135525703430176, 0.4047456681728363, 0.24321867525577545, -0.03245321288704872, 0.0008546160534024239, -0.0688837319612503, -0.008592965081334114, 0.030026189982891083, 0.24128250777721405, 0.045879725366830826, 0.057157911360263824, 0.5439919829368591, 0.0800473615527153, -0.0958988144993782, 0.06889484822750092, 0.3547365665435791, 0.4460834562778473, -0.31908702850341797, 0.8187363147735596, 0.1271052062511444, 0.2113381326198578, -0.13739268481731415, -0.008270427584648132, -0.3881751596927643, -0.26437896490097046, 0.1896241009235382, -0.1766822785139084, 0.07467605918645859, -0.04587250202894211, 0.022005856037139893, -0.19756753742694855, 0.3785795271396637, -0.14017687737941742, -0.10265801101922989, -0.3195408284664154, -0.009004391729831696, -0.48418962955474854, 0.3099210858345032, -0.16048169136047363, -0.020003609359264374, 0.24866729974746704, 0.19571083784103394, 0.015132434666156769, 0.1852799355983734, 0.20174792408943176, 0.1513759195804596, -0.3693867623806, 0.28923654556274414, -0.32666799426078796, -0.08220964670181274, -0.23858721554279327, 0.012565160170197487, 0.21045003831386566, -0.1656450629234314, 0.14691558480262756, -0.12385080009698868, -0.1398836225271225, -0.019689373672008514, 0.11349458992481232, 0.2428927719593048, 0.023668557405471802, 0.07785395532846451, -0.13624083995819092, 0.06500028073787689, -0.02986692637205124, -0.12607868015766144, -0.11005669832229614, -0.22208347916603088, -0.4052664339542389, 0.544276237487793, -0.04988420382142067, 0.18568859994411469, -0.0939125120639801, 0.025448445230722427, -0.10264419764280319, 0.29300636053085327, 0.24990390241146088, -0.3289562463760376, -0.4381503462791443, -0.03745253384113312, -0.06027227267622948, 0.2265198677778244, -0.103300079703331, 0.26951080560684204, 0.04233118146657944, 0.26866117119789124, 0.11984303593635559, -0.3806766867637634, 0.5984398126602173, -0.3333493173122406, -0.5385453701019287, -0.29982173442840576, 0.13273364305496216, 0.13964152336120605, -0.05355200916528702, -0.4687078893184662, 0.014409787952899933, 0.23963072896003723, -0.12250735610723495, 0.08505965769290924, -0.09166209399700165, -0.05576310679316521, 0.23128120601177216, -0.18523083627223969, 0.05876277759671211, 0.20585530996322632, -0.1208842471241951, 0.1340453028678894, -0.45885372161865234 ]
https://github.com/huggingface/datasets/issues/6716
Non-deterministic `Dataset.builder_name` value
Hi ! This behavior happens because the dataset was originakky created using a dataset script [rotten_tomatoes.py](https://huggingface.co/datasets/rotten_tomatoes/blob/26f40d324d7b281d8b3fb1c47f30f8b9957f206b/rotten_tomatoes.py) and because we added features recently allowing to download the dataset directly from Parquet files (parquet builder) without running the dataset script (rotten_tomatoes). The flakiness must come from the availability of the Parquet files (we automatically export them in the refs/convert/parquet branch and we recently had to move some files). Anyway the easy fix on our side is to remove the dataset script completely, let me open a PR at https://huggingface.co/datasets/rotten_tomatoes EDIT: opened https://huggingface.co/datasets/rotten_tomatoes/discussions/6, feel free to comment there if you're ok with that change
### Describe the bug I'm not sure if this is a bug, but `print(ds.builder_name)` in the following code sometimes prints out `rotten_tomatoes` instead of `parquet`: ```python import datasets for _ in range(100): ds = datasets.load_dataset("rotten_tomatoes", split="train") print(ds.builder_name) # prints out "rotten_tomatoes" sometimes instead of "parquet" ``` Output: ``` ... parquet parquet parquet rotten_tomatoes parquet parquet parquet ... ``` Here's a reproduction using GitHub Actions: https://github.com/mlflow/mlflow/actions/runs/8153247984/job/22284263613?pr=11329#step:12:241 One of our tests is flaky because `builder_name` is not deterministic. ### Steps to reproduce the bug 1. Run the code above. ### Expected behavior Always prints out `parquet`? ### Environment info ``` Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-1015-azure-x86_64-with-glibc2.34 - Python version: 3.8.18 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0 ```
101
Non-deterministic `Dataset.builder_name` value ### Describe the bug I'm not sure if this is a bug, but `print(ds.builder_name)` in the following code sometimes prints out `rotten_tomatoes` instead of `parquet`: ```python import datasets for _ in range(100): ds = datasets.load_dataset("rotten_tomatoes", split="train") print(ds.builder_name) # prints out "rotten_tomatoes" sometimes instead of "parquet" ``` Output: ``` ... parquet parquet parquet rotten_tomatoes parquet parquet parquet ... ``` Here's a reproduction using GitHub Actions: https://github.com/mlflow/mlflow/actions/runs/8153247984/job/22284263613?pr=11329#step:12:241 One of our tests is flaky because `builder_name` is not deterministic. ### Steps to reproduce the bug 1. Run the code above. ### Expected behavior Always prints out `parquet`? ### Environment info ``` Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-1015-azure-x86_64-with-glibc2.34 - Python version: 3.8.18 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0 ``` Hi ! This behavior happens because the dataset was originakky created using a dataset script [rotten_tomatoes.py](https://huggingface.co/datasets/rotten_tomatoes/blob/26f40d324d7b281d8b3fb1c47f30f8b9957f206b/rotten_tomatoes.py) and because we added features recently allowing to download the dataset directly from Parquet files (parquet builder) without running the dataset script (rotten_tomatoes). The flakiness must come from the availability of the Parquet files (we automatically export them in the refs/convert/parquet branch and we recently had to move some files). Anyway the easy fix on our side is to remove the dataset script completely, let me open a PR at https://huggingface.co/datasets/rotten_tomatoes EDIT: opened https://huggingface.co/datasets/rotten_tomatoes/discussions/6, feel free to comment there if you're ok with that change
[ -0.24925094842910767, 0.21260401606559753, 0.009089574217796326, 0.21066243946552277, 0.33882153034210205, -0.12109746038913727, 0.4286492168903351, 0.11134427785873413, -0.09090885519981384, 0.46540772914886475, 0.2518562972545624, 0.6261516213417053, -0.015683650970458984, 0.11358491331338882, 0.03431656211614609, 0.06231877580285072, 0.12284049391746521, -0.01973060518503189, 0.4004826843738556, -0.13392120599746704, -0.12834247946739197, -0.06035160273313522, -0.06393104791641235, 0.005689479410648346, -0.18749116361141205, 0.03144831955432892, -0.009070569649338722, -0.15465471148490906, 0.06534834951162338, -0.35397639870643616, 0.27888840436935425, 0.018947724252939224, -0.19414246082305908, 0.46127352118492126, -0.00012476609845180064, -0.017913706600666046, 0.47325390577316284, -0.027024511247873306, -0.3241056203842163, -0.47478824853897095, 0.02337934821844101, -0.038277097046375275, 0.27045944333076477, -0.5285208821296692, -0.2971230447292328, 0.01492004282772541, 0.14668123424053192, -0.1964949369430542, -0.23857106268405914, 0.23030798137187958, 0.11396905779838562, 0.1187339723110199, -0.05625174567103386, 0.0891663208603859, 0.13126757740974426, 0.15215829014778137, -0.23843881487846375, 0.024697180837392807, 0.21092888712882996, 0.22415314614772797, -0.12799042463302612, 0.2334432303905487, 0.060991063714027405, 0.09774096310138702, 0.23091819882392883, 0.35688576102256775, 0.7376146912574768, -0.25284135341644287, 0.3024711012840271, 0.42560020089149475, 0.2573239207267761, -0.2782982289791107, -0.08587141335010529, -0.4525851011276245, 0.11524204164743423, -0.07912719994783401, 0.12903739511966705, 0.14176437258720398, -0.2802272140979767, -0.09578678011894226, 0.009144281968474388, 0.10282137989997864, -0.029268458485603333, 0.15891481935977936, -0.03658824786543846, 0.6339719295501709, -0.1218661218881607, 0.2579353153705597, -0.24131552875041962, -0.03959338366985321, 0.3606562912464142, -0.4719671905040741, -0.025237832218408585, -0.207407146692276, -0.14760170876979828, -0.05737511068582535, 0.005951724946498871, 0.12687921524047852, -0.1997106373310089, -0.03291112184524536, 0.054348018020391464, -0.12195237725973129, 0.2674803137779236, 0.022935304790735245, 0.22500592470169067, -0.055670615285634995, 0.12856683135032654, 0.21772897243499756, 0.08178993314504623, 0.3237445652484894, 0.08202357590198517, 0.08189810812473297, 0.16215598583221436, -0.21355485916137695, 0.24843694269657135, -0.3012641668319702, 0.5828657746315002, -0.11877086758613586, -0.4029502272605896, 0.1600973904132843, -0.20407435297966003, 0.13177382946014404, 0.22889786958694458, 0.36584311723709106, -0.28281474113464355, 0.010737989097833633, -0.28601545095443726, 0.2632646858692169, 0.02714156173169613, -0.2626025974750519, -0.24697686731815338, -0.09910915791988373, -0.3563636541366577, -0.4441119432449341, -0.04075207933783531, -0.12071757018566132, 0.06173472851514816, 0.31404078006744385, 0.08894878625869751, -0.3243226408958435, -0.29009944200515747, -0.18497887253761292, 0.06069774925708771, 0.10335791110992432, -0.33549872040748596, 0.13902083039283752, -0.004806689918041229, -0.48733973503112793, -0.14839252829551697, 0.11067264527082443, -0.1366371512413025, -0.08661459386348724, -0.05878803879022598, 0.057451874017715454, -0.11111192405223846, -0.048570819199085236, -0.18494892120361328, 0.3081839382648468, 0.25449222326278687, 0.2874143719673157, 0.08312417566776276, -0.2376887947320938, -0.17238114774227142, -0.1803058683872223, 0.1272958517074585, 0.22336560487747192, -0.12017536163330078, -0.024366505444049835, -0.22496731579303741, 0.10801297426223755, 0.2784463167190552, -0.059091273695230484, -0.0050173671916127205, 0.031749118119478226, -0.024354733526706696, -0.4016817808151245, 0.2571524381637573, -0.016738003119826317, 0.00862196832895279, 0.26003482937812805, -0.1012195497751236, 0.2931949198246002, 0.19813713431358337, 0.012227633036673069, 0.11026693880558014, 0.0031280643306672573, 0.06936412304639816, 0.02026260457932949, 0.11011499166488647, -0.058926742523908615, -0.13635462522506714, -0.33971378207206726, 0.13416564464569092, 0.07886889576911926, 0.19004926085472107, 0.12946520745754242, -0.14211061596870422, -0.12619754672050476, 0.34375375509262085, -0.020440924912691116, -0.13128803670406342, -0.11568936705589294, 0.5027207136154175, 0.42775070667266846, -0.035964518785476685, -0.2730417549610138, -0.41549888253211975, 0.22915565967559814, -0.06985072791576385, -0.0934048444032669, -0.14014695584774017, -0.2180035263299942, -0.0690053179860115, 0.24301673471927643, -0.03684341534972191, -0.03907136246562004, 0.0548662468791008, 0.4513595700263977, 0.02515590935945511, 0.18133600056171417, -0.08769430965185165, -0.04424110800027847, -0.31215739250183105, 0.09812881797552109, -0.28424951434135437, 0.3440419137477875, 0.28706657886505127, -0.2143082320690155, -0.1572030931711197, 0.20599773526191711, 0.3173970878124237, -0.16391102969646454, 0.003683206159621477, 0.5394421219825745, -0.08228699117898941, 0.2782672345638275, -0.23182809352874756, 0.10850242525339127, 0.031088538467884064, 0.12904027104377747, 0.16735577583312988, 0.3691149652004242, -0.009683797135949135, 0.0144362673163414, 0.2349587380886078, 0.5687466859817505, -0.016593512147665024, 0.4062075912952423, -0.34788209199905396, -0.09447761625051498, 0.13472294807434082, -0.07075975835323334, -0.0478179007768631, -0.207334965467453, 0.2636686861515045, -0.2194189727306366, 0.38550230860710144, -0.000835781916975975, -0.6831137537956238, 0.003501713275909424, 0.22123251855373383, -0.11195848882198334, -0.11643979698419571, -0.05632872134447098, 0.060358721762895584, -0.014045114628970623, -0.006533367559313774, 0.36668363213539124, 0.21349859237670898, 0.15822719037532806, -0.16507820785045624, -0.05835374444723129, -0.5197489261627197, -0.23496085405349731, 0.2771228849887848, 0.30189141631126404, 0.040452804416418076, 0.14994272589683533, 0.3423803746700287, -0.1601690948009491, -0.5776535868644714, -0.03808116540312767, 0.22599641978740692, -0.007478082552552223, -0.19965815544128418, 0.368844598531723, -0.18323437869548798, 0.12560468912124634, -0.52176433801651, -0.03543874993920326, -0.2833520472049713, -0.4037531912326813, 0.0028497669845819473, 0.403621107339859, -0.19945085048675537, 0.2367306649684906, 0.15885424613952637, 0.12641972303390503, -0.3038904368877411, -0.3481788635253906, -0.47605401277542114, -0.14725534617900848, -0.2907470464706421, -0.061698947101831436, 0.008022026158869267, -0.10029378533363342, 0.23950232565402985, -0.19780579209327698, -0.16695494949817657, -0.40409183502197266, -0.4878082573413849, 0.15450552105903625, -0.13690602779388428, 0.5409203767776489, 0.2107158899307251, -0.08241841197013855, 0.40564513206481934, -0.11762645095586777, 0.3097379803657532, -0.006791325286030769, 0.21357467770576477, 0.09886854887008667, 0.06546027958393097, -0.10779742151498795, 0.03729667887091637, -0.06978064030408859, -0.07806172221899033, 0.04397713020443916, 0.04251502454280853, 0.09372791647911072, -0.08348391950130463, -0.009660017676651478, -0.0753452405333519, -0.10118969529867172, -0.1568651646375656, 0.26693928241729736, -0.25434207916259766, -0.16016584634780884, 0.1362491250038147, 0.17130102217197418, 0.09717197716236115, -0.24766843020915985, -0.125302255153656, -0.02708006277680397, -0.24551482498645782, -0.5923589468002319, 0.13387303054332733, -0.22005358338356018, 0.10810491442680359, 0.1881897896528244, -0.21913468837738037, 0.12095422297716141, -0.05216461792588234, 0.05813184380531311, -0.05854082107543945, -0.20875252783298492, 0.16405238211154938, 0.17753922939300537, 0.41269543766975403, 0.24770653247833252, 0.2678317427635193, -0.06664237380027771, 0.28784793615341187, 0.007918128743767738, -0.5220822095870972, 0.11559823155403137, -0.2937239408493042, 0.421349436044693, -0.1809481978416443, -0.1511172205209732, 0.04492849484086037, 0.08145630359649658, -0.2999565601348877, 0.14619596302509308, -0.3621223568916321, -0.009519321843981743, -0.0238040778785944, 0.24972012639045715, 0.1879468858242035, -0.3765547275543213, -0.08522630482912064, -0.3398067355155945, -0.2513885796070099, 0.27790936827659607, 0.42390409111976624, -0.017792265862226486, -0.37540796399116516, -0.13192395865917206, 0.28863877058029175, -0.17920765280723572, -0.06708208471536636, 0.07434093952178955, 0.1864256113767624, -0.5221875309944153, 0.16292749345302582, -0.30517899990081787, 0.03237723559141159, 0.04155176505446434, 0.09297557920217514, 0.3876621127128601, 0.013262303546071053, 0.7522671222686768, -0.21636587381362915, 0.4243699312210083, 0.056912120431661606, -0.22114093601703644, -0.00007706135511398315, -0.33570224046707153, -0.5203736424446106, 0.008446559309959412, 0.29935669898986816, 0.357157438993454, -0.505115270614624, -0.19882594048976898, 0.31033554673194885, -0.11071086674928665, -0.11963975429534912, -0.2890486717224121, -0.38616231083869934, 0.2776724398136139, 0.017382578924298286, 0.26227447390556335, 0.016263766214251518, 0.4208122193813324, 0.005492382682859898, 0.027761351317167282, -0.2795807719230652, 0.1664104461669922, 0.20154958963394165, 0.1835743635892868, 0.23326173424720764, -0.10154979676008224, 0.08581651747226715, 0.116670161485672, 0.5616781711578369, 0.3148989677429199, 0.21440787613391876, -0.12854310870170593, -0.5374363660812378, 0.006805244833230972, -0.16407889127731323, 0.4166029691696167, 0.5471891164779663, -0.20938467979431152, -0.2852102518081665, -0.134690523147583, 0.46757280826568604, -0.4437640905380249, 0.07100089639425278, 0.6279240846633911, 0.17268191277980804, -0.21670043468475342, -0.4845283627510071, 0.47533437609672546, -0.17090879380702972, -0.20731505751609802, 0.2569228410720825, 0.04247567802667618, -0.5054795742034912, 0.5529572367668152, 0.2199465036392212, 0.9449259042739868, 0.05607612058520317, 0.02718105912208557, 0.1199445128440857, -0.12477510422468185, 0.2514280080795288, -0.042680613696575165, -0.02545810490846634, -0.5163856148719788, 0.079881951212883, 0.0718708261847496, -0.030633829534053802, 0.3240552842617035, 0.34653764963150024, -0.02520401030778885, 0.5219979286193848, -0.07355459034442902, 0.5485929250717163, -0.07804472744464874, 0.13571086525917053, 0.012321781367063522, -0.06797166168689728, -0.258092999458313, -0.010218622162938118, 0.10946045815944672, 0.15321384370326996, -0.015204585157334805, -0.01844157464802265, 0.13978813588619232, -0.21425139904022217, -0.26289451122283936, -0.006645839661359787, -0.23718757927417755, -0.06791181117296219, 0.4214894473552704, -0.31862401962280273, -0.06486152112483978, 0.2616054117679596, 0.23321330547332764, 0.3455979526042938, -0.1404295563697815, 0.2687194049358368, 0.45399174094200134, 0.21417354047298431, 0.12201210111379623, -0.11941777914762497, 0.2603234350681305, 0.29611140489578247, -0.26022884249687195, -0.01004837453365326, -0.18506227433681488, -0.1313306838274002, -0.06956781446933746, -0.09717129170894623, 0.19622276723384857, -0.30237671732902527, -0.11323003470897675, -0.20350298285484314, 0.06242630258202553, -0.18646852672100067, 0.0503191314637661, -0.06450329720973969, -0.13565300405025482, -0.05005926638841629, -0.2309197038412094, -0.5487256050109863, -0.2818271517753601, 0.12179102003574371, -0.01275898888707161, 0.2261008620262146, 0.20979662239551544, -0.2341350018978119, -0.14313212037086487, -0.1792689561843872, -0.02115633338689804, -0.059068333357572556, -0.32932400703430176, 0.27696794271469116, 0.028161149471998215, -0.20115850865840912, 0.14138153195381165, 0.05022679641842842, 0.07966911792755127, 0.26457253098487854, -0.3577686548233032, -0.3486384153366089, 0.2841997444629669, -0.08212783932685852, 0.2939912974834442, 0.30439236760139465, 0.04831859469413757, 0.3480920195579529, -0.13733384013175964, -0.24224331974983215, -0.20780742168426514, -0.09196174144744873, -0.05337667465209961, 0.353544145822525, -0.3030794858932495, 0.22945773601531982, 0.1444266140460968, -0.021564871072769165, 0.10266627371311188, -0.06739796698093414, -0.08914706856012344, -0.1237502321600914, -0.2709844708442688, 0.15570533275604248, 0.05006447434425354, 0.4013238549232483, -0.27866873145103455, -0.2830030918121338, -0.28002282977104187, -0.3350899815559387, 0.18873801827430725, 0.18502679467201233, 0.08317805826663971, 0.008294488303363323, 0.5381981730461121, 0.21929115056991577, 0.05639885365962982, -0.12336264550685883, -0.2754925787448883, 0.2409486323595047, -0.14225368201732635, 0.3171263039112091, -0.2853609621524811, 0.15039922297000885, -0.12614122033119202, 0.04440000280737877, -0.3944970369338989, 0.15404745936393738, 0.2085801362991333, -0.12753085792064667, -0.05973309651017189, 0.06705305725336075, 0.377730131149292, 0.6362401843070984, -0.09383982419967651, -0.6033254265785217, 0.11987686157226562, 0.08749441802501678, -0.25131455063819885, 0.04965018481016159, -0.03049546107649803, 0.28621140122413635, 0.23221954703330994, 0.4258187413215637, 0.12585358321666718, 0.11715701222419739, -0.416694700717926, -0.020055707544088364, 0.46345651149749756, -0.35973918437957764, 0.27744728326797485, 0.49711665511131287, 0.08189523220062256, 0.32433050870895386, 0.5223720669746399, 0.06641045957803726, -0.28236785531044006, 0.6557295322418213, 0.26281097531318665, 0.06797151267528534, 0.14147689938545227, -0.01748942956328392, 0.1929679811000824, 0.2972955107688904, 0.18527305126190186, 0.5735917687416077, -0.24501654505729675, 0.29240894317626953, 0.04309508576989174, 0.24011832475662231, -0.2667815685272217, -0.008664317429065704, -0.6847215294837952, -0.036307815462350845, -0.22722452878952026, -0.2860979437828064, -0.23935683071613312, -0.25260892510414124, -0.17877769470214844, 0.070487380027771, -0.05787118896842003, 0.032855886965990067, -0.005092427134513855, 0.059838756918907166, 0.142425537109375, -0.5411024689674377, 0.025912821292877197, -0.23788106441497803, 0.3043253719806671, -0.3745904564857483, 0.3717758357524872, -0.049098268151283264, -0.11086751520633698, 0.14222374558448792, 0.15376165509223938, 0.4056461751461029, 0.21413855254650116, -0.03470863774418831, -0.012989536859095097, -0.09942199289798737, 0.01521570049226284, 0.018368016928434372, 0.1958729475736618, -0.003453560173511505, 0.02043960429728031, 0.540587306022644, 0.049222253262996674, -0.060539502650499344, 0.043297745287418365, 0.3499869704246521, 0.4375646710395813, -0.32276004552841187, 0.7568850517272949, 0.07314877212047577, 0.20552727580070496, -0.16579695045948029, 0.029661573469638824, -0.36086323857307434, -0.3163616955280304, 0.1578328013420105, -0.1789228469133377, 0.06685320287942886, -0.0819697231054306, 0.004098270088434219, -0.16408473253250122, 0.38236308097839355, -0.12265641987323761, -0.21306690573692322, -0.27926966547966003, 0.02231719344854355, -0.5152794122695923, 0.24549436569213867, -0.13783517479896545, -0.08250513672828674, 0.21084992587566376, 0.1388620138168335, 0.020918913185596466, 0.14487552642822266, 0.18889561295509338, 0.1451234370470047, -0.37045326828956604, 0.2658418118953705, -0.26477697491645813, -0.08515626192092896, -0.24420501291751862, 0.012457547709345818, 0.23579826951026917, -0.1788361370563507, 0.14199957251548767, -0.13774657249450684, -0.16656307876110077, 0.03404291346669197, 0.13365021347999573, 0.2255648970603943, -0.039546966552734375, 0.002065993845462799, -0.15021076798439026, 0.04170846939086914, -0.02389366179704666, -0.15199023485183716, -0.15194545686244965, -0.17548373341560364, -0.4140925109386444, 0.5986908078193665, -0.09895175695419312, 0.12287025153636932, -0.10481257736682892, 0.008924037218093872, -0.0843283087015152, 0.3037787973880768, 0.23540912568569183, -0.3152649700641632, -0.43231600522994995, -0.07872436940670013, -0.11098197102546692, 0.22406014800071716, -0.07871147245168686, 0.234066903591156, 0.01929958164691925, 0.3067072331905365, 0.12632127106189728, -0.4262339770793915, 0.6057064533233643, -0.2900063693523407, -0.5191894769668579, -0.30770230293273926, 0.12783023715019226, 0.08705518394708633, -0.07740707695484161, -0.42097437381744385, 0.0385257825255394, 0.23422621190547943, -0.06248748302459717, 0.10120101273059845, -0.11618578433990479, -0.09263615310192108, 0.21509195864200592, -0.19734270870685577, 0.05975313112139702, 0.22688376903533936, -0.08224724978208542, 0.12025587260723114, -0.38515669107437134 ]
https://github.com/huggingface/datasets/issues/6716
Non-deterministic `Dataset.builder_name` value
> we automatically export them in the refs/convert/parquet branch When this operation is in progress, the parquet files become temporarily unavailable?
### Describe the bug I'm not sure if this is a bug, but `print(ds.builder_name)` in the following code sometimes prints out `rotten_tomatoes` instead of `parquet`: ```python import datasets for _ in range(100): ds = datasets.load_dataset("rotten_tomatoes", split="train") print(ds.builder_name) # prints out "rotten_tomatoes" sometimes instead of "parquet" ``` Output: ``` ... parquet parquet parquet rotten_tomatoes parquet parquet parquet ... ``` Here's a reproduction using GitHub Actions: https://github.com/mlflow/mlflow/actions/runs/8153247984/job/22284263613?pr=11329#step:12:241 One of our tests is flaky because `builder_name` is not deterministic. ### Steps to reproduce the bug 1. Run the code above. ### Expected behavior Always prints out `parquet`? ### Environment info ``` Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-1015-azure-x86_64-with-glibc2.34 - Python version: 3.8.18 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0 ```
21
Non-deterministic `Dataset.builder_name` value ### Describe the bug I'm not sure if this is a bug, but `print(ds.builder_name)` in the following code sometimes prints out `rotten_tomatoes` instead of `parquet`: ```python import datasets for _ in range(100): ds = datasets.load_dataset("rotten_tomatoes", split="train") print(ds.builder_name) # prints out "rotten_tomatoes" sometimes instead of "parquet" ``` Output: ``` ... parquet parquet parquet rotten_tomatoes parquet parquet parquet ... ``` Here's a reproduction using GitHub Actions: https://github.com/mlflow/mlflow/actions/runs/8153247984/job/22284263613?pr=11329#step:12:241 One of our tests is flaky because `builder_name` is not deterministic. ### Steps to reproduce the bug 1. Run the code above. ### Expected behavior Always prints out `parquet`? ### Environment info ``` Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-1015-azure-x86_64-with-glibc2.34 - Python version: 3.8.18 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0 ``` > we automatically export them in the refs/convert/parquet branch When this operation is in progress, the parquet files become temporarily unavailable?
[ -0.1934543401002884, 0.1554976999759674, -0.03498044237494469, 0.180550217628479, 0.3152754306793213, -0.14966288208961487, 0.3927195370197296, 0.1072780042886734, -0.09653156995773315, 0.5031201839447021, 0.3391696810722351, 0.6630303859710693, -0.0015267273411154747, 0.13191020488739014, -0.035516344010829926, 0.025262482464313507, 0.16476236283779144, 0.00025898218154907227, 0.40811866521835327, -0.22251427173614502, -0.1377055048942566, -0.046448320150375366, -0.04575810953974724, -0.00733986496925354, -0.11391858756542206, -0.05982372164726257, 0.0041306037455797195, -0.23140650987625122, -0.003694409504532814, -0.31775084137916565, 0.16737398505210876, -0.0021175816655158997, -0.18651384115219116, 0.3914986550807953, -0.00012311560567468405, -0.004328101873397827, 0.41213542222976685, 0.0022109486162662506, -0.32870686054229736, -0.48702144622802734, -0.07200488448143005, -0.0827680453658104, 0.2514105439186096, -0.5133680701255798, -0.24186214804649353, -0.08324509859085083, 0.1159186139702797, -0.20705869793891907, -0.22627295553684235, 0.21845369040966034, 0.12259392440319061, 0.05872219800949097, -0.02672773227095604, 0.060383446514606476, 0.13665983080863953, 0.0697268471121788, -0.21358554065227509, 0.045865949243307114, 0.2878139615058899, 0.20231059193611145, -0.06915652006864548, 0.2635143995285034, 0.09667295217514038, 0.1409376561641693, 0.2187793254852295, 0.37889108061790466, 0.8458388447761536, -0.28255409002304077, 0.2783917784690857, 0.3454512655735016, 0.22242280840873718, -0.2127024233341217, -0.09733769297599792, -0.45714887976646423, 0.10510755330324173, -0.09381049126386642, 0.12365169078111649, 0.15352793037891388, -0.2679440975189209, -0.09851634502410889, 0.018047146499156952, 0.04655280336737633, -0.04151993617415428, 0.20799103379249573, -0.05123157426714897, 0.5833808779716492, -0.11622269451618195, 0.2083582580089569, -0.29298868775367737, -0.09890854358673096, 0.40100741386413574, -0.4839521050453186, 0.019092774018645287, -0.2183888703584671, -0.14297591149806976, -0.05303501337766647, 0.04116765409708023, 0.041926395148038864, -0.26742154359817505, -0.017841637134552002, 0.0897599533200264, -0.15185752511024475, 0.2769591212272644, 0.0987667366862297, 0.2056048959493637, -0.08461159467697144, 0.07623646408319473, 0.27562955021858215, 0.04505334794521332, 0.26598435640335083, 0.022487569600343704, 0.038497522473335266, 0.16240918636322021, -0.1736990511417389, 0.20367248356342316, -0.2865685224533081, 0.5891327261924744, -0.1539766937494278, -0.4699071943759918, 0.19750577211380005, -0.2463965117931366, 0.1268766224384308, 0.19514194130897522, 0.36124008893966675, -0.25469040870666504, 0.01859355717897415, -0.22982922196388245, 0.21100367605686188, 0.02410583384335041, -0.29843950271606445, -0.23750609159469604, -0.12536686658859253, -0.37356722354888916, -0.48300379514694214, -0.09036605060100555, -0.11422109603881836, 0.04804462939500809, 0.3063957393169403, 0.06306658685207367, -0.31439757347106934, -0.2385615110397339, -0.23328880965709686, 0.07033760845661163, 0.0911303460597992, -0.3672458529472351, 0.075996033847332, 0.024732816964387894, -0.4832010269165039, -0.14918553829193115, 0.08351686596870422, -0.15824073553085327, -0.00455012172460556, -0.10669644176959991, 0.08066494762897491, -0.001736404374241829, -0.10663756728172302, -0.13635629415512085, 0.31640538573265076, 0.24120572209358215, 0.28626471757888794, 0.04460958018898964, -0.19999833405017853, -0.06941919028759003, -0.20464648306369781, 0.07890791445970535, 0.1078529953956604, -0.19416117668151855, 0.007812075316905975, -0.1440708190202713, 0.13178972899913788, 0.38757604360580444, -0.009227979928255081, -0.026261353865265846, 0.05189823731780052, 0.033066682517528534, -0.4260944724082947, 0.24209612607955933, 0.0538039468228817, 0.050389669835567474, 0.19747138023376465, -0.1172802597284317, 0.21100054681301117, 0.21080665290355682, -0.03246404230594635, 0.17004936933517456, -0.008476141840219498, 0.2080627828836441, -0.004664285108447075, 0.05692007392644882, -0.06490667909383774, -0.17566627264022827, -0.3364362418651581, 0.1534387767314911, 0.04679853096604347, 0.20974311232566833, 0.12678447365760803, -0.08714034408330917, -0.09204000234603882, 0.25693678855895996, -0.05709923431277275, -0.1669928878545761, -0.09143978357315063, 0.5683847069740295, 0.4392161965370178, -0.012625446543097496, -0.2720526158809662, -0.3844244182109833, 0.1823849081993103, -0.08739879727363586, -0.16569241881370544, -0.09747128188610077, -0.16840581595897675, -0.023705050349235535, 0.2561691999435425, 0.03018501028418541, -0.008174300193786621, 0.07711179554462433, 0.4038090705871582, -0.0037908684462308884, 0.17499874532222748, -0.13610932230949402, -0.06748763471841812, -0.4511827826499939, 0.057344865053892136, -0.1835194230079651, 0.4388720989227295, 0.26910340785980225, -0.2747933268547058, -0.10654952377080917, 0.17479653656482697, 0.3277180790901184, -0.1128716841340065, -0.041699204593896866, 0.4335729479789734, -0.08717505633831024, 0.331753134727478, -0.16433963179588318, 0.1466081589460373, 0.05131169781088829, 0.1524798423051834, 0.1842288225889206, 0.37950336933135986, -0.011185063049197197, 0.05378410220146179, 0.16352000832557678, 0.5517458319664001, 0.046025510877370834, 0.3876529633998871, -0.30889707803726196, -0.09783560037612915, 0.12713102996349335, -0.02710684761404991, 0.011894550174474716, -0.19598065316677094, 0.2887519299983978, -0.24699725210666656, 0.36698463559150696, -0.007512757554650307, -0.7597022652626038, 0.01973101496696472, 0.26650577783584595, -0.06002579629421234, -0.07953808456659317, -0.06839233636856079, 0.12812410295009613, 0.05292945355176926, 0.07229600101709366, 0.3791210949420929, 0.18739551305770874, 0.2029498964548111, -0.15735165774822235, -0.10840686410665512, -0.5080291628837585, -0.22839872539043427, 0.32610878348350525, 0.2789631485939026, 0.07516300678253174, 0.15490901470184326, 0.4111494719982147, -0.12948060035705566, -0.6118896007537842, 0.00012287497520446777, 0.23845240473747253, 0.011232124641537666, -0.15880326926708221, 0.42434680461883545, -0.23824234306812286, 0.0794885978102684, -0.5313687324523926, 0.020005352795124054, -0.24399009346961975, -0.39708930253982544, 0.04148491844534874, 0.3853515088558197, -0.23500511050224304, 0.2137645035982132, 0.21527007222175598, 0.19937944412231445, -0.267733633518219, -0.30748865008354187, -0.5078160762786865, -0.10736823081970215, -0.3536258935928345, -0.045338213443756104, 0.005390477366745472, -0.09318182617425919, 0.2634033262729645, -0.12361426651477814, -0.14483284950256348, -0.4815468490123749, -0.5451115965843201, 0.15836071968078613, -0.09714587032794952, 0.4710675776004791, 0.19183722138404846, -0.11706100404262543, 0.37143367528915405, -0.15380045771598816, 0.28585124015808105, -0.00009494833648204803, 0.18487699329853058, 0.040189266204833984, 0.025130491703748703, -0.10838276147842407, 0.008450854569673538, -0.13856878876686096, -0.10576444864273071, 0.017477966845035553, 0.04316945746541023, 0.09732815623283386, -0.0553327277302742, -0.08540777117013931, -0.05678796395659447, -0.10300203412771225, -0.12094354629516602, 0.21775035560131073, -0.25207361578941345, -0.18883424997329712, 0.1489311158657074, 0.16689662635326385, 0.05867451801896095, -0.2253810614347458, -0.0806674137711525, -0.049803826957941055, -0.21139638125896454, -0.5590961575508118, 0.1300312727689743, -0.22216284275054932, 0.07568436861038208, 0.1357220709323883, -0.18476258218288422, 0.07399369776248932, -0.040861282497644424, 0.010134013369679451, -0.08736082911491394, -0.13264994323253632, 0.14415942132472992, 0.27816203236579895, 0.48610928654670715, 0.20927581191062927, 0.23019477725028992, -0.03305704891681671, 0.30595657229423523, -0.021471882238984108, -0.5562137365341187, 0.14794038236141205, -0.23500633239746094, 0.3833850622177124, -0.13219484686851501, -0.14815253019332886, 0.10547064244747162, 0.10680942237377167, -0.36276775598526, 0.17298546433448792, -0.38243669271469116, -0.12814833223819733, 0.024264469742774963, 0.23789870738983154, 0.20471763610839844, -0.3970884680747986, -0.10828448832035065, -0.3399994373321533, -0.20224851369857788, 0.28058671951293945, 0.3732615113258362, -0.045212917029857635, -0.3078891932964325, -0.1605301797389984, 0.2022189199924469, -0.19349566102027893, -0.08036220818758011, 0.10670879483222961, 0.08302436023950577, -0.4770581126213074, 0.14863961935043335, -0.3561038672924042, 0.08424457162618637, -0.05642355605959892, 0.14700663089752197, 0.3946627378463745, 0.03067656420171261, 0.7246502041816711, -0.25166481733322144, 0.3740881085395813, 0.01932651177048683, -0.20114634931087494, 0.04921074956655502, -0.3265019655227661, -0.5831466317176819, 0.04651626944541931, 0.35792088508605957, 0.4217921495437622, -0.500059187412262, -0.23483143746852875, 0.30670544505119324, -0.15049496293067932, -0.09559668600559235, -0.23887477815151215, -0.4091826379299164, 0.2933467924594879, -0.06549987941980362, 0.3118359446525574, 0.05488712340593338, 0.44941964745521545, 0.012002072297036648, -0.06753759831190109, -0.31663572788238525, 0.18140104413032532, 0.2002076506614685, 0.22415651381015778, 0.22728335857391357, -0.11569767445325851, 0.05052737519145012, 0.0907021164894104, 0.585536003112793, 0.34762808680534363, 0.1820906102657318, -0.11537012457847595, -0.541212260723114, 0.07745255529880524, -0.17433419823646545, 0.45550742745399475, 0.5450895428657532, -0.24065841734409332, -0.23647308349609375, -0.15645603835582733, 0.524736762046814, -0.39489415287971497, 0.07281652092933655, 0.5539321899414062, 0.23582690954208374, -0.19847851991653442, -0.4524124264717102, 0.4805120527744293, -0.15810564160346985, -0.21690812706947327, 0.31293022632598877, 0.02502286434173584, -0.5073786973953247, 0.5770747065544128, 0.3067702651023865, 0.9431391358375549, 0.06983441114425659, -0.013807062059640884, 0.10859546065330505, -0.14842736721038818, 0.2759062647819519, -0.14905762672424316, -0.014442294836044312, -0.43713316321372986, 0.030772201716899872, 0.06434419006109238, -0.04729975014925003, 0.4001564383506775, 0.3606039881706238, -0.04377521574497223, 0.5318679213523865, -0.03777342289686203, 0.48167598247528076, -0.06834641098976135, 0.10489322245121002, -0.00484495609998703, -0.09015513956546783, -0.3033851981163025, 0.006585489958524704, 0.150098979473114, 0.10746963322162628, -0.06677302718162537, -0.03129135072231293, 0.14656054973602295, -0.2265663743019104, -0.2151283621788025, -0.025360750034451485, -0.23858830332756042, -0.045551083981990814, 0.42669329047203064, -0.3293864130973816, -0.0682864561676979, 0.24229796230793, 0.1981784701347351, 0.3389493525028229, -0.13392922282218933, 0.287008672952652, 0.421377032995224, 0.17976811528205872, 0.014922860078513622, -0.10132567584514618, 0.2281809002161026, 0.24967676401138306, -0.23409037292003632, -0.0016528144478797913, -0.20630040764808655, -0.10851354897022247, -0.1159687489271164, -0.06543999910354614, 0.1758045256137848, -0.22081369161605835, -0.08516213297843933, -0.17996802926063538, 0.027409788221120834, -0.18303444981575012, 0.07437530905008316, -0.077392578125, -0.15776373445987701, -0.027057401835918427, -0.1904946118593216, -0.5077699422836304, -0.23513810336589813, 0.0858343243598938, 0.04358291253447533, 0.23257219791412354, 0.206353098154068, -0.24007533490657806, -0.1839820295572281, -0.23142924904823303, -0.06712988764047623, -0.11629197001457214, -0.18446502089500427, 0.3076547086238861, -0.0749303549528122, -0.24933159351348877, 0.19405505061149597, 0.09758678078651428, 0.11060138791799545, 0.23869526386260986, -0.32996857166290283, -0.37133175134658813, 0.3032231628894806, -0.036966823041439056, 0.23029297590255737, 0.2833416759967804, 0.07719126343727112, 0.33559274673461914, -0.11915154755115509, -0.27444279193878174, -0.24032557010650635, -0.03988960385322571, -0.16023194789886475, 0.3808620274066925, -0.3636462390422821, 0.20835775136947632, 0.10620748996734619, -0.01852264627814293, 0.12041552364826202, -0.054089151322841644, -0.08538902550935745, -0.14328399300575256, -0.2776244580745697, 0.15188609063625336, 0.07973230630159378, 0.4793540835380554, -0.30617669224739075, -0.3060876131057739, -0.28617042303085327, -0.2769947350025177, 0.14722366631031036, 0.11655823141336441, 0.09903419017791748, -0.005976262968033552, 0.5419818162918091, 0.23928210139274597, 0.10737964510917664, -0.15909986197948456, -0.18639960885047913, 0.22630195319652557, -0.13920174539089203, 0.30049851536750793, -0.25868767499923706, 0.16614459455013275, -0.12370284646749496, 0.008714526891708374, -0.35727280378341675, 0.11562227457761765, 0.24949538707733154, -0.11319829523563385, -0.04528740048408508, 0.03917345777153969, 0.28655120730400085, 0.6073454022407532, -0.13446959853172302, -0.5275588631629944, 0.1745419204235077, 0.1260880082845688, -0.2540048658847809, 0.0031674024648964405, -0.01836981251835823, 0.3316825032234192, 0.23970842361450195, 0.3676303029060364, 0.1832447648048401, 0.06956195831298828, -0.4123409390449524, 0.00877462886273861, 0.4073244333267212, -0.41441571712493896, 0.27188730239868164, 0.4564617872238159, 0.10135520994663239, 0.3416091203689575, 0.4819471836090088, 0.05166700482368469, -0.2992303669452667, 0.69642174243927, 0.3165190517902374, 0.09292712062597275, 0.21383565664291382, -0.004192005842924118, 0.18207593262195587, 0.3227687478065491, 0.21454502642154694, 0.609259843826294, -0.1761179268360138, 0.32124269008636475, 0.07512534409761429, 0.12589195370674133, -0.1864609271287918, -0.03569446876645088, -0.6091753840446472, 0.004166092723608017, -0.21626228094100952, -0.21353034675121307, -0.2631620168685913, -0.25605952739715576, -0.11719280481338501, 0.05167941376566887, -0.04215587303042412, 0.049333810806274414, -0.02261272817850113, 0.10368447005748749, 0.21031874418258667, -0.5938372611999512, 0.07831355929374695, -0.18400484323501587, 0.3566334843635559, -0.3629862666130066, 0.4005063474178314, -0.11866769194602966, -0.16566738486289978, 0.05420605465769768, 0.17972728610038757, 0.3554117679595947, 0.24983620643615723, -0.007641803473234177, -0.042026765644550323, -0.06009999290108681, -0.01257332880049944, 0.01261635310947895, 0.1971941888332367, 0.006673872470855713, 0.06679848581552505, 0.5244001150131226, 0.06872053444385529, -0.07333649694919586, 0.022282935678958893, 0.36915984749794006, 0.37071555852890015, -0.3008466064929962, 0.7592746019363403, 0.14414629340171814, 0.19126775860786438, -0.0743757039308548, -0.04084039479494095, -0.4123817980289459, -0.3013533651828766, 0.151068776845932, -0.15400031208992004, 0.07622842490673065, -0.019777487963438034, 0.017445508390665054, -0.1666998565196991, 0.32145750522613525, -0.1510390192270279, -0.18227064609527588, -0.27066218852996826, -0.052926141768693924, -0.4750986099243164, 0.2709054946899414, -0.18694686889648438, -0.047435082495212555, 0.29492512345314026, 0.2188405692577362, 0.06057211011648178, 0.15294933319091797, 0.2040146440267563, 0.15281078219413757, -0.40981176495552063, 0.317575067281723, -0.35884928703308105, -0.1179504543542862, -0.21259839832782745, -0.02538604848086834, 0.20085841417312622, -0.14820605516433716, 0.17438215017318726, -0.11736588180065155, -0.13831213116645813, -0.022478394210338593, 0.15727394819259644, 0.16743092238903046, 0.013001352548599243, 0.050533466041088104, -0.14357028901576996, -0.011947296559810638, -0.009807059541344643, -0.137616828083992, -0.09353366494178772, -0.240949347615242, -0.39295515418052673, 0.5738580226898193, -0.07926876842975616, 0.17681734263896942, -0.15009185671806335, -0.012323472648859024, -0.10598116368055344, 0.23900540173053741, 0.23135466873645782, -0.34611615538597107, -0.426242470741272, 0.03016444481909275, -0.04460888355970383, 0.25611013174057007, -0.13688282668590546, 0.24781185388565063, 0.04950986057519913, 0.2256728708744049, 0.09491467475891113, -0.382890909910202, 0.5741517543792725, -0.362319678068161, -0.5909324288368225, -0.27186575531959534, 0.136219322681427, 0.1542930006980896, -0.04722004383802414, -0.4494495093822479, -0.0023712366819381714, 0.2436499148607254, -0.0993175134062767, 0.13074073195457458, -0.1238599568605423, -0.024566777050495148, 0.20393149554729462, -0.1932656317949295, 0.03250134363770485, 0.18274885416030884, -0.11279945075511932, 0.13503412902355194, -0.45335614681243896 ]
https://github.com/huggingface/datasets/issues/6716
Non-deterministic `Dataset.builder_name` value
> When this operation is in progress, the parquet files become temporarily unavailable? Yes correct. I just merged the patch btw :)
### Describe the bug I'm not sure if this is a bug, but `print(ds.builder_name)` in the following code sometimes prints out `rotten_tomatoes` instead of `parquet`: ```python import datasets for _ in range(100): ds = datasets.load_dataset("rotten_tomatoes", split="train") print(ds.builder_name) # prints out "rotten_tomatoes" sometimes instead of "parquet" ``` Output: ``` ... parquet parquet parquet rotten_tomatoes parquet parquet parquet ... ``` Here's a reproduction using GitHub Actions: https://github.com/mlflow/mlflow/actions/runs/8153247984/job/22284263613?pr=11329#step:12:241 One of our tests is flaky because `builder_name` is not deterministic. ### Steps to reproduce the bug 1. Run the code above. ### Expected behavior Always prints out `parquet`? ### Environment info ``` Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-1015-azure-x86_64-with-glibc2.34 - Python version: 3.8.18 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0 ```
22
Non-deterministic `Dataset.builder_name` value ### Describe the bug I'm not sure if this is a bug, but `print(ds.builder_name)` in the following code sometimes prints out `rotten_tomatoes` instead of `parquet`: ```python import datasets for _ in range(100): ds = datasets.load_dataset("rotten_tomatoes", split="train") print(ds.builder_name) # prints out "rotten_tomatoes" sometimes instead of "parquet" ``` Output: ``` ... parquet parquet parquet rotten_tomatoes parquet parquet parquet ... ``` Here's a reproduction using GitHub Actions: https://github.com/mlflow/mlflow/actions/runs/8153247984/job/22284263613?pr=11329#step:12:241 One of our tests is flaky because `builder_name` is not deterministic. ### Steps to reproduce the bug 1. Run the code above. ### Expected behavior Always prints out `parquet`? ### Environment info ``` Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.18.0 - Platform: Linux-6.5.0-1015-azure-x86_64-with-glibc2.34 - Python version: 3.8.18 - `huggingface_hub` version: 0.21.3 - PyArrow version: 15.0.0 - Pandas version: 2.0.3 - `fsspec` version: 2024.2.0 ``` > When this operation is in progress, the parquet files become temporarily unavailable? Yes correct. I just merged the patch btw :)
[ -0.19868777692317963, 0.16390830278396606, -0.011938736774027348, 0.1808697134256363, 0.3105783462524414, -0.14799916744232178, 0.3661192059516907, 0.14003072679042816, -0.10239653289318085, 0.48863351345062256, 0.31423723697662354, 0.6664788722991943, -0.002230593003332615, 0.11151380091905594, -0.005350225605070591, 0.024750452488660812, 0.14573290944099426, 0.005420424044132233, 0.4139902889728546, -0.1986580640077591, -0.13024652004241943, -0.020436352118849754, -0.06365860998630524, 0.016215912997722626, -0.1512826830148697, -0.06016949564218521, -0.020042097195982933, -0.18321117758750916, 0.025074005126953125, -0.331550270318985, 0.15465806424617767, -0.016651701182127, -0.20503783226013184, 0.39948901534080505, -0.00012353953206911683, 0.0064523667097091675, 0.4269503951072693, 0.01690748892724514, -0.2994146943092346, -0.5026346445083618, -0.03455469757318497, -0.1039249449968338, 0.2520298957824707, -0.4919334948062897, -0.27789080142974854, -0.09870516508817673, 0.11915991455316544, -0.16878214478492737, -0.22448326647281647, 0.25589585304260254, 0.11676035821437836, 0.05660545080900192, -0.024976762011647224, 0.059145595878362656, 0.14281074702739716, 0.06442395597696304, -0.2277769148349762, 0.01962871104478836, 0.2801429033279419, 0.21543920040130615, -0.08066222816705704, 0.24391420185565948, 0.10008148849010468, 0.1380709409713745, 0.20946815609931946, 0.38244909048080444, 0.83442622423172, -0.26661592721939087, 0.27664247155189514, 0.37947916984558105, 0.2362244725227356, -0.2031020224094391, -0.0881575420498848, -0.45964372158050537, 0.121818907558918, -0.09987322986125946, 0.16530869901180267, 0.15192361176013947, -0.2523091435432434, -0.08780688047409058, 0.05446983873844147, 0.05691671743988991, -0.050316162407398224, 0.1739475429058075, -0.02748798206448555, 0.5857034921646118, -0.11569488793611526, 0.23032909631729126, -0.24261997640132904, -0.10784247517585754, 0.38368964195251465, -0.45240798592567444, -0.031207550317049026, -0.19543254375457764, -0.18130920827388763, -0.06070238724350929, 0.03316538780927658, 0.06082405894994736, -0.2549448609352112, -0.018068823963403702, 0.1134033277630806, -0.15407419204711914, 0.24024483561515808, 0.09377796947956085, 0.21153588593006134, -0.09850679337978363, 0.04548606649041176, 0.2755681872367859, 0.06746574491262436, 0.28224390745162964, 0.0584256537258625, 0.037121620029211044, 0.19733451306819916, -0.23949338495731354, 0.15901242196559906, -0.323242723941803, 0.569515585899353, -0.15961907804012299, -0.4485975205898285, 0.2120474874973297, -0.2077517807483673, 0.14346979558467865, 0.22150948643684387, 0.36061668395996094, -0.23713693022727966, -0.01483406126499176, -0.24804219603538513, 0.207418754696846, 0.04992315173149109, -0.2852747440338135, -0.24495470523834229, -0.09224027395248413, -0.3957762122154236, -0.46405553817749023, -0.06868825852870941, -0.11090078949928284, 0.04925756901502609, 0.3093378245830536, 0.07273905724287033, -0.31632789969444275, -0.2718612849712372, -0.2418285310268402, 0.052044373005628586, 0.13879677653312683, -0.3746245801448822, 0.07594158500432968, 0.009897366166114807, -0.4789249897003174, -0.18024155497550964, 0.09852790087461472, -0.16519740223884583, -0.019799616187810898, -0.10015256702899933, 0.062347471714019775, -0.030026353895664215, -0.08938033878803253, -0.11873691529035568, 0.3411613702774048, 0.24095559120178223, 0.24177128076553345, 0.07157694548368454, -0.19418005645275116, -0.09206529706716537, -0.19912487268447876, 0.06780306994915009, 0.12536948919296265, -0.18988677859306335, 0.008230730891227722, -0.14990057051181793, 0.14906449615955353, 0.35882508754730225, 0.014316648244857788, 0.0007051341817714274, 0.017486579716205597, 0.028880303725600243, -0.39036911725997925, 0.25769224762916565, 0.07687775790691376, 0.04035951942205429, 0.25535428524017334, -0.09865720570087433, 0.21818557381629944, 0.19802653789520264, -0.011817504651844501, 0.106325164437294, 0.004475356079638004, 0.1942199319601059, -0.004213102161884308, 0.09451869875192642, -0.09188767522573471, -0.17352673411369324, -0.33580777049064636, 0.14759892225265503, 0.0756261944770813, 0.1953546404838562, 0.10644875466823578, -0.10130205005407333, -0.12356448173522949, 0.24969908595085144, -0.04266514256596565, -0.14664342999458313, -0.08031805604696274, 0.5705474019050598, 0.42769867181777954, -0.001215506810694933, -0.2821590304374695, -0.3811277747154236, 0.21617940068244934, -0.10231993347406387, -0.15155518054962158, -0.09515130519866943, -0.18363334238529205, -0.021736226975917816, 0.2170684039592743, 0.033525124192237854, -0.04587530717253685, 0.062543123960495, 0.39680159091949463, -0.013321422040462494, 0.20919513702392578, -0.16958807408809662, -0.06830159574747086, -0.4199161231517792, 0.03074563853442669, -0.2043158859014511, 0.4306412935256958, 0.24193860590457916, -0.2819986641407013, -0.12510444223880768, 0.18462827801704407, 0.3071478605270386, -0.11743447184562683, -0.03747844323515892, 0.4893051087856293, -0.11562974005937576, 0.2786829471588135, -0.2027246356010437, 0.14694294333457947, 0.06997394561767578, 0.12047050893306732, 0.171005517244339, 0.3939308524131775, -0.02795441448688507, 0.0437057688832283, 0.1743924617767334, 0.5413745045661926, 0.02949153631925583, 0.37109363079071045, -0.3211554288864136, -0.10734523087739944, 0.17795269191265106, -0.048291150480508804, 0.012099998071789742, -0.16538718342781067, 0.323599636554718, -0.2279016226530075, 0.3664037883281708, -0.0265746358782053, -0.7681366205215454, -0.018097370862960815, 0.2659357786178589, -0.07192329317331314, -0.0633099153637886, -0.05945873260498047, 0.12605443596839905, 0.044028788805007935, 0.04327179491519928, 0.35357996821403503, 0.2061702013015747, 0.1830376237630844, -0.17481228709220886, -0.0776803195476532, -0.5113287568092346, -0.2311922162771225, 0.297462522983551, 0.25556665658950806, 0.07663900405168533, 0.1800113320350647, 0.3999377191066742, -0.12043438106775284, -0.617255687713623, -0.016817867755889893, 0.25846806168556213, 0.03045126423239708, -0.1804596185684204, 0.39831024408340454, -0.20704305171966553, 0.12416840344667435, -0.5022839903831482, 0.02038828656077385, -0.262032687664032, -0.37672778964042664, 0.055245235562324524, 0.4102385342121124, -0.22370018064975739, 0.24102595448493958, 0.19540448486804962, 0.2043907344341278, -0.28201061487197876, -0.32194846868515015, -0.5159963369369507, -0.10277708619832993, -0.3317890465259552, -0.045593101531267166, 0.012902255170047283, -0.08887497335672379, 0.22051434218883514, -0.10877876728773117, -0.14190031588077545, -0.4691840410232544, -0.5519753098487854, 0.14300554990768433, -0.11100628972053528, 0.4937097132205963, 0.19569066166877747, -0.10958188772201538, 0.3679754137992859, -0.13613879680633545, 0.2944968342781067, -0.04496076703071594, 0.1849542260169983, 0.07135210186243057, -0.004116952419281006, -0.11341685056686401, -0.03253189101815224, -0.13536593317985535, -0.08961551636457443, 0.0038674399256706238, 0.06483624130487442, 0.09654435515403748, -0.05569206178188324, -0.04687062278389931, -0.05168215557932854, -0.08758236467838287, -0.12878607213497162, 0.2113683968782425, -0.25804081559181213, -0.20467506349086761, 0.14755544066429138, 0.15144269168376923, 0.057027190923690796, -0.21924124658107758, -0.08755961060523987, -0.018323879688978195, -0.22692014276981354, -0.5666947364807129, 0.12649215757846832, -0.231068953871727, 0.07422128319740295, 0.10330910980701447, -0.24216674268245697, 0.10140587389469147, -0.07054449617862701, 0.006120102480053902, -0.06757955998182297, -0.13455542922019958, 0.16435280442237854, 0.30196401476860046, 0.474552720785141, 0.23431488871574402, 0.22013890743255615, -0.008014075458049774, 0.28330063819885254, -0.009270432405173779, -0.5160048007965088, 0.17174555361270905, -0.2605683207511902, 0.42381200194358826, -0.16824519634246826, -0.11519932001829147, 0.10079911351203918, 0.09986977279186249, -0.3612792491912842, 0.16371460258960724, -0.36113280057907104, -0.09216325730085373, 0.018900521099567413, 0.22392216324806213, 0.19391798973083496, -0.36027225852012634, -0.07788098603487015, -0.29491180181503296, -0.21067282557487488, 0.26185867190361023, 0.3661898374557495, -0.011237429454922676, -0.33729374408721924, -0.14491413533687592, 0.2553378641605377, -0.19191402196884155, -0.0928870141506195, 0.11686058342456818, 0.12312972545623779, -0.4927472472190857, 0.14481697976589203, -0.36537811160087585, 0.06076662987470627, -0.08278089761734009, 0.16736626625061035, 0.4108468294143677, 0.012233633548021317, 0.7363038659095764, -0.25576505064964294, 0.3845564126968384, 0.04981216415762901, -0.19756311178207397, 0.03269646316766739, -0.3415030539035797, -0.566444456577301, 0.03527484089136124, 0.35453352332115173, 0.4553501009941101, -0.4907159209251404, -0.22607336938381195, 0.2847547233104706, -0.19483673572540283, -0.10753844678401947, -0.2682417929172516, -0.41305413842201233, 0.2911047637462616, -0.06836377829313278, 0.2884228825569153, 0.06937418133020401, 0.4461827278137207, -0.005126203875988722, -0.06739430874586105, -0.29242467880249023, 0.1973789632320404, 0.18538784980773926, 0.22722622752189636, 0.22726517915725708, -0.1251833289861679, 0.060253892093896866, 0.1125524491071701, 0.5745706558227539, 0.316357284784317, 0.19518141448497772, -0.10490366816520691, -0.5443622469902039, 0.05255814269185066, -0.2134583592414856, 0.44535958766937256, 0.5338133573532104, -0.2588655948638916, -0.2268323302268982, -0.16100957989692688, 0.5093194246292114, -0.3993198573589325, 0.06991850584745407, 0.591454803943634, 0.2243114411830902, -0.20490798354148865, -0.4567371904850006, 0.49889659881591797, -0.1437850296497345, -0.21677327156066895, 0.2831701636314392, 0.04551336541771889, -0.49145686626434326, 0.5775341391563416, 0.2612587511539459, 0.9125350117683411, 0.05661851167678833, 0.015099208801984787, 0.10389067977666855, -0.1224728375673294, 0.29548317193984985, -0.10835111141204834, 0.013848409056663513, -0.46056240797042847, 0.007611594628542662, 0.04867579787969589, -0.04371153935790062, 0.40125828981399536, 0.3438236117362976, -0.0411791130900383, 0.5628538131713867, -0.03210616111755371, 0.4853350818157196, -0.0950324535369873, 0.06069157272577286, -0.012000437825918198, -0.06568720936775208, -0.2717527151107788, 0.008180007338523865, 0.11691250652074814, 0.12812440097332, -0.06011469289660454, -0.042730074375867844, 0.1448192149400711, -0.21380430459976196, -0.2209293246269226, -0.022805627435445786, -0.20487843453884125, -0.04980844259262085, 0.4554955065250397, -0.31810179352760315, -0.045201629400253296, 0.2245093137025833, 0.18591170012950897, 0.3243859112262726, -0.17839455604553223, 0.2998156249523163, 0.39806345105171204, 0.17228475213050842, 0.014741062186658382, -0.08661559969186783, 0.23743067681789398, 0.2586110234260559, -0.24460715055465698, -0.006257198750972748, -0.22540271282196045, -0.10114379972219467, -0.11208614706993103, -0.05810247361660004, 0.17976239323616028, -0.2141784280538559, -0.10790929198265076, -0.20268645882606506, 0.011473391205072403, -0.1776423454284668, 0.07426901161670685, -0.08046334981918335, -0.16355982422828674, -0.035082750022411346, -0.21671010553836823, -0.5163038969039917, -0.23692108690738678, 0.08632716536521912, 0.021980291232466698, 0.26295191049575806, 0.22376108169555664, -0.2572130262851715, -0.1567816436290741, -0.2239948809146881, -0.0807279720902443, -0.10402161628007889, -0.21979469060897827, 0.28963762521743774, -0.03513430804014206, -0.24017736315727234, 0.21301332116127014, 0.10246719419956207, 0.12583094835281372, 0.25316715240478516, -0.3320172429084778, -0.3598838448524475, 0.2892720401287079, -0.06127306818962097, 0.21762658655643463, 0.2855417728424072, 0.05119606852531433, 0.371554970741272, -0.10190360993146896, -0.27266010642051697, -0.23459191620349884, -0.020238669589161873, -0.16742265224456787, 0.36549827456474304, -0.35987770557403564, 0.22805649042129517, 0.11842884123325348, -0.00048821885138750076, 0.10493192076683044, -0.02801285684108734, -0.11184464395046234, -0.12584000825881958, -0.2710249722003937, 0.153335303068161, 0.11192066222429276, 0.4703197479248047, -0.30061715841293335, -0.3336687684059143, -0.30693450570106506, -0.27323436737060547, 0.1262146532535553, 0.13192549347877502, 0.09301126003265381, 0.0025146882981061935, 0.5410778522491455, 0.22619542479515076, 0.12465326488018036, -0.11391928791999817, -0.2062090039253235, 0.21514606475830078, -0.13797372579574585, 0.29024702310562134, -0.284833163022995, 0.17231488227844238, -0.1197633445262909, 0.013335086405277252, -0.35705137252807617, 0.1261158585548401, 0.23283177614212036, -0.11764299869537354, -0.056587621569633484, 0.010466726496815681, 0.32904693484306335, 0.5950737595558167, -0.10198742151260376, -0.5420757532119751, 0.1895151436328888, 0.11320562660694122, -0.2756859064102173, -0.005594721529632807, -0.016622409224510193, 0.3480150103569031, 0.23094651103019714, 0.33007434010505676, 0.19421768188476562, 0.056298524141311646, -0.4400888681411743, 0.03929796814918518, 0.4241994023323059, -0.4365728497505188, 0.23563873767852783, 0.448238730430603, 0.10535511374473572, 0.3231510519981384, 0.5166712403297424, 0.012015899643301964, -0.3042626976966858, 0.739916980266571, 0.2896573841571808, 0.06870868057012558, 0.18430060148239136, 0.007915638387203217, 0.18593594431877136, 0.3074592351913452, 0.17643308639526367, 0.6449723243713379, -0.17215532064437866, 0.30699723958969116, 0.07399190962314606, 0.13746531307697296, -0.18501286208629608, -0.03415307775139809, -0.6164272427558899, -0.008830573409795761, -0.22481200098991394, -0.22649601101875305, -0.24379962682724, -0.26442593336105347, -0.11801059544086456, 0.060868751257658005, -0.04046906903386116, 0.0732731744647026, 0.005936510860919952, 0.09057082235813141, 0.19171087443828583, -0.596305251121521, 0.049246493726968765, -0.1754755973815918, 0.3389408588409424, -0.36346736550331116, 0.391666978597641, -0.08969521522521973, -0.16974231600761414, 0.09188848733901978, 0.1705693006515503, 0.36399203538894653, 0.23395098745822906, -0.048972051590681076, -0.006065039895474911, -0.08483433723449707, 0.01165042631328106, 0.04038576781749725, 0.2198716402053833, 0.0286528542637825, 0.03615577146410942, 0.5304051041603088, 0.05283746123313904, -0.06397590041160583, 0.059180982410907745, 0.3443845510482788, 0.4076386094093323, -0.3384183943271637, 0.7609537243843079, 0.1257527619600296, 0.1786709427833557, -0.07673956453800201, -0.03109094500541687, -0.41543126106262207, -0.3096494972705841, 0.1658250391483307, -0.16111987829208374, 0.07944091409444809, -0.005428028292953968, 0.011874757707118988, -0.17246632277965546, 0.34813785552978516, -0.13218125700950623, -0.19841670989990234, -0.28083547949790955, -0.0503363311290741, -0.49672451615333557, 0.2847408950328827, -0.20639842748641968, -0.023574525490403175, 0.269659161567688, 0.21242038905620575, 0.016684889793395996, 0.0969155877828598, 0.2099107801914215, 0.17624099552631378, -0.3984736204147339, 0.30200397968292236, -0.3507886528968811, -0.10200551152229309, -0.25408995151519775, -0.015282543376088142, 0.20973190665245056, -0.12962403893470764, 0.17180684208869934, -0.1041632667183876, -0.14690229296684265, 0.00727798230946064, 0.15495000779628754, 0.1562148928642273, 0.03597771003842354, 0.0713990330696106, -0.15261580049991608, -0.006556607782840729, -0.028165481984615326, -0.1288120299577713, -0.09814783930778503, -0.2347644716501236, -0.38460803031921387, 0.5670613646507263, -0.06614679098129272, 0.17119981348514557, -0.15550196170806885, 0.03594456985592842, -0.10831128060817719, 0.25015583634376526, 0.2299433797597885, -0.34864526987075806, -0.4396938383579254, -0.0021589407697319984, -0.03305231034755707, 0.2594999074935913, -0.14263425767421722, 0.26060789823532104, 0.031173542141914368, 0.21353749930858612, 0.1097220927476883, -0.3975428640842438, 0.6340352296829224, -0.33675074577331543, -0.5807149410247803, -0.27295345067977905, 0.12751632928848267, 0.16034851968288422, -0.0349462553858757, -0.4269573390483856, -0.02056998759508133, 0.2340834140777588, -0.07850899547338486, 0.12774217128753662, -0.14366328716278076, -0.06226581707596779, 0.18276159465312958, -0.18943820893764496, 0.002736784517765045, 0.2231225073337555, -0.11409345269203186, 0.16079950332641602, -0.4583888649940491 ]
https://github.com/huggingface/datasets/issues/6703
Unable to load dataset that was saved with `save_to_disk`
`save_to_disk` uses a special serialization that can only be read using `load_from_disk`. Contrary to `load_dataset`, `load_from_disk` directly loads Arrow files and uses the dataset directory as cache. On the other hand `load_dataset` does a conversion step to get Arrow files from the raw data files (could be in JSON, CSV, Parquet etc.) and caches them in the `datasets` cache directory (default is `~/.cache/huggingface/datasets`). We haven't implemented any logic in `load_dataset` to support datasets saved with `save_to_disk` because they don't use the same cache. EDIT: note that you can save your dataset in Parquet format locally using `.to.parquet()` (make sure to shard in multiple files your dataset if it's multiple GBs - you can use `.shard()` + `.to_parquet()` to do that) and you'll be able to reload it using `load_dataset`
### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10
129
Unable to load dataset that was saved with `save_to_disk` ### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10 `save_to_disk` uses a special serialization that can only be read using `load_from_disk`. Contrary to `load_dataset`, `load_from_disk` directly loads Arrow files and uses the dataset directory as cache. On the other hand `load_dataset` does a conversion step to get Arrow files from the raw data files (could be in JSON, CSV, Parquet etc.) and caches them in the `datasets` cache directory (default is `~/.cache/huggingface/datasets`). We haven't implemented any logic in `load_dataset` to support datasets saved with `save_to_disk` because they don't use the same cache. EDIT: note that you can save your dataset in Parquet format locally using `.to.parquet()` (make sure to shard in multiple files your dataset if it's multiple GBs - you can use `.shard()` + `.to_parquet()` to do that) and you'll be able to reload it using `load_dataset`
[ -0.3033212721347809, -0.17909714579582214, 0.03819906339049339, 0.34951549768447876, 0.3152960538864136, 0.2354375422000885, 0.2196148782968521, 0.1704721301794052, 0.18181750178337097, -0.010524258017539978, -0.13490702211856842, 0.6075145602226257, -0.1159549281001091, 0.2557533383369446, 0.044273700565099716, -0.001202072948217392, 0.3010637164115906, 0.0760037824511528, 0.2428382933139801, 0.16404913365840912, -0.2857378125190735, 0.16935846209526062, 0.05043394863605499, -0.00047581642866134644, -0.03016715496778488, -0.07464451342821121, 0.04241336137056351, 0.35582706332206726, 0.09086406230926514, -0.490125447511673, 0.4619661867618561, -0.0799652487039566, 0.2857059836387634, 0.2503996193408966, -0.0001205135413329117, 0.11756670475006104, 0.21334892511367798, -0.2603472173213959, -0.372140109539032, -0.47647982835769653, -0.015785906463861465, -0.30162230134010315, 0.25371161103248596, -0.2566901743412018, -0.07268570363521576, 0.02710394561290741, -0.015494441613554955, -0.4060427248477936, 0.324807345867157, -0.03104333207011223, 0.1645933836698532, 0.3011293113231659, 0.030569110065698624, -0.2164735049009323, 0.18546172976493835, 0.07560841739177704, -0.2292512059211731, 0.28347814083099365, 0.24875126779079437, 0.21396735310554504, 0.0893736332654953, 0.023303696885704994, -0.12240514159202576, -0.03142280876636505, 0.3886353373527527, 0.15224765241146088, 0.09871537983417511, -0.23245343565940857, -0.14344251155853271, -0.049004003405570984, 0.6024249196052551, -0.3797018229961395, -0.47398409247398376, -0.4444204568862915, -0.1607855260372162, -0.24502864480018616, 0.26181814074516296, 0.05303136259317398, 0.06329305469989777, 0.0937427431344986, -0.0567648746073246, -0.4836876094341278, -0.05044157803058624, -0.034821733832359314, 0.11536093056201935, -0.06628891825675964, -0.08985882997512817, 0.12884311378002167, 0.2794940769672394, 0.08754965662956238, 0.2929038405418396, -0.0167289637029171, 0.005892857909202576, -0.005038204602897167, -0.2495652288198471, 0.051712118089199066, 0.2114773690700531, -0.13317015767097473, -0.004129812121391296, 0.3096751570701599, 0.022355418652296066, 0.14060786366462708, -0.2482142299413681, 0.0727531760931015, 0.24805711209774017, 0.3169404864311218, 0.11397701501846313, 0.09339647740125656, 0.12056071311235428, 0.15034720301628113, -0.06325282156467438, -0.15675202012062073, 0.03818680718541145, -0.015945108607411385, 0.42716529965400696, -0.08224020153284073, 0.19555966556072235, -0.14103272557258606, -0.2679816484451294, 0.01388570573180914, 0.09568443149328232, -0.01561032421886921, 0.011930006556212902, 0.22372835874557495, 0.0631440281867981, 0.06183410808444023, -0.09271983802318573, 0.40539807081222534, -0.11473021656274796, 0.16781890392303467, -0.17921768128871918, -0.17287321388721466, 0.050107043236494064, 0.11458586156368256, 0.24781189858913422, -0.605795681476593, 0.11241980642080307, 0.18869490921497345, -0.06097577512264252, -0.007659152150154114, 0.0070101432502269745, 0.04988998547196388, 0.23892107605934143, 0.04630107432603836, 0.19807952642440796, 0.26661136746406555, 0.35776180028915405, -0.3415268659591675, -0.383065402507782, 0.3397153317928314, -0.5891377925872803, -0.5421277284622192, -0.0039361622184515, 0.10075697302818298, -0.20676539838314056, -0.02824096381664276, -0.8525031805038452, -0.015146814286708832, -0.03814040869474411, -0.06662680208683014, -0.07579914480447769, 0.041322022676467896, -0.30414244532585144, -0.43742820620536804, 0.2480851113796234, 0.19090275466442108, -0.32810238003730774, 0.0905548632144928, -0.08579777181148529, -0.12093837559223175, 0.044877924025058746, 0.18381938338279724, -0.1982981115579605, 0.31262388825416565, -0.42402422428131104, 0.12572291493415833, 0.4819536507129669, -0.455765038728714, -0.5728471279144287, -0.040821373462677, -0.13356536626815796, 0.0843881368637085, -0.116518534719944, 0.13098783791065216, 0.2851068079471588, -0.09822725504636765, 0.2691482603549957, 0.3813914656639099, 0.0632275640964508, -0.007334329187870026, -0.23251228034496307, -0.18777254223823547, 0.20144987106323242, 0.11059165000915527, -0.29489216208457947, 0.24525487422943115, 0.15951113402843475, 0.10427390784025192, 0.07805565744638443, -0.12108460068702698, 0.12518849968910217, 0.2805292010307312, 0.2851203680038452, -0.135482057929039, -0.13380756974220276, -0.13525015115737915, -0.43059468269348145, 0.4052048921585083, 0.17411838471889496, -0.23417788743972778, 0.006605595350265503, -0.012606566771864891, -0.41383740305900574, -0.005756668746471405, -0.3619707524776459, 0.20597214996814728, -0.025137925520539284, 0.062083154916763306, 0.029887128621339798, -0.043954282999038696, -0.31959667801856995, 0.41007447242736816, -0.014638248831033707, -0.09388797730207443, -0.48414093255996704, 0.5314183235168457, 0.003885554149746895, -0.24741637706756592, -0.054700784385204315, 0.09839853644371033, 0.1974150538444519, -0.16077803075313568, -0.10913113504648209, 0.26825934648513794, 0.0385059230029583, 0.38126444816589355, -0.043531619012355804, 0.12145952880382538, 0.08475235849618912, -0.21693779528141022, 0.06290269643068314, 0.16969530284404755, 0.23754087090492249, -0.050205331295728683, -0.49093517661094666, 0.33505991101264954, -0.1266481578350067, 0.19830182194709778, -0.07899686694145203, -0.19737040996551514, 0.27524009346961975, -0.02651987597346306, 0.03639094531536102, -0.27353352308273315, -0.022448059171438217, -0.0329093262553215, 0.1806563436985016, -0.21377182006835938, -0.2681273818016052, 0.22632458806037903, 0.2586938440799713, 0.0703263133764267, 0.18527957797050476, 0.20870676636695862, 0.04294667765498161, -0.16925492882728577, -0.12275949120521545, 0.15757042169570923, 0.2602689266204834, 0.09960109740495682, 0.12207987159490585, 0.026447433978319168, -0.14595477283000946, 0.01357802003622055, 0.18012940883636475, -0.07796497642993927, 0.2424202859401703, 0.3940257132053375, 0.24616025388240814, -0.010107225738465786, -0.132359579205513, 0.20755180716514587, -0.005585283972322941, 0.12909966707229614, -0.44300228357315063, 0.14830365777015686, -0.240657240152359, 0.18026697635650635, -0.17974768579006195, -0.12938646972179413, -0.19368958473205566, -0.36946311593055725, -0.14711894094944, 0.7171939015388489, 0.04587247595191002, -0.02751312218606472, -0.2392454296350479, 0.17414405941963196, 0.018516818061470985, -0.3969123363494873, -0.09021322429180145, -0.05638384819030762, -0.07902941107749939, -0.0660630539059639, 0.22990736365318298, 0.09860705584287643, 0.43752026557922363, -0.24649204313755035, 0.19070017337799072, -0.5566310286521912, 0.0014802739024162292, 0.03590086102485657, -0.03762705624103546, 0.37793925404548645, 0.013511136174201965, 0.07445131987333298, -0.17008237540721893, -0.14869345724582672, 0.2944282293319702, -0.14814665913581848, -0.20726047456264496, 0.11260674893856049, -0.10160308331251144, 0.11215973645448685, 0.06187625601887703, -0.3141584098339081, -0.25130367279052734, -0.48721736669540405, 0.03242983669042587, -0.054308075457811356, 0.059648312628269196, -0.1522214114665985, -0.11993224918842316, 0.02732105925679207, 0.390491783618927, -0.17189191281795502, -0.2834010422229767, -0.41574564576148987, 0.4250112771987915, -0.15212510526180267, -0.14498944580554962, 0.09607166051864624, 0.008096560835838318, -0.1438872516155243, 0.06849434971809387, -0.4382449984550476, -0.1661584973335266, -0.07405214756727219, 0.14594320952892303, -0.2524976432323456, 0.15965873003005981, 0.15887100994586945, 0.23444537818431854, 0.042734600603580475, -0.033994853496551514, -0.42464005947113037, 0.06629565358161926, 0.4075494110584259, 0.11250737309455872, 0.11313457787036896, 0.291389524936676, -0.07988911867141724, 0.5140248537063599, 0.11253316700458527, 0.15969695150852203, 0.7093933820724487, 0.032404594123363495, 0.3878423273563385, -0.4505162537097931, -0.2993970513343811, -0.5022461414337158, -0.2857538163661957, -0.11463499069213867, -0.01015307754278183, 0.05849892646074295, -0.16249221563339233, 0.010810725390911102, -0.28331097960472107, -0.18345090746879578, -0.3754423260688782, 0.10901638120412827, -0.14032375812530518, 0.049304068088531494, -0.07657377421855927, 0.13303956389427185, -0.1805601716041565, -0.11018373817205429, 0.22623416781425476, 0.013808466494083405, 0.44162440299987793, -0.03791200369596481, -0.26878800988197327, -0.030239034444093704, -0.560675859451294, 0.040863752365112305, 0.07360206544399261, 0.3060607612133026, 0.11053301393985748, -0.11821112781763077, 0.08315204828977585, -0.08789005875587463, 0.8583545088768005, -0.2282657027244568, 0.4205473065376282, 0.4639606773853302, -0.01586207002401352, -0.6227379441261292, -0.00040907785296440125, 0.07876251637935638, 0.3342357277870178, -0.3553623855113983, 0.9103533625602722, -0.1705722212791443, -0.13065636157989502, -0.40610381960868835, 0.4914098083972931, -0.2879960536956787, -0.09593342989683151, -0.15006937086582184, -0.24465417861938477, -0.48295828700065613, -0.013356156647205353, -0.01654118299484253, 0.31651246547698975, -0.03481157124042511, 0.14074109494686127, -0.3195590674877167, -0.02908560447394848, -0.06542859971523285, -0.19236916303634644, 0.6654826402664185, 0.03954613208770752, 0.3421429991722107, 0.26278233528137207, 0.12010432034730911, 0.17645661532878876, 0.7882404327392578, -0.15099568665027618, -0.20079520344734192, -0.056580349802970886, 0.1989767700433731, -0.0858222022652626, 0.17037251591682434, 0.14303497970104218, 0.040095388889312744, -0.14071719348430634, -0.17877553403377533, -0.5496332049369812, -0.1036398634314537, -0.22620801627635956, -0.1576155722141266, -0.33634641766548157, -0.2229224145412445, 0.6261622905731201, 0.0576818622648716, -0.08869010955095291, 0.2609509527683258, 0.2543960213661194, -0.2941790521144867, 0.583430826663971, 0.08831419795751572, 0.8086766004562378, -0.06321536004543304, 0.2695593237876892, 0.30404794216156006, -0.14855310320854187, 0.10836312919855118, -0.056861959397792816, 0.0341850146651268, -0.46842217445373535, -0.2791595458984375, -0.03688694164156914, -0.19900932908058167, -0.24307408928871155, 0.20574267208576202, -0.07067644596099854, 0.2829980254173279, -0.33127230405807495, 0.10466352105140686, -0.16424739360809326, 0.20261108875274658, -0.23082825541496277, -0.32462626695632935, -0.5357341170310974, 0.05167143791913986, 0.14104998111724854, 0.031017106026411057, -0.05284862220287323, -0.006748927757143974, -0.05010440945625305, 0.034339167177677155, -0.16257816553115845, 0.1492920219898224, 0.24160660803318024, 0.4125484824180603, -0.1583089977502823, -0.4649200439453125, 0.16729387640953064, 0.1608806997537613, 0.5439353585243225, -0.0690154880285263, -0.2385667860507965, -0.024137135595083237, -0.0790548101067543, 0.1676197648048401, -0.03385243937373161, -0.15309341251850128, 0.4077906310558319, 0.03914505988359451, -0.19625836610794067, -0.13484853506088257, -0.16838371753692627, -0.5141818523406982, 0.03928418457508087, 0.22326335310935974, 0.08047227561473846, -0.21662387251853943, -0.3970598876476288, 0.030653711408376694, 0.2911416292190552, -0.2747100293636322, 0.04808389022946358, 0.1394115686416626, 0.08242560923099518, 0.16124305129051208, -0.16107258200645447, -0.23419703543186188, 0.09169746935367584, 0.5401781797409058, -0.12620416283607483, 0.026575610041618347, 0.39039865136146545, -0.049191106110811234, -0.1195811852812767, -0.07633750140666962, 0.3125399351119995, 0.28043240308761597, -0.2819923162460327, 0.3548012673854828, -0.24045857787132263, 0.29494422674179077, -0.1222752034664154, 0.26647627353668213, 0.3084941506385803, -0.0719994381070137, -0.1369728296995163, -0.32175707817077637, -0.26195812225341797, 0.1775352656841278, 0.24201545119285583, 0.2250857651233673, 0.06855517625808716, -0.5553873777389526, -0.22162799537181854, -0.2492407262325287, -0.2151416540145874, 0.38400593400001526, -0.04738304018974304, 0.035141415894031525, 0.13003084063529968, 0.1232348307967186, 0.10116781294345856, -0.2732868492603302, -0.050899602472782135, -0.14765053987503052, -0.21067790687084198, -0.14463910460472107, -0.12040366232395172, 0.1756354123353958, -0.027530048042535782, -0.1831723153591156, -0.1145458072423935, -0.32961660623550415, 0.04998045414686203, -0.22453996539115906, 0.13460949063301086, 0.44233039021492004, 0.054828476160764694, -0.2195536345243454, 0.4375784397125244, 0.195918470621109, -0.2524333596229553, 0.08455385267734528, 0.2421717792749405, 0.14185857772827148, -0.07747127115726471, 0.17720326781272888, -0.147368922829628, 0.006087563931941986, -0.19433991611003876, 0.11368446052074432, 0.4467402696609497, 0.13455301523208618, 0.2401011884212494, -0.23741696774959564, -0.05042831227183342, 0.3336135447025299, 0.3306538462638855, 0.19567833840847015, -0.23465596139431, -0.02749010920524597, 0.2535393238067627, 0.1353241205215454, -0.028172943741083145, -0.42538490891456604, 0.314728707075119, -0.08429086953401566, -0.15737468004226685, 0.05757446587085724, 0.4150221347808838, 0.1893361508846283, -0.3821444511413574, 0.07608366757631302, 0.6948708295822144, -0.08131352066993713, 0.22088544070720673, 0.15920574963092804, -0.004801571369171143, 0.0150233693420887, 0.24148868024349213, 0.01630011945962906, 0.3297765254974365, 0.3843536972999573, 0.08856680989265442, 0.320595920085907, 0.3480467200279236, 0.23521149158477783, -0.09464258700609207, -0.3979951739311218, 0.11669367551803589, -0.10549622774124146, 0.05410822480916977, 0.08936240524053574, 0.02699131891131401, 0.16816499829292297, -0.21880239248275757, -0.19585058093070984, -0.1412922739982605, 0.28064578771591187, -0.1759519875049591, -0.317141056060791, 0.15749821066856384, -0.2988763749599457, 0.17922046780586243, 0.24002042412757874, -0.2726568579673767, -0.2749032974243164, -0.052075594663619995, -0.03252518177032471, 0.038211639970541, 0.06052891165018082, 0.17745840549468994, 0.2132650911808014, 0.20107150077819824, -0.1772976964712143, 0.15217182040214539, 0.011042580008506775, -0.24927878379821777, 0.08371050655841827, 0.08261343836784363, 0.39573901891708374, 0.09763579070568085, -0.14083902537822723, 0.16275855898857117, 0.14661166071891785, 0.024936357513070107, -0.013116955757141113, 0.08392444252967834, -0.2270229458808899, -0.11164887249469757, 0.304903507232666, 0.12495771050453186, -0.08087816834449768, -0.032937806099653244, -0.00446731224656105, 0.3896516263484955, -0.12474532425403595, 0.1580718755722046, 0.02100944146513939, -0.0990583524107933, 0.10163477808237076, 0.13499492406845093, -0.00589355081319809, -0.07248523086309433, 0.5771891474723816, 0.05278460308909416, 0.18897265195846558, 0.07034196704626083, 0.06735526770353317, 0.08613650500774384, 0.3415696620941162, 0.1913553774356842, -0.1981481909751892, -0.15403135120868683, 0.0913650244474411, -0.6733806133270264, 0.10893087834119797, 0.18561168015003204, 0.21559123694896698, 0.2689824402332306, 0.12853841483592987, 0.12204669415950775, 0.16650362312793732, -0.03775128722190857, 0.11557082831859589, 0.10818236321210861, 0.22052063047885895, -0.023085547611117363, -0.17463476955890656, 0.24356243014335632, -0.0055539049208164215, -0.24830256402492523, -0.5349053740501404, 0.018357139080762863, 0.056538525968790054, -0.03851091489195824, -0.019705038517713547, 0.03550197184085846, -0.0002104043960571289, 0.016251754015684128, 0.4805280864238739, 0.07127472013235092, 0.21673110127449036, -0.08097989857196808, -0.04358111321926117, -0.05981310084462166, -0.32422614097595215, -0.164781391620636, 0.029317956417798996, -0.19954204559326172, 0.38592204451560974, -0.3965577185153961, 0.0583968348801136, -0.43174469470977783, 0.025768127292394638, 0.0653415247797966, 0.22798386216163635, -0.32412129640579224, 0.17867045104503632, -0.3306616246700287, -0.05643213912844658, 0.15935634076595306, 0.1664976328611374, 0.03833512216806412, 0.39640533924102783, -0.08104939758777618, -0.2979852855205536, 0.39809662103652954, -0.07296063005924225, -0.2956801950931549, 0.07722117751836777, 0.03865253925323486, 0.31633836030960083, 0.05812971293926239, -0.3488900363445282, -0.061251506209373474, 0.41775259375572205, -0.1623431146144867, -0.13951162993907928, 0.15969140827655792, -0.13789857923984528, 0.06690844893455505, -0.06517110019922256, 0.48389732837677, 0.09139508754014969, -0.11904243379831314, 0.010260693728923798, -0.2576305866241455 ]
https://github.com/huggingface/datasets/issues/6703
Unable to load dataset that was saved with `save_to_disk`
@lhoestq, so is it correctly understood that if I run `to_parquet()` and then `save_to_disk()`, I can load it with `load_dataset`? If yes, then it would resolve this issue (and should probably be documented somewhere 😄)
### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10
35
Unable to load dataset that was saved with `save_to_disk` ### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10 @lhoestq, so is it correctly understood that if I run `to_parquet()` and then `save_to_disk()`, I can load it with `load_dataset`? If yes, then it would resolve this issue (and should probably be documented somewhere 😄)
[ -0.25731319189071655, -0.24908488988876343, 0.02800280600786209, 0.3634191155433655, 0.23599158227443695, 0.15630871057510376, 0.15814074873924255, 0.09843534231185913, 0.2207668423652649, 0.03351379930973053, -0.07418055832386017, 0.5258834958076477, -0.018993154168128967, 0.33456850051879883, 0.06568773090839386, 0.08331082761287689, 0.36277151107788086, 0.0918588787317276, 0.2087416648864746, 0.15165115892887115, -0.34510454535484314, 0.1584138572216034, 0.0351891964673996, 0.12243330478668213, 0.04942430928349495, -0.09780590981245041, 0.017881589010357857, 0.3249534070491791, 0.07099229097366333, -0.38314417004585266, 0.40021640062332153, 0.042260315269231796, 0.20330388844013214, 0.2821623980998993, -0.0001238183322129771, 0.12454189360141754, 0.10647912323474884, -0.28628283739089966, -0.2702433168888092, -0.5230048298835754, -0.014019284397363663, -0.23548920452594757, 0.2695998251438141, -0.34968382120132446, -0.18724733591079712, 0.07096793502569199, 0.10834508389234543, -0.33352014422416687, 0.22143298387527466, -0.001118888147175312, 0.13359689712524414, 0.2569705545902252, -0.08577581495046616, -0.18554306030273438, 0.22658222913742065, -0.048395514488220215, -0.12644410133361816, 0.15673963725566864, 0.30372607707977295, 0.13298988342285156, 0.1372261941432953, -0.11358432471752167, -0.007047954946756363, -0.08936752378940582, 0.3827002942562103, 0.20377665758132935, 0.18220928311347961, -0.34042131900787354, -0.24680528044700623, -0.17627090215682983, 0.500874400138855, -0.440895140171051, -0.40607237815856934, -0.34527844190597534, -0.21515725553035736, -0.23071891069412231, 0.1915232241153717, 0.003934083040803671, 0.06917643547058105, 0.05910878628492355, -0.044495485723018646, -0.4984320104122162, 0.006436474621295929, -0.07165202498435974, -0.025896742939949036, 0.16284775733947754, -0.03614967316389084, 0.14802010357379913, 0.2834140360355377, 0.10393353551626205, 0.21221548318862915, -0.04810210317373276, 0.07091869413852692, -0.027625102549791336, -0.21084801852703094, -0.012933947145938873, 0.3959701359272003, -0.03390932083129883, -0.07663869857788086, 0.22891968488693237, -0.07345332950353622, 0.11585213989019394, -0.19503606855869293, 0.09912984818220139, 0.37947461009025574, 0.15570038557052612, 0.12289293110370636, 0.11216849833726883, 0.20698130130767822, 0.2033882588148117, -0.07374092936515808, -0.166020929813385, 0.08547984808683395, -0.0038173310458660126, 0.2511729300022125, -0.0764416754245758, 0.3285132646560669, -0.1660252809524536, -0.36219704151153564, 0.028819140046834946, 0.09233810752630234, -0.06255556643009186, 0.02989671379327774, 0.2585233449935913, 0.103545643389225, -0.09615129977464676, -0.15897226333618164, 0.43276089429855347, -0.2020334154367447, 0.22631701827049255, -0.1886138767004013, -0.03440973907709122, -0.0276100505143404, -0.06299343705177307, 0.16988055408000946, -0.451240211725235, 0.06591271609067917, 0.2243867963552475, 0.052169620990753174, 0.03894435614347458, 0.011387588456273079, 0.03965295851230621, 0.15603898465633392, 0.10060852766036987, 0.2664121985435486, 0.2118932604789734, 0.28504428267478943, -0.4036903381347656, -0.4801366925239563, 0.36660224199295044, -0.6453197598457336, -0.48954132199287415, 0.2001587450504303, 0.08827587962150574, -0.16064408421516418, 0.039629366248846054, -0.8955358862876892, 0.05152653157711029, -0.09152405709028244, -0.13624443113803864, -0.16793742775917053, -0.008474394679069519, -0.28460896015167236, -0.3767926096916199, 0.2238491028547287, 0.18456107378005981, -0.3265870213508606, 0.07670667767524719, -0.045708559453487396, -0.20170371234416962, 0.12930548191070557, 0.21798543632030487, -0.27318641543388367, 0.3832218647003174, -0.4081157147884369, 0.15034472942352295, 0.5254411101341248, -0.37097227573394775, -0.47122159600257874, -0.09854110330343246, -0.1229415312409401, 0.0762118473649025, -0.1291889250278473, 0.11766646802425385, 0.3671379089355469, -0.12159083038568497, 0.3764933943748474, 0.401147723197937, 0.016352783888578415, 0.009879538789391518, -0.23949576914310455, -0.00032274238765239716, 0.31438273191452026, 0.10451099276542664, -0.2223256379365921, 0.27396994829177856, 0.1570104956626892, 0.20322319865226746, 0.030636250972747803, -0.0964278131723404, 0.14144448935985565, 0.1589866727590561, 0.41558006405830383, -0.08810503780841827, -0.08693018555641174, -0.13682305812835693, -0.290385901927948, 0.3368188738822937, 0.19394181668758392, -0.11956340074539185, 0.07617183029651642, -0.0683838278055191, -0.3845323324203491, -0.005659132264554501, -0.3389727473258972, 0.13311755657196045, -0.026427393779158592, 0.0732148289680481, -0.12261247634887695, -0.0688459724187851, -0.4238203465938568, 0.44294309616088867, -0.07220190018415451, -0.06092263013124466, -0.42048197984695435, 0.6205953359603882, -0.05013589560985565, -0.21138617396354675, -0.05544712021946907, 0.10414347797632217, 0.1834941804409027, -0.1768113225698471, 0.039449967443943024, 0.33696654438972473, 0.11352197825908661, 0.3466373682022095, 0.017757490277290344, 0.13912050426006317, 0.15518847107887268, -0.1582537442445755, 0.054795779287815094, 0.16908062994480133, 0.19162017107009888, -0.06481682509183884, -0.5683655142784119, 0.30355384945869446, -0.0969008058309555, 0.27432915568351746, 0.024551592767238617, -0.2525199055671692, 0.3144114315509796, -0.0176706463098526, 0.011016160249710083, -0.12217053771018982, -0.06345309317111969, 0.05376829952001572, 0.04877828434109688, -0.19729572534561157, -0.34799396991729736, 0.24935859441757202, 0.20849484205245972, 0.04644829407334328, 0.1651720106601715, 0.16531220078468323, 0.27070993185043335, -0.19180652499198914, -0.15317963063716888, 0.05426342412829399, 0.20234912633895874, 0.08109269291162491, 0.1167515218257904, 0.05899029225111008, -0.19316218793392181, 0.028830047696828842, 0.14055058360099792, -0.057054221630096436, 0.05984356999397278, 0.3672153353691101, 0.2636135518550873, -0.03261354938149452, -0.14523255825042725, 0.0847761332988739, -0.00841665267944336, 0.1406528800725937, -0.5103613138198853, 0.1734672635793686, -0.14383257925510406, 0.1834338903427124, -0.13914400339126587, -0.010763096623122692, -0.1961926817893982, -0.4670003056526184, -0.07223901152610779, 0.7605757713317871, 0.000354226678609848, 0.007987091317772865, -0.2100592702627182, 0.23245839774608612, -0.0489165298640728, -0.4192422330379486, -0.0014721192419528961, -0.09962109476327896, -0.041389986872673035, -0.033903297036886215, 0.14340882003307343, 0.20587383210659027, 0.4248153865337372, -0.2560426592826843, 0.08773840218782425, -0.5354892015457153, -0.1300903856754303, 0.10989158600568771, -0.07730121910572052, 0.544317364692688, -0.024440445005893707, 0.08794566988945007, -0.15103864669799805, -0.22102496027946472, 0.2713799476623535, -0.05042896419763565, -0.19241289794445038, 0.014952782541513443, -0.11239404231309891, 0.09817362576723099, 0.04591205343604088, -0.3636443614959717, -0.18565677106380463, -0.4487605094909668, -0.03978951275348663, -0.026149678975343704, 0.11699129641056061, -0.4105437397956848, -0.2557660639286041, -0.13117671012878418, 0.44100481271743774, -0.21196065843105316, -0.25054383277893066, -0.3512325584888458, 0.36506420373916626, -0.1627684384584427, -0.04957645758986473, 0.05337276682257652, 0.027309775352478027, -0.13771699368953705, 0.17263591289520264, -0.3962820768356323, -0.20219197869300842, -0.032244227826595306, 0.12097720801830292, -0.164602130651474, 0.20728470385074615, 0.1355167031288147, 0.1801883727312088, 0.062370650470256805, -0.016315214335918427, -0.5200050473213196, 0.12790843844413757, 0.5435420274734497, 0.12645047903060913, 0.15188908576965332, 0.40789592266082764, -0.1281341165304184, 0.48826760053634644, -0.029909078031778336, 0.27143391966819763, 0.7255632877349854, -0.020103638991713524, 0.3851701617240906, -0.413068562746048, -0.2173682302236557, -0.4844238758087158, -0.13879215717315674, -0.2592774033546448, 0.05140993371605873, -0.02080400288105011, -0.2330440729856491, -0.010231342166662216, -0.3506052792072296, -0.2759701609611511, -0.40345463156700134, 0.05515504628419876, -0.04901473969221115, 0.0919179618358612, -0.08461946994066238, 0.05429460108280182, -0.10033789277076721, 0.008558224886655807, 0.13102589547634125, 0.12275661528110504, 0.4663066267967224, -0.07145729660987854, -0.30289363861083984, 0.03707372024655342, -0.6006377339363098, -0.07944206893444061, -0.12058766186237335, 0.2591151297092438, 0.08500075340270996, -0.08947248756885529, 0.16037485003471375, -0.16873012483119965, 0.9319259524345398, -0.15124791860580444, 0.5075079202651978, 0.47542035579681396, -0.14276251196861267, -0.5089791417121887, -0.0311739444732666, -0.10367891192436218, 0.3481408953666687, -0.25801339745521545, 1.0680519342422485, -0.35817208886146545, -0.11276154220104218, -0.3521411418914795, 0.2836383581161499, -0.2603272795677185, -0.00786772184073925, -0.1922171711921692, -0.26256710290908813, -0.4100586473941803, 0.11760500818490982, -0.02477194368839264, 0.31405001878738403, -0.009866196662187576, 0.2448505312204361, -0.2645168900489807, -0.11083319038152695, 0.09774642437696457, -0.15118181705474854, 0.6724458336830139, -0.06638405472040176, 0.3474692106246948, 0.12140969187021255, 0.05687456950545311, 0.14844952523708344, 0.7369980216026306, -0.10315407812595367, -0.17003080248832703, 0.15013068914413452, 0.24686458706855774, 0.09331904351711273, 0.24090436100959778, 0.17611590027809143, 0.03638821095228195, -0.35054609179496765, -0.1119411289691925, -0.4584232568740845, -0.054046355187892914, -0.14176857471466064, -0.17156285047531128, -0.3747570216655731, -0.20940828323364258, 0.5136383771896362, -0.00552714429795742, -0.1934662163257599, 0.1873297244310379, 0.37891727685928345, -0.34229031205177307, 0.6131426692008972, 0.06864793598651886, 0.9202311038970947, -0.031316742300987244, 0.2613575756549835, 0.2795850932598114, -0.13629958033561707, 0.10158947855234146, -0.39268338680267334, 0.08864512294530869, -0.4106714427471161, -0.26121005415916443, -0.05353027582168579, -0.17115488648414612, -0.2798823118209839, 0.2263796180486679, -0.12028837203979492, 0.36177322268486023, -0.32988154888153076, 0.15203702449798584, -0.16733652353286743, 0.06731665879487991, -0.17397862672805786, -0.1748272329568863, -0.5938383936882019, -0.010436240583658218, 0.1476721167564392, 0.022725503891706467, -0.13763684034347534, 0.033420976251363754, -0.014805261045694351, 0.06353611499071121, -0.016967162489891052, 0.16695788502693176, 0.35619473457336426, 0.34887784719467163, -0.2413460910320282, -0.364709734916687, 0.1273179054260254, 0.07275789976119995, 0.4988570213317871, 0.07725687325000763, -0.23805469274520874, 0.010930093005299568, -0.14240464568138123, 0.1910216361284256, 0.017808061093091965, -0.030860647559165955, 0.29588353633880615, 0.05084805190563202, -0.1903051882982254, -0.11448050290346146, -0.11652875691652298, -0.5150298476219177, -0.17545685172080994, 0.2144213169813156, 0.01322958990931511, -0.2575411796569824, -0.4229338765144348, 0.16222915053367615, 0.3155811131000519, -0.2532694339752197, 0.02016315795481205, 0.06396756321191788, 0.07770371437072754, 0.19988803565502167, -0.22357206046581268, -0.28009462356567383, 0.020631179213523865, 0.46916040778160095, -0.011600255966186523, 0.08307921886444092, 0.252090185880661, -0.13555623590946198, -0.16773803532123566, -0.06216288357973099, 0.16824871301651, 0.34511494636535645, -0.11732102185487747, 0.35324376821517944, -0.2895030975341797, 0.22455669939517975, -0.10691072791814804, 0.2503223419189453, 0.24182391166687012, -0.018387608230113983, -0.17218312621116638, -0.30719348788261414, -0.055767036974430084, 0.2495107650756836, 0.3075277507305145, 0.2573164999485016, 0.095835842192173, -0.4550057053565979, -0.2367384433746338, -0.30313146114349365, -0.20174288749694824, 0.40510252118110657, -0.06251945346593857, 0.1591845154762268, 0.2708861827850342, 0.1958753764629364, 0.0030302696395665407, -0.211941659450531, -0.05048698931932449, -0.15766865015029907, -0.2230045050382614, -0.1089542806148529, -0.06057968735694885, 0.2065591812133789, -0.0636558085680008, -0.03606973588466644, -0.09194356203079224, -0.2623783349990845, 0.02957666665315628, -0.2173025757074356, 0.2390681803226471, 0.44864290952682495, 0.07198243588209152, -0.23141144216060638, 0.708497941493988, 0.1745932549238205, -0.2369873970746994, 0.1584273874759674, 0.3128732740879059, 0.07942542433738708, -0.043572500348091125, 0.16288185119628906, -0.2877303957939148, -0.027975469827651978, -0.1768244355916977, 0.1345214992761612, 0.5232861638069153, 0.231177419424057, 0.18238204717636108, -0.07226893305778503, 0.020915459841489792, 0.3150416910648346, 0.42289409041404724, 0.31644463539123535, -0.1908436268568039, -0.09213550388813019, 0.17543065547943115, 0.10824055969715118, -0.01965835504233837, -0.393312931060791, 0.4103802740573883, -0.06482981145381927, -0.15088626742362976, 0.11037544906139374, 0.4239553213119507, 0.3140067756175995, -0.36575597524642944, 0.09538986533880234, 0.7234726548194885, -0.04842563718557358, 0.18500836193561554, 0.09060965478420258, -0.11691915988922119, 0.04953876882791519, 0.2362971305847168, -0.051800016313791275, 0.28651052713394165, 0.5005100965499878, 0.12100863456726074, 0.36611446738243103, 0.45944926142692566, 0.16776932775974274, -0.010319173336029053, -0.3907806873321533, 0.12097302079200745, -0.07237118482589722, 0.18017415702342987, -0.028880134224891663, 0.027039598673582077, -0.0051984041929244995, -0.18141742050647736, -0.15412133932113647, -0.2033669501543045, 0.3611072301864624, -0.26688820123672485, -0.37358221411705017, 0.2713612914085388, -0.4099530875682831, 0.1317141354084015, 0.25603118538856506, -0.3538002371788025, -0.28131622076034546, -0.22924798727035522, -0.1456776112318039, 0.10210290551185608, 0.1522420346736908, 0.2368670403957367, 0.03219177946448326, 0.162221297621727, -0.14281676709651947, 0.2033979892730713, -0.0735110491514206, -0.2187846302986145, 0.06533682346343994, 0.07386866956949234, 0.3434644937515259, 0.11823289841413498, -0.0907215029001236, 0.0996544361114502, 0.19523455202579498, 0.011184444651007652, -0.020344668999314308, 0.03845493495464325, -0.25095564126968384, 0.0188199020922184, 0.31661906838417053, 0.11460909247398376, -0.0848725214600563, -0.1055644303560257, 0.07988595217466354, 0.26294493675231934, -0.20578917860984802, 0.10552272200584412, 0.04565645009279251, -0.0991949588060379, 0.21263831853866577, 0.07679377496242523, -0.05911784991621971, -0.29775115847587585, 0.458136647939682, 0.036697886884212494, 0.22401398420333862, 0.07223225384950638, 0.04845568537712097, 0.12110814452171326, 0.28230804204940796, 0.08809776604175568, -0.2545882761478424, -0.28428593277931213, -0.030522335320711136, -0.7313179969787598, 0.19867870211601257, 0.13250106573104858, 0.16897405683994293, 0.28032252192497253, 0.19364337623119354, 0.07635873556137085, 0.18819421529769897, -0.15926037728786469, 0.12959009408950806, -0.09221760928630829, 0.18904700875282288, -0.004054222255945206, -0.15403518080711365, 0.09675852954387665, -0.058358073234558105, -0.28200146555900574, -0.4281456768512726, 0.0325835719704628, 0.007846488617360592, -0.050830692052841187, 0.07776200771331787, 0.09006595611572266, 0.09548281133174896, -0.011630624532699585, 0.4277893900871277, 0.11734305322170258, 0.31490185856819153, -0.15316423773765564, 0.10968785732984543, -0.02680029347538948, -0.4023042619228363, -0.16183042526245117, 0.0047231391072273254, -0.27650022506713867, 0.2318131923675537, -0.3546021580696106, -0.08526517450809479, -0.3678862750530243, -0.017122330144047737, 0.1084270179271698, 0.24172227084636688, -0.2876925766468048, 0.06429776549339294, -0.27548280358314514, -0.07347573339939117, 0.07065986096858978, 0.169430673122406, 0.11459705233573914, 0.3479554057121277, -0.026210933923721313, -0.27379751205444336, 0.34403324127197266, -0.024910271167755127, -0.3046305775642395, -0.12618127465248108, -0.0011799558997154236, 0.330534428358078, 0.051999203860759735, -0.22598224878311157, -0.07476754486560822, 0.43767431378364563, -0.20548146963119507, -0.1773882955312729, 0.22803626954555511, -0.15540362894535065, -0.022938886657357216, -0.11232627928256989, 0.2972356677055359, 0.1185649111866951, -0.14309649169445038, 0.050284434109926224, -0.2927718758583069 ]
https://github.com/huggingface/datasets/issues/6703
Unable to load dataset that was saved with `save_to_disk`
Here is an example: ```python ds.to_parquet("my/local/dir/data.parquet") # later ds = load_dataset("my/local/dir") ``` and for bigger datasets: ```python num_shards = 1024 # set number of files to save (e.g. try to have files smaller than 5GB) for shard_idx in num_shards: shard = ds.shard(index=shard_idx, num_shards=num_shards) shard.to_parquet(f"my/local/dir/{shard_idx:05d}.parquet") # 00000.parquet to 01023.parquet # later ds = load_dataset("my/local/dir") ``` I hope this helps :)
### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10
59
Unable to load dataset that was saved with `save_to_disk` ### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10 Here is an example: ```python ds.to_parquet("my/local/dir/data.parquet") # later ds = load_dataset("my/local/dir") ``` and for bigger datasets: ```python num_shards = 1024 # set number of files to save (e.g. try to have files smaller than 5GB) for shard_idx in num_shards: shard = ds.shard(index=shard_idx, num_shards=num_shards) shard.to_parquet(f"my/local/dir/{shard_idx:05d}.parquet") # 00000.parquet to 01023.parquet # later ds = load_dataset("my/local/dir") ``` I hope this helps :)
[ -0.3520600199699402, -0.2968636751174927, 0.043345507234334946, 0.32642173767089844, 0.24682968854904175, 0.14966607093811035, 0.18661275506019592, 0.18462838232517242, 0.1364244818687439, 0.08917498588562012, -0.019404510036110878, 0.4688253700733185, -0.13734515011310577, 0.3569578230381012, 0.12141193449497223, 0.05163116008043289, 0.30540135502815247, 0.019730180501937866, 0.2560635805130005, 0.10039545595645905, -0.2568737268447876, 0.1265234798192978, 0.09974803030490875, 0.019336462020874023, -0.12991879880428314, -0.01950518973171711, 0.011987915262579918, 0.4319462180137634, 0.07685541361570358, -0.3959041237831116, 0.482549250125885, -0.08009633421897888, 0.24848568439483643, 0.211040198802948, -0.00012482643069233745, 0.14511004090309143, 0.18315386772155762, -0.2901323735713959, -0.21493293344974518, -0.438171923160553, -0.16371119022369385, -0.2423923909664154, 0.16980502009391785, -0.31256160140037537, -0.08247503638267517, 0.12115484476089478, 0.0396122932434082, -0.2219962626695633, 0.19760626554489136, 0.01338567491620779, 0.1292150765657425, 0.22070980072021484, 0.09190595149993896, -0.20981952548027039, 0.2838294804096222, 0.03561265394091606, -0.23995889723300934, 0.16861122846603394, 0.2099589705467224, 0.20558427274227142, 0.1279047280550003, -0.09152916073799133, -0.08370407670736313, -0.06178007647395134, 0.3188658356666565, 0.23206734657287598, 0.16866707801818848, -0.19162768125534058, -0.19704481959342957, -0.09182675927877426, 0.41001102328300476, -0.4132683277130127, -0.3809864819049835, -0.3649879992008209, -0.17225942015647888, -0.2250724732875824, 0.2034817337989807, 0.04795015603303909, 0.04056187719106674, 0.09084063768386841, -0.1265927255153656, -0.43947070837020874, -0.06530420482158661, 0.022609878331422806, 0.16321073472499847, 0.0936906561255455, 0.002495008986443281, 0.0999947041273117, 0.31212538480758667, -0.05724810063838959, 0.20010624825954437, -0.023972276598215103, 0.013916697353124619, -0.035452891141176224, -0.2923886775970459, 0.03933349996805191, 0.2410411834716797, -0.07407229393720627, 0.009999729692935944, 0.18345198035240173, -0.0133041488006711, 0.15826201438903809, -0.1347147822380066, 0.11694967746734619, 0.18316757678985596, 0.19278229773044586, 0.13777588307857513, 0.088571697473526, 0.10118363797664642, 0.17932212352752686, 0.010128166526556015, -0.1267697811126709, 0.16420578956604004, -0.04653148725628853, 0.22529806196689606, -0.15073135495185852, 0.29626601934432983, -0.14187337458133698, -0.24893580377101898, 0.012068352662026882, 0.14227169752120972, -0.015470057725906372, -0.018521953374147415, 0.23113873600959778, 0.15756498277187347, -0.1750074028968811, -0.20194131135940552, 0.4079957604408264, -0.18358130753040314, 0.16161522269248962, -0.2214578241109848, -0.003998957574367523, -0.014271676540374756, 0.05053070932626724, 0.23243413865566254, -0.5218743681907654, 0.06223466992378235, 0.24936898052692413, 0.08577606081962585, 0.05383364111185074, -0.058527566492557526, 0.07462704181671143, 0.2302553951740265, 0.08749639987945557, 0.22036921977996826, 0.12940126657485962, 0.29903268814086914, -0.5473302006721497, -0.3885493576526642, 0.3832530379295349, -0.6111941933631897, -0.5663167238235474, 0.07164565473794937, 0.08454831689596176, -0.25217652320861816, 0.00805523619055748, -0.9728077054023743, 0.06925405561923981, -0.0931112989783287, -0.05476889759302139, -0.20420360565185547, -0.008141059428453445, -0.3344023823738098, -0.40750089287757874, 0.34644758701324463, 0.23223456740379333, -0.31819555163383484, 0.11766165494918823, -0.16840270161628723, -0.14223410189151764, 0.06291941553354263, 0.14165514707565308, -0.17784228920936584, 0.30053263902664185, -0.41617852449417114, 0.3444448709487915, 0.47414249181747437, -0.26578277349472046, -0.58181232213974, -0.13195493817329407, -0.12872567772865295, -0.0285740178078413, 0.012545019388198853, 0.15134376287460327, 0.38488295674324036, -0.06304897367954254, 0.2694908380508423, 0.39822888374328613, 0.042096514254808426, -0.014932421036064625, -0.3056730628013611, -0.09522409737110138, 0.12580516934394836, 0.20655401051044464, -0.16430935263633728, 0.255871444940567, 0.3201998472213745, 0.1944572925567627, 0.051941677927970886, -0.1437566876411438, 0.13536378741264343, 0.17568671703338623, 0.3792954087257385, -0.15854158997535706, -0.14554287493228912, -0.22454071044921875, -0.31121891736984253, 0.4114758372306824, 0.2635868787765503, -0.14842993021011353, 0.06613361090421677, -0.006280478090047836, -0.4406583905220032, 0.009321147575974464, -0.3380761742591858, 0.21877646446228027, -0.03614675998687744, -0.01591476798057556, -0.06735214591026306, -0.05000792443752289, -0.29646623134613037, 0.3234306275844574, -0.18704980611801147, -0.10643699765205383, -0.49321573972702026, 0.730044424533844, -0.033599138259887695, -0.3349159061908722, -0.04215231537818909, 0.09970235824584961, 0.19739821553230286, -0.2434290498495102, -0.015247393399477005, 0.2645869851112366, 0.08394607901573181, 0.39509183168411255, 0.1419718861579895, 0.1688883751630783, 0.08993692696094513, -0.21527814865112305, 0.10986965149641037, 0.19355027377605438, 0.13087499141693115, -0.09284104406833649, -0.5309746265411377, 0.3520962595939636, -0.10618798434734344, 0.23851624131202698, -0.08793114125728607, -0.2113291621208191, 0.3150489628314972, -0.12244214117527008, 0.17389275133609772, -0.24391022324562073, -0.035957906395196915, 0.04587135463953018, -0.091410331428051, -0.22612644731998444, -0.23131193220615387, 0.15983106195926666, 0.17607201635837555, 0.06493918597698212, 0.19426777958869934, 0.2908908426761627, 0.2877104878425598, -0.16753718256950378, -0.15165002644062042, 0.23731745779514313, 0.23144522309303284, 0.12966307997703552, 0.027546033263206482, 0.023556482046842575, -0.16901260614395142, -0.00942386407405138, 0.1409914344549179, -0.05982072651386261, 0.047919321805238724, 0.4479169547557831, 0.17339646816253662, -0.0998096764087677, -0.18776017427444458, 0.14130638539791107, 0.009098893031477928, 0.19777962565422058, -0.4837294816970825, 0.041358113288879395, -0.22729960083961487, 0.26728737354278564, -0.22583270072937012, 0.04231135547161102, -0.29959383606910706, -0.42723196744918823, -0.07274430245161057, 0.7217527031898499, 0.014585215598344803, -0.002161134034395218, -0.061629753559827805, 0.1199985072016716, -0.040192652493715286, -0.4031475782394409, -0.05679002404212952, -0.08233049511909485, -0.04966297745704651, -0.04326314106583595, 0.28255584836006165, 0.28547608852386475, 0.39856889843940735, -0.2921687364578247, 0.1533088982105255, -0.6026729345321655, -0.03991146758198738, 0.03757692128419876, -0.08078959584236145, 0.4927685260772705, 0.011670015752315521, 0.09613475948572159, -0.16697633266448975, -0.253345787525177, 0.3144429326057434, -0.03293804079294205, -0.17379888892173767, 0.1287481039762497, -0.09495099633932114, 0.05682896077632904, 0.13334155082702637, -0.3445298969745636, -0.12690946459770203, -0.4391945004463196, 0.004597187042236328, 0.05337481573224068, 0.12584266066551208, -0.37161242961883545, -0.06935103982686996, -0.024566959589719772, 0.3843766152858734, -0.29942411184310913, -0.18842238187789917, -0.3879130780696869, 0.4329422414302826, -0.059085432440042496, -0.10204964876174927, 0.11393125355243683, -0.018371107056736946, -0.15636596083641052, 0.20073240995407104, -0.44955337047576904, -0.17423208057880402, -0.02322245202958584, 0.04504803195595741, -0.14704777300357819, 0.1441320925951004, 0.17167888581752777, 0.13145789504051208, 0.06982447952032089, 0.03561871498823166, -0.4413979649543762, 0.13884851336479187, 0.5469151735305786, 0.1456468552350998, 0.17184674739837646, 0.3647324740886688, -0.07586902379989624, 0.5755834579467773, 0.001894420012831688, 0.18286006152629852, 0.712308406829834, -0.010789306834340096, 0.2805819511413574, -0.3860161602497101, -0.3132164478302002, -0.440845251083374, -0.11617037653923035, -0.19242148101329803, 0.03756669908761978, 0.029497914016246796, -0.13373787701129913, 0.009650755673646927, -0.44728079438209534, -0.19483992457389832, -0.35557788610458374, 0.04941604286432266, 0.027425510808825493, 0.09090327471494675, -0.07562629133462906, 0.039035506546497345, -0.10576286911964417, -0.13599860668182373, 0.1326981782913208, 0.14099374413490295, 0.40735769271850586, -0.03274652361869812, -0.3116965591907501, 0.051601726561784744, -0.4499785304069519, 0.02753862738609314, 0.046508658677339554, 0.25648432970046997, 0.049975160509347916, -0.05372064560651779, 0.171065092086792, -0.057712990790605545, 0.913923442363739, -0.27036309242248535, 0.5738537907600403, 0.4209665060043335, -0.1074264794588089, -0.5067813396453857, -0.05663377046585083, 0.0031159520149230957, 0.30978280305862427, -0.24233590066432953, 1.0126011371612549, -0.2534751892089844, -0.059655800461769104, -0.3405093252658844, 0.3479507267475128, -0.2947371006011963, -0.07744741439819336, -0.13919059932231903, -0.22013625502586365, -0.48324382305145264, 0.08437684923410416, -0.040579281747341156, 0.3641546070575714, 0.046096138656139374, 0.18623651564121246, -0.35082554817199707, -0.09301646053791046, 0.0482303760945797, -0.19307400286197662, 0.6922840476036072, 0.05369512736797333, 0.37307465076446533, 0.07438768446445465, 0.03034348040819168, 0.1570993959903717, 0.6213484406471252, -0.0764586329460144, -0.048479288816452026, -0.0660068541765213, 0.18851938843727112, 0.027552887797355652, 0.162832573056221, 0.15357819199562073, 0.036387551575899124, -0.303259938955307, -0.07940377295017242, -0.5448874235153198, -0.11693108826875687, -0.17217351496219635, -0.17962472140789032, -0.30701011419296265, -0.12840355932712555, 0.6978716850280762, -0.07715536653995514, -0.0669073760509491, 0.14061833918094635, 0.4563130736351013, -0.3023703098297119, 0.6246836185455322, 0.17114931344985962, 0.908841073513031, -0.05961160361766815, 0.23248358070850372, 0.2292603850364685, 0.0034981630742549896, 0.03370584920048714, -0.18089079856872559, 0.0658971294760704, -0.44272515177726746, -0.3261476755142212, -0.02214067243039608, -0.20789161324501038, -0.23405012488365173, 0.3094562888145447, -0.0873122364282608, 0.3485713601112366, -0.31356966495513916, 0.16653907299041748, -0.11276376247406006, 0.2285517454147339, -0.15231822431087494, -0.21876926720142365, -0.5219660401344299, 0.013687361031770706, 0.09801986068487167, -0.10524749755859375, -0.04378616064786911, -0.04331178590655327, -0.0778459757566452, 0.06691677868366241, -0.1324891448020935, 0.17107915878295898, 0.5060720443725586, 0.47130095958709717, -0.19529129564762115, -0.48552167415618896, 0.2121390402317047, 0.20886991918087006, 0.5327838659286499, 0.04440706968307495, -0.2986448407173157, 0.001404542475938797, -0.1918392777442932, 0.06220070272684097, -0.014193483628332615, -0.05302150920033455, 0.2475893497467041, 0.036683328449726105, -0.2297775149345398, -0.2230931520462036, -0.06670597940683365, -0.5358306169509888, -0.22937461733818054, 0.18933263421058655, 0.055766403675079346, -0.2719671130180359, -0.3922845721244812, 0.08454229682683945, 0.16131334006786346, -0.26029038429260254, 0.028866171836853027, 0.09866094589233398, 0.03737333044409752, 0.22866374254226685, -0.03954922780394554, -0.23890812695026398, 0.0906045138835907, 0.5632882118225098, -0.06294936686754227, 0.16553433239459991, 0.2739076018333435, -0.11280529201030731, -0.134681835770607, -0.04835236072540283, 0.189325213432312, 0.18109218776226044, -0.17369040846824646, 0.320048451423645, -0.36129090189933777, 0.32312268018722534, -0.08602909743785858, 0.14972911775112152, 0.2904241979122162, -0.02210450917482376, -0.16717314720153809, -0.34647417068481445, -0.06834061443805695, 0.19892776012420654, 0.17314325273036957, 0.245852530002594, 0.013286910951137543, -0.44149598479270935, -0.22938914597034454, -0.22490273416042328, -0.18717464804649353, 0.4251100718975067, -0.07307013869285583, 0.10953494906425476, 0.2703017592430115, 0.11592757701873779, 0.0464915856719017, -0.3333157002925873, -0.050770699977874756, -0.12976334989070892, -0.22173523902893066, -0.10751517117023468, -0.10606463253498077, 0.17425864934921265, -0.04401380568742752, 0.026374734938144684, -0.2126208394765854, -0.2987145781517029, -0.026349421590566635, -0.2056029886007309, 0.1482740044593811, 0.4578477740287781, 0.04219026863574982, -0.24416477978229523, 0.7453294396400452, 0.07910645753145218, -0.24275395274162292, 0.0460711270570755, 0.2476218342781067, 0.08652257919311523, -0.14842821657657623, 0.1790822595357895, -0.18541349470615387, -0.017742358148097992, -0.17444847524166107, 0.15001040697097778, 0.4278107285499573, 0.1264607012271881, 0.2746869623661041, -0.1620442271232605, -0.04899643361568451, 0.29679709672927856, 0.4720101058483124, 0.16497588157653809, -0.21868030726909637, -0.0887860581278801, 0.21811461448669434, 0.10983537882566452, -0.09129650890827179, -0.5076339244842529, 0.4939589500427246, -0.023387692868709564, -0.1869446039199829, 0.06994284689426422, 0.3536786437034607, 0.14917539060115814, -0.499081015586853, 0.14205142855644226, 0.6546081304550171, -0.11128699779510498, 0.1351012885570526, 0.10099925100803375, -0.1255849003791809, -0.02490871027112007, 0.20874260365962982, -0.010038390755653381, 0.29839444160461426, 0.5302618741989136, 0.09223148226737976, 0.47097545862197876, 0.2587178349494934, 0.1652425229549408, -0.09145548194646835, -0.36719444394111633, 0.09413248300552368, -0.03389045596122742, 0.10040454566478729, -0.013442598283290863, 0.017298415303230286, 0.1527722179889679, -0.03355244919657707, -0.1420200914144516, -0.2562654912471771, 0.23022140562534332, -0.18209969997406006, -0.2440624237060547, 0.30605465173721313, -0.34616562724113464, 0.03595629334449768, 0.24979758262634277, -0.2337457239627838, -0.2892754077911377, -0.18306681513786316, -0.02276451885700226, 0.060921862721443176, 0.2643831968307495, 0.2904509902000427, 0.15639428794384003, 0.1656111627817154, -0.2726251482963562, 0.06020946800708771, -0.05578647553920746, -0.2568032741546631, 0.06176864355802536, 0.03150578588247299, 0.37543928623199463, 0.07340880483388901, -0.06203170493245125, 0.21437953412532806, 0.2512962520122528, 0.01569466106593609, 0.010818270966410637, 0.09117557853460312, -0.22766077518463135, 0.08015777170658112, 0.31550779938697815, 0.10421454161405563, -0.08588449656963348, -0.1967948079109192, 0.047573115676641464, 0.3218553960323334, -0.16690830886363983, 0.1627514660358429, 0.11419828981161118, -0.14940804243087769, 0.19256554543972015, 0.094241663813591, -0.06940195709466934, -0.3230587840080261, 0.5356401801109314, 0.005996645428240299, 0.19669613242149353, 0.12819422781467438, 0.028563596308231354, -0.016646668314933777, 0.35229551792144775, 0.017855916172266006, -0.2907528877258301, -0.28513485193252563, -0.04315262287855148, -0.7515745162963867, 0.0940420925617218, 0.12489137053489685, 0.22086486220359802, 0.3584813177585602, 0.1622832864522934, 0.07771576195955276, 0.16343623399734497, -0.16452674567699432, 0.052253853529691696, -0.12097635865211487, 0.26636725664138794, 0.045023363083601, -0.11743725836277008, 0.05626353248953819, -0.10380050539970398, -0.2493259310722351, -0.46028944849967957, 0.1220044195652008, 0.04870002716779709, -0.03368370980024338, 0.020132189616560936, 0.1504087895154953, 0.05173635855317116, -0.06398137658834457, 0.32656329870224, 0.023534592241048813, 0.29517462849617004, -0.1528327465057373, 0.1357859969139099, -0.024215448647737503, -0.36904120445251465, -0.09240733087062836, 0.07778505980968475, -0.24360552430152893, 0.3886902332305908, -0.3244110345840454, 0.010059989988803864, -0.3612101972103119, 0.08047618716955185, 0.08452092111110687, 0.23280753195285797, -0.27987855672836304, 0.036035679280757904, -0.3197733759880066, -0.012328713200986385, 0.051626455038785934, 0.10902731120586395, 0.039691563695669174, 0.3356723487377167, 0.07414242625236511, -0.30906400084495544, 0.3604077696800232, -0.01780129224061966, -0.2546131908893585, -0.04141490161418915, 0.03811749070882797, 0.2903585731983185, 0.09841956198215485, -0.2663045823574066, -0.09526705741882324, 0.44960418343544006, -0.10603856295347214, -0.06576764583587646, 0.23183909058570862, -0.160355344414711, -0.047888368368148804, -0.0453876256942749, 0.14038655161857605, 0.09603714197874069, -0.1407831460237503, 0.09678299725055695, -0.326255202293396 ]
https://github.com/huggingface/datasets/issues/6703
Unable to load dataset that was saved with `save_to_disk`
Thanks for helping out! Does this approach work with `s3fs`? e.g. something like this: ```python import s3fs s3 = s3fs.S3FileSystem(anon=True) with s3.open('mybucket/new-file.parquet', 'w') as f: ds.to_parquet(f) ``` This is instead of `save_to_disk` to save to an S3 bucket. Otherwise, I am not sure how to make this work when saving the dataset to an S3 bucket. Would `dataset.set_format("arrow")` work as a replacement?
### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10
62
Unable to load dataset that was saved with `save_to_disk` ### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10 Thanks for helping out! Does this approach work with `s3fs`? e.g. something like this: ```python import s3fs s3 = s3fs.S3FileSystem(anon=True) with s3.open('mybucket/new-file.parquet', 'w') as f: ds.to_parquet(f) ``` This is instead of `save_to_disk` to save to an S3 bucket. Otherwise, I am not sure how to make this work when saving the dataset to an S3 bucket. Would `dataset.set_format("arrow")` work as a replacement?
[ -0.2697997987270355, -0.2308146208524704, 0.030646875500679016, 0.22574281692504883, 0.2770352363586426, 0.08060675114393234, 0.2174036204814911, 0.05919964984059334, -0.023901401087641716, -0.019737213850021362, -0.1480441689491272, 0.5424078702926636, -0.1469523012638092, 0.4429582953453064, 0.030650395900011063, 0.218910813331604, 0.34736111760139465, 0.10011360794305801, 0.3397734761238098, 0.16074427962303162, -0.2587556838989258, 0.13416263461112976, 0.11039398610591888, -0.11934769153594971, 0.10219907760620117, 0.1385236531496048, -0.0026058033108711243, 0.268808513879776, -0.06287841498851776, -0.47036945819854736, 0.4646208882331848, 0.1743946224451065, 0.3386506736278534, 0.36839696764945984, -0.00012384678120724857, -0.07102908939123154, 0.13817697763442993, -0.29080525040626526, -0.3616611063480377, -0.5412530899047852, -0.40543609857559204, -0.18837301433086395, 0.19777916371822357, -0.21477612853050232, -0.17181158065795898, 0.1508266180753708, -0.006499527022242546, -0.20810270309448242, 0.2585395574569702, -0.07013680785894394, 0.13686540722846985, 0.28629711270332336, -0.1588468998670578, -0.1470043808221817, 0.48709240555763245, 0.0667777806520462, -0.23310019075870514, 0.4232742190361023, 0.2411835640668869, 0.12488225102424622, 0.19079622626304626, 0.019446467980742455, -0.1325668841600418, 0.08738292753696442, 0.552271842956543, 0.10701296478509903, -0.09756875783205032, -0.23504114151000977, -0.3174699544906616, -0.0300433412194252, 0.6263813376426697, -0.31262633204460144, -0.6462462544441223, -0.42481374740600586, -0.14588326215744019, -0.09552671015262604, 0.10291870683431625, -0.019697068259119987, 0.23038429021835327, -0.0008716732263565063, -0.18834790587425232, -0.4732922613620758, -0.09852338582277298, 0.1232578381896019, 0.03975541144609451, 0.07981303334236145, -0.19616585969924927, 0.01428370550274849, 0.30052128434181213, -0.06162822246551514, 0.3760596215724945, -0.0612352192401886, 0.013436205685138702, -0.11475258320569992, -0.17988024652004242, -0.059675395488739014, 0.27844563126564026, -0.08498098701238632, -0.10152558237314224, 0.26990723609924316, 0.050742652267217636, 0.2041483223438263, -0.03614084795117378, 0.08425720036029816, 0.17790132761001587, 0.06773212552070618, 0.25576144456863403, 0.1326051503419876, 0.11187760531902313, 0.24653184413909912, 0.06945234537124634, -0.23208734393119812, -0.048422493040561676, -0.11800685524940491, 0.33638787269592285, -0.09100862592458725, 0.3683817982673645, -0.1273428350687027, -0.1676129400730133, -0.0718177855014801, 0.04317975789308548, -0.007345019839704037, -0.02814735472202301, 0.12564806640148163, 0.04865293577313423, -0.12054691463708878, -0.16668449342250824, 0.4303027391433716, -0.15261569619178772, 0.34024086594581604, -0.10384327918291092, -0.08842498064041138, -0.04872295260429382, 0.050347574055194855, 0.20671097934246063, -0.513447105884552, 0.09484385699033737, 0.14988850057125092, -0.11902409791946411, 0.04964737594127655, 0.027502553537487984, 0.18143855035305023, 0.25566565990448, -0.039414260536432266, 0.31249985098838806, 0.29497867822647095, 0.08687040209770203, -0.3222230076789856, -0.346690833568573, 0.22154167294502258, -0.500673770904541, -0.5158545970916748, -0.07360996305942535, 0.0886855199933052, -0.43894702196121216, -0.07127491384744644, -0.9495560526847839, -0.013807125389575958, -0.19066503643989563, -0.05324390530586243, 0.040567927062511444, 0.056637220084667206, -0.2790161967277527, -0.34262633323669434, 0.21865081787109375, 0.2365034967660904, -0.22913727164268494, 0.018554598093032837, -0.03387124836444855, -0.018855001777410507, 0.0792258232831955, 0.0144231878221035, -0.16800744831562042, 0.1837429404258728, -0.29755115509033203, 0.3282313942909241, 0.4623560309410095, -0.4189775884151459, -0.5644344091415405, -0.020207099616527557, -0.05056504160165787, 0.01370861567556858, -0.07226794213056564, 0.1361139565706253, 0.3248068690299988, -0.14086875319480896, 0.11353468149900436, 0.3768986463546753, 0.026532940566539764, 0.057595402002334595, -0.12926703691482544, -0.04715215787291527, 0.07645587623119354, 0.09864309430122375, -0.20762474834918976, 0.24895235896110535, 0.22673079371452332, 0.3168891668319702, -0.06613451987504959, -0.18433040380477905, 0.17102256417274475, 0.274213045835495, 0.6226645708084106, -0.015116855502128601, -0.19005320966243744, -0.1690053641796112, -0.36733219027519226, 0.34289655089378357, 0.30830201506614685, -0.19984060525894165, 0.08894941210746765, -0.13688254356384277, -0.37299272418022156, -0.17009185254573822, -0.3539596199989319, 0.28017717599868774, -0.04645087569952011, 0.14527663588523865, 0.0381549708545208, -0.14215491712093353, -0.1980617195367813, 0.09404414147138596, 0.14213216304779053, -0.029886826872825623, -0.46491268277168274, 0.529056966304779, 0.0059952642768621445, -0.2735716998577118, 0.04974724352359772, -0.06937775760889053, 0.19611185789108276, -0.20243598520755768, -0.029587961733341217, 0.28570234775543213, -0.0018441029824316502, 0.5210240483283997, 0.09951973706483841, 0.30155205726623535, 0.1015477403998375, -0.11253750324249268, 0.02807515114545822, 0.08113011717796326, 0.16365577280521393, 0.016364887356758118, -0.5392520427703857, 0.39621108770370483, -0.2585727572441101, 0.15641441941261292, -0.09654024243354797, -0.2945570945739746, 0.18888115882873535, -0.08696462959051132, -0.09987863153219223, -0.12609437108039856, -0.09176667034626007, 0.07672122120857239, -0.058075301349163055, -0.188712939620018, -0.19714169204235077, 0.20622944831848145, 0.18201731145381927, -0.01694493368268013, 0.17569339275360107, 0.2442222237586975, 0.16073721647262573, -0.15361163020133972, 0.008057788945734501, 0.4022524654865265, 0.25167006254196167, 0.0859190970659256, 0.24227601289749146, -0.021881842985749245, 0.06253331154584885, 0.007540285587310791, 0.22595304250717163, -0.03107733279466629, 0.22597655653953552, 0.3898252248764038, 0.2336864173412323, -0.023719366639852524, -0.08630375564098358, 0.07681269943714142, 0.0003622472286224365, 0.06632247567176819, -0.4811689257621765, 0.15289302170276642, -0.1303749829530716, 0.030215531587600708, 0.014545619487762451, -0.1660822033882141, -0.18042916059494019, -0.3389400541782379, -0.11845864355564117, 0.8449249267578125, 0.011180292814970016, -0.0424351766705513, -0.11298952996730804, 0.15360026061534882, -0.04111805558204651, -0.3591102063655853, -0.06753694266080856, 0.0006794547662138939, 0.07077324390411377, -0.04255593940615654, 0.18423059582710266, 0.10633120685815811, 0.44121265411376953, -0.24893492460250854, 0.19199877977371216, -0.565832257270813, -0.06060771644115448, 0.07056652009487152, -0.08173924684524536, 0.4823736250400543, 0.20112919807434082, 0.04449603334069252, -0.2531295418739319, -0.11840716749429703, 0.29203712940216064, -0.09537093341350555, -0.17490775883197784, 0.00016671791672706604, -0.18830277025699615, 0.10169433802366257, 0.10710655152797699, -0.14262601733207703, -0.07326119393110275, -0.4351625442504883, 0.051207948476076126, -0.1085217148065567, -0.01483587920665741, -0.2358434498310089, -0.02130678854882717, -0.021057724952697754, 0.37642011046409607, -0.2674245834350586, -0.2113269865512848, -0.5121284127235413, 0.469273179769516, -0.09433522820472717, -0.04751989617943764, 0.07566028833389282, 0.015118978917598724, -0.2192380428314209, 0.16473239660263062, -0.3214113116264343, -0.19205063581466675, 0.013298957608640194, 0.09945721924304962, -0.09532147645950317, 0.22831571102142334, 0.16737160086631775, 0.19068078696727753, 0.07059475779533386, -0.08875560760498047, -0.39031821489334106, -0.15848147869110107, 0.5940849781036377, 0.20306748151779175, 0.10789652913808823, 0.34784135222435, -0.00360267236828804, 0.5590726733207703, -0.06606032699346542, 0.11403822898864746, 0.7454588413238525, -0.07537820190191269, 0.2569315731525421, -0.21488717198371887, -0.28616493940353394, -0.5530029535293579, -0.21585118770599365, -0.050970789045095444, 0.02589496225118637, -0.0034624133259058, -0.09809622168540955, -0.016210369765758514, -0.41078850626945496, -0.35374587774276733, -0.25638118386268616, 0.1237577348947525, -0.18928854167461395, 0.01217479258775711, -0.12262962758541107, -0.06163926422595978, -0.11585374176502228, -0.15625783801078796, 0.12820737063884735, -0.047736793756484985, 0.5644429326057434, -0.07688590884208679, -0.17085100710391998, 0.09021874517202377, -0.6576680541038513, 0.07036563754081726, 0.0646129921078682, 0.11774428188800812, 0.17216461896896362, -0.017785705626010895, 0.03327805921435356, -0.20068620145320892, 0.8850468397140503, -0.4293307662010193, 0.4524630308151245, 0.3042381703853607, -0.23187124729156494, -0.6686514616012573, -0.08173662424087524, -0.17448244988918304, 0.2786463797092438, -0.26291781663894653, 0.84342360496521, -0.21899273991584778, -0.014811879023909569, -0.3963671326637268, 0.10870876908302307, -0.16832420229911804, -0.08194444328546524, -0.07384106516838074, -0.23875364661216736, -0.4534754753112793, -0.03533793240785599, 0.07649239152669907, 0.15528081357479095, 0.09117729216814041, 0.07019680738449097, -0.21816547214984894, 0.09115445613861084, 0.10187079757452011, -0.06891162693500519, 0.5070484280586243, 0.2719687223434448, 0.31336328387260437, 0.13855156302452087, -0.16752679646015167, 0.42979273200035095, 0.7461705207824707, 0.11455263197422028, -0.24997210502624512, 0.0034293346107006073, 0.19769622385501862, 0.06153322383761406, 0.18177491426467896, 0.2821202278137207, 0.08580884337425232, -0.16370157897472382, -0.050154730677604675, -0.6311736106872559, -0.12103811651468277, -0.09847632050514221, -0.11204254627227783, -0.11830304563045502, -0.08315067738294601, 0.5568256974220276, -0.06577590107917786, -0.1024654358625412, 0.08400516211986542, 0.3356626629829407, -0.3381728529930115, 0.5220882892608643, 0.2043546587228775, 0.827913224697113, -0.021654322743415833, 0.2810506224632263, 0.327202707529068, -0.17254593968391418, 0.2410748451948166, -0.08015143126249313, -0.06663190573453903, -0.43465957045555115, -0.21738241612911224, -0.08456669002771378, -0.19560478627681732, -0.26863566040992737, 0.2676229774951935, -0.06754478812217712, 0.3546092212200165, -0.3686925768852234, 0.17698997259140015, -0.23123867809772491, 0.23490801453590393, -0.26409482955932617, -0.247264564037323, -0.4889479875564575, 0.0419001430273056, 0.03602852299809456, 0.06792253255844116, -0.13404537737369537, -0.05269622802734375, -0.08751703798770905, 0.08221405744552612, -0.125472754240036, 0.1928100883960724, 0.44698411226272583, 0.17773351073265076, -0.23923125863075256, -0.3879740834236145, 0.23336711525917053, 0.06838749349117279, 0.431344211101532, -0.0465775690972805, -0.26272284984588623, -0.008019968867301941, 0.049971505999565125, 0.09529688209295273, -0.0551784373819828, -0.15849412977695465, 0.24136830866336823, 0.002218984067440033, -0.1933896690607071, -0.2705788016319275, 0.08624299615621567, -0.4884035587310791, 0.05013886094093323, 0.08497728407382965, -0.08535180985927582, -0.37004050612449646, -0.5132198333740234, 0.004364706575870514, 0.20514342188835144, -0.2409903109073639, 0.04922163859009743, 0.03589940816164017, 0.027495840564370155, 0.12077423930168152, -0.10764627158641815, -0.09498940408229828, 0.042722515761852264, 0.5779867768287659, -0.1987384557723999, 0.18082135915756226, 0.22559788823127747, -0.03999554365873337, -0.16794057190418243, -0.046756356954574585, 0.27161726355552673, 0.3098158836364746, -0.0845959410071373, 0.3261790871620178, -0.34616565704345703, 0.19462762773036957, -0.06440199166536331, 0.12889458239078522, 0.3944556713104248, 0.027309931814670563, 0.019839439541101456, -0.2003391832113266, 0.13471917808055878, 0.11145757138729095, 0.3465438485145569, 0.33165305852890015, -0.09216465055942535, -0.6818605065345764, -0.1644129753112793, -0.3296869099140167, -0.20210349559783936, 0.39154061675071716, -0.06745247542858124, 0.22996416687965393, 0.09905607253313065, 0.11662047356367111, 0.03857578709721565, -0.47671961784362793, -0.06389488279819489, -0.08487183600664139, -0.15431150794029236, -0.14594313502311707, -0.22709445655345917, 0.18973921239376068, 0.04868582636117935, -0.15635590255260468, 0.034484896808862686, -0.18449826538562775, -0.046209629625082016, -0.23353391885757446, 0.11192120611667633, 0.520887017250061, 0.14512059092521667, -0.023600956425070763, 0.5085894465446472, -0.04755888134241104, -0.19371573626995087, 0.026882633566856384, 0.27779221534729004, 0.23297668993473053, -0.18581511080265045, 0.30359771847724915, -0.03875323012471199, -0.0037729665637016296, -0.22257044911384583, 0.13950875401496887, 0.4198527932167053, 0.23673656582832336, 0.21964815258979797, -0.1781984269618988, 0.03133721277117729, 0.26697689294815063, 0.537441611289978, 0.26548612117767334, -0.24968233704566956, -0.055844902992248535, 0.13367578387260437, 0.1482992321252823, 0.0049118772149086, -0.40814223885536194, 0.14951223134994507, -0.052085030823946, -0.10858915746212006, 0.027371451258659363, 0.2310139238834381, 0.23352372646331787, -0.4568667411804199, 0.05534311383962631, 0.5119490623474121, 0.07780662178993225, 0.16770105063915253, -0.04030212387442589, -0.15198883414268494, 0.0039670951664447784, 0.3468223512172699, -0.07694584131240845, 0.21894106268882751, 0.22687329351902008, 0.2965713143348694, 0.28570884466171265, 0.2976275682449341, 0.38674065470695496, -0.060237087309360504, -0.3443126380443573, 0.04234246537089348, -0.1357852816581726, 0.06795614957809448, 0.10519635677337646, 0.138172447681427, 0.006990343332290649, -0.11839865893125534, -0.1406341791152954, -0.06998372077941895, 0.246012344956398, -0.13227632641792297, -0.3871363699436188, -0.03374301642179489, -0.2084033191204071, 0.16253915429115295, 0.3267480731010437, -0.29412657022476196, -0.3431857228279114, -0.06236891448497772, 0.04295673966407776, 0.22278255224227905, 0.13638481497764587, 0.2396777868270874, 0.003423098474740982, 0.21721762418746948, -0.2746937572956085, 0.027216196060180664, -0.13942362368106842, -0.2173876166343689, -0.06710691750049591, 0.2502650022506714, 0.3560336232185364, -0.024009138345718384, -0.05922604724764824, 0.21948453783988953, 0.1722085177898407, -0.021303104236721992, 0.06404998898506165, 0.006786530837416649, -0.1647188365459442, 0.023487387225031853, 0.1869410127401352, 0.1477949172258377, -0.11370197683572769, 0.036724213510751724, -0.12883102893829346, 0.15524742007255554, -0.046712860465049744, -0.006938822567462921, 0.18066807091236115, -0.029650185257196426, 0.20698422193527222, 0.17604099214076996, -0.09844578802585602, -0.16863910853862762, 0.6597705483436584, 0.04791262000799179, 0.2702121138572693, 0.13901174068450928, 0.04329496622085571, 0.10740184783935547, 0.3188362121582031, 0.08139603585004807, -0.1311640739440918, -0.25731006264686584, 0.16094951331615448, -0.5312449932098389, 0.0374767929315567, 0.11926139891147614, 0.15891999006271362, 0.3025491237640381, 0.2929558753967285, 0.023590125143527985, 0.18151600658893585, -0.10719914734363556, 0.1069018542766571, -0.14918266236782074, 0.3072708249092102, 0.04278171434998512, -0.14707671105861664, 0.01628105714917183, 0.016763553023338318, -0.19463828206062317, -0.4632583558559418, 0.03946278989315033, -0.12691564857959747, -0.0853886529803276, -0.013915285468101501, 0.04073909670114517, 0.09600284695625305, -0.11950686573982239, 0.4731716811656952, -0.057199493050575256, 0.26998376846313477, -0.25167450308799744, 0.052657559514045715, 0.08289137482643127, -0.34628283977508545, -0.11369401961565018, 0.18212223052978516, -0.2813721299171448, 0.4215848445892334, -0.2171577662229538, 0.1369331181049347, -0.47897225618362427, -0.00894747581332922, -0.008514471352100372, 0.2109597623348236, -0.19642315804958344, 0.1532735973596573, -0.3757222592830658, -0.011460397392511368, -0.02095462754368782, 0.07550602406263351, -0.09834831953048706, 0.33969491720199585, -0.16487489640712738, -0.30112603306770325, 0.37638169527053833, -0.290056049823761, -0.24630942940711975, 0.01545471977442503, 0.03325650095939636, 0.34136348962783813, 0.022317908704280853, -0.31252366304397583, 0.11755768209695816, 0.41679900884628296, -0.1432320475578308, -0.16320498287677765, 0.2254721224308014, -0.14790745079517365, 0.05286579206585884, -0.07424753904342651, 0.45908960700035095, 0.02878938801586628, -0.1385551393032074, -0.05487173795700073, -0.31896132230758667 ]
https://github.com/huggingface/datasets/issues/6703
Unable to load dataset that was saved with `save_to_disk`
> `load_dataset` does't support S3 buckets unfortunately :/ I am aware but I have some code that downloads it to disk before using that method. The most important part is to store it in a format that load_dataset is compatible with.
### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10
41
Unable to load dataset that was saved with `save_to_disk` ### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10 > `load_dataset` does't support S3 buckets unfortunately :/ I am aware but I have some code that downloads it to disk before using that method. The most important part is to store it in a format that load_dataset is compatible with.
[ -0.29518213868141174, -0.2976222634315491, -0.004652578383684158, 0.31327882409095764, 0.3060505986213684, 0.10661236196756363, 0.22580881416797638, 0.07345271110534668, 0.1754525899887085, 0.047191865742206573, -0.22156479954719543, 0.5398899912834167, -0.1510135680437088, 0.3990465998649597, 0.026432905346155167, 0.15369132161140442, 0.3220508396625519, 0.13611137866973877, 0.22269822657108307, 0.14324761927127838, -0.3283194899559021, 0.12763436138629913, 0.008856594562530518, -0.18374823033809662, 0.03174895793199539, 0.11912277340888977, 0.042748644948005676, 0.3039371371269226, 0.05969157814979553, -0.4830440878868103, 0.4386419951915741, 0.10640022158622742, 0.36375781893730164, 0.39033183455467224, -0.0001231449714396149, 0.04871481657028198, 0.09482252597808838, -0.29602864384651184, -0.338741660118103, -0.5070008635520935, -0.23310795426368713, -0.13122569024562836, 0.1447102427482605, -0.2213517725467682, -0.18259549140930176, 0.15052993595600128, -0.03525447100400925, -0.19141413271427155, 0.29998302459716797, -0.015067272819578648, 0.14944645762443542, 0.38685503602027893, -0.04276880994439125, -0.1801830381155014, 0.28532978892326355, -0.02173507958650589, -0.2780585289001465, 0.35027867555618286, 0.18324759602546692, 0.12467330694198608, 0.16618216037750244, 0.019602293148636818, -0.17450246214866638, 0.06782276928424835, 0.4766167104244232, 0.08603750914335251, 0.03210199624300003, -0.26636675000190735, -0.34343674778938293, -0.06053853780031204, 0.5896403789520264, -0.35413482785224915, -0.586769700050354, -0.3373737335205078, -0.16384243965148926, -0.1411515474319458, 0.17736920714378357, -0.10750717669725418, 0.1175178587436676, 0.1126362532377243, -0.2274351418018341, -0.48691171407699585, -0.1553402841091156, 0.14052900671958923, 0.04237717390060425, 0.18310754001140594, -0.112421415746212, -0.022898569703102112, 0.35474008321762085, 0.07059381902217865, 0.5103439092636108, -0.032479897141456604, 0.06484801322221756, -0.06439964473247528, -0.19935207068920135, -0.04814779385924339, 0.31410694122314453, -0.131600022315979, -0.04113595187664032, 0.2662045955657959, 0.0425587072968483, 0.09842795133590698, -0.13344097137451172, 0.04201202467083931, 0.12787403166294098, 0.1937645673751831, 0.16674582660198212, 0.1389646679162979, 0.2021203637123108, 0.21878747642040253, 0.07655160129070282, -0.1776328682899475, -0.012908495031297207, -0.103553406894207, 0.36704525351524353, -0.07894568890333176, 0.2902457118034363, -0.1250857263803482, -0.22637909650802612, -0.10345576703548431, 0.03171015530824661, 0.025029432028532028, -0.01679796725511551, 0.21535107493400574, -0.008574438281357288, -0.08337308466434479, -0.12706926465034485, 0.3883572220802307, -0.19767089188098907, 0.3436875343322754, -0.12806634604930878, -0.10872194170951843, 0.001606721431016922, 0.06652828305959702, 0.3280063271522522, -0.6273345947265625, 0.20368385314941406, 0.16671781241893768, -0.04347768425941467, 0.029976002871990204, 0.048834651708602905, 0.20728348195552826, 0.2678160071372986, 0.14073796570301056, 0.35796207189559937, 0.27689674496650696, 0.11879865825176239, -0.26999396085739136, -0.33587703108787537, 0.32807663083076477, -0.5085000395774841, -0.6167603731155396, -0.03156541287899017, 0.09300433844327927, -0.3894233703613281, -0.08714532852172852, -0.7726184129714966, -0.07867053151130676, -0.06553968042135239, -0.05939468741416931, -0.020459644496440887, 0.03553713485598564, -0.2497120350599289, -0.42048048973083496, 0.28239545226097107, 0.26795288920402527, -0.23921965062618256, 0.05607156455516815, -0.13970474898815155, -0.11744976043701172, 0.004559628665447235, 0.06253278255462646, -0.0680544450879097, 0.23744022846221924, -0.3515101969242096, 0.2012930065393448, 0.31758391857147217, -0.5400978922843933, -0.6538980603218079, -0.02870226837694645, -0.05606931447982788, -0.0021367575973272324, -0.0671001747250557, 0.24573713541030884, 0.19205482304096222, -0.11967004090547562, 0.284365177154541, 0.487171471118927, 0.0728454440832138, 0.06720789521932602, -0.10511656105518341, -0.04243230074644089, 0.08108270913362503, 0.20550307631492615, -0.1968899518251419, 0.30578839778900146, 0.2093454897403717, 0.29594579339027405, -0.07877228409051895, -0.10406206548213959, 0.11385799199342728, 0.2936176061630249, 0.5387747883796692, -0.18525852262973785, -0.18284614384174347, -0.22588756680488586, -0.40336886048316956, 0.31783097982406616, 0.21647655963897705, -0.1728811115026474, 0.08896834403276443, -0.08420009911060333, -0.4519568383693695, -0.056645430624485016, -0.37685272097587585, 0.2505408227443695, -0.045857179909944534, 0.0003757104277610779, 0.08281634747982025, -0.10610269010066986, -0.19716180860996246, 0.25421929359436035, 0.1243007481098175, -0.035267844796180725, -0.508557915687561, 0.5175532102584839, -0.05206611752510071, -0.25291383266448975, 0.03039982169866562, 0.03161833807826042, 0.13742753863334656, -0.19047479331493378, -0.05811377614736557, 0.2835947871208191, 0.03181653097271919, 0.3922141194343567, -0.01574902981519699, 0.24613633751869202, 0.12240096926689148, -0.1043843924999237, 0.08380221575498581, 0.182550847530365, 0.1251242756843567, -0.0821736603975296, -0.4614655077457428, 0.4088684320449829, -0.23055516183376312, 0.14186307787895203, -0.10173093527555466, -0.2172023206949234, 0.2095380276441574, -0.1319691240787506, -0.026721006259322166, -0.19613991677761078, -0.05581438168883324, 0.011588551104068756, -0.004089981317520142, -0.14250719547271729, -0.21802566945552826, 0.13701647520065308, 0.21263465285301208, -0.007572803646326065, 0.21155491471290588, 0.1556415557861328, 0.09332308173179626, -0.1439511477947235, 0.03416857868432999, 0.20119772851467133, 0.3192162811756134, 0.05925401300191879, 0.08004972338676453, 0.06870377063751221, -0.06968099623918533, -0.05733584240078926, 0.17519931495189667, -0.06554055213928223, 0.20928627252578735, 0.47987768054008484, 0.21942588686943054, -0.04961550608277321, -0.09787146747112274, 0.07718066871166229, -0.06578965485095978, 0.10278376191854477, -0.5121228098869324, 0.11326392740011215, -0.13467122614383698, 0.047514528036117554, 0.004709765315055847, -0.19806183874607086, -0.24578511714935303, -0.28495123982429504, -0.08952638506889343, 0.8407347202301025, 0.006241463124752045, -0.014354346320033073, -0.15335899591445923, 0.1540130078792572, 0.03325746953487396, -0.5023797750473022, -0.034250061959028244, 0.07292453944683075, 0.05263355374336243, -0.050874315202236176, 0.08965054154396057, 0.08221962302923203, 0.4507817327976227, -0.25942930579185486, 0.1273203343153, -0.46570107340812683, -0.01665658876299858, 0.03911825641989708, -0.009691596031188965, 0.5262439250946045, 0.1465214192867279, 0.0862354263663292, -0.22068168222904205, -0.09393279254436493, 0.20984512567520142, -0.09657322615385056, -0.2126089334487915, 0.09072596579790115, -0.20449596643447876, 0.08927449584007263, 0.08353462815284729, -0.32112857699394226, -0.19869329035282135, -0.5178676843643188, -0.05313316732645035, -0.09073680639266968, 0.04936780035495758, -0.17654326558113098, 0.027149014174938202, -0.07558387517929077, 0.4944589138031006, -0.30268675088882446, -0.2041723132133484, -0.4291030764579773, 0.5067651867866516, -0.20448996126651764, -0.06156950816512108, 0.09046193957328796, 0.01898840442299843, -0.1904950737953186, 0.11751227080821991, -0.4223536252975464, -0.2443995624780655, -0.04635613411664963, 0.1754383146762848, -0.14213907718658447, 0.26086723804473877, 0.12812504172325134, 0.2192111313343048, 0.08569414168596268, -0.07904556393623352, -0.39391157031059265, -0.07682307809591293, 0.4816434681415558, 0.25167128443717957, 0.13799893856048584, 0.3244555592536926, -0.08703333139419556, 0.5587735176086426, 0.10721312463283539, 0.1336337774991989, 0.7411726713180542, -0.02042369730770588, 0.2916824221611023, -0.326433390378952, -0.2894585430622101, -0.5461289286613464, -0.13102948665618896, -0.07743506133556366, -0.0174039825797081, 0.0734376609325409, -0.08915261924266815, -0.04674741253256798, -0.38126498460769653, -0.24992311000823975, -0.26968660950660706, 0.11182036250829697, -0.13122285902500153, 0.03001229092478752, -0.10142874717712402, 0.014142759144306183, -0.14600570499897003, -0.1793321669101715, 0.10077320039272308, 0.00011099129915237427, 0.47324249148368835, -0.06192303076386452, -0.1803387701511383, -0.025986796244978905, -0.6605522632598877, 0.04532337188720703, 0.03267144411802292, 0.17984063923358917, 0.1729719042778015, 0.025801967829465866, 0.07248104363679886, -0.14453382790088654, 0.9262557029724121, -0.4140707850456238, 0.38630640506744385, 0.3812856674194336, -0.1759483963251114, -0.5840208530426025, -0.025974472984671593, -0.1097072884440422, 0.3461310565471649, -0.2549929618835449, 0.8096612095832825, -0.1985694169998169, -0.0599411316215992, -0.27992120385169983, 0.23768043518066406, -0.20189861953258514, -0.2721520960330963, -0.13870789110660553, -0.37358155846595764, -0.41873422265052795, -0.06551051884889603, 0.08281209319829941, 0.1824091076850891, -0.07227595895528793, -0.005047660320997238, -0.17552550137043, -0.00703156553208828, 0.13415513932704926, -0.09345327317714691, 0.5051488280296326, 0.18249346315860748, 0.37417352199554443, 0.22234152257442474, -0.192620187997818, 0.3404585123062134, 0.7621312141418457, -0.03570651635527611, -0.17143568396568298, -0.030146174132823944, 0.2350967526435852, 0.05035296455025673, 0.14089030027389526, 0.19066619873046875, 0.06271885335445404, -0.17814643681049347, -0.12557503581047058, -0.5375679731369019, -0.15323379635810852, -0.15092840790748596, -0.15403535962104797, -0.25100845098495483, -0.2562866508960724, 0.6024159789085388, 0.007594853639602661, -0.09005632251501083, 0.1829017549753189, 0.1661035120487213, -0.304862916469574, 0.49811577796936035, 0.043066930025815964, 0.8128415942192078, -0.028992392122745514, 0.3240901529788971, 0.381895512342453, 0.07191592454910278, 0.142173632979393, -0.07267284393310547, -0.006363319233059883, -0.4613003432750702, -0.1996799260377884, -0.039274901151657104, -0.22582606971263885, -0.310797780752182, 0.23924534022808075, -0.09630538523197174, 0.3529139757156372, -0.5051814317703247, 0.13907445967197418, -0.2248663753271103, 0.21124380826950073, -0.28546106815338135, -0.3262404501438141, -0.5332247614860535, 0.023177005350589752, 0.0944674089550972, 0.11197568476200104, -0.11076699942350388, -0.025727789849042892, -0.044093288481235504, 0.07655969262123108, -0.1445823460817337, 0.17780545353889465, 0.47284460067749023, 0.2968173623085022, -0.21091459691524506, -0.33695071935653687, 0.24003246426582336, 0.13716663420200348, 0.49387192726135254, 0.03846004232764244, -0.29665637016296387, -0.027049075812101364, -0.09787697345018387, 0.0831880196928978, 0.03126182779669762, -0.05999727174639702, 0.29996949434280396, -0.022993920370936394, -0.29503509402275085, -0.17123737931251526, 0.05603569746017456, -0.5259672999382019, -0.020035937428474426, 0.04507710039615631, -0.14867673814296722, -0.3252297341823578, -0.4102156460285187, -0.01667466014623642, 0.2504074275493622, -0.26250842213630676, 0.07215011119842529, 0.09259727597236633, 0.07362344861030579, 0.27794063091278076, -0.11999285221099854, -0.17197608947753906, 0.011166790500283241, 0.5855209827423096, -0.10027632862329483, 0.02061259001493454, 0.24141864478588104, 0.027707111090421677, -0.1269335150718689, -0.08339448273181915, 0.2986321449279785, 0.17143461108207703, -0.07237879186868668, 0.42164820432662964, -0.2293729931116104, 0.2130075842142105, -0.0975431501865387, 0.1867487132549286, 0.3950068950653076, -0.030975885689258575, -0.0324518159031868, -0.2600363790988922, -0.02166145108640194, 0.11259730905294418, 0.4016711413860321, 0.35867995023727417, -0.07969945669174194, -0.5665666460990906, -0.21686092019081116, -0.23541259765625, -0.21430093050003052, 0.2935396432876587, -0.12750715017318726, 0.11222340911626816, 0.01728276163339615, 0.1753777265548706, 0.07405785471200943, -0.3741104006767273, -0.057092756032943726, -0.13768361508846283, -0.2080496847629547, -0.14048010110855103, -0.2433827519416809, 0.20179511606693268, 0.010416078381240368, -0.17579694092273712, 0.04558103159070015, -0.29785019159317017, -0.11048872768878937, -0.20529475808143616, 0.19017818570137024, 0.5821883678436279, 0.11856596171855927, 0.0002563381567597389, 0.4546775817871094, 0.049307286739349365, -0.10974131524562836, 0.18471339344978333, 0.29781869053840637, 0.21567092835903168, -0.14398682117462158, 0.2935612201690674, -0.0794033408164978, 0.009247668087482452, -0.19365224242210388, 0.021401841193437576, 0.42235660552978516, 0.21434956789016724, 0.2193167507648468, -0.2009708434343338, 0.017109960317611694, 0.2498597949743271, 0.42050060629844666, 0.2258058488368988, -0.32150521874427795, 0.1181291788816452, 0.14987435936927795, 0.15938378870487213, -0.025064846500754356, -0.3710061013698578, 0.15271534025669098, -0.013232202269136906, -0.12454992532730103, 0.08737985789775848, 0.27100056409835815, 0.22688552737236023, -0.32677310705184937, 0.09974800050258636, 0.5999056100845337, 0.10013250261545181, 0.12314581871032715, 0.04531767591834068, -0.07250573486089706, 0.03166380897164345, 0.31694695353507996, -0.07033081352710724, 0.28631848096847534, 0.41156327724456787, 0.2281203269958496, 0.24615810811519623, 0.18503955006599426, 0.3868701159954071, -0.14390307664871216, -0.36958327889442444, 0.0524018220603466, -0.14932659268379211, -0.04458525776863098, 0.12987425923347473, 0.09753461927175522, 0.07516490668058395, -0.2579613924026489, -0.09005346894264221, -0.2089432030916214, 0.2642587125301361, -0.11131810396909714, -0.3523615598678589, 0.014668390154838562, -0.2251671850681305, 0.2755347788333893, 0.34048670530319214, -0.20696526765823364, -0.38806116580963135, -0.013659745454788208, 0.06428002566099167, 0.11022740602493286, 0.06935355067253113, 0.31740084290504456, 0.10817919671535492, 0.18156129121780396, -0.22744396328926086, 0.05287571996450424, -0.09109824895858765, -0.17105095088481903, -0.05677967891097069, 0.07712766528129578, 0.4139658808708191, 0.06189130246639252, -0.0746387243270874, 0.2151571363210678, 0.1386088728904724, -0.04318546503782272, 0.02606143057346344, 0.14048191905021667, -0.14845140278339386, 0.03453505411744118, 0.19112826883792877, 0.12718236446380615, -0.11857837438583374, -0.06739544868469238, -0.04166507348418236, 0.2616993188858032, -0.08949559926986694, 0.19056811928749084, 0.10196983069181442, -0.14383962750434875, 0.16439953446388245, 0.1108594685792923, -0.12011390924453735, -0.10081996768712997, 0.664251446723938, 0.013713683933019638, 0.17956748604774475, 0.007709577679634094, 0.04789678752422333, 0.0375782735645771, 0.34241580963134766, 0.09412188827991486, 0.02269110083580017, -0.21480093896389008, 0.1576234996318817, -0.5719927549362183, 0.07169176638126373, 0.15106484293937683, 0.20157529413700104, 0.25568896532058716, 0.12935400009155273, -0.0650307908654213, 0.17815113067626953, -0.12469804286956787, 0.10564282536506653, 0.05856785923242569, 0.28298187255859375, 0.009505026042461395, -0.1846020519733429, 0.03153792768716812, 0.04048110544681549, -0.20104409754276276, -0.5015513896942139, -0.005936127156019211, -0.057406675070524216, -0.1049029529094696, -0.1752629578113556, 0.18133535981178284, 0.20038533210754395, 0.050554417073726654, 0.4738869071006775, 0.013794130645692348, 0.3696036636829376, -0.1976662278175354, 0.0752921849489212, -0.01610395684838295, -0.391353964805603, -0.11494719982147217, -0.08844780176877975, -0.20029231905937195, 0.32636719942092896, -0.29645398259162903, 0.002543654292821884, -0.41975897550582886, 0.1684749573469162, -0.0040552616119384766, 0.2657468020915985, -0.2659952640533447, 0.13961999118328094, -0.4643784761428833, 0.0021764226257801056, 0.047066740691661835, 0.10663126409053802, -0.06618957966566086, 0.32139578461647034, -0.10689517855644226, -0.3190903067588806, 0.37299561500549316, -0.20298995077610016, -0.2568412721157074, 0.006156647577881813, 0.032908253371715546, 0.17594382166862488, -0.009815504774451256, -0.31499946117401123, 0.09028735011816025, 0.41876524686813354, -0.15259701013565063, -0.18957701325416565, 0.38770562410354614, -0.13649562001228333, 0.10142788290977478, -0.029246089980006218, 0.48562198877334595, 0.04263470321893692, -0.16721560060977936, 0.03151385113596916, -0.33272165060043335 ]
https://github.com/huggingface/datasets/issues/6703
Unable to load dataset that was saved with `save_to_disk`
I ended up with this. Not ideal to save to local disk, but it works and loads via `load_datasets` after downloading from S3 with another method. ```python with tempfile.TemporaryDirectory() as dir: dataset_nbytes = ds._estimate_nbytes() max_shard_size_local = convert_file_size_to_int(max_shard_size) num_shards = int(dataset_nbytes / max_shard_size_local) + 1 for shard_idx in range(num_shards): shard = ds.shard(index=shard_idx, num_shards=num_shards) shard.to_parquet(f"{dir}/{shard_idx:05d}.parquet") fs.upload( lpath=dir, rpath=s3_path, recursive=True, ) ```
### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10
59
Unable to load dataset that was saved with `save_to_disk` ### Describe the bug I get the following error message: You are trying to load a dataset that was saved using `save_to_disk`. Please use `load_from_disk` instead. ### Steps to reproduce the bug 1. Save a dataset with `save_to_disk` 2. Try to load it with `load_datasets` ### Expected behavior I am able to load the dataset again with `load_datasets` which most packages uses over `load_from_disk`. I want to have a workaround that allows me to create the same indexing that `push_to_hub` creates for you before using `save_to_disk` - how can that be achieved? ### Environment info datasets 2.17.1, python 3.10 I ended up with this. Not ideal to save to local disk, but it works and loads via `load_datasets` after downloading from S3 with another method. ```python with tempfile.TemporaryDirectory() as dir: dataset_nbytes = ds._estimate_nbytes() max_shard_size_local = convert_file_size_to_int(max_shard_size) num_shards = int(dataset_nbytes / max_shard_size_local) + 1 for shard_idx in range(num_shards): shard = ds.shard(index=shard_idx, num_shards=num_shards) shard.to_parquet(f"{dir}/{shard_idx:05d}.parquet") fs.upload( lpath=dir, rpath=s3_path, recursive=True, ) ```
[ -0.23714160919189453, -0.3796793222427368, 0.017580054700374603, 0.33242297172546387, 0.27241867780685425, -0.024656180292367935, 0.23909592628479004, 0.10268627107143402, 0.056728262454271317, 0.10482403635978699, -0.14215296506881714, 0.5375565886497498, -0.16890425980091095, 0.4568025469779968, 0.06570713967084885, 0.1701970398426056, 0.32186952233314514, 0.09090771526098251, 0.22390000522136688, 0.08575542271137238, -0.21417270600795746, 0.1882931888103485, 0.09582400321960449, -0.1178886741399765, -0.0055292872712016106, 0.2505517899990082, 0.009027073159813881, 0.4219784140586853, 0.022742323577404022, -0.43612441420555115, 0.460247278213501, -0.03327705338597298, 0.42297905683517456, 0.3300420641899109, -0.0001226308522745967, 0.0441102534532547, 0.17747585475444794, -0.28462377190589905, -0.2637428045272827, -0.40727120637893677, -0.26450198888778687, -0.19444361329078674, 0.09581825882196426, -0.25288665294647217, -0.10665739327669144, 0.2514595687389374, -0.048411719501018524, -0.19064538180828094, 0.26012328267097473, 0.03193323686718941, 0.14206711947917938, 0.3149544894695282, -0.02247525379061699, -0.186379075050354, 0.4251578748226166, 0.09720136225223541, -0.3021864891052246, 0.23347695171833038, 0.18296901881694794, 0.19653767347335815, 0.19605892896652222, 0.043529707938432693, -0.1964113712310791, 0.025568582117557526, 0.46643057465553284, 0.1223544031381607, 0.06548682600259781, -0.16822008788585663, -0.24763396382331848, -0.01040608435869217, 0.4584803283214569, -0.354906290769577, -0.5364720225334167, -0.36190786957740784, -0.22074714303016663, -0.22783103585243225, 0.2069787085056305, -0.07063212990760803, 0.03764740377664566, 0.05162413418292999, -0.18649981915950775, -0.38919341564178467, -0.0686354860663414, 0.1273297518491745, 0.09577372670173645, 0.09414597600698471, -0.13802090287208557, 0.01698555052280426, 0.3534758687019348, -0.07609403878450394, 0.3797222971916199, -0.08424759656190872, 0.08896715939044952, -0.058838021010160446, -0.3774244785308838, 0.041602447628974915, 0.26322802901268005, -0.18029087781906128, -0.06044425070285797, 0.18827258050441742, -0.013497692532837391, 0.16102805733680725, -0.030450396239757538, 0.07650361955165863, 0.09312029182910919, 0.13426701724529266, 0.2517167031764984, 0.12300189584493637, 0.06535867601633072, 0.28697097301483154, 0.11880302429199219, -0.14330008625984192, 0.05505063757300377, -0.18014825880527496, 0.21591708064079285, -0.09719404578208923, 0.29009509086608887, -0.15036457777023315, -0.15624216198921204, -0.004384663887321949, 0.1319420337677002, 0.012742986902594566, -0.07311470061540604, 0.21925237774848938, 0.08758090436458588, -0.17447158694267273, -0.15789303183555603, 0.3400447368621826, -0.19161070883274078, 0.22747668623924255, -0.16831162571907043, -0.06050897017121315, 0.010359808802604675, 0.05135369300842285, 0.2801095247268677, -0.5883814096450806, 0.1253119260072708, 0.14922727644443512, 0.07343854010105133, 0.08523721992969513, -0.07561207562685013, 0.13985560834407806, 0.3692692220211029, 0.1017632707953453, 0.29796820878982544, 0.2764071822166443, 0.131184920668602, -0.44252902269363403, -0.31134459376335144, 0.3471183776855469, -0.4661637544631958, -0.5669147968292236, -0.07886949181556702, 0.10956631600856781, -0.44017165899276733, -0.040845394134521484, -0.8783056139945984, -0.08638487756252289, -0.07993926852941513, 0.00767139345407486, -0.10728194564580917, 0.002863820642232895, -0.32027027010917664, -0.4027983248233795, 0.38392511010169983, 0.2550716698169708, -0.29653438925743103, 0.11012415587902069, -0.21965666115283966, -0.13687221705913544, -0.0029280632734298706, 0.11565876007080078, -0.09712503105401993, 0.14318905770778656, -0.43401703238487244, 0.4426165223121643, 0.3126501142978668, -0.3805675208568573, -0.6866691708564758, -0.0002864039270207286, -0.0917971134185791, 0.01816381700336933, -0.020497538149356842, 0.17861731350421906, 0.24753984808921814, -0.05256786569952965, 0.15348803997039795, 0.4432060122489929, 0.14205041527748108, 0.02405705489218235, -0.2593604326248169, -0.07274262607097626, 0.0023333169519901276, 0.24392251670360565, -0.1011456698179245, 0.24063324928283691, 0.27552923560142517, 0.18159684538841248, 0.08155559748411179, -0.18701587617397308, 0.14834347367286682, 0.2784280776977539, 0.5461981296539307, -0.1443423181772232, -0.18738293647766113, -0.18209677934646606, -0.3523035943508148, 0.45142531394958496, 0.2566594183444977, -0.11515702307224274, 0.025871291756629944, -0.04140197113156319, -0.41267669200897217, -0.08576104044914246, -0.37027454376220703, 0.2681504786014557, -0.012859880924224854, 0.048731084913015366, 0.01756811887025833, -0.1061462014913559, -0.18999922275543213, 0.1285901814699173, -0.10523839294910431, -0.10590441524982452, -0.4972549080848694, 0.5848596692085266, -0.07200213521718979, -0.3211941123008728, -0.04465311020612717, -0.07421556860208511, 0.17162561416625977, -0.21835175156593323, -0.0648241862654686, 0.22035282850265503, 0.024922845885157585, 0.46989578008651733, 0.09343454241752625, 0.22335952520370483, 0.021386422216892242, -0.15508167445659637, 0.055141448974609375, 0.0688486248254776, 0.11810281127691269, -0.026444215327501297, -0.4169558584690094, 0.3805580139160156, -0.22222520411014557, 0.15646418929100037, -0.12386800348758698, -0.2328750491142273, 0.295648992061615, -0.21488915383815765, 0.052280016243457794, -0.1662134826183319, -0.015362348407506943, 0.12486019730567932, -0.22644001245498657, -0.1543724089860916, -0.13787969946861267, 0.09504293650388718, 0.1963614672422409, -0.057275157421827316, 0.15156245231628418, 0.26207926869392395, 0.17530865967273712, -0.11363258957862854, -0.01837209425866604, 0.4299980401992798, 0.3445252776145935, 0.05533914268016815, 0.10116070508956909, 0.0034182406961917877, -0.05453120917081833, -0.054347533732652664, 0.19346529245376587, 0.013305291533470154, 0.15472261607646942, 0.5109213590621948, 0.13020889461040497, -0.07670849561691284, -0.15106236934661865, 0.15645402669906616, -0.013077152892947197, 0.07092488557100296, -0.5139690637588501, 0.08552496880292892, -0.15118780732154846, 0.1056215688586235, -0.11888387799263, -0.02424151822924614, -0.2993326485157013, -0.3198612928390503, -0.16373904049396515, 0.6836197376251221, -0.051982149481773376, -0.03636935353279114, 0.08616834878921509, 0.04616047441959381, -0.06358304619789124, -0.43269476294517517, -0.05621401593089104, 0.0703132227063179, -0.021523088216781616, -0.04027358442544937, 0.2896300256252289, 0.1208038479089737, 0.39547619223594666, -0.3601338267326355, 0.12912367284297943, -0.6284133791923523, -0.02262267842888832, 0.05357483774423599, -0.052695319056510925, 0.5703326463699341, 0.12139244377613068, 0.08491955697536469, -0.28044384717941284, -0.13331514596939087, 0.32006362080574036, -0.044399626553058624, -0.1878892183303833, 0.16160038113594055, -0.14239782094955444, 0.03427286073565483, 0.08605395257472992, -0.24789217114448547, -0.09879117459058762, -0.4169478416442871, -0.0024005919694900513, -0.030498001724481583, 0.12166102230548859, -0.304287314414978, 0.04018045589327812, 0.019802067428827286, 0.29941362142562866, -0.23998945951461792, -0.23018063604831696, -0.4440575838088989, 0.45079419016838074, -0.06907492130994797, -0.13890838623046875, 0.10308562219142914, 0.012689691036939621, -0.0909334123134613, 0.14502272009849548, -0.5082237124443054, -0.2389392852783203, 0.04221601039171219, 0.14122848212718964, -0.09702803194522858, 0.20211011171340942, 0.20324644446372986, 0.07007430493831635, 0.08151749521493912, -0.051181115210056305, -0.3915066719055176, -0.03223457187414169, 0.4458440840244293, 0.24640434980392456, 0.1043914407491684, 0.3164985477924347, 0.04232766851782799, 0.5882067680358887, 0.06259416043758392, 0.039313219487667084, 0.7218642234802246, -0.0212195236235857, 0.1652946025133133, -0.2589460015296936, -0.35954365134239197, -0.49694931507110596, -0.17974239587783813, -0.07256744801998138, -0.021845772862434387, -0.0019368771463632584, -0.09430743753910065, -0.08445665240287781, -0.3660182058811188, -0.2962518334388733, -0.2526840269565582, 0.10068075358867645, 0.020898638293147087, 0.09739772975444794, -0.08410130441188812, -0.0728190541267395, -0.05785941705107689, -0.10392458736896515, 0.18058423697948456, 0.12384118139743805, 0.4759082496166229, -0.024435434490442276, -0.2507895529270172, -0.05097486451268196, -0.5435470938682556, 0.0746995136141777, 0.07184167206287384, 0.21403677761554718, 0.1271062046289444, -0.11114928126335144, 0.141579732298851, -0.14433881640434265, 0.955260694026947, -0.41682666540145874, 0.45151740312576294, 0.39697790145874023, -0.2216818630695343, -0.6220362782478333, -0.10078765451908112, -0.07936584949493408, 0.2389695793390274, -0.20018279552459717, 0.975898802280426, -0.17935872077941895, -0.057591263204813004, -0.36736586689949036, 0.2430099993944168, -0.24369578063488007, -0.1939728856086731, -0.1722332388162613, -0.2731240391731262, -0.4616204500198364, -0.07467139512300491, -0.003070114180445671, 0.27803534269332886, 0.051000408828258514, 0.12752941250801086, -0.2380770891904831, 0.05101236701011658, 0.041801221668720245, -0.11800302565097809, 0.5835384130477905, 0.21344368159770966, 0.40063220262527466, 0.04158613830804825, -0.06715133786201477, 0.18953143060207367, 0.6890969276428223, -0.00713033601641655, -0.07138083875179291, -0.053734250366687775, 0.19554047286510468, 0.023795753717422485, 0.20519782602787018, 0.18424704670906067, 0.047804977744817734, -0.2630106806755066, -0.06819802522659302, -0.635526180267334, -0.1478697657585144, -0.07821179181337357, -0.16108600795269012, -0.014148014597594738, -0.05098702758550644, 0.6317010521888733, -0.1161862164735794, -0.09590531140565872, 0.031608711928129196, 0.3491100072860718, -0.2593441605567932, 0.5289582014083862, 0.24907705187797546, 0.9034988284111023, -0.11346840858459473, 0.289116233587265, 0.3311282694339752, -0.0013126470148563385, 0.09561984241008759, 0.04667963832616806, -0.05541035532951355, -0.47795233130455017, -0.24111171066761017, -0.012812448665499687, -0.2220044881105423, -0.27429962158203125, 0.22873219847679138, -0.06146207079291344, 0.298348069190979, -0.29794037342071533, 0.09348663687705994, -0.1275627166032791, 0.27399471402168274, -0.18814192712306976, -0.27462196350097656, -0.5046055316925049, 0.03284155949950218, 0.07989873737096786, 0.06165445223450661, -0.06333519518375397, -0.05446617305278778, -0.1624932736158371, 0.04772668331861496, -0.08717003464698792, 0.19812434911727905, 0.5216935873031616, 0.30097001791000366, -0.25799956917762756, -0.4031871557235718, 0.1965951770544052, 0.1694355607032776, 0.4890117645263672, 0.03203660622239113, -0.2528896629810333, -0.026211712509393692, -0.04678519815206528, 0.11442465335130692, 0.04283208027482033, -0.1974438577890396, 0.19363991916179657, -0.0328555591404438, -0.2364187240600586, -0.24234464764595032, 0.08376696705818176, -0.49636465311050415, -0.09861680865287781, 0.10867379605770111, -0.05792815238237381, -0.2975982427597046, -0.37090983986854553, 0.04378306493163109, 0.13851957023143768, -0.21132443845272064, 0.0784119963645935, 0.1375715583562851, -0.0011319650802761316, 0.21834072470664978, -0.09209203720092773, -0.15289385616779327, 0.057273734360933304, 0.7088292241096497, -0.12298507243394852, 0.1498807668685913, 0.2124091237783432, 0.012088987976312637, -0.09281599521636963, -0.06495840102434158, 0.20561575889587402, -0.02644491381943226, -0.1460053026676178, 0.3088640570640564, -0.3320295810699463, 0.16584672033786774, -0.14153839647769928, 0.08555799722671509, 0.41813820600509644, -0.04400327056646347, -0.08622951805591583, -0.23421034216880798, 0.07318950444459915, 0.045316752046346664, 0.2559985816478729, 0.34417665004730225, -0.015336474403738976, -0.5598321557044983, -0.21867449581623077, -0.20738346874713898, -0.2231893092393875, 0.442697674036026, -0.05258385092020035, 0.18027706444263458, 0.12468371540307999, 0.04893828183412552, 0.05206919088959694, -0.48697608709335327, -0.033850617706775665, -0.0643652081489563, -0.20322678983211517, -0.15553635358810425, -0.13459992408752441, 0.1713242530822754, 0.04400111734867096, -0.11593134701251984, -0.0809788629412651, -0.27407678961753845, -0.06002116575837135, -0.18445050716400146, 0.14684197306632996, 0.4989067316055298, 0.02682723104953766, 0.006161444820463657, 0.5352523922920227, -0.015487901866436005, -0.1479867547750473, 0.08184215426445007, 0.2058151811361313, 0.11386417597532272, -0.1820768415927887, 0.29193586111068726, -0.09542052447795868, -0.007853813469409943, -0.14487123489379883, 0.0694362223148346, 0.2662014663219452, 0.15136398375034332, 0.31622976064682007, -0.258516788482666, -0.09137657284736633, 0.22410082817077637, 0.5331281423568726, 0.12282772362232208, -0.3935859799385071, -0.05456060171127319, 0.18166330456733704, 0.18238690495491028, -0.033725760877132416, -0.5227211117744446, 0.24050839245319366, -0.00643956009298563, -0.17455565929412842, 0.03442701697349548, 0.30521583557128906, 0.11551795899868011, -0.4238264560699463, 0.13432738184928894, 0.5709022283554077, 0.062155600637197495, 0.09111014008522034, 0.060421910136938095, -0.17158740758895874, 0.008979927748441696, 0.20588256418704987, -0.07593643665313721, 0.24970769882202148, 0.5009477734565735, 0.08356208354234695, 0.36037442088127136, -0.0035859420895576477, 0.3972941040992737, -0.08974476903676987, -0.3823336958885193, 0.10496270656585693, -0.09153060615062714, -0.08188298344612122, 0.07329908758401871, 0.05661715567111969, 0.15103210508823395, -0.10785388946533203, -0.09960079193115234, -0.24471834301948547, 0.2569831907749176, -0.15171772241592407, -0.29231366515159607, 0.08281277120113373, -0.21582353115081787, 0.1224147379398346, 0.2889803946018219, -0.19236497581005096, -0.3206375241279602, -0.02665279060602188, 0.11710059642791748, 0.06900955736637115, 0.30546835064888, 0.24564895033836365, 0.15761803090572357, 0.17817406356334686, -0.327642023563385, -0.00019032135605812073, -0.021038547158241272, -0.19602444767951965, -0.07771611213684082, 0.061028942465782166, 0.3726869523525238, 0.06350597739219666, -0.07445293664932251, 0.2836223244667053, 0.2577747106552124, 0.02420279197394848, 0.001687539741396904, 0.12118418514728546, -0.22051715850830078, 0.1701599359512329, 0.2883690297603607, 0.14354753494262695, -0.15195663273334503, -0.14527614414691925, -0.0811486691236496, 0.3661871552467346, -0.12540826201438904, 0.11988689005374908, 0.045941367745399475, -0.09141261875629425, 0.14975179731845856, 0.18541035056114197, -0.18585839867591858, -0.16882306337356567, 0.6904609799385071, -0.014161423780024052, 0.2987179756164551, 0.05782308429479599, 0.05010535567998886, -0.0756235420703888, 0.3620520830154419, -0.008606735616922379, -0.10701087862253189, -0.3149023950099945, 0.053807854652404785, -0.6652815937995911, 0.09325731545686722, 0.18020866811275482, 0.18716566264629364, 0.32459408044815063, 0.28571438789367676, 0.012091346085071564, 0.14055010676383972, -0.1455104500055313, 0.0746593326330185, -0.1176699846982956, 0.33619317412376404, 0.05390229448676109, -0.1590893417596817, -0.005981139838695526, -0.10641570389270782, -0.16747349500656128, -0.4847720265388489, 0.16861626505851746, -0.046127237379550934, -0.027852268889546394, -0.07784031331539154, 0.14198529720306396, 0.18352703750133514, 0.03045382723212242, 0.41487839818000793, -0.03119550086557865, 0.30503833293914795, -0.23034265637397766, 0.05313576012849808, 0.058063555508852005, -0.25202611088752747, -0.06836969405412674, 0.06795600801706314, -0.2778890132904053, 0.43240395188331604, -0.21715369820594788, 0.16147343814373016, -0.4060470759868622, 0.1252763569355011, 0.05190566927194595, 0.22341510653495789, -0.20997703075408936, 0.08096206933259964, -0.3618730902671814, 0.0818013995885849, 0.0006977934390306473, 0.10648868978023529, 0.002812899649143219, 0.3089253008365631, -0.10515031218528748, -0.38132402300834656, 0.4080009162425995, -0.26415130496025085, -0.1337161809206009, -0.018802981823682785, 0.0971599817276001, 0.2077782154083252, 0.04646666720509529, -0.3202042281627655, 0.01710713654756546, 0.41363027691841125, -0.06790643185377121, -0.1253705471754074, 0.33582475781440735, -0.16298159956932068, 0.00955367460846901, -0.04241578280925751, 0.2932400703430176, 0.05449619144201279, -0.1731194108724594, 0.07394465804100037, -0.37255287170410156 ]
https://github.com/huggingface/datasets/issues/6702
Push samples to dataset on hub without having the dataset locally
Hi ! For now I would recommend creating a new Parquet file using `dataset_new.to_parquet()` and upload it to HF using `huggingface_hub` every time you get a new batch of data. You can name the Parquet files `0000.parquet`, `0001.parquet`, etc. Though maybe make sure to not upload one file per sample since that would be inefficient. You can buffer your data and upload when you have enough new samples for example
### Feature request Say I have the following code: ``` from datasets import Dataset import pandas as pd new_data = { "column_1": ["value1", "value2"], "column_2": ["value3", "value4"], } df_new = pd.DataFrame(new_data) dataset_new = Dataset.from_pandas(df_new) # add these samples to a remote dataset ``` It would be great to have a way to push dataset_new to a remote dataset that respects the same schema. This way one would not have to do the following: ``` from datasets import load_dataset dataset = load_dataset('username/dataset_name', use_auth_token='your_hf_token_here') updated_dataset = dataset['train'].concatenate(dataset_new) updated_dataset.push_to_hub('username/dataset_name', use_auth_token='your_hf_token_here') ``` ### Motivation No need to download the dataset. ### Your contribution Maybe this feature already exists, didnt see it though. I do not have the expertise to do this.
70
Push samples to dataset on hub without having the dataset locally ### Feature request Say I have the following code: ``` from datasets import Dataset import pandas as pd new_data = { "column_1": ["value1", "value2"], "column_2": ["value3", "value4"], } df_new = pd.DataFrame(new_data) dataset_new = Dataset.from_pandas(df_new) # add these samples to a remote dataset ``` It would be great to have a way to push dataset_new to a remote dataset that respects the same schema. This way one would not have to do the following: ``` from datasets import load_dataset dataset = load_dataset('username/dataset_name', use_auth_token='your_hf_token_here') updated_dataset = dataset['train'].concatenate(dataset_new) updated_dataset.push_to_hub('username/dataset_name', use_auth_token='your_hf_token_here') ``` ### Motivation No need to download the dataset. ### Your contribution Maybe this feature already exists, didnt see it though. I do not have the expertise to do this. Hi ! For now I would recommend creating a new Parquet file using `dataset_new.to_parquet()` and upload it to HF using `huggingface_hub` every time you get a new batch of data. You can name the Parquet files `0000.parquet`, `0001.parquet`, etc. Though maybe make sure to not upload one file per sample since that would be inefficient. You can buffer your data and upload when you have enough new samples for example
[ -0.3518064618110657, -0.19830834865570068, 0.06301453709602356, -0.21309734880924225, -0.1465127319097519, 0.06928353756666183, 0.38657718896865845, 0.49863433837890625, 0.1978279948234558, 0.28934794664382935, -0.029841044917702675, 0.2429806888103485, -0.14795564115047455, 0.5559895038604736, 0.3533440828323364, 0.023727374151349068, 0.3219745457172394, 0.0039128586649894714, 0.07069596648216248, -0.25199440121650696, -0.17969910800457, -0.4748843014240265, 0.22114001214504242, -0.0390172004699707, -0.20250287652015686, -0.017085937783122063, -0.3958733379840851, 0.1609315276145935, -0.02935120277106762, -0.1467011421918869, 0.3400647044181824, 0.31147629022598267, 0.29251375794410706, 0.2375074028968811, -0.00011655324487946928, -0.0020236968994140625, -0.022080883383750916, -0.14544686675071716, -0.1668761968612671, -0.22692106664180756, -0.020797204226255417, -0.40596505999565125, -0.061281658709049225, -0.30230605602264404, -0.17333677411079407, -0.0139953987672925, -0.06505794823169708, -0.17850208282470703, 0.04818136617541313, 0.06324134021997452, 0.1179436445236206, 0.3301560878753662, -0.27985793352127075, -0.2804071605205536, 0.11430609971284866, 0.2988027334213257, -0.016152191907167435, 0.09658828377723694, 0.18823662400245667, 0.08419422805309296, 0.05423979088664055, -0.07662013173103333, -0.19365926086902618, -0.07798320055007935, 0.198787659406662, 0.01084971521049738, -0.08974496275186539, -0.089445099234581, -0.08113223314285278, 0.17237001657485962, 0.26326367259025574, -0.4898321330547333, -0.5289904475212097, -0.42510563135147095, 0.00599268265068531, -0.2095790058374405, -0.2631216049194336, 0.4389136731624603, -0.006572503596544266, 0.16179467737674713, -0.0016606017015874386, -0.5285016894340515, -0.13281962275505066, -0.010519467294216156, -0.0038487017154693604, 0.25844496488571167, 0.16512437164783478, -0.08562368899583817, -0.1954936534166336, -0.002670038491487503, 0.4205353856086731, -0.25707298517227173, 0.05857027694582939, 0.04320146143436432, -0.13289372622966766, -0.3563721179962158, 0.025398094207048416, -0.09267222136259079, 0.23116418719291687, 0.27847903966903687, -0.25044435262680054, 0.16838327050209045, -0.12412914633750916, 0.12145355343818665, 0.36110955476760864, -0.185435488820076, -0.07227269560098648, 0.15658389031887054, -0.03532478213310242, 0.1747026890516281, 0.0506264828145504, -0.0422101765871048, 0.015069755725562572, 0.07894935458898544, -0.1269952952861786, -0.022516153752803802, 0.21142064034938812, -0.17119291424751282, -0.0042726583778858185, 0.09411914646625519, 0.05174485594034195, 0.16272146999835968, -0.17059533298015594, 0.21083307266235352, -0.037269461899995804, 0.2511606216430664, -0.27568069100379944, 0.22071148455142975, -0.18688389658927917, -0.29435208439826965, -0.23337364196777344, 0.16198942065238953, 0.20185300707817078, 0.24164709448814392, -0.0722486600279808, -0.2258201241493225, 0.11729532480239868, 0.2093525379896164, 0.35113126039505005, 0.3575241267681122, 0.010325232520699501, -0.0008224993944168091, 0.09972379356622696, 0.10100798308849335, 0.33325037360191345, 0.037646256387233734, 0.19534875452518463, -0.11676482856273651, -0.44839611649513245, 0.03092772886157036, -0.36857089400291443, -0.34666112065315247, -0.09735441207885742, 0.10165629535913467, -0.3080497980117798, -0.2525393068790436, -0.7291957139968872, 0.15060743689537048, -0.41269513964653015, 0.10726919770240784, 0.09626703709363937, 0.19235257804393768, -0.1399163454771042, -0.13924983143806458, 0.1981423795223236, 0.5922895073890686, -0.23761209845542908, -0.13297954201698303, 0.3660756051540375, 0.2963019907474518, -0.05759423226118088, -0.0651949942111969, -0.3780069947242737, 0.3211730122566223, 0.08344334363937378, 0.152119979262352, 0.2615465521812439, -0.5949972867965698, -0.10242090374231339, 0.043989066034555435, -0.34972238540649414, -0.051346853375434875, -0.04741334170103073, 0.03547937050461769, 0.5476284027099609, 0.06995940953493118, 0.019428439438343048, 0.6227657794952393, -0.06511187553405762, 0.20685334503650665, -0.15768785774707794, -0.541991114616394, -0.05614796280860901, 0.2913224697113037, 0.16510018706321716, 0.22485309839248657, 0.48151102662086487, 0.07568981498479843, 0.17259979248046875, -0.2331533133983612, 0.2536291182041168, 0.12673664093017578, 0.5165404677391052, 0.18098360300064087, -0.24907967448234558, -0.11619221419095993, -0.33912280201911926, 0.11684570461511612, 0.163208469748497, -0.04204500466585159, 0.06110774725675583, -0.32897669076919556, -0.0645388811826706, -0.05147989094257355, -0.05823909118771553, 0.052989132702350616, 0.00038398057222366333, -0.17463916540145874, 0.2089504599571228, 0.02609260007739067, -0.40642496943473816, 0.3588981330394745, -0.1629660427570343, 0.2335357815027237, -0.3570065498352051, 0.519485592842102, 0.19472068548202515, -0.11314117908477783, 0.012422069907188416, -0.06197803467512131, 0.21392056345939636, -0.21012334525585175, 0.07269429415464401, 0.1387985646724701, -0.0077854725532233715, 0.19810868799686432, 0.3321059048175812, 0.052998676896095276, 0.14258265495300293, 0.14416976273059845, 0.22588509321212769, -0.2922205626964569, -0.03944234549999237, 0.10788675397634506, -0.4300171732902527, 0.7530314922332764, 0.06664570420980453, 0.1642628014087677, 0.07292075455188751, 0.010572811588644981, 0.1488381177186966, -0.05235859379172325, 0.10309573262929916, 0.0766773521900177, -0.07532310485839844, 0.24917134642601013, -0.0580313503742218, -0.17585301399230957, -0.1056816577911377, 0.24004104733467102, 0.2180858999490738, -0.08846400678157806, -0.0054592564702034, -0.003733105957508087, -0.005581356585025787, 0.06445425003767014, 0.4227859079837799, 0.21616782248020172, 0.11619528383016586, 0.18871621787548065, -0.05814598128199577, 0.2815927565097809, 0.09111988544464111, 0.0731533020734787, -0.16988328099250793, -0.19130252301692963, -0.2404276728630066, -0.11960121244192123, 0.01916319690644741, 0.011754472739994526, -0.2165849506855011, 0.21929478645324707, 0.20029570162296295, 0.16851718723773956, -0.15768180787563324, 0.004372097551822662, -0.23206816613674164, 0.14888808131217957, -0.27950429916381836, 0.05243483558297157, -0.3027442693710327, -0.21955381333827972, -0.12083509564399719, 0.3513350188732147, -0.1618213653564453, -0.019920188933610916, -0.21034760773181915, 0.5548003315925598, -0.2730155885219574, -0.5897237658500671, 0.12483617663383484, -0.22564443945884705, 0.059674859046936035, 0.030831601470708847, -0.026778362691402435, 0.5806108713150024, 0.4862056076526642, 0.18062809109687805, 0.2595328688621521, -0.5301601886749268, 0.11249453574419022, 0.0009354390203952789, 0.14487746357917786, 0.08826080709695816, 0.011848986148834229, 0.13764864206314087, -0.12438715249300003, -0.24602365493774414, 0.029749523848295212, -0.20751693844795227, -0.1881609559059143, -0.32226747274398804, -0.12231115251779556, 0.003072603140026331, 0.11754110455513, 0.02610030397772789, -0.37361663579940796, -0.25147348642349243, 0.19931623339653015, 0.2870314121246338, 0.1403168886899948, -0.3818117678165436, -0.06638914346694946, -0.07903818786144257, -0.07149495929479599, -0.3916303217411041, -0.007323962636291981, -0.5783482193946838, 0.19684931635856628, -0.3510188162326813, -0.16700220108032227, -0.07010725885629654, -0.21816805005073547, 0.0329255685210228, 0.23416444659233093, -0.3764844536781311, -0.35537976026535034, -0.0628957524895668, 0.49915826320648193, 0.13472089171409607, 0.21771720051765442, 0.4861794412136078, -0.1676141917705536, 0.10508285462856293, 0.16140934824943542, -0.04424815624952316, 0.013626925647258759, 0.5343477129936218, -0.29988640546798706, -0.08515536785125732, 0.3097473382949829, 0.035111602395772934, 0.5854278206825256, -0.050666943192481995, -0.07364204525947571, 0.5190735459327698, -0.16482777893543243, 0.4456470310688019, -0.3115141987800598, -0.1716279536485672, -0.039936039596796036, -0.04878832399845123, -0.12716665863990784, 0.0744766891002655, -0.18461060523986816, 0.06263303011655807, -0.23243504762649536, -0.6594557762145996, 0.1331855058670044, -0.28162553906440735, -0.04581905156373978, -0.057757556438446045, 0.09178843349218369, -0.03812828287482262, -0.08111823350191116, -0.5417940020561218, -0.2980141043663025, 0.35619643330574036, 0.04593382403254509, 0.24732089042663574, 0.11595789343118668, -0.4614897668361664, 0.14595168828964233, -0.4096965789794922, 0.06805625557899475, 0.21539747714996338, 0.19400747120380402, 0.12653009593486786, -0.047476626932621, 0.032197803258895874, -0.1306096911430359, 0.492652952671051, -0.42179057002067566, -0.08378683030605316, -0.21957901120185852, -0.17789354920387268, -0.3788782060146332, -0.11259119212627411, 0.13649629056453705, -0.07374263554811478, -0.39709192514419556, 0.5649446249008179, -0.12269247323274612, -0.2436293065547943, 0.07894834131002426, 0.13463929295539856, -0.3642379939556122, 0.06794563680887222, -0.1422218680381775, -0.18618637323379517, -0.36366546154022217, 0.15033434331417084, 0.05563642829656601, 0.24545465409755707, -0.04230082780122757, 0.10650540888309479, -0.26442253589630127, 0.33557480573654175, 0.060717321932315826, 0.002776172012090683, 0.07063858211040497, 0.2988758981227875, 0.23795971274375916, 0.17728948593139648, 0.3519531786441803, 0.14287018775939941, 0.6784191131591797, -0.11771638691425323, -0.4551246166229248, -0.20563232898712158, 0.05025458708405495, 0.47738105058670044, 0.4954584240913391, 0.31053492426872253, 0.6675828695297241, -0.241441547870636, 0.05253533273935318, -0.5355588793754578, 0.12543898820877075, -0.06215351074934006, -0.20691293478012085, -0.15425565838813782, -0.439231276512146, 0.39627403020858765, -0.158582866191864, 0.17312316596508026, 0.03811463713645935, 0.38359367847442627, -0.10116611421108246, 0.4225793480873108, 0.13853859901428223, 0.8404395580291748, -0.0829363465309143, 0.391672283411026, 0.028707055374979973, -0.11031556129455566, 0.41286927461624146, -0.3510391116142273, -0.14184534549713135, -0.30758875608444214, -0.3340594172477722, -0.11738106608390808, -0.008917801082134247, 0.07651201635599136, 0.20988993346691132, 0.10282336175441742, 0.4299306869506836, -0.07367685437202454, 0.5287922024726868, -0.14374062418937683, 0.36756661534309387, -0.008334770798683167, -0.3845381736755371, -0.19935242831707, 0.137131005525589, 0.051193296909332275, 0.058613672852516174, -0.10296709090471268, -0.14974790811538696, -0.1395726203918457, -0.06921777874231339, -0.042009759694337845, 0.1688460111618042, 0.27286046743392944, -0.08130072802305222, -0.06966160237789154, 0.1800832897424698, -0.08206814527511597, -0.1929231435060501, 0.5965940952301025, 0.16543245315551758, -0.13252519071102142, 0.026049567386507988, 0.039008501917123795, -0.0260589849203825, 0.07724275439977646, -0.057761941105127335, 0.3009563684463501, 0.11757206171751022, -0.29963964223861694, 0.3885340690612793, 0.08231309056282043, -0.5927096009254456, -0.09792466461658478, -0.02972061187028885, 0.07374950498342514, -0.3552235960960388, -0.1213638037443161, 0.2080053985118866, 0.29385462403297424, -0.11142580211162567, 0.06328713893890381, -0.08268462121486664, -0.23551252484321594, 0.009030885994434357, 0.08206713199615479, -0.010670214891433716, -0.08092100918292999, 0.3847220242023468, -0.21015223860740662, -0.1307145655155182, 0.16098125278949738, -0.16057288646697998, -0.15484878420829773, -0.039352431893348694, 0.2566283047199249, 0.6164256930351257, -0.37562239170074463, -0.06228761747479439, -0.27518895268440247, 0.09679098427295685, 0.010689200833439827, 0.06751123070716858, 0.0461798831820488, -0.12142806500196457, -0.0906519740819931, -0.11072298884391785, -0.1248045265674591, 0.062011025846004486, -0.012147676199674606, 0.2168964296579361, 0.28630420565605164, 0.12139159440994263, -0.2097950577735901, 0.14553537964820862, -0.26631152629852295, 0.12680625915527344, -0.06476936489343643, 0.19996212422847748, -0.09643381088972092, 0.06868197023868561, -0.17466668784618378, -0.322637140750885, -0.0002636965364217758, -0.053065016865730286, 0.0038818689063191414, -0.14331212639808655, -0.34974244236946106, 0.18125474452972412, 0.0864809975028038, 0.27699142694473267, -0.21942345798015594, -0.2529171109199524, -0.22328400611877441, -0.22056278586387634, 0.20421655476093292, 0.2285965085029602, -0.014404572546482086, -0.1264437884092331, 0.9427182674407959, 0.05061441659927368, -0.47127383947372437, 0.256364107131958, 0.406828373670578, 0.16693717241287231, -0.342559814453125, 0.10379885137081146, -0.20916098356246948, 0.16961152851581573, 0.16048458218574524, 0.30436569452285767, 0.5100727081298828, 0.05249350517988205, 0.15434464812278748, -0.1379213035106659, -0.0733911395072937, 0.16411729156970978, 0.4086606502532959, 0.14135149121284485, -0.1500806212425232, -0.053239673376083374, 0.7480933666229248, 0.13263314962387085, -0.24653121829032898, -0.30337584018707275, 0.4369172751903534, 0.019591540098190308, 0.14972147345542908, 0.42347222566604614, 0.4248952865600586, 0.06961193680763245, -0.0644330084323883, -0.0655212327837944, 0.22167952358722687, -0.012435127049684525, 0.24244940280914307, 0.5131627321243286, 0.12738263607025146, -0.09248024225234985, 0.002672264352440834, 0.4673633277416229, 0.13232430815696716, 0.3338766098022461, 0.11985936760902405, 0.2760719656944275, 0.15783129632472992, -0.32118353247642517, 0.10958291590213776, -0.32830771803855896, 0.1062866598367691, -0.06648992002010345, 0.4665427803993225, 0.11721082031726837, -0.033219024538993835, 0.25339430570602417, -0.02389194443821907, -0.42227432131767273, -0.21336670219898224, 0.22345462441444397, -0.12378900498151779, 0.04043864831328392, -0.0015087723731994629, 0.05429000407457352, -0.35327884554862976, 0.2908211946487427, 0.10405069589614868, -0.34546971321105957, -0.07377885282039642, 0.0729404017329216, 0.35818105936050415, 0.25813087821006775, -0.05478346347808838, 0.10786329209804535, 0.19742625951766968, -0.10664302110671997, -0.18091166019439697, -0.12829843163490295, -0.38731715083122253, -0.04861589893698692, 0.10239516198635101, -0.040500495582818985, 0.10818677395582199, -0.16636048257350922, 0.3450896143913269, 0.23789139091968536, 0.05592886358499527, 0.2318510115146637, -0.20417101681232452, -0.16368070244789124, -0.023379359394311905, 0.21191418170928955, 0.07890330255031586, -0.041189588606357574, 0.08598188310861588, 0.05639393627643585, -0.05852438136935234, -0.3154461085796356, 0.5506821274757385, 0.38084322214126587, 0.006199054419994354, -0.12251971662044525, 0.012225143611431122, -0.09692215919494629, -0.04283149540424347, 0.2304198443889618, -0.22999514639377594, 0.16283124685287476, 0.00534237502142787, 0.04121430590748787, -0.16152487695217133, 0.3271278738975525, 0.25445425510406494, -0.08126600831747055, -0.19951987266540527, -0.06333185732364655, -0.4566059112548828, 0.011645346879959106, -0.37558695673942566, -0.1555471271276474, 0.16145527362823486, 0.13178986310958862, 0.23337286710739136, 0.1357312798500061, -0.6456089615821838, 0.08978728204965591, -0.08327481150627136, 0.2516578435897827, -0.11935722827911377, -0.10157251358032227, -0.11594617366790771, 0.07645182311534882, 0.08321487903594971, -0.3099037706851959, 0.17493146657943726, 0.07108693569898605, -0.14142635464668274, 0.1823742389678955, 0.0579192116856575, 0.11937621235847473, -0.5072919130325317, 0.020273510366678238, -0.33775606751441956, 0.20933765172958374, -0.07350137829780579, 0.10653158277273178, -0.27818965911865234, -0.06107981875538826, -0.48785722255706787, 0.048416756093502045, -0.2865896224975586, 0.03782566636800766, 0.051744602620601654, -0.1309366375207901, -0.27439770102500916, 0.021763553842902184, 0.2808576822280884, -0.05989546701312065, -0.04792867600917816, 0.057141467928886414, -0.18145981431007385, 0.00778544507920742, 0.27263596653938293, 0.14999639987945557, -0.1490834653377533, 0.21139644086360931, 0.06795279681682587, 0.05391663312911987, 0.40107131004333496, -0.3548658788204193, -0.09872590005397797, -0.22357216477394104, 0.22418048977851868, 0.11039095371961594, -0.31680986285209656, -0.17250479757785797, 0.1297810673713684, 0.227543905377388, 0.020771676674485207, 0.20674747228622437, 0.40208327770233154, 0.16822928190231323, -0.1747763603925705, -0.14425572752952576, -0.057490453124046326, 0.013951089233160019, -0.1004345566034317, -0.01331142894923687, -0.3053356409072876 ]
https://github.com/huggingface/datasets/issues/6700
remove_columns is not in-place but the doc shows it is in-place
@mariosasko Thanks! Will the doc of `datasets` be updated? I find some possible mistakes in doc about whether `remove_columns` is in-place. 1. [You can also remove a column using map() with remove_columns but the present method is in-place (doesn’t copy the data to a new dataset) and is thus faster.](https://huggingface.co/docs/datasets/v2.17.1/en/package_reference/main_classes#datasets.Dataset.remove_columns) 2. [You can also remove a column using Dataset.map() with remove_columns but the present method is in-place (doesn’t copy the data to a new dataset) and is thus faster.](https://huggingface.co/docs/datasets/v2.17.1/en/package_reference/main_classes#datasets.DatasetDict.remove_columns) 3. [🤗 Datasets also has a remove_columns() function which is faster because it doesn’t copy the data of the remaining columns.](https://huggingface.co/docs/datasets/v2.17.1/en/process#map)
### Describe the bug The doc of `datasets` v2.17.0/v2.17.1 shows that `remove_columns` is in-place. [link](https://huggingface.co/docs/datasets/v2.17.1/en/package_reference/main_classes#datasets.DatasetDict.remove_columns) In the text classification example of transformers v4.38.1, the columns are not removed. https://github.com/huggingface/transformers/blob/a0857740c0e6127485c11476650314df3accc2b6/examples/pytorch/text-classification/run_classification.py#L421 ### Steps to reproduce the bug https://github.com/huggingface/transformers/blob/a0857740c0e6127485c11476650314df3accc2b6/examples/pytorch/text-classification/run_classification.py#L421 ### Expected behavior Actually remove the columns. ### Environment info 1. datasets v2.17.0 2. transformers v4.38.1
100
remove_columns is not in-place but the doc shows it is in-place ### Describe the bug The doc of `datasets` v2.17.0/v2.17.1 shows that `remove_columns` is in-place. [link](https://huggingface.co/docs/datasets/v2.17.1/en/package_reference/main_classes#datasets.DatasetDict.remove_columns) In the text classification example of transformers v4.38.1, the columns are not removed. https://github.com/huggingface/transformers/blob/a0857740c0e6127485c11476650314df3accc2b6/examples/pytorch/text-classification/run_classification.py#L421 ### Steps to reproduce the bug https://github.com/huggingface/transformers/blob/a0857740c0e6127485c11476650314df3accc2b6/examples/pytorch/text-classification/run_classification.py#L421 ### Expected behavior Actually remove the columns. ### Environment info 1. datasets v2.17.0 2. transformers v4.38.1 @mariosasko Thanks! Will the doc of `datasets` be updated? I find some possible mistakes in doc about whether `remove_columns` is in-place. 1. [You can also remove a column using map() with remove_columns but the present method is in-place (doesn’t copy the data to a new dataset) and is thus faster.](https://huggingface.co/docs/datasets/v2.17.1/en/package_reference/main_classes#datasets.Dataset.remove_columns) 2. [You can also remove a column using Dataset.map() with remove_columns but the present method is in-place (doesn’t copy the data to a new dataset) and is thus faster.](https://huggingface.co/docs/datasets/v2.17.1/en/package_reference/main_classes#datasets.DatasetDict.remove_columns) 3. [🤗 Datasets also has a remove_columns() function which is faster because it doesn’t copy the data of the remaining columns.](https://huggingface.co/docs/datasets/v2.17.1/en/process#map)
[ 0.26938238739967346, -0.5244266986846924, 0.0878790020942688, 0.2873860001564026, 0.28727585077285767, 0.022733978927135468, 0.4463950991630554, 0.12398141622543335, 0.010601386427879333, -0.00431475043296814, -0.17171967029571533, 0.1472654938697815, -0.007954447530210018, -0.1279146671295166, -0.055250659584999084, -0.43397340178489685, 0.2818169593811035, 0.051171064376831055, -0.36073678731918335, -0.2020062357187271, -0.03846387565135956, 0.223001167178154, -0.558607816696167, -0.1299479454755783, -0.12935206294059753, -0.11916541308164597, -0.3210487365722656, -0.2560783624649048, 0.05495692789554596, 0.06733298301696777, 0.29069480299949646, 0.10226056724786758, 0.08984871953725815, 0.3943842649459839, -0.00012259090726729482, -0.03986043855547905, 0.15189816057682037, 0.08060430735349655, -0.19919772446155548, 0.14984649419784546, -0.06021514907479286, -0.08714403957128525, 0.17012184858322144, -0.2345292866230011, 0.13774463534355164, -0.19976989924907684, -0.30042946338653564, 0.019631661474704742, 0.22008314728736877, 0.3564746677875519, 0.15529458224773407, 0.44330859184265137, 0.018193233758211136, 0.28523972630500793, 0.14822962880134583, 0.2687060832977295, -0.2200165092945099, -0.023294180631637573, -0.023199759423732758, -0.07178597897291183, 0.09132207930088043, 0.35637202858924866, -0.36172276735305786, -0.2392187863588333, 0.19900885224342346, 0.35479822754859924, 0.00331319123506546, -0.18363331258296967, 0.07017168402671814, 0.13279779255390167, 0.48035717010498047, -0.48303112387657166, -0.3644174337387085, -0.2949652075767517, -0.09032672643661499, -0.20847198367118835, 0.26984551548957825, -0.10351481288671494, 0.2731272578239441, 0.2606980502605438, -0.48460081219673157, -0.25087207555770874, 0.03443043678998947, 0.003047078847885132, -0.011849407106637955, 0.20887699723243713, -0.23841756582260132, 0.02668124809861183, -0.04410393163561821, 0.14327874779701233, 0.13903190195560455, -0.3919234573841095, 0.1429055631160736, 0.43430572748184204, -0.41811403632164, -0.1171555295586586, -0.17535775899887085, 0.07502122223377228, -0.03480403125286102, 0.15015187859535217, -0.3053687810897827, -0.10906697064638138, 0.0006722379475831985, 0.11679847538471222, 0.23226433992385864, 0.6872063279151917, -0.08088283985853195, 0.5594941973686218, 0.1466905176639557, 0.44664350152015686, 0.110263392329216, 0.0629221498966217, 0.3201085925102234, 0.010689866729080677, 0.22770504653453827, -0.06759492307901382, 0.24639134109020233, -0.02135399356484413, -0.24834711849689484, 0.12274787575006485, -0.13364465534687042, 0.05653117224574089, 0.08917123824357986, 0.06873957812786102, 0.05090749263763428, 0.25236308574676514, 0.12856733798980713, 0.1152060329914093, -0.34536466002464294, 0.05860630050301552, -0.2869521379470825, 0.30780598521232605, -0.08699891716241837, -0.1531088650226593, 0.149623304605484, -0.005836566910147667, 0.1918744146823883, 0.17813709378242493, 0.15767526626586914, -0.12146876752376556, -0.5233691334724426, -0.16931770741939545, 0.22787076234817505, 0.3738279640674591, -0.44681283831596375, 0.24792782962322235, 0.15372149646282196, -0.20619776844978333, -0.1925559937953949, 0.28510743379592896, -0.08599559217691422, 0.046039383858442307, 0.028230279684066772, 0.1001715213060379, 0.04687601327896118, -0.015035431832075119, -0.23113951086997986, 0.0023828670382499695, 0.3605327904224396, -0.006889358162879944, 0.32005929946899414, -0.2792145013809204, -0.009623199701309204, -0.024911150336265564, 0.12061620503664017, 0.31525278091430664, -0.13544684648513794, -0.11697795242071152, 0.16916659474372864, 0.012549390085041523, 0.25954824686050415, 0.30088937282562256, 0.007593107875436544, 0.05141595005989075, -0.24228213727474213, -0.19559364020824432, -0.08401607722043991, -0.2687636911869049, -0.17015910148620605, 0.2833559215068817, 0.15357276797294617, 0.15938951075077057, -0.12319346517324448, 0.01882951706647873, -0.14218664169311523, 0.1298118233680725, -0.28896766901016235, -0.20665766298770905, 0.28143101930618286, 0.27353355288505554, -0.30131009221076965, -0.2872498035430908, 0.07089579105377197, -0.0007628053426742554, 0.02377502992749214, 0.2801430821418762, -0.32377859950065613, 0.12073520570993423, 0.4089249074459076, 0.3624987006187439, 0.2599949240684509, 0.566135585308075, 0.2771284282207489, -0.06888812780380249, 0.18442058563232422, -0.26523131132125854, -0.7391101717948914, -0.019592391327023506, 0.4020237624645233, 0.017787519842386246, -0.07975484430789948, -0.3096694350242615, -0.18243876099586487, -0.04132926091551781, -0.11262786388397217, -0.16326282918453217, -0.015036078169941902, -0.2750193178653717, 0.40368419885635376, -0.22515100240707397, -0.5278554558753967, 0.43482550978660583, -0.39616015553474426, 0.45299017429351807, -0.4831283986568451, 0.10098207741975784, -0.011198347434401512, -0.021775562316179276, -0.18272855877876282, 0.2192704975605011, 0.10358135402202606, -0.20659112930297852, -0.16767099499702454, 0.5612749457359314, -0.0609377883374691, 0.20282404124736786, -0.5247421264648438, 0.3637123107910156, 0.38026127219200134, -0.14098694920539856, -0.196248859167099, 0.16110171377658844, 0.07644689828157425, 0.3114117980003357, -0.562904417514801, -0.017256975173950195, -0.23339398205280304, 0.2945220172405243, 0.3414255380630493, -0.12021454423666, -0.05553605407476425, -0.13786180317401886, -0.20610830187797546, -0.16287380456924438, 0.0938541442155838, 0.09344837069511414, 0.0981113612651825, 0.1232101172208786, -0.07299570739269257, -0.1157890036702156, 0.43246540427207947, 0.11418946087360382, -0.08628981560468674, 0.14467714726924896, -0.2370557188987732, -0.01845686137676239, 0.08435646444559097, 0.21629084646701813, 0.3867025375366211, 0.024596255272626877, 0.029294218868017197, 0.3660254180431366, 0.1658562272787094, -0.04843619465827942, 0.13930973410606384, 0.39686888456344604, -0.10832515358924866, 0.06260214745998383, 0.20994341373443604, 0.41662225127220154, -0.48246118426322937, 0.10941572487354279, -0.10581493377685547, 0.33037689328193665, -0.3153625428676605, 0.20448365807533264, -0.2572029232978821, -0.10047285258769989, -0.2794407606124878, 0.14609219133853912, -0.3599393665790558, -0.23184198141098022, 0.10520856082439423, 0.008052997291088104, -0.3146495819091797, 0.24323125183582306, -0.051045969128608704, 0.08862552046775818, -0.1597948968410492, 0.017114251852035522, -0.29111117124557495, 0.23831859230995178, 0.028687734156847, -0.018731044605374336, -0.24431867897510529, -0.01723664626479149, -0.1401728242635727, 0.033403195440769196, -0.3171621561050415, -0.1374705731868744, -0.3444765508174896, 0.2200121134519577, -0.21381063759326935, -0.051448628306388855, 0.11793112009763718, 0.034902408719062805, -0.26491349935531616, -0.006821321323513985, 0.018411021679639816, -0.5336605906486511, -0.14954274892807007, 0.05976171791553497, 0.11750366538763046, 0.05808619409799576, -0.33647486567497253, -0.27803677320480347, 0.27141693234443665, -0.23383687436580658, 0.10766126215457916, -0.08878345042467117, -0.0337994322180748, 0.3432745039463043, -0.15587130188941956, -0.16403289139270782, -0.06686963886022568, 0.2803889811038971, -0.1454426348209381, -0.3778458535671234, 0.0240011028945446, 0.14853261411190033, -0.30810150504112244, -0.29140374064445496, 0.05573008954524994, 0.019962377846240997, -0.07786986231803894, -0.12624655663967133, -0.15774621069431305, -0.433794766664505, -0.29024645686149597, 0.00014360621571540833, 0.2666454613208771, 0.5843878984451294, 0.05587521940469742, 0.11312367022037506, 0.15641838312149048, -0.025476505979895592, 0.06702334433794022, 0.3464297652244568, -0.11430660635232925, -0.19260212779045105, 0.23891839385032654, -0.037140555679798126, 0.18806490302085876, 0.35209035873413086, 0.013432413339614868, -0.0023561865091323853, -0.046139903366565704, 0.29966360330581665, -0.16290917992591858, -0.20245406031608582, 0.09778642654418945, 0.07718794792890549, -0.2212764471769333, 0.2941184639930725, 0.03421176224946976, 0.12342923134565353, 0.014661666005849838, 0.23304855823516846, -0.1358402967453003, -0.24893884360790253, -0.11318482458591461, 0.04538558050990105, 0.2584472596645355, 0.209549218416214, 0.05917489528656006, 0.05350571498274803, -0.1311093270778656, -0.01989997923374176, 0.22440846264362335, 0.28805553913116455, -0.1862303614616394, -0.45668405294418335, -0.098806232213974, -0.25633496046066284, 0.13866841793060303, 0.022477660328149796, 0.19646039605140686, 0.1118781715631485, -0.2860715389251709, 0.2327006608247757, 0.17528438568115234, 0.32690826058387756, 0.14265753328800201, -0.2518565058708191, 0.013573143631219864, -0.0953579992055893, -0.41556933522224426, -0.3804948329925537, -0.29934418201446533, -0.2759639322757721, 0.12312743067741394, 0.6377931237220764, -0.23518794775009155, -0.35134196281433105, 0.43007323145866394, 0.17517007887363434, -0.15572969615459442, -0.16767562925815582, -0.43330681324005127, -0.35121914744377136, -0.1899632066488266, -0.05903889983892441, 0.34659135341644287, 0.1654144525527954, -0.2426827996969223, 0.2416655272245407, 0.3359527289867401, -0.30464768409729004, 0.1370396614074707, -0.20909669995307922, 0.1150975450873375, -0.2275303304195404, 0.07370072603225708, 0.24928772449493408, 0.16926570236682892, -0.24912545084953308, 0.21892409026622772, -0.07917152345180511, -0.24448925256729126, 0.05779945105314255, -0.12729942798614502, 0.6633123159408569, 0.06074342876672745, -0.10263336449861526, 0.18999946117401123, -0.06937487423419952, 0.2699829339981079, -0.2362910509109497, -0.3081215023994446, 0.4282297194004059, 0.05539502948522568, -0.0808151364326477, -0.22336316108703613, 0.36004942655563354, 0.13073945045471191, -0.005522839725017548, 0.18908824026584625, 0.3923701047897339, -0.20604415237903595, 0.2927093505859375, -0.3264428973197937, 0.9037586450576782, 0.026128601282835007, 0.07808861881494522, 0.13389930129051208, 0.12997758388519287, 0.7747398018836975, -0.3004641532897949, 0.4748523235321045, -0.34634894132614136, -0.3622381091117859, -0.10651998221874237, -0.0476667694747448, 0.3549559712409973, -0.05379503220319748, 0.08224877715110779, 0.2602275311946869, -0.40443629026412964, 0.7575407028198242, 0.02582346647977829, -0.09088340401649475, 0.121239572763443, -0.16954593360424042, -0.3191058933734894, -0.03189827874302864, 0.0850423276424408, 0.32211312651634216, -0.10356158018112183, 0.4648282527923584, -0.04546992480754852, -0.23055453598499298, 0.019467338919639587, 0.05403902381658554, 0.3915160000324249, 0.3651871085166931, 0.2871801257133484, -0.06556426733732224, 0.09151001274585724, 0.4813370108604431, 0.4093800187110901, -0.0697869062423706, -0.028121599927544594, 0.21707850694656372, 0.09395432472229004, 0.19701063632965088, -0.0632767453789711, 0.2108035534620285, -0.018555758520960808, 0.04219146817922592, -0.2743909955024719, -0.12077149003744125, -0.1532466560602188, -0.2565014362335205, -0.2410384714603424, -0.21267898380756378, -0.011694230139255524, -0.34590351581573486, 0.07605530321598053, 0.05593792349100113, 0.09203973412513733, -0.40014123916625977, 0.07322828471660614, 0.11219112575054169, -0.22964246571063995, 0.25907549262046814, 0.11428028345108032, -0.1766490787267685, -0.1333211362361908, 0.5701708793640137, 0.07305431365966797, 0.12299703061580658, 0.5260341763496399, 0.028245646506547928, -0.2998528480529785, -0.10634806007146835, -0.11067633330821991, 0.017641620710492134, -0.4985683262348175, 0.1516590267419815, -0.2986529469490051, 0.006200090050697327, -0.0754864439368248, 0.3055916428565979, -0.2479841262102127, -0.19987353682518005, -0.24785752594470978, -0.056740496307611465, -0.266293466091156, 0.31050270795822144, 0.22726447880268097, 0.14134232699871063, 0.04887061566114426, 0.12136346101760864, 0.014919193461537361, -0.017515769228339195, -0.21054163575172424, -0.10603802651166916, -0.11849076300859451, 0.05421038717031479, 0.46904000639915466, 0.05913484841585159, 0.07756943255662918, -0.3034510910511017, 0.0020117349922657013, 0.07480628788471222, 0.40812814235687256, -0.1481204628944397, -0.2449810802936554, 0.13442735373973846, 0.14749379456043243, -0.20459260046482086, -0.14270852506160736, 0.14289024472236633, -0.2999054193496704, -0.2836627960205078, 0.277559369802475, 0.21859687566757202, 0.2007148712873459, 0.5252631902694702, -0.3144237995147705, 0.06100462004542351, -0.26654326915740967, -0.0883343368768692, -0.08789445459842682, -0.14212727546691895, 0.2218555212020874, -0.11512413620948792, 0.048285409808158875, 0.004149958491325378, -0.36121541261672974, 0.10103510320186615, -0.06199255585670471, 0.1064426377415657, 0.2610335648059845, -0.2262514978647232, 0.18503008782863617, -0.17883417010307312, 0.5595052242279053, -0.06860190629959106, -0.0908408984541893, -0.21007749438285828, -0.20612353086471558, 0.11239686608314514, -0.36699336767196655, -0.02991706132888794, 0.17642836272716522, 0.08146636188030243, 0.17244045436382294, 0.22600479423999786, 0.08967925608158112, 0.23749980330467224, 0.043336208909749985, 0.09056111425161362, 0.6321108341217041, -0.30763643980026245, 0.10570701956748962, 0.6642069816589355, -0.05160915106534958, 0.3939002454280853, 0.5684110522270203, -0.05671929940581322, 0.0461420863866806, 0.24715255200862885, 0.0770384669303894, 0.1513276994228363, -0.027155540883541107, 0.35979893803596497, 0.1632850170135498, -0.2646030783653259, 0.016814908012747765, 0.07784681022167206, -0.11485496163368225, -0.16889405250549316, -0.07469063997268677, -0.12623941898345947, -0.10034728050231934, -0.12215495854616165, -0.19646236300468445, 0.27012065052986145, -0.25174078345298767, -0.23225753009319305, 0.10149697959423065, -0.10920976847410202, 0.032802172005176544, 0.01488136500120163, -0.1606651246547699, 0.0004134252667427063, 0.5411726832389832, -0.1909661740064621, -0.08777841925621033, -0.17450137436389923, 0.059923022985458374, -0.0650443434715271, 0.5039453506469727, 0.0035534314811229706, -0.14525362849235535, 0.12224692851305008, -0.012989260256290436, -0.26088422536849976, 0.3138749599456787, -0.02433698996901512, -0.06326141208410263, 0.3497900366783142, 0.06132201850414276, -0.02358071133494377, -0.0355980210006237, 0.08595743775367737, 0.5021134614944458, -0.1324516385793686, 0.17501352727413177, -0.042528048157691956, 0.04778865724802017, -0.0630142018198967, 0.03741060569882393, 0.1388925313949585, 0.39818117022514343, -0.5280875563621521, 0.7149122357368469, -0.05407063663005829, -0.4777659475803375, -0.005921024829149246, 0.05108148977160454, 0.0883670523762703, 0.11220119148492813, 0.3021135628223419, 0.02056511491537094, 0.21278104186058044, -0.09145060926675797, 0.007612613961100578, 0.22308668494224548, 0.22335006296634674, 0.5986356139183044, -0.33556634187698364, -0.22108639776706696, -0.17058777809143066, -0.6316398978233337, -0.09000878781080246, 0.10963398218154907, 0.12448161840438843, 0.3167110085487366, 0.03517577797174454, 0.10323639214038849, -0.013693880289793015, -0.14433731138706207, -0.1889100968837738, -0.14863106608390808, -0.2568473517894745, 0.034053001552820206, 0.07535490393638611, -0.1750945895910263, -0.05508611351251602, 0.051597960293293, -0.3486756682395935, 0.2650834321975708, 0.32278937101364136, -0.09269045293331146, -0.10869783163070679, 0.43356630206108093, -0.012504243291914463, -0.177240252494812, -0.025555908679962158, 0.14660517871379852, -0.003572516143321991, -0.13373911380767822, -0.42405202984809875, -0.1528497040271759, -0.06236320361495018, -0.18455980718135834, 0.3187464773654938, -0.4405139684677124, 0.26729533076286316, -0.0004242854192852974, -0.11716651916503906, -0.19010625779628754, 0.0667128711938858, 0.06722470372915268, -0.16377778351306915, -0.509794294834137, -0.08433689177036285, -0.14360707998275757, 0.23433834314346313, 0.4027334153652191, 0.20915848016738892, -0.06751721352338791, 0.00042847543954849243, -0.2873527705669403, -0.38340258598327637, 0.3793547749519348, -0.5134127140045166, -0.31598329544067383, -0.12289311736822128, 0.20175112783908844, 0.3251563608646393, -0.33593374490737915, -0.6697239279747009, 0.10189830511808395, 0.26530519127845764, -0.33118292689323425, -0.02431628853082657, 0.2767460346221924, -0.1886909008026123, 0.05663098767399788, 0.1496441811323166, 0.514038622379303, 0.20097261667251587, 0.13415075838565826, 0.15127693116664886, -0.10546278208494186 ]
https://github.com/huggingface/datasets/issues/6699
`Dataset` unexpected changed dict data and may cause error
If `test.jsonl` contains more lines like: ``` {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} {"id": 2, "indexs": {"-2": [0, 10]}} ... {"id": n, "indexs": {"-9999": [0, 10]}} ``` `Dataset.from_json` will just raise an error: ``` An error occurred while generating the dataset TypeError: Couldn't cast array of type struct<-5942: list<item: int64>, -5943: list<item: int64>, -5944: list<item: int64>, -5945: list<item: int64>, -5946: list<item: int64>, -5947: list<item: int64>, -5948: list<item: int64>, -5949: list<item: int64>: ... to {... '-5312': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), '-5313': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)} The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/scruel/mambaforge/envs/vae/lib/python3.11/runpy.py", line 198, in _run_module_as_main return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/scruel/mambaforge/envs/vae/lib/python3.11/runpy.py", line 88, in _run_code exec(code, run_globals) File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module> cli.main() File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main run() File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file runpy.run_path(target, run_name="__main__") File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "/home/scruel/Code/Python/Working/llm-memory/data_reader.py", line 120, in <module> reader = SnippetReader(jsonl_path, npy_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/scruel/Code/Python/Working/llm-memory/data_reader.py", line 85, in __init__ self._dataset = Dataset.from_json(jsonl_path, features=) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/arrow_dataset.py", line 1130, in from_json ).read() ^^^^^^ File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/io/json.py", line 59, in read self.builder.download_and_prepare( File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/builder.py", line 1005, in download_and_prepare self._download_and_prepare( File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/builder.py", line 1100, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/builder.py", line 1860, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/builder.py", line 2016, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset ```
### Describe the bug Will unexpected get keys with `None` value in the parsed json dict. ### Steps to reproduce the bug ```jsonl test.jsonl {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} ``` ```python dataset = Dataset.from_json('.test.jsonl') print(dataset[0]) ``` Result: ``` {'id': 0, 'indexs': {'-1': [...], '-2': None, '-3': None, '-4': None, '-5': None, '-6': None, '-7': None, '-8': None, '-9': None, ...}} ``` Those keys with `None` value will unexpected appear in the dict. ### Expected behavior Result should be ``` {'id': 0, 'indexs': {'-1': [0, 10]}} ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-6.5.0-14-generic-x86_64-with-glibc2.35 - Python version: 3.11.6 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.2 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
264
`Dataset` unexpected changed dict data and may cause error ### Describe the bug Will unexpected get keys with `None` value in the parsed json dict. ### Steps to reproduce the bug ```jsonl test.jsonl {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} ``` ```python dataset = Dataset.from_json('.test.jsonl') print(dataset[0]) ``` Result: ``` {'id': 0, 'indexs': {'-1': [...], '-2': None, '-3': None, '-4': None, '-5': None, '-6': None, '-7': None, '-8': None, '-9': None, ...}} ``` Those keys with `None` value will unexpected appear in the dict. ### Expected behavior Result should be ``` {'id': 0, 'indexs': {'-1': [0, 10]}} ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-6.5.0-14-generic-x86_64-with-glibc2.35 - Python version: 3.11.6 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.2 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 If `test.jsonl` contains more lines like: ``` {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} {"id": 2, "indexs": {"-2": [0, 10]}} ... {"id": n, "indexs": {"-9999": [0, 10]}} ``` `Dataset.from_json` will just raise an error: ``` An error occurred while generating the dataset TypeError: Couldn't cast array of type struct<-5942: list<item: int64>, -5943: list<item: int64>, -5944: list<item: int64>, -5945: list<item: int64>, -5946: list<item: int64>, -5947: list<item: int64>, -5948: list<item: int64>, -5949: list<item: int64>: ... to {... '-5312': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), '-5313': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None)} The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/scruel/mambaforge/envs/vae/lib/python3.11/runpy.py", line 198, in _run_module_as_main return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/scruel/mambaforge/envs/vae/lib/python3.11/runpy.py", line 88, in _run_code exec(code, run_globals) File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module> cli.main() File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main run() File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file runpy.run_path(target, run_name="__main__") File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "/home/scruel/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "/home/scruel/Code/Python/Working/llm-memory/data_reader.py", line 120, in <module> reader = SnippetReader(jsonl_path, npy_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/scruel/Code/Python/Working/llm-memory/data_reader.py", line 85, in __init__ self._dataset = Dataset.from_json(jsonl_path, features=) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/arrow_dataset.py", line 1130, in from_json ).read() ^^^^^^ File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/io/json.py", line 59, in read self.builder.download_and_prepare( File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/builder.py", line 1005, in download_and_prepare self._download_and_prepare( File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/builder.py", line 1100, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/builder.py", line 1860, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/home/scruel/mambaforge/envs/vae/lib/python3.11/site-packages/datasets/builder.py", line 2016, in _prepare_split_single raise DatasetGenerationError("An error occurred while generating the dataset") from e datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset ```
[ 0.07308311760425568, -0.1030542254447937, -0.13767212629318237, 0.3706306219100952, 0.12007098644971848, 0.003958560526371002, 0.11278946697711945, 0.30390578508377075, 0.12194353342056274, 0.017168737947940826, -0.03790024667978287, 0.7005323171615601, 0.006284598261117935, 0.12812213599681854, -0.2789464294910431, 0.07599605619907379, 0.12128949165344238, 0.22948876023292542, -0.006315074861049652, -0.08592734485864639, -0.35141438245773315, 0.22902743518352509, -0.33788955211639404, -0.06585283577442169, -0.08863126486539841, -0.3778616786003113, -0.28242024779319763, 0.21971279382705688, -0.0018696542829275131, -0.5786463618278503, 0.2773435711860657, -0.013493254780769348, -0.21813222765922546, 0.3586711883544922, -0.00010899150220211595, 0.030771777033805847, 0.36751043796539307, -0.07510685920715332, -0.07640548050403595, -0.34934353828430176, -0.41759464144706726, -0.32096216082572937, 0.05640820413827896, -0.4294997453689575, -0.21025991439819336, -0.4608016312122345, -0.39438071846961975, -0.38224634528160095, 0.5095824599266052, 0.3946158289909363, 0.26622822880744934, 0.07365668565034866, 0.010039914399385452, 0.11907502263784409, 0.1864999234676361, 0.23357418179512024, 0.2045547217130661, -0.03543112054467201, 0.012691140174865723, 0.11018083244562149, 0.10497502237558365, 0.1720600724220276, -0.3668082654476166, -0.15894365310668945, -0.008812502026557922, 0.13426129519939423, -0.10360675305128098, -0.1649157553911209, 0.06519067287445068, 0.3067379593849182, 0.2762957811355591, -0.267140656709671, -0.27799519896507263, -0.3101922869682312, 0.02183391898870468, -0.13121813535690308, -0.03356235474348068, -0.055652886629104614, 0.14153237640857697, 0.17432478070259094, 0.1438501477241516, -0.15674284100532532, -0.11039736866950989, 0.12239163368940353, -0.19653795659542084, 0.06328628957271576, -0.11074090003967285, 0.07885798811912537, -0.4251757860183716, -0.2223968654870987, -0.17452141642570496, -0.17927362024784088, -0.4499448835849762, 0.04682854562997818, -0.15826565027236938, -0.3040984570980072, 0.19089770317077637, -0.230904221534729, 0.05328591912984848, 0.10099627822637558, -0.006143427453935146, -0.10303615778684616, -0.19626300036907196, 0.19920608401298523, 0.3236577808856964, 0.11507284641265869, 0.17916947603225708, 0.21781964600086212, 0.1324174702167511, 0.07409841567277908, 0.039349671453237534, 0.022427331656217575, 0.33633121848106384, 0.04174499586224556, 0.04508807137608528, 0.08605481684207916, 0.5866707563400269, -0.022250842303037643, -0.4152399003505707, 0.23475861549377441, -0.3447059094905853, 0.0761306881904602, -0.027951452881097794, 0.08277343213558197, -0.09293641149997711, 0.29399511218070984, 0.022708319127559662, 0.19033695757389069, 0.007902121171355247, 0.021147824823856354, -0.36705002188682556, 0.044178396463394165, 0.1843164712190628, -0.41344568133354187, 0.02260677143931389, 0.2401905506849289, 0.19138604402542114, 0.34424808621406555, -0.3043482303619385, -0.19765645265579224, -0.22410841286182404, -0.09654386341571808, 0.10092713683843613, 0.1902972310781479, -0.23791609704494476, 0.13188080489635468, 0.1563122421503067, -0.3152642250061035, -0.16940809786319733, 0.29684779047966003, -0.3957749307155609, -0.032061584293842316, -0.21631284058094025, 0.2754327654838562, -0.34572070837020874, -0.18896973133087158, -0.31378841400146484, 0.17756327986717224, -0.22151678800582886, -0.056216657161712646, 0.16955691576004028, -0.05113019794225693, -0.15795020759105682, -0.3031262755393982, -0.0438937246799469, 0.40945494174957275, -0.2723413407802582, -0.09945105016231537, 0.08586940914392471, -0.01566702127456665, 0.048561833798885345, 0.10551714897155762, -0.09152568131685257, 0.09691318869590759, -0.06445508450269699, 0.08149288594722748, 0.15084224939346313, -0.5764119625091553, -0.5898662209510803, 0.23899072408676147, -0.14696615934371948, 0.2383812814950943, 0.12329253554344177, -0.1017913892865181, 0.2441101372241974, 0.11488085985183716, 0.2295006811618805, 0.075046107172966, 0.17286309599876404, 0.14453895390033722, -0.2856075167655945, -0.4020178020000458, 0.32757067680358887, -0.1700938642024994, -0.11621396243572235, 0.15240398049354553, -0.032763443887233734, -0.03136732801795006, 0.3021981418132782, -0.0028256885707378387, 0.06003443896770477, 0.33609968423843384, 0.6348700523376465, -0.007145866751670837, 0.26729100942611694, -0.15232428908348083, -0.5025803446769714, 0.13198232650756836, 0.008773069828748703, -0.0352812334895134, -0.5831507444381714, -0.18324148654937744, -0.36089760065078735, -0.020134679973125458, -0.04924686625599861, -0.15041691064834595, 0.23652991652488708, -0.10418422520160675, 0.18224191665649414, 0.27878594398498535, -0.017064455896615982, 0.23135755956172943, 0.1334982067346573, 0.16331765055656433, -0.22950425744056702, 0.3260555863380432, 0.037856146693229675, -0.08982259035110474, 0.16632962226867676, 0.1717551052570343, 0.2898969352245331, -0.1797332912683487, -0.17180463671684265, 0.26462307572364807, 0.21233409643173218, 0.03775221109390259, -0.060431353747844696, -0.14877085387706757, 0.22974523901939392, -0.25334882736206055, 0.09455133229494095, 0.44803592562675476, 0.31164103746414185, 0.03138697147369385, -0.1676819920539856, 0.47442734241485596, -0.1148102879524231, 0.1684335470199585, -0.33870500326156616, -0.024648312479257584, 0.14729668200016022, -0.22813306748867035, 0.0015594884753227234, -0.32759299874305725, -0.22134383022785187, 0.22472381591796875, 0.1708337962627411, 0.035849429666996, -0.23742641508579254, 0.09752774238586426, 0.5427203178405762, -0.03667392581701279, -0.056008100509643555, 0.19722172617912292, -0.042101114988327026, -0.03258125111460686, 0.02847265638411045, 0.23451317846775055, 0.253060519695282, 0.32967057824134827, -0.31934431195259094, 0.2269425243139267, 0.23124490678310394, -0.04095130413770676, 0.17682825028896332, -0.04603002965450287, 0.20573341846466064, 0.24188625812530518, 0.5090345740318298, 0.04874506592750549, -0.17390215396881104, -0.26029977202415466, 0.016666607931256294, 0.5556955337524414, -0.14698602259159088, 0.15396884083747864, -0.5247718095779419, -0.008226696401834488, 0.04412542283535004, -0.2198181301355362, -0.029630370438098907, -0.377811461687088, -0.027369000017642975, -0.02396235242486, -0.15124733746051788, 0.06062258034944534, 0.11151941120624542, 0.05122752487659454, 0.1381535679101944, -0.15572310984134674, -0.4555628299713135, -0.3663344979286194, -0.2883056402206421, 0.10261498391628265, 0.06696540117263794, 0.06307023763656616, 0.07437551766633987, -0.08977417647838593, -0.18157580494880676, 0.06721580773591995, -0.27029794454574585, -0.16135235130786896, -0.20366065204143524, 0.28447425365448, 0.25554677844047546, 0.15968358516693115, 0.05115974694490433, 0.037565577775239944, 0.11903084069490433, -0.10886680334806442, -0.34514519572257996, 0.0688718929886818, -0.07993640005588531, 0.2624584436416626, -0.024724004790186882, -0.4589221775531769, -0.15958452224731445, -0.12576955556869507, 0.3129788935184479, 0.05763816460967064, 0.20503592491149902, -0.05940597504377365, 0.12035281956195831, -0.05248984694480896, -0.02197454310953617, 0.1314973682165146, -0.23449937999248505, -0.09839390218257904, 0.18247337639331818, 0.08070584386587143, -0.24848274886608124, 0.045508284121751785, -0.2661159038543701, 0.067241370677948, -0.2568526864051819, -0.47719621658325195, -0.21647046506404877, -0.10990999639034271, 0.34999606013298035, -0.1349664330482483, -0.1423749327659607, 0.1550445258617401, 0.2641654908657074, -0.056878361850976944, -0.13695813715457916, -0.1727398931980133, -0.021904736757278442, 0.3034028708934784, -0.10342154651880264, 0.10931101441383362, 0.37383607029914856, 0.01054977998137474, 0.16545353829860687, 0.23581355810165405, 0.041595060378313065, 0.17497505247592926, -0.2933497726917267, 0.29896605014801025, 0.006387479603290558, -0.2173074185848236, -0.2996774911880493, 0.22413140535354614, -0.04604464769363403, -0.022939607501029968, -0.17006316781044006, 0.03200478106737137, -0.046447280794382095, -0.2693524956703186, -0.6347519159317017, -0.20409353077411652, -0.01401965506374836, -0.2639974355697632, -0.26502084732055664, 0.052900176495313644, 0.11006627231836319, -0.14732849597930908, -0.09556230902671814, -0.05786574259400368, 0.030985809862613678, -0.06567315012216568, -0.1431128829717636, -0.2894499897956848, -0.16377295553684235, -0.3007226884365082, 0.294192910194397, -0.17933832108974457, 0.3412713408470154, 0.1691741645336151, 0.07467257231473923, 0.09061998873949051, -0.2001502513885498, 0.687932550907135, -0.12848199903964996, 0.058501388877630234, 0.27469971776008606, 0.0014023743569850922, -0.46448346972465515, 0.01575203239917755, -0.47847411036491394, 0.26352977752685547, 0.14861957728862762, 0.4245093762874603, -0.39479875564575195, -0.23085378110408783, 0.09983277320861816, 0.1058555394411087, -0.18655185401439667, -0.10490548610687256, -0.20575474202632904, -0.3604142963886261, -0.3662698268890381, -0.0071287602186203, -0.07411990314722061, 0.41777557134628296, -0.16276797652244568, -0.16675172746181488, -0.10618354380130768, -0.07499133795499802, 0.054832447320222855, 0.00005800370126962662, 0.36643344163894653, -0.008652999997138977, 0.07442888617515564, -0.15100565552711487, 0.16576208174228668, 0.49033382534980774, 0.5170035362243652, 0.22300156950950623, -0.1655617654323578, -0.30835047364234924, 0.10951590538024902, 0.006368771195411682, 0.055099762976169586, 0.015154805965721607, 0.3647479712963104, -0.020839400589466095, 0.1819012612104416, -0.08401797711849213, -0.23989251255989075, 0.3263395130634308, 0.07925788313150406, -0.35706543922424316, -0.2101346105337143, 0.5223602056503296, 0.11028534173965454, -0.1621425598859787, 0.08706821501255035, 0.38524532318115234, -0.3243095576763153, 0.6519846320152283, -0.07120273262262344, 0.6277432441711426, 0.3253048062324524, -0.1163100004196167, 0.5021005868911743, -0.4546147584915161, 0.7009583711624146, 0.007205083966255188, 0.021113496273756027, -0.40700629353523254, 0.256072461605072, 0.08507777750492096, 0.044332657009363174, 0.23802325129508972, 0.12407778203487396, -0.2814562916755676, 0.3208094537258148, -0.3790442943572998, 0.1161264181137085, -0.1369789093732834, 0.14895841479301453, -0.005737027153372765, 0.20391061902046204, -0.3062407076358795, 0.19104227423667908, -0.07776251435279846, 0.14916479587554932, 0.08025115728378296, -0.08741158992052078, -0.41207921504974365, -0.24807851016521454, -0.2817840576171875, -0.08151581883430481, 0.21211767196655273, 0.02216579206287861, 0.3620224595069885, -0.4072759747505188, 0.02369440346956253, 0.2577706277370453, 0.006543703377246857, 0.28060492873191833, -0.12364257872104645, 0.17889319360256195, -0.12794622778892517, 0.18786880373954773, 0.1913037896156311, 0.04298078268766403, 0.1497623473405838, 0.14453938603401184, -0.5738555788993835, 0.14294758439064026, -0.14412467181682587, -0.02199232392013073, 0.20410484075546265, 0.17362520098686218, -0.3750871419906616, -0.355334997177124, -0.19874778389930725, 0.037621140480041504, 0.2937970757484436, -0.25601398944854736, 0.20885565876960754, 0.07994087785482407, -0.1831405609846115, 0.3739405572414398, -0.12850956618785858, -0.28432121872901917, -0.14128072559833527, 0.4329191744327545, 0.35610702633857727, 0.16476309299468994, 0.5417935848236084, -0.023846689611673355, -0.0643845945596695, -0.3078635632991791, 0.24940592050552368, 0.1472562551498413, -0.009367074817419052, 0.3266926407814026, -0.007590574212372303, 0.32174015045166016, -0.032220322638750076, 0.12669424712657928, -0.0191967636346817, 0.4070107042789459, 0.14834071695804596, -0.3737330436706543, -0.24993100762367249, 0.280806303024292, 0.25207942724227905, -0.08844846487045288, 0.13573306798934937, 0.056230828166007996, -0.24440641701221466, 0.0673975721001625, -0.3751481771469116, 0.3467594385147095, -0.24984487891197205, 0.1639726758003235, 0.06844498217105865, -0.0102841816842556, 0.1478876769542694, -0.23163871467113495, 0.26941388845443726, -0.037385374307632446, 0.07077331095933914, -0.2773175537586212, -0.3108782172203064, 0.05609498918056488, 0.09286484122276306, 0.05686459690332413, -0.19271937012672424, -0.13909554481506348, -0.041241440922021866, 0.08850938081741333, 0.16257448494434357, 0.4005480408668518, 0.08303405344486237, 0.4893207550048828, 0.08209070563316345, 0.03843790665268898, 0.014484964311122894, 0.036182012408971786, -0.14917854964733124, 0.010942243039608002, -0.009132865816354752, 0.39153149724006653, -0.03620605170726776, 0.09144565463066101, -0.1372460275888443, -0.04780707508325577, -0.33567291498184204, 0.18487364053726196, 0.3807527720928192, -0.22134406864643097, 0.07854178547859192, 0.26394838094711304, 0.2759539484977722, 0.12930209934711456, -0.23552308976650238, -0.028130007907748222, 0.04158392176032066, 0.2824423015117645, -0.2918705642223358, -0.25573480129241943, 0.4501139223575592, 0.18869423866271973, 0.15729327499866486, 0.13158643245697021, -0.015571098774671555, -0.08316199481487274, -0.030977927148342133, 0.040647007524967194, 0.42404866218566895, -0.014692254364490509, 0.30343711376190186, 0.3731118440628052, -0.09519649296998978, -0.1264820247888565, 0.37379634380340576, 0.19739238917827606, 0.16101565957069397, 0.5974517464637756, 0.18142864108085632, 0.15526653826236725, 0.07971472293138504, 0.10633149743080139, 0.008005663752555847, -0.36648741364479065, 0.4004862904548645, 0.030217334628105164, -0.0585668683052063, -0.002362877130508423, 0.19243477284908295, 0.19746512174606323, -0.08081233501434326, -0.0044661168940365314, -0.053120922297239304, 0.2627618610858917, -0.26073846220970154, -0.21586312353610992, -0.1171576976776123, -0.11342623829841614, 0.09543976187705994, -0.11416283249855042, -0.057813819497823715, -0.32072561979293823, -0.029906421899795532, 0.01835969090461731, -0.32579153776168823, -0.38162297010421753, 0.10235250741243362, 0.05569472908973694, 0.3428356349468231, -0.09386146813631058, 0.003473179414868355, 0.251989483833313, -0.1039016991853714, 0.1906195431947708, 0.22236180305480957, 0.4058495759963989, 0.16113154590129852, -0.07881107926368713, 0.09203537553548813, 0.051431383937597275, -0.38913941383361816, 0.06115041673183441, 0.28293201327323914, -0.10637256503105164, 0.09535208344459534, 0.020502522587776184, 0.25821083784103394, -0.2157965749502182, -0.08203025162220001, 0.3516393303871155, 0.23362989723682404, -0.10974542796611786, 0.36599692702293396, -0.1825869381427765, -0.13294291496276855, -0.1795475333929062, -0.0542604997754097, -0.155259370803833, -0.26140597462654114, 0.0914030522108078, 0.22798244655132294, 0.2848593592643738, -0.040578439831733704, 0.14942136406898499, -0.20597216486930847, 0.18460004031658173, 0.1242130845785141, -0.013950303196907043, -0.11264000087976456, 0.11773784458637238, -0.3416370749473572, 0.01442313939332962, -0.03159516677260399, -0.12231781333684921, 0.08761627972126007, 0.12976226210594177, -0.12204039841890335, -0.07183067500591278, -0.01850542426109314, 0.2576938271522522, -0.17748118937015533, 0.1867481917142868, -0.32990753650665283, -0.013062749058008194, -0.1408751755952835, -0.18127316236495972, 0.09451092034578323, -0.15230196714401245, 0.32261693477630615, 0.13998085260391235, 0.08322275429964066, -0.3583110570907593, 0.019678324460983276, -0.16988293826580048, -0.17618468403816223, 0.18237239122390747, 0.3636665940284729, 0.10084798187017441, -0.13697084784507751, -0.08745037019252777, 0.01659022644162178, -0.26282116770744324, -0.31235069036483765, 0.37457457184791565, 0.03967960551381111, 0.418417751789093, 0.05382154881954193, -0.154775470495224, 0.12107706815004349, 0.08360287547111511, 0.03690476715564728, -0.21107840538024902, -0.5247007608413696, 0.30882754921913147, -0.07949879765510559, -0.029421333223581314, -0.19735261797904968, 0.22972416877746582, 0.1163669228553772, 0.28919312357902527, -0.2271037995815277, -0.2882704436779022, 0.4129785895347595, -0.22005295753479004, -0.16355614364147186, -0.11552619189023972, 0.2090732753276825, -0.08887239545583725, -0.38324210047721863, -0.0920773521065712, 0.09256453067064285, 0.5761552453041077, -0.2015184462070465, -0.12139135599136353, 0.13868004083633423, -0.14596109092235565, 0.02926737442612648, 0.006513144820928574, 0.043278854340314865, 0.08931166678667068, -0.01867269165813923, 0.1811908632516861, -0.2141256183385849 ]
https://github.com/huggingface/datasets/issues/6699
`Dataset` unexpected changed dict data and may cause error
Hi! Our JSON parser expects all examples/rows to share the same set of columns (applies to nested columns, too), hence the error. To read the `index` column, we would have to manually cast the input to PyArrow's `pa.map_` type, but this requires a more thorough investigation, as `pa.map_` has limited support in PyArrow.
### Describe the bug Will unexpected get keys with `None` value in the parsed json dict. ### Steps to reproduce the bug ```jsonl test.jsonl {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} ``` ```python dataset = Dataset.from_json('.test.jsonl') print(dataset[0]) ``` Result: ``` {'id': 0, 'indexs': {'-1': [...], '-2': None, '-3': None, '-4': None, '-5': None, '-6': None, '-7': None, '-8': None, '-9': None, ...}} ``` Those keys with `None` value will unexpected appear in the dict. ### Expected behavior Result should be ``` {'id': 0, 'indexs': {'-1': [0, 10]}} ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-6.5.0-14-generic-x86_64-with-glibc2.35 - Python version: 3.11.6 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.2 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0
53
`Dataset` unexpected changed dict data and may cause error ### Describe the bug Will unexpected get keys with `None` value in the parsed json dict. ### Steps to reproduce the bug ```jsonl test.jsonl {"id": 0, "indexs": {"-1": [0, 10]}} {"id": 1, "indexs": {"-1": [0, 10]}} ``` ```python dataset = Dataset.from_json('.test.jsonl') print(dataset[0]) ``` Result: ``` {'id': 0, 'indexs': {'-1': [...], '-2': None, '-3': None, '-4': None, '-5': None, '-6': None, '-7': None, '-8': None, '-9': None, ...}} ``` Those keys with `None` value will unexpected appear in the dict. ### Expected behavior Result should be ``` {'id': 0, 'indexs': {'-1': [0, 10]}} ``` ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-6.5.0-14-generic-x86_64-with-glibc2.35 - Python version: 3.11.6 - `huggingface_hub` version: 0.20.2 - PyArrow version: 14.0.2 - Pandas version: 2.1.4 - `fsspec` version: 2023.10.0 Hi! Our JSON parser expects all examples/rows to share the same set of columns (applies to nested columns, too), hence the error. To read the `index` column, we would have to manually cast the input to PyArrow's `pa.map_` type, but this requires a more thorough investigation, as `pa.map_` has limited support in PyArrow.
[ 0.06325607001781464, 0.13403084874153137, -0.07492756843566895, 0.33300745487213135, 0.1449947953224182, 0.0656629428267479, 0.26568281650543213, 0.39243343472480774, -0.0318576879799366, 0.02035510540008545, -0.1743757426738739, 0.7408967018127441, 0.06628523021936417, 0.07324205338954926, -0.30366426706314087, 0.036982957273721695, 0.07008358836174011, 0.2390478253364563, 0.05128145217895508, -0.04104352369904518, -0.34926319122314453, 0.2030322551727295, -0.357000470161438, 0.055437710136175156, 0.009041836485266685, -0.21641695499420166, -0.3116433322429657, 0.1430169641971588, 0.03394352272152901, -0.48772937059402466, 0.40001118183135986, -0.09117232263088226, -0.1931571662425995, 0.28844165802001953, -0.00011207376519450918, 0.22785605490207672, 0.3236148953437805, -0.0349971279501915, -0.02349301241338253, -0.4426707625389099, -0.262051522731781, -0.16640251874923706, 0.13935381174087524, -0.40700843930244446, -0.12277289479970932, -0.5110161900520325, -0.316230446100235, -0.0757453516125679, 0.39667195081710815, 0.22302673757076263, 0.20813055336475372, 0.13509124517440796, 0.06616514921188354, 0.15433096885681152, 0.4026825428009033, 0.2261827141046524, 0.13029994070529938, 0.19131603837013245, 0.09784898161888123, -0.02900375798344612, -0.027015410363674164, 0.053978778421878815, -0.32812249660491943, -0.013816583901643753, -0.08920169621706009, 0.2778407335281372, 0.06099671125411987, -0.08768309652805328, -0.0658184140920639, 0.3380242884159088, 0.2647727131843567, -0.4204917550086975, -0.17011068761348724, -0.29815438389778137, 0.11342182010412216, -0.1864081472158432, -0.029439590871334076, 0.018996648490428925, 0.08084717392921448, 0.24667446315288544, 0.17265750467777252, 0.01161963865160942, -0.15068921446800232, 0.2444547414779663, -0.24398060142993927, 0.061769261956214905, 0.039636384695768356, 0.10399040579795837, -0.4291885495185852, -0.16872215270996094, 0.08813627809286118, -0.06157305836677551, -0.3459925055503845, 0.021608058363199234, -0.18031127750873566, -0.17221903800964355, 0.12266086041927338, -0.31267064809799194, 0.1442435383796692, -0.07089657336473465, 0.08627749979496002, -0.09524790197610855, 0.04552127793431282, 0.2676743268966675, 0.4339092969894409, 0.03791869431734085, 0.004997946321964264, 0.20032356679439545, 0.16555055975914001, 0.06194917485117912, 0.07465745508670807, 0.0719960629940033, 0.2886229455471039, 0.1358368992805481, 0.049545902758836746, -0.04836177080869675, 0.576376736164093, 0.07080566883087158, -0.46467235684394836, 0.20226718485355377, -0.5814853310585022, 0.008426226675510406, -0.14880049228668213, 0.08188685029745102, 0.05211954191327095, 0.21667742729187012, 0.027362249791622162, 0.2803958058357239, -0.007820808328688145, -0.03270280733704567, -0.3391030728816986, 0.05551598221063614, 0.16373692452907562, -0.23389267921447754, 0.003917954862117767, 0.23875421285629272, 0.12043624371290207, 0.4064261019229889, -0.18897606432437897, -0.08663631975650787, -0.22079449892044067, -0.03856072574853897, 0.06230691820383072, 0.22259394824504852, -0.08022750914096832, 0.17787295579910278, 0.17281284928321838, -0.3777017593383789, -0.3043898940086365, 0.3696695864200592, -0.37582647800445557, -0.20487752556800842, -0.2742725908756256, 0.21082334220409393, -0.34933775663375854, -0.10003861784934998, -0.3112175464630127, 0.18372757732868195, -0.10552137345075607, -0.18804018199443817, 0.10666674375534058, -0.13088388741016388, 0.00005984306335449219, -0.40246522426605225, 0.002411080524325371, 0.26191210746765137, -0.4174775183200836, -0.014190193265676498, 0.09830508381128311, 0.029626313596963882, -0.025303877890110016, 0.1465398222208023, -0.2542975842952728, 0.16426366567611694, 0.036111801862716675, 0.28949683904647827, 0.11239758878946304, -0.42476052045822144, -0.6330883502960205, 0.0886707752943039, -0.16516003012657166, 0.20620118081569672, 0.05209411680698395, -0.1346558928489685, 0.3360030949115753, 0.16670696437358856, 0.23978517949581146, 0.078699991106987, 0.12503854930400848, 0.11799801141023636, -0.2422488033771515, -0.41987505555152893, 0.35506629943847656, -0.06755971908569336, -0.30858224630355835, 0.015517182648181915, -0.01966889202594757, -0.17932605743408203, 0.3341495990753174, -0.08633561432361603, 0.047760605812072754, 0.3030605912208557, 0.5166478753089905, -0.021666884422302246, 0.3309679925441742, -0.057175248861312866, -0.5602264404296875, 0.12807685136795044, -0.06257214397192001, -0.09351634979248047, -0.5345642566680908, -0.2629185914993286, -0.3142395317554474, 0.04879225790500641, -0.044497694820165634, -0.04208403453230858, 0.18248993158340454, -0.22567561268806458, 0.12093803286552429, 0.20003929734230042, -0.058621980249881744, -0.029366547241806984, 0.10877147316932678, 0.08103139698505402, -0.22830282151699066, 0.43446481227874756, -0.08858805894851685, -0.2191135436296463, 0.1795240044593811, 0.145889550447464, 0.20705646276474, -0.1554996818304062, -0.04885299876332283, 0.22218888998031616, 0.19612397253513336, 0.05352270230650902, -0.19949179887771606, -0.13250739872455597, 0.133522167801857, -0.30834445357322693, 0.0250703077763319, 0.28818151354789734, 0.22149941325187683, -0.014453288167715073, -0.18151357769966125, 0.5651105046272278, -0.11808884143829346, 0.18307146430015564, -0.3858530521392822, 0.04218708723783493, 0.05696222931146622, -0.1519189327955246, 0.0672779306769371, -0.25560450553894043, -0.2372172325849533, 0.27319058775901794, 0.03183017298579216, 0.17418554425239563, -0.2941657304763794, 0.13993433117866516, 0.42475783824920654, -0.09090106189250946, -0.06220119446516037, 0.16215780377388, -0.06691119819879532, -0.04606662690639496, 0.03818018361926079, 0.02327670529484749, 0.2901613116264343, 0.3179473578929901, -0.24963682889938354, 0.2100376933813095, 0.08533896505832672, -0.09454289823770523, 0.1015561893582344, 0.047810282558202744, 0.2520560026168823, 0.18436077237129211, 0.5401180386543274, 0.038983672857284546, -0.19468170404434204, -0.13842882215976715, 0.1689474731683731, 0.469733327627182, -0.32889214158058167, 0.11977919191122055, -0.4211984872817993, 0.11078455299139023, 0.07749169319868088, -0.39841026067733765, 0.027779927477240562, -0.33421093225479126, 0.03012080490589142, 0.15392017364501953, -0.15919671952724457, 0.1940552294254303, 0.05586405470967293, 0.0011323541402816772, 0.13648338615894318, -0.3072753846645355, -0.3985253572463989, -0.48191919922828674, -0.34033310413360596, 0.06352077424526215, 0.061051540076732635, 0.08458836376667023, -0.2171468883752823, -0.028482098132371902, -0.21761766076087952, 0.09714935719966888, -0.27378949522972107, -0.11136317253112793, -0.31470537185668945, 0.2568646967411041, 0.2082958221435547, 0.20429727435112, -0.0850759819149971, -0.0969638079404831, 0.2318027913570404, 0.01615915261209011, -0.4312126040458679, 0.32346948981285095, -0.1740349531173706, 0.22766725718975067, 0.06901812553405762, -0.4328291714191437, -0.17339561879634857, -0.11064121127128601, 0.3484053611755371, -0.0375807024538517, 0.19493626058101654, -0.26323407888412476, 0.18360520899295807, -0.1049426719546318, -0.10060238838195801, 0.027934998273849487, -0.22252479195594788, 0.02977406606078148, 0.28097254037857056, 0.023108357563614845, -0.2917676866054535, -0.07868228852748871, -0.31123435497283936, -0.007718514651060104, -0.19940121471881866, -0.4721739888191223, -0.2604062557220459, -0.05796083062887192, 0.5198544263839722, -0.10279855132102966, -0.14482344686985016, 0.27823442220687866, 0.3091062009334564, 0.016159342601895332, -0.06999729573726654, -0.16960211098194122, -0.03402409702539444, 0.43825042247772217, -0.15870514512062073, 0.052073508501052856, 0.32275012135505676, 0.0313199944794178, 0.3008265495300293, 0.19023489952087402, 0.03008323721587658, 0.2369280904531479, -0.38308852910995483, 0.24034228920936584, 0.10195955634117126, -0.07718372344970703, -0.2535218894481659, 0.05019296705722809, -0.09507717937231064, -0.04819492995738983, -0.21294242143630981, -0.18082962930202484, 0.0010627508163452148, -0.2471207082271576, -0.668240487575531, -0.27214571833610535, 0.0631137564778328, -0.14311212301254272, -0.18810921907424927, 0.07675357162952423, 0.06506115943193436, -0.1435580998659134, -0.16945475339889526, -0.019614093005657196, -0.15292008221149445, -0.10133413225412369, -0.13281598687171936, -0.11029717326164246, -0.276543527841568, -0.22873073816299438, 0.312366783618927, -0.043698057532310486, 0.2880330979824066, 0.3273835778236389, -0.1170383170247078, 0.21164119243621826, -0.18245713412761688, 0.7468932271003723, -0.03209153562784195, -0.031239233911037445, 0.3304036855697632, 0.18004541099071503, -0.5909669399261475, -0.08471520990133286, -0.4279465973377228, 0.13377690315246582, 0.10772569477558136, 0.31115972995758057, -0.4502878189086914, -0.10141345858573914, 0.2158985286951065, 0.09129273146390915, -0.12323936820030212, -0.1704133152961731, -0.18803967535495758, -0.48730626702308655, -0.2360292673110962, 0.003377757966518402, 0.01516558788716793, 0.41935214400291443, -0.11115599423646927, -0.033623967319726944, -0.06768685579299927, -0.014500666409730911, -0.04412089288234711, 0.19994886219501495, 0.34428733587265015, -0.12792599201202393, 0.1184966117143631, 0.060420915484428406, 0.011920500546693802, 0.5308080911636353, 0.6244470477104187, 0.2938026487827301, -0.08683939278125763, -0.1832989752292633, 0.10652811080217361, 0.07055006921291351, 0.08890646696090698, 0.06546163558959961, 0.23164701461791992, -0.17071348428726196, 0.024594847112894058, -0.0955810695886612, -0.40524154901504517, 0.4318380653858185, -0.08281102031469345, -0.19256991147994995, -0.09548170864582062, 0.5625211596488953, 0.11848551034927368, -0.1559605896472931, 0.06739898771047592, 0.417913556098938, -0.1493023931980133, 0.7564506530761719, -0.029030680656433105, 0.7646388411521912, 0.16548368334770203, 0.026737775653600693, 0.6800460815429688, -0.40552210807800293, 0.5390685200691223, -0.1282438039779663, 0.16003663837909698, -0.40769585967063904, 0.13968323171138763, 0.02150479517877102, -0.07891474664211273, 0.06763475388288498, 0.14768868684768677, -0.17958061397075653, 0.16994832456111908, -0.34271639585494995, 0.25453615188598633, -0.057836927473545074, 0.024488165974617004, 0.04840972647070885, 0.17604447901248932, -0.23899760842323303, 0.10093389451503754, -0.011643603444099426, 0.08266798406839371, 0.14083102345466614, -0.13894587755203247, -0.4996163249015808, -0.267375648021698, -0.30762922763824463, -0.12356996536254883, 0.13996420800685883, 0.13553036749362946, 0.44703051447868347, -0.3901968002319336, -0.033430106937885284, 0.2321242392063141, -0.22177590429782867, 0.003345336765050888, -0.18582278490066528, 0.22533154487609863, 0.055383872240781784, 0.18264761567115784, 0.2145904153585434, -0.0663243904709816, 0.1592576950788498, 0.20918968319892883, -0.5370740294456482, 0.23378050327301025, -0.12970009446144104, 0.03628106415271759, -0.02405843883752823, 0.227289617061615, -0.3467869162559509, -0.43371355533599854, -0.0527811124920845, -0.09003706276416779, 0.3445895314216614, -0.22474417090415955, 0.1518864631652832, -0.044538743793964386, -0.1226111575961113, 0.4748733639717102, -0.2848146855831146, -0.3144972324371338, -0.13545553386211395, 0.4767879843711853, 0.36072394251823425, 0.22341471910476685, 0.5261082649230957, -0.0274222232401371, -0.0324869230389595, -0.1399855613708496, 0.299584299325943, 0.30161038041114807, -0.1350110024213791, 0.20287805795669556, -0.13468103110790253, 0.398227334022522, -0.01349649392068386, 0.21933461725711823, 0.12911750376224518, 0.4328553080558777, 0.07586342096328735, -0.2731934189796448, -0.1974266618490219, 0.4598127603530884, 0.4388343095779419, -0.09435240924358368, 0.16932159662246704, 0.1635599434375763, -0.2176625281572342, 0.03801606595516205, -0.334550142288208, 0.36193934082984924, -0.2853320240974426, 0.21631044149398804, 0.014494652859866619, -0.0175887793302536, 0.16954822838306427, -0.22495508193969727, 0.24748286604881287, 0.020957984030246735, 0.07509665936231613, -0.228697270154953, -0.2814876139163971, 0.08361737430095673, 0.10787563771009445, 0.17801283299922943, -0.175500750541687, -0.1258852332830429, -0.04707970842719078, 0.10313019901514053, 0.14150963723659515, 0.3180946409702301, 0.01844925805926323, 0.35037970542907715, 0.12395656108856201, -0.05837955325841904, -0.047222986817359924, -0.07889169454574585, -0.18279394507408142, 0.03145062178373337, 0.04941428825259209, 0.43268558382987976, -0.06993192434310913, 0.19470927119255066, -0.0935143455862999, 0.017534572631120682, -0.40709519386291504, 0.02579464763402939, 0.33537814021110535, -0.24935518205165863, -0.046044010668992996, -0.04892474785447121, 0.3733969032764435, 0.27791133522987366, -0.23156747221946716, -0.07696175575256348, 0.1208152323961258, 0.20425644516944885, -0.4022505283355713, -0.19361214339733124, 0.520410418510437, 0.15692569315433502, 0.07514269649982452, 0.19613996148109436, 0.09604980051517487, -0.04834979772567749, -0.1844567209482193, -0.009579962119460106, 0.48072755336761475, 0.02968587353825569, 0.1534191370010376, 0.4989488124847412, -0.11853726208209991, -0.08869263529777527, 0.429106742143631, 0.20824667811393738, 0.2658383846282959, 0.5114615559577942, 0.1051567792892456, 0.10465893894433975, -0.04849904030561447, -0.018163423985242844, -0.023976892232894897, -0.3473997116088867, 0.45555251836776733, 0.044019848108291626, 0.12729215621948242, -0.13688001036643982, 0.25368109345436096, 0.2832278311252594, 0.07431550323963165, 0.051211677491664886, -0.05052698403596878, 0.23419955372810364, -0.21006131172180176, -0.18238595128059387, -0.13188457489013672, -0.17240914702415466, 0.07525350153446198, -0.1891888529062271, -0.09644585847854614, -0.3637147545814514, 0.23700357973575592, 0.0671091079711914, -0.3094826340675354, -0.5341785550117493, 0.11968380957841873, 0.0840083658695221, 0.3311222493648529, -0.10377730429172516, 0.08086080849170685, 0.19471359252929688, -0.3697359561920166, 0.13026967644691467, 0.16820618510246277, 0.5120466351509094, 0.15760253369808197, -0.18895143270492554, 0.07839209586381912, -0.08386912941932678, -0.34701016545295715, 0.07420554757118225, 0.08025626838207245, -0.04404854774475098, 0.011422799900174141, 0.06284350156784058, 0.21272194385528564, -0.12325051426887512, -0.04282793775200844, 0.39208561182022095, 0.30301883816719055, -0.09593881666660309, 0.17996978759765625, -0.1963174194097519, -0.23948213458061218, -0.019855964928865433, -0.14889785647392273, -0.10319358110427856, -0.16424763202667236, 0.02822219952940941, 0.2932898700237274, 0.2548121213912964, 0.04927348345518112, 0.11892789602279663, 0.03394202142953873, 0.20602081716060638, 0.19355814158916473, -0.05442888289690018, -0.15782596170902252, 0.1267404854297638, -0.3404605984687805, 0.16897398233413696, -0.32371050119400024, -0.14061839878559113, 0.3240055739879608, 0.3068540096282959, -0.007620818912982941, 0.02556866779923439, 0.004290461540222168, 0.40150216221809387, -0.4091390371322632, 0.4053340256214142, -0.3738526701927185, -0.11250714957714081, -0.08784911036491394, -0.16168846189975739, -0.0005535949021577835, -0.04873671382665634, 0.3708767592906952, 0.17594891786575317, 0.041222698986530304, -0.4138143062591553, -0.02245955541729927, -0.035268351435661316, -0.08015064895153046, 0.12972886860370636, 0.179517462849617, 0.03347979485988617, -0.009782429784536362, -0.027478592470288277, -0.08669005334377289, -0.299669086933136, -0.3241080343723297, 0.3768506944179535, -0.023860950022935867, 0.28508260846138, -0.040211305022239685, -0.30356690287590027, 0.06709127128124237, 0.008296347223222256, -0.021694790571928024, -0.21399416029453278, -0.3690239489078522, 0.3100258409976959, -0.12006860971450806, 0.07564355432987213, -0.2953113913536072, 0.08091084659099579, 0.06346261501312256, 0.3546484410762787, -0.24763207137584686, -0.3453027904033661, 0.37135863304138184, -0.3651803135871887, -0.1652948260307312, -0.03371148183941841, 0.06291298568248749, -0.197408527135849, -0.25205278396606445, -0.06579089164733887, 0.09332913905382156, 0.5638521909713745, -0.2117895483970642, -0.1767125427722931, 0.07838504016399384, 0.0001653321087360382, 0.01950966939330101, -0.09293744713068008, 0.05963262915611267, 0.03941038250923157, -0.09850528836250305, -0.013683557510375977, -0.2390611469745636 ]
https://github.com/huggingface/datasets/issues/6697
Unable to Load Dataset in Kaggle
FWIW, I run `load_dataset("llm-blender/mix-instruct")` and it ran successfully. Can you clear your cache and try again? ### Environment Info - `datasets` version: 2.17.0 - Platform: Linux-6.2.6-76060206-generic-x86_64-with-glibc2.35 - Python version: 3.9.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
### Describe the bug Having installed the latest versions of transformers==4.38.1 and datasets==2.17.1 Unable to load the dataset in a kaggle notebook. Get this Error: ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[8], line 3 1 from datasets import load_dataset ----> 3 dataset = load_dataset("llm-blender/mix-instruct") File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1664, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1661 ignore_verifications = ignore_verifications or save_infos 1663 # Create a dataset builder -> 1664 builder_instance = load_dataset_builder( 1665 path=path, 1666 name=name, 1667 data_dir=data_dir, 1668 data_files=data_files, 1669 cache_dir=cache_dir, 1670 features=features, 1671 download_config=download_config, 1672 download_mode=download_mode, 1673 revision=revision, 1674 use_auth_token=use_auth_token, 1675 **config_kwargs, 1676 ) 1678 # Return iterable dataset in case of streaming 1679 if streaming: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1490, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1488 download_config = download_config.copy() if download_config else DownloadConfig() 1489 download_config.use_auth_token = use_auth_token -> 1490 dataset_module = dataset_module_factory( 1491 path, 1492 revision=revision, 1493 download_config=download_config, 1494 download_mode=download_mode, 1495 data_dir=data_dir, 1496 data_files=data_files, 1497 ) 1499 # Get dataset builder class from the processing script 1500 builder_cls = import_main_class(dataset_module.module_path) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1242, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1237 if isinstance(e1, FileNotFoundError): 1238 raise FileNotFoundError( 1239 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. " 1240 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}" 1241 ) from None -> 1242 raise e1 from None 1243 else: 1244 raise FileNotFoundError( 1245 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory." 1246 ) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1230, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1215 return HubDatasetModuleFactoryWithScript( 1216 path, 1217 revision=revision, (...) 1220 dynamic_modules_path=dynamic_modules_path, 1221 ).get_module() 1222 else: 1223 return HubDatasetModuleFactoryWithoutScript( 1224 path, 1225 revision=revision, 1226 data_dir=data_dir, 1227 data_files=data_files, 1228 download_config=download_config, 1229 download_mode=download_mode, -> 1230 ).get_module() 1231 except Exception as e1: # noqa: all the attempts failed, before raising the error we should check if the module is already cached. 1232 try: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:846, in HubDatasetModuleFactoryWithoutScript.get_module(self) 836 token = self.download_config.use_auth_token 837 hfh_dataset_info = HfApi(config.HF_ENDPOINT).dataset_info( 838 self.name, 839 revision=self.revision, 840 token=token, 841 timeout=100.0, 842 ) 843 patterns = ( 844 sanitize_patterns(self.data_files) 845 if self.data_files is not None --> 846 else get_patterns_in_dataset_repository(hfh_dataset_info) 847 ) 848 data_files = DataFilesDict.from_hf_repo( 849 patterns, 850 dataset_info=hfh_dataset_info, 851 allowed_extensions=ALL_ALLOWED_EXTENSIONS, 852 ) 853 infered_module_names = { 854 key: infer_module_for_data_files(data_files_list, use_auth_token=self.download_config.use_auth_token) 855 for key, data_files_list in data_files.items() 856 } File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:471, in get_patterns_in_dataset_repository(dataset_info) 469 resolver = partial(_resolve_single_pattern_in_dataset_repository, dataset_info) 470 try: --> 471 return _get_data_files_patterns(resolver) 472 except FileNotFoundError: 473 raise FileNotFoundError( 474 f"The dataset repository at '{dataset_info.id}' doesn't contain any data file." 475 ) from None File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:99, in _get_data_files_patterns(pattern_resolver) 97 try: 98 for pattern in patterns: ---> 99 data_files = pattern_resolver(pattern) 100 if len(data_files) > 0: 101 non_empty_splits.append(split) File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:303, in _resolve_single_pattern_in_dataset_repository(dataset_info, pattern, allowed_extensions) 301 data_files_ignore = FILES_TO_IGNORE 302 fs = HfFileSystem(repo_info=dataset_info) --> 303 glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] 304 matched_paths = [ 305 filepath 306 for filepath in glob_iter 307 if filepath.name not in data_files_ignore and not filepath.name.startswith(".") 308 ] 309 if allowed_extensions is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:606, in AbstractFileSystem.glob(self, path, maxdepth, **kwargs) 602 depth = None 604 allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs) --> 606 pattern = glob_translate(path + ("/" if ends_with_sep else "")) 607 pattern = re.compile(pattern) 609 out = { 610 p: info 611 for p, info in sorted(allpaths.items()) (...) 618 ) 619 } File /opt/conda/lib/python3.10/site-packages/fsspec/utils.py:734, in glob_translate(pat) 732 continue 733 elif "**" in part: --> 734 raise ValueError( 735 "Invalid pattern: '**' can only be an entire path component" 736 ) 737 if part: 738 results.extend(_translate(part, f"{not_sep}*", not_sep)) ValueError: Invalid pattern: '**' can only be an entire path component ``` ``` After loading this dataset ### Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("llm-blender/mix-instruct") ``` ### Expected behavior The dataset should load with desired split. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.133+-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
46
Unable to Load Dataset in Kaggle ### Describe the bug Having installed the latest versions of transformers==4.38.1 and datasets==2.17.1 Unable to load the dataset in a kaggle notebook. Get this Error: ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[8], line 3 1 from datasets import load_dataset ----> 3 dataset = load_dataset("llm-blender/mix-instruct") File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1664, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1661 ignore_verifications = ignore_verifications or save_infos 1663 # Create a dataset builder -> 1664 builder_instance = load_dataset_builder( 1665 path=path, 1666 name=name, 1667 data_dir=data_dir, 1668 data_files=data_files, 1669 cache_dir=cache_dir, 1670 features=features, 1671 download_config=download_config, 1672 download_mode=download_mode, 1673 revision=revision, 1674 use_auth_token=use_auth_token, 1675 **config_kwargs, 1676 ) 1678 # Return iterable dataset in case of streaming 1679 if streaming: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1490, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1488 download_config = download_config.copy() if download_config else DownloadConfig() 1489 download_config.use_auth_token = use_auth_token -> 1490 dataset_module = dataset_module_factory( 1491 path, 1492 revision=revision, 1493 download_config=download_config, 1494 download_mode=download_mode, 1495 data_dir=data_dir, 1496 data_files=data_files, 1497 ) 1499 # Get dataset builder class from the processing script 1500 builder_cls = import_main_class(dataset_module.module_path) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1242, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1237 if isinstance(e1, FileNotFoundError): 1238 raise FileNotFoundError( 1239 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. " 1240 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}" 1241 ) from None -> 1242 raise e1 from None 1243 else: 1244 raise FileNotFoundError( 1245 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory." 1246 ) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1230, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1215 return HubDatasetModuleFactoryWithScript( 1216 path, 1217 revision=revision, (...) 1220 dynamic_modules_path=dynamic_modules_path, 1221 ).get_module() 1222 else: 1223 return HubDatasetModuleFactoryWithoutScript( 1224 path, 1225 revision=revision, 1226 data_dir=data_dir, 1227 data_files=data_files, 1228 download_config=download_config, 1229 download_mode=download_mode, -> 1230 ).get_module() 1231 except Exception as e1: # noqa: all the attempts failed, before raising the error we should check if the module is already cached. 1232 try: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:846, in HubDatasetModuleFactoryWithoutScript.get_module(self) 836 token = self.download_config.use_auth_token 837 hfh_dataset_info = HfApi(config.HF_ENDPOINT).dataset_info( 838 self.name, 839 revision=self.revision, 840 token=token, 841 timeout=100.0, 842 ) 843 patterns = ( 844 sanitize_patterns(self.data_files) 845 if self.data_files is not None --> 846 else get_patterns_in_dataset_repository(hfh_dataset_info) 847 ) 848 data_files = DataFilesDict.from_hf_repo( 849 patterns, 850 dataset_info=hfh_dataset_info, 851 allowed_extensions=ALL_ALLOWED_EXTENSIONS, 852 ) 853 infered_module_names = { 854 key: infer_module_for_data_files(data_files_list, use_auth_token=self.download_config.use_auth_token) 855 for key, data_files_list in data_files.items() 856 } File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:471, in get_patterns_in_dataset_repository(dataset_info) 469 resolver = partial(_resolve_single_pattern_in_dataset_repository, dataset_info) 470 try: --> 471 return _get_data_files_patterns(resolver) 472 except FileNotFoundError: 473 raise FileNotFoundError( 474 f"The dataset repository at '{dataset_info.id}' doesn't contain any data file." 475 ) from None File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:99, in _get_data_files_patterns(pattern_resolver) 97 try: 98 for pattern in patterns: ---> 99 data_files = pattern_resolver(pattern) 100 if len(data_files) > 0: 101 non_empty_splits.append(split) File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:303, in _resolve_single_pattern_in_dataset_repository(dataset_info, pattern, allowed_extensions) 301 data_files_ignore = FILES_TO_IGNORE 302 fs = HfFileSystem(repo_info=dataset_info) --> 303 glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] 304 matched_paths = [ 305 filepath 306 for filepath in glob_iter 307 if filepath.name not in data_files_ignore and not filepath.name.startswith(".") 308 ] 309 if allowed_extensions is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:606, in AbstractFileSystem.glob(self, path, maxdepth, **kwargs) 602 depth = None 604 allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs) --> 606 pattern = glob_translate(path + ("/" if ends_with_sep else "")) 607 pattern = re.compile(pattern) 609 out = { 610 p: info 611 for p, info in sorted(allpaths.items()) (...) 618 ) 619 } File /opt/conda/lib/python3.10/site-packages/fsspec/utils.py:734, in glob_translate(pat) 732 continue 733 elif "**" in part: --> 734 raise ValueError( 735 "Invalid pattern: '**' can only be an entire path component" 736 ) 737 if part: 738 results.extend(_translate(part, f"{not_sep}*", not_sep)) ValueError: Invalid pattern: '**' can only be an entire path component ``` ``` After loading this dataset ### Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("llm-blender/mix-instruct") ``` ### Expected behavior The dataset should load with desired split. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.133+-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 FWIW, I run `load_dataset("llm-blender/mix-instruct")` and it ran successfully. Can you clear your cache and try again? ### Environment Info - `datasets` version: 2.17.0 - Platform: Linux-6.2.6-76060206-generic-x86_64-with-glibc2.35 - Python version: 3.9.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
[ -0.4405532479286194, -0.4754101037979126, -0.08109492063522339, 0.3323727250099182, 0.3103630542755127, 0.005510874092578888, 0.38063845038414, 0.2692002058029175, 0.04515639320015907, 0.054114557802677155, -0.21589186787605286, 0.7469200491905212, -0.21449705958366394, 0.36645469069480896, -0.12379197776317596, -0.11311385035514832, 0.06784508377313614, 0.049727026373147964, -0.1580350697040558, 0.1333536058664322, -0.10387111455202103, 0.006116289645433426, -0.44767433404922485, 0.017778031527996063, -0.27339956164360046, -0.11702298372983932, 0.19550326466560364, 0.08938023447990417, -0.06905391067266464, -0.4836661219596863, 0.6051008105278015, -0.14980243146419525, 0.4183025062084198, 0.25936946272850037, -0.00011230717063881457, 0.09471504390239716, 0.6071949601173401, -0.11344223469495773, -0.5549087524414062, -0.20773203670978546, -0.5407907366752625, -0.4464709162712097, -0.04837831109762192, -0.11277549713850021, -0.006273889914155006, -0.09031296521425247, -0.25274813175201416, -0.13931921124458313, 0.41139256954193115, 0.11766321212053299, 0.21188807487487793, 0.4533822238445282, 0.2729240953922272, -0.10665929317474365, 0.26049476861953735, -0.11312723159790039, -0.13139916956424713, 0.16359741985797882, 0.168263241648674, -0.0021070847287774086, 0.050426606088876724, 0.26649555563926697, 0.05106204003095627, -0.17034585773944855, 0.32185715436935425, -0.027716517448425293, 0.028972197324037552, -0.19245043396949768, 0.07267826795578003, 0.15066862106323242, 0.8599108457565308, -0.25129151344299316, -0.41722729802131653, -0.3393792510032654, -0.11001492291688919, 0.1236436665058136, 0.32321277260780334, 0.10158341377973557, -0.17042404413223267, -0.001956481486558914, 0.012555453926324844, -0.14046579599380493, -0.0951976552605629, 0.0697781890630722, -0.2151939421892166, 0.6835041046142578, -0.06714779883623123, 0.1452253758907318, 0.3981040418148041, -0.1611659824848175, 0.7106326222419739, -0.05770983546972275, -0.1943802386522293, 0.19061078131198883, -0.5826619267463684, 0.031117580831050873, -0.035559237003326416, -0.16018912196159363, 0.08138762414455414, 0.031013047322630882, -0.05270150303840637, 0.13844527304172516, 0.05077545344829559, 0.1948603391647339, 0.4607352614402771, 0.4427168369293213, 0.20283851027488708, 0.334307461977005, 0.1946035921573639, 0.19904330372810364, 0.3932763636112213, -0.03270720690488815, -0.042128678411245346, -0.36909276247024536, 0.09660018980503082, 0.17189639806747437, 0.21781986951828003, 0.08033575117588043, -0.324362188577652, -0.1501063108444214, -0.16654565930366516, -0.1551143229007721, 0.055301733314991, 0.3857523798942566, -0.13008615374565125, 0.4132338762283325, 0.18618811666965485, 0.08790910243988037, -0.033242080360651016, -0.12478239834308624, -0.17598861455917358, 0.07696723937988281, -0.11610989272594452, -0.1726318746805191, 0.17613834142684937, -0.1916099190711975, 0.2520248293876648, -0.06303081661462784, 0.12167611718177795, -0.04519758000969887, 0.12745200097560883, 0.11323614418506622, -0.32673919200897217, 0.3837391138076782, -0.07571288198232651, 0.09639263153076172, 0.056192297488451004, -0.17706015706062317, -0.09667310118675232, 0.33350425958633423, -0.09495218843221664, -0.2162700593471527, 0.13814295828342438, 0.22671014070510864, -0.20527076721191406, 0.053381145000457764, -0.6885342597961426, -0.019845880568027496, 0.166550874710083, -0.1777295619249344, -0.19939711689949036, -0.09202512353658676, 0.06616489589214325, -0.12860700488090515, 0.3663009703159332, 0.29976874589920044, -0.18044885993003845, -0.18185192346572876, -0.3058945834636688, -0.20992490649223328, -0.011576473712921143, 0.21205203235149384, -0.36776795983314514, 0.186039537191391, -0.19266681373119354, -0.1525953710079193, 0.6567249894142151, -0.5709759593009949, -0.5580618381500244, 0.22635656595230103, -0.1592821180820465, 0.08816361427307129, -0.06074371188879013, 0.1307619959115982, -0.04791785404086113, -0.06421071290969849, 0.08497991412878036, 0.2550344467163086, 0.012250488623976707, -0.061380475759506226, -0.34485846757888794, -0.3413657546043396, 0.2291838377714157, 0.2872048318386078, 0.09517103433609009, 0.13296185433864594, 0.020840443670749664, 0.2679448425769806, 0.1272801011800766, 0.08710154891014099, 0.055357009172439575, 0.11220123618841171, 0.2223547399044037, -0.108311727643013, 0.09767001867294312, 0.011940255761146545, -0.6191302537918091, 0.3750447928905487, -0.16245470941066742, -0.051425233483314514, -0.03530065715312958, -0.0019259974360466003, -0.46029576659202576, 0.14387156069278717, -0.20408008992671967, -0.27322763204574585, 0.09954218566417694, -0.09800760447978973, -0.0012361090630292892, -0.07443708181381226, -0.16538025438785553, 0.5387687087059021, 0.29191771149635315, -0.06772273778915405, -0.43187394738197327, 0.30295443534851074, -0.3147026598453522, 0.02369040995836258, 0.1568760722875595, 0.03537585213780403, 0.17073330283164978, -0.0988253653049469, -0.15972721576690674, 0.3501308560371399, 0.24918729066848755, 0.12241770327091217, -0.11733411997556686, -0.2478538304567337, 0.3090575039386749, -0.3664952218532562, 0.0945143848657608, 0.1333918273448944, 0.13926298916339874, 0.08262968808412552, -0.3107829988002777, 0.12183240056037903, -0.10860946774482727, -0.03385474532842636, 0.03506865352392197, 0.2405204474925995, 0.213409423828125, -0.039765696972608566, 0.18385419249534607, -0.21215210855007172, 0.07802394032478333, -0.33295366168022156, 0.26467278599739075, 0.022841643542051315, -0.08135740458965302, -0.001545153558254242, 0.08556649833917618, -0.1168811023235321, 0.1150398999452591, 0.036855414509773254, -0.23984578251838684, 0.0072773173451423645, 0.029711401090025902, 0.3571993112564087, 0.16554804146289825, 0.1856713593006134, -0.26347100734710693, -0.15123967826366425, 0.029811181128025055, -0.017356768250465393, 0.12596353888511658, 0.18570494651794434, 0.38344842195510864, 0.44998154044151306, 0.1390909105539322, 0.014869853854179382, 0.06307930499315262, -0.08499014377593994, 0.20032495260238647, 0.2896086275577545, -0.10453546792268753, 0.11061953753232956, -0.13137495517730713, 0.010091084986925125, -0.27643507719039917, 0.019301723688840866, -0.12815657258033752, -0.4269492030143738, -0.20119304955005646, 0.3424900770187378, 0.006148502230644226, 0.29350578784942627, 0.1927119344472885, 0.11427685618400574, 0.22431506216526031, 0.10134612023830414, -0.3897378444671631, -0.3576715588569641, -0.3263384699821472, 0.04305655136704445, 0.19920511543750763, 0.008189670741558075, 0.11940469592809677, -0.05882111191749573, 0.10925696790218353, -0.2455199658870697, -0.23409965634346008, -0.026351824402809143, 0.015408914536237717, 0.2136806845664978, 0.12424104660749435, 0.20581474900245667, 0.0933612734079361, -0.3646987974643707, 0.29956161975860596, -0.03251367062330246, -0.16010241210460663, 0.18848392367362976, 0.042467955499887466, -0.016256598755717278, 0.03801513835787773, -0.44239339232444763, -0.35537469387054443, -0.5150251388549805, -0.06333038210868835, -0.15125450491905212, -0.1424884796142578, 0.02921198308467865, 0.27466845512390137, 0.0309404656291008, 0.37706416845321655, -0.08774402737617493, -0.10516306012868881, 0.27992478013038635, 0.3223896324634552, -0.01544579304754734, -0.36206427216529846, -0.07759536802768707, -0.1578630805015564, 0.18272320926189423, -0.0037733707576990128, -0.4222531318664551, 0.1592848300933838, -0.14132048189640045, 0.08374196290969849, -0.2804907560348511, -0.009570656344294548, 0.18162822723388672, 0.30177319049835205, 0.08020054548978806, -0.11823195219039917, -0.27624672651290894, -0.14114734530448914, 0.09364521503448486, 0.35918769240379333, 0.024331171065568924, 0.22851967811584473, -0.04009127989411354, 0.5932199358940125, 0.1289416253566742, -0.01642465963959694, -0.004393227398395538, 0.1507457196712494, 0.07851668447256088, 0.0009418725967407227, -0.31503763794898987, -0.051260460168123245, -0.020180508494377136, 0.0745638981461525, -0.08593347668647766, -0.0740690752863884, -0.4359058141708374, -0.38966453075408936, -0.24203254282474518, 0.04322332143783569, -0.14794394373893738, -0.024472160264849663, -0.05818706750869751, 0.16175392270088196, 0.01207570731639862, 0.19572961330413818, -0.09713055193424225, 0.028025787323713303, 0.15298862755298615, 0.05873176082968712, 0.09947101771831512, -0.07687888294458389, -0.2385377436876297, -0.15669144690036774, -0.13752922415733337, 0.1671358197927475, 0.16179482638835907, 0.5847994685173035, 0.11964607238769531, -0.13425478339195251, -0.027951501309871674, -0.20398609340190887, 0.8219097852706909, -0.16945099830627441, 0.28727108240127563, 0.2570354640483856, 0.16534577310085297, -0.6337114572525024, -0.24840237200260162, -0.15959994494915009, -0.14371685683727264, 0.055117733776569366, 0.27419665455818176, -0.16871453821659088, -0.09887099266052246, -0.05792088061571121, 0.18149635195732117, -0.2233143299818039, -0.15413892269134521, -0.3773835599422455, -0.0886773020029068, -0.47478532791137695, -0.26449987292289734, -0.17744043469429016, 0.17477577924728394, -0.1399049460887909, 0.09902508556842804, -0.06865690648555756, -0.05813879519701004, -0.2456407994031906, 0.2992266118526459, 0.39497658610343933, -0.0016217080410569906, 0.24211403727531433, 0.28228381276130676, -0.16790395975112915, 0.1355459839105606, 0.49699777364730835, 0.1800246238708496, -0.4858626127243042, 0.02605968341231346, 0.08765021711587906, -0.14105069637298584, -0.131281316280365, -0.2312988042831421, -0.12039712816476822, 0.11023274064064026, 0.03806183114647865, -0.2541596591472626, 0.05061192810535431, 0.0942898690700531, 0.02275918424129486, -0.33608412742614746, -0.46542873978614807, 0.5550139546394348, -0.019014742225408554, -0.0557006374001503, 0.22397616505622864, -0.1888057440519333, -0.14467482268810272, 0.4496263265609741, 0.18510040640830994, 0.47328245639801025, -0.08658219873905182, 0.028803082183003426, 0.4192977249622345, 0.006910376250743866, 0.36756235361099243, -0.36515986919403076, 0.21596279740333557, -0.42139437794685364, -0.20288874208927155, -0.013493211939930916, -0.29045042395591736, 0.05681304261088371, -0.046136461198329926, -0.31975024938583374, 0.03426392748951912, -0.1585380882024765, 0.14418146014213562, 0.07214496284723282, 0.2461986243724823, -0.20800378918647766, -0.09421977400779724, -0.17026129364967346, 0.14218838512897491, -0.23706059157848358, 0.3550027906894684, -0.057187292724847794, -0.06716258078813553, -0.28341785073280334, -0.1508207470178604, -0.3167828321456909, 0.23498502373695374, -0.00040925247594714165, 0.5790200233459473, 0.13052091002464294, -0.20464152097702026, 0.2838994562625885, 0.5899831652641296, 0.1752179116010666, 0.09450878202915192, -0.17846766114234924, 0.28604990243911743, -0.0043133944272994995, -0.043746963143348694, 0.032131895422935486, 0.27170825004577637, 0.21185536682605743, -0.11908065527677536, -0.3629642724990845, 0.33058488368988037, -0.12567465007305145, -0.1449597179889679, 0.06307651102542877, 0.15211032330989838, -0.25827085971832275, -0.22919407486915588, -0.05777740105986595, 0.07557719945907593, -0.028448911383748055, -0.16880324482917786, 0.1348297894001007, 0.05966902896761894, -0.158351331949234, 0.13261418044567108, 0.07169774919748306, -0.04408120736479759, 0.13779938220977783, 0.5539243817329407, -0.15103483200073242, 0.09114019572734833, 0.295207679271698, 0.12447528541088104, -0.14452414214611053, -0.23436680436134338, 0.12043086439371109, -0.16067685186862946, -0.4148416817188263, 0.05656399205327034, -0.07033885270357132, -0.13190408051013947, -0.06190955638885498, 0.5452376008033752, 0.32701998949050903, -0.05915311723947525, -0.0042385198175907135, -0.451181024312973, -0.37597545981407166, 0.3115508556365967, -0.059382710605859756, 0.016620304435491562, -0.05981475114822388, 0.07100959867238998, -0.16106465458869934, 0.16815818846225739, -0.29623937606811523, -0.032388344407081604, -0.263597697019577, 0.042892519384622574, 0.14107652008533478, -0.12581029534339905, 0.0029701623134315014, -0.21134212613105774, 0.08032850921154022, -0.1677313894033432, -0.2233080118894577, -0.21077373623847961, -0.020848091691732407, 0.09907199442386627, 0.005437571555376053, -0.22305722534656525, -0.40495675802230835, -0.3236827850341797, -0.018089666962623596, -0.03054916113615036, 0.2189643681049347, 0.11987655609846115, -0.09015826880931854, 0.41418567299842834, -0.09252585470676422, 0.13896828889846802, -0.33105748891830444, 0.26699361205101013, -0.0562247633934021, -0.34879255294799805, 0.12646318972110748, 0.06000364199280739, 0.25328198075294495, 0.1390700787305832, -0.05162939429283142, -0.0643158033490181, -0.18771682679653168, 0.06203417479991913, 0.39596128463745117, -0.4345301389694214, 0.20027370750904083, 0.1023777425289154, 0.036327943205833435, 0.3555486798286438, -0.24650715291500092, 0.025356745347380638, 0.11842713505029678, 0.1944016069173813, -0.37390902638435364, -0.4641937017440796, 0.24058887362480164, 0.04074552282691002, -0.01986556313931942, 0.030915744602680206, 0.13259878754615784, -0.18725553154945374, -0.02343260496854782, 0.3855586349964142, 0.42083561420440674, -0.38870108127593994, 0.33601659536361694, 0.5832104086875916, -0.07165413349866867, 0.085250124335289, 0.0914074257016182, 0.21486489474773407, 0.1487351655960083, 0.3851086497306824, -0.22486662864685059, 0.11509999632835388, -0.14073386788368225, 0.22883838415145874, 0.04802129045128822, -0.45538824796676636, 0.08575890213251114, 0.1261594593524933, -0.403916597366333, -0.037168338894844055, 0.08029492199420929, 0.021254241466522217, -0.08509180694818497, 0.01846981607377529, -0.02909017726778984, -0.16947166621685028, -0.12922823429107666, 0.03017391636967659, 0.08015929162502289, -0.17618513107299805, -0.04272320494055748, 0.0729769915342331, 0.11730906367301941, -0.1480688750743866, 0.2683742046356201, 0.20316646993160248, -0.19791658222675323, -0.0016735289245843887, 0.053186338394880295, 0.49687615036964417, 0.1293434500694275, -0.16815689206123352, 0.01889028027653694, 0.24013745784759521, -0.08173662424087524, 0.018764931708574295, 0.0729554146528244, 0.3520953357219696, 0.3376552164554596, -0.3543855547904968, 0.17521588504314423, 0.22960001230239868, -0.1970375031232834, -0.10165593028068542, 0.33147871494293213, 0.13669361174106598, 0.035179972648620605, 0.2376643568277359, 0.19054453074932098, -0.1255396008491516, 0.028133638203144073, 0.07361787557601929, 0.21295258402824402, -0.17859695851802826, 0.16169176995754242, -0.1812170147895813, -0.13951058685779572, 0.056258030235767365, 0.18400055170059204, -0.30306389927864075, 0.14649347960948944, 0.20379427075386047, 0.18784190714359283, 0.20517417788505554, -0.014256680384278297, 0.08485488593578339, 0.06401099264621735, 0.5173172354698181, 0.19005243480205536, 0.20197820663452148, -0.15986019372940063, -0.025009334087371826, -0.5694613456726074, -0.09082982689142227, 0.2465875744819641, -0.10768327116966248, 0.20850823819637299, -0.06713933497667313, 0.031126122921705246, 0.2328319251537323, 0.04460643231868744, -0.07197108119726181, 0.45936763286590576, 0.15649601817131042, -0.24948574602603912, -0.32578080892562866, 0.2560223937034607, 0.16739292442798615, -0.14253166317939758, -0.5336727499961853, 0.10996125638484955, -0.008361726999282837, 0.10025347024202347, -0.12226827442646027, -0.12071192264556885, 0.2613215744495392, -0.06273166090250015, 0.22071583569049835, -0.012917568907141685, 0.6241376399993896, 0.021983638405799866, 0.04582793265581131, -0.2969277799129486, -0.36986538767814636, -0.04922439903020859, -0.2070816159248352, 0.214406818151474, 0.3783893585205078, -0.20702268183231354, 0.11006712913513184, -0.38022440671920776, 0.30821937322616577, 0.17274616658687592, 0.21011316776275635, -0.3080313205718994, 0.014997929334640503, -0.13313904404640198, -0.11113529652357101, 0.17992281913757324, 0.060113005340099335, -0.037546053528785706, 0.0318279042840004, -0.35482823848724365, -0.3921824097633362, 0.49370521306991577, -0.15728707611560822, -0.34977465867996216, -0.11831756681203842, -0.08855268359184265, 0.06341138482093811, 0.07452471554279327, -0.36737266182899475, 0.22315534949302673, 0.28664281964302063, -0.04254394769668579, -0.16113252937793732, 0.07171466946601868, 0.20449642837047577, 0.04775069281458855, -0.1104661226272583, 0.42507466673851013, 0.023416735231876373, -0.006329767405986786, -0.08537547290325165, -0.06030382215976715 ]
https://github.com/huggingface/datasets/issues/6697
Unable to Load Dataset in Kaggle
It is working on the Kaggle GPU instance but gives this same error when running on the CPU instance. Still to run it on Kaggle you require to install the latest versions of datasets and transformers.
### Describe the bug Having installed the latest versions of transformers==4.38.1 and datasets==2.17.1 Unable to load the dataset in a kaggle notebook. Get this Error: ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[8], line 3 1 from datasets import load_dataset ----> 3 dataset = load_dataset("llm-blender/mix-instruct") File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1664, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1661 ignore_verifications = ignore_verifications or save_infos 1663 # Create a dataset builder -> 1664 builder_instance = load_dataset_builder( 1665 path=path, 1666 name=name, 1667 data_dir=data_dir, 1668 data_files=data_files, 1669 cache_dir=cache_dir, 1670 features=features, 1671 download_config=download_config, 1672 download_mode=download_mode, 1673 revision=revision, 1674 use_auth_token=use_auth_token, 1675 **config_kwargs, 1676 ) 1678 # Return iterable dataset in case of streaming 1679 if streaming: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1490, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1488 download_config = download_config.copy() if download_config else DownloadConfig() 1489 download_config.use_auth_token = use_auth_token -> 1490 dataset_module = dataset_module_factory( 1491 path, 1492 revision=revision, 1493 download_config=download_config, 1494 download_mode=download_mode, 1495 data_dir=data_dir, 1496 data_files=data_files, 1497 ) 1499 # Get dataset builder class from the processing script 1500 builder_cls = import_main_class(dataset_module.module_path) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1242, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1237 if isinstance(e1, FileNotFoundError): 1238 raise FileNotFoundError( 1239 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. " 1240 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}" 1241 ) from None -> 1242 raise e1 from None 1243 else: 1244 raise FileNotFoundError( 1245 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory." 1246 ) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1230, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1215 return HubDatasetModuleFactoryWithScript( 1216 path, 1217 revision=revision, (...) 1220 dynamic_modules_path=dynamic_modules_path, 1221 ).get_module() 1222 else: 1223 return HubDatasetModuleFactoryWithoutScript( 1224 path, 1225 revision=revision, 1226 data_dir=data_dir, 1227 data_files=data_files, 1228 download_config=download_config, 1229 download_mode=download_mode, -> 1230 ).get_module() 1231 except Exception as e1: # noqa: all the attempts failed, before raising the error we should check if the module is already cached. 1232 try: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:846, in HubDatasetModuleFactoryWithoutScript.get_module(self) 836 token = self.download_config.use_auth_token 837 hfh_dataset_info = HfApi(config.HF_ENDPOINT).dataset_info( 838 self.name, 839 revision=self.revision, 840 token=token, 841 timeout=100.0, 842 ) 843 patterns = ( 844 sanitize_patterns(self.data_files) 845 if self.data_files is not None --> 846 else get_patterns_in_dataset_repository(hfh_dataset_info) 847 ) 848 data_files = DataFilesDict.from_hf_repo( 849 patterns, 850 dataset_info=hfh_dataset_info, 851 allowed_extensions=ALL_ALLOWED_EXTENSIONS, 852 ) 853 infered_module_names = { 854 key: infer_module_for_data_files(data_files_list, use_auth_token=self.download_config.use_auth_token) 855 for key, data_files_list in data_files.items() 856 } File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:471, in get_patterns_in_dataset_repository(dataset_info) 469 resolver = partial(_resolve_single_pattern_in_dataset_repository, dataset_info) 470 try: --> 471 return _get_data_files_patterns(resolver) 472 except FileNotFoundError: 473 raise FileNotFoundError( 474 f"The dataset repository at '{dataset_info.id}' doesn't contain any data file." 475 ) from None File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:99, in _get_data_files_patterns(pattern_resolver) 97 try: 98 for pattern in patterns: ---> 99 data_files = pattern_resolver(pattern) 100 if len(data_files) > 0: 101 non_empty_splits.append(split) File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:303, in _resolve_single_pattern_in_dataset_repository(dataset_info, pattern, allowed_extensions) 301 data_files_ignore = FILES_TO_IGNORE 302 fs = HfFileSystem(repo_info=dataset_info) --> 303 glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] 304 matched_paths = [ 305 filepath 306 for filepath in glob_iter 307 if filepath.name not in data_files_ignore and not filepath.name.startswith(".") 308 ] 309 if allowed_extensions is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:606, in AbstractFileSystem.glob(self, path, maxdepth, **kwargs) 602 depth = None 604 allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs) --> 606 pattern = glob_translate(path + ("/" if ends_with_sep else "")) 607 pattern = re.compile(pattern) 609 out = { 610 p: info 611 for p, info in sorted(allpaths.items()) (...) 618 ) 619 } File /opt/conda/lib/python3.10/site-packages/fsspec/utils.py:734, in glob_translate(pat) 732 continue 733 elif "**" in part: --> 734 raise ValueError( 735 "Invalid pattern: '**' can only be an entire path component" 736 ) 737 if part: 738 results.extend(_translate(part, f"{not_sep}*", not_sep)) ValueError: Invalid pattern: '**' can only be an entire path component ``` ``` After loading this dataset ### Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("llm-blender/mix-instruct") ``` ### Expected behavior The dataset should load with desired split. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.133+-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
36
Unable to Load Dataset in Kaggle ### Describe the bug Having installed the latest versions of transformers==4.38.1 and datasets==2.17.1 Unable to load the dataset in a kaggle notebook. Get this Error: ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[8], line 3 1 from datasets import load_dataset ----> 3 dataset = load_dataset("llm-blender/mix-instruct") File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1664, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1661 ignore_verifications = ignore_verifications or save_infos 1663 # Create a dataset builder -> 1664 builder_instance = load_dataset_builder( 1665 path=path, 1666 name=name, 1667 data_dir=data_dir, 1668 data_files=data_files, 1669 cache_dir=cache_dir, 1670 features=features, 1671 download_config=download_config, 1672 download_mode=download_mode, 1673 revision=revision, 1674 use_auth_token=use_auth_token, 1675 **config_kwargs, 1676 ) 1678 # Return iterable dataset in case of streaming 1679 if streaming: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1490, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1488 download_config = download_config.copy() if download_config else DownloadConfig() 1489 download_config.use_auth_token = use_auth_token -> 1490 dataset_module = dataset_module_factory( 1491 path, 1492 revision=revision, 1493 download_config=download_config, 1494 download_mode=download_mode, 1495 data_dir=data_dir, 1496 data_files=data_files, 1497 ) 1499 # Get dataset builder class from the processing script 1500 builder_cls = import_main_class(dataset_module.module_path) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1242, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1237 if isinstance(e1, FileNotFoundError): 1238 raise FileNotFoundError( 1239 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. " 1240 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}" 1241 ) from None -> 1242 raise e1 from None 1243 else: 1244 raise FileNotFoundError( 1245 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory." 1246 ) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1230, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1215 return HubDatasetModuleFactoryWithScript( 1216 path, 1217 revision=revision, (...) 1220 dynamic_modules_path=dynamic_modules_path, 1221 ).get_module() 1222 else: 1223 return HubDatasetModuleFactoryWithoutScript( 1224 path, 1225 revision=revision, 1226 data_dir=data_dir, 1227 data_files=data_files, 1228 download_config=download_config, 1229 download_mode=download_mode, -> 1230 ).get_module() 1231 except Exception as e1: # noqa: all the attempts failed, before raising the error we should check if the module is already cached. 1232 try: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:846, in HubDatasetModuleFactoryWithoutScript.get_module(self) 836 token = self.download_config.use_auth_token 837 hfh_dataset_info = HfApi(config.HF_ENDPOINT).dataset_info( 838 self.name, 839 revision=self.revision, 840 token=token, 841 timeout=100.0, 842 ) 843 patterns = ( 844 sanitize_patterns(self.data_files) 845 if self.data_files is not None --> 846 else get_patterns_in_dataset_repository(hfh_dataset_info) 847 ) 848 data_files = DataFilesDict.from_hf_repo( 849 patterns, 850 dataset_info=hfh_dataset_info, 851 allowed_extensions=ALL_ALLOWED_EXTENSIONS, 852 ) 853 infered_module_names = { 854 key: infer_module_for_data_files(data_files_list, use_auth_token=self.download_config.use_auth_token) 855 for key, data_files_list in data_files.items() 856 } File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:471, in get_patterns_in_dataset_repository(dataset_info) 469 resolver = partial(_resolve_single_pattern_in_dataset_repository, dataset_info) 470 try: --> 471 return _get_data_files_patterns(resolver) 472 except FileNotFoundError: 473 raise FileNotFoundError( 474 f"The dataset repository at '{dataset_info.id}' doesn't contain any data file." 475 ) from None File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:99, in _get_data_files_patterns(pattern_resolver) 97 try: 98 for pattern in patterns: ---> 99 data_files = pattern_resolver(pattern) 100 if len(data_files) > 0: 101 non_empty_splits.append(split) File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:303, in _resolve_single_pattern_in_dataset_repository(dataset_info, pattern, allowed_extensions) 301 data_files_ignore = FILES_TO_IGNORE 302 fs = HfFileSystem(repo_info=dataset_info) --> 303 glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] 304 matched_paths = [ 305 filepath 306 for filepath in glob_iter 307 if filepath.name not in data_files_ignore and not filepath.name.startswith(".") 308 ] 309 if allowed_extensions is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:606, in AbstractFileSystem.glob(self, path, maxdepth, **kwargs) 602 depth = None 604 allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs) --> 606 pattern = glob_translate(path + ("/" if ends_with_sep else "")) 607 pattern = re.compile(pattern) 609 out = { 610 p: info 611 for p, info in sorted(allpaths.items()) (...) 618 ) 619 } File /opt/conda/lib/python3.10/site-packages/fsspec/utils.py:734, in glob_translate(pat) 732 continue 733 elif "**" in part: --> 734 raise ValueError( 735 "Invalid pattern: '**' can only be an entire path component" 736 ) 737 if part: 738 results.extend(_translate(part, f"{not_sep}*", not_sep)) ValueError: Invalid pattern: '**' can only be an entire path component ``` ``` After loading this dataset ### Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("llm-blender/mix-instruct") ``` ### Expected behavior The dataset should load with desired split. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.133+-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 It is working on the Kaggle GPU instance but gives this same error when running on the CPU instance. Still to run it on Kaggle you require to install the latest versions of datasets and transformers.
[ -0.4405532479286194, -0.4754101037979126, -0.08109492063522339, 0.3323727250099182, 0.3103630542755127, 0.005510874092578888, 0.38063845038414, 0.2692002058029175, 0.04515639320015907, 0.054114557802677155, -0.21589186787605286, 0.7469200491905212, -0.21449705958366394, 0.36645469069480896, -0.12379197776317596, -0.11311385035514832, 0.06784508377313614, 0.049727026373147964, -0.1580350697040558, 0.1333536058664322, -0.10387111455202103, 0.006116289645433426, -0.44767433404922485, 0.017778031527996063, -0.27339956164360046, -0.11702298372983932, 0.19550326466560364, 0.08938023447990417, -0.06905391067266464, -0.4836661219596863, 0.6051008105278015, -0.14980243146419525, 0.4183025062084198, 0.25936946272850037, -0.00011230717063881457, 0.09471504390239716, 0.6071949601173401, -0.11344223469495773, -0.5549087524414062, -0.20773203670978546, -0.5407907366752625, -0.4464709162712097, -0.04837831109762192, -0.11277549713850021, -0.006273889914155006, -0.09031296521425247, -0.25274813175201416, -0.13931921124458313, 0.41139256954193115, 0.11766321212053299, 0.21188807487487793, 0.4533822238445282, 0.2729240953922272, -0.10665929317474365, 0.26049476861953735, -0.11312723159790039, -0.13139916956424713, 0.16359741985797882, 0.168263241648674, -0.0021070847287774086, 0.050426606088876724, 0.26649555563926697, 0.05106204003095627, -0.17034585773944855, 0.32185715436935425, -0.027716517448425293, 0.028972197324037552, -0.19245043396949768, 0.07267826795578003, 0.15066862106323242, 0.8599108457565308, -0.25129151344299316, -0.41722729802131653, -0.3393792510032654, -0.11001492291688919, 0.1236436665058136, 0.32321277260780334, 0.10158341377973557, -0.17042404413223267, -0.001956481486558914, 0.012555453926324844, -0.14046579599380493, -0.0951976552605629, 0.0697781890630722, -0.2151939421892166, 0.6835041046142578, -0.06714779883623123, 0.1452253758907318, 0.3981040418148041, -0.1611659824848175, 0.7106326222419739, -0.05770983546972275, -0.1943802386522293, 0.19061078131198883, -0.5826619267463684, 0.031117580831050873, -0.035559237003326416, -0.16018912196159363, 0.08138762414455414, 0.031013047322630882, -0.05270150303840637, 0.13844527304172516, 0.05077545344829559, 0.1948603391647339, 0.4607352614402771, 0.4427168369293213, 0.20283851027488708, 0.334307461977005, 0.1946035921573639, 0.19904330372810364, 0.3932763636112213, -0.03270720690488815, -0.042128678411245346, -0.36909276247024536, 0.09660018980503082, 0.17189639806747437, 0.21781986951828003, 0.08033575117588043, -0.324362188577652, -0.1501063108444214, -0.16654565930366516, -0.1551143229007721, 0.055301733314991, 0.3857523798942566, -0.13008615374565125, 0.4132338762283325, 0.18618811666965485, 0.08790910243988037, -0.033242080360651016, -0.12478239834308624, -0.17598861455917358, 0.07696723937988281, -0.11610989272594452, -0.1726318746805191, 0.17613834142684937, -0.1916099190711975, 0.2520248293876648, -0.06303081661462784, 0.12167611718177795, -0.04519758000969887, 0.12745200097560883, 0.11323614418506622, -0.32673919200897217, 0.3837391138076782, -0.07571288198232651, 0.09639263153076172, 0.056192297488451004, -0.17706015706062317, -0.09667310118675232, 0.33350425958633423, -0.09495218843221664, -0.2162700593471527, 0.13814295828342438, 0.22671014070510864, -0.20527076721191406, 0.053381145000457764, -0.6885342597961426, -0.019845880568027496, 0.166550874710083, -0.1777295619249344, -0.19939711689949036, -0.09202512353658676, 0.06616489589214325, -0.12860700488090515, 0.3663009703159332, 0.29976874589920044, -0.18044885993003845, -0.18185192346572876, -0.3058945834636688, -0.20992490649223328, -0.011576473712921143, 0.21205203235149384, -0.36776795983314514, 0.186039537191391, -0.19266681373119354, -0.1525953710079193, 0.6567249894142151, -0.5709759593009949, -0.5580618381500244, 0.22635656595230103, -0.1592821180820465, 0.08816361427307129, -0.06074371188879013, 0.1307619959115982, -0.04791785404086113, -0.06421071290969849, 0.08497991412878036, 0.2550344467163086, 0.012250488623976707, -0.061380475759506226, -0.34485846757888794, -0.3413657546043396, 0.2291838377714157, 0.2872048318386078, 0.09517103433609009, 0.13296185433864594, 0.020840443670749664, 0.2679448425769806, 0.1272801011800766, 0.08710154891014099, 0.055357009172439575, 0.11220123618841171, 0.2223547399044037, -0.108311727643013, 0.09767001867294312, 0.011940255761146545, -0.6191302537918091, 0.3750447928905487, -0.16245470941066742, -0.051425233483314514, -0.03530065715312958, -0.0019259974360466003, -0.46029576659202576, 0.14387156069278717, -0.20408008992671967, -0.27322763204574585, 0.09954218566417694, -0.09800760447978973, -0.0012361090630292892, -0.07443708181381226, -0.16538025438785553, 0.5387687087059021, 0.29191771149635315, -0.06772273778915405, -0.43187394738197327, 0.30295443534851074, -0.3147026598453522, 0.02369040995836258, 0.1568760722875595, 0.03537585213780403, 0.17073330283164978, -0.0988253653049469, -0.15972721576690674, 0.3501308560371399, 0.24918729066848755, 0.12241770327091217, -0.11733411997556686, -0.2478538304567337, 0.3090575039386749, -0.3664952218532562, 0.0945143848657608, 0.1333918273448944, 0.13926298916339874, 0.08262968808412552, -0.3107829988002777, 0.12183240056037903, -0.10860946774482727, -0.03385474532842636, 0.03506865352392197, 0.2405204474925995, 0.213409423828125, -0.039765696972608566, 0.18385419249534607, -0.21215210855007172, 0.07802394032478333, -0.33295366168022156, 0.26467278599739075, 0.022841643542051315, -0.08135740458965302, -0.001545153558254242, 0.08556649833917618, -0.1168811023235321, 0.1150398999452591, 0.036855414509773254, -0.23984578251838684, 0.0072773173451423645, 0.029711401090025902, 0.3571993112564087, 0.16554804146289825, 0.1856713593006134, -0.26347100734710693, -0.15123967826366425, 0.029811181128025055, -0.017356768250465393, 0.12596353888511658, 0.18570494651794434, 0.38344842195510864, 0.44998154044151306, 0.1390909105539322, 0.014869853854179382, 0.06307930499315262, -0.08499014377593994, 0.20032495260238647, 0.2896086275577545, -0.10453546792268753, 0.11061953753232956, -0.13137495517730713, 0.010091084986925125, -0.27643507719039917, 0.019301723688840866, -0.12815657258033752, -0.4269492030143738, -0.20119304955005646, 0.3424900770187378, 0.006148502230644226, 0.29350578784942627, 0.1927119344472885, 0.11427685618400574, 0.22431506216526031, 0.10134612023830414, -0.3897378444671631, -0.3576715588569641, -0.3263384699821472, 0.04305655136704445, 0.19920511543750763, 0.008189670741558075, 0.11940469592809677, -0.05882111191749573, 0.10925696790218353, -0.2455199658870697, -0.23409965634346008, -0.026351824402809143, 0.015408914536237717, 0.2136806845664978, 0.12424104660749435, 0.20581474900245667, 0.0933612734079361, -0.3646987974643707, 0.29956161975860596, -0.03251367062330246, -0.16010241210460663, 0.18848392367362976, 0.042467955499887466, -0.016256598755717278, 0.03801513835787773, -0.44239339232444763, -0.35537469387054443, -0.5150251388549805, -0.06333038210868835, -0.15125450491905212, -0.1424884796142578, 0.02921198308467865, 0.27466845512390137, 0.0309404656291008, 0.37706416845321655, -0.08774402737617493, -0.10516306012868881, 0.27992478013038635, 0.3223896324634552, -0.01544579304754734, -0.36206427216529846, -0.07759536802768707, -0.1578630805015564, 0.18272320926189423, -0.0037733707576990128, -0.4222531318664551, 0.1592848300933838, -0.14132048189640045, 0.08374196290969849, -0.2804907560348511, -0.009570656344294548, 0.18162822723388672, 0.30177319049835205, 0.08020054548978806, -0.11823195219039917, -0.27624672651290894, -0.14114734530448914, 0.09364521503448486, 0.35918769240379333, 0.024331171065568924, 0.22851967811584473, -0.04009127989411354, 0.5932199358940125, 0.1289416253566742, -0.01642465963959694, -0.004393227398395538, 0.1507457196712494, 0.07851668447256088, 0.0009418725967407227, -0.31503763794898987, -0.051260460168123245, -0.020180508494377136, 0.0745638981461525, -0.08593347668647766, -0.0740690752863884, -0.4359058141708374, -0.38966453075408936, -0.24203254282474518, 0.04322332143783569, -0.14794394373893738, -0.024472160264849663, -0.05818706750869751, 0.16175392270088196, 0.01207570731639862, 0.19572961330413818, -0.09713055193424225, 0.028025787323713303, 0.15298862755298615, 0.05873176082968712, 0.09947101771831512, -0.07687888294458389, -0.2385377436876297, -0.15669144690036774, -0.13752922415733337, 0.1671358197927475, 0.16179482638835907, 0.5847994685173035, 0.11964607238769531, -0.13425478339195251, -0.027951501309871674, -0.20398609340190887, 0.8219097852706909, -0.16945099830627441, 0.28727108240127563, 0.2570354640483856, 0.16534577310085297, -0.6337114572525024, -0.24840237200260162, -0.15959994494915009, -0.14371685683727264, 0.055117733776569366, 0.27419665455818176, -0.16871453821659088, -0.09887099266052246, -0.05792088061571121, 0.18149635195732117, -0.2233143299818039, -0.15413892269134521, -0.3773835599422455, -0.0886773020029068, -0.47478532791137695, -0.26449987292289734, -0.17744043469429016, 0.17477577924728394, -0.1399049460887909, 0.09902508556842804, -0.06865690648555756, -0.05813879519701004, -0.2456407994031906, 0.2992266118526459, 0.39497658610343933, -0.0016217080410569906, 0.24211403727531433, 0.28228381276130676, -0.16790395975112915, 0.1355459839105606, 0.49699777364730835, 0.1800246238708496, -0.4858626127243042, 0.02605968341231346, 0.08765021711587906, -0.14105069637298584, -0.131281316280365, -0.2312988042831421, -0.12039712816476822, 0.11023274064064026, 0.03806183114647865, -0.2541596591472626, 0.05061192810535431, 0.0942898690700531, 0.02275918424129486, -0.33608412742614746, -0.46542873978614807, 0.5550139546394348, -0.019014742225408554, -0.0557006374001503, 0.22397616505622864, -0.1888057440519333, -0.14467482268810272, 0.4496263265609741, 0.18510040640830994, 0.47328245639801025, -0.08658219873905182, 0.028803082183003426, 0.4192977249622345, 0.006910376250743866, 0.36756235361099243, -0.36515986919403076, 0.21596279740333557, -0.42139437794685364, -0.20288874208927155, -0.013493211939930916, -0.29045042395591736, 0.05681304261088371, -0.046136461198329926, -0.31975024938583374, 0.03426392748951912, -0.1585380882024765, 0.14418146014213562, 0.07214496284723282, 0.2461986243724823, -0.20800378918647766, -0.09421977400779724, -0.17026129364967346, 0.14218838512897491, -0.23706059157848358, 0.3550027906894684, -0.057187292724847794, -0.06716258078813553, -0.28341785073280334, -0.1508207470178604, -0.3167828321456909, 0.23498502373695374, -0.00040925247594714165, 0.5790200233459473, 0.13052091002464294, -0.20464152097702026, 0.2838994562625885, 0.5899831652641296, 0.1752179116010666, 0.09450878202915192, -0.17846766114234924, 0.28604990243911743, -0.0043133944272994995, -0.043746963143348694, 0.032131895422935486, 0.27170825004577637, 0.21185536682605743, -0.11908065527677536, -0.3629642724990845, 0.33058488368988037, -0.12567465007305145, -0.1449597179889679, 0.06307651102542877, 0.15211032330989838, -0.25827085971832275, -0.22919407486915588, -0.05777740105986595, 0.07557719945907593, -0.028448911383748055, -0.16880324482917786, 0.1348297894001007, 0.05966902896761894, -0.158351331949234, 0.13261418044567108, 0.07169774919748306, -0.04408120736479759, 0.13779938220977783, 0.5539243817329407, -0.15103483200073242, 0.09114019572734833, 0.295207679271698, 0.12447528541088104, -0.14452414214611053, -0.23436680436134338, 0.12043086439371109, -0.16067685186862946, -0.4148416817188263, 0.05656399205327034, -0.07033885270357132, -0.13190408051013947, -0.06190955638885498, 0.5452376008033752, 0.32701998949050903, -0.05915311723947525, -0.0042385198175907135, -0.451181024312973, -0.37597545981407166, 0.3115508556365967, -0.059382710605859756, 0.016620304435491562, -0.05981475114822388, 0.07100959867238998, -0.16106465458869934, 0.16815818846225739, -0.29623937606811523, -0.032388344407081604, -0.263597697019577, 0.042892519384622574, 0.14107652008533478, -0.12581029534339905, 0.0029701623134315014, -0.21134212613105774, 0.08032850921154022, -0.1677313894033432, -0.2233080118894577, -0.21077373623847961, -0.020848091691732407, 0.09907199442386627, 0.005437571555376053, -0.22305722534656525, -0.40495675802230835, -0.3236827850341797, -0.018089666962623596, -0.03054916113615036, 0.2189643681049347, 0.11987655609846115, -0.09015826880931854, 0.41418567299842834, -0.09252585470676422, 0.13896828889846802, -0.33105748891830444, 0.26699361205101013, -0.0562247633934021, -0.34879255294799805, 0.12646318972110748, 0.06000364199280739, 0.25328198075294495, 0.1390700787305832, -0.05162939429283142, -0.0643158033490181, -0.18771682679653168, 0.06203417479991913, 0.39596128463745117, -0.4345301389694214, 0.20027370750904083, 0.1023777425289154, 0.036327943205833435, 0.3555486798286438, -0.24650715291500092, 0.025356745347380638, 0.11842713505029678, 0.1944016069173813, -0.37390902638435364, -0.4641937017440796, 0.24058887362480164, 0.04074552282691002, -0.01986556313931942, 0.030915744602680206, 0.13259878754615784, -0.18725553154945374, -0.02343260496854782, 0.3855586349964142, 0.42083561420440674, -0.38870108127593994, 0.33601659536361694, 0.5832104086875916, -0.07165413349866867, 0.085250124335289, 0.0914074257016182, 0.21486489474773407, 0.1487351655960083, 0.3851086497306824, -0.22486662864685059, 0.11509999632835388, -0.14073386788368225, 0.22883838415145874, 0.04802129045128822, -0.45538824796676636, 0.08575890213251114, 0.1261594593524933, -0.403916597366333, -0.037168338894844055, 0.08029492199420929, 0.021254241466522217, -0.08509180694818497, 0.01846981607377529, -0.02909017726778984, -0.16947166621685028, -0.12922823429107666, 0.03017391636967659, 0.08015929162502289, -0.17618513107299805, -0.04272320494055748, 0.0729769915342331, 0.11730906367301941, -0.1480688750743866, 0.2683742046356201, 0.20316646993160248, -0.19791658222675323, -0.0016735289245843887, 0.053186338394880295, 0.49687615036964417, 0.1293434500694275, -0.16815689206123352, 0.01889028027653694, 0.24013745784759521, -0.08173662424087524, 0.018764931708574295, 0.0729554146528244, 0.3520953357219696, 0.3376552164554596, -0.3543855547904968, 0.17521588504314423, 0.22960001230239868, -0.1970375031232834, -0.10165593028068542, 0.33147871494293213, 0.13669361174106598, 0.035179972648620605, 0.2376643568277359, 0.19054453074932098, -0.1255396008491516, 0.028133638203144073, 0.07361787557601929, 0.21295258402824402, -0.17859695851802826, 0.16169176995754242, -0.1812170147895813, -0.13951058685779572, 0.056258030235767365, 0.18400055170059204, -0.30306389927864075, 0.14649347960948944, 0.20379427075386047, 0.18784190714359283, 0.20517417788505554, -0.014256680384278297, 0.08485488593578339, 0.06401099264621735, 0.5173172354698181, 0.19005243480205536, 0.20197820663452148, -0.15986019372940063, -0.025009334087371826, -0.5694613456726074, -0.09082982689142227, 0.2465875744819641, -0.10768327116966248, 0.20850823819637299, -0.06713933497667313, 0.031126122921705246, 0.2328319251537323, 0.04460643231868744, -0.07197108119726181, 0.45936763286590576, 0.15649601817131042, -0.24948574602603912, -0.32578080892562866, 0.2560223937034607, 0.16739292442798615, -0.14253166317939758, -0.5336727499961853, 0.10996125638484955, -0.008361726999282837, 0.10025347024202347, -0.12226827442646027, -0.12071192264556885, 0.2613215744495392, -0.06273166090250015, 0.22071583569049835, -0.012917568907141685, 0.6241376399993896, 0.021983638405799866, 0.04582793265581131, -0.2969277799129486, -0.36986538767814636, -0.04922439903020859, -0.2070816159248352, 0.214406818151474, 0.3783893585205078, -0.20702268183231354, 0.11006712913513184, -0.38022440671920776, 0.30821937322616577, 0.17274616658687592, 0.21011316776275635, -0.3080313205718994, 0.014997929334640503, -0.13313904404640198, -0.11113529652357101, 0.17992281913757324, 0.060113005340099335, -0.037546053528785706, 0.0318279042840004, -0.35482823848724365, -0.3921824097633362, 0.49370521306991577, -0.15728707611560822, -0.34977465867996216, -0.11831756681203842, -0.08855268359184265, 0.06341138482093811, 0.07452471554279327, -0.36737266182899475, 0.22315534949302673, 0.28664281964302063, -0.04254394769668579, -0.16113252937793732, 0.07171466946601868, 0.20449642837047577, 0.04775069281458855, -0.1104661226272583, 0.42507466673851013, 0.023416735231876373, -0.006329767405986786, -0.08537547290325165, -0.06030382215976715 ]
https://github.com/huggingface/datasets/issues/6697
Unable to Load Dataset in Kaggle
This error means that `fsspec>=2023.12.0` is installed, which is incompatible with the current releases (the next `datasets` release will be the first to support it). In the meantime, downgrading `fsspec` (`pip install fsspec<=2023.12.0`) should fix the issue.
### Describe the bug Having installed the latest versions of transformers==4.38.1 and datasets==2.17.1 Unable to load the dataset in a kaggle notebook. Get this Error: ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[8], line 3 1 from datasets import load_dataset ----> 3 dataset = load_dataset("llm-blender/mix-instruct") File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1664, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1661 ignore_verifications = ignore_verifications or save_infos 1663 # Create a dataset builder -> 1664 builder_instance = load_dataset_builder( 1665 path=path, 1666 name=name, 1667 data_dir=data_dir, 1668 data_files=data_files, 1669 cache_dir=cache_dir, 1670 features=features, 1671 download_config=download_config, 1672 download_mode=download_mode, 1673 revision=revision, 1674 use_auth_token=use_auth_token, 1675 **config_kwargs, 1676 ) 1678 # Return iterable dataset in case of streaming 1679 if streaming: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1490, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1488 download_config = download_config.copy() if download_config else DownloadConfig() 1489 download_config.use_auth_token = use_auth_token -> 1490 dataset_module = dataset_module_factory( 1491 path, 1492 revision=revision, 1493 download_config=download_config, 1494 download_mode=download_mode, 1495 data_dir=data_dir, 1496 data_files=data_files, 1497 ) 1499 # Get dataset builder class from the processing script 1500 builder_cls = import_main_class(dataset_module.module_path) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1242, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1237 if isinstance(e1, FileNotFoundError): 1238 raise FileNotFoundError( 1239 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. " 1240 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}" 1241 ) from None -> 1242 raise e1 from None 1243 else: 1244 raise FileNotFoundError( 1245 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory." 1246 ) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1230, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1215 return HubDatasetModuleFactoryWithScript( 1216 path, 1217 revision=revision, (...) 1220 dynamic_modules_path=dynamic_modules_path, 1221 ).get_module() 1222 else: 1223 return HubDatasetModuleFactoryWithoutScript( 1224 path, 1225 revision=revision, 1226 data_dir=data_dir, 1227 data_files=data_files, 1228 download_config=download_config, 1229 download_mode=download_mode, -> 1230 ).get_module() 1231 except Exception as e1: # noqa: all the attempts failed, before raising the error we should check if the module is already cached. 1232 try: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:846, in HubDatasetModuleFactoryWithoutScript.get_module(self) 836 token = self.download_config.use_auth_token 837 hfh_dataset_info = HfApi(config.HF_ENDPOINT).dataset_info( 838 self.name, 839 revision=self.revision, 840 token=token, 841 timeout=100.0, 842 ) 843 patterns = ( 844 sanitize_patterns(self.data_files) 845 if self.data_files is not None --> 846 else get_patterns_in_dataset_repository(hfh_dataset_info) 847 ) 848 data_files = DataFilesDict.from_hf_repo( 849 patterns, 850 dataset_info=hfh_dataset_info, 851 allowed_extensions=ALL_ALLOWED_EXTENSIONS, 852 ) 853 infered_module_names = { 854 key: infer_module_for_data_files(data_files_list, use_auth_token=self.download_config.use_auth_token) 855 for key, data_files_list in data_files.items() 856 } File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:471, in get_patterns_in_dataset_repository(dataset_info) 469 resolver = partial(_resolve_single_pattern_in_dataset_repository, dataset_info) 470 try: --> 471 return _get_data_files_patterns(resolver) 472 except FileNotFoundError: 473 raise FileNotFoundError( 474 f"The dataset repository at '{dataset_info.id}' doesn't contain any data file." 475 ) from None File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:99, in _get_data_files_patterns(pattern_resolver) 97 try: 98 for pattern in patterns: ---> 99 data_files = pattern_resolver(pattern) 100 if len(data_files) > 0: 101 non_empty_splits.append(split) File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:303, in _resolve_single_pattern_in_dataset_repository(dataset_info, pattern, allowed_extensions) 301 data_files_ignore = FILES_TO_IGNORE 302 fs = HfFileSystem(repo_info=dataset_info) --> 303 glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] 304 matched_paths = [ 305 filepath 306 for filepath in glob_iter 307 if filepath.name not in data_files_ignore and not filepath.name.startswith(".") 308 ] 309 if allowed_extensions is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:606, in AbstractFileSystem.glob(self, path, maxdepth, **kwargs) 602 depth = None 604 allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs) --> 606 pattern = glob_translate(path + ("/" if ends_with_sep else "")) 607 pattern = re.compile(pattern) 609 out = { 610 p: info 611 for p, info in sorted(allpaths.items()) (...) 618 ) 619 } File /opt/conda/lib/python3.10/site-packages/fsspec/utils.py:734, in glob_translate(pat) 732 continue 733 elif "**" in part: --> 734 raise ValueError( 735 "Invalid pattern: '**' can only be an entire path component" 736 ) 737 if part: 738 results.extend(_translate(part, f"{not_sep}*", not_sep)) ValueError: Invalid pattern: '**' can only be an entire path component ``` ``` After loading this dataset ### Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("llm-blender/mix-instruct") ``` ### Expected behavior The dataset should load with desired split. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.133+-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
37
Unable to Load Dataset in Kaggle ### Describe the bug Having installed the latest versions of transformers==4.38.1 and datasets==2.17.1 Unable to load the dataset in a kaggle notebook. Get this Error: ``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[8], line 3 1 from datasets import load_dataset ----> 3 dataset = load_dataset("llm-blender/mix-instruct") File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1664, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs) 1661 ignore_verifications = ignore_verifications or save_infos 1663 # Create a dataset builder -> 1664 builder_instance = load_dataset_builder( 1665 path=path, 1666 name=name, 1667 data_dir=data_dir, 1668 data_files=data_files, 1669 cache_dir=cache_dir, 1670 features=features, 1671 download_config=download_config, 1672 download_mode=download_mode, 1673 revision=revision, 1674 use_auth_token=use_auth_token, 1675 **config_kwargs, 1676 ) 1678 # Return iterable dataset in case of streaming 1679 if streaming: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1490, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs) 1488 download_config = download_config.copy() if download_config else DownloadConfig() 1489 download_config.use_auth_token = use_auth_token -> 1490 dataset_module = dataset_module_factory( 1491 path, 1492 revision=revision, 1493 download_config=download_config, 1494 download_mode=download_mode, 1495 data_dir=data_dir, 1496 data_files=data_files, 1497 ) 1499 # Get dataset builder class from the processing script 1500 builder_cls = import_main_class(dataset_module.module_path) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1242, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1237 if isinstance(e1, FileNotFoundError): 1238 raise FileNotFoundError( 1239 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. " 1240 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}" 1241 ) from None -> 1242 raise e1 from None 1243 else: 1244 raise FileNotFoundError( 1245 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory." 1246 ) File /opt/conda/lib/python3.10/site-packages/datasets/load.py:1230, in dataset_module_factory(path, revision, download_config, download_mode, force_local_path, dynamic_modules_path, data_dir, data_files, **download_kwargs) 1215 return HubDatasetModuleFactoryWithScript( 1216 path, 1217 revision=revision, (...) 1220 dynamic_modules_path=dynamic_modules_path, 1221 ).get_module() 1222 else: 1223 return HubDatasetModuleFactoryWithoutScript( 1224 path, 1225 revision=revision, 1226 data_dir=data_dir, 1227 data_files=data_files, 1228 download_config=download_config, 1229 download_mode=download_mode, -> 1230 ).get_module() 1231 except Exception as e1: # noqa: all the attempts failed, before raising the error we should check if the module is already cached. 1232 try: File /opt/conda/lib/python3.10/site-packages/datasets/load.py:846, in HubDatasetModuleFactoryWithoutScript.get_module(self) 836 token = self.download_config.use_auth_token 837 hfh_dataset_info = HfApi(config.HF_ENDPOINT).dataset_info( 838 self.name, 839 revision=self.revision, 840 token=token, 841 timeout=100.0, 842 ) 843 patterns = ( 844 sanitize_patterns(self.data_files) 845 if self.data_files is not None --> 846 else get_patterns_in_dataset_repository(hfh_dataset_info) 847 ) 848 data_files = DataFilesDict.from_hf_repo( 849 patterns, 850 dataset_info=hfh_dataset_info, 851 allowed_extensions=ALL_ALLOWED_EXTENSIONS, 852 ) 853 infered_module_names = { 854 key: infer_module_for_data_files(data_files_list, use_auth_token=self.download_config.use_auth_token) 855 for key, data_files_list in data_files.items() 856 } File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:471, in get_patterns_in_dataset_repository(dataset_info) 469 resolver = partial(_resolve_single_pattern_in_dataset_repository, dataset_info) 470 try: --> 471 return _get_data_files_patterns(resolver) 472 except FileNotFoundError: 473 raise FileNotFoundError( 474 f"The dataset repository at '{dataset_info.id}' doesn't contain any data file." 475 ) from None File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:99, in _get_data_files_patterns(pattern_resolver) 97 try: 98 for pattern in patterns: ---> 99 data_files = pattern_resolver(pattern) 100 if len(data_files) > 0: 101 non_empty_splits.append(split) File /opt/conda/lib/python3.10/site-packages/datasets/data_files.py:303, in _resolve_single_pattern_in_dataset_repository(dataset_info, pattern, allowed_extensions) 301 data_files_ignore = FILES_TO_IGNORE 302 fs = HfFileSystem(repo_info=dataset_info) --> 303 glob_iter = [PurePath(filepath) for filepath in fs.glob(PurePath(pattern).as_posix()) if fs.isfile(filepath)] 304 matched_paths = [ 305 filepath 306 for filepath in glob_iter 307 if filepath.name not in data_files_ignore and not filepath.name.startswith(".") 308 ] 309 if allowed_extensions is not None: File /opt/conda/lib/python3.10/site-packages/fsspec/spec.py:606, in AbstractFileSystem.glob(self, path, maxdepth, **kwargs) 602 depth = None 604 allpaths = self.find(root, maxdepth=depth, withdirs=True, detail=True, **kwargs) --> 606 pattern = glob_translate(path + ("/" if ends_with_sep else "")) 607 pattern = re.compile(pattern) 609 out = { 610 p: info 611 for p, info in sorted(allpaths.items()) (...) 618 ) 619 } File /opt/conda/lib/python3.10/site-packages/fsspec/utils.py:734, in glob_translate(pat) 732 continue 733 elif "**" in part: --> 734 raise ValueError( 735 "Invalid pattern: '**' can only be an entire path component" 736 ) 737 if part: 738 results.extend(_translate(part, f"{not_sep}*", not_sep)) ValueError: Invalid pattern: '**' can only be an entire path component ``` ``` After loading this dataset ### Steps to reproduce the bug ``` from datasets import load_dataset dataset = load_dataset("llm-blender/mix-instruct") ``` ### Expected behavior The dataset should load with desired split. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-5.15.133+-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 This error means that `fsspec>=2023.12.0` is installed, which is incompatible with the current releases (the next `datasets` release will be the first to support it). In the meantime, downgrading `fsspec` (`pip install fsspec<=2023.12.0`) should fix the issue.
[ -0.4405532479286194, -0.4754101037979126, -0.08109492063522339, 0.3323727250099182, 0.3103630542755127, 0.005510874092578888, 0.38063845038414, 0.2692002058029175, 0.04515639320015907, 0.054114557802677155, -0.21589186787605286, 0.7469200491905212, -0.21449705958366394, 0.36645469069480896, -0.12379197776317596, -0.11311385035514832, 0.06784508377313614, 0.049727026373147964, -0.1580350697040558, 0.1333536058664322, -0.10387111455202103, 0.006116289645433426, -0.44767433404922485, 0.017778031527996063, -0.27339956164360046, -0.11702298372983932, 0.19550326466560364, 0.08938023447990417, -0.06905391067266464, -0.4836661219596863, 0.6051008105278015, -0.14980243146419525, 0.4183025062084198, 0.25936946272850037, -0.00011230717063881457, 0.09471504390239716, 0.6071949601173401, -0.11344223469495773, -0.5549087524414062, -0.20773203670978546, -0.5407907366752625, -0.4464709162712097, -0.04837831109762192, -0.11277549713850021, -0.006273889914155006, -0.09031296521425247, -0.25274813175201416, -0.13931921124458313, 0.41139256954193115, 0.11766321212053299, 0.21188807487487793, 0.4533822238445282, 0.2729240953922272, -0.10665929317474365, 0.26049476861953735, -0.11312723159790039, -0.13139916956424713, 0.16359741985797882, 0.168263241648674, -0.0021070847287774086, 0.050426606088876724, 0.26649555563926697, 0.05106204003095627, -0.17034585773944855, 0.32185715436935425, -0.027716517448425293, 0.028972197324037552, -0.19245043396949768, 0.07267826795578003, 0.15066862106323242, 0.8599108457565308, -0.25129151344299316, -0.41722729802131653, -0.3393792510032654, -0.11001492291688919, 0.1236436665058136, 0.32321277260780334, 0.10158341377973557, -0.17042404413223267, -0.001956481486558914, 0.012555453926324844, -0.14046579599380493, -0.0951976552605629, 0.0697781890630722, -0.2151939421892166, 0.6835041046142578, -0.06714779883623123, 0.1452253758907318, 0.3981040418148041, -0.1611659824848175, 0.7106326222419739, -0.05770983546972275, -0.1943802386522293, 0.19061078131198883, -0.5826619267463684, 0.031117580831050873, -0.035559237003326416, -0.16018912196159363, 0.08138762414455414, 0.031013047322630882, -0.05270150303840637, 0.13844527304172516, 0.05077545344829559, 0.1948603391647339, 0.4607352614402771, 0.4427168369293213, 0.20283851027488708, 0.334307461977005, 0.1946035921573639, 0.19904330372810364, 0.3932763636112213, -0.03270720690488815, -0.042128678411245346, -0.36909276247024536, 0.09660018980503082, 0.17189639806747437, 0.21781986951828003, 0.08033575117588043, -0.324362188577652, -0.1501063108444214, -0.16654565930366516, -0.1551143229007721, 0.055301733314991, 0.3857523798942566, -0.13008615374565125, 0.4132338762283325, 0.18618811666965485, 0.08790910243988037, -0.033242080360651016, -0.12478239834308624, -0.17598861455917358, 0.07696723937988281, -0.11610989272594452, -0.1726318746805191, 0.17613834142684937, -0.1916099190711975, 0.2520248293876648, -0.06303081661462784, 0.12167611718177795, -0.04519758000969887, 0.12745200097560883, 0.11323614418506622, -0.32673919200897217, 0.3837391138076782, -0.07571288198232651, 0.09639263153076172, 0.056192297488451004, -0.17706015706062317, -0.09667310118675232, 0.33350425958633423, -0.09495218843221664, -0.2162700593471527, 0.13814295828342438, 0.22671014070510864, -0.20527076721191406, 0.053381145000457764, -0.6885342597961426, -0.019845880568027496, 0.166550874710083, -0.1777295619249344, -0.19939711689949036, -0.09202512353658676, 0.06616489589214325, -0.12860700488090515, 0.3663009703159332, 0.29976874589920044, -0.18044885993003845, -0.18185192346572876, -0.3058945834636688, -0.20992490649223328, -0.011576473712921143, 0.21205203235149384, -0.36776795983314514, 0.186039537191391, -0.19266681373119354, -0.1525953710079193, 0.6567249894142151, -0.5709759593009949, -0.5580618381500244, 0.22635656595230103, -0.1592821180820465, 0.08816361427307129, -0.06074371188879013, 0.1307619959115982, -0.04791785404086113, -0.06421071290969849, 0.08497991412878036, 0.2550344467163086, 0.012250488623976707, -0.061380475759506226, -0.34485846757888794, -0.3413657546043396, 0.2291838377714157, 0.2872048318386078, 0.09517103433609009, 0.13296185433864594, 0.020840443670749664, 0.2679448425769806, 0.1272801011800766, 0.08710154891014099, 0.055357009172439575, 0.11220123618841171, 0.2223547399044037, -0.108311727643013, 0.09767001867294312, 0.011940255761146545, -0.6191302537918091, 0.3750447928905487, -0.16245470941066742, -0.051425233483314514, -0.03530065715312958, -0.0019259974360466003, -0.46029576659202576, 0.14387156069278717, -0.20408008992671967, -0.27322763204574585, 0.09954218566417694, -0.09800760447978973, -0.0012361090630292892, -0.07443708181381226, -0.16538025438785553, 0.5387687087059021, 0.29191771149635315, -0.06772273778915405, -0.43187394738197327, 0.30295443534851074, -0.3147026598453522, 0.02369040995836258, 0.1568760722875595, 0.03537585213780403, 0.17073330283164978, -0.0988253653049469, -0.15972721576690674, 0.3501308560371399, 0.24918729066848755, 0.12241770327091217, -0.11733411997556686, -0.2478538304567337, 0.3090575039386749, -0.3664952218532562, 0.0945143848657608, 0.1333918273448944, 0.13926298916339874, 0.08262968808412552, -0.3107829988002777, 0.12183240056037903, -0.10860946774482727, -0.03385474532842636, 0.03506865352392197, 0.2405204474925995, 0.213409423828125, -0.039765696972608566, 0.18385419249534607, -0.21215210855007172, 0.07802394032478333, -0.33295366168022156, 0.26467278599739075, 0.022841643542051315, -0.08135740458965302, -0.001545153558254242, 0.08556649833917618, -0.1168811023235321, 0.1150398999452591, 0.036855414509773254, -0.23984578251838684, 0.0072773173451423645, 0.029711401090025902, 0.3571993112564087, 0.16554804146289825, 0.1856713593006134, -0.26347100734710693, -0.15123967826366425, 0.029811181128025055, -0.017356768250465393, 0.12596353888511658, 0.18570494651794434, 0.38344842195510864, 0.44998154044151306, 0.1390909105539322, 0.014869853854179382, 0.06307930499315262, -0.08499014377593994, 0.20032495260238647, 0.2896086275577545, -0.10453546792268753, 0.11061953753232956, -0.13137495517730713, 0.010091084986925125, -0.27643507719039917, 0.019301723688840866, -0.12815657258033752, -0.4269492030143738, -0.20119304955005646, 0.3424900770187378, 0.006148502230644226, 0.29350578784942627, 0.1927119344472885, 0.11427685618400574, 0.22431506216526031, 0.10134612023830414, -0.3897378444671631, -0.3576715588569641, -0.3263384699821472, 0.04305655136704445, 0.19920511543750763, 0.008189670741558075, 0.11940469592809677, -0.05882111191749573, 0.10925696790218353, -0.2455199658870697, -0.23409965634346008, -0.026351824402809143, 0.015408914536237717, 0.2136806845664978, 0.12424104660749435, 0.20581474900245667, 0.0933612734079361, -0.3646987974643707, 0.29956161975860596, -0.03251367062330246, -0.16010241210460663, 0.18848392367362976, 0.042467955499887466, -0.016256598755717278, 0.03801513835787773, -0.44239339232444763, -0.35537469387054443, -0.5150251388549805, -0.06333038210868835, -0.15125450491905212, -0.1424884796142578, 0.02921198308467865, 0.27466845512390137, 0.0309404656291008, 0.37706416845321655, -0.08774402737617493, -0.10516306012868881, 0.27992478013038635, 0.3223896324634552, -0.01544579304754734, -0.36206427216529846, -0.07759536802768707, -0.1578630805015564, 0.18272320926189423, -0.0037733707576990128, -0.4222531318664551, 0.1592848300933838, -0.14132048189640045, 0.08374196290969849, -0.2804907560348511, -0.009570656344294548, 0.18162822723388672, 0.30177319049835205, 0.08020054548978806, -0.11823195219039917, -0.27624672651290894, -0.14114734530448914, 0.09364521503448486, 0.35918769240379333, 0.024331171065568924, 0.22851967811584473, -0.04009127989411354, 0.5932199358940125, 0.1289416253566742, -0.01642465963959694, -0.004393227398395538, 0.1507457196712494, 0.07851668447256088, 0.0009418725967407227, -0.31503763794898987, -0.051260460168123245, -0.020180508494377136, 0.0745638981461525, -0.08593347668647766, -0.0740690752863884, -0.4359058141708374, -0.38966453075408936, -0.24203254282474518, 0.04322332143783569, -0.14794394373893738, -0.024472160264849663, -0.05818706750869751, 0.16175392270088196, 0.01207570731639862, 0.19572961330413818, -0.09713055193424225, 0.028025787323713303, 0.15298862755298615, 0.05873176082968712, 0.09947101771831512, -0.07687888294458389, -0.2385377436876297, -0.15669144690036774, -0.13752922415733337, 0.1671358197927475, 0.16179482638835907, 0.5847994685173035, 0.11964607238769531, -0.13425478339195251, -0.027951501309871674, -0.20398609340190887, 0.8219097852706909, -0.16945099830627441, 0.28727108240127563, 0.2570354640483856, 0.16534577310085297, -0.6337114572525024, -0.24840237200260162, -0.15959994494915009, -0.14371685683727264, 0.055117733776569366, 0.27419665455818176, -0.16871453821659088, -0.09887099266052246, -0.05792088061571121, 0.18149635195732117, -0.2233143299818039, -0.15413892269134521, -0.3773835599422455, -0.0886773020029068, -0.47478532791137695, -0.26449987292289734, -0.17744043469429016, 0.17477577924728394, -0.1399049460887909, 0.09902508556842804, -0.06865690648555756, -0.05813879519701004, -0.2456407994031906, 0.2992266118526459, 0.39497658610343933, -0.0016217080410569906, 0.24211403727531433, 0.28228381276130676, -0.16790395975112915, 0.1355459839105606, 0.49699777364730835, 0.1800246238708496, -0.4858626127243042, 0.02605968341231346, 0.08765021711587906, -0.14105069637298584, -0.131281316280365, -0.2312988042831421, -0.12039712816476822, 0.11023274064064026, 0.03806183114647865, -0.2541596591472626, 0.05061192810535431, 0.0942898690700531, 0.02275918424129486, -0.33608412742614746, -0.46542873978614807, 0.5550139546394348, -0.019014742225408554, -0.0557006374001503, 0.22397616505622864, -0.1888057440519333, -0.14467482268810272, 0.4496263265609741, 0.18510040640830994, 0.47328245639801025, -0.08658219873905182, 0.028803082183003426, 0.4192977249622345, 0.006910376250743866, 0.36756235361099243, -0.36515986919403076, 0.21596279740333557, -0.42139437794685364, -0.20288874208927155, -0.013493211939930916, -0.29045042395591736, 0.05681304261088371, -0.046136461198329926, -0.31975024938583374, 0.03426392748951912, -0.1585380882024765, 0.14418146014213562, 0.07214496284723282, 0.2461986243724823, -0.20800378918647766, -0.09421977400779724, -0.17026129364967346, 0.14218838512897491, -0.23706059157848358, 0.3550027906894684, -0.057187292724847794, -0.06716258078813553, -0.28341785073280334, -0.1508207470178604, -0.3167828321456909, 0.23498502373695374, -0.00040925247594714165, 0.5790200233459473, 0.13052091002464294, -0.20464152097702026, 0.2838994562625885, 0.5899831652641296, 0.1752179116010666, 0.09450878202915192, -0.17846766114234924, 0.28604990243911743, -0.0043133944272994995, -0.043746963143348694, 0.032131895422935486, 0.27170825004577637, 0.21185536682605743, -0.11908065527677536, -0.3629642724990845, 0.33058488368988037, -0.12567465007305145, -0.1449597179889679, 0.06307651102542877, 0.15211032330989838, -0.25827085971832275, -0.22919407486915588, -0.05777740105986595, 0.07557719945907593, -0.028448911383748055, -0.16880324482917786, 0.1348297894001007, 0.05966902896761894, -0.158351331949234, 0.13261418044567108, 0.07169774919748306, -0.04408120736479759, 0.13779938220977783, 0.5539243817329407, -0.15103483200073242, 0.09114019572734833, 0.295207679271698, 0.12447528541088104, -0.14452414214611053, -0.23436680436134338, 0.12043086439371109, -0.16067685186862946, -0.4148416817188263, 0.05656399205327034, -0.07033885270357132, -0.13190408051013947, -0.06190955638885498, 0.5452376008033752, 0.32701998949050903, -0.05915311723947525, -0.0042385198175907135, -0.451181024312973, -0.37597545981407166, 0.3115508556365967, -0.059382710605859756, 0.016620304435491562, -0.05981475114822388, 0.07100959867238998, -0.16106465458869934, 0.16815818846225739, -0.29623937606811523, -0.032388344407081604, -0.263597697019577, 0.042892519384622574, 0.14107652008533478, -0.12581029534339905, 0.0029701623134315014, -0.21134212613105774, 0.08032850921154022, -0.1677313894033432, -0.2233080118894577, -0.21077373623847961, -0.020848091691732407, 0.09907199442386627, 0.005437571555376053, -0.22305722534656525, -0.40495675802230835, -0.3236827850341797, -0.018089666962623596, -0.03054916113615036, 0.2189643681049347, 0.11987655609846115, -0.09015826880931854, 0.41418567299842834, -0.09252585470676422, 0.13896828889846802, -0.33105748891830444, 0.26699361205101013, -0.0562247633934021, -0.34879255294799805, 0.12646318972110748, 0.06000364199280739, 0.25328198075294495, 0.1390700787305832, -0.05162939429283142, -0.0643158033490181, -0.18771682679653168, 0.06203417479991913, 0.39596128463745117, -0.4345301389694214, 0.20027370750904083, 0.1023777425289154, 0.036327943205833435, 0.3555486798286438, -0.24650715291500092, 0.025356745347380638, 0.11842713505029678, 0.1944016069173813, -0.37390902638435364, -0.4641937017440796, 0.24058887362480164, 0.04074552282691002, -0.01986556313931942, 0.030915744602680206, 0.13259878754615784, -0.18725553154945374, -0.02343260496854782, 0.3855586349964142, 0.42083561420440674, -0.38870108127593994, 0.33601659536361694, 0.5832104086875916, -0.07165413349866867, 0.085250124335289, 0.0914074257016182, 0.21486489474773407, 0.1487351655960083, 0.3851086497306824, -0.22486662864685059, 0.11509999632835388, -0.14073386788368225, 0.22883838415145874, 0.04802129045128822, -0.45538824796676636, 0.08575890213251114, 0.1261594593524933, -0.403916597366333, -0.037168338894844055, 0.08029492199420929, 0.021254241466522217, -0.08509180694818497, 0.01846981607377529, -0.02909017726778984, -0.16947166621685028, -0.12922823429107666, 0.03017391636967659, 0.08015929162502289, -0.17618513107299805, -0.04272320494055748, 0.0729769915342331, 0.11730906367301941, -0.1480688750743866, 0.2683742046356201, 0.20316646993160248, -0.19791658222675323, -0.0016735289245843887, 0.053186338394880295, 0.49687615036964417, 0.1293434500694275, -0.16815689206123352, 0.01889028027653694, 0.24013745784759521, -0.08173662424087524, 0.018764931708574295, 0.0729554146528244, 0.3520953357219696, 0.3376552164554596, -0.3543855547904968, 0.17521588504314423, 0.22960001230239868, -0.1970375031232834, -0.10165593028068542, 0.33147871494293213, 0.13669361174106598, 0.035179972648620605, 0.2376643568277359, 0.19054453074932098, -0.1255396008491516, 0.028133638203144073, 0.07361787557601929, 0.21295258402824402, -0.17859695851802826, 0.16169176995754242, -0.1812170147895813, -0.13951058685779572, 0.056258030235767365, 0.18400055170059204, -0.30306389927864075, 0.14649347960948944, 0.20379427075386047, 0.18784190714359283, 0.20517417788505554, -0.014256680384278297, 0.08485488593578339, 0.06401099264621735, 0.5173172354698181, 0.19005243480205536, 0.20197820663452148, -0.15986019372940063, -0.025009334087371826, -0.5694613456726074, -0.09082982689142227, 0.2465875744819641, -0.10768327116966248, 0.20850823819637299, -0.06713933497667313, 0.031126122921705246, 0.2328319251537323, 0.04460643231868744, -0.07197108119726181, 0.45936763286590576, 0.15649601817131042, -0.24948574602603912, -0.32578080892562866, 0.2560223937034607, 0.16739292442798615, -0.14253166317939758, -0.5336727499961853, 0.10996125638484955, -0.008361726999282837, 0.10025347024202347, -0.12226827442646027, -0.12071192264556885, 0.2613215744495392, -0.06273166090250015, 0.22071583569049835, -0.012917568907141685, 0.6241376399993896, 0.021983638405799866, 0.04582793265581131, -0.2969277799129486, -0.36986538767814636, -0.04922439903020859, -0.2070816159248352, 0.214406818151474, 0.3783893585205078, -0.20702268183231354, 0.11006712913513184, -0.38022440671920776, 0.30821937322616577, 0.17274616658687592, 0.21011316776275635, -0.3080313205718994, 0.014997929334640503, -0.13313904404640198, -0.11113529652357101, 0.17992281913757324, 0.060113005340099335, -0.037546053528785706, 0.0318279042840004, -0.35482823848724365, -0.3921824097633362, 0.49370521306991577, -0.15728707611560822, -0.34977465867996216, -0.11831756681203842, -0.08855268359184265, 0.06341138482093811, 0.07452471554279327, -0.36737266182899475, 0.22315534949302673, 0.28664281964302063, -0.04254394769668579, -0.16113252937793732, 0.07171466946601868, 0.20449642837047577, 0.04775069281458855, -0.1104661226272583, 0.42507466673851013, 0.023416735231876373, -0.006329767405986786, -0.08537547290325165, -0.06030382215976715 ]
https://github.com/huggingface/datasets/issues/6695
Support JSON file with an array of strings
https://huggingface.co/datasets/CausalLM/Refined-Anime-Text/discussions/1 has been fixed, but how can we check if there are other datasets with the same error, in datasets-server's database? I don't know how to get the list of erroneous cache entries, since we only copied `Error code: JobManagerCrashedError`, but not the traceback in `details`... Do you remember the error message, or the underlying exception, we had?
Support loading a dataset from a JSON file with an array of strings. See: https://huggingface.co/datasets/CausalLM/Refined-Anime-Text/discussions/1
58
Support JSON file with an array of strings Support loading a dataset from a JSON file with an array of strings. See: https://huggingface.co/datasets/CausalLM/Refined-Anime-Text/discussions/1 https://huggingface.co/datasets/CausalLM/Refined-Anime-Text/discussions/1 has been fixed, but how can we check if there are other datasets with the same error, in datasets-server's database? I don't know how to get the list of erroneous cache entries, since we only copied `Error code: JobManagerCrashedError`, but not the traceback in `details`... Do you remember the error message, or the underlying exception, we had?
[ -0.016330234706401825, 0.19395676255226135, -0.15732192993164062, 0.5028485655784607, -0.06712311506271362, -0.03483910113573074, 0.05243315547704697, 0.40654894709587097, 0.29522019624710083, 0.1648133248090744, 0.2978244423866272, 0.0005004974082112312, -0.2381720393896103, -0.022756431251764297, 0.056179750710725784, 0.3476010262966156, 0.11922214925289154, 0.2763338088989258, -0.05050824582576752, 0.05936911702156067, 0.03475797921419144, 0.46813711524009705, -0.008762836456298828, -0.08843623101711273, -0.3368772864341736, 0.055127717554569244, -0.028444379568099976, 0.1514011174440384, 0.07235480099916458, -0.5463705658912659, 0.28815415501594543, -0.11783148348331451, -0.0700191855430603, 0.23665380477905273, -0.00011868496221723035, 0.050309792160987854, 0.24188850820064545, -0.05986300855875015, -0.3895648419857025, -0.13313136994838715, -0.6010358929634094, -0.41673198342323303, 0.14635580778121948, -0.2141760140657425, 0.3061964213848114, 0.1281144767999649, 0.03175593912601471, -0.5627378225326538, 0.5228452682495117, 0.436401903629303, 0.10900425165891647, 0.1982639729976654, -0.13487136363983154, -0.06657176464796066, 0.12569595873355865, 0.2939768135547638, 0.008471066132187843, -0.31022563576698303, 0.2629571557044983, 0.0772646814584732, -0.12636205554008484, 0.3271751403808594, -0.10947009921073914, 0.3997035622596741, -0.12090102583169937, -0.320034384727478, -0.2411249279975891, -0.20079688727855682, 0.2977457642555237, 0.3278345763683319, 0.7365562915802002, -0.09523951262235641, -0.23246429860591888, -0.45304399728775024, -0.1416310966014862, 0.4509720802307129, 0.48357415199279785, -0.02281392179429531, -0.017191128805279732, -0.0021420642733573914, -0.3713406026363373, -0.16594916582107544, 0.11438353359699249, -0.2446201592683792, 0.052460409700870514, 0.12364812940359116, -0.17214477062225342, -0.031122654676437378, 0.10506972670555115, -0.00750124454498291, 0.17320996522903442, 0.12359896302223206, -0.13661642372608185, 0.19469383358955383, -0.43471458554267883, -0.19014425575733185, -0.1077984943985939, -0.09603216499090195, 0.5380909442901611, 0.007846731692552567, 0.25194740295410156, 0.20639356970787048, -0.23159705102443695, 0.12190452218055725, 0.13768470287322998, 0.10271865129470825, 0.1484348475933075, -0.3088797628879547, 0.04239461198449135, -0.059535082429647446, -0.19868876039981842, 0.06714728474617004, -0.09592068195343018, -0.19270682334899902, 0.24627332389354706, 0.12237603962421417, 0.04004029929637909, -0.41255295276641846, -0.21816501021385193, 0.2754489779472351, -0.04677341878414154, -0.47875702381134033, 0.07916712760925293, 0.4041560888290405, 0.014859999530017376, 0.2635975778102875, -0.1677960306406021, -0.1363922357559204, 0.20235104858875275, -0.4215043783187866, -0.21506306529045105, 0.01330987736582756, -0.014130432158708572, 0.16603605449199677, 0.30858996510505676, -0.29625874757766724, 0.42460688948631287, -0.1162944957613945, -0.1798282414674759, -0.2779504060745239, 0.18905314803123474, -0.07184628397226334, 0.14794373512268066, 0.25798678398132324, 0.09726002812385559, 0.11811605840921402, 0.2855716049671173, -0.12047652900218964, -0.1571999043226242, -0.10744433850049973, -0.49849557876586914, -0.5806114673614502, -0.11914889514446259, 0.10471182316541672, -0.3224133849143982, 0.14751143753528595, -0.37794286012649536, 0.2602960169315338, 0.016500338912010193, -0.09627967327833176, 0.07914648205041885, 0.12139971554279327, -0.2306593358516693, -0.19957135617733002, 0.11833106726408005, 0.3423839211463928, -0.5963103771209717, -0.21492448449134827, -0.19093100726604462, -0.2000560611486435, -0.2727433145046234, 0.05940581485629082, -0.1539219617843628, -0.039664119482040405, -0.6251589059829712, 0.2467506378889084, 0.1401287317276001, -0.198593869805336, 0.002378561533987522, 0.20017744600772858, 0.18194659054279327, -0.042720600962638855, 0.2788623869419098, -0.2024821788072586, 0.16108885407447815, -0.0980907529592514, 0.05052342265844345, 0.008518342860043049, 0.06058603525161743, 0.0566263422369957, -0.07699380815029144, -0.0954923927783966, -0.06397530436515808, 0.14395587146282196, 0.17255601286888123, -0.15403038263320923, 0.10113874822854996, -0.09558338671922684, -0.051387444138526917, -0.05026723071932793, -0.04673604667186737, 0.2709566354751587, -0.15507519245147705, 0.3129505515098572, 0.14728546142578125, -0.1976814866065979, -0.7390967011451721, 0.272847980260849, 0.16443555057048798, -0.22291436791419983, 0.06477595865726471, 0.04289786517620087, -0.02900911495089531, 0.24963654577732086, -0.026379365473985672, 0.41127145290374756, 0.12566794455051422, 0.5008648037910461, 0.2746860682964325, 0.08244340121746063, -0.530954122543335, 0.5084774494171143, -0.20318447053432465, -0.0298484917730093, -0.5361223220825195, 0.270182341337204, 0.0159286018460989, 0.06566989421844482, 0.09499059617519379, 0.021913152188062668, 0.16388487815856934, -0.18138989806175232, -0.1113106906414032, 0.16044068336486816, 0.007817612960934639, 0.2951406240463257, 0.18594351410865784, 0.0639224424958229, -0.029437506571412086, -0.12245224416255951, -0.10309923440217972, 0.08550335466861725, 0.040744759142398834, -0.13151906430721283, 0.09615381062030792, 0.25955140590667725, -0.03548996523022652, 0.03012184053659439, -0.08287430554628372, -0.1417199820280075, 0.4720939099788666, 0.051620032638311386, -0.14126351475715637, -0.24905124306678772, 0.42426562309265137, -0.0675518810749054, 0.21276776492595673, 0.09951569139957428, -0.3927803039550781, -0.40230756998062134, 0.26716768741607666, 0.018065042793750763, 0.23405060172080994, 0.15167617797851562, -0.08293313533067703, -0.18413546681404114, 0.2067839801311493, 0.35286813974380493, 0.3679143190383911, 0.1351584494113922, -0.06229913607239723, -0.13285313546657562, 0.06363793462514877, -0.02999173477292061, 0.1501702517271042, 0.03695981577038765, 0.30366039276123047, 0.4227922260761261, 0.17621643841266632, -0.16633018851280212, -0.6563751697540283, -0.3936002850532532, 0.027174966409802437, 0.18026648461818695, -0.27704524993896484, -0.19729302823543549, -0.34959888458251953, -0.12657880783081055, -0.15056651830673218, -0.1741122156381607, -0.1563785970211029, -0.14770685136318207, 0.2450721561908722, 0.05070425942540169, -0.11910785734653473, 0.15830455720424652, -0.4357044994831085, 0.5050333142280579, -0.3422214984893799, 0.2394254505634308, -0.46906912326812744, 0.2289932668209076, 0.04702301323413849, -0.019605379551649094, 0.31718915700912476, 0.08434616029262543, 0.28924500942230225, -0.2847059369087219, -0.10904095321893692, -0.2687198221683502, -0.0948989987373352, 0.3418489992618561, 0.11456974595785141, -0.04664938896894455, 0.33624720573425293, 0.10104098916053772, -0.031013425439596176, -0.08615930378437042, 0.06253635138273239, -0.2576960325241089, -0.33654284477233887, 0.1192636489868164, 0.26521527767181396, 0.034730952233076096, 0.1108560860157013, -0.23826852440834045, -0.30093976855278015, -0.1976466327905655, -0.06160169839859009, -0.012579532340168953, 0.22527070343494415, -0.10745503008365631, -0.021609211340546608, 0.29603874683380127, -0.029850738123059273, 0.21527574956417084, -0.4350849986076355, -0.5707753300666809, 0.08582232892513275, 0.1445496529340744, 0.08645902574062347, 0.44596752524375916, 0.033961303532123566, -0.20108826458454132, 0.01050901785492897, -0.6317213177680969, -0.1578814834356308, -0.017365364357829094, -0.16076599061489105, -0.05024874210357666, -0.43532273173332214, 0.6444549560546875, 0.24707116186618805, -0.04277784749865532, -0.260941743850708, -0.43626537919044495, -0.105189748108387, -0.17909857630729675, 0.17266541719436646, -0.09055715054273605, 0.42405202984809875, 0.07210884988307953, 0.16083642840385437, 0.1978834867477417, -0.1555004119873047, 0.5093356370925903, 0.05634457617998123, 0.2963847219944, 0.12234514951705933, -0.07240906357765198, -0.12359579652547836, -0.04205930233001709, -0.4352071285247803, 0.3823428153991699, 0.002666945569217205, -0.09750010073184967, -0.14653640985488892, 0.21190151572227478, -0.24264228343963623, 0.12289389967918396, 0.07718408852815628, -0.16108256578445435, 0.1493934690952301, 0.022745739668607712, -0.06381914764642715, -0.11339938640594482, 0.012812042608857155, -0.13271749019622803, 0.11241553723812103, 0.207576185464859, -0.19842317700386047, -0.7008704543113708, -0.043083734810352325, -0.11659874767065048, 0.35461878776550293, 0.11817605048418045, 0.439009428024292, -0.2883872389793396, 0.26084619760513306, -0.0019700229167938232, -0.15892651677131653, 0.620438814163208, -0.667127788066864, 0.03539370372891426, -0.03651375323534012, 0.14962592720985413, 0.11915900558233261, -0.13924168050289154, -0.06989391148090363, 0.2951154410839081, 0.09701339900493622, 0.6707460880279541, -0.05463504046201706, -0.01419810764491558, -0.052868977189064026, -0.014960743486881256, -0.23506374657154083, -0.19226573407649994, -0.1959192305803299, -0.15039163827896118, -0.21471060812473297, 0.16651390492916107, -0.02925897017121315, -0.1429143100976944, 0.24407494068145752, -0.22037267684936523, -0.129827618598938, 0.12679848074913025, 0.2500353157520294, 0.11773787438869476, 0.18124327063560486, 0.09477299451828003, 0.15877100825309753, 0.17363600432872772, 0.2637939453125, 0.4541403651237488, 0.5490320324897766, -0.00862869992852211, -0.10413077473640442, -0.024140294641256332, 0.19120989739894867, 0.2418411374092102, 0.29051846265792847, -0.02938537672162056, -0.06610723584890366, 0.23258943855762482, 0.025966867804527283, -0.07834979891777039, -0.19612248241901398, 0.31286919116973877, 0.12720073759555817, -0.45555242896080017, -0.3522816598415375, 0.3481968641281128, 0.24570690095424652, -0.0433674082159996, -0.027571067214012146, -0.06593817472457886, -0.22468270361423492, 0.3296172618865967, -0.06112722307443619, 0.8238903284072876, -0.021987855434417725, -0.20369598269462585, -0.02328413724899292, -0.20561730861663818, 0.7081130146980286, -0.35454022884368896, 0.03928558528423309, -0.22149063646793365, -0.17985624074935913, -0.14601904153823853, -0.14032411575317383, 0.11348481476306915, 0.23187287151813507, -0.2969423830509186, 0.18709053099155426, 0.32729005813598633, 0.2293204665184021, -0.19502763450145721, 0.14580640196800232, -0.3138025999069214, -0.17835664749145508, -0.38964158296585083, 0.1767507642507553, -0.34239131212234497, 0.03864925727248192, -0.0814889594912529, -0.002598457969725132, 0.3253577649593353, -0.11702397465705872, -0.6841878294944763, -0.09096508473157883, -0.02587984688580036, -0.02902139723300934, 0.3928477466106415, -0.06602965295314789, 0.023225251585245132, 0.18177779018878937, 0.4382478594779968, -0.12360182404518127, -0.1143757551908493, 0.15305539965629578, -0.2513274848461151, 0.020466821268200874, -0.20248252153396606, -0.0635133609175682, 0.270673543214798, 0.16292476654052734, -0.11338131874799728, 0.2031785249710083, -0.21570326387882233, -0.46527087688446045, -0.12659281492233276, 0.052518054842948914, -0.2352025955915451, -0.2867682874202728, -0.37976333498954773, 0.05016258358955383, 0.01944105699658394, -0.11383117735385895, 0.11791570484638214, 0.13525599241256714, -0.13332456350326538, 0.2716405391693115, 0.040660563856363297, -0.050763145089149475, -0.02947324886918068, 0.36439794301986694, -0.04840888828039169, 0.04856695979833603, 0.26196056604385376, 0.11415787041187286, -0.005027454346418381, -0.2361251711845398, -0.09242885559797287, 0.2948150932788849, -0.21723660826683044, 0.10628069937229156, -0.22615289688110352, -0.2522951066493988, -0.008146710693836212, 0.13293492794036865, 0.39341676235198975, 0.30320119857788086, 0.1815149188041687, -0.4781803786754608, -0.24037224054336548, 0.295326292514801, 0.06807508319616318, 0.386612206697464, 0.11887965351343155, -0.44371095299720764, -0.0765276700258255, 0.1616414338350296, -0.2624678611755371, 0.028813565149903297, -0.5648850798606873, -0.05446788668632507, -0.22488926351070404, 0.2619314193725586, 0.01760714128613472, -0.15956124663352966, -0.018654881045222282, 0.30932462215423584, -0.13916359841823578, -0.10430041700601578, 0.30754610896110535, 0.16334284842014313, 0.19596156477928162, 0.18171417713165283, -0.22005042433738708, -0.13519147038459778, 0.2729102373123169, -0.11047475785017014, -0.28527483344078064, 0.18235766887664795, -0.10021616518497467, 0.1666688472032547, 0.20370402932167053, -0.2250695824623108, -0.09868664294481277, 0.08334313333034515, 0.21910680830478668, 0.24508623778820038, -0.07895925641059875, 0.17080453038215637, -0.07482912391424179, 0.02569478750228882, -0.06183512136340141, 0.2951294779777527, 0.1758507937192917, 0.199430912733078, 0.08313357830047607, -0.4041343927383423, -0.09751497209072113, 0.24622692167758942, 0.533308744430542, 0.1044638454914093, -0.42187708616256714, 0.17329815030097961, 0.2651488780975342, 0.1457146257162094, -0.15995250642299652, -0.2086801677942276, 0.515803873538971, 0.22616690397262573, -0.17097118496894836, 0.1589462012052536, 0.36903536319732666, -0.3279164433479309, 0.6137214303016663, 0.31056249141693115, 0.5894368886947632, -0.23724092543125153, -0.05195649713277817, -0.169258251786232, -0.06101385876536369, -0.0350346602499485, 0.34151291847229004, 0.08439339697360992, 0.409517765045166, 0.26499560475349426, -0.11580591648817062, 0.3285481035709381, 0.3680265247821808, 0.12755173444747925, -0.062495432794094086, -0.22685642540454865, 0.4272231161594391, 0.679206371307373, -0.04821158945560455, 0.31806129217147827, -0.02389886975288391, 0.16151466965675354, -0.23442235589027405, -0.037124957889318466, -0.524308443069458, 0.02011818252503872, -0.24857231974601746, 0.003995827399194241, -0.20967836678028107, -0.12956005334854126, -0.08487746119499207, 0.23920920491218567, 0.012842826545238495, 0.03269556909799576, 0.23518006503582, -0.002822086215019226, -0.3577883243560791, -0.31628286838531494, 0.271368145942688, 0.06992307305335999, -0.10395593196153641, -0.22210422158241272, 0.45954933762550354, 0.12838709354400635, -0.09848104417324066, 0.3002471923828125, 0.42536723613739014, 0.39786607027053833, -0.0507129430770874, 0.2087157517671585, 0.13888508081436157, -0.19209127128124237, -0.055015791207551956, -0.18967995047569275, 0.4008508026599884, -0.2822278141975403, -0.3140971064567566, 0.1471957117319107, 0.14566637575626373, -0.04113500192761421, 0.42148667573928833, -0.12103387713432312, 0.16669678688049316, -0.17385436594486237, -0.2739098072052002, -0.06104568392038345, -0.017929431051015854, -0.1519026905298233, -0.053487516939640045, -0.3099939823150635, -0.038973286747932434, 0.20225420594215393, -0.03266129270195961, 0.18089896440505981, 0.14275316894054413, 0.06544161587953568, -0.10897007584571838, 0.16213691234588623, 0.43720781803131104, -0.20547190308570862, 0.03233322501182556, -0.4706253409385681, -0.6938232183456421, 0.09373562037944794, -0.2645045816898346, -0.0003107227385044098, 0.202201247215271, 0.13360284268856049, 0.10149974375963211, -0.08779604732990265, 0.12495897710323334, -0.012644438073039055, -0.031873807311058044, 0.21537065505981445, -0.28672242164611816, -0.17852643132209778, 0.4290585517883301, 0.047561950981616974, 0.14974986016750336, -0.06402803212404251, 0.30979540944099426, 0.08871790766716003, -0.07853960990905762, -0.14809097349643707, 0.056652821600437164, -0.2460736185312271, 0.04642064869403839, 0.2726033926010132, 0.023180153220891953, 0.41402411460876465, -0.24011948704719543, 0.37004032731056213, -0.06805199384689331, -0.2404230684041977, -0.12817904353141785, 0.2752874493598938, 0.06614991277456284, 0.2419605553150177, -0.31662604212760925, 0.4344041049480438, -0.13007770478725433, 0.07477693259716034, -0.1054421216249466, 0.16205208003520966, -0.4245578944683075, -0.03328274190425873, -0.24202993512153625, 0.14123448729515076, 0.19102223217487335, 0.16289037466049194, 0.19811800122261047, 0.19367331266403198, -0.26162630319595337, -0.2445337325334549, 0.16107627749443054, -0.2155185490846634, -0.21305391192436218, -0.03862372413277626, 0.23153924942016602, 0.19572043418884277, -0.12077248841524124, -0.6914770007133484, -0.014766350388526917, 0.3645320236682892, 0.1697944700717926, -0.09729845821857452, 0.08860801160335541, 0.07007502019405365, 0.08327926695346832, 0.04148801043629646, 0.1173371970653534, 0.2963278889656067, -0.3153453469276428, 0.08821380138397217, -0.22265449166297913 ]
https://github.com/huggingface/datasets/issues/6691
load_dataset() does not support tsv
Hi @dipsivenkatesh, Please note that this functionality is already implemented. Our CSV builder uses `pandas.read_csv` under the hood, and you can pass the parameter `delimiter="\t"` to read TSV files. See the list of CSV config parameters in our docs: https://huggingface.co/docs/datasets/package_reference/loading_methods#datasets.packaged_modules.csv.CsvConfig
### Feature request the load_dataset() for local functions support file types like csv, json etc but not of type tsv (tab separated values). ### Motivation cant easily load files of type tsv, have to convert them to another type like csv then load ### Your contribution Can try by raising a PR with a little help, currently went through the code but didn't fully understand
40
load_dataset() does not support tsv ### Feature request the load_dataset() for local functions support file types like csv, json etc but not of type tsv (tab separated values). ### Motivation cant easily load files of type tsv, have to convert them to another type like csv then load ### Your contribution Can try by raising a PR with a little help, currently went through the code but didn't fully understand Hi @dipsivenkatesh, Please note that this functionality is already implemented. Our CSV builder uses `pandas.read_csv` under the hood, and you can pass the parameter `delimiter="\t"` to read TSV files. See the list of CSV config parameters in our docs: https://huggingface.co/docs/datasets/package_reference/loading_methods#datasets.packaged_modules.csv.CsvConfig
[ -0.33400267362594604, -0.506096601486206, -0.051987357437610626, 0.237404927611351, 0.48021453619003296, 0.10255669802427292, 0.28380081057548523, 0.38109928369522095, 0.5411458015441895, 0.2551250457763672, -0.32432228326797485, 0.27185848355293274, -0.06290659308433533, 0.7595752477645874, 0.11608703434467316, -0.13672447204589844, 0.01596367359161377, 0.41484296321868896, -0.18791994452476501, 0.2491634637117386, -0.2971770763397217, 0.22242465615272522, -0.09719658643007278, -0.05042916536331177, 0.054169364273548126, 0.07159192115068436, 0.019319763407111168, 0.28997933864593506, -0.020282762125134468, -0.2918431758880615, 0.16258952021598816, 0.10499854385852814, 0.3885384202003479, 0.6298229694366455, -0.00010316800035070628, 0.14837786555290222, 0.10082361847162247, -0.27589067816734314, -0.18530118465423584, -0.4968867301940918, 0.0011731982231140137, -0.2052195817232132, 0.2635810971260071, -0.08066019415855408, -0.31404590606689453, -0.315030574798584, -0.0535799115896225, -0.35736343264579773, 0.3507704436779022, 0.3056897222995758, 0.2663913369178772, 0.30029192566871643, 0.15227386355400085, -0.031001433730125427, 0.2008819878101349, 0.06328393518924713, -0.15036582946777344, 0.34025248885154724, 0.05518819019198418, 0.03242821991443634, -0.0022838711738586426, 0.18560712039470673, -0.042737096548080444, 0.2181183248758316, 0.5189478993415833, 0.31564703583717346, -0.14336460828781128, 0.041367944329977036, 0.09038382768630981, 0.30633002519607544, 0.6370579600334167, -0.11533280462026596, -0.24613985419273376, -0.150010347366333, -0.2567395865917206, -0.33820125460624695, 0.1849149763584137, 0.06961046159267426, -0.15741576254367828, 0.22477851808071136, -0.036093879491090775, 0.039834268391132355, -0.3172088861465454, 0.02308366447687149, 0.13035142421722412, -0.35079723596572876, -0.41472598910331726, -0.033718690276145935, 0.36727529764175415, -0.005799788981676102, -0.08184028416872025, -0.027213770896196365, -0.00035836920142173767, 0.20462900400161743, -0.20538698136806488, 0.019836001098155975, 0.3748924732208252, -0.15424734354019165, 0.07811712473630905, 0.042205169796943665, 0.22893822193145752, 0.06658829748630524, -0.16686321794986725, 0.293338805437088, 0.20444346964359283, 0.07791498303413391, 0.1505281627178192, -0.09313640743494034, 0.33057451248168945, 0.01930772326886654, -0.05178099125623703, -0.30458807945251465, 0.032263029366731644, -0.2811918258666992, -0.06723086535930634, -0.04329103231430054, 0.2063443511724472, -0.012773804366588593, -0.12223368138074875, 0.11668271571397781, 0.16615983843803406, -0.038994211703538895, -0.06709568202495575, 0.4534480571746826, -0.012904866598546505, 0.1439312994480133, 0.13906089961528778, -0.038218654692173004, 0.05204188823699951, 0.06951507180929184, -0.1431031972169876, 0.07826907932758331, 0.03306645527482033, -0.08219225704669952, 0.15082798898220062, -0.4102078676223755, -0.018483303487300873, 0.0512576624751091, 0.010026071220636368, 0.008827172219753265, -0.18231506645679474, -0.292877733707428, 0.29401054978370667, 0.29668647050857544, 0.22256502509117126, -0.18834510445594788, 0.23622484505176544, -0.5205643177032471, -0.23075973987579346, 0.15651246905326843, -0.15146365761756897, -0.324119508266449, -0.23678459227085114, 0.21172651648521423, -0.06208609417080879, 0.0014020800590515137, -0.551397979259491, 0.17495998740196228, -0.055913157761096954, -0.19523502886295319, -0.15286630392074585, 0.04991421476006508, -0.31013068556785583, -0.23218761384487152, 0.1991707682609558, 0.4168294668197632, -0.7215004563331604, 0.03982724994421005, 0.4300132989883423, -0.309945672750473, 0.01268838346004486, 0.23760035634040833, -0.040486134588718414, 0.0693967416882515, -0.061925262212753296, 0.13373036682605743, 0.1185355931520462, -0.22313199937343597, 0.07825427502393723, 0.4353090822696686, 0.022705763578414917, 0.07299555838108063, 0.1602988839149475, -0.25989004969596863, 0.09352856129407883, 0.1662178337574005, 0.06124979257583618, 0.35370564460754395, -0.11413684487342834, 0.2257125973701477, -0.043964684009552, -0.195442333817482, 0.3586166501045227, 0.17406824231147766, -0.17712213099002838, 0.09283022582530975, 0.11420765519142151, -0.4665728211402893, 0.20429521799087524, -0.2440336048603058, -0.036002710461616516, 0.041001878678798676, 0.2270025759935379, 0.39885789155960083, 0.13813301920890808, -0.3742867708206177, -0.5282294750213623, 0.04696203023195267, 0.28157374262809753, -0.020583845674991608, 0.0303226038813591, -0.23184476792812347, -0.3642183542251587, -0.021788187325000763, -0.09371806681156158, 0.18151329457759857, 0.20246319472789764, 0.0873919203877449, 0.10304489731788635, 0.13893930613994598, -0.24435856938362122, 0.10334095358848572, -0.1784888207912445, -0.051123641431331635, -0.22705984115600586, 0.06048036366701126, -0.006949732080101967, -0.10559603571891785, 0.15924911201000214, 0.06983628869056702, 0.0018514208495616913, -0.3071691691875458, -0.255962073802948, 0.3683246970176697, 0.16214396059513092, 0.1760077178478241, 0.06507997214794159, -0.13413970172405243, 0.008461999706923962, 0.2500876188278198, -0.3061564266681671, 0.04949098080396652, 0.38381293416023254, 0.003334924578666687, -0.4697475731372833, 0.46260976791381836, -0.4423273801803589, -0.004855260252952576, 0.10105979442596436, -0.03241698443889618, 0.47123584151268005, -0.02890118397772312, -0.015472624450922012, -0.18276312947273254, 0.02192319557070732, -0.04040432348847389, -0.11189228296279907, 0.09497390687465668, -0.45721638202667236, 0.0057165175676345825, 0.36648890376091003, -0.12914353609085083, -0.11659377068281174, 0.09227876365184784, 0.09343989193439484, 0.09933821111917496, 0.08924569189548492, -0.029177270829677582, 0.3911234140396118, 0.16372542083263397, -0.2835237383842468, -0.10562343150377274, 0.23841595649719238, -0.18228614330291748, 0.2876514494419098, -0.04114936292171478, 0.16922999918460846, 0.3575054109096527, -0.11718925833702087, 0.06573665887117386, -0.5286333560943604, 0.03655145689845085, -0.07440495491027832, 0.2568013370037079, -0.441441148519516, 0.06964095681905746, -0.36917370557785034, -0.19525310397148132, -0.043915655463933945, -0.07017723470926285, 0.07673810422420502, 0.009603042155504227, -0.12978705763816833, 0.206410750746727, -0.23277077078819275, -0.05934429168701172, 0.05825447663664818, 0.4001215696334839, 0.28275853395462036, -0.1843777298927307, -0.16765432059764862, -0.08205363899469376, -0.01363663375377655, 0.14331936836242676, 0.3714313507080078, 0.14046983420848846, 0.3486171066761017, -0.16823117434978485, 0.15474341809749603, -0.01810292713344097, -0.10456299781799316, 0.1007709950208664, -0.4223020672798157, 0.3074657917022705, 0.3005584180355072, 0.44396352767944336, -0.15196681022644043, -0.03536893054842949, 0.29928675293922424, -0.2624652087688446, -0.16419388353824615, -0.040867604315280914, 0.03625398129224777, -0.2906864881515503, -0.39718425273895264, -0.41220617294311523, -0.2717150151729584, -0.496092289686203, 0.4581800103187561, 0.1335417777299881, 0.17327460646629333, 0.14581383764743805, 0.10709024220705032, 0.10785353183746338, 0.05716417729854584, 0.16293305158615112, -0.2545822262763977, -0.3298701047897339, 0.2787494957447052, -0.48536866903305054, -0.484001487493515, 0.238604336977005, 0.24698670208454132, -0.07593944668769836, -0.2595798969268799, -0.13512694835662842, -0.16493597626686096, -0.06988801062107086, 0.0378849022090435, -0.12497951090335846, 0.1357036828994751, 0.12120015174150467, 0.032078247517347336, -0.13279671967029572, -0.16486500203609467, -0.10334603488445282, 0.04166319966316223, 0.03184470534324646, -0.2861059010028839, 0.33657270669937134, 0.524674654006958, -0.01482047326862812, 0.36794596910476685, 0.10358615219593048, 0.09391426295042038, 0.3520812392234802, -0.3189859986305237, 0.36757776141166687, -0.15499937534332275, -0.3717012107372284, 0.07208605855703354, -0.24528872966766357, 0.06787828356027603, 0.25632500648498535, -0.025639772415161133, 0.3180871605873108, -0.3670065402984619, -0.03951355442404747, -0.3217449486255646, -0.2264154702425003, 0.2752583920955658, 0.04296259954571724, 0.05255204439163208, -0.0932249128818512, -0.03440854698419571, -0.25131192803382874, 0.02084902487695217, -0.17328034341335297, 0.46194982528686523, 0.3624756932258606, 0.017427045851945877, -0.10470530390739441, 0.012197600677609444, -0.2787674069404602, 0.34767818450927734, 0.2091708928346634, 0.009527585469186306, -0.00266902893781662, -0.2513090968132019, 0.02727651596069336, 0.04471440985798836, 0.5333016514778137, 0.04187466949224472, 0.019786275923252106, -0.046791739761829376, -0.39462408423423767, -0.38243207335472107, 0.11932669579982758, -0.02735382877290249, 0.054476793855428696, -0.14326727390289307, 0.3911058306694031, -0.1715674102306366, -0.4111393094062805, 0.1622411161661148, 0.09179571270942688, -0.17655295133590698, -0.24128954112529755, -0.3367735743522644, -0.12375464290380478, -0.2648482024669647, -0.038545526564121246, 0.11989478021860123, 0.45120489597320557, -0.11054988950490952, -0.18108578026294708, -0.03281302750110626, -0.13484534621238708, 0.23573742806911469, 0.18580977618694305, 0.21626660227775574, 0.17763051390647888, -0.06589847803115845, 0.11908740550279617, 0.23055163025856018, 0.07817231118679047, 0.4869944453239441, -0.24144622683525085, -0.5870242118835449, -0.005395742133259773, -0.3025592863559723, 0.29200392961502075, 0.12212212383747101, -0.3771556615829468, 0.18416064977645874, 0.11059122532606125, 0.1518491804599762, -0.2692318856716156, -0.08744985610246658, 0.08894480019807816, 0.12354279309511185, 0.024906212463974953, -0.30053260922431946, 0.4054516851902008, -0.015444111078977585, 0.09311442077159882, 0.06703753769397736, 0.108171746134758, -0.2375120371580124, 0.28214383125305176, -0.07397022098302841, 0.5810136795043945, -0.22348986566066742, 0.10794546455144882, 0.33334487676620483, -0.04086671024560928, 0.23252998292446136, -0.11686430126428604, 0.01554962433874607, -0.1964666247367859, -0.2665727436542511, -0.20830214023590088, -0.0440620481967926, 0.27118438482284546, -0.06222263723611832, -0.2384098768234253, 0.028233012184500694, 0.061985597014427185, 0.7022933959960938, -0.11298112571239471, 0.24308526515960693, -0.0606173500418663, -0.3769413232803345, -0.4941096901893616, 0.16188634932041168, 0.031631115823984146, -0.0034875310957431793, 0.1642645001411438, -0.27417057752609253, 0.02150697633624077, 0.01169947162270546, -0.11097205430269241, -0.353150337934494, -0.1944683939218521, -0.01831144466996193, 0.20281541347503662, -0.34372085332870483, 0.08129149675369263, 0.3584314286708832, 0.001011185348033905, 0.029478849843144417, -0.2645297348499298, -0.14519843459129333, -0.15469548106193542, 0.04871412739157677, -0.4670015275478363, -0.07711797207593918, 0.353020578622818, 0.024796269834041595, -0.04432319849729538, 0.15501999855041504, -0.08615075051784515, -0.26365411281585693, 0.09276735782623291, 0.2020684778690338, -0.20120872557163239, -0.5314792990684509, -0.3391783833503723, -0.39492157101631165, -0.023270171135663986, -0.10290946066379547, 0.1913929581642151, -0.001247599720954895, -0.039880137890577316, 0.0019450634717941284, 0.09435583651065826, -0.1807083934545517, -0.06317885220050812, 0.17962515354156494, -0.02554173395037651, 0.1558452844619751, 0.1528128683567047, 0.3071870505809784, -0.31676435470581055, -0.20452606678009033, 0.2546733319759369, 0.1627342402935028, -0.060869552195072174, 0.49273255467414856, 0.39056023955345154, 0.1035667359828949, 0.020979367196559906, 0.5692375898361206, 0.10589228570461273, -0.047073811292648315, -0.036244072020053864, -0.47849076986312866, -0.21284234523773193, 0.06286194920539856, -0.002410639077425003, 0.24105049669742584, 0.41289082169532776, 0.20501308143138885, 0.07565563917160034, 0.121547169983387, -0.39676570892333984, 0.11177482455968857, -0.12458721548318863, 0.09151093661785126, 0.4862649440765381, 0.07507076859474182, 0.12551622092723846, -0.19849419593811035, 0.17715124785900116, 0.1431523561477661, -0.0994252860546112, -0.3006342649459839, -0.219984769821167, 0.09684211760759354, 0.08132141828536987, 0.1025053933262825, -0.16119740903377533, -0.1954638659954071, -0.4039694368839264, -0.22615809738636017, 0.23699548840522766, 0.06075461953878403, -0.21221424639225006, 0.2337106168270111, -0.14258435368537903, -0.17903846502304077, -0.018262676894664764, 0.1891787350177765, -0.10625334084033966, 0.4137006998062134, -0.15918156504631042, -0.040900520980358124, -0.3146268427371979, 0.002495303750038147, -0.01705661416053772, 0.28852516412734985, 0.20818158984184265, -0.031398214399814606, 0.2694382667541504, -0.1225706934928894, -0.09959332644939423, 0.21504519879817963, 0.3755563497543335, 0.24217985570430756, -0.15689222514629364, 0.3714854419231415, 0.12740358710289001, 0.19762364029884338, -0.30866527557373047, 0.027595480903983116, -0.004334691911935806, -0.11744921654462814, 0.23713043332099915, 0.17754390835762024, 0.028240706771612167, 0.0351194366812706, 0.20769678056240082, 0.035420000553131104, 0.21592627465724945, -0.08856095373630524, -0.052125051617622375, 0.3122863471508026, -0.08764618635177612, 0.16308937966823578, 0.21816951036453247, 0.24426192045211792, 0.04547150060534477, 0.42041850090026855, -0.0420793816447258, -0.17484323680400848, -0.37662777304649353, 0.2707679271697998, -0.24408474564552307, -0.6376001238822937, 0.08999316394329071, 0.054363980889320374, -0.4727272391319275, 0.029891856014728546, 0.10024717450141907, 0.7690449357032776, -0.31429609656333923, -0.058320291340351105, -0.23633624613285065, 0.2119707316160202, -0.16442200541496277, -0.1276082694530487, -0.10890471190214157, -0.022016428411006927, -0.14724692702293396, 0.17998050153255463, 0.10904568433761597, 0.05759888142347336, 0.12441542744636536, 0.08637090772390366, 0.2701237201690674, -0.11105914413928986, 0.10568657517433167, -0.12746873497962952, 0.06520406901836395, -0.16511653363704681, -0.013444742187857628, -0.050259560346603394, 0.1528305560350418, -0.046675924211740494, 0.05222383886575699, 0.24891221523284912, 0.249378502368927, 0.009552561677992344, -0.06176782771945, -0.3651803135871887, -0.141373872756958, 0.043628424406051636, 0.28034600615501404, 0.043889742344617844, 0.09380665421485901, 0.42265385389328003, 0.2315438985824585, -0.12727586925029755, 0.2092861384153366, -0.01840154454112053, 0.07374930381774902, -0.37759676575660706, 0.021855294704437256, 0.12131006270647049, 0.0457468181848526, -0.22266241908073425, -0.1280718445777893, -0.21380522847175598, 0.024423401802778244, 0.1522558331489563, 0.142715185880661, 0.3627357482910156, -0.15525873005390167, 0.1308566778898239, 0.2114662081003189, 0.449201375246048, -0.04196077212691307, 0.2692393362522125, -0.19343116879463196, 0.030071228742599487, -0.5019642114639282, -0.09011732786893845, 0.26000335812568665, 0.024828029796481133, 0.07257747650146484, 0.06087685376405716, 0.40076500177383423, 0.1739497035741806, -0.017377018928527832, -0.0057722097262740135, 0.10862129926681519, 0.05140456557273865, -0.0036715716123580933, -0.13521207869052887, -0.3010813593864441, -0.11569598317146301, -0.07499603927135468, -0.25701332092285156, 0.25163689255714417, -0.09129752218723297, 0.09916044026613235, -0.3263806700706482, 0.23926937580108643, -0.11239241063594818, -0.15058988332748413, 0.3281620740890503, -0.06558443605899811, 0.13970144093036652, -0.35929614305496216, 0.29161185026168823, 0.09390684962272644, -0.0975545346736908, -0.2696056663990021, 0.30459064245224, 0.14443674683570862, 0.11110199987888336, -0.41612109541893005, -0.16303673386573792, -0.2879602909088135, 0.1639641672372818, -0.026373712345957756, 0.15082937479019165, -0.04992789030075073, 0.04629430174827576, -0.17388606071472168, -0.273392915725708, 0.25512218475341797, 0.14919480681419373, -0.2528834044933319, 0.108832448720932, -0.1408030390739441, -0.21933314204216003, 0.4176536202430725, -0.14180497825145721, -0.33951032161712646, 0.07666899263858795, -0.020290642976760864, 0.20145511627197266, -0.014292987063527107, -0.32482680678367615, 0.16888055205345154, 0.1874067485332489, 0.10920699685811996, -0.24398009479045868, 0.35982969403266907, -0.023239124566316605, -0.005186647176742554, -0.2525596618652344, 0.20655882358551025, 0.30711543560028076, -0.05966451019048691, -0.18471577763557434, -0.330593466758728 ]
https://github.com/huggingface/datasets/issues/6689
.load_dataset() method defaults to zstandard
The dataset is made of JSON files compressed using zstandard, as you can see here: https://huggingface.co/datasets/cerebras/SlimPajama-627B/tree/main/test/chunk1 That's why it asks for zstandard to be installed. Though I'm intrigued that you manage to load the dataset without zstandard installed. Maybe `pyarrow` that we use to load JSON data under the hood got support for zstandard at one point.
### Describe the bug Regardless of what method I use, datasets defaults to zstandard for unpacking my datasets. This is poor behavior, because not only is zstandard not a dependency in the huggingface package (and therefore, your dataset loading will be interrupted while it asks you to install the package), but it happens on datasets that are uploaded in json format too, meaning the dataset loader will attempt to convert the data to a zstandard compatible format, and THEN try to unpackage it. My 4tb drive runs out of room when using zstandard on slimpajama. It loads fine on 1.5tb when using json, however I lack the understanding of the "magic numbers" system used to select the unpackaging algorithm, so I can't push a change myself. Commenting out this line, in "/datasets/utils/extract.py" fixes the issue, and causes SlimPajama to properly extract using rational amounts of storage, however it completely disables zstandard, which is probably undesirable behavior. Someone with an understanding of the "magic numbers" system should probably take a pass over this issue. ``` class Extractor: # Put zip file to the last, b/c it is possible wrongly detected as zip (I guess it means: as tar or gzip) extractors: Dict[str, Type[BaseExtractor]] = { "tar": TarExtractor, "gzip": GzipExtractor, "zip": ZipExtractor, "xz": XzExtractor, #"zstd": ZstdExtractor, # This line needs to go, in order for datasets to work w/o non-dependent packages "rar": RarExtractor, "bz2": Bzip2Extractor, "7z": SevenZipExtractor, # <Added version="2.4.0"/> "lz4": Lz4Extractor, # <Added version="2.4.0"/> } ``` ### Steps to reproduce the bug ''' from datasaets import load_dataset load_dataset(path="/cerebras/SlimPajama-627B") ''' This alone should trigger the error on any system that does not have zstandard pip installed. ### Expected behavior This repository (which is encoded in json format, not zstandard) should check whether zstandard is installed before defaulting to it. Additionally, using zstandard should not use more than 3x the required space that other extraction mechanisms use. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.0 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
57
.load_dataset() method defaults to zstandard ### Describe the bug Regardless of what method I use, datasets defaults to zstandard for unpacking my datasets. This is poor behavior, because not only is zstandard not a dependency in the huggingface package (and therefore, your dataset loading will be interrupted while it asks you to install the package), but it happens on datasets that are uploaded in json format too, meaning the dataset loader will attempt to convert the data to a zstandard compatible format, and THEN try to unpackage it. My 4tb drive runs out of room when using zstandard on slimpajama. It loads fine on 1.5tb when using json, however I lack the understanding of the "magic numbers" system used to select the unpackaging algorithm, so I can't push a change myself. Commenting out this line, in "/datasets/utils/extract.py" fixes the issue, and causes SlimPajama to properly extract using rational amounts of storage, however it completely disables zstandard, which is probably undesirable behavior. Someone with an understanding of the "magic numbers" system should probably take a pass over this issue. ``` class Extractor: # Put zip file to the last, b/c it is possible wrongly detected as zip (I guess it means: as tar or gzip) extractors: Dict[str, Type[BaseExtractor]] = { "tar": TarExtractor, "gzip": GzipExtractor, "zip": ZipExtractor, "xz": XzExtractor, #"zstd": ZstdExtractor, # This line needs to go, in order for datasets to work w/o non-dependent packages "rar": RarExtractor, "bz2": Bzip2Extractor, "7z": SevenZipExtractor, # <Added version="2.4.0"/> "lz4": Lz4Extractor, # <Added version="2.4.0"/> } ``` ### Steps to reproduce the bug ''' from datasaets import load_dataset load_dataset(path="/cerebras/SlimPajama-627B") ''' This alone should trigger the error on any system that does not have zstandard pip installed. ### Expected behavior This repository (which is encoded in json format, not zstandard) should check whether zstandard is installed before defaulting to it. Additionally, using zstandard should not use more than 3x the required space that other extraction mechanisms use. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.0 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 The dataset is made of JSON files compressed using zstandard, as you can see here: https://huggingface.co/datasets/cerebras/SlimPajama-627B/tree/main/test/chunk1 That's why it asks for zstandard to be installed. Though I'm intrigued that you manage to load the dataset without zstandard installed. Maybe `pyarrow` that we use to load JSON data under the hood got support for zstandard at one point.
[ -0.00927412137389183, -0.238714337348938, 0.07676541805267334, 0.37975311279296875, 0.293429434299469, 0.010293431580066681, 0.13272809982299805, 0.09687069058418274, 0.36530211567878723, 0.055215366184711456, -0.17164713144302368, 0.2841671407222748, 0.24697230756282806, 0.3039837181568146, -0.16526807844638824, 0.19476433098316193, -0.039628706872463226, 0.2516951858997345, -0.29136526584625244, -0.0009005963802337646, -0.3696920871734619, 0.4007805585861206, -0.10493332147598267, -0.14959880709648132, -0.06487308442592621, 0.21443596482276917, 0.11899861693382263, -0.056634895503520966, -0.3743167519569397, -0.45716583728790283, 0.6119557619094849, 0.06449080258607864, 0.29453304409980774, 0.30191323161125183, -0.00011740114860003814, -0.07850109040737152, 0.334140419960022, -0.16491495072841644, -0.12334677577018738, -0.09227174520492554, -0.006934080272912979, -0.61709064245224, 0.10529573261737823, -0.11792775988578796, -0.22739681601524353, -0.3880135715007782, -0.1600925177335739, -0.3545672595500946, 0.28697532415390015, 0.01515538152307272, 0.16928407549858093, 0.12058611214160919, 0.1270267367362976, -0.2586671710014343, 0.13969190418720245, -0.29773104190826416, -0.2253039926290512, 0.1763077825307846, 0.20616182684898376, 0.01387113332748413, 0.07290543615818024, 0.15078547596931458, -0.021698234602808952, -0.006556382402777672, 0.4188924729824066, 0.053048644214868546, 0.31753724813461304, -0.24654826521873474, 0.11357977241277695, 0.38816356658935547, 0.6695162653923035, -0.28857916593551636, -0.3611230254173279, -0.41569188237190247, 0.053657516837120056, 0.1759394407272339, 0.33259129524230957, 0.1848868876695633, -0.015776824206113815, 0.31193938851356506, 0.000319703365676105, -0.02477213367819786, 0.07350271940231323, 0.019109345972537994, -0.17364270985126495, -0.032264553010463715, -0.28006815910339355, 0.02450965717434883, 0.4883538782596588, -0.03669271618127823, 0.141366645693779, -0.332271546125412, -0.0343836285173893, -0.014135821722447872, -0.36087411642074585, 0.0485970601439476, 0.19161899387836456, 0.11969748139381409, 0.37948352098464966, 0.13723236322402954, 0.02210024558007717, 0.07784806191921234, -0.049749646335840225, -0.048113636672496796, 0.46230602264404297, 0.2860603332519531, 0.17998534440994263, -0.37696486711502075, 0.03194195032119751, 0.3770427405834198, 0.4384738504886627, -0.1011727824807167, 0.20964570343494415, 0.0249679833650589, 0.007046345621347427, -0.29960742592811584, 0.2615804672241211, -0.4019725024700165, -0.10938721150159836, -0.13222545385360718, 0.0740431621670723, 0.0536607950925827, -0.09640805423259735, 0.2550646960735321, 0.025587297976017, 0.5761657953262329, -0.13832807540893555, 0.350793719291687, -0.232219398021698, -0.1379956156015396, -0.14363715052604675, -0.11229577660560608, -0.11578890681266785, -0.06970658153295517, 0.21253399550914764, -0.25405532121658325, 0.018602279946208, 0.21741533279418945, -0.18949763476848602, 0.07857818901538849, 0.03704511374235153, -0.1965731531381607, -0.07168500870466232, 0.3354319930076599, -0.03980980068445206, 0.21765631437301636, 0.019240448251366615, -0.0567605160176754, -0.23566877841949463, 0.10287383198738098, -0.2295112907886505, -0.22459323704242706, 0.08371121436357498, 0.16092920303344727, -0.29923349618911743, 0.15083453059196472, -0.1849505603313446, -0.10984638333320618, -0.12763097882270813, -0.05843466520309448, -0.09390310198068619, -0.1841740757226944, -0.015204861760139465, -0.1854468286037445, 0.16266311705112457, 0.4021339416503906, -0.5519447922706604, 0.013267256319522858, -0.44864603877067566, -0.4167840778827667, 0.200166255235672, 0.12901172041893005, -0.14052045345306396, 0.1854872852563858, -0.45630770921707153, 0.1974310427904129, 0.03374185413122177, -0.17508956789970398, -0.698651134967804, 0.1194373369216919, -0.08756083250045776, 0.5383012294769287, 0.13947471976280212, 0.11282946914434433, 0.0385720357298851, 0.12387970834970474, 0.007041566073894501, 0.5026693940162659, 0.09828179329633713, -0.032629914581775665, -0.20735757052898407, -0.3494388163089752, 0.06950622797012329, 0.17859798669815063, -0.17771625518798828, 0.24820944666862488, -0.1007332131266594, -0.127509206533432, 0.18935327231884003, 0.0060273222625255585, 0.029924826696515083, 0.2233189046382904, 0.3028424084186554, -0.07208539545536041, -0.09841001778841019, -0.03552455082535744, -0.5316970348358154, 0.3843922019004822, 0.06522702425718307, 0.05050961300730705, -0.11930963397026062, -0.06783021986484528, -0.20216181874275208, -0.08183280378580093, -0.35221219062805176, -0.1322038173675537, 0.04734230041503906, 0.21418270468711853, 0.12783008813858032, -0.055602289736270905, -0.07026571035385132, 0.5128251314163208, 0.22478990256786346, 0.3931405544281006, -0.4571021795272827, 0.20324091613292694, 0.1462899148464203, -0.07679509371519089, 0.15000663697719574, -0.035767026245594025, -0.044504135847091675, -0.4477333128452301, -0.07796259224414825, 0.4188111126422882, 0.3205575942993164, 0.04486782103776932, -0.20512723922729492, 0.057789146900177, -0.055505551397800446, 0.06209341809153557, 0.038923025131225586, 0.3426053822040558, 0.055749185383319855, 0.07870040088891983, -0.20127448439598083, 0.46183353662490845, -0.0007037222385406494, 0.09934373944997787, -0.13077306747436523, -0.05933007597923279, 0.4097493290901184, -0.014419898390769958, -0.04694958031177521, -0.22616583108901978, -0.12538886070251465, 0.22324195504188538, 0.42064812779426575, 0.2872278690338135, 0.1286897361278534, -0.10063823312520981, 0.3811967372894287, -0.14793618023395538, 0.08373507112264633, 0.2142084836959839, -0.022433921694755554, -0.15716972947120667, 0.3236820697784424, 0.5052473545074463, 0.577474057674408, 0.21990929543972015, -0.010328810662031174, -0.09452588111162186, 0.07827750593423843, -0.1446329951286316, 0.13716137409210205, -0.06508614122867584, 0.16658265888690948, 0.25840598344802856, 0.09603600203990936, -0.1332583874464035, -0.5035442113876343, 0.22523492574691772, -0.2251773327589035, 0.044711410999298096, -0.15051162242889404, -0.1078869178891182, -0.24944867193698883, -0.19127482175827026, -0.1276363581418991, 0.23532944917678833, -0.27600666880607605, -0.30681878328323364, -0.08485443890094757, 0.19193431735038757, 0.03786685690283775, 0.10329803079366684, -0.11685656011104584, 0.4836351275444031, -0.10264114290475845, -0.13602235913276672, -0.28189679980278015, 0.2278432697057724, -0.299207866191864, -0.026881098747253418, 0.0036295000463724136, -0.23449452221393585, -0.03432077914476395, -0.19847039878368378, 0.05345524102449417, -0.17974725365638733, -0.06826194375753403, 0.2450915277004242, -0.027148932218551636, 0.20177042484283447, 0.27056923508644104, 0.3188241124153137, 0.3943341374397278, 0.31498822569847107, 0.22844797372817993, -0.08145752549171448, -0.10938125848770142, 0.30829086899757385, -0.07432133704423904, 0.18268507719039917, -0.27935153245925903, -0.38778892159461975, -0.22206532955169678, -0.38233402371406555, 0.24637144804000854, -0.021989507600665092, -0.14218001067638397, 0.07895859330892563, 0.10673318058252335, -0.15553118288516998, -0.20304715633392334, 0.2702057957649231, -0.15658101439476013, -0.5711824297904968, 0.3556777238845825, 0.2522103488445282, -0.3353072702884674, -0.053277648985385895, 0.006843678653240204, -0.1796979010105133, 0.011388428509235382, -0.4347448945045471, -0.3675418794155121, -0.42143699526786804, 0.11904066801071167, -0.14489126205444336, 0.187285378575325, 0.3666231036186218, 0.0791485533118248, 0.04266299307346344, -0.011927776038646698, -0.370746910572052, 0.1074027419090271, 0.010057197883725166, 0.2330157458782196, 0.07019627839326859, 0.3534974753856659, 0.15860572457313538, -0.08332516252994537, 0.05705561861395836, 0.13989220559597015, 0.5528240203857422, 0.13899213075637817, 0.536247193813324, -0.30597975850105286, -0.09598781168460846, -0.0547773540019989, -0.04110364615917206, 0.13045410811901093, 0.16436231136322021, 0.09798011183738708, 0.09649497270584106, -0.01682174578309059, 0.07655501365661621, -0.186606764793396, -0.07169024646282196, 0.08007296919822693, 0.23839613795280457, -0.15357834100723267, 0.019172262400388718, 0.19695836305618286, -0.06735777854919434, 0.0552147701382637, 0.030925139784812927, 0.20430147647857666, 0.03619111329317093, 0.171622633934021, -0.5109707713127136, 0.48573604226112366, -0.177656888961792, 0.2823401689529419, -0.33598172664642334, 0.35251960158348083, 0.15851682424545288, -0.1867070496082306, 0.10908512026071548, -0.19018058478832245, 0.916316032409668, 0.037738267332315445, 0.00913463905453682, 0.05107663944363594, -0.11469410359859467, -0.5126952528953552, -0.16428609192371368, -0.1740652173757553, 0.016138702630996704, 0.07394644618034363, 0.32851526141166687, -0.4618125557899475, -0.3003457188606262, -0.17500421404838562, 0.4343310594558716, -0.09148132801055908, -0.16579604148864746, -0.15110361576080322, -0.23298946022987366, -0.1699928343296051, -0.04868084937334061, -0.18206721544265747, 0.32314926385879517, 0.10289666056632996, -0.033836230635643005, 0.006641079671680927, -0.5302978157997131, -0.003138631582260132, 0.14611202478408813, 0.36611321568489075, -0.32715678215026855, 0.18965975940227509, 0.1033785343170166, 0.10804413259029388, 0.21045087277889252, 0.4778902232646942, -0.1846359670162201, -0.47080498933792114, -0.10677210241556168, 0.13189446926116943, 0.0646718218922615, 0.2756086587905884, -0.12625667452812195, -0.012180604040622711, -0.454426109790802, 0.17351585626602173, -0.27757883071899414, -0.03459813445806503, 0.4584757089614868, -0.08344965428113937, 0.04588809236884117, -0.2817135453224182, 0.41570475697517395, -0.024519596248865128, -0.09397213160991669, -0.08425235748291016, 0.26743119955062866, -0.3145197033882141, 0.24184180796146393, -0.10794612020254135, 0.9811471700668335, -0.1005239486694336, 0.08143799006938934, 0.14022889733314514, -0.176629438996315, 0.5021606087684631, -0.39805471897125244, -0.010212099179625511, -0.2040315419435501, -0.2729198634624481, -0.0519104041159153, -0.15559007227420807, 0.3331535756587982, 0.09784705936908722, 0.07162337005138397, 0.458293616771698, -0.2460276037454605, 0.020608877763152122, 0.07772384583950043, 0.21675053238868713, -0.5078015923500061, -0.3632584512233734, -0.5494226217269897, 0.1452837884426117, -0.015192657709121704, 0.15397994220256805, -0.0902828574180603, -0.11066283285617828, 0.18857122957706451, -0.15044617652893066, 0.2007945030927658, 0.2910812497138977, 0.060889024287462234, -0.007899889722466469, 0.3445301055908203, -0.09149924665689468, -0.08983255922794342, 0.25010013580322266, -0.0017564818263053894, 0.1325261890888214, -0.2550082802772522, -0.07058608531951904, -0.2958296537399292, 0.18491467833518982, 0.06788412481546402, 0.02951253578066826, 0.2661348283290863, -0.003934066742658615, -0.141544908285141, -0.2784859240055084, -0.08426753431558609, -0.12444263696670532, 0.14247336983680725, -0.07989512383937836, 0.2827529311180115, -0.3236497640609741, -0.5475049018859863, -0.110205739736557, 0.33884695172309875, -0.19872412085533142, 0.11019206047058105, 0.2041763812303543, -0.1849653124809265, 0.2951849699020386, -0.2755616009235382, -0.23104390501976013, -0.2769055962562561, 0.5096301436424255, -0.08703666180372238, 0.36337390542030334, 0.1522657722234726, -0.04161366820335388, -0.09174448251724243, -0.1499307006597519, 0.10368996113538742, 0.47018760442733765, -0.11402954161167145, 0.07652303576469421, -0.07181331515312195, -0.3365926146507263, -0.11787582188844681, 0.26798588037490845, 0.40171271562576294, -0.4996476173400879, -0.1705424040555954, -0.44275322556495667, -0.0739964097738266, 0.1956285834312439, 0.19926635921001434, 0.1890459656715393, 0.02111063525080681, 0.07815159112215042, -0.04322241246700287, -0.15173214673995972, -0.2737317383289337, 0.3569311201572418, 0.0050082821398973465, -0.02578633651137352, 0.12889117002487183, -0.016865678131580353, 0.04768071696162224, -0.2130974382162094, 0.12015567719936371, 0.11076517403125763, -0.3270908296108246, -0.18725651502609253, -0.03892283886671066, 0.14533255994319916, 0.05337082967162132, -0.10425108671188354, 0.04961163178086281, -0.18550406396389008, -0.1111031174659729, -0.32388734817504883, 0.15812155604362488, -0.017367124557495117, -0.029123157262802124, 0.06624694913625717, 0.1229543685913086, 0.04660477489233017, -0.3565278649330139, 0.18318691849708557, -0.15576310455799103, -0.07379448413848877, 0.17792150378227234, 0.11206496506929398, -0.20404930412769318, 0.018268145620822906, -0.22697009146213531, 0.23356080055236816, 0.2274317890405655, 0.23492255806922913, 0.2540241777896881, -0.0924225002527237, 0.23220524191856384, 0.27925989031791687, 0.4659283757209778, 0.3074878454208374, -0.16511395573616028, -0.1471979320049286, 0.03936173766851425, 0.19661404192447662, -0.24825167655944824, -0.4771941602230072, 0.25278711318969727, 0.13301430642604828, -0.06386179476976395, 0.38640332221984863, 0.1568114161491394, 0.1598452776670456, -0.10500481724739075, -0.03379596397280693, 0.5825847387313843, 0.39627063274383545, 0.22910653054714203, 0.35250723361968994, -0.12248404324054718, 0.060328446328639984, 0.2774227261543274, 0.004304798319935799, 0.18200412392616272, 0.6720494031906128, -0.14181992411613464, 0.42437031865119934, -0.29176828265190125, 0.11267246305942535, -0.25880223512649536, -0.6851781010627747, 0.3771825432777405, 0.5212258100509644, 0.05799942463636398, -0.055545151233673096, 0.04978443309664726, 0.2872534990310669, -0.43465593457221985, -0.34697502851486206, -0.439966082572937, -0.005913831293582916, -0.10683070868253708, -0.12742069363594055, 0.29395803809165955, -0.16010433435440063, 0.043574534356594086, 0.16462862491607666, -0.19968688488006592, -0.2582131028175354, 0.297512948513031, -0.07050219178199768, -0.03350405395030975, -0.20388029515743256, -0.240522563457489, -0.03630833327770233, 0.13000524044036865, -0.209392711520195, 0.19786281883716583, 0.011533573269844055, -0.004930213093757629, -0.12110231816768646, 0.15842659771442413, 0.19284126162528992, 0.16760024428367615, 0.086942657828331, -0.12472609430551529, -0.0170501247048378, -0.02317664586007595, -0.2455374002456665, 0.06718045473098755, -0.08448217809200287, 0.19592435657978058, 0.16611787676811218, 0.2077966183423996, -0.19279280304908752, -0.05756647512316704, 0.031084027141332626, 0.10724146664142609, -0.5011615753173828, 0.28908270597457886, -0.014424115419387817, -0.16535788774490356, -0.0407295897603035, 0.028034768998622894, -0.14104251563549042, -0.12325167655944824, 0.08996489644050598, -0.036522556096315384, 0.12413094192743301, -0.054701924324035645, 0.08822612464427948, -0.04569230601191521, 0.12277859449386597, 0.008072704076766968, -0.42236846685409546, -0.19160529971122742, -0.08520767837762833, -0.6490575671195984, 0.01859886199235916, -0.13256655633449554, -0.06301496177911758, 0.09935346245765686, 0.0062088072299957275, 0.26023951172828674, 0.18022684752941132, -0.14819104969501495, 0.3065405786037445, 0.1062372624874115, -0.17205023765563965, -0.263325959444046, -0.17387284338474274, 0.13142132759094238, 0.028697991743683815, -0.07693697512149811, -0.5198488831520081, 0.18235358595848083, -0.2783981263637543, 0.0698428824543953, 0.2393399327993393, 0.31301066279411316, -0.0465473048388958, -0.3366788625717163, 0.3815617263317108, 0.2131800502538681, 0.0983089953660965, -0.021781781688332558, -0.21880434453487396, -0.1456144154071808, -0.0714055746793747, -0.10564178973436356, 0.14660775661468506, -0.17373129725456238, 0.3931136727333069, -0.23005877435207367, 0.27623918652534485, -0.42119723558425903, 0.22823716700077057, 0.11054100096225739, 0.19088612496852875, -0.413997083902359, 0.37844929099082947, -0.13944751024246216, -0.0009784605354070663, 0.2572367787361145, 0.3429029583930969, -0.08913502097129822, 0.12333500385284424, -0.2003956437110901, -0.14328892529010773, 0.33908772468566895, 0.08080582320690155, -0.17896059155464172, 0.0975317433476448, 0.21635887026786804, 0.04535646364092827, -0.34944695234298706, -0.15646186470985413, 0.261578232049942, 0.15615494549274445, -0.21756449341773987, -0.3663938343524933, 0.303420752286911, -0.0658881664276123, -0.16584357619285583, -0.07255974411964417, 0.32273566722869873, 0.22066396474838257, -0.2855585515499115, 0.20430798828601837, -0.04104623198509216 ]
https://github.com/huggingface/datasets/issues/6689
.load_dataset() method defaults to zstandard
> The dataset is made of JSON files compressed using zstandard, as you can see here: https://huggingface.co/datasets/cerebras/SlimPajama-627B/tree/main/test/chunk1 > > That's why it asks for zstandard to be installed. > > Though I'm intrigued that you manage to load the dataset without zstandard installed. Maybe `pyarrow` that we use to load JSON data under the hood got support for zstandard at one point. Question, then. When I loaded this dataset back in October, it downloaded all the files, and then loaded into memory just fine. NOW, it has to sit there and unpack all these zstd files (3.6TB worth). Further, when they're in my harddrive, they're regular json files. It's only when looking at the LFS, or when the loading script runs, that I get asked to install zstd. My question is, **is this normal?** As far as I can tell, there's no reason the dataset or the loading methods should have changed between then and now. Was my old behavior flawed, and the new behavior correct? I mean, I got it working eventually, but it was pulling teeth, and it still doesn't load right, as I had to unpack each chunk separately, so there's no clean mapping between the chunks and the broader dataset.
### Describe the bug Regardless of what method I use, datasets defaults to zstandard for unpacking my datasets. This is poor behavior, because not only is zstandard not a dependency in the huggingface package (and therefore, your dataset loading will be interrupted while it asks you to install the package), but it happens on datasets that are uploaded in json format too, meaning the dataset loader will attempt to convert the data to a zstandard compatible format, and THEN try to unpackage it. My 4tb drive runs out of room when using zstandard on slimpajama. It loads fine on 1.5tb when using json, however I lack the understanding of the "magic numbers" system used to select the unpackaging algorithm, so I can't push a change myself. Commenting out this line, in "/datasets/utils/extract.py" fixes the issue, and causes SlimPajama to properly extract using rational amounts of storage, however it completely disables zstandard, which is probably undesirable behavior. Someone with an understanding of the "magic numbers" system should probably take a pass over this issue. ``` class Extractor: # Put zip file to the last, b/c it is possible wrongly detected as zip (I guess it means: as tar or gzip) extractors: Dict[str, Type[BaseExtractor]] = { "tar": TarExtractor, "gzip": GzipExtractor, "zip": ZipExtractor, "xz": XzExtractor, #"zstd": ZstdExtractor, # This line needs to go, in order for datasets to work w/o non-dependent packages "rar": RarExtractor, "bz2": Bzip2Extractor, "7z": SevenZipExtractor, # <Added version="2.4.0"/> "lz4": Lz4Extractor, # <Added version="2.4.0"/> } ``` ### Steps to reproduce the bug ''' from datasaets import load_dataset load_dataset(path="/cerebras/SlimPajama-627B") ''' This alone should trigger the error on any system that does not have zstandard pip installed. ### Expected behavior This repository (which is encoded in json format, not zstandard) should check whether zstandard is installed before defaulting to it. Additionally, using zstandard should not use more than 3x the required space that other extraction mechanisms use. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.0 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
204
.load_dataset() method defaults to zstandard ### Describe the bug Regardless of what method I use, datasets defaults to zstandard for unpacking my datasets. This is poor behavior, because not only is zstandard not a dependency in the huggingface package (and therefore, your dataset loading will be interrupted while it asks you to install the package), but it happens on datasets that are uploaded in json format too, meaning the dataset loader will attempt to convert the data to a zstandard compatible format, and THEN try to unpackage it. My 4tb drive runs out of room when using zstandard on slimpajama. It loads fine on 1.5tb when using json, however I lack the understanding of the "magic numbers" system used to select the unpackaging algorithm, so I can't push a change myself. Commenting out this line, in "/datasets/utils/extract.py" fixes the issue, and causes SlimPajama to properly extract using rational amounts of storage, however it completely disables zstandard, which is probably undesirable behavior. Someone with an understanding of the "magic numbers" system should probably take a pass over this issue. ``` class Extractor: # Put zip file to the last, b/c it is possible wrongly detected as zip (I guess it means: as tar or gzip) extractors: Dict[str, Type[BaseExtractor]] = { "tar": TarExtractor, "gzip": GzipExtractor, "zip": ZipExtractor, "xz": XzExtractor, #"zstd": ZstdExtractor, # This line needs to go, in order for datasets to work w/o non-dependent packages "rar": RarExtractor, "bz2": Bzip2Extractor, "7z": SevenZipExtractor, # <Added version="2.4.0"/> "lz4": Lz4Extractor, # <Added version="2.4.0"/> } ``` ### Steps to reproduce the bug ''' from datasaets import load_dataset load_dataset(path="/cerebras/SlimPajama-627B") ''' This alone should trigger the error on any system that does not have zstandard pip installed. ### Expected behavior This repository (which is encoded in json format, not zstandard) should check whether zstandard is installed before defaulting to it. Additionally, using zstandard should not use more than 3x the required space that other extraction mechanisms use. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.0 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 > The dataset is made of JSON files compressed using zstandard, as you can see here: https://huggingface.co/datasets/cerebras/SlimPajama-627B/tree/main/test/chunk1 > > That's why it asks for zstandard to be installed. > > Though I'm intrigued that you manage to load the dataset without zstandard installed. Maybe `pyarrow` that we use to load JSON data under the hood got support for zstandard at one point. Question, then. When I loaded this dataset back in October, it downloaded all the files, and then loaded into memory just fine. NOW, it has to sit there and unpack all these zstd files (3.6TB worth). Further, when they're in my harddrive, they're regular json files. It's only when looking at the LFS, or when the loading script runs, that I get asked to install zstd. My question is, **is this normal?** As far as I can tell, there's no reason the dataset or the loading methods should have changed between then and now. Was my old behavior flawed, and the new behavior correct? I mean, I got it working eventually, but it was pulling teeth, and it still doesn't load right, as I had to unpack each chunk separately, so there's no clean mapping between the chunks and the broader dataset.
[ -0.00927412137389183, -0.238714337348938, 0.07676541805267334, 0.37975311279296875, 0.293429434299469, 0.010293431580066681, 0.13272809982299805, 0.09687069058418274, 0.36530211567878723, 0.055215366184711456, -0.17164713144302368, 0.2841671407222748, 0.24697230756282806, 0.3039837181568146, -0.16526807844638824, 0.19476433098316193, -0.039628706872463226, 0.2516951858997345, -0.29136526584625244, -0.0009005963802337646, -0.3696920871734619, 0.4007805585861206, -0.10493332147598267, -0.14959880709648132, -0.06487308442592621, 0.21443596482276917, 0.11899861693382263, -0.056634895503520966, -0.3743167519569397, -0.45716583728790283, 0.6119557619094849, 0.06449080258607864, 0.29453304409980774, 0.30191323161125183, -0.00011740114860003814, -0.07850109040737152, 0.334140419960022, -0.16491495072841644, -0.12334677577018738, -0.09227174520492554, -0.006934080272912979, -0.61709064245224, 0.10529573261737823, -0.11792775988578796, -0.22739681601524353, -0.3880135715007782, -0.1600925177335739, -0.3545672595500946, 0.28697532415390015, 0.01515538152307272, 0.16928407549858093, 0.12058611214160919, 0.1270267367362976, -0.2586671710014343, 0.13969190418720245, -0.29773104190826416, -0.2253039926290512, 0.1763077825307846, 0.20616182684898376, 0.01387113332748413, 0.07290543615818024, 0.15078547596931458, -0.021698234602808952, -0.006556382402777672, 0.4188924729824066, 0.053048644214868546, 0.31753724813461304, -0.24654826521873474, 0.11357977241277695, 0.38816356658935547, 0.6695162653923035, -0.28857916593551636, -0.3611230254173279, -0.41569188237190247, 0.053657516837120056, 0.1759394407272339, 0.33259129524230957, 0.1848868876695633, -0.015776824206113815, 0.31193938851356506, 0.000319703365676105, -0.02477213367819786, 0.07350271940231323, 0.019109345972537994, -0.17364270985126495, -0.032264553010463715, -0.28006815910339355, 0.02450965717434883, 0.4883538782596588, -0.03669271618127823, 0.141366645693779, -0.332271546125412, -0.0343836285173893, -0.014135821722447872, -0.36087411642074585, 0.0485970601439476, 0.19161899387836456, 0.11969748139381409, 0.37948352098464966, 0.13723236322402954, 0.02210024558007717, 0.07784806191921234, -0.049749646335840225, -0.048113636672496796, 0.46230602264404297, 0.2860603332519531, 0.17998534440994263, -0.37696486711502075, 0.03194195032119751, 0.3770427405834198, 0.4384738504886627, -0.1011727824807167, 0.20964570343494415, 0.0249679833650589, 0.007046345621347427, -0.29960742592811584, 0.2615804672241211, -0.4019725024700165, -0.10938721150159836, -0.13222545385360718, 0.0740431621670723, 0.0536607950925827, -0.09640805423259735, 0.2550646960735321, 0.025587297976017, 0.5761657953262329, -0.13832807540893555, 0.350793719291687, -0.232219398021698, -0.1379956156015396, -0.14363715052604675, -0.11229577660560608, -0.11578890681266785, -0.06970658153295517, 0.21253399550914764, -0.25405532121658325, 0.018602279946208, 0.21741533279418945, -0.18949763476848602, 0.07857818901538849, 0.03704511374235153, -0.1965731531381607, -0.07168500870466232, 0.3354319930076599, -0.03980980068445206, 0.21765631437301636, 0.019240448251366615, -0.0567605160176754, -0.23566877841949463, 0.10287383198738098, -0.2295112907886505, -0.22459323704242706, 0.08371121436357498, 0.16092920303344727, -0.29923349618911743, 0.15083453059196472, -0.1849505603313446, -0.10984638333320618, -0.12763097882270813, -0.05843466520309448, -0.09390310198068619, -0.1841740757226944, -0.015204861760139465, -0.1854468286037445, 0.16266311705112457, 0.4021339416503906, -0.5519447922706604, 0.013267256319522858, -0.44864603877067566, -0.4167840778827667, 0.200166255235672, 0.12901172041893005, -0.14052045345306396, 0.1854872852563858, -0.45630770921707153, 0.1974310427904129, 0.03374185413122177, -0.17508956789970398, -0.698651134967804, 0.1194373369216919, -0.08756083250045776, 0.5383012294769287, 0.13947471976280212, 0.11282946914434433, 0.0385720357298851, 0.12387970834970474, 0.007041566073894501, 0.5026693940162659, 0.09828179329633713, -0.032629914581775665, -0.20735757052898407, -0.3494388163089752, 0.06950622797012329, 0.17859798669815063, -0.17771625518798828, 0.24820944666862488, -0.1007332131266594, -0.127509206533432, 0.18935327231884003, 0.0060273222625255585, 0.029924826696515083, 0.2233189046382904, 0.3028424084186554, -0.07208539545536041, -0.09841001778841019, -0.03552455082535744, -0.5316970348358154, 0.3843922019004822, 0.06522702425718307, 0.05050961300730705, -0.11930963397026062, -0.06783021986484528, -0.20216181874275208, -0.08183280378580093, -0.35221219062805176, -0.1322038173675537, 0.04734230041503906, 0.21418270468711853, 0.12783008813858032, -0.055602289736270905, -0.07026571035385132, 0.5128251314163208, 0.22478990256786346, 0.3931405544281006, -0.4571021795272827, 0.20324091613292694, 0.1462899148464203, -0.07679509371519089, 0.15000663697719574, -0.035767026245594025, -0.044504135847091675, -0.4477333128452301, -0.07796259224414825, 0.4188111126422882, 0.3205575942993164, 0.04486782103776932, -0.20512723922729492, 0.057789146900177, -0.055505551397800446, 0.06209341809153557, 0.038923025131225586, 0.3426053822040558, 0.055749185383319855, 0.07870040088891983, -0.20127448439598083, 0.46183353662490845, -0.0007037222385406494, 0.09934373944997787, -0.13077306747436523, -0.05933007597923279, 0.4097493290901184, -0.014419898390769958, -0.04694958031177521, -0.22616583108901978, -0.12538886070251465, 0.22324195504188538, 0.42064812779426575, 0.2872278690338135, 0.1286897361278534, -0.10063823312520981, 0.3811967372894287, -0.14793618023395538, 0.08373507112264633, 0.2142084836959839, -0.022433921694755554, -0.15716972947120667, 0.3236820697784424, 0.5052473545074463, 0.577474057674408, 0.21990929543972015, -0.010328810662031174, -0.09452588111162186, 0.07827750593423843, -0.1446329951286316, 0.13716137409210205, -0.06508614122867584, 0.16658265888690948, 0.25840598344802856, 0.09603600203990936, -0.1332583874464035, -0.5035442113876343, 0.22523492574691772, -0.2251773327589035, 0.044711410999298096, -0.15051162242889404, -0.1078869178891182, -0.24944867193698883, -0.19127482175827026, -0.1276363581418991, 0.23532944917678833, -0.27600666880607605, -0.30681878328323364, -0.08485443890094757, 0.19193431735038757, 0.03786685690283775, 0.10329803079366684, -0.11685656011104584, 0.4836351275444031, -0.10264114290475845, -0.13602235913276672, -0.28189679980278015, 0.2278432697057724, -0.299207866191864, -0.026881098747253418, 0.0036295000463724136, -0.23449452221393585, -0.03432077914476395, -0.19847039878368378, 0.05345524102449417, -0.17974725365638733, -0.06826194375753403, 0.2450915277004242, -0.027148932218551636, 0.20177042484283447, 0.27056923508644104, 0.3188241124153137, 0.3943341374397278, 0.31498822569847107, 0.22844797372817993, -0.08145752549171448, -0.10938125848770142, 0.30829086899757385, -0.07432133704423904, 0.18268507719039917, -0.27935153245925903, -0.38778892159461975, -0.22206532955169678, -0.38233402371406555, 0.24637144804000854, -0.021989507600665092, -0.14218001067638397, 0.07895859330892563, 0.10673318058252335, -0.15553118288516998, -0.20304715633392334, 0.2702057957649231, -0.15658101439476013, -0.5711824297904968, 0.3556777238845825, 0.2522103488445282, -0.3353072702884674, -0.053277648985385895, 0.006843678653240204, -0.1796979010105133, 0.011388428509235382, -0.4347448945045471, -0.3675418794155121, -0.42143699526786804, 0.11904066801071167, -0.14489126205444336, 0.187285378575325, 0.3666231036186218, 0.0791485533118248, 0.04266299307346344, -0.011927776038646698, -0.370746910572052, 0.1074027419090271, 0.010057197883725166, 0.2330157458782196, 0.07019627839326859, 0.3534974753856659, 0.15860572457313538, -0.08332516252994537, 0.05705561861395836, 0.13989220559597015, 0.5528240203857422, 0.13899213075637817, 0.536247193813324, -0.30597975850105286, -0.09598781168460846, -0.0547773540019989, -0.04110364615917206, 0.13045410811901093, 0.16436231136322021, 0.09798011183738708, 0.09649497270584106, -0.01682174578309059, 0.07655501365661621, -0.186606764793396, -0.07169024646282196, 0.08007296919822693, 0.23839613795280457, -0.15357834100723267, 0.019172262400388718, 0.19695836305618286, -0.06735777854919434, 0.0552147701382637, 0.030925139784812927, 0.20430147647857666, 0.03619111329317093, 0.171622633934021, -0.5109707713127136, 0.48573604226112366, -0.177656888961792, 0.2823401689529419, -0.33598172664642334, 0.35251960158348083, 0.15851682424545288, -0.1867070496082306, 0.10908512026071548, -0.19018058478832245, 0.916316032409668, 0.037738267332315445, 0.00913463905453682, 0.05107663944363594, -0.11469410359859467, -0.5126952528953552, -0.16428609192371368, -0.1740652173757553, 0.016138702630996704, 0.07394644618034363, 0.32851526141166687, -0.4618125557899475, -0.3003457188606262, -0.17500421404838562, 0.4343310594558716, -0.09148132801055908, -0.16579604148864746, -0.15110361576080322, -0.23298946022987366, -0.1699928343296051, -0.04868084937334061, -0.18206721544265747, 0.32314926385879517, 0.10289666056632996, -0.033836230635643005, 0.006641079671680927, -0.5302978157997131, -0.003138631582260132, 0.14611202478408813, 0.36611321568489075, -0.32715678215026855, 0.18965975940227509, 0.1033785343170166, 0.10804413259029388, 0.21045087277889252, 0.4778902232646942, -0.1846359670162201, -0.47080498933792114, -0.10677210241556168, 0.13189446926116943, 0.0646718218922615, 0.2756086587905884, -0.12625667452812195, -0.012180604040622711, -0.454426109790802, 0.17351585626602173, -0.27757883071899414, -0.03459813445806503, 0.4584757089614868, -0.08344965428113937, 0.04588809236884117, -0.2817135453224182, 0.41570475697517395, -0.024519596248865128, -0.09397213160991669, -0.08425235748291016, 0.26743119955062866, -0.3145197033882141, 0.24184180796146393, -0.10794612020254135, 0.9811471700668335, -0.1005239486694336, 0.08143799006938934, 0.14022889733314514, -0.176629438996315, 0.5021606087684631, -0.39805471897125244, -0.010212099179625511, -0.2040315419435501, -0.2729198634624481, -0.0519104041159153, -0.15559007227420807, 0.3331535756587982, 0.09784705936908722, 0.07162337005138397, 0.458293616771698, -0.2460276037454605, 0.020608877763152122, 0.07772384583950043, 0.21675053238868713, -0.5078015923500061, -0.3632584512233734, -0.5494226217269897, 0.1452837884426117, -0.015192657709121704, 0.15397994220256805, -0.0902828574180603, -0.11066283285617828, 0.18857122957706451, -0.15044617652893066, 0.2007945030927658, 0.2910812497138977, 0.060889024287462234, -0.007899889722466469, 0.3445301055908203, -0.09149924665689468, -0.08983255922794342, 0.25010013580322266, -0.0017564818263053894, 0.1325261890888214, -0.2550082802772522, -0.07058608531951904, -0.2958296537399292, 0.18491467833518982, 0.06788412481546402, 0.02951253578066826, 0.2661348283290863, -0.003934066742658615, -0.141544908285141, -0.2784859240055084, -0.08426753431558609, -0.12444263696670532, 0.14247336983680725, -0.07989512383937836, 0.2827529311180115, -0.3236497640609741, -0.5475049018859863, -0.110205739736557, 0.33884695172309875, -0.19872412085533142, 0.11019206047058105, 0.2041763812303543, -0.1849653124809265, 0.2951849699020386, -0.2755616009235382, -0.23104390501976013, -0.2769055962562561, 0.5096301436424255, -0.08703666180372238, 0.36337390542030334, 0.1522657722234726, -0.04161366820335388, -0.09174448251724243, -0.1499307006597519, 0.10368996113538742, 0.47018760442733765, -0.11402954161167145, 0.07652303576469421, -0.07181331515312195, -0.3365926146507263, -0.11787582188844681, 0.26798588037490845, 0.40171271562576294, -0.4996476173400879, -0.1705424040555954, -0.44275322556495667, -0.0739964097738266, 0.1956285834312439, 0.19926635921001434, 0.1890459656715393, 0.02111063525080681, 0.07815159112215042, -0.04322241246700287, -0.15173214673995972, -0.2737317383289337, 0.3569311201572418, 0.0050082821398973465, -0.02578633651137352, 0.12889117002487183, -0.016865678131580353, 0.04768071696162224, -0.2130974382162094, 0.12015567719936371, 0.11076517403125763, -0.3270908296108246, -0.18725651502609253, -0.03892283886671066, 0.14533255994319916, 0.05337082967162132, -0.10425108671188354, 0.04961163178086281, -0.18550406396389008, -0.1111031174659729, -0.32388734817504883, 0.15812155604362488, -0.017367124557495117, -0.029123157262802124, 0.06624694913625717, 0.1229543685913086, 0.04660477489233017, -0.3565278649330139, 0.18318691849708557, -0.15576310455799103, -0.07379448413848877, 0.17792150378227234, 0.11206496506929398, -0.20404930412769318, 0.018268145620822906, -0.22697009146213531, 0.23356080055236816, 0.2274317890405655, 0.23492255806922913, 0.2540241777896881, -0.0924225002527237, 0.23220524191856384, 0.27925989031791687, 0.4659283757209778, 0.3074878454208374, -0.16511395573616028, -0.1471979320049286, 0.03936173766851425, 0.19661404192447662, -0.24825167655944824, -0.4771941602230072, 0.25278711318969727, 0.13301430642604828, -0.06386179476976395, 0.38640332221984863, 0.1568114161491394, 0.1598452776670456, -0.10500481724739075, -0.03379596397280693, 0.5825847387313843, 0.39627063274383545, 0.22910653054714203, 0.35250723361968994, -0.12248404324054718, 0.060328446328639984, 0.2774227261543274, 0.004304798319935799, 0.18200412392616272, 0.6720494031906128, -0.14181992411613464, 0.42437031865119934, -0.29176828265190125, 0.11267246305942535, -0.25880223512649536, -0.6851781010627747, 0.3771825432777405, 0.5212258100509644, 0.05799942463636398, -0.055545151233673096, 0.04978443309664726, 0.2872534990310669, -0.43465593457221985, -0.34697502851486206, -0.439966082572937, -0.005913831293582916, -0.10683070868253708, -0.12742069363594055, 0.29395803809165955, -0.16010433435440063, 0.043574534356594086, 0.16462862491607666, -0.19968688488006592, -0.2582131028175354, 0.297512948513031, -0.07050219178199768, -0.03350405395030975, -0.20388029515743256, -0.240522563457489, -0.03630833327770233, 0.13000524044036865, -0.209392711520195, 0.19786281883716583, 0.011533573269844055, -0.004930213093757629, -0.12110231816768646, 0.15842659771442413, 0.19284126162528992, 0.16760024428367615, 0.086942657828331, -0.12472609430551529, -0.0170501247048378, -0.02317664586007595, -0.2455374002456665, 0.06718045473098755, -0.08448217809200287, 0.19592435657978058, 0.16611787676811218, 0.2077966183423996, -0.19279280304908752, -0.05756647512316704, 0.031084027141332626, 0.10724146664142609, -0.5011615753173828, 0.28908270597457886, -0.014424115419387817, -0.16535788774490356, -0.0407295897603035, 0.028034768998622894, -0.14104251563549042, -0.12325167655944824, 0.08996489644050598, -0.036522556096315384, 0.12413094192743301, -0.054701924324035645, 0.08822612464427948, -0.04569230601191521, 0.12277859449386597, 0.008072704076766968, -0.42236846685409546, -0.19160529971122742, -0.08520767837762833, -0.6490575671195984, 0.01859886199235916, -0.13256655633449554, -0.06301496177911758, 0.09935346245765686, 0.0062088072299957275, 0.26023951172828674, 0.18022684752941132, -0.14819104969501495, 0.3065405786037445, 0.1062372624874115, -0.17205023765563965, -0.263325959444046, -0.17387284338474274, 0.13142132759094238, 0.028697991743683815, -0.07693697512149811, -0.5198488831520081, 0.18235358595848083, -0.2783981263637543, 0.0698428824543953, 0.2393399327993393, 0.31301066279411316, -0.0465473048388958, -0.3366788625717163, 0.3815617263317108, 0.2131800502538681, 0.0983089953660965, -0.021781781688332558, -0.21880434453487396, -0.1456144154071808, -0.0714055746793747, -0.10564178973436356, 0.14660775661468506, -0.17373129725456238, 0.3931136727333069, -0.23005877435207367, 0.27623918652534485, -0.42119723558425903, 0.22823716700077057, 0.11054100096225739, 0.19088612496852875, -0.413997083902359, 0.37844929099082947, -0.13944751024246216, -0.0009784605354070663, 0.2572367787361145, 0.3429029583930969, -0.08913502097129822, 0.12333500385284424, -0.2003956437110901, -0.14328892529010773, 0.33908772468566895, 0.08080582320690155, -0.17896059155464172, 0.0975317433476448, 0.21635887026786804, 0.04535646364092827, -0.34944695234298706, -0.15646186470985413, 0.261578232049942, 0.15615494549274445, -0.21756449341773987, -0.3663938343524933, 0.303420752286911, -0.0658881664276123, -0.16584357619285583, -0.07255974411964417, 0.32273566722869873, 0.22066396474838257, -0.2855585515499115, 0.20430798828601837, -0.04104623198509216 ]
https://github.com/huggingface/datasets/issues/6689
.load_dataset() method defaults to zstandard
The `ZstdExtractor` has been added 3 years ago and we haven't touched it since then. Same for the JSON loader. `zstandard` is required as soon as you try to load a file with the `.zstd` extension or if a file starts with the Zstandard magic number `b"\x28\xb5\x2f\xfd"` (used to recognize Zstandard files). Note that the extraction only has to happen once - if you reload the dataset it will be reloaded from your cache directly. Not sure what happened between October and now unfortunately
### Describe the bug Regardless of what method I use, datasets defaults to zstandard for unpacking my datasets. This is poor behavior, because not only is zstandard not a dependency in the huggingface package (and therefore, your dataset loading will be interrupted while it asks you to install the package), but it happens on datasets that are uploaded in json format too, meaning the dataset loader will attempt to convert the data to a zstandard compatible format, and THEN try to unpackage it. My 4tb drive runs out of room when using zstandard on slimpajama. It loads fine on 1.5tb when using json, however I lack the understanding of the "magic numbers" system used to select the unpackaging algorithm, so I can't push a change myself. Commenting out this line, in "/datasets/utils/extract.py" fixes the issue, and causes SlimPajama to properly extract using rational amounts of storage, however it completely disables zstandard, which is probably undesirable behavior. Someone with an understanding of the "magic numbers" system should probably take a pass over this issue. ``` class Extractor: # Put zip file to the last, b/c it is possible wrongly detected as zip (I guess it means: as tar or gzip) extractors: Dict[str, Type[BaseExtractor]] = { "tar": TarExtractor, "gzip": GzipExtractor, "zip": ZipExtractor, "xz": XzExtractor, #"zstd": ZstdExtractor, # This line needs to go, in order for datasets to work w/o non-dependent packages "rar": RarExtractor, "bz2": Bzip2Extractor, "7z": SevenZipExtractor, # <Added version="2.4.0"/> "lz4": Lz4Extractor, # <Added version="2.4.0"/> } ``` ### Steps to reproduce the bug ''' from datasaets import load_dataset load_dataset(path="/cerebras/SlimPajama-627B") ''' This alone should trigger the error on any system that does not have zstandard pip installed. ### Expected behavior This repository (which is encoded in json format, not zstandard) should check whether zstandard is installed before defaulting to it. Additionally, using zstandard should not use more than 3x the required space that other extraction mechanisms use. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.0 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
84
.load_dataset() method defaults to zstandard ### Describe the bug Regardless of what method I use, datasets defaults to zstandard for unpacking my datasets. This is poor behavior, because not only is zstandard not a dependency in the huggingface package (and therefore, your dataset loading will be interrupted while it asks you to install the package), but it happens on datasets that are uploaded in json format too, meaning the dataset loader will attempt to convert the data to a zstandard compatible format, and THEN try to unpackage it. My 4tb drive runs out of room when using zstandard on slimpajama. It loads fine on 1.5tb when using json, however I lack the understanding of the "magic numbers" system used to select the unpackaging algorithm, so I can't push a change myself. Commenting out this line, in "/datasets/utils/extract.py" fixes the issue, and causes SlimPajama to properly extract using rational amounts of storage, however it completely disables zstandard, which is probably undesirable behavior. Someone with an understanding of the "magic numbers" system should probably take a pass over this issue. ``` class Extractor: # Put zip file to the last, b/c it is possible wrongly detected as zip (I guess it means: as tar or gzip) extractors: Dict[str, Type[BaseExtractor]] = { "tar": TarExtractor, "gzip": GzipExtractor, "zip": ZipExtractor, "xz": XzExtractor, #"zstd": ZstdExtractor, # This line needs to go, in order for datasets to work w/o non-dependent packages "rar": RarExtractor, "bz2": Bzip2Extractor, "7z": SevenZipExtractor, # <Added version="2.4.0"/> "lz4": Lz4Extractor, # <Added version="2.4.0"/> } ``` ### Steps to reproduce the bug ''' from datasaets import load_dataset load_dataset(path="/cerebras/SlimPajama-627B") ''' This alone should trigger the error on any system that does not have zstandard pip installed. ### Expected behavior This repository (which is encoded in json format, not zstandard) should check whether zstandard is installed before defaulting to it. Additionally, using zstandard should not use more than 3x the required space that other extraction mechanisms use. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.0 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 The `ZstdExtractor` has been added 3 years ago and we haven't touched it since then. Same for the JSON loader. `zstandard` is required as soon as you try to load a file with the `.zstd` extension or if a file starts with the Zstandard magic number `b"\x28\xb5\x2f\xfd"` (used to recognize Zstandard files). Note that the extraction only has to happen once - if you reload the dataset it will be reloaded from your cache directly. Not sure what happened between October and now unfortunately
[ -0.00927412137389183, -0.238714337348938, 0.07676541805267334, 0.37975311279296875, 0.293429434299469, 0.010293431580066681, 0.13272809982299805, 0.09687069058418274, 0.36530211567878723, 0.055215366184711456, -0.17164713144302368, 0.2841671407222748, 0.24697230756282806, 0.3039837181568146, -0.16526807844638824, 0.19476433098316193, -0.039628706872463226, 0.2516951858997345, -0.29136526584625244, -0.0009005963802337646, -0.3696920871734619, 0.4007805585861206, -0.10493332147598267, -0.14959880709648132, -0.06487308442592621, 0.21443596482276917, 0.11899861693382263, -0.056634895503520966, -0.3743167519569397, -0.45716583728790283, 0.6119557619094849, 0.06449080258607864, 0.29453304409980774, 0.30191323161125183, -0.00011740114860003814, -0.07850109040737152, 0.334140419960022, -0.16491495072841644, -0.12334677577018738, -0.09227174520492554, -0.006934080272912979, -0.61709064245224, 0.10529573261737823, -0.11792775988578796, -0.22739681601524353, -0.3880135715007782, -0.1600925177335739, -0.3545672595500946, 0.28697532415390015, 0.01515538152307272, 0.16928407549858093, 0.12058611214160919, 0.1270267367362976, -0.2586671710014343, 0.13969190418720245, -0.29773104190826416, -0.2253039926290512, 0.1763077825307846, 0.20616182684898376, 0.01387113332748413, 0.07290543615818024, 0.15078547596931458, -0.021698234602808952, -0.006556382402777672, 0.4188924729824066, 0.053048644214868546, 0.31753724813461304, -0.24654826521873474, 0.11357977241277695, 0.38816356658935547, 0.6695162653923035, -0.28857916593551636, -0.3611230254173279, -0.41569188237190247, 0.053657516837120056, 0.1759394407272339, 0.33259129524230957, 0.1848868876695633, -0.015776824206113815, 0.31193938851356506, 0.000319703365676105, -0.02477213367819786, 0.07350271940231323, 0.019109345972537994, -0.17364270985126495, -0.032264553010463715, -0.28006815910339355, 0.02450965717434883, 0.4883538782596588, -0.03669271618127823, 0.141366645693779, -0.332271546125412, -0.0343836285173893, -0.014135821722447872, -0.36087411642074585, 0.0485970601439476, 0.19161899387836456, 0.11969748139381409, 0.37948352098464966, 0.13723236322402954, 0.02210024558007717, 0.07784806191921234, -0.049749646335840225, -0.048113636672496796, 0.46230602264404297, 0.2860603332519531, 0.17998534440994263, -0.37696486711502075, 0.03194195032119751, 0.3770427405834198, 0.4384738504886627, -0.1011727824807167, 0.20964570343494415, 0.0249679833650589, 0.007046345621347427, -0.29960742592811584, 0.2615804672241211, -0.4019725024700165, -0.10938721150159836, -0.13222545385360718, 0.0740431621670723, 0.0536607950925827, -0.09640805423259735, 0.2550646960735321, 0.025587297976017, 0.5761657953262329, -0.13832807540893555, 0.350793719291687, -0.232219398021698, -0.1379956156015396, -0.14363715052604675, -0.11229577660560608, -0.11578890681266785, -0.06970658153295517, 0.21253399550914764, -0.25405532121658325, 0.018602279946208, 0.21741533279418945, -0.18949763476848602, 0.07857818901538849, 0.03704511374235153, -0.1965731531381607, -0.07168500870466232, 0.3354319930076599, -0.03980980068445206, 0.21765631437301636, 0.019240448251366615, -0.0567605160176754, -0.23566877841949463, 0.10287383198738098, -0.2295112907886505, -0.22459323704242706, 0.08371121436357498, 0.16092920303344727, -0.29923349618911743, 0.15083453059196472, -0.1849505603313446, -0.10984638333320618, -0.12763097882270813, -0.05843466520309448, -0.09390310198068619, -0.1841740757226944, -0.015204861760139465, -0.1854468286037445, 0.16266311705112457, 0.4021339416503906, -0.5519447922706604, 0.013267256319522858, -0.44864603877067566, -0.4167840778827667, 0.200166255235672, 0.12901172041893005, -0.14052045345306396, 0.1854872852563858, -0.45630770921707153, 0.1974310427904129, 0.03374185413122177, -0.17508956789970398, -0.698651134967804, 0.1194373369216919, -0.08756083250045776, 0.5383012294769287, 0.13947471976280212, 0.11282946914434433, 0.0385720357298851, 0.12387970834970474, 0.007041566073894501, 0.5026693940162659, 0.09828179329633713, -0.032629914581775665, -0.20735757052898407, -0.3494388163089752, 0.06950622797012329, 0.17859798669815063, -0.17771625518798828, 0.24820944666862488, -0.1007332131266594, -0.127509206533432, 0.18935327231884003, 0.0060273222625255585, 0.029924826696515083, 0.2233189046382904, 0.3028424084186554, -0.07208539545536041, -0.09841001778841019, -0.03552455082535744, -0.5316970348358154, 0.3843922019004822, 0.06522702425718307, 0.05050961300730705, -0.11930963397026062, -0.06783021986484528, -0.20216181874275208, -0.08183280378580093, -0.35221219062805176, -0.1322038173675537, 0.04734230041503906, 0.21418270468711853, 0.12783008813858032, -0.055602289736270905, -0.07026571035385132, 0.5128251314163208, 0.22478990256786346, 0.3931405544281006, -0.4571021795272827, 0.20324091613292694, 0.1462899148464203, -0.07679509371519089, 0.15000663697719574, -0.035767026245594025, -0.044504135847091675, -0.4477333128452301, -0.07796259224414825, 0.4188111126422882, 0.3205575942993164, 0.04486782103776932, -0.20512723922729492, 0.057789146900177, -0.055505551397800446, 0.06209341809153557, 0.038923025131225586, 0.3426053822040558, 0.055749185383319855, 0.07870040088891983, -0.20127448439598083, 0.46183353662490845, -0.0007037222385406494, 0.09934373944997787, -0.13077306747436523, -0.05933007597923279, 0.4097493290901184, -0.014419898390769958, -0.04694958031177521, -0.22616583108901978, -0.12538886070251465, 0.22324195504188538, 0.42064812779426575, 0.2872278690338135, 0.1286897361278534, -0.10063823312520981, 0.3811967372894287, -0.14793618023395538, 0.08373507112264633, 0.2142084836959839, -0.022433921694755554, -0.15716972947120667, 0.3236820697784424, 0.5052473545074463, 0.577474057674408, 0.21990929543972015, -0.010328810662031174, -0.09452588111162186, 0.07827750593423843, -0.1446329951286316, 0.13716137409210205, -0.06508614122867584, 0.16658265888690948, 0.25840598344802856, 0.09603600203990936, -0.1332583874464035, -0.5035442113876343, 0.22523492574691772, -0.2251773327589035, 0.044711410999298096, -0.15051162242889404, -0.1078869178891182, -0.24944867193698883, -0.19127482175827026, -0.1276363581418991, 0.23532944917678833, -0.27600666880607605, -0.30681878328323364, -0.08485443890094757, 0.19193431735038757, 0.03786685690283775, 0.10329803079366684, -0.11685656011104584, 0.4836351275444031, -0.10264114290475845, -0.13602235913276672, -0.28189679980278015, 0.2278432697057724, -0.299207866191864, -0.026881098747253418, 0.0036295000463724136, -0.23449452221393585, -0.03432077914476395, -0.19847039878368378, 0.05345524102449417, -0.17974725365638733, -0.06826194375753403, 0.2450915277004242, -0.027148932218551636, 0.20177042484283447, 0.27056923508644104, 0.3188241124153137, 0.3943341374397278, 0.31498822569847107, 0.22844797372817993, -0.08145752549171448, -0.10938125848770142, 0.30829086899757385, -0.07432133704423904, 0.18268507719039917, -0.27935153245925903, -0.38778892159461975, -0.22206532955169678, -0.38233402371406555, 0.24637144804000854, -0.021989507600665092, -0.14218001067638397, 0.07895859330892563, 0.10673318058252335, -0.15553118288516998, -0.20304715633392334, 0.2702057957649231, -0.15658101439476013, -0.5711824297904968, 0.3556777238845825, 0.2522103488445282, -0.3353072702884674, -0.053277648985385895, 0.006843678653240204, -0.1796979010105133, 0.011388428509235382, -0.4347448945045471, -0.3675418794155121, -0.42143699526786804, 0.11904066801071167, -0.14489126205444336, 0.187285378575325, 0.3666231036186218, 0.0791485533118248, 0.04266299307346344, -0.011927776038646698, -0.370746910572052, 0.1074027419090271, 0.010057197883725166, 0.2330157458782196, 0.07019627839326859, 0.3534974753856659, 0.15860572457313538, -0.08332516252994537, 0.05705561861395836, 0.13989220559597015, 0.5528240203857422, 0.13899213075637817, 0.536247193813324, -0.30597975850105286, -0.09598781168460846, -0.0547773540019989, -0.04110364615917206, 0.13045410811901093, 0.16436231136322021, 0.09798011183738708, 0.09649497270584106, -0.01682174578309059, 0.07655501365661621, -0.186606764793396, -0.07169024646282196, 0.08007296919822693, 0.23839613795280457, -0.15357834100723267, 0.019172262400388718, 0.19695836305618286, -0.06735777854919434, 0.0552147701382637, 0.030925139784812927, 0.20430147647857666, 0.03619111329317093, 0.171622633934021, -0.5109707713127136, 0.48573604226112366, -0.177656888961792, 0.2823401689529419, -0.33598172664642334, 0.35251960158348083, 0.15851682424545288, -0.1867070496082306, 0.10908512026071548, -0.19018058478832245, 0.916316032409668, 0.037738267332315445, 0.00913463905453682, 0.05107663944363594, -0.11469410359859467, -0.5126952528953552, -0.16428609192371368, -0.1740652173757553, 0.016138702630996704, 0.07394644618034363, 0.32851526141166687, -0.4618125557899475, -0.3003457188606262, -0.17500421404838562, 0.4343310594558716, -0.09148132801055908, -0.16579604148864746, -0.15110361576080322, -0.23298946022987366, -0.1699928343296051, -0.04868084937334061, -0.18206721544265747, 0.32314926385879517, 0.10289666056632996, -0.033836230635643005, 0.006641079671680927, -0.5302978157997131, -0.003138631582260132, 0.14611202478408813, 0.36611321568489075, -0.32715678215026855, 0.18965975940227509, 0.1033785343170166, 0.10804413259029388, 0.21045087277889252, 0.4778902232646942, -0.1846359670162201, -0.47080498933792114, -0.10677210241556168, 0.13189446926116943, 0.0646718218922615, 0.2756086587905884, -0.12625667452812195, -0.012180604040622711, -0.454426109790802, 0.17351585626602173, -0.27757883071899414, -0.03459813445806503, 0.4584757089614868, -0.08344965428113937, 0.04588809236884117, -0.2817135453224182, 0.41570475697517395, -0.024519596248865128, -0.09397213160991669, -0.08425235748291016, 0.26743119955062866, -0.3145197033882141, 0.24184180796146393, -0.10794612020254135, 0.9811471700668335, -0.1005239486694336, 0.08143799006938934, 0.14022889733314514, -0.176629438996315, 0.5021606087684631, -0.39805471897125244, -0.010212099179625511, -0.2040315419435501, -0.2729198634624481, -0.0519104041159153, -0.15559007227420807, 0.3331535756587982, 0.09784705936908722, 0.07162337005138397, 0.458293616771698, -0.2460276037454605, 0.020608877763152122, 0.07772384583950043, 0.21675053238868713, -0.5078015923500061, -0.3632584512233734, -0.5494226217269897, 0.1452837884426117, -0.015192657709121704, 0.15397994220256805, -0.0902828574180603, -0.11066283285617828, 0.18857122957706451, -0.15044617652893066, 0.2007945030927658, 0.2910812497138977, 0.060889024287462234, -0.007899889722466469, 0.3445301055908203, -0.09149924665689468, -0.08983255922794342, 0.25010013580322266, -0.0017564818263053894, 0.1325261890888214, -0.2550082802772522, -0.07058608531951904, -0.2958296537399292, 0.18491467833518982, 0.06788412481546402, 0.02951253578066826, 0.2661348283290863, -0.003934066742658615, -0.141544908285141, -0.2784859240055084, -0.08426753431558609, -0.12444263696670532, 0.14247336983680725, -0.07989512383937836, 0.2827529311180115, -0.3236497640609741, -0.5475049018859863, -0.110205739736557, 0.33884695172309875, -0.19872412085533142, 0.11019206047058105, 0.2041763812303543, -0.1849653124809265, 0.2951849699020386, -0.2755616009235382, -0.23104390501976013, -0.2769055962562561, 0.5096301436424255, -0.08703666180372238, 0.36337390542030334, 0.1522657722234726, -0.04161366820335388, -0.09174448251724243, -0.1499307006597519, 0.10368996113538742, 0.47018760442733765, -0.11402954161167145, 0.07652303576469421, -0.07181331515312195, -0.3365926146507263, -0.11787582188844681, 0.26798588037490845, 0.40171271562576294, -0.4996476173400879, -0.1705424040555954, -0.44275322556495667, -0.0739964097738266, 0.1956285834312439, 0.19926635921001434, 0.1890459656715393, 0.02111063525080681, 0.07815159112215042, -0.04322241246700287, -0.15173214673995972, -0.2737317383289337, 0.3569311201572418, 0.0050082821398973465, -0.02578633651137352, 0.12889117002487183, -0.016865678131580353, 0.04768071696162224, -0.2130974382162094, 0.12015567719936371, 0.11076517403125763, -0.3270908296108246, -0.18725651502609253, -0.03892283886671066, 0.14533255994319916, 0.05337082967162132, -0.10425108671188354, 0.04961163178086281, -0.18550406396389008, -0.1111031174659729, -0.32388734817504883, 0.15812155604362488, -0.017367124557495117, -0.029123157262802124, 0.06624694913625717, 0.1229543685913086, 0.04660477489233017, -0.3565278649330139, 0.18318691849708557, -0.15576310455799103, -0.07379448413848877, 0.17792150378227234, 0.11206496506929398, -0.20404930412769318, 0.018268145620822906, -0.22697009146213531, 0.23356080055236816, 0.2274317890405655, 0.23492255806922913, 0.2540241777896881, -0.0924225002527237, 0.23220524191856384, 0.27925989031791687, 0.4659283757209778, 0.3074878454208374, -0.16511395573616028, -0.1471979320049286, 0.03936173766851425, 0.19661404192447662, -0.24825167655944824, -0.4771941602230072, 0.25278711318969727, 0.13301430642604828, -0.06386179476976395, 0.38640332221984863, 0.1568114161491394, 0.1598452776670456, -0.10500481724739075, -0.03379596397280693, 0.5825847387313843, 0.39627063274383545, 0.22910653054714203, 0.35250723361968994, -0.12248404324054718, 0.060328446328639984, 0.2774227261543274, 0.004304798319935799, 0.18200412392616272, 0.6720494031906128, -0.14181992411613464, 0.42437031865119934, -0.29176828265190125, 0.11267246305942535, -0.25880223512649536, -0.6851781010627747, 0.3771825432777405, 0.5212258100509644, 0.05799942463636398, -0.055545151233673096, 0.04978443309664726, 0.2872534990310669, -0.43465593457221985, -0.34697502851486206, -0.439966082572937, -0.005913831293582916, -0.10683070868253708, -0.12742069363594055, 0.29395803809165955, -0.16010433435440063, 0.043574534356594086, 0.16462862491607666, -0.19968688488006592, -0.2582131028175354, 0.297512948513031, -0.07050219178199768, -0.03350405395030975, -0.20388029515743256, -0.240522563457489, -0.03630833327770233, 0.13000524044036865, -0.209392711520195, 0.19786281883716583, 0.011533573269844055, -0.004930213093757629, -0.12110231816768646, 0.15842659771442413, 0.19284126162528992, 0.16760024428367615, 0.086942657828331, -0.12472609430551529, -0.0170501247048378, -0.02317664586007595, -0.2455374002456665, 0.06718045473098755, -0.08448217809200287, 0.19592435657978058, 0.16611787676811218, 0.2077966183423996, -0.19279280304908752, -0.05756647512316704, 0.031084027141332626, 0.10724146664142609, -0.5011615753173828, 0.28908270597457886, -0.014424115419387817, -0.16535788774490356, -0.0407295897603035, 0.028034768998622894, -0.14104251563549042, -0.12325167655944824, 0.08996489644050598, -0.036522556096315384, 0.12413094192743301, -0.054701924324035645, 0.08822612464427948, -0.04569230601191521, 0.12277859449386597, 0.008072704076766968, -0.42236846685409546, -0.19160529971122742, -0.08520767837762833, -0.6490575671195984, 0.01859886199235916, -0.13256655633449554, -0.06301496177911758, 0.09935346245765686, 0.0062088072299957275, 0.26023951172828674, 0.18022684752941132, -0.14819104969501495, 0.3065405786037445, 0.1062372624874115, -0.17205023765563965, -0.263325959444046, -0.17387284338474274, 0.13142132759094238, 0.028697991743683815, -0.07693697512149811, -0.5198488831520081, 0.18235358595848083, -0.2783981263637543, 0.0698428824543953, 0.2393399327993393, 0.31301066279411316, -0.0465473048388958, -0.3366788625717163, 0.3815617263317108, 0.2131800502538681, 0.0983089953660965, -0.021781781688332558, -0.21880434453487396, -0.1456144154071808, -0.0714055746793747, -0.10564178973436356, 0.14660775661468506, -0.17373129725456238, 0.3931136727333069, -0.23005877435207367, 0.27623918652534485, -0.42119723558425903, 0.22823716700077057, 0.11054100096225739, 0.19088612496852875, -0.413997083902359, 0.37844929099082947, -0.13944751024246216, -0.0009784605354070663, 0.2572367787361145, 0.3429029583930969, -0.08913502097129822, 0.12333500385284424, -0.2003956437110901, -0.14328892529010773, 0.33908772468566895, 0.08080582320690155, -0.17896059155464172, 0.0975317433476448, 0.21635887026786804, 0.04535646364092827, -0.34944695234298706, -0.15646186470985413, 0.261578232049942, 0.15615494549274445, -0.21756449341773987, -0.3663938343524933, 0.303420752286911, -0.0658881664276123, -0.16584357619285583, -0.07255974411964417, 0.32273566722869873, 0.22066396474838257, -0.2855585515499115, 0.20430798828601837, -0.04104623198509216 ]
https://github.com/huggingface/datasets/issues/6689
.load_dataset() method defaults to zstandard
Understood, thank you for clarifying that for me. I'll look into how best to collate my stack of batches w/o creating duplicate arrow tables for each one.
### Describe the bug Regardless of what method I use, datasets defaults to zstandard for unpacking my datasets. This is poor behavior, because not only is zstandard not a dependency in the huggingface package (and therefore, your dataset loading will be interrupted while it asks you to install the package), but it happens on datasets that are uploaded in json format too, meaning the dataset loader will attempt to convert the data to a zstandard compatible format, and THEN try to unpackage it. My 4tb drive runs out of room when using zstandard on slimpajama. It loads fine on 1.5tb when using json, however I lack the understanding of the "magic numbers" system used to select the unpackaging algorithm, so I can't push a change myself. Commenting out this line, in "/datasets/utils/extract.py" fixes the issue, and causes SlimPajama to properly extract using rational amounts of storage, however it completely disables zstandard, which is probably undesirable behavior. Someone with an understanding of the "magic numbers" system should probably take a pass over this issue. ``` class Extractor: # Put zip file to the last, b/c it is possible wrongly detected as zip (I guess it means: as tar or gzip) extractors: Dict[str, Type[BaseExtractor]] = { "tar": TarExtractor, "gzip": GzipExtractor, "zip": ZipExtractor, "xz": XzExtractor, #"zstd": ZstdExtractor, # This line needs to go, in order for datasets to work w/o non-dependent packages "rar": RarExtractor, "bz2": Bzip2Extractor, "7z": SevenZipExtractor, # <Added version="2.4.0"/> "lz4": Lz4Extractor, # <Added version="2.4.0"/> } ``` ### Steps to reproduce the bug ''' from datasaets import load_dataset load_dataset(path="/cerebras/SlimPajama-627B") ''' This alone should trigger the error on any system that does not have zstandard pip installed. ### Expected behavior This repository (which is encoded in json format, not zstandard) should check whether zstandard is installed before defaulting to it. Additionally, using zstandard should not use more than 3x the required space that other extraction mechanisms use. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.0 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
27
.load_dataset() method defaults to zstandard ### Describe the bug Regardless of what method I use, datasets defaults to zstandard for unpacking my datasets. This is poor behavior, because not only is zstandard not a dependency in the huggingface package (and therefore, your dataset loading will be interrupted while it asks you to install the package), but it happens on datasets that are uploaded in json format too, meaning the dataset loader will attempt to convert the data to a zstandard compatible format, and THEN try to unpackage it. My 4tb drive runs out of room when using zstandard on slimpajama. It loads fine on 1.5tb when using json, however I lack the understanding of the "magic numbers" system used to select the unpackaging algorithm, so I can't push a change myself. Commenting out this line, in "/datasets/utils/extract.py" fixes the issue, and causes SlimPajama to properly extract using rational amounts of storage, however it completely disables zstandard, which is probably undesirable behavior. Someone with an understanding of the "magic numbers" system should probably take a pass over this issue. ``` class Extractor: # Put zip file to the last, b/c it is possible wrongly detected as zip (I guess it means: as tar or gzip) extractors: Dict[str, Type[BaseExtractor]] = { "tar": TarExtractor, "gzip": GzipExtractor, "zip": ZipExtractor, "xz": XzExtractor, #"zstd": ZstdExtractor, # This line needs to go, in order for datasets to work w/o non-dependent packages "rar": RarExtractor, "bz2": Bzip2Extractor, "7z": SevenZipExtractor, # <Added version="2.4.0"/> "lz4": Lz4Extractor, # <Added version="2.4.0"/> } ``` ### Steps to reproduce the bug ''' from datasaets import load_dataset load_dataset(path="/cerebras/SlimPajama-627B") ''' This alone should trigger the error on any system that does not have zstandard pip installed. ### Expected behavior This repository (which is encoded in json format, not zstandard) should check whether zstandard is installed before defaulting to it. Additionally, using zstandard should not use more than 3x the required space that other extraction mechanisms use. ### Environment info - `datasets` version: 2.17.1 - Platform: Linux-6.5.0-18-generic-x86_64-with-glibc2.35 - Python version: 3.12.0 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 Understood, thank you for clarifying that for me. I'll look into how best to collate my stack of batches w/o creating duplicate arrow tables for each one.
[ -0.00927412137389183, -0.238714337348938, 0.07676541805267334, 0.37975311279296875, 0.293429434299469, 0.010293431580066681, 0.13272809982299805, 0.09687069058418274, 0.36530211567878723, 0.055215366184711456, -0.17164713144302368, 0.2841671407222748, 0.24697230756282806, 0.3039837181568146, -0.16526807844638824, 0.19476433098316193, -0.039628706872463226, 0.2516951858997345, -0.29136526584625244, -0.0009005963802337646, -0.3696920871734619, 0.4007805585861206, -0.10493332147598267, -0.14959880709648132, -0.06487308442592621, 0.21443596482276917, 0.11899861693382263, -0.056634895503520966, -0.3743167519569397, -0.45716583728790283, 0.6119557619094849, 0.06449080258607864, 0.29453304409980774, 0.30191323161125183, -0.00011740114860003814, -0.07850109040737152, 0.334140419960022, -0.16491495072841644, -0.12334677577018738, -0.09227174520492554, -0.006934080272912979, -0.61709064245224, 0.10529573261737823, -0.11792775988578796, -0.22739681601524353, -0.3880135715007782, -0.1600925177335739, -0.3545672595500946, 0.28697532415390015, 0.01515538152307272, 0.16928407549858093, 0.12058611214160919, 0.1270267367362976, -0.2586671710014343, 0.13969190418720245, -0.29773104190826416, -0.2253039926290512, 0.1763077825307846, 0.20616182684898376, 0.01387113332748413, 0.07290543615818024, 0.15078547596931458, -0.021698234602808952, -0.006556382402777672, 0.4188924729824066, 0.053048644214868546, 0.31753724813461304, -0.24654826521873474, 0.11357977241277695, 0.38816356658935547, 0.6695162653923035, -0.28857916593551636, -0.3611230254173279, -0.41569188237190247, 0.053657516837120056, 0.1759394407272339, 0.33259129524230957, 0.1848868876695633, -0.015776824206113815, 0.31193938851356506, 0.000319703365676105, -0.02477213367819786, 0.07350271940231323, 0.019109345972537994, -0.17364270985126495, -0.032264553010463715, -0.28006815910339355, 0.02450965717434883, 0.4883538782596588, -0.03669271618127823, 0.141366645693779, -0.332271546125412, -0.0343836285173893, -0.014135821722447872, -0.36087411642074585, 0.0485970601439476, 0.19161899387836456, 0.11969748139381409, 0.37948352098464966, 0.13723236322402954, 0.02210024558007717, 0.07784806191921234, -0.049749646335840225, -0.048113636672496796, 0.46230602264404297, 0.2860603332519531, 0.17998534440994263, -0.37696486711502075, 0.03194195032119751, 0.3770427405834198, 0.4384738504886627, -0.1011727824807167, 0.20964570343494415, 0.0249679833650589, 0.007046345621347427, -0.29960742592811584, 0.2615804672241211, -0.4019725024700165, -0.10938721150159836, -0.13222545385360718, 0.0740431621670723, 0.0536607950925827, -0.09640805423259735, 0.2550646960735321, 0.025587297976017, 0.5761657953262329, -0.13832807540893555, 0.350793719291687, -0.232219398021698, -0.1379956156015396, -0.14363715052604675, -0.11229577660560608, -0.11578890681266785, -0.06970658153295517, 0.21253399550914764, -0.25405532121658325, 0.018602279946208, 0.21741533279418945, -0.18949763476848602, 0.07857818901538849, 0.03704511374235153, -0.1965731531381607, -0.07168500870466232, 0.3354319930076599, -0.03980980068445206, 0.21765631437301636, 0.019240448251366615, -0.0567605160176754, -0.23566877841949463, 0.10287383198738098, -0.2295112907886505, -0.22459323704242706, 0.08371121436357498, 0.16092920303344727, -0.29923349618911743, 0.15083453059196472, -0.1849505603313446, -0.10984638333320618, -0.12763097882270813, -0.05843466520309448, -0.09390310198068619, -0.1841740757226944, -0.015204861760139465, -0.1854468286037445, 0.16266311705112457, 0.4021339416503906, -0.5519447922706604, 0.013267256319522858, -0.44864603877067566, -0.4167840778827667, 0.200166255235672, 0.12901172041893005, -0.14052045345306396, 0.1854872852563858, -0.45630770921707153, 0.1974310427904129, 0.03374185413122177, -0.17508956789970398, -0.698651134967804, 0.1194373369216919, -0.08756083250045776, 0.5383012294769287, 0.13947471976280212, 0.11282946914434433, 0.0385720357298851, 0.12387970834970474, 0.007041566073894501, 0.5026693940162659, 0.09828179329633713, -0.032629914581775665, -0.20735757052898407, -0.3494388163089752, 0.06950622797012329, 0.17859798669815063, -0.17771625518798828, 0.24820944666862488, -0.1007332131266594, -0.127509206533432, 0.18935327231884003, 0.0060273222625255585, 0.029924826696515083, 0.2233189046382904, 0.3028424084186554, -0.07208539545536041, -0.09841001778841019, -0.03552455082535744, -0.5316970348358154, 0.3843922019004822, 0.06522702425718307, 0.05050961300730705, -0.11930963397026062, -0.06783021986484528, -0.20216181874275208, -0.08183280378580093, -0.35221219062805176, -0.1322038173675537, 0.04734230041503906, 0.21418270468711853, 0.12783008813858032, -0.055602289736270905, -0.07026571035385132, 0.5128251314163208, 0.22478990256786346, 0.3931405544281006, -0.4571021795272827, 0.20324091613292694, 0.1462899148464203, -0.07679509371519089, 0.15000663697719574, -0.035767026245594025, -0.044504135847091675, -0.4477333128452301, -0.07796259224414825, 0.4188111126422882, 0.3205575942993164, 0.04486782103776932, -0.20512723922729492, 0.057789146900177, -0.055505551397800446, 0.06209341809153557, 0.038923025131225586, 0.3426053822040558, 0.055749185383319855, 0.07870040088891983, -0.20127448439598083, 0.46183353662490845, -0.0007037222385406494, 0.09934373944997787, -0.13077306747436523, -0.05933007597923279, 0.4097493290901184, -0.014419898390769958, -0.04694958031177521, -0.22616583108901978, -0.12538886070251465, 0.22324195504188538, 0.42064812779426575, 0.2872278690338135, 0.1286897361278534, -0.10063823312520981, 0.3811967372894287, -0.14793618023395538, 0.08373507112264633, 0.2142084836959839, -0.022433921694755554, -0.15716972947120667, 0.3236820697784424, 0.5052473545074463, 0.577474057674408, 0.21990929543972015, -0.010328810662031174, -0.09452588111162186, 0.07827750593423843, -0.1446329951286316, 0.13716137409210205, -0.06508614122867584, 0.16658265888690948, 0.25840598344802856, 0.09603600203990936, -0.1332583874464035, -0.5035442113876343, 0.22523492574691772, -0.2251773327589035, 0.044711410999298096, -0.15051162242889404, -0.1078869178891182, -0.24944867193698883, -0.19127482175827026, -0.1276363581418991, 0.23532944917678833, -0.27600666880607605, -0.30681878328323364, -0.08485443890094757, 0.19193431735038757, 0.03786685690283775, 0.10329803079366684, -0.11685656011104584, 0.4836351275444031, -0.10264114290475845, -0.13602235913276672, -0.28189679980278015, 0.2278432697057724, -0.299207866191864, -0.026881098747253418, 0.0036295000463724136, -0.23449452221393585, -0.03432077914476395, -0.19847039878368378, 0.05345524102449417, -0.17974725365638733, -0.06826194375753403, 0.2450915277004242, -0.027148932218551636, 0.20177042484283447, 0.27056923508644104, 0.3188241124153137, 0.3943341374397278, 0.31498822569847107, 0.22844797372817993, -0.08145752549171448, -0.10938125848770142, 0.30829086899757385, -0.07432133704423904, 0.18268507719039917, -0.27935153245925903, -0.38778892159461975, -0.22206532955169678, -0.38233402371406555, 0.24637144804000854, -0.021989507600665092, -0.14218001067638397, 0.07895859330892563, 0.10673318058252335, -0.15553118288516998, -0.20304715633392334, 0.2702057957649231, -0.15658101439476013, -0.5711824297904968, 0.3556777238845825, 0.2522103488445282, -0.3353072702884674, -0.053277648985385895, 0.006843678653240204, -0.1796979010105133, 0.011388428509235382, -0.4347448945045471, -0.3675418794155121, -0.42143699526786804, 0.11904066801071167, -0.14489126205444336, 0.187285378575325, 0.3666231036186218, 0.0791485533118248, 0.04266299307346344, -0.011927776038646698, -0.370746910572052, 0.1074027419090271, 0.010057197883725166, 0.2330157458782196, 0.07019627839326859, 0.3534974753856659, 0.15860572457313538, -0.08332516252994537, 0.05705561861395836, 0.13989220559597015, 0.5528240203857422, 0.13899213075637817, 0.536247193813324, -0.30597975850105286, -0.09598781168460846, -0.0547773540019989, -0.04110364615917206, 0.13045410811901093, 0.16436231136322021, 0.09798011183738708, 0.09649497270584106, -0.01682174578309059, 0.07655501365661621, -0.186606764793396, -0.07169024646282196, 0.08007296919822693, 0.23839613795280457, -0.15357834100723267, 0.019172262400388718, 0.19695836305618286, -0.06735777854919434, 0.0552147701382637, 0.030925139784812927, 0.20430147647857666, 0.03619111329317093, 0.171622633934021, -0.5109707713127136, 0.48573604226112366, -0.177656888961792, 0.2823401689529419, -0.33598172664642334, 0.35251960158348083, 0.15851682424545288, -0.1867070496082306, 0.10908512026071548, -0.19018058478832245, 0.916316032409668, 0.037738267332315445, 0.00913463905453682, 0.05107663944363594, -0.11469410359859467, -0.5126952528953552, -0.16428609192371368, -0.1740652173757553, 0.016138702630996704, 0.07394644618034363, 0.32851526141166687, -0.4618125557899475, -0.3003457188606262, -0.17500421404838562, 0.4343310594558716, -0.09148132801055908, -0.16579604148864746, -0.15110361576080322, -0.23298946022987366, -0.1699928343296051, -0.04868084937334061, -0.18206721544265747, 0.32314926385879517, 0.10289666056632996, -0.033836230635643005, 0.006641079671680927, -0.5302978157997131, -0.003138631582260132, 0.14611202478408813, 0.36611321568489075, -0.32715678215026855, 0.18965975940227509, 0.1033785343170166, 0.10804413259029388, 0.21045087277889252, 0.4778902232646942, -0.1846359670162201, -0.47080498933792114, -0.10677210241556168, 0.13189446926116943, 0.0646718218922615, 0.2756086587905884, -0.12625667452812195, -0.012180604040622711, -0.454426109790802, 0.17351585626602173, -0.27757883071899414, -0.03459813445806503, 0.4584757089614868, -0.08344965428113937, 0.04588809236884117, -0.2817135453224182, 0.41570475697517395, -0.024519596248865128, -0.09397213160991669, -0.08425235748291016, 0.26743119955062866, -0.3145197033882141, 0.24184180796146393, -0.10794612020254135, 0.9811471700668335, -0.1005239486694336, 0.08143799006938934, 0.14022889733314514, -0.176629438996315, 0.5021606087684631, -0.39805471897125244, -0.010212099179625511, -0.2040315419435501, -0.2729198634624481, -0.0519104041159153, -0.15559007227420807, 0.3331535756587982, 0.09784705936908722, 0.07162337005138397, 0.458293616771698, -0.2460276037454605, 0.020608877763152122, 0.07772384583950043, 0.21675053238868713, -0.5078015923500061, -0.3632584512233734, -0.5494226217269897, 0.1452837884426117, -0.015192657709121704, 0.15397994220256805, -0.0902828574180603, -0.11066283285617828, 0.18857122957706451, -0.15044617652893066, 0.2007945030927658, 0.2910812497138977, 0.060889024287462234, -0.007899889722466469, 0.3445301055908203, -0.09149924665689468, -0.08983255922794342, 0.25010013580322266, -0.0017564818263053894, 0.1325261890888214, -0.2550082802772522, -0.07058608531951904, -0.2958296537399292, 0.18491467833518982, 0.06788412481546402, 0.02951253578066826, 0.2661348283290863, -0.003934066742658615, -0.141544908285141, -0.2784859240055084, -0.08426753431558609, -0.12444263696670532, 0.14247336983680725, -0.07989512383937836, 0.2827529311180115, -0.3236497640609741, -0.5475049018859863, -0.110205739736557, 0.33884695172309875, -0.19872412085533142, 0.11019206047058105, 0.2041763812303543, -0.1849653124809265, 0.2951849699020386, -0.2755616009235382, -0.23104390501976013, -0.2769055962562561, 0.5096301436424255, -0.08703666180372238, 0.36337390542030334, 0.1522657722234726, -0.04161366820335388, -0.09174448251724243, -0.1499307006597519, 0.10368996113538742, 0.47018760442733765, -0.11402954161167145, 0.07652303576469421, -0.07181331515312195, -0.3365926146507263, -0.11787582188844681, 0.26798588037490845, 0.40171271562576294, -0.4996476173400879, -0.1705424040555954, -0.44275322556495667, -0.0739964097738266, 0.1956285834312439, 0.19926635921001434, 0.1890459656715393, 0.02111063525080681, 0.07815159112215042, -0.04322241246700287, -0.15173214673995972, -0.2737317383289337, 0.3569311201572418, 0.0050082821398973465, -0.02578633651137352, 0.12889117002487183, -0.016865678131580353, 0.04768071696162224, -0.2130974382162094, 0.12015567719936371, 0.11076517403125763, -0.3270908296108246, -0.18725651502609253, -0.03892283886671066, 0.14533255994319916, 0.05337082967162132, -0.10425108671188354, 0.04961163178086281, -0.18550406396389008, -0.1111031174659729, -0.32388734817504883, 0.15812155604362488, -0.017367124557495117, -0.029123157262802124, 0.06624694913625717, 0.1229543685913086, 0.04660477489233017, -0.3565278649330139, 0.18318691849708557, -0.15576310455799103, -0.07379448413848877, 0.17792150378227234, 0.11206496506929398, -0.20404930412769318, 0.018268145620822906, -0.22697009146213531, 0.23356080055236816, 0.2274317890405655, 0.23492255806922913, 0.2540241777896881, -0.0924225002527237, 0.23220524191856384, 0.27925989031791687, 0.4659283757209778, 0.3074878454208374, -0.16511395573616028, -0.1471979320049286, 0.03936173766851425, 0.19661404192447662, -0.24825167655944824, -0.4771941602230072, 0.25278711318969727, 0.13301430642604828, -0.06386179476976395, 0.38640332221984863, 0.1568114161491394, 0.1598452776670456, -0.10500481724739075, -0.03379596397280693, 0.5825847387313843, 0.39627063274383545, 0.22910653054714203, 0.35250723361968994, -0.12248404324054718, 0.060328446328639984, 0.2774227261543274, 0.004304798319935799, 0.18200412392616272, 0.6720494031906128, -0.14181992411613464, 0.42437031865119934, -0.29176828265190125, 0.11267246305942535, -0.25880223512649536, -0.6851781010627747, 0.3771825432777405, 0.5212258100509644, 0.05799942463636398, -0.055545151233673096, 0.04978443309664726, 0.2872534990310669, -0.43465593457221985, -0.34697502851486206, -0.439966082572937, -0.005913831293582916, -0.10683070868253708, -0.12742069363594055, 0.29395803809165955, -0.16010433435440063, 0.043574534356594086, 0.16462862491607666, -0.19968688488006592, -0.2582131028175354, 0.297512948513031, -0.07050219178199768, -0.03350405395030975, -0.20388029515743256, -0.240522563457489, -0.03630833327770233, 0.13000524044036865, -0.209392711520195, 0.19786281883716583, 0.011533573269844055, -0.004930213093757629, -0.12110231816768646, 0.15842659771442413, 0.19284126162528992, 0.16760024428367615, 0.086942657828331, -0.12472609430551529, -0.0170501247048378, -0.02317664586007595, -0.2455374002456665, 0.06718045473098755, -0.08448217809200287, 0.19592435657978058, 0.16611787676811218, 0.2077966183423996, -0.19279280304908752, -0.05756647512316704, 0.031084027141332626, 0.10724146664142609, -0.5011615753173828, 0.28908270597457886, -0.014424115419387817, -0.16535788774490356, -0.0407295897603035, 0.028034768998622894, -0.14104251563549042, -0.12325167655944824, 0.08996489644050598, -0.036522556096315384, 0.12413094192743301, -0.054701924324035645, 0.08822612464427948, -0.04569230601191521, 0.12277859449386597, 0.008072704076766968, -0.42236846685409546, -0.19160529971122742, -0.08520767837762833, -0.6490575671195984, 0.01859886199235916, -0.13256655633449554, -0.06301496177911758, 0.09935346245765686, 0.0062088072299957275, 0.26023951172828674, 0.18022684752941132, -0.14819104969501495, 0.3065405786037445, 0.1062372624874115, -0.17205023765563965, -0.263325959444046, -0.17387284338474274, 0.13142132759094238, 0.028697991743683815, -0.07693697512149811, -0.5198488831520081, 0.18235358595848083, -0.2783981263637543, 0.0698428824543953, 0.2393399327993393, 0.31301066279411316, -0.0465473048388958, -0.3366788625717163, 0.3815617263317108, 0.2131800502538681, 0.0983089953660965, -0.021781781688332558, -0.21880434453487396, -0.1456144154071808, -0.0714055746793747, -0.10564178973436356, 0.14660775661468506, -0.17373129725456238, 0.3931136727333069, -0.23005877435207367, 0.27623918652534485, -0.42119723558425903, 0.22823716700077057, 0.11054100096225739, 0.19088612496852875, -0.413997083902359, 0.37844929099082947, -0.13944751024246216, -0.0009784605354070663, 0.2572367787361145, 0.3429029583930969, -0.08913502097129822, 0.12333500385284424, -0.2003956437110901, -0.14328892529010773, 0.33908772468566895, 0.08080582320690155, -0.17896059155464172, 0.0975317433476448, 0.21635887026786804, 0.04535646364092827, -0.34944695234298706, -0.15646186470985413, 0.261578232049942, 0.15615494549274445, -0.21756449341773987, -0.3663938343524933, 0.303420752286911, -0.0658881664276123, -0.16584357619285583, -0.07255974411964417, 0.32273566722869873, 0.22066396474838257, -0.2855585515499115, 0.20430798828601837, -0.04104623198509216 ]
https://github.com/huggingface/datasets/issues/6688
Tensor type (e.g. from `return_tensors`) ignored in map
Hi, this is expected behavior since all the tensors are converted to Arrow data (the storage type behind a Dataset). To get pytorch tensors back, you can set the dataset format to "torch": ```python ds = ds.with_format("torch") ```
### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., for caching/Arrow compatibility/etc.) it should be clearly documented. For example, current documentation (see [here](https://huggingface.co/docs/datasets/v2.17.1/en/nlp_process#map)) clearly state to "set `return_tensors="np"` when you tokenize your text" to have Numpy arrays. ### Steps to reproduce the bug ```py # %%% import datasets import numpy as np import tensorflow as tf import torch from transformers import AutoTokenizer # %% ds = datasets.load_dataset("cnn_dailymail", "1.0.0", split="train[:1%]") tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") #%% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** no map, return_tensors={return_tensors} **********") _ds = tokenizer(ds["article"], return_tensors=return_tensors, truncation=True, padding=True) print('Type <input_ids>:', type(_ds["input_ids"])) # %% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** map, return_tensors={return_tensors} **********") _ds = ds.map( lambda examples: tokenizer(examples["article"], return_tensors=return_tensors, truncation=True, padding=True), batched=True, remove_columns=["article"], ) print('Type <input_ids>:', type(_ds[0]["input_ids"])) ``` ### Expected behavior The output from the script above. I would expect the second half to be the same. ``` ********** no map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** no map, return_tensors=np ********** Type <input_ids>: <class 'numpy.ndarray'> ********** no map, return_tensors=pt ********** Type <input_ids>: <class 'torch.Tensor'> ********** no map, return_tensors=tf ********** Type <input_ids>: <class 'tensorflow.python.framework.ops.EagerTensor'> ********** no map, return_tensors=jax ********** Type <input_ids>: <class 'jaxlib.xla_extension.ArrayImpl'> ********** map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=np ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=pt ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=tf ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=jax ********** Type <input_ids>: <class 'list'> ``` ### Environment info - `datasets` version: 2.17.1 - Platform: Redacted (linux) - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0
38
Tensor type (e.g. from `return_tensors`) ignored in map ### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., for caching/Arrow compatibility/etc.) it should be clearly documented. For example, current documentation (see [here](https://huggingface.co/docs/datasets/v2.17.1/en/nlp_process#map)) clearly state to "set `return_tensors="np"` when you tokenize your text" to have Numpy arrays. ### Steps to reproduce the bug ```py # %%% import datasets import numpy as np import tensorflow as tf import torch from transformers import AutoTokenizer # %% ds = datasets.load_dataset("cnn_dailymail", "1.0.0", split="train[:1%]") tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") #%% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** no map, return_tensors={return_tensors} **********") _ds = tokenizer(ds["article"], return_tensors=return_tensors, truncation=True, padding=True) print('Type <input_ids>:', type(_ds["input_ids"])) # %% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** map, return_tensors={return_tensors} **********") _ds = ds.map( lambda examples: tokenizer(examples["article"], return_tensors=return_tensors, truncation=True, padding=True), batched=True, remove_columns=["article"], ) print('Type <input_ids>:', type(_ds[0]["input_ids"])) ``` ### Expected behavior The output from the script above. I would expect the second half to be the same. ``` ********** no map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** no map, return_tensors=np ********** Type <input_ids>: <class 'numpy.ndarray'> ********** no map, return_tensors=pt ********** Type <input_ids>: <class 'torch.Tensor'> ********** no map, return_tensors=tf ********** Type <input_ids>: <class 'tensorflow.python.framework.ops.EagerTensor'> ********** no map, return_tensors=jax ********** Type <input_ids>: <class 'jaxlib.xla_extension.ArrayImpl'> ********** map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=np ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=pt ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=tf ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=jax ********** Type <input_ids>: <class 'list'> ``` ### Environment info - `datasets` version: 2.17.1 - Platform: Redacted (linux) - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0 Hi, this is expected behavior since all the tensors are converted to Arrow data (the storage type behind a Dataset). To get pytorch tensors back, you can set the dataset format to "torch": ```python ds = ds.with_format("torch") ```
[ 0.07457982003688812, -0.4844936728477478, 0.07097327709197998, 0.12269885092973709, 0.2573975920677185, -0.08247978240251541, 0.5117505788803101, 0.2314727008342743, 0.14415009319782257, 0.09643102437257767, 0.14743316173553467, 0.7844662070274353, -0.14292484521865845, -0.2394830733537674, 0.15896502137184143, -0.1498585194349289, 0.1414104402065277, 0.14088569581508636, 0.12746888399124146, -0.2564214766025543, -0.3757319152355194, 0.30456647276878357, -0.32796478271484375, 0.10396610200405121, -0.41968411207199097, 0.03342345356941223, 0.15595602989196777, -0.40679478645324707, -0.003789396956562996, -0.22738443315029144, 0.32416048645973206, -0.25672411918640137, 0.3015380799770355, 0.19533520936965942, -0.00011606035695876926, 0.0725969672203064, 0.24142998456954956, 0.05435660481452942, 0.4120672047138214, -0.3790985941886902, 0.3769567310810089, -0.12412407994270325, -0.018666354939341545, -0.18398693203926086, -0.042763400822877884, -0.061691392213106155, 0.09379702061414719, 0.10248070955276489, 0.37894582748413086, 0.24036145210266113, 0.15558092296123505, 0.6926343441009521, 0.2346077710390091, 0.28654465079307556, -0.15729129314422607, 0.10493522137403488, -0.18740245699882507, -0.29031676054000854, -0.1220044195652008, -0.10893721133470535, 0.04279429838061333, 0.15895509719848633, -0.15215380489826202, -0.07817363739013672, 0.1931929588317871, 0.27918633818626404, 0.023778971284627914, -0.322048157453537, -0.21431738138198853, 0.032244972884655, 0.12352854758501053, 0.12900100648403168, -0.21429894864559174, -0.23857906460762024, -0.2333238571882248, -0.1007225438952446, 0.11149777472019196, -0.20507779717445374, -0.05628107488155365, -0.013479962944984436, -0.21961195766925812, 0.2082042396068573, -0.15794898569583893, 0.4195272922515869, -0.3683411478996277, 0.40145087242126465, 0.012368688359856606, 0.14976078271865845, 0.049439139664173126, -0.04132581502199173, -0.15622681379318237, -0.1534349024295807, 0.4929251968860626, 0.49579963088035583, -0.19006086885929108, -0.3475874364376068, 0.23811811208724976, -0.7333507537841797, -0.01387355849146843, -0.3206523060798645, 0.03925388678908348, 0.3010919988155365, -0.40176859498023987, 0.21963003277778625, -0.007522858679294586, 0.33273816108703613, -0.0993061289191246, 0.5627621412277222, 0.1728142350912094, -0.20845481753349304, 0.09522907435894012, -0.020614556968212128, -0.16676947474479675, 0.24933546781539917, -0.06553858518600464, -0.11969581991434097, 0.28891080617904663, 0.1470218449831009, -0.02680996060371399, -0.10528667271137238, -0.31774288415908813, 0.13029581308364868, 0.0011022118851542473, 0.09545230865478516, -0.10283178091049194, 0.35469719767570496, 0.11515691876411438, 0.1478608101606369, -0.1818751096725464, 0.2012067586183548, -0.16731593012809753, -0.3530445098876953, -0.27644193172454834, -0.04923579841852188, 0.221322700381279, 0.4501580595970154, 0.13794170320034027, 0.009080185554921627, -0.023632220923900604, 0.07239792495965958, 0.04505975544452667, 0.031937286257743835, 0.3069552779197693, 0.026998912915587425, -0.3970957100391388, 0.3626839518547058, 0.09358352422714233, -0.014906387776136398, -0.23441651463508606, 0.12111955136060715, -0.46650010347366333, -0.14705303311347961, 0.13958710432052612, 0.11734215170145035, -0.07976118475198746, -0.23293331265449524, -0.17116796970367432, 0.15305612981319427, 0.42201024293899536, 0.03437427058815956, 0.0371730700135231, -0.2969965934753418, -0.2582258880138397, -0.2635462284088135, 0.2046574503183365, -0.09375646710395813, 0.08797895908355713, -0.3399493992328644, 0.0740516409277916, 0.29648807644844055, 0.43777140974998474, 0.6169160008430481, -0.12882855534553528, 0.11886074393987656, -0.1176752969622612, 0.6486350893974304, 0.22389991581439972, -0.07934868335723877, -0.30663615465164185, -0.1317632496356964, -0.0180283784866333, 0.20540229976177216, -0.22628140449523926, -0.030134085565805435, 0.2149377167224884, 0.10838688164949417, 0.3287198543548584, 0.45413821935653687, -0.0962710753083229, 0.3431589603424072, -0.13519687950611115, 0.002036677673459053, 0.41476088762283325, -0.12795569002628326, 0.2789374589920044, 0.20055939257144928, -0.20985859632492065, 0.2579733729362488, 0.1673489511013031, -0.005739700049161911, 0.0035469327121973038, -0.06365612894296646, 0.1627756804227829, -0.008203878998756409, 0.021166732534766197, -0.0707688182592392, -0.07696466892957687, 0.06932754814624786, -0.21902020275592804, 0.34974563121795654, -0.03825284540653229, -0.10670865327119827, 0.0926024541258812, 0.033937305212020874, -0.029060322791337967, -0.0930451899766922, 0.13863743841648102, 0.05674225091934204, -0.3787827789783478, 0.2430068403482437, -0.1044396311044693, -0.33486756682395935, 0.1174497902393341, 0.21406249701976776, -0.24455593526363373, 0.17479683458805084, -0.020096270367503166, -0.16132470965385437, -0.3215315043926239, 0.3894968032836914, 0.21081247925758362, -0.11831942200660706, -0.03816947713494301, -0.047666728496551514, -0.15331988036632538, 0.09724324196577072, -0.383090615272522, 0.22139103710651398, 0.3220737874507904, -0.18939101696014404, -0.1209566667675972, 0.45453977584838867, -0.04097064211964607, -0.22224140167236328, 0.2857520878314972, 0.3483256697654724, 0.38208284974098206, 0.017203636467456818, -0.270318865776062, 0.16725602746009827, 0.0048357415944337845, 0.023186732083559036, -0.10131113976240158, -0.08691754937171936, -0.3129715621471405, -0.0644562840461731, 0.006347943097352982, -0.04179731011390686, -0.15775740146636963, -0.06813841313123703, 0.8873815536499023, -0.047464676201343536, 0.17791037261486053, 0.1045447438955307, -0.2752062678337097, -0.025598065927624702, -0.04533512145280838, -0.31125661730766296, 0.12043512612581253, 0.0813937708735466, 0.2794066071510315, -0.18527384102344513, -0.17927025258541107, -0.08210158348083496, 0.20082685351371765, 0.1473502814769745, 0.06346394866704941, -0.012051433324813843, 0.14773257076740265, 0.11602997034788132, -0.35412290692329407, 0.36651912331581116, -0.03591717779636383, -0.06800738722085953, -0.09652142226696014, 0.022652728483080864, -0.12406016886234283, 0.12256509810686111, -0.18276455998420715, -0.3122790455818176, -0.21106964349746704, -0.2024184912443161, 0.007553918287158012, 0.044348884373903275, -0.061506159603595734, 0.3087812662124634, 0.2690656781196594, 0.16579073667526245, 0.20814745128154755, -0.21372514963150024, -0.19373302161693573, 0.05924036726355553, -0.28828519582748413, 0.03386674076318741, -0.08187811821699142, -0.4473145008087158, 0.18461400270462036, 0.1876421868801117, -0.029643269255757332, -0.008325472474098206, -0.6121273040771484, 0.1276611089706421, -0.3583447337150574, -0.10514813661575317, 0.07541565597057343, 0.06768257915973663, -0.23837104439735413, -0.08054780215024948, 0.2456757128238678, -0.2881135046482086, -0.14107713103294373, 0.21769307553768158, 0.12977485358715057, -0.0020510386675596237, -0.28576982021331787, -0.46509823203086853, 0.020301541313529015, -0.23047158122062683, 0.36279815435409546, -0.22147366404533386, 0.0387166365981102, 0.42103394865989685, -0.17702041566371918, 0.21237142384052277, -0.3550998866558075, -0.05470176786184311, -0.20511643588542938, 0.08506914973258972, 0.6055033206939697, -0.1352146714925766, -0.26839807629585266, -0.24298034608364105, -0.11260531842708588, 0.15656228363513947, 0.085601806640625, 0.038206055760383606, 0.06307794898748398, -0.209939107298851, 0.12818551063537598, 0.05483647435903549, 0.013111491687595844, 0.45576924085617065, -0.020258231088519096, 0.0718359723687172, -0.1636584997177124, -0.024753356352448463, 0.18727028369903564, 0.27669286727905273, 0.21041801571846008, 0.1429276019334793, 0.12248151004314423, 0.2896213233470917, 0.5057831406593323, 0.11778007447719574, -0.5478476881980896, 0.264775812625885, -0.0008811689913272858, -0.0704440027475357, -0.013862445950508118, -0.3146236538887024, -0.053312335163354874, -0.16416579484939575, 0.08196011930704117, 0.12580986320972443, -0.16524720191955566, -0.4882994592189789, 0.1025368869304657, 0.08736556768417358, -0.31063827872276306, -0.2785555422306061, 0.2741636633872986, 0.11348328739404678, 0.24205061793327332, 0.0995735228061676, 0.20581865310668945, -0.5093991756439209, -0.3482537567615509, 0.09943993389606476, 0.06031745299696922, 0.38193652033805847, 0.051501911133527756, -0.5069307088851929, -0.1808832436800003, -0.6254274249076843, 0.3240540027618408, 0.07680052518844604, 0.3556974232196808, 0.1612851917743683, -0.2626423239707947, -0.017062164843082428, 0.3077046573162079, 0.6334487199783325, 0.00411442294716835, -0.23805738985538483, -0.09852243959903717, -0.13475638628005981, -0.3037184774875641, -0.01948501355946064, -0.2561945617198944, -0.04632409289479256, 0.4199938178062439, 0.7304472923278809, -0.3562161922454834, -0.20096270740032196, -0.21210908889770508, -0.15637698769569397, 0.0046327076852321625, -0.02822742611169815, -0.18821509182453156, 0.08154324442148209, -0.14668557047843933, 0.1193479597568512, 0.27683329582214355, 0.29435813426971436, -0.034969717264175415, -0.5264116525650024, -0.061392441391944885, -0.13852423429489136, 0.014797411859035492, 0.018684696406126022, 0.30439552664756775, 0.07923294603824615, -0.09653933346271515, 0.12459643185138702, 0.2365228235721588, -0.06067364662885666, -0.19169218838214874, -0.044352609664201736, -0.3788641691207886, 0.014755699783563614, 0.020565077662467957, 0.1888248324394226, 0.1976851224899292, -0.13989795744419098, 0.1620682179927826, 0.029250159859657288, 0.13632351160049438, -0.24653825163841248, 0.35423967242240906, 0.5853123068809509, 0.30604928731918335, -0.2507944703102112, -0.07883155345916748, 0.24057602882385254, -0.03743671625852585, -0.15168720483779907, 0.31208911538124084, -0.11161094903945923, -0.43653038144111633, 0.5196312069892883, 0.08940857648849487, 0.650520384311676, -0.107062429189682, 0.26887962222099304, 0.23331871628761292, 0.4066582918167114, 0.5651575922966003, -0.2891954183578491, 0.3839530944824219, -0.21975010633468628, 0.1797810047864914, -0.06685559451580048, -0.1227809339761734, -0.05656790733337402, 0.1531074047088623, -0.060574356466531754, -0.0042329467833042145, 0.34810787439346313, 0.5751927495002747, 0.08574622869491577, 0.1741504967212677, 0.16529130935668945, -0.3466359078884125, -0.051534757018089294, 0.029950197786092758, -0.05711791664361954, 0.40035367012023926, -0.011667786166071892, -0.2521849274635315, -0.0553646944463253, -0.5144322514533997, 0.0040245577692985535, -0.05045825242996216, -0.4507969915866852, 0.21688975393772125, 0.4900257885456085, 0.14675700664520264, 0.30917829275131226, 0.35701805353164673, 0.37132805585861206, 0.1696828156709671, -0.3330294191837311, -0.12605565786361694, -0.05618118494749069, 0.06090574339032173, -0.016893237829208374, -0.2937597632408142, 0.2930683195590973, 0.12382001429796219, -0.12932232022285461, -0.17287099361419678, -0.045901767909526825, -0.1529494971036911, -0.47659680247306824, -0.01825142651796341, 0.07451432943344116, -0.22365742921829224, 0.0452023483812809, -0.07920797169208527, -0.16466781497001648, -0.0952887237071991, 0.10582353174686432, -0.11773821711540222, -0.10743023455142975, 0.3404192626476288, 0.11721597611904144, -0.08222322165966034, 0.09827180206775665, 0.20052307844161987, 0.01362111046910286, -0.1697332113981247, 0.30893856287002563, -0.022762995213270187, -0.20858559012413025, -0.10943525284528732, -0.015489213168621063, 0.2336525022983551, -0.3075716197490692, 0.14171408116817474, -0.05569181963801384, -0.2411378026008606, -0.020298883318901062, 0.3932047486305237, -0.1039033979177475, -0.09482421725988388, -0.3943277895450592, -0.22000426054000854, -0.3877423405647278, 0.34761136770248413, -0.22915975749492645, 0.26955583691596985, 0.08628524094820023, 0.6067407727241516, 0.04387956112623215, -0.12378628551959991, -0.25997209548950195, 0.040375880897045135, -0.029502300545573235, 0.28096598386764526, -0.20302337408065796, -0.17100253701210022, 0.2856200337409973, -0.11322155594825745, 0.031137922778725624, 0.3868885636329651, -0.1936519742012024, -0.12679368257522583, -0.14235864579677582, 0.12422052025794983, 0.26329052448272705, -0.09090029448270798, -0.0040649473667144775, 0.047858476638793945, -0.06908425688743591, -0.3061056435108185, 0.08938367664813995, -0.09628669917583466, -0.07088898122310638, 0.3752935528755188, 0.017166990786790848, 0.43903422355651855, 0.19054628908634186, -0.11470624804496765, -0.14917120337486267, -0.1269206553697586, 0.1214691549539566, 0.1773497760295868, -0.005545968189835548, -0.005016982555389404, -0.2925244867801666, -0.02507062256336212, 0.19254142045974731, 0.19331151247024536, 0.35240787267684937, -0.25054097175598145, -0.3715950846672058, -0.06342410296201706, -0.0703183114528656, -0.22800415754318237, -0.2603514790534973, -0.3261788487434387, 0.14196422696113586, 0.1900406926870346, -0.20289501547813416, 0.03931387886404991, 0.24387530982494354, 0.08043080568313599, 0.1481703668832779, 0.1666901856660843, 0.1342974156141281, 0.2824665307998657, -0.13724614679813385, 0.014288242906332016, 0.3221513628959656, -0.1977963000535965, 0.16678094863891602, 0.19145764410495758, -0.16424913704395294, 0.22108979523181915, 0.1928691565990448, -0.12388819456100464, -0.054184623062610626, 0.1325484812259674, 0.11534784734249115, 0.29362204670906067, -0.16705027222633362, 0.08528272807598114, 0.4004896581172943, -0.06813929975032806, -0.26716148853302, -0.027737274765968323, -0.007488638162612915, 0.46682247519493103, -0.002001442015171051, 0.4406740069389343, 0.040698084980249405, -0.18522223830223083, -0.18734480440616608, 0.2649044990539551, -0.4972285032272339, -0.008476205170154572, -0.2965081036090851, 0.03477773070335388, 0.052416905760765076, -0.2998095452785492, -0.060725171118974686, 0.024326786398887634, 0.02793184667825699, 0.08208273351192474, -0.02250576764345169, 0.06345579028129578, -0.038451142609119415, -0.09982758015394211, 0.2848286032676697, -0.001611407846212387, 0.13212688267230988, -0.35909968614578247, -0.03878746181726456, -0.30690062046051025, 0.17116253077983856, 0.044367000460624695, 0.17651279270648956, -0.28016409277915955, 0.2446954846382141, -0.11633226275444031, -0.11121876537799835, -0.045034341514110565, 0.3322799503803253, 0.2526780366897583, -0.0776858925819397, -0.09630075097084045, 0.03262578696012497, -0.12106640636920929, -0.27846887707710266, -0.2931671738624573, 0.23239924013614655, 0.013244524598121643, 0.620560884475708, -0.21469394862651825, -0.3127196431159973, -0.16840997338294983, 0.022865355014801025, -0.203637033700943, 0.24875213205814362, 0.466356486082077, 0.12595818936824799, 0.10318068414926529, -0.07477086782455444, 0.06945359706878662, 0.006700238212943077, 0.10046271979808807, 0.09223437309265137, 0.06597088277339935, -0.29963165521621704, 0.11747339367866516, -0.27598121762275696, 0.4432152509689331, 0.4231123626232147, 0.31373822689056396, 0.04552311822772026, 0.029349179938435555, 0.29672956466674805, -0.033071257174015045, 0.08250849694013596, -0.3297325074672699, -0.048776235431432724, 0.08038675785064697, -0.0002350248396396637, 0.09124065935611725, -0.3785104751586914, -0.04316180944442749, 0.15777964890003204, -0.1114404946565628, 0.19779279828071594, -0.03874232992529869, -0.03137985244393349, -0.3341137170791626, 0.3632206916809082, -0.1573977917432785, 0.2728652358055115, 0.28470784425735474, 0.408265620470047, 0.22561118006706238, -0.09329072386026382, -0.07827691733837128, 0.056301411241292953, -0.1151822954416275, -0.2899216115474701, 0.05395560711622238, -0.34781408309936523, 0.45576727390289307, -0.10847704857587814, -0.11597339808940887, -0.4277273714542389, -0.0722898468375206, 0.2581613063812256, -0.5603621006011963, -0.38679075241088867, 0.31627944111824036, -0.43723270297050476, -0.1554218828678131, 0.10268572717905045, 0.5329199433326721, 0.0570947639644146, 0.02116919495165348, -0.11283697932958603, -0.49174797534942627, 0.3975365161895752, -0.5830522179603577, -0.3064776360988617, -0.11154528707265854, 0.024886831641197205, 0.15345309674739838, -0.005991071462631226, -0.9105038046836853, -0.4159433841705322, 0.22649244964122772, -0.04086199402809143, -0.2596544027328491, -0.023132402449846268, 0.170741006731987, -0.014898940920829773, -0.30114999413490295, 0.2196161448955536, 0.0928516536951065, -0.06691110879182816, 0.1518162041902542, -0.22171258926391602 ]
https://github.com/huggingface/datasets/issues/6688
Tensor type (e.g. from `return_tensors`) ignored in map
Thanks. Just one additional question. During the pipeline `<framework> -> arrow -> <framework>`, does `.with_format` zero-copies the tensors or is it a deep copy? And is this behavior framework-dependent? Thanks again.
### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., for caching/Arrow compatibility/etc.) it should be clearly documented. For example, current documentation (see [here](https://huggingface.co/docs/datasets/v2.17.1/en/nlp_process#map)) clearly state to "set `return_tensors="np"` when you tokenize your text" to have Numpy arrays. ### Steps to reproduce the bug ```py # %%% import datasets import numpy as np import tensorflow as tf import torch from transformers import AutoTokenizer # %% ds = datasets.load_dataset("cnn_dailymail", "1.0.0", split="train[:1%]") tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") #%% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** no map, return_tensors={return_tensors} **********") _ds = tokenizer(ds["article"], return_tensors=return_tensors, truncation=True, padding=True) print('Type <input_ids>:', type(_ds["input_ids"])) # %% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** map, return_tensors={return_tensors} **********") _ds = ds.map( lambda examples: tokenizer(examples["article"], return_tensors=return_tensors, truncation=True, padding=True), batched=True, remove_columns=["article"], ) print('Type <input_ids>:', type(_ds[0]["input_ids"])) ``` ### Expected behavior The output from the script above. I would expect the second half to be the same. ``` ********** no map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** no map, return_tensors=np ********** Type <input_ids>: <class 'numpy.ndarray'> ********** no map, return_tensors=pt ********** Type <input_ids>: <class 'torch.Tensor'> ********** no map, return_tensors=tf ********** Type <input_ids>: <class 'tensorflow.python.framework.ops.EagerTensor'> ********** no map, return_tensors=jax ********** Type <input_ids>: <class 'jaxlib.xla_extension.ArrayImpl'> ********** map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=np ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=pt ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=tf ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=jax ********** Type <input_ids>: <class 'list'> ``` ### Environment info - `datasets` version: 2.17.1 - Platform: Redacted (linux) - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0
31
Tensor type (e.g. from `return_tensors`) ignored in map ### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., for caching/Arrow compatibility/etc.) it should be clearly documented. For example, current documentation (see [here](https://huggingface.co/docs/datasets/v2.17.1/en/nlp_process#map)) clearly state to "set `return_tensors="np"` when you tokenize your text" to have Numpy arrays. ### Steps to reproduce the bug ```py # %%% import datasets import numpy as np import tensorflow as tf import torch from transformers import AutoTokenizer # %% ds = datasets.load_dataset("cnn_dailymail", "1.0.0", split="train[:1%]") tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") #%% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** no map, return_tensors={return_tensors} **********") _ds = tokenizer(ds["article"], return_tensors=return_tensors, truncation=True, padding=True) print('Type <input_ids>:', type(_ds["input_ids"])) # %% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** map, return_tensors={return_tensors} **********") _ds = ds.map( lambda examples: tokenizer(examples["article"], return_tensors=return_tensors, truncation=True, padding=True), batched=True, remove_columns=["article"], ) print('Type <input_ids>:', type(_ds[0]["input_ids"])) ``` ### Expected behavior The output from the script above. I would expect the second half to be the same. ``` ********** no map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** no map, return_tensors=np ********** Type <input_ids>: <class 'numpy.ndarray'> ********** no map, return_tensors=pt ********** Type <input_ids>: <class 'torch.Tensor'> ********** no map, return_tensors=tf ********** Type <input_ids>: <class 'tensorflow.python.framework.ops.EagerTensor'> ********** no map, return_tensors=jax ********** Type <input_ids>: <class 'jaxlib.xla_extension.ArrayImpl'> ********** map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=np ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=pt ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=tf ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=jax ********** Type <input_ids>: <class 'list'> ``` ### Environment info - `datasets` version: 2.17.1 - Platform: Redacted (linux) - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0 Thanks. Just one additional question. During the pipeline `<framework> -> arrow -> <framework>`, does `.with_format` zero-copies the tensors or is it a deep copy? And is this behavior framework-dependent? Thanks again.
[ 0.07457982003688812, -0.4844936728477478, 0.07097327709197998, 0.12269885092973709, 0.2573975920677185, -0.08247978240251541, 0.5117505788803101, 0.2314727008342743, 0.14415009319782257, 0.09643102437257767, 0.14743316173553467, 0.7844662070274353, -0.14292484521865845, -0.2394830733537674, 0.15896502137184143, -0.1498585194349289, 0.1414104402065277, 0.14088569581508636, 0.12746888399124146, -0.2564214766025543, -0.3757319152355194, 0.30456647276878357, -0.32796478271484375, 0.10396610200405121, -0.41968411207199097, 0.03342345356941223, 0.15595602989196777, -0.40679478645324707, -0.003789396956562996, -0.22738443315029144, 0.32416048645973206, -0.25672411918640137, 0.3015380799770355, 0.19533520936965942, -0.00011606035695876926, 0.0725969672203064, 0.24142998456954956, 0.05435660481452942, 0.4120672047138214, -0.3790985941886902, 0.3769567310810089, -0.12412407994270325, -0.018666354939341545, -0.18398693203926086, -0.042763400822877884, -0.061691392213106155, 0.09379702061414719, 0.10248070955276489, 0.37894582748413086, 0.24036145210266113, 0.15558092296123505, 0.6926343441009521, 0.2346077710390091, 0.28654465079307556, -0.15729129314422607, 0.10493522137403488, -0.18740245699882507, -0.29031676054000854, -0.1220044195652008, -0.10893721133470535, 0.04279429838061333, 0.15895509719848633, -0.15215380489826202, -0.07817363739013672, 0.1931929588317871, 0.27918633818626404, 0.023778971284627914, -0.322048157453537, -0.21431738138198853, 0.032244972884655, 0.12352854758501053, 0.12900100648403168, -0.21429894864559174, -0.23857906460762024, -0.2333238571882248, -0.1007225438952446, 0.11149777472019196, -0.20507779717445374, -0.05628107488155365, -0.013479962944984436, -0.21961195766925812, 0.2082042396068573, -0.15794898569583893, 0.4195272922515869, -0.3683411478996277, 0.40145087242126465, 0.012368688359856606, 0.14976078271865845, 0.049439139664173126, -0.04132581502199173, -0.15622681379318237, -0.1534349024295807, 0.4929251968860626, 0.49579963088035583, -0.19006086885929108, -0.3475874364376068, 0.23811811208724976, -0.7333507537841797, -0.01387355849146843, -0.3206523060798645, 0.03925388678908348, 0.3010919988155365, -0.40176859498023987, 0.21963003277778625, -0.007522858679294586, 0.33273816108703613, -0.0993061289191246, 0.5627621412277222, 0.1728142350912094, -0.20845481753349304, 0.09522907435894012, -0.020614556968212128, -0.16676947474479675, 0.24933546781539917, -0.06553858518600464, -0.11969581991434097, 0.28891080617904663, 0.1470218449831009, -0.02680996060371399, -0.10528667271137238, -0.31774288415908813, 0.13029581308364868, 0.0011022118851542473, 0.09545230865478516, -0.10283178091049194, 0.35469719767570496, 0.11515691876411438, 0.1478608101606369, -0.1818751096725464, 0.2012067586183548, -0.16731593012809753, -0.3530445098876953, -0.27644193172454834, -0.04923579841852188, 0.221322700381279, 0.4501580595970154, 0.13794170320034027, 0.009080185554921627, -0.023632220923900604, 0.07239792495965958, 0.04505975544452667, 0.031937286257743835, 0.3069552779197693, 0.026998912915587425, -0.3970957100391388, 0.3626839518547058, 0.09358352422714233, -0.014906387776136398, -0.23441651463508606, 0.12111955136060715, -0.46650010347366333, -0.14705303311347961, 0.13958710432052612, 0.11734215170145035, -0.07976118475198746, -0.23293331265449524, -0.17116796970367432, 0.15305612981319427, 0.42201024293899536, 0.03437427058815956, 0.0371730700135231, -0.2969965934753418, -0.2582258880138397, -0.2635462284088135, 0.2046574503183365, -0.09375646710395813, 0.08797895908355713, -0.3399493992328644, 0.0740516409277916, 0.29648807644844055, 0.43777140974998474, 0.6169160008430481, -0.12882855534553528, 0.11886074393987656, -0.1176752969622612, 0.6486350893974304, 0.22389991581439972, -0.07934868335723877, -0.30663615465164185, -0.1317632496356964, -0.0180283784866333, 0.20540229976177216, -0.22628140449523926, -0.030134085565805435, 0.2149377167224884, 0.10838688164949417, 0.3287198543548584, 0.45413821935653687, -0.0962710753083229, 0.3431589603424072, -0.13519687950611115, 0.002036677673459053, 0.41476088762283325, -0.12795569002628326, 0.2789374589920044, 0.20055939257144928, -0.20985859632492065, 0.2579733729362488, 0.1673489511013031, -0.005739700049161911, 0.0035469327121973038, -0.06365612894296646, 0.1627756804227829, -0.008203878998756409, 0.021166732534766197, -0.0707688182592392, -0.07696466892957687, 0.06932754814624786, -0.21902020275592804, 0.34974563121795654, -0.03825284540653229, -0.10670865327119827, 0.0926024541258812, 0.033937305212020874, -0.029060322791337967, -0.0930451899766922, 0.13863743841648102, 0.05674225091934204, -0.3787827789783478, 0.2430068403482437, -0.1044396311044693, -0.33486756682395935, 0.1174497902393341, 0.21406249701976776, -0.24455593526363373, 0.17479683458805084, -0.020096270367503166, -0.16132470965385437, -0.3215315043926239, 0.3894968032836914, 0.21081247925758362, -0.11831942200660706, -0.03816947713494301, -0.047666728496551514, -0.15331988036632538, 0.09724324196577072, -0.383090615272522, 0.22139103710651398, 0.3220737874507904, -0.18939101696014404, -0.1209566667675972, 0.45453977584838867, -0.04097064211964607, -0.22224140167236328, 0.2857520878314972, 0.3483256697654724, 0.38208284974098206, 0.017203636467456818, -0.270318865776062, 0.16725602746009827, 0.0048357415944337845, 0.023186732083559036, -0.10131113976240158, -0.08691754937171936, -0.3129715621471405, -0.0644562840461731, 0.006347943097352982, -0.04179731011390686, -0.15775740146636963, -0.06813841313123703, 0.8873815536499023, -0.047464676201343536, 0.17791037261486053, 0.1045447438955307, -0.2752062678337097, -0.025598065927624702, -0.04533512145280838, -0.31125661730766296, 0.12043512612581253, 0.0813937708735466, 0.2794066071510315, -0.18527384102344513, -0.17927025258541107, -0.08210158348083496, 0.20082685351371765, 0.1473502814769745, 0.06346394866704941, -0.012051433324813843, 0.14773257076740265, 0.11602997034788132, -0.35412290692329407, 0.36651912331581116, -0.03591717779636383, -0.06800738722085953, -0.09652142226696014, 0.022652728483080864, -0.12406016886234283, 0.12256509810686111, -0.18276455998420715, -0.3122790455818176, -0.21106964349746704, -0.2024184912443161, 0.007553918287158012, 0.044348884373903275, -0.061506159603595734, 0.3087812662124634, 0.2690656781196594, 0.16579073667526245, 0.20814745128154755, -0.21372514963150024, -0.19373302161693573, 0.05924036726355553, -0.28828519582748413, 0.03386674076318741, -0.08187811821699142, -0.4473145008087158, 0.18461400270462036, 0.1876421868801117, -0.029643269255757332, -0.008325472474098206, -0.6121273040771484, 0.1276611089706421, -0.3583447337150574, -0.10514813661575317, 0.07541565597057343, 0.06768257915973663, -0.23837104439735413, -0.08054780215024948, 0.2456757128238678, -0.2881135046482086, -0.14107713103294373, 0.21769307553768158, 0.12977485358715057, -0.0020510386675596237, -0.28576982021331787, -0.46509823203086853, 0.020301541313529015, -0.23047158122062683, 0.36279815435409546, -0.22147366404533386, 0.0387166365981102, 0.42103394865989685, -0.17702041566371918, 0.21237142384052277, -0.3550998866558075, -0.05470176786184311, -0.20511643588542938, 0.08506914973258972, 0.6055033206939697, -0.1352146714925766, -0.26839807629585266, -0.24298034608364105, -0.11260531842708588, 0.15656228363513947, 0.085601806640625, 0.038206055760383606, 0.06307794898748398, -0.209939107298851, 0.12818551063537598, 0.05483647435903549, 0.013111491687595844, 0.45576924085617065, -0.020258231088519096, 0.0718359723687172, -0.1636584997177124, -0.024753356352448463, 0.18727028369903564, 0.27669286727905273, 0.21041801571846008, 0.1429276019334793, 0.12248151004314423, 0.2896213233470917, 0.5057831406593323, 0.11778007447719574, -0.5478476881980896, 0.264775812625885, -0.0008811689913272858, -0.0704440027475357, -0.013862445950508118, -0.3146236538887024, -0.053312335163354874, -0.16416579484939575, 0.08196011930704117, 0.12580986320972443, -0.16524720191955566, -0.4882994592189789, 0.1025368869304657, 0.08736556768417358, -0.31063827872276306, -0.2785555422306061, 0.2741636633872986, 0.11348328739404678, 0.24205061793327332, 0.0995735228061676, 0.20581865310668945, -0.5093991756439209, -0.3482537567615509, 0.09943993389606476, 0.06031745299696922, 0.38193652033805847, 0.051501911133527756, -0.5069307088851929, -0.1808832436800003, -0.6254274249076843, 0.3240540027618408, 0.07680052518844604, 0.3556974232196808, 0.1612851917743683, -0.2626423239707947, -0.017062164843082428, 0.3077046573162079, 0.6334487199783325, 0.00411442294716835, -0.23805738985538483, -0.09852243959903717, -0.13475638628005981, -0.3037184774875641, -0.01948501355946064, -0.2561945617198944, -0.04632409289479256, 0.4199938178062439, 0.7304472923278809, -0.3562161922454834, -0.20096270740032196, -0.21210908889770508, -0.15637698769569397, 0.0046327076852321625, -0.02822742611169815, -0.18821509182453156, 0.08154324442148209, -0.14668557047843933, 0.1193479597568512, 0.27683329582214355, 0.29435813426971436, -0.034969717264175415, -0.5264116525650024, -0.061392441391944885, -0.13852423429489136, 0.014797411859035492, 0.018684696406126022, 0.30439552664756775, 0.07923294603824615, -0.09653933346271515, 0.12459643185138702, 0.2365228235721588, -0.06067364662885666, -0.19169218838214874, -0.044352609664201736, -0.3788641691207886, 0.014755699783563614, 0.020565077662467957, 0.1888248324394226, 0.1976851224899292, -0.13989795744419098, 0.1620682179927826, 0.029250159859657288, 0.13632351160049438, -0.24653825163841248, 0.35423967242240906, 0.5853123068809509, 0.30604928731918335, -0.2507944703102112, -0.07883155345916748, 0.24057602882385254, -0.03743671625852585, -0.15168720483779907, 0.31208911538124084, -0.11161094903945923, -0.43653038144111633, 0.5196312069892883, 0.08940857648849487, 0.650520384311676, -0.107062429189682, 0.26887962222099304, 0.23331871628761292, 0.4066582918167114, 0.5651575922966003, -0.2891954183578491, 0.3839530944824219, -0.21975010633468628, 0.1797810047864914, -0.06685559451580048, -0.1227809339761734, -0.05656790733337402, 0.1531074047088623, -0.060574356466531754, -0.0042329467833042145, 0.34810787439346313, 0.5751927495002747, 0.08574622869491577, 0.1741504967212677, 0.16529130935668945, -0.3466359078884125, -0.051534757018089294, 0.029950197786092758, -0.05711791664361954, 0.40035367012023926, -0.011667786166071892, -0.2521849274635315, -0.0553646944463253, -0.5144322514533997, 0.0040245577692985535, -0.05045825242996216, -0.4507969915866852, 0.21688975393772125, 0.4900257885456085, 0.14675700664520264, 0.30917829275131226, 0.35701805353164673, 0.37132805585861206, 0.1696828156709671, -0.3330294191837311, -0.12605565786361694, -0.05618118494749069, 0.06090574339032173, -0.016893237829208374, -0.2937597632408142, 0.2930683195590973, 0.12382001429796219, -0.12932232022285461, -0.17287099361419678, -0.045901767909526825, -0.1529494971036911, -0.47659680247306824, -0.01825142651796341, 0.07451432943344116, -0.22365742921829224, 0.0452023483812809, -0.07920797169208527, -0.16466781497001648, -0.0952887237071991, 0.10582353174686432, -0.11773821711540222, -0.10743023455142975, 0.3404192626476288, 0.11721597611904144, -0.08222322165966034, 0.09827180206775665, 0.20052307844161987, 0.01362111046910286, -0.1697332113981247, 0.30893856287002563, -0.022762995213270187, -0.20858559012413025, -0.10943525284528732, -0.015489213168621063, 0.2336525022983551, -0.3075716197490692, 0.14171408116817474, -0.05569181963801384, -0.2411378026008606, -0.020298883318901062, 0.3932047486305237, -0.1039033979177475, -0.09482421725988388, -0.3943277895450592, -0.22000426054000854, -0.3877423405647278, 0.34761136770248413, -0.22915975749492645, 0.26955583691596985, 0.08628524094820023, 0.6067407727241516, 0.04387956112623215, -0.12378628551959991, -0.25997209548950195, 0.040375880897045135, -0.029502300545573235, 0.28096598386764526, -0.20302337408065796, -0.17100253701210022, 0.2856200337409973, -0.11322155594825745, 0.031137922778725624, 0.3868885636329651, -0.1936519742012024, -0.12679368257522583, -0.14235864579677582, 0.12422052025794983, 0.26329052448272705, -0.09090029448270798, -0.0040649473667144775, 0.047858476638793945, -0.06908425688743591, -0.3061056435108185, 0.08938367664813995, -0.09628669917583466, -0.07088898122310638, 0.3752935528755188, 0.017166990786790848, 0.43903422355651855, 0.19054628908634186, -0.11470624804496765, -0.14917120337486267, -0.1269206553697586, 0.1214691549539566, 0.1773497760295868, -0.005545968189835548, -0.005016982555389404, -0.2925244867801666, -0.02507062256336212, 0.19254142045974731, 0.19331151247024536, 0.35240787267684937, -0.25054097175598145, -0.3715950846672058, -0.06342410296201706, -0.0703183114528656, -0.22800415754318237, -0.2603514790534973, -0.3261788487434387, 0.14196422696113586, 0.1900406926870346, -0.20289501547813416, 0.03931387886404991, 0.24387530982494354, 0.08043080568313599, 0.1481703668832779, 0.1666901856660843, 0.1342974156141281, 0.2824665307998657, -0.13724614679813385, 0.014288242906332016, 0.3221513628959656, -0.1977963000535965, 0.16678094863891602, 0.19145764410495758, -0.16424913704395294, 0.22108979523181915, 0.1928691565990448, -0.12388819456100464, -0.054184623062610626, 0.1325484812259674, 0.11534784734249115, 0.29362204670906067, -0.16705027222633362, 0.08528272807598114, 0.4004896581172943, -0.06813929975032806, -0.26716148853302, -0.027737274765968323, -0.007488638162612915, 0.46682247519493103, -0.002001442015171051, 0.4406740069389343, 0.040698084980249405, -0.18522223830223083, -0.18734480440616608, 0.2649044990539551, -0.4972285032272339, -0.008476205170154572, -0.2965081036090851, 0.03477773070335388, 0.052416905760765076, -0.2998095452785492, -0.060725171118974686, 0.024326786398887634, 0.02793184667825699, 0.08208273351192474, -0.02250576764345169, 0.06345579028129578, -0.038451142609119415, -0.09982758015394211, 0.2848286032676697, -0.001611407846212387, 0.13212688267230988, -0.35909968614578247, -0.03878746181726456, -0.30690062046051025, 0.17116253077983856, 0.044367000460624695, 0.17651279270648956, -0.28016409277915955, 0.2446954846382141, -0.11633226275444031, -0.11121876537799835, -0.045034341514110565, 0.3322799503803253, 0.2526780366897583, -0.0776858925819397, -0.09630075097084045, 0.03262578696012497, -0.12106640636920929, -0.27846887707710266, -0.2931671738624573, 0.23239924013614655, 0.013244524598121643, 0.620560884475708, -0.21469394862651825, -0.3127196431159973, -0.16840997338294983, 0.022865355014801025, -0.203637033700943, 0.24875213205814362, 0.466356486082077, 0.12595818936824799, 0.10318068414926529, -0.07477086782455444, 0.06945359706878662, 0.006700238212943077, 0.10046271979808807, 0.09223437309265137, 0.06597088277339935, -0.29963165521621704, 0.11747339367866516, -0.27598121762275696, 0.4432152509689331, 0.4231123626232147, 0.31373822689056396, 0.04552311822772026, 0.029349179938435555, 0.29672956466674805, -0.033071257174015045, 0.08250849694013596, -0.3297325074672699, -0.048776235431432724, 0.08038675785064697, -0.0002350248396396637, 0.09124065935611725, -0.3785104751586914, -0.04316180944442749, 0.15777964890003204, -0.1114404946565628, 0.19779279828071594, -0.03874232992529869, -0.03137985244393349, -0.3341137170791626, 0.3632206916809082, -0.1573977917432785, 0.2728652358055115, 0.28470784425735474, 0.408265620470047, 0.22561118006706238, -0.09329072386026382, -0.07827691733837128, 0.056301411241292953, -0.1151822954416275, -0.2899216115474701, 0.05395560711622238, -0.34781408309936523, 0.45576727390289307, -0.10847704857587814, -0.11597339808940887, -0.4277273714542389, -0.0722898468375206, 0.2581613063812256, -0.5603621006011963, -0.38679075241088867, 0.31627944111824036, -0.43723270297050476, -0.1554218828678131, 0.10268572717905045, 0.5329199433326721, 0.0570947639644146, 0.02116919495165348, -0.11283697932958603, -0.49174797534942627, 0.3975365161895752, -0.5830522179603577, -0.3064776360988617, -0.11154528707265854, 0.024886831641197205, 0.15345309674739838, -0.005991071462631226, -0.9105038046836853, -0.4159433841705322, 0.22649244964122772, -0.04086199402809143, -0.2596544027328491, -0.023132402449846268, 0.170741006731987, -0.014898940920829773, -0.30114999413490295, 0.2196161448955536, 0.0928516536951065, -0.06691110879182816, 0.1518162041902542, -0.22171258926391602 ]
https://github.com/huggingface/datasets/issues/6688
Tensor type (e.g. from `return_tensors`) ignored in map
We do zero-copy Arrow <-> NumPy <-> PyTorch when the output dtype matches the original dtype, but for other frameworks it depends. For example JAX doesn't allow zero-copy NumPy -> JAX at all IIRC. Currently tokenized data are formatted using a copy though, since tokens are stored as int32 and returned as int64 torch tensors.
### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., for caching/Arrow compatibility/etc.) it should be clearly documented. For example, current documentation (see [here](https://huggingface.co/docs/datasets/v2.17.1/en/nlp_process#map)) clearly state to "set `return_tensors="np"` when you tokenize your text" to have Numpy arrays. ### Steps to reproduce the bug ```py # %%% import datasets import numpy as np import tensorflow as tf import torch from transformers import AutoTokenizer # %% ds = datasets.load_dataset("cnn_dailymail", "1.0.0", split="train[:1%]") tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") #%% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** no map, return_tensors={return_tensors} **********") _ds = tokenizer(ds["article"], return_tensors=return_tensors, truncation=True, padding=True) print('Type <input_ids>:', type(_ds["input_ids"])) # %% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** map, return_tensors={return_tensors} **********") _ds = ds.map( lambda examples: tokenizer(examples["article"], return_tensors=return_tensors, truncation=True, padding=True), batched=True, remove_columns=["article"], ) print('Type <input_ids>:', type(_ds[0]["input_ids"])) ``` ### Expected behavior The output from the script above. I would expect the second half to be the same. ``` ********** no map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** no map, return_tensors=np ********** Type <input_ids>: <class 'numpy.ndarray'> ********** no map, return_tensors=pt ********** Type <input_ids>: <class 'torch.Tensor'> ********** no map, return_tensors=tf ********** Type <input_ids>: <class 'tensorflow.python.framework.ops.EagerTensor'> ********** no map, return_tensors=jax ********** Type <input_ids>: <class 'jaxlib.xla_extension.ArrayImpl'> ********** map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=np ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=pt ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=tf ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=jax ********** Type <input_ids>: <class 'list'> ``` ### Environment info - `datasets` version: 2.17.1 - Platform: Redacted (linux) - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0
55
Tensor type (e.g. from `return_tensors`) ignored in map ### Describe the bug I don't know if it is a bug or an expected behavior, but the tensor type seems to be ignored after applying map. For example, mapping over to tokenize text with a transformers' tokenizer always returns lists and it ignore the `return_tensors` argument. If this is an expected behaviour (e.g., for caching/Arrow compatibility/etc.) it should be clearly documented. For example, current documentation (see [here](https://huggingface.co/docs/datasets/v2.17.1/en/nlp_process#map)) clearly state to "set `return_tensors="np"` when you tokenize your text" to have Numpy arrays. ### Steps to reproduce the bug ```py # %%% import datasets import numpy as np import tensorflow as tf import torch from transformers import AutoTokenizer # %% ds = datasets.load_dataset("cnn_dailymail", "1.0.0", split="train[:1%]") tokenizer = AutoTokenizer.from_pretrained("bert-base-cased") #%% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** no map, return_tensors={return_tensors} **********") _ds = tokenizer(ds["article"], return_tensors=return_tensors, truncation=True, padding=True) print('Type <input_ids>:', type(_ds["input_ids"])) # %% for return_tensors in [None, "np", "pt", "tf", "jax"]: print(f"********** map, return_tensors={return_tensors} **********") _ds = ds.map( lambda examples: tokenizer(examples["article"], return_tensors=return_tensors, truncation=True, padding=True), batched=True, remove_columns=["article"], ) print('Type <input_ids>:', type(_ds[0]["input_ids"])) ``` ### Expected behavior The output from the script above. I would expect the second half to be the same. ``` ********** no map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** no map, return_tensors=np ********** Type <input_ids>: <class 'numpy.ndarray'> ********** no map, return_tensors=pt ********** Type <input_ids>: <class 'torch.Tensor'> ********** no map, return_tensors=tf ********** Type <input_ids>: <class 'tensorflow.python.framework.ops.EagerTensor'> ********** no map, return_tensors=jax ********** Type <input_ids>: <class 'jaxlib.xla_extension.ArrayImpl'> ********** map, return_tensors=None ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=np ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=pt ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=tf ********** Type <input_ids>: <class 'list'> ********** map, return_tensors=jax ********** Type <input_ids>: <class 'list'> ``` ### Environment info - `datasets` version: 2.17.1 - Platform: Redacted (linux) - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.1.3 - `fsspec` version: 2023.10.0 We do zero-copy Arrow <-> NumPy <-> PyTorch when the output dtype matches the original dtype, but for other frameworks it depends. For example JAX doesn't allow zero-copy NumPy -> JAX at all IIRC. Currently tokenized data are formatted using a copy though, since tokens are stored as int32 and returned as int64 torch tensors.
[ 0.07457982003688812, -0.4844936728477478, 0.07097327709197998, 0.12269885092973709, 0.2573975920677185, -0.08247978240251541, 0.5117505788803101, 0.2314727008342743, 0.14415009319782257, 0.09643102437257767, 0.14743316173553467, 0.7844662070274353, -0.14292484521865845, -0.2394830733537674, 0.15896502137184143, -0.1498585194349289, 0.1414104402065277, 0.14088569581508636, 0.12746888399124146, -0.2564214766025543, -0.3757319152355194, 0.30456647276878357, -0.32796478271484375, 0.10396610200405121, -0.41968411207199097, 0.03342345356941223, 0.15595602989196777, -0.40679478645324707, -0.003789396956562996, -0.22738443315029144, 0.32416048645973206, -0.25672411918640137, 0.3015380799770355, 0.19533520936965942, -0.00011606035695876926, 0.0725969672203064, 0.24142998456954956, 0.05435660481452942, 0.4120672047138214, -0.3790985941886902, 0.3769567310810089, -0.12412407994270325, -0.018666354939341545, -0.18398693203926086, -0.042763400822877884, -0.061691392213106155, 0.09379702061414719, 0.10248070955276489, 0.37894582748413086, 0.24036145210266113, 0.15558092296123505, 0.6926343441009521, 0.2346077710390091, 0.28654465079307556, -0.15729129314422607, 0.10493522137403488, -0.18740245699882507, -0.29031676054000854, -0.1220044195652008, -0.10893721133470535, 0.04279429838061333, 0.15895509719848633, -0.15215380489826202, -0.07817363739013672, 0.1931929588317871, 0.27918633818626404, 0.023778971284627914, -0.322048157453537, -0.21431738138198853, 0.032244972884655, 0.12352854758501053, 0.12900100648403168, -0.21429894864559174, -0.23857906460762024, -0.2333238571882248, -0.1007225438952446, 0.11149777472019196, -0.20507779717445374, -0.05628107488155365, -0.013479962944984436, -0.21961195766925812, 0.2082042396068573, -0.15794898569583893, 0.4195272922515869, -0.3683411478996277, 0.40145087242126465, 0.012368688359856606, 0.14976078271865845, 0.049439139664173126, -0.04132581502199173, -0.15622681379318237, -0.1534349024295807, 0.4929251968860626, 0.49579963088035583, -0.19006086885929108, -0.3475874364376068, 0.23811811208724976, -0.7333507537841797, -0.01387355849146843, -0.3206523060798645, 0.03925388678908348, 0.3010919988155365, -0.40176859498023987, 0.21963003277778625, -0.007522858679294586, 0.33273816108703613, -0.0993061289191246, 0.5627621412277222, 0.1728142350912094, -0.20845481753349304, 0.09522907435894012, -0.020614556968212128, -0.16676947474479675, 0.24933546781539917, -0.06553858518600464, -0.11969581991434097, 0.28891080617904663, 0.1470218449831009, -0.02680996060371399, -0.10528667271137238, -0.31774288415908813, 0.13029581308364868, 0.0011022118851542473, 0.09545230865478516, -0.10283178091049194, 0.35469719767570496, 0.11515691876411438, 0.1478608101606369, -0.1818751096725464, 0.2012067586183548, -0.16731593012809753, -0.3530445098876953, -0.27644193172454834, -0.04923579841852188, 0.221322700381279, 0.4501580595970154, 0.13794170320034027, 0.009080185554921627, -0.023632220923900604, 0.07239792495965958, 0.04505975544452667, 0.031937286257743835, 0.3069552779197693, 0.026998912915587425, -0.3970957100391388, 0.3626839518547058, 0.09358352422714233, -0.014906387776136398, -0.23441651463508606, 0.12111955136060715, -0.46650010347366333, -0.14705303311347961, 0.13958710432052612, 0.11734215170145035, -0.07976118475198746, -0.23293331265449524, -0.17116796970367432, 0.15305612981319427, 0.42201024293899536, 0.03437427058815956, 0.0371730700135231, -0.2969965934753418, -0.2582258880138397, -0.2635462284088135, 0.2046574503183365, -0.09375646710395813, 0.08797895908355713, -0.3399493992328644, 0.0740516409277916, 0.29648807644844055, 0.43777140974998474, 0.6169160008430481, -0.12882855534553528, 0.11886074393987656, -0.1176752969622612, 0.6486350893974304, 0.22389991581439972, -0.07934868335723877, -0.30663615465164185, -0.1317632496356964, -0.0180283784866333, 0.20540229976177216, -0.22628140449523926, -0.030134085565805435, 0.2149377167224884, 0.10838688164949417, 0.3287198543548584, 0.45413821935653687, -0.0962710753083229, 0.3431589603424072, -0.13519687950611115, 0.002036677673459053, 0.41476088762283325, -0.12795569002628326, 0.2789374589920044, 0.20055939257144928, -0.20985859632492065, 0.2579733729362488, 0.1673489511013031, -0.005739700049161911, 0.0035469327121973038, -0.06365612894296646, 0.1627756804227829, -0.008203878998756409, 0.021166732534766197, -0.0707688182592392, -0.07696466892957687, 0.06932754814624786, -0.21902020275592804, 0.34974563121795654, -0.03825284540653229, -0.10670865327119827, 0.0926024541258812, 0.033937305212020874, -0.029060322791337967, -0.0930451899766922, 0.13863743841648102, 0.05674225091934204, -0.3787827789783478, 0.2430068403482437, -0.1044396311044693, -0.33486756682395935, 0.1174497902393341, 0.21406249701976776, -0.24455593526363373, 0.17479683458805084, -0.020096270367503166, -0.16132470965385437, -0.3215315043926239, 0.3894968032836914, 0.21081247925758362, -0.11831942200660706, -0.03816947713494301, -0.047666728496551514, -0.15331988036632538, 0.09724324196577072, -0.383090615272522, 0.22139103710651398, 0.3220737874507904, -0.18939101696014404, -0.1209566667675972, 0.45453977584838867, -0.04097064211964607, -0.22224140167236328, 0.2857520878314972, 0.3483256697654724, 0.38208284974098206, 0.017203636467456818, -0.270318865776062, 0.16725602746009827, 0.0048357415944337845, 0.023186732083559036, -0.10131113976240158, -0.08691754937171936, -0.3129715621471405, -0.0644562840461731, 0.006347943097352982, -0.04179731011390686, -0.15775740146636963, -0.06813841313123703, 0.8873815536499023, -0.047464676201343536, 0.17791037261486053, 0.1045447438955307, -0.2752062678337097, -0.025598065927624702, -0.04533512145280838, -0.31125661730766296, 0.12043512612581253, 0.0813937708735466, 0.2794066071510315, -0.18527384102344513, -0.17927025258541107, -0.08210158348083496, 0.20082685351371765, 0.1473502814769745, 0.06346394866704941, -0.012051433324813843, 0.14773257076740265, 0.11602997034788132, -0.35412290692329407, 0.36651912331581116, -0.03591717779636383, -0.06800738722085953, -0.09652142226696014, 0.022652728483080864, -0.12406016886234283, 0.12256509810686111, -0.18276455998420715, -0.3122790455818176, -0.21106964349746704, -0.2024184912443161, 0.007553918287158012, 0.044348884373903275, -0.061506159603595734, 0.3087812662124634, 0.2690656781196594, 0.16579073667526245, 0.20814745128154755, -0.21372514963150024, -0.19373302161693573, 0.05924036726355553, -0.28828519582748413, 0.03386674076318741, -0.08187811821699142, -0.4473145008087158, 0.18461400270462036, 0.1876421868801117, -0.029643269255757332, -0.008325472474098206, -0.6121273040771484, 0.1276611089706421, -0.3583447337150574, -0.10514813661575317, 0.07541565597057343, 0.06768257915973663, -0.23837104439735413, -0.08054780215024948, 0.2456757128238678, -0.2881135046482086, -0.14107713103294373, 0.21769307553768158, 0.12977485358715057, -0.0020510386675596237, -0.28576982021331787, -0.46509823203086853, 0.020301541313529015, -0.23047158122062683, 0.36279815435409546, -0.22147366404533386, 0.0387166365981102, 0.42103394865989685, -0.17702041566371918, 0.21237142384052277, -0.3550998866558075, -0.05470176786184311, -0.20511643588542938, 0.08506914973258972, 0.6055033206939697, -0.1352146714925766, -0.26839807629585266, -0.24298034608364105, -0.11260531842708588, 0.15656228363513947, 0.085601806640625, 0.038206055760383606, 0.06307794898748398, -0.209939107298851, 0.12818551063537598, 0.05483647435903549, 0.013111491687595844, 0.45576924085617065, -0.020258231088519096, 0.0718359723687172, -0.1636584997177124, -0.024753356352448463, 0.18727028369903564, 0.27669286727905273, 0.21041801571846008, 0.1429276019334793, 0.12248151004314423, 0.2896213233470917, 0.5057831406593323, 0.11778007447719574, -0.5478476881980896, 0.264775812625885, -0.0008811689913272858, -0.0704440027475357, -0.013862445950508118, -0.3146236538887024, -0.053312335163354874, -0.16416579484939575, 0.08196011930704117, 0.12580986320972443, -0.16524720191955566, -0.4882994592189789, 0.1025368869304657, 0.08736556768417358, -0.31063827872276306, -0.2785555422306061, 0.2741636633872986, 0.11348328739404678, 0.24205061793327332, 0.0995735228061676, 0.20581865310668945, -0.5093991756439209, -0.3482537567615509, 0.09943993389606476, 0.06031745299696922, 0.38193652033805847, 0.051501911133527756, -0.5069307088851929, -0.1808832436800003, -0.6254274249076843, 0.3240540027618408, 0.07680052518844604, 0.3556974232196808, 0.1612851917743683, -0.2626423239707947, -0.017062164843082428, 0.3077046573162079, 0.6334487199783325, 0.00411442294716835, -0.23805738985538483, -0.09852243959903717, -0.13475638628005981, -0.3037184774875641, -0.01948501355946064, -0.2561945617198944, -0.04632409289479256, 0.4199938178062439, 0.7304472923278809, -0.3562161922454834, -0.20096270740032196, -0.21210908889770508, -0.15637698769569397, 0.0046327076852321625, -0.02822742611169815, -0.18821509182453156, 0.08154324442148209, -0.14668557047843933, 0.1193479597568512, 0.27683329582214355, 0.29435813426971436, -0.034969717264175415, -0.5264116525650024, -0.061392441391944885, -0.13852423429489136, 0.014797411859035492, 0.018684696406126022, 0.30439552664756775, 0.07923294603824615, -0.09653933346271515, 0.12459643185138702, 0.2365228235721588, -0.06067364662885666, -0.19169218838214874, -0.044352609664201736, -0.3788641691207886, 0.014755699783563614, 0.020565077662467957, 0.1888248324394226, 0.1976851224899292, -0.13989795744419098, 0.1620682179927826, 0.029250159859657288, 0.13632351160049438, -0.24653825163841248, 0.35423967242240906, 0.5853123068809509, 0.30604928731918335, -0.2507944703102112, -0.07883155345916748, 0.24057602882385254, -0.03743671625852585, -0.15168720483779907, 0.31208911538124084, -0.11161094903945923, -0.43653038144111633, 0.5196312069892883, 0.08940857648849487, 0.650520384311676, -0.107062429189682, 0.26887962222099304, 0.23331871628761292, 0.4066582918167114, 0.5651575922966003, -0.2891954183578491, 0.3839530944824219, -0.21975010633468628, 0.1797810047864914, -0.06685559451580048, -0.1227809339761734, -0.05656790733337402, 0.1531074047088623, -0.060574356466531754, -0.0042329467833042145, 0.34810787439346313, 0.5751927495002747, 0.08574622869491577, 0.1741504967212677, 0.16529130935668945, -0.3466359078884125, -0.051534757018089294, 0.029950197786092758, -0.05711791664361954, 0.40035367012023926, -0.011667786166071892, -0.2521849274635315, -0.0553646944463253, -0.5144322514533997, 0.0040245577692985535, -0.05045825242996216, -0.4507969915866852, 0.21688975393772125, 0.4900257885456085, 0.14675700664520264, 0.30917829275131226, 0.35701805353164673, 0.37132805585861206, 0.1696828156709671, -0.3330294191837311, -0.12605565786361694, -0.05618118494749069, 0.06090574339032173, -0.016893237829208374, -0.2937597632408142, 0.2930683195590973, 0.12382001429796219, -0.12932232022285461, -0.17287099361419678, -0.045901767909526825, -0.1529494971036911, -0.47659680247306824, -0.01825142651796341, 0.07451432943344116, -0.22365742921829224, 0.0452023483812809, -0.07920797169208527, -0.16466781497001648, -0.0952887237071991, 0.10582353174686432, -0.11773821711540222, -0.10743023455142975, 0.3404192626476288, 0.11721597611904144, -0.08222322165966034, 0.09827180206775665, 0.20052307844161987, 0.01362111046910286, -0.1697332113981247, 0.30893856287002563, -0.022762995213270187, -0.20858559012413025, -0.10943525284528732, -0.015489213168621063, 0.2336525022983551, -0.3075716197490692, 0.14171408116817474, -0.05569181963801384, -0.2411378026008606, -0.020298883318901062, 0.3932047486305237, -0.1039033979177475, -0.09482421725988388, -0.3943277895450592, -0.22000426054000854, -0.3877423405647278, 0.34761136770248413, -0.22915975749492645, 0.26955583691596985, 0.08628524094820023, 0.6067407727241516, 0.04387956112623215, -0.12378628551959991, -0.25997209548950195, 0.040375880897045135, -0.029502300545573235, 0.28096598386764526, -0.20302337408065796, -0.17100253701210022, 0.2856200337409973, -0.11322155594825745, 0.031137922778725624, 0.3868885636329651, -0.1936519742012024, -0.12679368257522583, -0.14235864579677582, 0.12422052025794983, 0.26329052448272705, -0.09090029448270798, -0.0040649473667144775, 0.047858476638793945, -0.06908425688743591, -0.3061056435108185, 0.08938367664813995, -0.09628669917583466, -0.07088898122310638, 0.3752935528755188, 0.017166990786790848, 0.43903422355651855, 0.19054628908634186, -0.11470624804496765, -0.14917120337486267, -0.1269206553697586, 0.1214691549539566, 0.1773497760295868, -0.005545968189835548, -0.005016982555389404, -0.2925244867801666, -0.02507062256336212, 0.19254142045974731, 0.19331151247024536, 0.35240787267684937, -0.25054097175598145, -0.3715950846672058, -0.06342410296201706, -0.0703183114528656, -0.22800415754318237, -0.2603514790534973, -0.3261788487434387, 0.14196422696113586, 0.1900406926870346, -0.20289501547813416, 0.03931387886404991, 0.24387530982494354, 0.08043080568313599, 0.1481703668832779, 0.1666901856660843, 0.1342974156141281, 0.2824665307998657, -0.13724614679813385, 0.014288242906332016, 0.3221513628959656, -0.1977963000535965, 0.16678094863891602, 0.19145764410495758, -0.16424913704395294, 0.22108979523181915, 0.1928691565990448, -0.12388819456100464, -0.054184623062610626, 0.1325484812259674, 0.11534784734249115, 0.29362204670906067, -0.16705027222633362, 0.08528272807598114, 0.4004896581172943, -0.06813929975032806, -0.26716148853302, -0.027737274765968323, -0.007488638162612915, 0.46682247519493103, -0.002001442015171051, 0.4406740069389343, 0.040698084980249405, -0.18522223830223083, -0.18734480440616608, 0.2649044990539551, -0.4972285032272339, -0.008476205170154572, -0.2965081036090851, 0.03477773070335388, 0.052416905760765076, -0.2998095452785492, -0.060725171118974686, 0.024326786398887634, 0.02793184667825699, 0.08208273351192474, -0.02250576764345169, 0.06345579028129578, -0.038451142609119415, -0.09982758015394211, 0.2848286032676697, -0.001611407846212387, 0.13212688267230988, -0.35909968614578247, -0.03878746181726456, -0.30690062046051025, 0.17116253077983856, 0.044367000460624695, 0.17651279270648956, -0.28016409277915955, 0.2446954846382141, -0.11633226275444031, -0.11121876537799835, -0.045034341514110565, 0.3322799503803253, 0.2526780366897583, -0.0776858925819397, -0.09630075097084045, 0.03262578696012497, -0.12106640636920929, -0.27846887707710266, -0.2931671738624573, 0.23239924013614655, 0.013244524598121643, 0.620560884475708, -0.21469394862651825, -0.3127196431159973, -0.16840997338294983, 0.022865355014801025, -0.203637033700943, 0.24875213205814362, 0.466356486082077, 0.12595818936824799, 0.10318068414926529, -0.07477086782455444, 0.06945359706878662, 0.006700238212943077, 0.10046271979808807, 0.09223437309265137, 0.06597088277339935, -0.29963165521621704, 0.11747339367866516, -0.27598121762275696, 0.4432152509689331, 0.4231123626232147, 0.31373822689056396, 0.04552311822772026, 0.029349179938435555, 0.29672956466674805, -0.033071257174015045, 0.08250849694013596, -0.3297325074672699, -0.048776235431432724, 0.08038675785064697, -0.0002350248396396637, 0.09124065935611725, -0.3785104751586914, -0.04316180944442749, 0.15777964890003204, -0.1114404946565628, 0.19779279828071594, -0.03874232992529869, -0.03137985244393349, -0.3341137170791626, 0.3632206916809082, -0.1573977917432785, 0.2728652358055115, 0.28470784425735474, 0.408265620470047, 0.22561118006706238, -0.09329072386026382, -0.07827691733837128, 0.056301411241292953, -0.1151822954416275, -0.2899216115474701, 0.05395560711622238, -0.34781408309936523, 0.45576727390289307, -0.10847704857587814, -0.11597339808940887, -0.4277273714542389, -0.0722898468375206, 0.2581613063812256, -0.5603621006011963, -0.38679075241088867, 0.31627944111824036, -0.43723270297050476, -0.1554218828678131, 0.10268572717905045, 0.5329199433326721, 0.0570947639644146, 0.02116919495165348, -0.11283697932958603, -0.49174797534942627, 0.3975365161895752, -0.5830522179603577, -0.3064776360988617, -0.11154528707265854, 0.024886831641197205, 0.15345309674739838, -0.005991071462631226, -0.9105038046836853, -0.4159433841705322, 0.22649244964122772, -0.04086199402809143, -0.2596544027328491, -0.023132402449846268, 0.170741006731987, -0.014898940920829773, -0.30114999413490295, 0.2196161448955536, 0.0928516536951065, -0.06691110879182816, 0.1518162041902542, -0.22171258926391602 ]
https://github.com/huggingface/datasets/issues/6686
Question: Is there any way for uploading a large image dataset?
``` import pandas as pd from datasets import Dataset, Image # Read the CSV file data = pd.read_csv("XXXX.csv") # Create a Hugging Face Dataset dataset = Dataset.from_pandas(data) dataset = dataset.cast_column("file_name", Image()) # Upload to Hugging Face Hub (make sure authentication is set up) dataset.push_to_hub("XXXXX"") ``` stuck in "Casting the dataset ![截屏2024-05-02 11 44 50](https://github.com/huggingface/datasets/assets/48406770/dc012dc5-16f6-4fd5-9e02-1b705c552c5b) "
I am uploading an image dataset like this: ``` dataset = load_dataset( "json", data_files={"train": "data/custom_dataset/train.json", "validation": "data/custom_dataset/val.json"}, ) dataset = dataset.cast_column("images", Sequence(Image())) dataset.push_to_hub("StanfordAIMI/custom_dataset", max_shard_size="1GB") ``` where it takes a long time in the `Map` process. Do you think I can use multi-processing to map all the image data to the memory first? For the `Map()` function, I can set `num_proc`. But for `push_to_hub` and `cast_column`, I can not find it. Thanks in advance! Best,
55
Question: Is there any way for uploading a large image dataset? I am uploading an image dataset like this: ``` dataset = load_dataset( "json", data_files={"train": "data/custom_dataset/train.json", "validation": "data/custom_dataset/val.json"}, ) dataset = dataset.cast_column("images", Sequence(Image())) dataset.push_to_hub("StanfordAIMI/custom_dataset", max_shard_size="1GB") ``` where it takes a long time in the `Map` process. Do you think I can use multi-processing to map all the image data to the memory first? For the `Map()` function, I can set `num_proc`. But for `push_to_hub` and `cast_column`, I can not find it. Thanks in advance! Best, ``` import pandas as pd from datasets import Dataset, Image # Read the CSV file data = pd.read_csv("XXXX.csv") # Create a Hugging Face Dataset dataset = Dataset.from_pandas(data) dataset = dataset.cast_column("file_name", Image()) # Upload to Hugging Face Hub (make sure authentication is set up) dataset.push_to_hub("XXXXX"") ``` stuck in "Casting the dataset ![截屏2024-05-02 11 44 50](https://github.com/huggingface/datasets/assets/48406770/dc012dc5-16f6-4fd5-9e02-1b705c552c5b) "
[ -0.30317816138267517, -0.5200185775756836, -0.09864859282970428, 0.12989917397499084, 0.41519278287887573, 0.2579435706138611, 0.026710357517004013, 0.2552163004875183, 0.15532389283180237, 0.16050533950328827, 0.0117910485714674, -0.06465314328670502, -0.13801905512809753, 0.3248668611049652, 0.09419631212949753, 0.008662212640047073, 0.17031759023666382, 0.04589960351586342, -0.00817907601594925, 0.003075685352087021, -0.26806265115737915, -0.1730813980102539, -0.06886929273605347, -0.4360951781272888, -0.36662277579307556, -0.23586153984069824, -0.2563942074775696, -0.12534677982330322, -0.07002095133066177, -0.04573138430714607, -0.20556999742984772, -0.0017751418054103851, -0.04978147894144058, 0.6784842610359192, -0.00012272254389245063, -0.2885504961013794, 0.20681151747703552, -0.13246077299118042, 0.06257994472980499, 0.1302454173564911, -0.3769511282444, -0.3056890666484833, -0.2482990175485611, -0.3909366726875305, 0.2699616849422455, -0.03046109899878502, 0.4164544641971588, -0.09836234897375107, 0.47367167472839355, -0.049332570284605026, 0.08149654418230057, -0.12398024648427963, 0.18581199645996094, 0.1260458081960678, -0.27942800521850586, 0.30566489696502686, 0.11674118787050247, -0.10355551540851593, 0.19210392236709595, 0.038430288434028625, 0.15394267439842224, -0.17103269696235657, 0.04362296313047409, -0.08078600466251373, 0.12193640321493149, -0.11787203699350357, -0.175545334815979, -0.579822301864624, 0.10623309761285782, 0.21284082531929016, 0.1681886911392212, -0.046506911516189575, -0.5166440606117249, -0.21358224749565125, -0.1528843492269516, -0.20074038207530975, 0.05719742923974991, 0.4833987057209015, -0.17782951891422272, -0.27392590045928955, -0.5970445275306702, -0.38865065574645996, -0.10146752744913101, 0.17327450215816498, -0.18965178728103638, -0.02130982279777527, 0.05438533052802086, 0.14575612545013428, 0.29040682315826416, -0.22539950907230377, -0.05248696357011795, -0.12967248260974884, 0.3981377184391022, 0.2788671553134918, -0.38061025738716125, -0.05968119949102402, -0.26440319418907166, 0.09603265672922134, 0.21615633368492126, -0.09635750949382782, -0.15955430269241333, 0.03396235778927803, -0.22438357770442963, 0.06668799370527267, 0.31139302253723145, 0.0032246485352516174, -0.6589009165763855, -0.021792013198137283, 0.28275787830352783, -0.18823769688606262, -0.1590670347213745, -0.10926837474107742, -0.021514371037483215, -0.20718665421009064, 0.07610233128070831, -0.10743481665849686, -0.31099891662597656, 0.05923226848244667, 0.14211270213127136, -0.24240317940711975, 0.15209746360778809, 0.20177726447582245, -0.1709233671426773, 0.19305169582366943, -0.1024368479847908, 0.19718721508979797, -0.08721689879894257, -0.04500573128461838, -0.045387234538793564, 0.1018122062087059, -0.134693443775177, 0.2971601188182831, 0.01669827476143837, 0.23778541386127472, 0.11669494211673737, -0.24703487753868103, -0.07644869387149811, -0.04832018166780472, 0.297050803899765, 0.03753506392240524, 0.08505592495203018, -0.4659963846206665, 0.2695041000843048, 0.3813556134700775, 0.18728673458099365, 0.1625680923461914, -0.21976585686206818, 0.1605091243982315, -0.251320481300354, 0.16087013483047485, -0.4582037329673767, -0.16015559434890747, 0.03529367968440056, -0.04541223123669624, -0.057442717254161835, 0.14300787448883057, -0.8148406744003296, 0.018216662108898163, 0.16078610718250275, 0.1465122401714325, -0.0928332731127739, 0.1709650307893753, -0.205450177192688, -0.23593305051326752, 0.17415976524353027, 0.29542356729507446, -0.029005911201238632, 0.29486018419265747, -0.0331670343875885, 0.27409788966178894, -0.019616812467575073, 0.4049111008644104, 0.056022241711616516, 0.09522958099842072, -0.27092844247817993, 0.11698710918426514, -0.006225429475307465, -0.5490158796310425, -0.20978114008903503, 0.26845788955688477, -0.2758793234825134, -0.27181968092918396, 0.15342023968696594, 0.5359944701194763, 0.31395962834358215, -0.04572661593556404, 0.040827929973602295, 0.5373900532722473, -0.10765083134174347, 0.32826125621795654, 0.03465835377573967, -0.25792428851127625, -0.2629057765007019, 0.2049904614686966, 0.23439638316631317, -0.009666219353675842, 0.17285484075546265, 0.23659801483154297, 0.015302378684282303, -0.20098590850830078, 0.32301437854766846, 0.3561389446258545, 0.1928033083677292, -0.26081907749176025, -0.0930270105600357, -0.12964028120040894, -0.26975640654563904, 0.25778791308403015, 0.30303066968917847, -0.08203311264514923, -0.26389336585998535, -0.021063784137368202, 0.14284732937812805, -0.19196784496307373, -0.0393880195915699, 0.4381963610649109, -0.09708477556705475, -0.17422649264335632, 0.20721030235290527, 0.009553451091051102, -0.17627215385437012, 0.8039131164550781, -0.06376688182353973, 0.05281691253185272, -0.3952154219150543, 0.3203789293766022, 0.09550894796848297, -0.24300149083137512, 0.06340684741735458, -0.24132654070854187, -0.06075644493103027, -0.13039523363113403, -0.010856352746486664, 0.1518237441778183, 0.06499642133712769, 0.27343738079071045, 0.06908542662858963, 0.3758715093135834, 0.40496522188186646, -0.3179589807987213, -0.09972240775823593, -0.345755934715271, 0.10755784064531326, -0.24256882071495056, -0.31289252638816833, 0.22126716375350952, -0.28244447708129883, 0.2947857677936554, 0.273624062538147, -0.040892232209444046, 0.05731731653213501, 0.03113822266459465, 0.12824739515781403, -0.10268031060695648, 0.07126989960670471, 0.35363495349884033, 0.2054157704114914, -0.06326405704021454, 0.06449414789676666, -0.32174497842788696, 0.4508904218673706, -0.014188420958817005, 0.04721321165561676, 0.1679856777191162, -0.031990453600883484, 0.11932144314050674, 0.18192914128303528, -0.07691018283367157, 0.30963262915611267, 0.22033743560314178, -0.04474828764796257, -0.09669193625450134, 0.16201893985271454, 0.020344626158475876, -0.13616684079170227, 0.04676184430718422, 0.4026397466659546, -0.11786910146474838, 0.42478039860725403, 0.007245359010994434, -0.2578844726085663, 0.025175347924232483, 0.25710058212280273, 0.2467341274023056, 0.06535695493221283, -0.14759890735149384, -0.10195369273424149, -0.09982024878263474, 0.006443423219025135, 0.2277979701757431, -0.19627007842063904, -0.05027221888303757, -0.25589412450790405, 0.017033621668815613, 0.3041767477989197, 0.1281183660030365, 0.021124999970197678, 0.24763214588165283, 0.05011570453643799, -0.38139989972114563, -0.14776593446731567, 0.17979776859283447, 0.37597793340682983, 0.016648463904857635, 0.29054248332977295, 0.08123751729726791, 0.3505335748195648, 0.09382128715515137, 0.030416768044233322, -0.07641938328742981, -0.23618224263191223, -0.03402361273765564, 0.10113324224948883, -0.08459224551916122, -0.21304786205291748, 0.3980310559272766, 0.03102145344018936, -0.005719014909118414, 0.019818101078271866, -0.04940414056181908, -0.4388313591480255, -0.017655430361628532, -0.09545926004648209, 0.001010628999210894, 0.08324785530567169, 0.2215445637702942, -0.10952576249837875, -0.28893402218818665, 0.6447303891181946, 0.2059568613767624, 0.19385729730129242, -0.26183485984802246, 0.45516908168792725, -0.15725131332874298, -0.12738291919231415, -0.11186309903860092, 0.10669736564159393, -0.3593592047691345, 0.3183898627758026, 0.011380011215806007, -0.3042447566986084, 0.05624191835522652, -0.01426861621439457, 0.10927315056324005, 0.2905381917953491, -0.49143075942993164, -0.3330842852592468, -0.4278474450111389, 0.24048316478729248, 0.11621201038360596, 0.1004277765750885, 0.15315373241901398, -0.3599083423614502, -0.033514250069856644, 0.1852506399154663, -0.1736435741186142, -0.08811826258897781, 0.5104377269744873, 0.07765541970729828, 0.2246868908405304, 0.4417673945426941, 0.2644554376602173, 0.3868821859359741, 0.27943485975265503, -0.15634766221046448, 0.3712821900844574, -0.00858204998075962, 0.009968504309654236, -0.23921090364456177, -0.2939189076423645, 0.21231557428836823, -0.14260801672935486, 0.07099808007478714, -0.26477867364883423, -0.011284898966550827, -0.1402190625667572, -0.20522591471672058, -0.008774496614933014, -0.23140498995780945, 0.02573000267148018, 0.05184333026409149, 0.02349594607949257, 0.17659957706928253, -0.3184962868690491, -0.6372511982917786, -0.39939913153648376, -0.31084144115448, -0.11972403526306152, -0.05674810707569122, 0.19080990552902222, -0.12182829529047012, -0.07286015152931213, -0.17930804193019867, -0.46907567977905273, 0.24441157281398773, 0.11293728649616241, 0.0972631499171257, 0.01937684789299965, 0.251558393239975, 0.1569332331418991, -0.23998676240444183, 1.0736570358276367, -0.23267684876918793, -0.07802009582519531, -0.2903500199317932, -0.304996132850647, -0.3296562433242798, 0.3332021236419678, 0.11115613579750061, 0.03378013148903847, 0.19662311673164368, 0.7266852259635925, -0.2380700409412384, 0.009214306250214577, 0.03809492290019989, 0.21591944992542267, -0.25306323170661926, -0.29240432381629944, -0.36316415667533875, -0.37714433670043945, -0.37391552329063416, 0.07177437841892242, 0.34537845849990845, 0.017189182341098785, 0.402103066444397, -0.18598507344722748, -0.11890000104904175, -0.009112734347581863, 0.003857128322124481, -0.27207106351852417, -0.02043076418340206, 0.12075410038232803, 0.3114297688007355, -0.07629773020744324, 0.02076597511768341, 0.24992170929908752, 0.5728421807289124, -0.0793629139661789, -0.13114507496356964, 0.13391873240470886, 0.08194068819284439, 0.3190751373767853, 0.27024704217910767, 0.2967926263809204, 0.11180344223976135, 0.01596132107079029, 0.4084806442260742, -0.5498917102813721, 0.2853338420391083, 0.28414681553840637, -0.07953295111656189, -0.29836592078208923, -0.1941470205783844, 0.5885176658630371, 0.3764435648918152, 0.12255744636058807, 0.1439494788646698, 0.2259327918291092, -0.050802282989025116, 0.08357299864292145, 0.3182922303676605, 1.0601197481155396, -0.7185866832733154, 0.33567264676094055, -0.5095208287239075, -0.16282665729522705, 0.2631651759147644, -0.1988295465707779, -0.0497741624712944, -0.007892467081546783, -0.22822093963623047, -0.059810906648635864, -0.1799863576889038, 0.03135456517338753, 0.2854321599006653, 0.00984976813197136, 0.2279723435640335, 0.05134625732898712, 0.3109503984451294, -0.3214661478996277, 0.5911207795143127, -0.21498064696788788, -0.5685226917266846, -0.044263340532779694, 0.04786115139722824, -0.014025390148162842, -0.29218393564224243, 0.1882196068763733, 0.15071216225624084, 0.0024089552462100983, 0.11610902845859528, -0.3532363176345825, -0.0972360223531723, 0.006591250654309988, 0.3007248044013977, -0.2664213180541992, -0.058609362691640854, 0.04581611976027489, 0.3435373902320862, 0.1686701476573944, 0.0402127169072628, 0.0048853736370801926, 0.2237376570701599, -0.05837681144475937, -0.023701438680291176, -0.06963842362165451, -0.14955660700798035, 0.20982664823532104, -0.1457442045211792, -0.13667207956314087, 0.27568408846855164, 0.04152754321694374, -0.09583218395709991, -0.2663094401359558, 0.3959383964538574, -0.1630016565322876, 0.18368540704250336, -0.2309166043996811, 0.042148247361183167, -0.10681097209453583, -0.008733008056879044, 0.01325608417391777, 0.1189948171377182, 0.17638720571994781, 0.6619436740875244, 0.09045198559761047, -0.19012901186943054, -0.007096294313669205, 0.5699909925460815, 0.08695879578590393, -0.1985664814710617, 0.4032515585422516, -0.1291954219341278, -0.10546400398015976, -0.05918264389038086, 0.24347686767578125, 0.016296906396746635, -0.23723670840263367, 0.0910310223698616, -0.060666773468256, 0.11825509369373322, -0.016428908333182335, -0.35192596912384033, 0.05652804300189018, -0.2095508575439453, -0.03776837885379791, -0.016205713152885437, -0.5199244618415833, 0.26245805621147156, -0.04393293336033821, 0.18280519545078278, -0.2024838626384735, -0.01640809327363968, 0.14421169459819794, 0.4924111068248749, -0.15690822899341583, 0.2802976965904236, -0.38043126463890076, 0.16805502772331238, 0.09389019012451172, 0.08063121140003204, -0.1912916898727417, -0.08110252022743225, 0.029164189472794533, 0.14960189163684845, -0.12388242781162262, -0.08787678927183151, 0.05004195496439934, 0.18605127930641174, 0.2127963900566101, -0.031234757974743843, 0.02353820577263832, -0.4314202666282654, -0.167213574051857, -0.0772351324558258, 0.07149149477481842, 0.14286884665489197, -0.16426141560077667, -0.30229806900024414, 0.5261235237121582, -0.25924327969551086, 0.09466926753520966, 0.15718451142311096, 0.06850191950798035, 0.3421769142150879, 0.08847402036190033, 0.1711459755897522, 0.2448812574148178, -0.00821802020072937, -0.03263257071375847, 0.12991458177566528, 0.19438067078590393, -0.48496803641319275, 0.32459503412246704, -0.11797679960727692, 0.017384793609380722, -0.08488553762435913, 0.3330373466014862, -0.07860778272151947, -0.35421833395957947, 0.1904417723417282, 0.09559908509254456, 0.05357737839221954, -0.027760088443756104, -0.06088387966156006, 0.3212180733680725, -0.10214745253324509, 0.1061195582151413, 0.32920047640800476, 0.21213197708129883, 0.24369239807128906, -0.2697184681892395, -0.03539389371871948, 0.6458725929260254, -0.28622233867645264, -0.2637965977191925, -0.036330681294202805, 0.10531586408615112, -0.01447146013379097, 0.22085964679718018, 0.5623731017112732, 0.17089927196502686, 0.5638731122016907, 0.01691698282957077, 0.3311592936515808, -0.17534905672073364, -0.06732289493083954, 0.2476654350757599, -0.3418683707714081, 0.05354522913694382, 0.4138590395450592, -0.09831152856349945, 0.29930368065834045, -0.049011483788490295, 0.2750469446182251, 0.012610428035259247, -0.13468727469444275, -0.3403044044971466, 0.4873427748680115, 0.03806593641638756, -0.006855060812085867, 0.05844733119010925, -0.05962532013654709, -0.17792770266532898, 0.3633253574371338, 0.07177013158798218, -0.5013031363487244, 0.3860305845737457, 0.3600771427154541, 0.10566991567611694, 0.2706483006477356, -0.043445996940135956, 0.12994025647640228, 0.37873315811157227, -0.2660048007965088, 0.1976989507675171, 0.22672924399375916, -0.2516406178474426, -0.1366376280784607, 0.25610846281051636, 0.34442323446273804, 0.11275147646665573, -0.11171656847000122, 0.5171406269073486, 0.2963724434375763, -0.14384090900421143, 0.010505544021725655, 0.23830613493919373, 0.022904660552740097, 0.3982076644897461, -0.0189577117562294, 0.024302886798977852, -0.11884443461894989, -0.10699689388275146, -0.016447987407445908, 0.3168034553527832, -0.11026373505592346, 0.06899871677160263, -0.19035547971725464, -0.26050716638565063, -0.23870894312858582, 0.18491098284721375, -0.4639734625816345, -0.11650991439819336, 0.20613422989845276, -0.7777367234230042, 0.001970795914530754, 0.2048925757408142, -0.05463818460702896, -0.34307777881622314, 0.5849419832229614, 0.29143795371055603, 0.2661097049713135, -0.2508001923561096, -0.39321744441986084, -0.4251359701156616, -0.09338455647230148, -0.4648539423942566, -0.08230091631412506, -0.14896012842655182, 0.2884884476661682, 0.07495515048503876, -0.1904001533985138, 0.04993688315153122, -0.13084253668785095, -0.14150376617908478, 0.3913392126560211, -0.1552349179983139, -0.04925895854830742, 0.1057584211230278, 0.13433851301670074, -0.11771491169929504, -0.31454870104789734, 0.407993346452713, 0.05405062809586525, -0.01829931139945984, 0.016270797699689865, 0.20436108112335205, -0.10813766717910767, -0.2336515188217163, 0.20428910851478577, -0.07448533922433853, 0.4578705430030823, -0.21281537413597107, -0.020052161067724228, 0.14229217171669006, 0.07467037439346313, -0.26100730895996094, -0.0607646182179451, 0.14960281550884247, 0.3540579080581665, -0.16634634137153625, -0.08299653232097626, 0.04193790256977081, -0.130365788936615, -0.2573251724243164, -0.30212461948394775, 0.05286996066570282, -0.2638373374938965, 0.0011080950498580933, 0.03701072931289673, 0.3575676679611206, 0.10667901486158371, 0.023982219398021698, -0.21978852152824402, -0.24265457689762115, -0.1871798038482666, 0.16458392143249512, -0.22682490944862366, -0.14659085869789124, -0.051426175981760025, -0.06008376181125641, -0.420684278011322, 0.3032282888889313, -0.22984695434570312, 0.026942230761051178, 0.25853532552719116, 0.08012710511684418, -0.32573720812797546, 0.5102747082710266, -0.08321133255958557, -0.18501314520835876, 0.04752187803387642, -0.02352263033390045, -0.10689470916986465, -0.10828498005867004, -0.09539926052093506, -0.0027065444737672806 ]
https://github.com/huggingface/datasets/issues/6676
Can't Read List of JSON Files Properly
Found the issue, if there are other files in the directory, it gets caught into this `*` so essentially it should be `*.json`. Could we possibly to check for list of files to make sure the pattern matches json files and raise error if not?
### Describe the bug Trying to read a bunch of JSON files into Dataset class but default approach doesn't work. I don't get why it works when I read it one by one but not when I pass as a list :man_shrugging: The code fails with ``` ArrowInvalid: JSON parse error: Invalid value. in row 0 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug This doesn't work ``` from datasets import Dataset # dir contains 100 json files. Dataset.from_json("/PUT SOME PATH HERE/*") ``` This works: ``` from datasets import concatenate_datasets ls_ds = [] for file in list_of_json_files: ls_ds.append(Dataset.from_json(file)) ds = concatenate_datasets(ls_ds) ``` ### Expected behavior I expect this to read json files properly as error is not clear ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.5.0-15-generic-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
45
Can't Read List of JSON Files Properly ### Describe the bug Trying to read a bunch of JSON files into Dataset class but default approach doesn't work. I don't get why it works when I read it one by one but not when I pass as a list :man_shrugging: The code fails with ``` ArrowInvalid: JSON parse error: Invalid value. in row 0 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug This doesn't work ``` from datasets import Dataset # dir contains 100 json files. Dataset.from_json("/PUT SOME PATH HERE/*") ``` This works: ``` from datasets import concatenate_datasets ls_ds = [] for file in list_of_json_files: ls_ds.append(Dataset.from_json(file)) ds = concatenate_datasets(ls_ds) ``` ### Expected behavior I expect this to read json files properly as error is not clear ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.5.0-15-generic-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 Found the issue, if there are other files in the directory, it gets caught into this `*` so essentially it should be `*.json`. Could we possibly to check for list of files to make sure the pattern matches json files and raise error if not?
[ 0.03813985362648964, 0.0007696673274040222, -0.11846737563610077, 0.6230337619781494, 0.3841797113418579, 0.25135451555252075, 0.2977439761161804, 0.4410387873649597, 0.23848366737365723, 0.01624753326177597, 0.08085089176893234, 0.3879675567150116, -0.1803799718618393, -0.19330503046512604, -0.19567379355430603, -0.04507432132959366, 0.18657051026821136, 0.017665468156337738, -0.01756204664707184, -0.3154858350753784, -0.17839962244033813, 0.15849868953227997, -0.2097969800233841, 0.0028545260429382324, 0.02968725748360157, -0.21645303070545197, -0.028105303645133972, 0.06997869163751602, -0.054606907069683075, -0.5139174461364746, 0.11862286925315857, -0.050284307450056076, 0.09400740265846252, 0.3834371268749237, -0.00011407183774281293, 0.16460639238357544, 0.5042616128921509, -0.033844299614429474, -0.052330370992422104, -0.1483861356973648, -0.602895975112915, -0.3178059458732605, 0.23661407828330994, -0.15435215830802917, 0.16366538405418396, -0.3882593512535095, -0.13158728182315826, -0.5020536184310913, 0.4563019275665283, 0.3560067415237427, 0.14647623896598816, -0.10120543837547302, 0.10983401536941528, 0.3115663528442383, 0.1536615788936615, 0.21199551224708557, -0.05266726762056351, 0.009940437972545624, 0.283202588558197, 0.27646714448928833, -0.00883108377456665, -0.17336733639240265, -0.2504248023033142, -0.054808635264635086, 0.2555270195007324, 0.0422130711376667, -0.10375186055898666, -0.4145769476890564, -0.2747090458869934, 0.10966207087039948, 0.5860695242881775, -0.119936503469944, -0.3651593327522278, -0.34477823972702026, -0.1724451184272766, 0.0014968384057283401, 0.18911650776863098, 0.2603999972343445, -0.11463934183120728, 0.35526639223098755, 0.0539090633392334, 0.07218421250581741, -0.22256648540496826, 0.12927712500095367, 0.1817941665649414, 0.005928926169872284, -0.1926104575395584, 0.09125690907239914, 0.03447474166750908, -0.20423340797424316, 0.12384594976902008, -0.4845346212387085, -0.28075331449508667, 0.06590475142002106, -0.4060516357421875, -0.045168437063694, 0.10578718036413193, -0.2017214596271515, 0.33566978573799133, 0.2805659770965576, -0.005535640753805637, 0.06180976331233978, -0.3063674569129944, 0.2240428626537323, 0.3789268136024475, -0.0030106371268630028, 0.033779725432395935, 0.21000990271568298, 0.12258780002593994, 0.08969956636428833, 0.02843445912003517, 0.12337032705545425, -0.032179344445466995, -0.13237781822681427, -0.012617692351341248, 0.14147618412971497, 0.12323147058486938, -0.11660059541463852, -0.34650614857673645, 0.15144458413124084, -0.7067438960075378, -0.2437254786491394, 0.2999700903892517, 0.21908575296401978, -0.05162248760461807, 0.46459582448005676, 0.015740200877189636, 0.2959418296813965, 0.19040028750896454, -0.02902248501777649, -0.02843514457345009, -0.08998891711235046, 0.035209979861974716, -0.09990391880273819, 0.02899494394659996, -0.06590786576271057, 0.1748049259185791, 0.2728249132633209, 0.03864282742142677, -0.38010483980178833, 0.07274491339921951, -0.19814516603946686, 0.03648597002029419, 0.03929466754198074, 0.05570356175303459, 0.33133602142333984, 0.12627051770687103, -0.3976771831512451, -0.12576693296432495, 0.1792469620704651, -0.42152464389801025, 0.036289360374212265, 0.16882267594337463, 0.07900223881006241, 0.1403772532939911, 0.06779798865318298, -0.5448038578033447, 0.027004636824131012, -0.0618601068854332, -0.01760302297770977, -0.06297939270734787, -0.051763951778411865, 0.20493483543395996, -0.28829020261764526, -0.2044721096754074, 0.38046205043792725, -0.48904770612716675, 0.2749716341495514, 0.28542792797088623, -0.017786148935556412, 0.14964580535888672, 0.5084680914878845, -0.36140769720077515, 0.12728789448738098, -0.39287102222442627, 0.33297812938690186, 0.35005927085876465, -0.2800077199935913, -0.3053559958934784, 0.5241937041282654, 0.16313453018665314, 0.18017476797103882, 0.3154875636100769, 0.019023288041353226, 0.07185371220111847, -0.17693477869033813, 0.05916694551706314, 0.15709282457828522, 0.05748361349105835, 0.05594373494386673, -0.1380048543214798, -0.18995359539985657, 0.19856055080890656, -0.22188958525657654, -0.4150322377681732, 0.16971999406814575, 0.12245973944664001, -0.08238337188959122, 0.5893105864524841, -0.23335513472557068, -0.03005351312458515, 0.49626100063323975, 0.0612773559987545, -0.08175207674503326, 0.09469997137784958, 0.19233670830726624, -0.5434720516204834, -0.03818332031369209, 0.20053362846374512, -0.3508753776550293, -0.3127591609954834, -0.27948153018951416, -0.08564335107803345, -0.11003317683935165, -0.30487653613090515, 0.44207578897476196, 0.08612439036369324, 0.37156936526298523, -0.13328441977500916, -0.00815572775900364, -0.2261548638343811, 0.37709030508995056, -0.03683355450630188, 0.1977022886276245, -0.44893965125083923, 0.36855778098106384, -0.06939008831977844, -0.007213638164103031, 0.21762090921401978, -0.15944001078605652, 0.27435198426246643, -0.29236868023872375, -0.15161862969398499, 0.10417059808969498, 0.3541059195995331, -0.1902403086423874, -0.14565199613571167, 0.10275094956159592, 0.2106076180934906, -0.23870936036109924, -0.43348485231399536, 0.35303741693496704, 0.3753509521484375, -0.15743112564086914, -0.31737494468688965, 0.4244464039802551, -0.16633886098861694, 0.2916385233402252, -0.04379013925790787, -0.03270450234413147, 0.392854779958725, 0.09124912321567535, -0.17935925722122192, 0.03009261190891266, 0.16680699586868286, 0.37004661560058594, 0.17376050353050232, 0.110623300075531, -0.6201316118240356, -0.13975921273231506, 0.7265942692756653, -0.13628390431404114, -0.05223098397254944, 0.05844051390886307, 0.2177247405052185, 0.0959288477897644, 0.26802369952201843, 0.18236911296844482, 0.2009945511817932, 0.03653762862086296, -0.1425749510526657, -0.10205746442079544, 0.04568350315093994, -0.21360380947589874, -0.011150985956192017, 0.27233970165252686, 0.279065877199173, 0.13971872627735138, 0.13884836435317993, 0.06366118043661118, -0.15961292386054993, -0.3190576434135437, 0.04976615309715271, 0.22322210669517517, -0.404387503862381, 0.32577329874038696, -0.41683104634284973, 0.04103434085845947, -0.11810976266860962, -0.2781705856323242, -0.05986717715859413, -0.2633206248283386, -0.2956554889678955, 0.11371864378452301, -0.09539374709129333, -0.028706667944788933, 0.0668385773897171, 0.16849477589130402, 0.1666634976863861, -0.20634660124778748, -0.45851072669029236, 0.19190159440040588, -0.23173311352729797, -0.03581302985548973, 0.6369867324829102, 0.17284993827342987, -0.1528935581445694, -0.09884722530841827, -0.21930618584156036, -0.015053154900670052, -0.005535237491130829, 0.09931708872318268, -0.2799872159957886, 0.1623551994562149, 0.04719553887844086, 0.11966017633676529, -0.18112628161907196, -0.10249710083007812, -0.07068982720375061, 0.2808660864830017, -0.2946207523345947, 0.229245126247406, 0.18176694214344025, -0.18039138615131378, -0.0800519734621048, -0.3815550208091736, -0.08603499829769135, -0.2692059874534607, 0.34332531690597534, 0.18390938639640808, 0.16666825115680695, 0.027466800063848495, 0.07162711024284363, 0.19832652807235718, 0.14285844564437866, 0.23301111161708832, 0.058491773903369904, -0.13210830092430115, 0.43496793508529663, -0.18279290199279785, -0.40794602036476135, 0.24900317192077637, -0.050463683903217316, 0.038539957255125046, -0.20971833169460297, -0.4106130599975586, -0.13591696321964264, -0.2500891089439392, 0.12257614731788635, -0.028617821633815765, -0.010266637429594994, -0.06618086993694305, 0.0168637502938509, 0.16566771268844604, -0.27809715270996094, -0.08232499659061432, 0.0981353148818016, -0.03839421272277832, 0.1508629322052002, 0.3026405870914459, 0.58614182472229, 0.03614593669772148, 0.11006131768226624, 0.5277092456817627, 0.06035251170396805, 0.2844235301017761, -0.10468751937150955, 0.17793509364128113, -0.05691882222890854, -0.14265885949134827, -0.17604422569274902, 0.046780750155448914, -0.185913547873497, -0.11044280230998993, -0.05315990746021271, 0.06137774884700775, 0.005081556737422943, 0.42129430174827576, -0.180644690990448, -0.1517338901758194, -0.10741859674453735, -0.020714744925498962, -0.22486472129821777, 0.0038973167538642883, 0.14937305450439453, 0.20170515775680542, 0.0071179307997226715, -0.002360466867685318, 0.42196065187454224, 0.27344873547554016, -0.038352545350790024, -0.3761892020702362, -0.2402186095714569, -0.19577175378799438, 0.23563386499881744, 0.17773815989494324, 0.564339816570282, 0.11791636049747467, 0.30447763204574585, 0.008442327380180359, -0.0944521576166153, 0.6715261340141296, -0.10328876972198486, -0.18818867206573486, 0.18259741365909576, 0.27700668573379517, -0.18946900963783264, 0.1253296434879303, -0.28513041138648987, 0.19069860875606537, 0.29572224617004395, 0.11332254111766815, -0.37356361746788025, -0.25574764609336853, -0.25178778171539307, 0.29686206579208374, 0.026803243905305862, -0.011548828333616257, -0.25862106680870056, -0.45492810010910034, -0.44175341725349426, -0.30239492654800415, 0.3487038314342499, 0.21873502433300018, -0.037893906235694885, -0.3771246373653412, -0.10379376262426376, -0.40297994017601013, 0.017828814685344696, -0.13294096291065216, 0.2939739227294922, 0.16940325498580933, 0.15230798721313477, -0.07655327767133713, 0.3216748535633087, 0.5873960852622986, 0.7056424021720886, 0.02694329060614109, -0.4825511574745178, -0.040455348789691925, -0.35527387261390686, 0.1776023507118225, -0.022109299898147583, -0.3387300372123718, 0.06801344454288483, -0.0617719441652298, -0.11190153658390045, 0.05348837375640869, -0.23940923810005188, 0.43367546796798706, 0.007683383300900459, -0.42100417613983154, -0.5060092806816101, 0.4102204740047455, 0.19588544964790344, -0.06104309856891632, 0.2774994373321533, -0.07607187330722809, -0.2797323167324066, 0.49527430534362793, -0.20292428135871887, 0.6339259743690491, 0.11286963522434235, -0.014729101210832596, 0.3477330207824707, -0.11839617043733597, 0.4295386075973511, -0.10522761940956116, 0.3132651448249817, -0.3867369294166565, 0.1267298012971878, -0.1956145167350769, -0.14579837024211884, 0.3450934588909149, 0.34143704175949097, -0.36135628819465637, 0.18549640476703644, -0.24026566743850708, -0.20114079117774963, -0.16951149702072144, 0.17965757846832275, -0.17241476476192474, -0.04895683005452156, -0.49672412872314453, 0.06586665660142899, 0.08647999167442322, -0.11554808914661407, 0.13949918746948242, -0.33933955430984497, -0.36601176857948303, -0.16967369616031647, -0.2011692374944687, 0.02382770925760269, 0.06969616562128067, 0.054106492549180984, 0.3728054165840149, -0.27541184425354004, 0.38917553424835205, 0.22265003621578217, -0.006520166993141174, 0.06320090591907501, -0.08355652540922165, -0.04420827701687813, -0.31552618741989136, 0.0853087529540062, -0.23784910142421722, -0.1914612054824829, 0.37096473574638367, 0.185252845287323, -0.046142980456352234, 0.18532909452915192, -0.33911770582199097, -0.4932987689971924, -0.034122154116630554, 0.2769622802734375, -0.19816266000270844, -0.32143834233283997, -0.2580282986164093, 0.11646588146686554, -0.2998569905757904, -0.04784827679395676, 0.10110582411289215, 0.10395558178424835, -0.1663067787885666, 0.33436721563339233, -0.0506744422018528, -0.05110082030296326, 0.11330582201480865, 0.030584465712308884, -0.01479414477944374, -0.10061787068843842, 0.31660112738609314, 0.27995625138282776, -0.12995140254497528, -0.15243375301361084, 0.4298638105392456, 0.25679507851600647, -0.07430563122034073, 0.1292496919631958, -0.27951326966285706, 0.2017783373594284, 0.1354212462902069, 0.20543165504932404, -0.08006703853607178, 0.21483048796653748, 0.021743465214967728, -0.5202370285987854, -0.16431573033332825, 0.03049950674176216, 0.012388687580823898, 0.019177276641130447, -0.07331572473049164, -0.17372126877307892, -0.09866904467344284, -0.19981881976127625, -0.16769850254058838, 0.02244676649570465, -0.41883912682533264, -0.046882763504981995, -0.1079464852809906, 0.3560723066329956, -0.02170383930206299, -0.04963676258921623, 0.004329608753323555, 0.32323843240737915, 0.13014480471611023, -0.10013403743505478, 0.0238373801112175, 0.10752185434103012, 0.32543468475341797, -0.03492172807455063, -0.15425103902816772, -0.30640530586242676, -0.3008863031864166, -0.06406775116920471, -0.21360963582992554, -0.0778777077794075, 0.040549010038375854, 0.1275688111782074, 0.1386837214231491, -0.08496599644422531, -0.17687684297561646, -0.09695711731910706, -0.26341912150382996, 0.35522186756134033, -0.08154116570949554, 0.20019695162773132, 0.14741505682468414, 0.04445638507604599, -0.43654561042785645, 0.2540045976638794, -0.12854981422424316, 0.16390246152877808, 0.39024510979652405, -0.5243198275566101, 0.19429269433021545, 0.3558049201965332, 0.3900126814842224, 0.5439496636390686, -0.4062204360961914, 0.24946148693561554, 0.14761382341384888, 0.07659345865249634, 0.06296093761920929, -0.3462492525577545, 0.305643230676651, 0.3138400912284851, -0.03114720992743969, 0.19658073782920837, -0.011140137910842896, -0.21472202241420746, -0.057940781116485596, -0.03922751918435097, 0.4214385449886322, 0.14211034774780273, 0.23147156834602356, 0.3651030659675598, 0.003756728023290634, -0.0052582137286663055, 0.24061109125614166, 0.10933297872543335, 0.16524434089660645, 0.6171245574951172, -0.1746499240398407, 0.06211789697408676, 0.20542466640472412, 0.18389195203781128, -0.17096871137619019, -0.34287014603614807, 0.20526941120624542, 0.17011448740959167, -0.033542633056640625, 0.12092628329992294, 0.2356305867433548, -0.018969595432281494, -0.05005078390240669, -0.13442790508270264, 0.13189226388931274, 0.10340442508459091, -0.07364567369222641, 0.0913223922252655, -0.239253431558609, -0.09394431114196777, -0.045562904328107834, -0.10493588447570801, -0.08696116507053375, -0.15323515236377716, -0.01982966810464859, 0.2593989670276642, 0.07947830110788345, -0.47411054372787476, 0.13132339715957642, 0.08877639472484589, 0.2951432764530182, -0.2556382715702057, 0.16039691865444183, 0.0315595343708992, -0.06988798081874847, 0.12208940088748932, -0.0121393334120512, 0.2807442843914032, 0.364469975233078, 0.2426082342863083, -0.04762928560376167, -0.29651549458503723, -0.1838790774345398, 0.011991385370492935, 0.3838009834289551, -0.1676541268825531, -0.18480399250984192, 0.22250936925411224, 0.08103082329034805, 0.023716997355222702, 0.2409103512763977, 0.21801061928272247, 0.08741629123687744, -0.42145708203315735, 0.34230560064315796, -0.33304837346076965, -0.1359684318304062, -0.1999174952507019, -0.30482757091522217, -0.3726557493209839, -0.09445060044527054, 0.5413898825645447, -0.05569713935256004, 0.30825290083885193, -0.018692392855882645, 0.05203250050544739, -0.11618995666503906, 0.16920894384384155, 0.22303108870983124, 0.1375816911458969, 0.04417217895388603, 0.05044823884963989, -0.3331143856048584, -0.04204203933477402, 0.012561678886413574, -0.0583747923374176, 0.20475631952285767, 0.21280112862586975, -0.12899717688560486, 0.2311912626028061, 0.14694206416606903, 0.07561282813549042, 0.02728356048464775, 0.31970834732055664, -0.15557420253753662, -0.254533588886261, 0.29418590664863586, 0.10046502947807312, -0.178932785987854, -0.32627272605895996, 0.35182109475135803, 0.0519755482673645, 0.05264151096343994, -0.23483584821224213, 0.14383018016815186, -0.18750624358654022, -0.0017580725252628326, 0.05306136980652809, 0.3717872202396393, 0.2812195122241974, -0.04692647606134415, -0.15102066099643707, -0.07480856776237488, -0.34138572216033936, -0.15661919116973877, 0.3598507046699524, -0.12174901366233826, 0.46859651803970337, -0.2292039841413498, 0.012396816164255142, -0.371646523475647, -0.20846697688102722, -0.06913065910339355, 0.054160989820957184, -0.4011683762073517, 0.3513498902320862, -0.5389060378074646, 0.21572186052799225, 0.07054183632135391, 0.1215258464217186, 0.06918200850486755, 0.21210409700870514, -0.21314969658851624, -0.23433636128902435, 0.18040625751018524, -0.5214873552322388, -0.35371819138526917, 0.20213307440280914, -0.012749671936035156, -0.16577541828155518, -0.12475842982530594, -0.15077096223831177, -0.17230233550071716, 0.4595183730125427, -0.1261059045791626, -0.28288504481315613, -0.07781237363815308, 0.25377461314201355, 0.10481627285480499, -0.05265088379383087, 0.015880826860666275, 0.4175308048725128, -0.2733405828475952, 0.3925030827522278, -0.23557761311531067 ]
https://github.com/huggingface/datasets/issues/6676
Can't Read List of JSON Files Properly
I don't think we should filter for `*.json` as this might silently remove desired files for many users. And this could be a major breaking change for many organizations. You could do the globbing yourself which would keep the code clean. ```python from glob import glob Dataset.from_json(glob('folder/*.json')) ```
### Describe the bug Trying to read a bunch of JSON files into Dataset class but default approach doesn't work. I don't get why it works when I read it one by one but not when I pass as a list :man_shrugging: The code fails with ``` ArrowInvalid: JSON parse error: Invalid value. in row 0 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug This doesn't work ``` from datasets import Dataset # dir contains 100 json files. Dataset.from_json("/PUT SOME PATH HERE/*") ``` This works: ``` from datasets import concatenate_datasets ls_ds = [] for file in list_of_json_files: ls_ds.append(Dataset.from_json(file)) ds = concatenate_datasets(ls_ds) ``` ### Expected behavior I expect this to read json files properly as error is not clear ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.5.0-15-generic-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
48
Can't Read List of JSON Files Properly ### Describe the bug Trying to read a bunch of JSON files into Dataset class but default approach doesn't work. I don't get why it works when I read it one by one but not when I pass as a list :man_shrugging: The code fails with ``` ArrowInvalid: JSON parse error: Invalid value. in row 0 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug This doesn't work ``` from datasets import Dataset # dir contains 100 json files. Dataset.from_json("/PUT SOME PATH HERE/*") ``` This works: ``` from datasets import concatenate_datasets ls_ds = [] for file in list_of_json_files: ls_ds.append(Dataset.from_json(file)) ds = concatenate_datasets(ls_ds) ``` ### Expected behavior I expect this to read json files properly as error is not clear ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.5.0-15-generic-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 I don't think we should filter for `*.json` as this might silently remove desired files for many users. And this could be a major breaking change for many organizations. You could do the globbing yourself which would keep the code clean. ```python from glob import glob Dataset.from_json(glob('folder/*.json')) ```
[ 0.01965172216296196, 0.05599711835384369, -0.10177452862262726, 0.5831318497657776, 0.36756670475006104, 0.2667090892791748, 0.313699871301651, 0.3783991038799286, 0.2648657262325287, -0.0022713690996170044, 0.024840855970978737, 0.45106393098831177, -0.14374160766601562, -0.18902204930782318, -0.1652126908302307, -0.11105126142501831, 0.2007932811975479, -0.008898615837097168, -0.032069914042949677, -0.3222486972808838, -0.23770630359649658, 0.16074812412261963, -0.236873060464859, 0.018038764595985413, 0.05255792662501335, -0.2254822552204132, -0.017197031527757645, 0.0953604131937027, -0.13002033531665802, -0.48059797286987305, 0.08090297877788544, -0.05983873829245567, 0.07454946637153625, 0.36729830503463745, -0.00011367713159415871, 0.16662268340587616, 0.5501290559768677, -0.016749247908592224, -0.12108969688415527, -0.10975272953510284, -0.535952091217041, -0.35050323605537415, 0.1633375883102417, -0.12254752963781357, 0.12012910097837448, -0.43676289916038513, -0.18483872711658478, -0.5820057392120361, 0.5103746056556702, 0.3670682907104492, 0.15390045940876007, -0.11460435390472412, 0.15983878076076508, 0.2748711407184601, 0.143475741147995, 0.15171319246292114, -0.08850502967834473, 0.05949683487415314, 0.2669549584388733, 0.30971524119377136, -0.033220626413822174, -0.1427668333053589, -0.2649697959423065, -0.11679697036743164, 0.3025568425655365, 0.034789226949214935, -0.17192605137825012, -0.3800085186958313, -0.20431920886039734, 0.02605295181274414, 0.5550622344017029, -0.10974311083555222, -0.3839647173881531, -0.31280970573425293, -0.1242142841219902, -0.05188239365816116, 0.20452767610549927, 0.3052707016468048, -0.10423412919044495, 0.40420061349868774, 0.006249059922993183, 0.02536316029727459, -0.27221184968948364, 0.16921979188919067, 0.2095680832862854, 0.0368676595389843, -0.21680840849876404, 0.13010352849960327, 0.054209139198064804, -0.18292970955371857, 0.21229848265647888, -0.498065710067749, -0.28227049112319946, 0.058493513613939285, -0.36304810643196106, 0.01180623471736908, 0.09403771162033081, -0.2060961127281189, 0.32165828347206116, 0.21550171077251434, -0.07731381058692932, 0.03316690772771835, -0.21584384143352509, 0.2574646770954132, 0.34705978631973267, 0.057082001119852066, 0.0972343385219574, 0.23235440254211426, 0.1275099515914917, 0.06960584223270416, 0.04773206636309624, 0.11207473278045654, -0.07386824488639832, -0.13203389942646027, -0.027818724513053894, 0.18383502960205078, 0.08147711306810379, -0.09957419335842133, -0.2569788098335266, 0.1367633044719696, -0.6884561777114868, -0.17325365543365479, 0.24265268445014954, 0.17234012484550476, -0.04141123220324516, 0.44918957352638245, 0.034679628908634186, 0.32540977001190186, 0.10874252766370773, -0.16719290614128113, -0.03293509781360626, -0.08870315551757812, 0.018798384815454483, -0.046794913709163666, 0.0566619373857975, -0.058444369584321976, 0.18237721920013428, 0.24838872253894806, -0.017160631716251373, -0.426160603761673, 0.07845437526702881, -0.24030223488807678, 0.01930859684944153, -0.00042685866355895996, 0.10562558472156525, 0.30679917335510254, 0.10293162614107132, -0.41396886110305786, -0.10676796734333038, 0.19539767503738403, -0.452966570854187, 0.06745289266109467, 0.10216758400201797, 0.08059895783662796, 0.13641248643398285, 0.05397495627403259, -0.5637197494506836, 0.08612875640392303, -0.04168454557657242, -0.03136243671178818, -0.07803847640752792, -0.0739905834197998, 0.17014719545841217, -0.2802792191505432, -0.17543914914131165, 0.3662204146385193, -0.4746497571468353, 0.2495260238647461, 0.26697131991386414, 0.035111673176288605, 0.17744502425193787, 0.46013855934143066, -0.35049915313720703, 0.09946160018444061, -0.29924720525741577, 0.27896976470947266, 0.30251196026802063, -0.257752001285553, -0.397190123796463, 0.5159311890602112, 0.15644437074661255, 0.14955222606658936, 0.21333947777748108, 0.05142875015735626, 0.14447101950645447, -0.15936747193336487, 0.09658379852771759, 0.22896333038806915, 0.061264678835868835, 0.06541144847869873, -0.17640265822410583, -0.23960737884044647, 0.1971200406551361, -0.18021109700202942, -0.36041802167892456, 0.2041487693786621, 0.10519906133413315, -0.11694364249706268, 0.604692280292511, -0.19561174511909485, 0.06150190532207489, 0.5405465960502625, 0.0537167564034462, -0.11647568643093109, 0.0895553007721901, 0.19481149315834045, -0.5584787130355835, -0.02802104502916336, 0.22056102752685547, -0.3418232798576355, -0.32075077295303345, -0.2449675351381302, -0.11240313202142715, -0.106825090944767, -0.2969094216823578, 0.38407444953918457, 0.07624801993370056, 0.34783029556274414, -0.08344336599111557, 0.04541238024830818, -0.19083909690380096, 0.33807623386383057, 0.013637317344546318, 0.20074129104614258, -0.4709915518760681, 0.3574017882347107, -0.026596931740641594, -0.017869945615530014, 0.18145671486854553, -0.18336090445518494, 0.3172280490398407, -0.27946609258651733, -0.20728108286857605, 0.13591456413269043, 0.32428327202796936, -0.18651781976222992, -0.17697787284851074, 0.06155131757259369, 0.239252969622612, -0.231938436627388, -0.33998456597328186, 0.30705443024635315, 0.38034865260124207, -0.1277267038822174, -0.3804490268230438, 0.4592354893684387, -0.17832329869270325, 0.28075534105300903, -0.06853087246417999, -0.0019421577453613281, 0.34786275029182434, 0.07512187957763672, -0.17916464805603027, 0.013709209859371185, 0.10793082416057587, 0.28505590558052063, 0.16176821291446686, 0.0799388438463211, -0.5771645307540894, -0.13122493028640747, 0.7913020849227905, -0.12066787481307983, -0.09027483314275742, 0.05747297406196594, 0.14901046454906464, 0.06872657686471939, 0.32775476574897766, 0.16955043375492096, 0.1931680291891098, 0.0352201983332634, -0.1038542240858078, -0.059183038771152496, 0.060311466455459595, -0.19338002800941467, -0.005756773054599762, 0.23417367041110992, 0.3392947018146515, 0.10650979727506638, 0.19270730018615723, 0.09966635704040527, -0.15667080879211426, -0.22022229433059692, 0.03826378285884857, 0.25465697050094604, -0.39307546615600586, 0.3478994071483612, -0.4021320641040802, 0.03721053898334503, -0.1384960412979126, -0.25033387541770935, -0.04586433246731758, -0.3038735091686249, -0.31729650497436523, 0.10995018482208252, -0.11400841176509857, -0.027463415637612343, 0.03055504336953163, 0.20470497012138367, 0.15841077268123627, -0.15648801624774933, -0.4485139846801758, 0.1908702701330185, -0.2508091628551483, -0.04892367124557495, 0.5638279318809509, 0.16451841592788696, -0.15815840661525726, -0.07920245826244354, -0.2268921434879303, 0.03405845910310745, -0.05227184295654297, 0.13383382558822632, -0.29172253608703613, 0.24707980453968048, -0.003658592700958252, 0.09589776396751404, -0.18621334433555603, -0.05192463845014572, -0.008661196567118168, 0.21283866465091705, -0.2754117250442505, 0.20105472207069397, 0.24136094748973846, -0.19151155650615692, -0.1120876669883728, -0.38832467794418335, -0.059694334864616394, -0.2868245840072632, 0.32561343908309937, 0.11642542481422424, 0.13823795318603516, 0.029218215495347977, 0.11838844418525696, 0.1466391682624817, 0.21208101511001587, 0.23161660134792328, 0.0860079824924469, -0.21677012741565704, 0.4437308609485626, -0.23261471092700958, -0.4313141703605652, 0.17358960211277008, 0.005490409210324287, 0.04179069399833679, -0.13897058367729187, -0.4180307984352112, -0.0741010382771492, -0.229591503739357, 0.05892558768391609, -0.05007948726415634, -0.009297540411353111, -0.16184255480766296, 0.00122172012925148, 0.19753997027873993, -0.28102490305900574, -0.15907703340053558, 0.041666798293590546, -0.041330814361572266, 0.1393136978149414, 0.35021793842315674, 0.6272326707839966, 0.10006745159626007, 0.11360085010528564, 0.5302940607070923, 0.12401984632015228, 0.224948912858963, -0.10539581626653671, 0.1522916555404663, -0.09219268709421158, -0.19184663891792297, -0.12624482810497284, 0.03322061151266098, -0.19135600328445435, -0.12844395637512207, 0.013231193646788597, -0.008233333006501198, -0.009361650794744492, 0.3779365122318268, -0.2644244432449341, -0.16859662532806396, -0.11992478370666504, 0.016738973557949066, -0.2264176607131958, -0.007988842204213142, 0.19515854120254517, 0.1582704335451126, -0.011739950627088547, 0.029450032860040665, 0.33880293369293213, 0.2714208662509918, 0.06337146461009979, -0.33739185333251953, -0.18211409449577332, -0.19475415349006653, 0.25785210728645325, 0.09757169336080551, 0.5691084861755371, 0.1361519992351532, 0.29701751470565796, 0.03414110839366913, -0.11408315598964691, 0.6514091491699219, -0.0807180404663086, -0.14880771934986115, 0.1869925856590271, 0.26561543345451355, -0.23548369109630585, 0.1133720874786377, -0.24553126096725464, 0.22701798379421234, 0.35202187299728394, 0.08791673928499222, -0.373259961605072, -0.22877062857151031, -0.16086287796497345, 0.24781787395477295, 0.024492252618074417, -0.020634368062019348, -0.1995818167924881, -0.48921269178390503, -0.4045979082584381, -0.3102850019931793, 0.3367239236831665, 0.2692522704601288, -0.053251855075359344, -0.31338903307914734, -0.12371422350406647, -0.3847225308418274, -0.036445826292037964, -0.15822406113147736, 0.2432202696800232, 0.17326003313064575, 0.14965865015983582, -0.04034248739480972, 0.3514837324619293, 0.5833588242530823, 0.7825098037719727, 0.07101896405220032, -0.5574355721473694, -0.04948306083679199, -0.42599886655807495, 0.23004405200481415, -0.029121309518814087, -0.32162556052207947, 0.031009159982204437, -0.01176631823182106, -0.08488260209560394, 0.08263913542032242, -0.24140354990959167, 0.376180499792099, -0.02828478440642357, -0.43552207946777344, -0.5101138949394226, 0.46323275566101074, 0.16530612111091614, -0.06558062881231308, 0.30387595295906067, -0.07541637122631073, -0.3135928809642792, 0.49266505241394043, -0.15649554133415222, 0.6599206924438477, 0.10762527585029602, -0.045863788574934006, 0.2773980498313904, -0.17448431253433228, 0.48007410764694214, -0.12236213684082031, 0.3155742883682251, -0.4128829836845398, 0.17631642520427704, -0.17410409450531006, -0.1124446764588356, 0.333587110042572, 0.3403412699699402, -0.346632719039917, 0.15578867495059967, -0.2703113853931427, -0.21697482466697693, -0.1437605619430542, 0.15302671492099762, -0.18694430589675903, -0.08638232946395874, -0.474063903093338, 0.08765663951635361, 0.06517408043146133, -0.1522771716117859, 0.16102352738380432, -0.358608603477478, -0.3810494840145111, -0.16285061836242676, -0.17523729801177979, 0.07261985540390015, 0.01284930482506752, 0.06367437541484833, 0.33507052063941956, -0.27075430750846863, 0.3851405382156372, 0.15908873081207275, -0.005573779344558716, 0.08846477419137955, -0.050800979137420654, -0.05837519094347954, -0.34495219588279724, 0.10476861894130707, -0.1923682689666748, -0.21373242139816284, 0.3529161810874939, 0.19568699598312378, -0.06161734461784363, 0.1542646586894989, -0.3454667925834656, -0.47905462980270386, 0.0016775280237197876, 0.2550411820411682, -0.14214318990707397, -0.29676416516304016, -0.2167378067970276, 0.09131348133087158, -0.238240584731102, -0.10988995432853699, 0.10217307507991791, 0.07750536501407623, -0.1263388991355896, 0.26223427057266235, -0.06087275967001915, -0.08075107634067535, 0.10540637373924255, 0.07959534972906113, 0.012190258130431175, -0.11377670615911484, 0.3077467978000641, 0.32349860668182373, -0.12736280262470245, -0.140647754073143, 0.386889785528183, 0.22255343198776245, -0.1032535582780838, 0.10136392712593079, -0.32215937972068787, 0.21688057482242584, 0.15125681459903717, 0.15752440690994263, -0.10824708640575409, 0.15726131200790405, 0.03962947055697441, -0.48871660232543945, -0.14389626681804657, 0.011249087750911713, 0.04574087634682655, -0.027725402265787125, -0.0376390665769577, -0.20263490080833435, -0.1003485918045044, -0.18171072006225586, -0.18072348833084106, 0.03806948661804199, -0.3650280833244324, -0.07717743515968323, -0.09345260262489319, 0.38510748744010925, -0.09691498428583145, -0.07464268803596497, -0.008611831814050674, 0.3026750087738037, 0.1640419363975525, -0.07711543142795563, -0.047742217779159546, 0.11561670154333115, 0.3013356328010559, -0.07318934798240662, -0.18003961443901062, -0.3297865390777588, -0.33616551756858826, -0.06641198694705963, -0.10783742368221283, -0.04649121314287186, 0.05214908719062805, 0.16985072195529938, 0.06577974557876587, 0.022769775241613388, -0.1474544256925583, -0.09502615034580231, -0.2001638114452362, 0.3832446336746216, -0.06837230920791626, 0.21893317997455597, 0.22817832231521606, 0.10034219920635223, -0.4404039978981018, 0.24100130796432495, -0.19661052525043488, 0.16967910528182983, 0.48261478543281555, -0.582561731338501, 0.24894925951957703, 0.3588036298751831, 0.33174726366996765, 0.5742782950401306, -0.36492854356765747, 0.2103295475244522, 0.10513494163751602, 0.10225703567266464, 0.12002788484096527, -0.34038135409355164, 0.2896599769592285, 0.31260955333709717, -0.07508999109268188, 0.1873272955417633, -0.04087677597999573, -0.17348356544971466, -0.10809651017189026, -0.03268193453550339, 0.46647414565086365, 0.16957634687423706, 0.24054917693138123, 0.3206164538860321, -0.059634264558553696, -0.02880062535405159, 0.22233405709266663, 0.10004732012748718, 0.15330488979816437, 0.5876215696334839, -0.09856245666742325, 0.03732645511627197, 0.2292943000793457, 0.23413363099098206, -0.2465757131576538, -0.33993563055992126, 0.17963790893554688, 0.17427700757980347, -0.08229157328605652, 0.16285255551338196, 0.19698426127433777, 0.007361553609371185, -0.006339303217828274, -0.16667477786540985, 0.10205786675214767, 0.1462678611278534, -0.04639063775539398, 0.09477163851261139, -0.3419002890586853, -0.09925990551710129, -0.11073283851146698, -0.06335828453302383, -0.1213008314371109, -0.18136431276798248, 0.02659393846988678, 0.24397453665733337, 0.06462980061769485, -0.5001078844070435, 0.11892713606357574, 0.1112835481762886, 0.29947715997695923, -0.28299230337142944, 0.15822161734104156, 0.04772191867232323, -0.05044243484735489, 0.09372862428426743, -0.06228180229663849, 0.29804152250289917, 0.37425318360328674, 0.19514568150043488, -0.07503566145896912, -0.2991291880607605, -0.19439256191253662, -0.01756262220442295, 0.4522802531719208, -0.07779638469219208, -0.15722547471523285, 0.224723681807518, 0.09636971354484558, 0.025522533804178238, 0.23563329875469208, 0.20776823163032532, 0.1918177306652069, -0.38272351026535034, 0.34390413761138916, -0.3256283104419708, -0.16187512874603271, -0.1788473278284073, -0.3708353042602539, -0.34141767024993896, -0.14492782950401306, 0.5240916609764099, -0.052797600626945496, 0.3189162611961365, -0.04176805913448334, 0.04306474328041077, -0.11041173338890076, 0.19908428192138672, 0.32336363196372986, 0.06870406121015549, 0.02584359422326088, 0.03644818067550659, -0.2685609459877014, -0.051105864346027374, 0.036231450736522675, -0.05000394955277443, 0.1918792426586151, 0.21488869190216064, -0.08818874508142471, 0.24498794972896576, 0.08431360125541687, 0.13667291402816772, 0.06915273517370224, 0.32856249809265137, -0.1628553420305252, -0.2288392335176468, 0.33951520919799805, 0.13628916442394257, -0.160643070936203, -0.3261692225933075, 0.33817505836486816, 0.0003892369568347931, 0.06418217718601227, -0.25057482719421387, 0.15927042067050934, -0.13149812817573547, -0.11821910738945007, 0.14285461604595184, 0.39294156432151794, 0.25264474749565125, -0.02737666666507721, -0.16353456676006317, -0.1514950692653656, -0.3031245172023773, -0.18794949352741241, 0.36391910910606384, -0.15441514551639557, 0.5141760110855103, -0.15475419163703918, -0.015233505517244339, -0.3721206486225128, -0.24249204993247986, -0.09940241277217865, 0.11125117540359497, -0.3855750262737274, 0.35887256264686584, -0.48759597539901733, 0.1880996972322464, 0.045906588435173035, 0.1332332193851471, 0.07070055603981018, 0.24739672243595123, -0.22810254991054535, -0.2331218421459198, 0.1877310574054718, -0.5057817101478577, -0.4018462300300598, 0.24590380489826202, 0.02037842571735382, -0.12731865048408508, -0.12628978490829468, -0.1689799726009369, -0.15874391794204712, 0.44526565074920654, -0.17514044046401978, -0.27924400568008423, -0.002097219228744507, 0.20851245522499084, 0.09239283204078674, -0.01088031567633152, 0.03517397493124008, 0.3713195323944092, -0.2809024155139923, 0.35838666558265686, -0.20237354934215546 ]
https://github.com/huggingface/datasets/issues/6676
Can't Read List of JSON Files Properly
I think it should still be fine to log a warning message in case the folder contains different files? I also don't get why would this be breaking as in the end using `from_FILE_TYPE` should be able to read a specific file type only. Maybe some other use case I am not aware of but since globbing or this case not mentioned anywhere in the doc, I spent quite a bit of time trying to figure out where the issue was. Just making sure it's clear for users.
### Describe the bug Trying to read a bunch of JSON files into Dataset class but default approach doesn't work. I don't get why it works when I read it one by one but not when I pass as a list :man_shrugging: The code fails with ``` ArrowInvalid: JSON parse error: Invalid value. in row 0 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug This doesn't work ``` from datasets import Dataset # dir contains 100 json files. Dataset.from_json("/PUT SOME PATH HERE/*") ``` This works: ``` from datasets import concatenate_datasets ls_ds = [] for file in list_of_json_files: ls_ds.append(Dataset.from_json(file)) ds = concatenate_datasets(ls_ds) ``` ### Expected behavior I expect this to read json files properly as error is not clear ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.5.0-15-generic-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
88
Can't Read List of JSON Files Properly ### Describe the bug Trying to read a bunch of JSON files into Dataset class but default approach doesn't work. I don't get why it works when I read it one by one but not when I pass as a list :man_shrugging: The code fails with ``` ArrowInvalid: JSON parse error: Invalid value. in row 0 UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte DatasetGenerationError: An error occurred while generating the dataset ``` ### Steps to reproduce the bug This doesn't work ``` from datasets import Dataset # dir contains 100 json files. Dataset.from_json("/PUT SOME PATH HERE/*") ``` This works: ``` from datasets import concatenate_datasets ls_ds = [] for file in list_of_json_files: ls_ds.append(Dataset.from_json(file)) ds = concatenate_datasets(ls_ds) ``` ### Expected behavior I expect this to read json files properly as error is not clear ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.5.0-15-generic-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.2 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 I think it should still be fine to log a warning message in case the folder contains different files? I also don't get why would this be breaking as in the end using `from_FILE_TYPE` should be able to read a specific file type only. Maybe some other use case I am not aware of but since globbing or this case not mentioned anywhere in the doc, I spent quite a bit of time trying to figure out where the issue was. Just making sure it's clear for users.
[ 0.022134538739919662, -0.03403032571077347, -0.05151001363992691, 0.6589477062225342, 0.43004441261291504, 0.17779582738876343, 0.3971889317035675, 0.27819061279296875, 0.16484543681144714, 0.0011704862117767334, 0.08794983476400375, 0.3356815278530121, -0.1461491733789444, -0.13598386943340302, -0.2592729926109314, -0.0903950184583664, 0.23736914992332458, -0.053439781069755554, -0.1049165278673172, -0.3572841286659241, -0.21543090045452118, 0.18784701824188232, -0.2549935579299927, 0.020437993109226227, -0.0670241266489029, -0.26281413435935974, -0.038020066916942596, 0.16872045397758484, -0.16309213638305664, -0.5165576934814453, 0.10349966585636139, -0.15343475341796875, 0.1272074580192566, 0.37471458315849304, -0.00011713136336766183, 0.15175658464431763, 0.5249931812286377, -0.06467510759830475, -0.11935460567474365, -0.15688104927539825, -0.48613861203193665, -0.37691763043403625, 0.23796001076698303, -0.12550324201583862, 0.13574624061584473, -0.4261613190174103, -0.11048838496208191, -0.5732556581497192, 0.4507518410682678, 0.36769044399261475, 0.12157087028026581, -0.061159778386354446, 0.15407858788967133, 0.1785707324743271, 0.139255091547966, 0.17950564622879028, -0.1430143117904663, 0.07198692858219147, 0.27354636788368225, 0.27469101548194885, -0.03576912730932236, -0.15357916057109833, -0.239151269197464, -0.11735916137695312, 0.38945385813713074, 0.09428192675113678, -0.1866440773010254, -0.39411213994026184, -0.26124608516693115, 0.10812494158744812, 0.6498036980628967, -0.10299959033727646, -0.3792235851287842, -0.40870293974876404, -0.1564554125070572, -0.03717266768217087, 0.29836925864219666, 0.2752745449542999, -0.1624864786863327, 0.3756750226020813, 0.08615297079086304, 0.019973212853074074, -0.2866304814815521, 0.18257203698158264, 0.14165915548801422, -0.04609405994415283, -0.27327921986579895, 0.17614954710006714, 0.05954160913825035, -0.09547276794910431, 0.16688014566898346, -0.4045712351799011, -0.23089516162872314, 0.044195059686899185, -0.33545881509780884, -0.00131949782371521, 0.18447186052799225, -0.1913973093032837, 0.26689577102661133, 0.17442050576210022, 0.011066940613090992, -0.028997477144002914, -0.2561396062374115, 0.2535698413848877, 0.5009504556655884, 0.07423630356788635, 0.18568333983421326, 0.2785598933696747, 0.12632951140403748, 0.03194032236933708, 0.02574414387345314, 0.07361563295125961, -0.09590261429548264, -0.1768481284379959, -0.05598030984401703, 0.22031643986701965, 0.12222208082675934, -0.12425416707992554, -0.26955950260162354, 0.12203812599182129, -0.6154798269271851, -0.23781073093414307, 0.17157551646232605, 0.17433497309684753, -0.04950960353016853, 0.5020149946212769, -0.07070974260568619, 0.31958603858947754, 0.0749104768037796, -0.13357314467430115, -0.011828979477286339, -0.10932682454586029, -0.11977234482765198, -0.07252508401870728, -0.0017422735691070557, -0.009696874767541885, 0.15784230828285217, 0.27521148324012756, 0.027363430708646774, -0.2926257848739624, -0.03723445534706116, -0.2656940817832947, 0.14094041287899017, 0.027836259454488754, 0.10302285850048065, 0.34718117117881775, 0.1939292699098587, -0.41551947593688965, -0.21050354838371277, 0.19831669330596924, -0.4659229516983032, -0.03330463543534279, -0.009974641725420952, 0.019889317452907562, 0.1473638117313385, 0.060682639479637146, -0.5620562434196472, 0.058270469307899475, -0.01853524148464203, -0.11540818214416504, -0.037598736584186554, -0.12406222522258759, 0.20691698789596558, -0.37808001041412354, -0.26251423358917236, 0.37509608268737793, -0.5355716347694397, 0.22977665066719055, 0.2467673271894455, -0.06297281384468079, 0.22951602935791016, 0.5147728323936462, -0.3600163161754608, 0.09749214351177216, -0.35360679030418396, 0.27242881059646606, 0.3357204794883728, -0.273410439491272, -0.2675343155860901, 0.573655903339386, 0.1935655027627945, 0.1929677575826645, 0.30546844005584717, 0.030114255845546722, 0.10290501266717911, -0.2284335345029831, 0.09162105619907379, 0.18030419945716858, 0.02992245927453041, 0.04962468892335892, -0.14980968832969666, -0.1397264003753662, 0.17046763002872467, -0.2610297203063965, -0.43745163083076477, 0.17357486486434937, 0.13451537489891052, -0.10039480030536652, 0.5883469581604004, -0.2061833143234253, 0.00992017425596714, 0.4607189893722534, 0.11346334218978882, -0.10680736601352692, 0.038645561784505844, 0.2248019576072693, -0.5744180083274841, -0.0080355703830719, 0.1526610404253006, -0.2087411880493164, -0.3020179271697998, -0.2721247375011444, -0.030903244391083717, -0.11353971064090729, -0.2920708656311035, 0.34712421894073486, 0.011153984814882278, 0.3101584315299988, -0.10784852504730225, 0.045183103531599045, -0.26005786657333374, 0.2797955572605133, -0.11036497354507446, 0.18000835180282593, -0.4170244336128235, 0.314072847366333, -0.03388402611017227, -0.09422652423381805, 0.13209527730941772, -0.19830822944641113, 0.33851760625839233, -0.2088703066110611, -0.1867893934249878, 0.2029373049736023, 0.34069353342056274, -0.09211114048957825, -0.2131991684436798, 0.09762533009052277, 0.23575110733509064, -0.1514839380979538, -0.3382903039455414, 0.23736201226711273, 0.28150036931037903, -0.10069054365158081, -0.3668518662452698, 0.4500489830970764, -0.158856600522995, 0.27016839385032654, -0.019990209490060806, -0.003988584503531456, 0.29256826639175415, 0.11596615612506866, -0.20006835460662842, -0.019351448863744736, 0.09143127501010895, 0.3513603210449219, 0.04421393945813179, 0.12714169919490814, -0.6295796632766724, -0.13524243235588074, 0.8721125721931458, -0.12168844044208527, -0.07802631705999374, 0.01805253140628338, 0.17663580179214478, 0.022750426083803177, 0.3540579378604889, 0.22134850919246674, 0.24452441930770874, 0.0042619528248906136, 0.013089578598737717, -0.06970527768135071, -0.048278242349624634, -0.20144401490688324, 0.045874156057834625, 0.1836807280778885, 0.34516677260398865, 0.15941432118415833, 0.09045597165822983, 0.0904511883854866, -0.19284504652023315, -0.185782328248024, 0.01277943141758442, 0.21795545518398285, -0.43201836943626404, 0.3361455500125885, -0.38986915349960327, -0.009657945483922958, -0.21260428428649902, -0.2516596019268036, -0.1092059463262558, -0.3215954601764679, -0.2949720621109009, 0.10465413331985474, -0.16591031849384308, -0.07103238999843597, 0.06248460337519646, 0.19574958086013794, 0.20090478658676147, -0.17126448452472687, -0.35210511088371277, 0.2351808249950409, -0.25009506940841675, -0.04981626570224762, 0.5885646939277649, 0.13596521317958832, -0.19487057626247406, -0.12196537107229233, -0.2763872742652893, 0.03303483501076698, -0.06603769212961197, 0.16745427250862122, -0.2897310256958008, 0.23508408665657043, 0.11850805580615997, 0.07339822500944138, -0.10929225385189056, -0.10660172253847122, 0.022853145375847816, 0.0627136379480362, -0.2285011112689972, 0.178689107298851, 0.20938362181186676, -0.1512458473443985, -0.1348874717950821, -0.3896664083003998, -0.10173381119966507, -0.34379926323890686, 0.30895984172821045, 0.11820779740810394, 0.16778701543807983, 0.02445356175303459, 0.09639909863471985, 0.16405895352363586, 0.13924114406108856, 0.2684360444545746, 0.07681217789649963, -0.21021221578121185, 0.3940328061580658, -0.25521302223205566, -0.449331134557724, 0.20792075991630554, 0.08986132591962814, 0.004968374967575073, -0.15993402898311615, -0.41290944814682007, -0.10529825836420059, -0.18437427282333374, 0.06388132274150848, -0.013681799173355103, 0.033517517149448395, -0.10213275253772736, -0.008077561855316162, 0.17547084391117096, -0.2754468023777008, -0.05895186960697174, 0.0316171795129776, -0.039023175835609436, 0.15851235389709473, 0.31997358798980713, 0.5177542567253113, 0.17080290615558624, 0.10906416177749634, 0.4906395673751831, 0.09907302260398865, 0.3103504180908203, -0.10793078690767288, 0.277584969997406, -0.16363367438316345, -0.17321206629276276, -0.12214702367782593, -0.01985771954059601, -0.2843010425567627, -0.11997832357883453, 0.038597483187913895, -0.04146071523427963, -0.05017411336302757, 0.37569183111190796, -0.21635329723358154, -0.18059958517551422, -0.019186491146683693, 0.05527741089463234, -0.22099342942237854, -0.03607858344912529, 0.20324933528900146, 0.2082742154598236, 0.0578390508890152, 0.03129301965236664, 0.33090633153915405, 0.3400470018386841, 0.007182413712143898, -0.3632795810699463, -0.2822173833847046, -0.22602471709251404, 0.21199136972427368, 0.16860446333885193, 0.4768535792827606, 0.07977589964866638, 0.13702312111854553, 0.0019000247120857239, -0.0708075687289238, 0.6077153086662292, -0.08519409596920013, -0.21078471839427948, 0.20511895418167114, 0.263976514339447, -0.23317685723304749, 0.11691294610500336, -0.28796181082725525, 0.24820955097675323, 0.34424230456352234, 0.11316155642271042, -0.4078407287597656, -0.28324469923973083, -0.18139760196208954, 0.23798534274101257, 0.1196683794260025, 0.08815304934978485, -0.19394917786121368, -0.36335498094558716, -0.42528095841407776, -0.32918021082878113, 0.33106884360313416, 0.29287752509117126, -0.13294121623039246, -0.27381497621536255, -0.05087163299322128, -0.3452115058898926, 0.020789064466953278, -0.1606011837720871, 0.299584299325943, 0.09721368551254272, 0.03862989321351051, -0.04681292921304703, 0.42503252625465393, 0.6449342966079712, 0.861380934715271, 0.027612833306193352, -0.4769012928009033, 0.07309447228908539, -0.33539825677871704, 0.23983225226402283, 0.08617927134037018, -0.3152087330818176, -0.035712696611881256, -0.0792633593082428, -0.08738824725151062, 0.04221467673778534, -0.22020360827445984, 0.4819839894771576, -0.01850500889122486, -0.4476051330566406, -0.5229326486587524, 0.49597737193107605, 0.205698162317276, -0.06837313622236252, 0.40370869636535645, 0.03981003910303116, -0.31186455488204956, 0.4181287884712219, -0.17131942510604858, 0.7533149719238281, 0.22914297878742218, 0.09001719951629639, 0.3167787492275238, -0.03725449740886688, 0.4471963942050934, -0.03697572275996208, 0.2652420401573181, -0.3532036542892456, 0.12362467497587204, -0.24461349844932556, -0.1663486808538437, 0.3835650384426117, 0.32165271043777466, -0.347616046667099, 0.21941635012626648, -0.2975773811340332, -0.11484555900096893, -0.2233441323041916, 0.16055861115455627, -0.3645938038825989, -0.047598499804735184, -0.5475323796272278, 0.006086181849241257, 0.21010778844356537, -0.15371060371398926, 0.1721801459789276, -0.33914363384246826, -0.2954288423061371, -0.227360337972641, -0.27288252115249634, 0.014959834516048431, 0.0575898252427578, -0.01936066523194313, 0.2877919375896454, -0.2885599136352539, 0.3936706781387329, 0.28740882873535156, 0.04765327647328377, -0.017476730048656464, -0.04675117880105972, -0.09238865971565247, -0.3565550744533539, 0.13554061949253082, -0.18998302519321442, -0.21777141094207764, 0.4454687535762787, 0.18259164690971375, -0.028850331902503967, 0.2183951735496521, -0.3912156820297241, -0.5128030776977539, -0.06694014370441437, 0.22431732714176178, -0.18279395997524261, -0.39801374077796936, -0.18246620893478394, 0.10006852447986603, -0.23251330852508545, -0.09260198473930359, 0.0643022358417511, 0.15629206597805023, -0.13253387808799744, 0.2878067195415497, -0.09821732342243195, -0.015736430883407593, 0.047548409551382065, 0.017103783786296844, 0.05400489270687103, -0.07658132165670395, 0.2449522465467453, 0.33068129420280457, -0.13424834609031677, -0.11133448034524918, 0.4738260507583618, 0.32436177134513855, -0.11688082665205002, 0.15810416638851166, -0.26797252893447876, 0.1411537379026413, 0.13128355145454407, 0.3290189206600189, -0.015781518071889877, 0.27290716767311096, -0.022125396877527237, -0.41868728399276733, -0.09661730378866196, 0.11566442251205444, 0.04438168555498123, 0.061594896018505096, -0.09570413827896118, -0.1987469494342804, -0.005494540557265282, -0.2365221083164215, -0.15912538766860962, 0.07363376021385193, -0.3007575273513794, -0.07678833603858948, -0.08386585116386414, 0.3912181258201599, 0.06227169558405876, -0.06756092607975006, -0.05173758417367935, 0.289165198802948, 0.1365128755569458, -0.011491131037473679, -0.005158940330147743, 0.16704031825065613, 0.31394413113594055, -0.04629015177488327, -0.09371769428253174, -0.38219451904296875, -0.272099107503891, -0.08609304577112198, -0.08265011012554169, -0.02205563709139824, 0.015651632100343704, 0.23363390564918518, 0.10594756156206131, 0.10024569183588028, -0.10048477351665497, -0.04039854556322098, -0.20071282982826233, 0.43464744091033936, -0.032619409263134, 0.1934880018234253, 0.08689581602811813, 0.0602525919675827, -0.3736099302768707, 0.2996542751789093, -0.20621345937252045, 0.19976085424423218, 0.4864993095397949, -0.4434359073638916, 0.15160803496837616, 0.26010364294052124, 0.48908302187919617, 0.5040575265884399, -0.3027133643627167, 0.19893544912338257, 0.09992605447769165, 0.06064330041408539, 0.1155664324760437, -0.33377766609191895, 0.1555367261171341, 0.25866881012916565, -0.0006699636578559875, 0.19010792672634125, -0.018613025546073914, -0.158539280295372, -0.033168233931064606, 0.009128857403993607, 0.45609697699546814, 0.16661913692951202, 0.324543297290802, 0.3778964579105377, -0.1755482703447342, 0.026039712131023407, 0.26246166229248047, 0.04191640764474869, 0.20306862890720367, 0.6147293448448181, -0.1499675214290619, 0.05349035561084747, 0.2015029489994049, 0.14642366766929626, -0.17539361119270325, -0.3934958279132843, 0.2548314034938812, 0.21628063917160034, -0.04809270799160004, 0.12283814698457718, 0.16793209314346313, 0.06221156194806099, -0.1890825480222702, -0.11030878871679306, 0.06248597055673599, 0.11445708572864532, -0.062203072011470795, 0.1084737777709961, -0.3860035836696625, -0.11225170642137527, -0.017051421105861664, -0.03856143355369568, -0.1482050120830536, -0.1666930764913559, 0.04958391562104225, 0.23992125689983368, 0.1116267517209053, -0.43679079413414, 0.211818128824234, -0.04005558788776398, 0.3521564304828644, -0.22513443231582642, 0.18719351291656494, 0.02684633433818817, -0.0213991180062294, 0.1022724062204361, -0.007450537756085396, 0.4114328622817993, 0.4564749300479889, 0.23648175597190857, -0.11798863857984543, -0.2684032917022705, -0.19142986834049225, -0.012813329696655273, 0.45942196249961853, -0.10650984942913055, -0.10466723144054413, 0.24434660375118256, 0.04998602718114853, 0.03076503798365593, 0.2717421352863312, 0.12206657230854034, 0.2065620720386505, -0.37322571873664856, 0.39288055896759033, -0.3742573857307434, -0.12664487957954407, -0.12124557793140411, -0.3485397398471832, -0.36743879318237305, -0.11490954458713531, 0.5707160234451294, -0.02427997626364231, 0.3109522759914398, -0.08467789739370346, 0.021875664591789246, 0.014171511866152287, 0.14554175734519958, 0.3104926347732544, 0.12556251883506775, 0.02293989062309265, 0.036381497979164124, -0.3636806309223175, 0.03181500732898712, 0.11464919149875641, -0.015347971580922604, 0.12629567086696625, 0.2496403604745865, -0.02171296626329422, 0.2533527612686157, 0.16450096666812897, 0.04744948819279671, 0.055164337158203125, 0.3339371979236603, -0.15477529168128967, -0.25063085556030273, 0.24077440798282623, 0.10532007366418839, -0.23646114766597748, -0.35962915420532227, 0.35244786739349365, -0.039442699402570724, 0.01426967978477478, -0.252210795879364, 0.13983605802059174, -0.11529146134853363, -0.06023970991373062, 0.12105785310268402, 0.4268129765987396, 0.29150062799453735, -0.01763499528169632, -0.24733546376228333, -0.14131112396717072, -0.37641116976737976, -0.1925380676984787, 0.3102257251739502, -0.20298433303833008, 0.5241388082504272, -0.19106251001358032, 0.030493807047605515, -0.4079477787017822, -0.22106991708278656, -0.09787324070930481, 0.12446644902229309, -0.3849283456802368, 0.3428043723106384, -0.49032747745513916, 0.044539548456668854, 0.03501370921730995, 0.17076584696769714, 0.05621444433927536, 0.15026091039180756, -0.2047753930091858, -0.22265110909938812, 0.2278062403202057, -0.5546308159828186, -0.33906903862953186, 0.20498032867908478, -0.010934144258499146, -0.1020473912358284, -0.11313017457723618, -0.2435421645641327, -0.17681309580802917, 0.4198433756828308, -0.09841351956129074, -0.2511293888092041, -0.07906153798103333, 0.17234505712985992, 0.013511333614587784, -0.05499715358018875, 0.07904035598039627, 0.35451778769493103, -0.35391268134117126, 0.3871159553527832, -0.26343584060668945 ]
https://github.com/huggingface/datasets/issues/6675
Allow image model (color conversion) to be specified as part of datasets Image() decode
It would be a great addition indeed :) This can be implemented the same way we have `sampling_rate` for Audio(): we just add a new parameter to the Image() type and take this parameter into account in `Image.decode_example` EDIT: adding an example of how it can be used: ```python ds = ds.cast_column("image", Image(mode=...)) ```
### Feature request Typical torchvision / torch Datasets in image applications apply color conversion in the Dataset portion of the code as part of image decode, separately from the image transform stack. This is true for PIL.Image where convert is usually called in dataset, for native torchvision https://pytorch.org/vision/main/generated/torchvision.io.decode_jpeg.html, and similarly in tensorflow.data pipelines decode_jpeg or https://www.tensorflow.org/api_docs/python/tf/io/decode_and_crop_jpeg have a channels arg that allows controlling the image mode in the decode step. datasets currently requires this pattern (from [examples](https://huggingface.co/docs/datasets/main/en/image_process)): ``` from torchvision.transforms import Compose, ColorJitter, ToTensor jitter = Compose( [ ColorJitter(brightness=0.25, contrast=0.25, saturation=0.25, hue=0.7), ToTensor(), ] ) def transforms(examples): examples["pixel_values"] = [jitter(image.convert("RGB")) for image in examples["image"]] return examples ``` ### Motivation It would be nice to be able to handle `image.convert("RGB")` (or other modes) in the decode step, before applying torchvision transforms, this would reduce differences in code when handling pipelines that can handle torchvision, webdatset, or hf datasets with fewer code differences and without needing to handle image mode argument passing in two different stages of the pipelines... ### Your contribution Can do a PR with guidance on how mode should be passed / set on the dataset.
54
Allow image model (color conversion) to be specified as part of datasets Image() decode ### Feature request Typical torchvision / torch Datasets in image applications apply color conversion in the Dataset portion of the code as part of image decode, separately from the image transform stack. This is true for PIL.Image where convert is usually called in dataset, for native torchvision https://pytorch.org/vision/main/generated/torchvision.io.decode_jpeg.html, and similarly in tensorflow.data pipelines decode_jpeg or https://www.tensorflow.org/api_docs/python/tf/io/decode_and_crop_jpeg have a channels arg that allows controlling the image mode in the decode step. datasets currently requires this pattern (from [examples](https://huggingface.co/docs/datasets/main/en/image_process)): ``` from torchvision.transforms import Compose, ColorJitter, ToTensor jitter = Compose( [ ColorJitter(brightness=0.25, contrast=0.25, saturation=0.25, hue=0.7), ToTensor(), ] ) def transforms(examples): examples["pixel_values"] = [jitter(image.convert("RGB")) for image in examples["image"]] return examples ``` ### Motivation It would be nice to be able to handle `image.convert("RGB")` (or other modes) in the decode step, before applying torchvision transforms, this would reduce differences in code when handling pipelines that can handle torchvision, webdatset, or hf datasets with fewer code differences and without needing to handle image mode argument passing in two different stages of the pipelines... ### Your contribution Can do a PR with guidance on how mode should be passed / set on the dataset. It would be a great addition indeed :) This can be implemented the same way we have `sampling_rate` for Audio(): we just add a new parameter to the Image() type and take this parameter into account in `Image.decode_example` EDIT: adding an example of how it can be used: ```python ds = ds.cast_column("image", Image(mode=...)) ```
[ -0.40563324093818665, -0.05554240942001343, -0.09809298813343048, -0.035368792712688446, 0.34827274084091187, 0.03843323141336441, 0.33073753118515015, 0.2842899262905121, -0.06608159840106964, 0.05909542366862297, -0.21925726532936096, 0.6420990824699402, -0.23286302387714386, 0.042928218841552734, -0.09771628677845001, -0.2122543454170227, -0.13887324929237366, 0.14919711649417877, -0.24543970823287964, 0.04354820400476456, -0.17973344027996063, 0.00011599622666835785, -0.00777629017829895, -0.1099853664636612, -0.1292419135570526, 0.11645124107599258, 0.22470444440841675, -0.33629974722862244, -0.20243117213249207, -0.06798762828111649, 0.13582107424736023, 0.25061795115470886, 0.12466336786746979, 0.023333236575126648, -0.00011588184133870527, 0.03697541356086731, 0.30748486518859863, -0.20674723386764526, -0.12025995552539825, -0.41343826055526733, -0.2636594772338867, -0.05124545842409134, 0.0796690508723259, -0.18216902017593384, -0.3291114270687103, -0.06334605813026428, 0.18385273218154907, -0.2821385860443115, 0.32378435134887695, 0.389148473739624, 0.13531500101089478, 0.3444199562072754, -0.16278311610221863, 0.3033425807952881, -0.024564340710639954, 0.6265280246734619, -0.11957863718271255, 0.1373530477285385, 0.3929241895675659, 0.057156093418598175, -0.19992667436599731, 0.49022021889686584, -0.06853678822517395, 0.11801338195800781, 0.2869119346141815, -0.1580786257982254, 0.19179224967956543, -0.5176148414611816, -0.12829992175102234, 0.28421884775161743, 0.08591488003730774, -0.18027791380882263, -0.4485129415988922, -0.27324187755584717, 0.0024558352306485176, -0.16911987960338593, -0.03971646726131439, 0.2792243957519531, -0.37570619583129883, 0.15552428364753723, -0.5760009288787842, 0.13068394362926483, -0.2488846480846405, -0.0765865296125412, -0.05632755160331726, 0.11483785510063171, 0.03527465835213661, 0.19685757160186768, 0.03773600235581398, 0.13658969104290009, 0.4882943332195282, -0.2362435758113861, 0.25637948513031006, -0.05217570438981056, -0.19441942870616913, 0.014704175293445587, -0.20870542526245117, -0.0011162832379341125, 0.08212090283632278, -0.04403379559516907, -0.05303025245666504, 0.2219999134540558, -0.16657672822475433, 0.3022580146789551, 0.25455227494239807, -0.380808025598526, -0.06491916626691818, 0.10266967117786407, 0.055674321949481964, -0.43917331099510193, 0.09228372573852539, -0.08381886035203934, -0.06679490953683853, -0.30242645740509033, -0.003148430958390236, 0.23279693722724915, 0.2030259072780609, 0.08169139921665192, -0.17592725157737732, -0.500923216342926, 0.1288054883480072, 0.07620987296104431, 0.06875380873680115, 0.1817627102136612, 0.39043986797332764, 0.13573139905929565, 0.37469953298568726, 0.2849864363670349, -0.21432003378868103, -0.31510505080223083, -0.006251081824302673, -0.09623080492019653, -0.153615802526474, -0.2706994116306305, -0.18775102496147156, -0.19081231951713562, 0.010662432760000229, 0.05681116133928299, 0.4405815601348877, 0.10319766402244568, 0.27070555090904236, 0.055340107530355453, 0.3574769198894501, 0.2980198264122009, -0.5524391531944275, -0.020061854273080826, 0.1300538182258606, 0.4097839593887329, -0.3368111252784729, 0.27524545788764954, -0.14888465404510498, -0.02290552854537964, -0.10143238306045532, -0.00883553083986044, 0.0020593367516994476, -0.11506837606430054, -0.26803454756736755, 0.6093175411224365, 0.18864983320236206, -0.034572191536426544, 0.11683931201696396, -0.5503695607185364, -0.22641891241073608, -0.12208276987075806, 0.13865719735622406, 0.1749279946088791, -0.15985727310180664, -0.3088473677635193, 0.006716894451528788, -0.4586659371852875, 0.32601428031921387, -0.14410153031349182, -0.3256368339061737, -0.039194025099277496, -0.16260452568531036, -0.32594138383865356, 0.4269084334373474, -0.3312813639640808, 0.07217045873403549, 0.12599463760852814, 0.20784179866313934, 0.12319628149271011, 0.07486961781978607, 0.3700137436389923, 0.021705778315663338, -0.08738162368535995, -0.29032424092292786, 0.6856734156608582, -0.4988238513469696, 0.19518612325191498, 0.27198126912117004, -0.0970252975821495, 0.34986793994903564, 0.26306918263435364, 0.10462971031665802, 0.19664615392684937, -0.023164473474025726, -0.10352805256843567, 0.11030982434749603, -0.201012521982193, 0.048140041530132294, -0.26645129919052124, -0.17816509306430817, -0.1135585606098175, -0.17358513176441193, -0.20984476804733276, 0.20319631695747375, 0.07625388354063034, 0.27446210384368896, 0.17185044288635254, -0.17125089466571808, -0.12273598462343216, 0.2089613378047943, -0.033455122262239456, -0.08953456580638885, -0.330209344625473, 0.07737253606319427, 0.009160935878753662, -0.39578956365585327, -0.12581880390644073, -0.2887600064277649, 0.3452644348144531, -0.09768562763929367, 0.06187808886170387, -0.13155844807624817, 0.004691826179623604, 0.209858700633049, -0.12578007578849792, 0.005378704518079758, 0.0692295953631401, -0.15896648168563843, -0.01555917039513588, -0.325767457485199, 0.24968844652175903, -0.042679671198129654, 0.582589328289032, -0.3620048463344574, 0.06684370338916779, 0.23325781524181366, -0.2556196451187134, 0.12414462864398956, -0.012343693524599075, -0.07767444103956223, 0.10796535760164261, 0.140459805727005, 0.466758131980896, 0.06760694831609726, 0.2645442485809326, -0.2778606116771698, 0.10157473385334015, 0.18699206411838531, 0.26195013523101807, -0.3853287398815155, -0.1842413693666458, -0.2949129045009613, -0.12478803098201752, 0.06961414217948914, -0.1651877760887146, -0.18395641446113586, 0.059053871780633926, 0.1913616806268692, 0.038913216441869736, 0.034081242978572845, 0.1834602653980255, -0.044969044625759125, 0.19698533415794373, 0.2945186197757721, 0.07026828825473785, 0.18988284468650818, 0.19382521510124207, 0.013072378933429718, -0.07108694314956665, -0.24526765942573547, -0.07146649062633514, 0.3275512158870697, 0.29850107431411743, 0.36339855194091797, -0.03666309267282486, -0.038578834384679794, -0.1882328987121582, -0.344597727060318, -0.3387751579284668, 0.01834067516028881, -0.2647738754749298, -0.1796465516090393, 0.32926514744758606, -0.43781012296676636, -0.5045244097709656, -0.19716665148735046, 0.2560597360134125, 0.2119351625442505, 0.03723333775997162, -0.10543885827064514, -0.11373716592788696, -0.10729122161865234, 0.3333710730075836, -0.06911014020442963, 0.1536497324705124, 0.18010319769382477, -0.29184141755104065, -0.1156843900680542, -0.2691521942615509, 0.20329836010932922, -0.037876974791288376, 0.18412256240844727, -0.44370636343955994, 0.7343242764472961, 0.07586686313152313, 0.10522237420082092, -0.03048577718436718, -0.3427647650241852, 0.06674253940582275, -0.17555294930934906, 0.3287788927555084, 0.12317631393671036, 0.0953972265124321, 0.17245984077453613, 0.052189901471138, 0.19299888610839844, 0.21927618980407715, -0.08064190298318863, -0.18304230272769928, 0.16069857776165009, 0.10517290234565735, -0.26556435227394104, -0.08784403651952744, -0.3676803410053253, -0.26032668352127075, -0.15545235574245453, -0.15880681574344635, 0.0905575156211853, 0.20058783888816833, 0.4189673066139221, -0.05441833287477493, -0.015097150579094887, 0.16796354949474335, -0.07925541698932648, -0.10037083923816681, 0.3039734363555908, -0.10635547339916229, -0.04342079535126686, -0.19831717014312744, -0.030995074659585953, 0.2754588723182678, 0.4548366069793701, -0.12233379483222961, -0.26523151993751526, 0.008524395525455475, 0.22573363780975342, 0.16061246395111084, -0.13509945571422577, 0.06826053559780121, 0.1151357889175415, 0.05300208181142807, -0.19417217373847961, -0.14466790854930878, -0.20014801621437073, -0.15126797556877136, 0.15102463960647583, 0.41103750467300415, 0.6962481141090393, 0.23126322031021118, 0.3661506772041321, 0.14788015186786652, -0.5514838695526123, 0.15960481762886047, 0.05781743675470352, 0.2691659927368164, 0.02178170531988144, -0.23190057277679443, 0.4345887005329132, -0.03775681555271149, 0.11425137519836426, -0.193930521607399, -0.1693946123123169, -0.3925558626651764, -0.08977487683296204, -0.08989711105823517, -0.29232850670814514, -0.27090007066726685, 0.2830595374107361, -0.2584685981273651, 0.3818097412586212, -0.244821235537529, 0.1490297019481659, -0.17988495528697968, 0.025768771767616272, 0.07603640854358673, 0.49279528856277466, 0.40308138728141785, 0.12475795298814774, -0.01326722651720047, -0.03688718006014824, -0.10803892463445663, 0.12484508752822876, 0.11226361989974976, 0.23663660883903503, 0.011831942945718765, 0.1939527988433838, 0.09278501570224762, 0.035815782845020294, 0.5002593398094177, -0.4191253185272217, -0.07270446419715881, 0.042903829365968704, -0.2698493003845215, -0.2528931200504303, 0.028369922190904617, 0.017094779759645462, 0.17209802567958832, -0.2323775440454483, 0.18010255694389343, -0.26509103178977966, -0.28199946880340576, 0.11241687089204788, 0.06923510134220123, -0.07542028278112411, -0.11512875556945801, -0.014739807695150375, -0.08909064531326294, -0.2965530753135681, 0.11655090004205704, 0.33392903208732605, -0.07627985626459122, -0.09983281791210175, -0.22820566594600677, -0.2620234787464142, 0.15913742780685425, 0.2737016975879669, 0.12030389904975891, 0.0412609688937664, -0.09375568479299545, 0.012219458818435669, 0.07472595572471619, -0.07009764015674591, 0.0894901230931282, 0.15604554116725922, -0.14629437029361725, -0.3506128191947937, 0.10441595315933228, 0.30230405926704407, 0.37577012181282043, 0.38516560196876526, -0.017082437872886658, -0.11028622835874557, 0.051794372498989105, -0.32488352060317993, -0.5521730184555054, 0.42324140667915344, 0.13541415333747864, 0.0885939821600914, -0.13111960887908936, -0.6833977103233337, 0.36315950751304626, 0.01295521855354309, -0.09515121579170227, 0.235774964094162, -0.1180754005908966, -0.46672365069389343, 0.3354080319404602, 0.7323570251464844, 0.9696910381317139, -0.1329675316810608, 0.11238177120685577, -0.27577969431877136, -0.5182440876960754, 0.31095629930496216, -0.12459968030452728, 0.17642784118652344, -0.24000287055969238, 0.1528966873884201, -0.15281300246715546, -0.2772936522960663, 0.17868450284004211, 0.17318004369735718, 0.03426190838217735, -0.13514916598796844, 0.12163561582565308, 0.055410586297512054, 0.17921507358551025, 0.13832499086856842, -0.2599605619907379, -0.3990265429019928, 0.22554947435855865, 0.12189936637878418, -0.2743561863899231, -0.19805042445659637, 0.08129288256168365, -0.3221164345741272, -0.04200518876314163, 0.21950538456439972, -0.259334534406662, -0.15285998582839966, -0.47686493396759033, 0.11601437628269196, -0.2536485493183136, -0.4125351905822754, 0.4220424294471741, 0.5091383457183838, 0.20587457716464996, -0.08943018317222595, -0.018589520826935768, 0.36321067810058594, 0.16229325532913208, 0.31854426860809326, -0.011935475282371044, -0.1223248764872551, 0.512600302696228, 0.08884213119745255, -0.004991084337234497, -0.045091837644577026, 0.20409291982650757, -0.2392851859331131, -0.22922754287719727, -0.03129168599843979, 0.2327769249677658, 0.07857967913150787, -0.2952195703983307, -0.12495917081832886, 0.011845145374536514, -0.006502937525510788, 0.10580436885356903, 0.13343310356140137, 0.006963571533560753, 0.37980836629867554, -0.1683976799249649, -0.23763009905815125, -0.0521661601960659, 0.09676721692085266, -0.05710522085428238, -0.012406324967741966, 0.07630306482315063, -0.18865732848644257, -0.2759997844696045, -0.005861278623342514, 0.29092344641685486, 0.2256988286972046, -0.23906400799751282, 0.1382931023836136, -0.03682360425591469, -0.41951900720596313, -0.20201118290424347, -0.20913740992546082, -0.2212846428155899, -0.16538822650909424, -0.1133633404970169, -0.15262871980667114, -0.20655162632465363, 0.014778770506381989, -0.39269936084747314, 0.5506023168563843, -0.17623955011367798, 0.26926562190055847, -0.18644513189792633, -0.023723626509308815, -0.253299355506897, -0.2725544571876526, 0.33651766180992126, 0.2949284017086029, 0.012156637385487556, 0.32484957575798035, 0.0033258243929594755, -0.10861733555793762, 0.008303014561533928, 0.38794857263565063, -0.1463349312543869, -0.09697581827640533, -0.2545846700668335, 0.1800987422466278, 0.027932345867156982, -0.2329295575618744, 0.13710986077785492, -0.1845995932817459, -0.2623733580112457, -0.23668420314788818, 0.21779999136924744, -0.02031734772026539, -0.13778667151927948, 0.24660246074199677, -0.20287273824214935, 0.08771177381277084, 0.5315071940422058, -0.18378806114196777, -0.05266489088535309, 0.37414008378982544, 0.12155090272426605, 0.09249062836170197, 0.14059296250343323, -0.05400986969470978, -0.18050648272037506, 0.10303455591201782, 0.13556471467018127, 0.16322055459022522, 0.14081282913684845, 0.3692006468772888, 0.22625702619552612, 0.06629527360200882, 0.3376469016075134, 0.11804533004760742, -0.3130376636981964, -0.0026877354830503464, 0.11015456169843674, 0.05920093506574631, -0.15792587399482727, 0.2909998595714569, -0.06614863872528076, -0.15846586227416992, 0.18679626286029816, 0.2803747355937958, -0.02485537715256214, 0.5744305849075317, 0.008294917643070221, -0.28786903619766235, 0.33138006925582886, -0.34577417373657227, 0.12098412215709686, 0.385677695274353, 0.11719709634780884, 0.22091689705848694, 0.2803524434566498, 0.17281536757946014, 0.14724203944206238, 0.4761351943016052, -0.12256912142038345, 0.47710052132606506, 0.3948940336704254, -0.022927183657884598, 0.37761956453323364, -0.012000422924757004, 0.020115690305829048, -0.15187528729438782, 0.03352730721235275, 0.6321108341217041, 0.09112883359193802, 0.1557430922985077, -0.19517718255519867, -0.44533446431159973, -0.007605398073792458, 0.2237810343503952, -0.035832904279232025, -0.14320476353168488, -0.30108752846717834, 0.03473123162984848, -0.16242991387844086, 0.024047892540693283, -0.061676014214754105, -0.2964668273925781, 0.003189966082572937, 0.3943299651145935, 0.20034468173980713, 0.09995492547750473, 0.07986964285373688, -0.190993070602417, 0.2228240966796875, -0.13283158838748932, 0.015919731929898262, 0.17389464378356934, 0.227197527885437, 0.47504958510398865, 0.3321390748023987, 0.023822244256734848, 0.23434878885746002, -0.1886221170425415, -0.04424159973859787, 0.04724838584661484, -0.05186637490987778, 0.017713524401187897, 0.07815664261579514, 0.0536503791809082, 0.2881031036376953, 0.23910357058048248, 0.06472756713628769, 0.061716943979263306, -0.26433879137039185, 0.058485712856054306, -0.34738656878471375, -0.2704879343509674, 0.2951960265636444, -0.0204249806702137, 0.10389690846204758, 0.11673354357481003, -0.22647786140441895, -0.18648305535316467, -0.2519162595272064, 0.3532978594303131, -0.23915062844753265, 0.0864010751247406, 0.2709006667137146, 0.0279802605509758, 0.06892583519220352, 0.07216696441173553, -0.23867814242839813, 0.11489401757717133, -0.1763996034860611, 0.11757570505142212, -0.40058231353759766, -0.35396596789360046, 0.3481558859348297, -0.4087286591529846, -0.13526862859725952, -0.059199750423431396, 0.32601630687713623, 0.165330171585083, 0.14439262449741364, -0.47501739859580994, 0.6077039241790771, 0.382154643535614, 0.03216375783085823, -0.25652241706848145, 0.013182930648326874, 0.21625742316246033, 0.17899976670742035, -0.13530419766902924, 0.07696306705474854, 0.14922283589839935, 0.04053603857755661, -0.2184670865535736, -0.2637084722518921, 0.2019139677286148, 0.22396063804626465, 0.38803452253341675, 0.22155024111270905, 0.36845651268959045, -0.04482875019311905, 0.10689667612314224, -0.05939623340964317, 0.0865640938282013, -0.32769709825515747, 0.08556703478097916, -0.30797383189201355, 0.5847450494766235, -0.06435056775808334, -0.40812814235687256, -0.34350740909576416, 0.2012624442577362, -0.15030774474143982, -0.5930062532424927, -0.279985249042511, 0.19226865470409393, -0.3876103162765503, 0.006317047867923975, -0.2016938477754593, 0.33022424578666687, 0.15409575402736664, 0.26725977659225464, -0.31817150115966797, -0.4906587600708008, 0.37045055627822876, -0.2790120542049408, -0.23970170319080353, 0.20275558531284332, -0.172744482755661, 0.24678358435630798, 0.3530777394771576, -0.621838390827179, -0.047921665012836456, 0.06111021712422371, -0.14055103063583374, 0.07357639074325562, 0.4602470099925995, 0.44584280252456665, 0.19815827906131744, -0.30965399742126465, 0.10483523458242416, 0.0019261427223682404, 0.05490558594465256, -0.19821177423000336, -0.1636170595884323 ]
https://github.com/huggingface/datasets/issues/6670
ValueError
Hi @prashanth19bolukonda, You have to restart the notebook runtime session after the installation of `datasets`. Duplicate of: - #5923
### Describe the bug ValueError Traceback (most recent call last) [<ipython-input-11-9b99bc80ec23>](https://localhost:8080/#) in <cell line: 11>() 9 import numpy as np 10 import matplotlib.pyplot as plt ---> 11 from datasets import DatasetDict, Dataset 12 from transformers import AutoTokenizer, AutoModelForSequenceClassification 13 from transformers import Trainer, TrainingArguments 5 frames [/usr/local/lib/python3.10/dist-packages/datasets/__init__.py](https://localhost:8080/#) in <module> 16 __version__ = "2.17.0" 17 ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in <module> 65 66 from . import config ---> 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence 69 from .data_files import sanitize_patterns [/usr/local/lib/python3.10/dist-packages/datasets/arrow_reader.py](https://localhost:8080/#) in <module> 27 28 import pyarrow as pa ---> 29 import pyarrow.parquet as pq 30 from tqdm.contrib.concurrent import thread_map 31 [/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/__init__.py](https://localhost:8080/#) in <module> 18 # flake8: noqa 19 ---> 20 from .core import * [/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py](https://localhost:8080/#) in <module> 34 import pyarrow as pa 35 import pyarrow.lib as lib ---> 36 import pyarrow._parquet as _parquet 37 38 from pyarrow._parquet import (ParquetReader, Statistics, # noqa /usr/local/lib/python3.10/dist-packages/pyarrow/_parquet.pyx in init pyarrow._parquet() ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Expected behavior Resolve the binary incompatibility ### Environment info Google Colab Note book
19
ValueError ### Describe the bug ValueError Traceback (most recent call last) [<ipython-input-11-9b99bc80ec23>](https://localhost:8080/#) in <cell line: 11>() 9 import numpy as np 10 import matplotlib.pyplot as plt ---> 11 from datasets import DatasetDict, Dataset 12 from transformers import AutoTokenizer, AutoModelForSequenceClassification 13 from transformers import Trainer, TrainingArguments 5 frames [/usr/local/lib/python3.10/dist-packages/datasets/__init__.py](https://localhost:8080/#) in <module> 16 __version__ = "2.17.0" 17 ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in <module> 65 66 from . import config ---> 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence 69 from .data_files import sanitize_patterns [/usr/local/lib/python3.10/dist-packages/datasets/arrow_reader.py](https://localhost:8080/#) in <module> 27 28 import pyarrow as pa ---> 29 import pyarrow.parquet as pq 30 from tqdm.contrib.concurrent import thread_map 31 [/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/__init__.py](https://localhost:8080/#) in <module> 18 # flake8: noqa 19 ---> 20 from .core import * [/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py](https://localhost:8080/#) in <module> 34 import pyarrow as pa 35 import pyarrow.lib as lib ---> 36 import pyarrow._parquet as _parquet 37 38 from pyarrow._parquet import (ParquetReader, Statistics, # noqa /usr/local/lib/python3.10/dist-packages/pyarrow/_parquet.pyx in init pyarrow._parquet() ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Expected behavior Resolve the binary incompatibility ### Environment info Google Colab Note book Hi @prashanth19bolukonda, You have to restart the notebook runtime session after the installation of `datasets`. Duplicate of: - #5923
[ -0.3848663568496704, -0.19277885556221008, -0.11501643061637878, 0.1942903995513916, 0.17435768246650696, -0.1505235731601715, 0.5283539891242981, 0.40181246399879456, -0.15396252274513245, 0.3468736708164215, -0.10271748155355453, 0.6133958101272583, -0.087995246052742, 0.08603024482727051, -0.1356145292520523, -0.1584659367799759, -0.06107083708047867, 0.37765321135520935, -0.08800627291202545, -0.006863437592983246, -0.18436086177825928, 0.08425159752368927, -0.24893799424171448, 0.3635466694831848, -0.1924346387386322, -0.30037039518356323, 0.24338796734809875, -0.06061352789402008, -0.10555951297283173, -0.45098230242729187, -0.04272910952568054, -0.35112667083740234, -0.09658945351839066, 0.26197588443756104, -0.00010300442227162421, 0.18766112625598907, 0.38359713554382324, 0.15336179733276367, -0.17709575593471527, -0.041999444365501404, 0.018879495561122894, 0.05063944309949875, 0.22614091634750366, -0.3545309901237488, -0.010577084496617317, -0.10825531929731369, -0.017281213775277138, -0.08118080347776413, 0.3667580485343933, 0.41106608510017395, 0.326698362827301, 0.53485107421875, 0.170521542429924, -0.013314995914697647, 0.3942909836769104, -0.18341819941997528, -0.10681743919849396, 0.25335070490837097, 0.19050534069538116, 0.09023246169090271, -0.3839282691478729, 0.3346799910068512, 0.12892980873584747, 0.1359671801328659, -0.01956285536289215, 0.06244981288909912, 0.2927722930908203, -0.1570126712322235, -0.0647604763507843, 0.06319861114025116, 0.12456593662500381, -0.2984035015106201, -0.12862905859947205, -0.011373277753591537, 0.0026273387484252453, -0.38625627756118774, 0.17978894710540771, 0.15034615993499756, -0.20068272948265076, 0.0634726881980896, 0.21114294230937958, 0.16522635519504547, -0.4213462173938751, 0.1293824464082718, -0.10763724148273468, 0.40265241265296936, -0.17837603390216827, 0.12718430161476135, -0.026023369282484055, -0.16395525634288788, 0.2160702496767044, 0.011703076772391796, -0.007849790155887604, 0.036045100539922714, -0.14834582805633545, -0.16696731746196747, -0.00998978316783905, -0.328183114528656, -0.15349256992340088, 0.04127294570207596, 0.15623117983341217, 0.07542277872562408, 0.2100805789232254, 0.35062000155448914, 0.18785440921783447, -0.12993599474430084, -0.029285341501235962, 0.3567838966846466, 0.24193696677684784, 0.2887999713420868, -0.13663990795612335, -0.0045836493372917175, 0.057410143315792084, -0.28757086396217346, 0.2173227220773697, 0.030034614726901054, 0.42540401220321655, 0.005949024111032486, -0.40715092420578003, 0.12011802196502686, -0.2577100098133087, 0.007715273182839155, 0.07797382026910782, 0.37581875920295715, 0.043988827615976334, 0.07581759244203568, 0.06632951647043228, 0.033249810338020325, -0.28423455357551575, -0.30315613746643066, -0.327156662940979, 0.23486416041851044, -0.06484957784414291, -0.31193819642066956, 0.05466565117239952, 0.13541913032531738, 0.247496098279953, 0.1341199278831482, 0.10990948975086212, -0.006683047860860825, 0.23485073447227478, -0.2885933518409729, 0.06281028687953949, 0.16651327908039093, -0.15171463787555695, -0.07873506844043732, 0.17597642540931702, -0.046023301780223846, 0.05403720587491989, 0.1359557807445526, -0.044610269367694855, -0.19669830799102783, -0.32571735978126526, 0.3599727153778076, 0.38109689950942993, -0.027780801057815552, -0.11771184951066971, -0.08195909857749939, 0.18595074117183685, -0.1620861440896988, 0.1500605046749115, -0.21031953394412994, 0.08292090892791748, -0.30014094710350037, 0.15342938899993896, 0.14413422346115112, -0.2652038037776947, -0.09420996904373169, -0.03857651725411415, -0.19534742832183838, 0.19495344161987305, 0.27532386779785156, -0.25175702571868896, 0.1493985950946808, -0.11334952712059021, 0.2126665562391281, 0.5228448510169983, -0.24174711108207703, -0.3135286569595337, 0.015247682109475136, -0.17725083231925964, -0.23005861043930054, 0.03915486857295036, 0.0015624833758920431, 0.18510374426841736, 0.07390931248664856, 0.17708337306976318, 0.05015246570110321, -0.0013994593173265457, 0.0899188369512558, -0.28086599707603455, -0.06678140163421631, 0.017088625580072403, 0.1398036628961563, 0.03597158193588257, -0.28176259994506836, 0.08386124670505524, -0.1834823191165924, 0.14589597284793854, -0.12222523987293243, 0.0716671571135521, 0.11396852135658264, 0.367070734500885, -0.11149661242961884, -0.087192103266716, -0.14683455228805542, -0.20418745279312134, -0.0110086128115654, -0.37377652525901794, -0.05508967489004135, -0.20941771566867828, -0.022486794739961624, -0.21240872144699097, 0.15336762368679047, -0.2102910429239273, -0.28975504636764526, 0.361747145652771, 0.04197031632065773, -0.139962300658226, 0.05758242681622505, -0.24200396239757538, -0.016537895426154137, -0.2337445765733719, 0.103410504758358, -0.11560185253620148, 0.30240151286125183, -0.37779876589775085, -0.49026718735694885, -0.02460174635052681, -0.021693401038646698, 0.10386395454406738, -0.013796404004096985, -0.20517784357070923, 0.3539861738681793, 0.18032017350196838, 0.06359263509511948, -0.2853188216686249, -0.14145146310329437, 0.14749817550182343, -0.29829755425453186, -0.0235880259424448, 0.12407563626766205, 0.19111624360084534, 0.0931602194905281, -0.03404559940099716, 0.3568132519721985, -0.08008027076721191, 0.045281440019607544, 0.03617018461227417, -0.05214816331863403, 0.1534239500761032, -0.007951293140649796, 0.0498976930975914, -0.11712910234928131, 0.1272246092557907, -0.0013122614473104477, 0.23913408815860748, -0.0819135308265686, -0.4455198049545288, 0.00243358314037323, 0.43895062804222107, 0.11113704741001129, 0.1783963143825531, -0.007244899868965149, -0.12516704201698303, -0.035299282521009445, 0.22606420516967773, 0.07177044451236725, 0.26995354890823364, 0.20898981392383575, -0.12023641169071198, 0.09186389297246933, -0.15533937513828278, -0.1093505322933197, 0.16894719004631042, 0.03608376905322075, 0.25791943073272705, 0.19389748573303223, 0.23845094442367554, 0.02437213435769081, -0.35064420104026794, -0.1754395216703415, -0.10474987328052521, 0.24812044203281403, -0.2524631917476654, 0.07517706602811813, -0.14834338426589966, 0.08547285944223404, -0.1719336062669754, -0.11324303597211838, 0.11703965067863464, -0.3209555745124817, 0.06830167770385742, 0.2853398323059082, -0.2718741297721863, 0.37643712759017944, -0.051871586591005325, 0.00926920771598816, 0.3570062518119812, 0.0780070498585701, -0.2100619226694107, -0.10107114911079407, -0.16594794392585754, 0.20673222839832306, -0.023270338773727417, 0.11464305967092514, 0.24468712508678436, -0.00211186520755291, 0.09555771201848984, -0.2230721265077591, -0.41529524326324463, -0.03177548944950104, -0.009510025382041931, 0.12127859890460968, 0.32443535327911377, 0.1819341629743576, -0.22463461756706238, -0.46957072615623474, 0.3432161808013916, -0.3299248218536377, -0.29432716965675354, 0.20681552588939667, -0.12271881103515625, 0.06832534074783325, -0.06958634406328201, -0.4505089223384857, -0.26431313157081604, -0.5058535933494568, 0.06329566985368729, 0.19048172235488892, 0.26236867904663086, 0.17851200699806213, 0.24344360828399658, 0.4062013328075409, -0.17146213352680206, 0.12490829825401306, -0.07086919993162155, 0.10501566529273987, 0.2735888361930847, -0.26367685198783875, -0.37069740891456604, -0.12963683903217316, -0.23576493561267853, 0.37219443917274475, -0.1435347944498062, -0.45275527238845825, -0.20088498294353485, -0.20044812560081482, 0.3419801890850067, -0.2203967273235321, -0.038448259234428406, 0.2190731167793274, 0.21642231941223145, -0.26108673214912415, -0.12593108415603638, -0.10286325216293335, 0.08018743991851807, 0.01351192221045494, -0.1596769392490387, -0.1166139766573906, 0.46994757652282715, 0.021859299391508102, 0.5026259422302246, 0.08652561902999878, -0.20663736760616302, 0.2901436686515808, -0.18009966611862183, 0.20808951556682587, -0.23487427830696106, -0.26481932401657104, 0.00960434228181839, 0.014487162232398987, 0.06777670234441757, -0.0523887574672699, -0.2565312087535858, -0.26301535964012146, -0.024851668626070023, -0.1612957864999771, -0.1760556697845459, -0.1754278689622879, 0.14192365109920502, -0.07196047157049179, 0.12321896851062775, -0.12254412472248077, 0.04957534372806549, -0.15571577847003937, 0.09389158338308334, 0.09342142939567566, -0.12196294963359833, 0.04246710613369942, -0.24428752064704895, -0.08526769280433655, 0.053667616099119186, -0.2059585154056549, 0.21495811641216278, 0.0415608249604702, 0.34555402398109436, -0.06349306553602219, -0.17638596892356873, 0.13232804834842682, -0.22450415790081024, 0.27174869179725647, 0.07993458211421967, 0.18908357620239258, 0.27010419964790344, 0.04208908975124359, -0.5210397243499756, 0.027934011071920395, -0.4600884020328522, 0.02071562595665455, 0.17602577805519104, 0.39055097103118896, -0.3319430947303772, -0.11087919026613235, 0.3921990990638733, -0.060658399015665054, -0.004526365548372269, 0.10349013656377792, -0.2368621826171875, -0.10981527715921402, -0.4476684629917145, 0.1426548957824707, 0.15973153710365295, 0.25789645314216614, 0.13092494010925293, -0.15765751898288727, -0.12147918343544006, -0.18352124094963074, -0.28076428174972534, 0.2174566239118576, 0.15628069639205933, -0.27922964096069336, 0.12966112792491913, -0.12943272292613983, 0.08119194954633713, 0.1821492463350296, 0.2453235536813736, 0.11496835947036743, -0.3589954674243927, -0.024156857281923294, -0.00688598956912756, 0.21199068427085876, 0.03168389946222305, -0.14699438214302063, 0.07935139536857605, -0.21495576202869415, 0.24337226152420044, 0.24360314011573792, 0.17501036822795868, 0.3521880507469177, 0.03963269665837288, -0.1272883266210556, 0.04170754551887512, 0.28570449352264404, -0.0941254198551178, 0.03224586695432663, 0.3259972929954529, 0.0962449312210083, -0.12079136073589325, 0.3922024369239807, 0.17432260513305664, 0.7119859457015991, 0.255668044090271, 0.05761021748185158, 0.5963722467422485, -0.2779175639152527, 0.07148159295320511, 0.044620901346206665, 0.08492084592580795, -0.4577900469303131, -0.13424329459667206, 0.009299201890826225, -0.21904736757278442, 0.27114829421043396, 0.08689238131046295, -0.31228429079055786, -0.02433680184185505, -0.07137846946716309, 0.22124265134334564, -0.10332784801721573, -0.023685989901423454, -0.10099460184574127, -0.018324024975299835, -0.3664049208164215, 0.2407556176185608, -0.15493910014629364, -0.07996730506420135, -0.05459201708436012, -0.13741911947727203, -0.11368847638368607, -0.30445319414138794, 0.03277958929538727, 0.06373996287584305, -0.48079913854599, 0.3236151933670044, 0.2696075737476349, -0.2809998393058777, -0.03361457586288452, -0.027493920177221298, -0.14497269690036774, 0.021426942199468613, 0.09500502049922943, 0.1737675964832306, 0.24390056729316711, -0.014810607768595219, 0.03330029174685478, 0.1141783744096756, 0.17093320190906525, -0.23168182373046875, -0.26889634132385254, 0.3813317120075226, -0.04767556115984917, -0.386346697807312, 0.28888505697250366, 0.19781175255775452, 0.25551366806030273, -0.2824295461177826, -0.017696844413876534, -0.27075719833374023, -0.29137444496154785, -0.3158609867095947, 0.25673291087150574, 0.00757986307144165, -0.22697411477565765, 0.0703912302851677, 0.15164557099342346, -0.19299420714378357, -0.12339884042739868, 0.20875924825668335, -0.04156479984521866, 0.3807017207145691, 0.49701908230781555, 0.06790405511856079, -0.2962377071380615, -0.32894158363342285, 0.2667641043663025, 0.1571045219898224, -0.6333776116371155, 0.1988110989332199, -0.043783243745565414, -0.06559543311595917, 0.041106611490249634, 0.339341938495636, 0.0840546190738678, 0.23262697458267212, -0.1279590129852295, -0.26028385758399963, -0.544104278087616, 0.1311376988887787, -0.0956556499004364, 0.14485041797161102, 0.16979235410690308, 0.2877624034881592, -0.12609469890594482, 0.0258172694593668, -0.4442540407180786, 0.14274561405181885, -0.23547370731830597, 0.24913904070854187, -0.0034911874681711197, -0.2771870493888855, 0.02134951576590538, 0.2774580419063568, 0.3353079557418823, 0.21312037110328674, -0.2031029611825943, -0.37915319204330444, 0.004603128880262375, 0.05724325776100159, -0.061305344104766846, -0.17389915883541107, -0.1341857612133026, 0.12306168675422668, -0.18270163238048553, -0.027438219636678696, 0.0628318041563034, -0.08137496560811996, -0.08123922348022461, 0.1701953262090683, 0.17488156259059906, 0.03216645494103432, 0.08731094002723694, -0.04650707542896271, -0.13000163435935974, 0.11394192278385162, -0.14024458825588226, 0.11626354604959488, -0.04273258522152901, -0.11323019117116928, -0.05028131604194641, -0.030303597450256348, -0.15268902480602264, 0.049530867487192154, 0.24161696434020996, -0.30943137407302856, -0.21866126358509064, -0.11240268498659134, 0.19206836819648743, 0.22705978155136108, -0.29434913396835327, -0.09953152388334274, 0.01272197999060154, 0.3939768970012665, -0.35251569747924805, 0.02156592532992363, 0.06814752519130707, -0.043460357934236526, 0.2700265049934387, 0.10471620410680771, -0.15096689760684967, -0.05259391665458679, 0.05382765829563141, 0.3926357328891754, 0.03291624039411545, -0.43613433837890625, 0.05874325707554817, 0.4318508505821228, -0.23157791793346405, -0.12278686463832855, 0.4448375999927521, 0.20649614930152893, 0.3339495360851288, 0.18135817348957062, -0.11569184809923172, 0.12176524102687836, 0.013319922611117363, -0.15714816749095917, 0.1611345112323761, -0.05659050494432449, -0.16585111618041992, 0.283669650554657, -0.04181435704231262, -0.04794520139694214, 0.2280139923095703, 0.04555617645382881, 0.12467224150896072, -0.0650610476732254, -0.03228945657610893, 0.12537071108818054, -0.3828977942466736, 0.032136667519807816, -0.10208364576101303, -0.029810134321451187, -0.21897146105766296, -0.08632488548755646, 0.07168911397457123, 0.23979957401752472, 0.3448590040206909, 0.22748294472694397, -0.05701456964015961, -0.32289573550224304, 0.10468270629644394, 0.2234538495540619, 0.17115262150764465, -0.23194247484207153, 0.3284294605255127, 0.302564799785614, 0.18925204873085022, -0.1829247623682022, 0.2941032350063324, 0.4649657905101776, 0.3283964991569519, -0.19227495789527893, 0.13354316353797913, -0.02758636698126793, -0.2819344103336334, 0.026393260806798935, 0.04741881042718887, 0.129116952419281, 0.18790093064308167, 0.37165340781211853, 0.2917983829975128, -0.37157726287841797, 0.10925471782684326, 0.18758337199687958, 0.04256662726402283, -0.15198732912540436, 0.30023807287216187, -0.10212793946266174, -0.2505549192428589, -0.14548151195049286, -0.13928455114364624, -0.3640448749065399, -0.01982862502336502, 0.134547159075737, -0.11582303047180176, 0.07801548391580582, -0.18235668540000916, 0.14800582826137543, 0.05858342722058296, 0.35153302550315857, 0.12197113782167435, 0.12413439899682999, -0.2699711322784424, -0.08795347809791565, -0.34580615162849426, 0.4025874137878418, -0.05858311429619789, -0.1555694043636322, 0.022253889590501785, 0.2566485106945038, -0.07583349198102951, 0.2604348659515381, 0.4853031039237976, 0.14784853160381317, 0.0014476245269179344, 0.23763932287693024, -0.40418943762779236, 0.049595221877098083, 0.2676375210285187, -0.13936936855316162, 0.06137315183877945, -0.349621444940567, 0.19424933195114136, -0.08027943223714828, 0.3062630891799927, -0.09503190219402313, -0.2525235414505005, 0.08425268530845642, 0.13489148020744324, 0.37819841504096985, 0.08904510736465454, 0.10791751742362976, -0.2273012101650238, -0.021584436297416687, 0.04386642575263977, -0.36411088705062866, -0.16141408681869507, 0.14978647232055664, 0.22159619629383087, 0.4651457667350769, 0.20993754267692566, -0.19734086096286774, -0.2071569710969925, 0.2860918939113617, -0.11837641894817352, -0.07504522055387497, 0.006460733711719513, 0.4397946298122406, 0.04104093462228775, -0.04419691488146782, -0.2507481276988983, -0.045616015791893005, 0.08961465209722519, 0.11436468362808228, -0.37389981746673584, -0.6351110935211182, 0.5045894384384155, -0.49372607469558716, -0.3336246907711029, 0.07458291202783585, 0.10505369305610657, 0.10208246856927872, 0.03760228306055069, -0.4972384572029114, 0.14039835333824158, 0.3723132908344269, -0.1183527484536171, -0.26197484135627747, 0.15850861370563507, 0.13878625631332397, 0.17306944727897644, -0.01711627095937729, 0.5757694244384766, 0.10757685452699661, 0.00909053348004818, -0.023180240765213966, -0.2925781011581421 ]
https://github.com/huggingface/datasets/issues/6670
ValueError
Thank you soo much On Fri, Feb 16, 2024 at 8:14 PM Albert Villanova del Moral < ***@***.***> wrote: > Closed #6670 <https://github.com/huggingface/datasets/issues/6670> as > completed. > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6670#event-11829788289>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A2Y44YDQOBUFUWMR4C5O3QTYT5WDJAVCNFSM6AAAAABDL24S5SVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRHAZDSNZYHAZDQOI> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
### Describe the bug ValueError Traceback (most recent call last) [<ipython-input-11-9b99bc80ec23>](https://localhost:8080/#) in <cell line: 11>() 9 import numpy as np 10 import matplotlib.pyplot as plt ---> 11 from datasets import DatasetDict, Dataset 12 from transformers import AutoTokenizer, AutoModelForSequenceClassification 13 from transformers import Trainer, TrainingArguments 5 frames [/usr/local/lib/python3.10/dist-packages/datasets/__init__.py](https://localhost:8080/#) in <module> 16 __version__ = "2.17.0" 17 ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in <module> 65 66 from . import config ---> 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence 69 from .data_files import sanitize_patterns [/usr/local/lib/python3.10/dist-packages/datasets/arrow_reader.py](https://localhost:8080/#) in <module> 27 28 import pyarrow as pa ---> 29 import pyarrow.parquet as pq 30 from tqdm.contrib.concurrent import thread_map 31 [/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/__init__.py](https://localhost:8080/#) in <module> 18 # flake8: noqa 19 ---> 20 from .core import * [/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py](https://localhost:8080/#) in <module> 34 import pyarrow as pa 35 import pyarrow.lib as lib ---> 36 import pyarrow._parquet as _parquet 37 38 from pyarrow._parquet import (ParquetReader, Statistics, # noqa /usr/local/lib/python3.10/dist-packages/pyarrow/_parquet.pyx in init pyarrow._parquet() ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Expected behavior Resolve the binary incompatibility ### Environment info Google Colab Note book
61
ValueError ### Describe the bug ValueError Traceback (most recent call last) [<ipython-input-11-9b99bc80ec23>](https://localhost:8080/#) in <cell line: 11>() 9 import numpy as np 10 import matplotlib.pyplot as plt ---> 11 from datasets import DatasetDict, Dataset 12 from transformers import AutoTokenizer, AutoModelForSequenceClassification 13 from transformers import Trainer, TrainingArguments 5 frames [/usr/local/lib/python3.10/dist-packages/datasets/__init__.py](https://localhost:8080/#) in <module> 16 __version__ = "2.17.0" 17 ---> 18 from .arrow_dataset import Dataset 19 from .arrow_reader import ReadInstruction 20 from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder [/usr/local/lib/python3.10/dist-packages/datasets/arrow_dataset.py](https://localhost:8080/#) in <module> 65 66 from . import config ---> 67 from .arrow_reader import ArrowReader 68 from .arrow_writer import ArrowWriter, OptimizedTypedSequence 69 from .data_files import sanitize_patterns [/usr/local/lib/python3.10/dist-packages/datasets/arrow_reader.py](https://localhost:8080/#) in <module> 27 28 import pyarrow as pa ---> 29 import pyarrow.parquet as pq 30 from tqdm.contrib.concurrent import thread_map 31 [/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/__init__.py](https://localhost:8080/#) in <module> 18 # flake8: noqa 19 ---> 20 from .core import * [/usr/local/lib/python3.10/dist-packages/pyarrow/parquet/core.py](https://localhost:8080/#) in <module> 34 import pyarrow as pa 35 import pyarrow.lib as lib ---> 36 import pyarrow._parquet as _parquet 37 38 from pyarrow._parquet import (ParquetReader, Statistics, # noqa /usr/local/lib/python3.10/dist-packages/pyarrow/_parquet.pyx in init pyarrow._parquet() ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Expected behavior Resolve the binary incompatibility ### Environment info Google Colab Note book Thank you soo much On Fri, Feb 16, 2024 at 8:14 PM Albert Villanova del Moral < ***@***.***> wrote: > Closed #6670 <https://github.com/huggingface/datasets/issues/6670> as > completed. > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6670#event-11829788289>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A2Y44YDQOBUFUWMR4C5O3QTYT5WDJAVCNFSM6AAAAABDL24S5SVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRHAZDSNZYHAZDQOI> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
[ -0.3848663568496704, -0.19277885556221008, -0.11501643061637878, 0.1942903995513916, 0.17435768246650696, -0.1505235731601715, 0.5283539891242981, 0.40181246399879456, -0.15396252274513245, 0.3468736708164215, -0.10271748155355453, 0.6133958101272583, -0.087995246052742, 0.08603024482727051, -0.1356145292520523, -0.1584659367799759, -0.06107083708047867, 0.37765321135520935, -0.08800627291202545, -0.006863437592983246, -0.18436086177825928, 0.08425159752368927, -0.24893799424171448, 0.3635466694831848, -0.1924346387386322, -0.30037039518356323, 0.24338796734809875, -0.06061352789402008, -0.10555951297283173, -0.45098230242729187, -0.04272910952568054, -0.35112667083740234, -0.09658945351839066, 0.26197588443756104, -0.00010300442227162421, 0.18766112625598907, 0.38359713554382324, 0.15336179733276367, -0.17709575593471527, -0.041999444365501404, 0.018879495561122894, 0.05063944309949875, 0.22614091634750366, -0.3545309901237488, -0.010577084496617317, -0.10825531929731369, -0.017281213775277138, -0.08118080347776413, 0.3667580485343933, 0.41106608510017395, 0.326698362827301, 0.53485107421875, 0.170521542429924, -0.013314995914697647, 0.3942909836769104, -0.18341819941997528, -0.10681743919849396, 0.25335070490837097, 0.19050534069538116, 0.09023246169090271, -0.3839282691478729, 0.3346799910068512, 0.12892980873584747, 0.1359671801328659, -0.01956285536289215, 0.06244981288909912, 0.2927722930908203, -0.1570126712322235, -0.0647604763507843, 0.06319861114025116, 0.12456593662500381, -0.2984035015106201, -0.12862905859947205, -0.011373277753591537, 0.0026273387484252453, -0.38625627756118774, 0.17978894710540771, 0.15034615993499756, -0.20068272948265076, 0.0634726881980896, 0.21114294230937958, 0.16522635519504547, -0.4213462173938751, 0.1293824464082718, -0.10763724148273468, 0.40265241265296936, -0.17837603390216827, 0.12718430161476135, -0.026023369282484055, -0.16395525634288788, 0.2160702496767044, 0.011703076772391796, -0.007849790155887604, 0.036045100539922714, -0.14834582805633545, -0.16696731746196747, -0.00998978316783905, -0.328183114528656, -0.15349256992340088, 0.04127294570207596, 0.15623117983341217, 0.07542277872562408, 0.2100805789232254, 0.35062000155448914, 0.18785440921783447, -0.12993599474430084, -0.029285341501235962, 0.3567838966846466, 0.24193696677684784, 0.2887999713420868, -0.13663990795612335, -0.0045836493372917175, 0.057410143315792084, -0.28757086396217346, 0.2173227220773697, 0.030034614726901054, 0.42540401220321655, 0.005949024111032486, -0.40715092420578003, 0.12011802196502686, -0.2577100098133087, 0.007715273182839155, 0.07797382026910782, 0.37581875920295715, 0.043988827615976334, 0.07581759244203568, 0.06632951647043228, 0.033249810338020325, -0.28423455357551575, -0.30315613746643066, -0.327156662940979, 0.23486416041851044, -0.06484957784414291, -0.31193819642066956, 0.05466565117239952, 0.13541913032531738, 0.247496098279953, 0.1341199278831482, 0.10990948975086212, -0.006683047860860825, 0.23485073447227478, -0.2885933518409729, 0.06281028687953949, 0.16651327908039093, -0.15171463787555695, -0.07873506844043732, 0.17597642540931702, -0.046023301780223846, 0.05403720587491989, 0.1359557807445526, -0.044610269367694855, -0.19669830799102783, -0.32571735978126526, 0.3599727153778076, 0.38109689950942993, -0.027780801057815552, -0.11771184951066971, -0.08195909857749939, 0.18595074117183685, -0.1620861440896988, 0.1500605046749115, -0.21031953394412994, 0.08292090892791748, -0.30014094710350037, 0.15342938899993896, 0.14413422346115112, -0.2652038037776947, -0.09420996904373169, -0.03857651725411415, -0.19534742832183838, 0.19495344161987305, 0.27532386779785156, -0.25175702571868896, 0.1493985950946808, -0.11334952712059021, 0.2126665562391281, 0.5228448510169983, -0.24174711108207703, -0.3135286569595337, 0.015247682109475136, -0.17725083231925964, -0.23005861043930054, 0.03915486857295036, 0.0015624833758920431, 0.18510374426841736, 0.07390931248664856, 0.17708337306976318, 0.05015246570110321, -0.0013994593173265457, 0.0899188369512558, -0.28086599707603455, -0.06678140163421631, 0.017088625580072403, 0.1398036628961563, 0.03597158193588257, -0.28176259994506836, 0.08386124670505524, -0.1834823191165924, 0.14589597284793854, -0.12222523987293243, 0.0716671571135521, 0.11396852135658264, 0.367070734500885, -0.11149661242961884, -0.087192103266716, -0.14683455228805542, -0.20418745279312134, -0.0110086128115654, -0.37377652525901794, -0.05508967489004135, -0.20941771566867828, -0.022486794739961624, -0.21240872144699097, 0.15336762368679047, -0.2102910429239273, -0.28975504636764526, 0.361747145652771, 0.04197031632065773, -0.139962300658226, 0.05758242681622505, -0.24200396239757538, -0.016537895426154137, -0.2337445765733719, 0.103410504758358, -0.11560185253620148, 0.30240151286125183, -0.37779876589775085, -0.49026718735694885, -0.02460174635052681, -0.021693401038646698, 0.10386395454406738, -0.013796404004096985, -0.20517784357070923, 0.3539861738681793, 0.18032017350196838, 0.06359263509511948, -0.2853188216686249, -0.14145146310329437, 0.14749817550182343, -0.29829755425453186, -0.0235880259424448, 0.12407563626766205, 0.19111624360084534, 0.0931602194905281, -0.03404559940099716, 0.3568132519721985, -0.08008027076721191, 0.045281440019607544, 0.03617018461227417, -0.05214816331863403, 0.1534239500761032, -0.007951293140649796, 0.0498976930975914, -0.11712910234928131, 0.1272246092557907, -0.0013122614473104477, 0.23913408815860748, -0.0819135308265686, -0.4455198049545288, 0.00243358314037323, 0.43895062804222107, 0.11113704741001129, 0.1783963143825531, -0.007244899868965149, -0.12516704201698303, -0.035299282521009445, 0.22606420516967773, 0.07177044451236725, 0.26995354890823364, 0.20898981392383575, -0.12023641169071198, 0.09186389297246933, -0.15533937513828278, -0.1093505322933197, 0.16894719004631042, 0.03608376905322075, 0.25791943073272705, 0.19389748573303223, 0.23845094442367554, 0.02437213435769081, -0.35064420104026794, -0.1754395216703415, -0.10474987328052521, 0.24812044203281403, -0.2524631917476654, 0.07517706602811813, -0.14834338426589966, 0.08547285944223404, -0.1719336062669754, -0.11324303597211838, 0.11703965067863464, -0.3209555745124817, 0.06830167770385742, 0.2853398323059082, -0.2718741297721863, 0.37643712759017944, -0.051871586591005325, 0.00926920771598816, 0.3570062518119812, 0.0780070498585701, -0.2100619226694107, -0.10107114911079407, -0.16594794392585754, 0.20673222839832306, -0.023270338773727417, 0.11464305967092514, 0.24468712508678436, -0.00211186520755291, 0.09555771201848984, -0.2230721265077591, -0.41529524326324463, -0.03177548944950104, -0.009510025382041931, 0.12127859890460968, 0.32443535327911377, 0.1819341629743576, -0.22463461756706238, -0.46957072615623474, 0.3432161808013916, -0.3299248218536377, -0.29432716965675354, 0.20681552588939667, -0.12271881103515625, 0.06832534074783325, -0.06958634406328201, -0.4505089223384857, -0.26431313157081604, -0.5058535933494568, 0.06329566985368729, 0.19048172235488892, 0.26236867904663086, 0.17851200699806213, 0.24344360828399658, 0.4062013328075409, -0.17146213352680206, 0.12490829825401306, -0.07086919993162155, 0.10501566529273987, 0.2735888361930847, -0.26367685198783875, -0.37069740891456604, -0.12963683903217316, -0.23576493561267853, 0.37219443917274475, -0.1435347944498062, -0.45275527238845825, -0.20088498294353485, -0.20044812560081482, 0.3419801890850067, -0.2203967273235321, -0.038448259234428406, 0.2190731167793274, 0.21642231941223145, -0.26108673214912415, -0.12593108415603638, -0.10286325216293335, 0.08018743991851807, 0.01351192221045494, -0.1596769392490387, -0.1166139766573906, 0.46994757652282715, 0.021859299391508102, 0.5026259422302246, 0.08652561902999878, -0.20663736760616302, 0.2901436686515808, -0.18009966611862183, 0.20808951556682587, -0.23487427830696106, -0.26481932401657104, 0.00960434228181839, 0.014487162232398987, 0.06777670234441757, -0.0523887574672699, -0.2565312087535858, -0.26301535964012146, -0.024851668626070023, -0.1612957864999771, -0.1760556697845459, -0.1754278689622879, 0.14192365109920502, -0.07196047157049179, 0.12321896851062775, -0.12254412472248077, 0.04957534372806549, -0.15571577847003937, 0.09389158338308334, 0.09342142939567566, -0.12196294963359833, 0.04246710613369942, -0.24428752064704895, -0.08526769280433655, 0.053667616099119186, -0.2059585154056549, 0.21495811641216278, 0.0415608249604702, 0.34555402398109436, -0.06349306553602219, -0.17638596892356873, 0.13232804834842682, -0.22450415790081024, 0.27174869179725647, 0.07993458211421967, 0.18908357620239258, 0.27010419964790344, 0.04208908975124359, -0.5210397243499756, 0.027934011071920395, -0.4600884020328522, 0.02071562595665455, 0.17602577805519104, 0.39055097103118896, -0.3319430947303772, -0.11087919026613235, 0.3921990990638733, -0.060658399015665054, -0.004526365548372269, 0.10349013656377792, -0.2368621826171875, -0.10981527715921402, -0.4476684629917145, 0.1426548957824707, 0.15973153710365295, 0.25789645314216614, 0.13092494010925293, -0.15765751898288727, -0.12147918343544006, -0.18352124094963074, -0.28076428174972534, 0.2174566239118576, 0.15628069639205933, -0.27922964096069336, 0.12966112792491913, -0.12943272292613983, 0.08119194954633713, 0.1821492463350296, 0.2453235536813736, 0.11496835947036743, -0.3589954674243927, -0.024156857281923294, -0.00688598956912756, 0.21199068427085876, 0.03168389946222305, -0.14699438214302063, 0.07935139536857605, -0.21495576202869415, 0.24337226152420044, 0.24360314011573792, 0.17501036822795868, 0.3521880507469177, 0.03963269665837288, -0.1272883266210556, 0.04170754551887512, 0.28570449352264404, -0.0941254198551178, 0.03224586695432663, 0.3259972929954529, 0.0962449312210083, -0.12079136073589325, 0.3922024369239807, 0.17432260513305664, 0.7119859457015991, 0.255668044090271, 0.05761021748185158, 0.5963722467422485, -0.2779175639152527, 0.07148159295320511, 0.044620901346206665, 0.08492084592580795, -0.4577900469303131, -0.13424329459667206, 0.009299201890826225, -0.21904736757278442, 0.27114829421043396, 0.08689238131046295, -0.31228429079055786, -0.02433680184185505, -0.07137846946716309, 0.22124265134334564, -0.10332784801721573, -0.023685989901423454, -0.10099460184574127, -0.018324024975299835, -0.3664049208164215, 0.2407556176185608, -0.15493910014629364, -0.07996730506420135, -0.05459201708436012, -0.13741911947727203, -0.11368847638368607, -0.30445319414138794, 0.03277958929538727, 0.06373996287584305, -0.48079913854599, 0.3236151933670044, 0.2696075737476349, -0.2809998393058777, -0.03361457586288452, -0.027493920177221298, -0.14497269690036774, 0.021426942199468613, 0.09500502049922943, 0.1737675964832306, 0.24390056729316711, -0.014810607768595219, 0.03330029174685478, 0.1141783744096756, 0.17093320190906525, -0.23168182373046875, -0.26889634132385254, 0.3813317120075226, -0.04767556115984917, -0.386346697807312, 0.28888505697250366, 0.19781175255775452, 0.25551366806030273, -0.2824295461177826, -0.017696844413876534, -0.27075719833374023, -0.29137444496154785, -0.3158609867095947, 0.25673291087150574, 0.00757986307144165, -0.22697411477565765, 0.0703912302851677, 0.15164557099342346, -0.19299420714378357, -0.12339884042739868, 0.20875924825668335, -0.04156479984521866, 0.3807017207145691, 0.49701908230781555, 0.06790405511856079, -0.2962377071380615, -0.32894158363342285, 0.2667641043663025, 0.1571045219898224, -0.6333776116371155, 0.1988110989332199, -0.043783243745565414, -0.06559543311595917, 0.041106611490249634, 0.339341938495636, 0.0840546190738678, 0.23262697458267212, -0.1279590129852295, -0.26028385758399963, -0.544104278087616, 0.1311376988887787, -0.0956556499004364, 0.14485041797161102, 0.16979235410690308, 0.2877624034881592, -0.12609469890594482, 0.0258172694593668, -0.4442540407180786, 0.14274561405181885, -0.23547370731830597, 0.24913904070854187, -0.0034911874681711197, -0.2771870493888855, 0.02134951576590538, 0.2774580419063568, 0.3353079557418823, 0.21312037110328674, -0.2031029611825943, -0.37915319204330444, 0.004603128880262375, 0.05724325776100159, -0.061305344104766846, -0.17389915883541107, -0.1341857612133026, 0.12306168675422668, -0.18270163238048553, -0.027438219636678696, 0.0628318041563034, -0.08137496560811996, -0.08123922348022461, 0.1701953262090683, 0.17488156259059906, 0.03216645494103432, 0.08731094002723694, -0.04650707542896271, -0.13000163435935974, 0.11394192278385162, -0.14024458825588226, 0.11626354604959488, -0.04273258522152901, -0.11323019117116928, -0.05028131604194641, -0.030303597450256348, -0.15268902480602264, 0.049530867487192154, 0.24161696434020996, -0.30943137407302856, -0.21866126358509064, -0.11240268498659134, 0.19206836819648743, 0.22705978155136108, -0.29434913396835327, -0.09953152388334274, 0.01272197999060154, 0.3939768970012665, -0.35251569747924805, 0.02156592532992363, 0.06814752519130707, -0.043460357934236526, 0.2700265049934387, 0.10471620410680771, -0.15096689760684967, -0.05259391665458679, 0.05382765829563141, 0.3926357328891754, 0.03291624039411545, -0.43613433837890625, 0.05874325707554817, 0.4318508505821228, -0.23157791793346405, -0.12278686463832855, 0.4448375999927521, 0.20649614930152893, 0.3339495360851288, 0.18135817348957062, -0.11569184809923172, 0.12176524102687836, 0.013319922611117363, -0.15714816749095917, 0.1611345112323761, -0.05659050494432449, -0.16585111618041992, 0.283669650554657, -0.04181435704231262, -0.04794520139694214, 0.2280139923095703, 0.04555617645382881, 0.12467224150896072, -0.0650610476732254, -0.03228945657610893, 0.12537071108818054, -0.3828977942466736, 0.032136667519807816, -0.10208364576101303, -0.029810134321451187, -0.21897146105766296, -0.08632488548755646, 0.07168911397457123, 0.23979957401752472, 0.3448590040206909, 0.22748294472694397, -0.05701456964015961, -0.32289573550224304, 0.10468270629644394, 0.2234538495540619, 0.17115262150764465, -0.23194247484207153, 0.3284294605255127, 0.302564799785614, 0.18925204873085022, -0.1829247623682022, 0.2941032350063324, 0.4649657905101776, 0.3283964991569519, -0.19227495789527893, 0.13354316353797913, -0.02758636698126793, -0.2819344103336334, 0.026393260806798935, 0.04741881042718887, 0.129116952419281, 0.18790093064308167, 0.37165340781211853, 0.2917983829975128, -0.37157726287841797, 0.10925471782684326, 0.18758337199687958, 0.04256662726402283, -0.15198732912540436, 0.30023807287216187, -0.10212793946266174, -0.2505549192428589, -0.14548151195049286, -0.13928455114364624, -0.3640448749065399, -0.01982862502336502, 0.134547159075737, -0.11582303047180176, 0.07801548391580582, -0.18235668540000916, 0.14800582826137543, 0.05858342722058296, 0.35153302550315857, 0.12197113782167435, 0.12413439899682999, -0.2699711322784424, -0.08795347809791565, -0.34580615162849426, 0.4025874137878418, -0.05858311429619789, -0.1555694043636322, 0.022253889590501785, 0.2566485106945038, -0.07583349198102951, 0.2604348659515381, 0.4853031039237976, 0.14784853160381317, 0.0014476245269179344, 0.23763932287693024, -0.40418943762779236, 0.049595221877098083, 0.2676375210285187, -0.13936936855316162, 0.06137315183877945, -0.349621444940567, 0.19424933195114136, -0.08027943223714828, 0.3062630891799927, -0.09503190219402313, -0.2525235414505005, 0.08425268530845642, 0.13489148020744324, 0.37819841504096985, 0.08904510736465454, 0.10791751742362976, -0.2273012101650238, -0.021584436297416687, 0.04386642575263977, -0.36411088705062866, -0.16141408681869507, 0.14978647232055664, 0.22159619629383087, 0.4651457667350769, 0.20993754267692566, -0.19734086096286774, -0.2071569710969925, 0.2860918939113617, -0.11837641894817352, -0.07504522055387497, 0.006460733711719513, 0.4397946298122406, 0.04104093462228775, -0.04419691488146782, -0.2507481276988983, -0.045616015791893005, 0.08961465209722519, 0.11436468362808228, -0.37389981746673584, -0.6351110935211182, 0.5045894384384155, -0.49372607469558716, -0.3336246907711029, 0.07458291202783585, 0.10505369305610657, 0.10208246856927872, 0.03760228306055069, -0.4972384572029114, 0.14039835333824158, 0.3723132908344269, -0.1183527484536171, -0.26197484135627747, 0.15850861370563507, 0.13878625631332397, 0.17306944727897644, -0.01711627095937729, 0.5757694244384766, 0.10757685452699661, 0.00909053348004818, -0.023180240765213966, -0.2925781011581421 ]
https://github.com/huggingface/datasets/issues/6669
attribute error when writing trainer.train()
Hi! Kaggle notebooks use an outdated version of `datasets`, so you should update the `datasets` installation (with `!pip install -U datasets`) to avoid the error.
### Describe the bug AttributeError Traceback (most recent call last) Cell In[39], line 2 1 # Start the training process ----> 2 trainer.train() File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1539, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1537 hf_hub_utils.enable_progress_bars() 1538 else: -> 1539 return inner_training_loop( 1540 args=args, 1541 resume_from_checkpoint=resume_from_checkpoint, 1542 trial=trial, 1543 ignore_keys_for_eval=ignore_keys_for_eval, 1544 ) File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1836, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1833 rng_to_sync = True 1835 step = -1 -> 1836 for step, inputs in enumerate(epoch_iterator): 1837 total_batched_samples += 1 1839 if self.args.include_num_input_tokens_seen: File /opt/conda/lib/python3.10/site-packages/accelerate/data_loader.py:451, in DataLoaderShard.__iter__(self) 449 # We iterate one batch ahead to check when we are at the end 450 try: --> 451 current_batch = next(dataloader_iter) 452 except StopIteration: 453 yield File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:630, in _BaseDataLoaderIter.__next__(self) 627 if self._sampler_iter is None: 628 # TODO([https://github.com/pytorch/pytorch/issues/76750)](https://github.com/pytorch/pytorch/issues/76750)%3C/span%3E) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ 633 self._IterableDataset_len_called is not None and \ 634 self._num_yielded > self._IterableDataset_len_called: File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:674, in _SingleProcessDataLoaderIter._next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in _MapDatasetFetcher.fetch(self, possibly_batched_index) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in <listcomp>(.0) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1764, in Dataset.__getitem__(self, key) 1762 def __getitem__(self, key): # noqa: F811 1763 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 1764 return self._getitem( 1765 key, 1766 ) File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1749, in Dataset._getitem(self, key, decoded, **kwargs) 1747 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 1748 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 1749 formatted_output = format_table( 1750 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 1751 ) 1752 return formatted_output File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:540, in format_table(table, key, formatter, format_columns, output_all_columns) 538 else: 539 pa_table_to_format = pa_table.drop(col for col in pa_table.column_names if col not in format_columns) --> 540 formatted_output = formatter(pa_table_to_format, query_type=query_type) 541 if output_all_columns: 542 if isinstance(formatted_output, MutableMapping): File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:281, in Formatter.__call__(self, pa_table, query_type) 279 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 280 if query_type == "row": --> 281 return self.format_row(pa_table) 282 elif query_type == "column": 283 return self.format_column(pa_table) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/torch_formatter.py:57, in TorchFormatter.format_row(self, pa_table) 56 def format_row(self, pa_table: pa.Table) -> dict: ---> 57 row = self.numpy_arrow_extractor().extract_row(pa_table) 58 return self.recursive_tensorize(row) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:154, in NumpyArrowExtractor.extract_row(self, pa_table) 153 def extract_row(self, pa_table: pa.Table) -> dict: --> 154 return _unnest(self.extract_batch(pa_table)) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in NumpyArrowExtractor.extract_batch(self, pa_table) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in <dictcomp>(.0) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:196, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: --> 196 if any( 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:197, in <genexpr>(.0) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: 196 if any( --> 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsAttributeError Traceback (most recent call last) Cell In[39], line 2 1 # Start the training process ----> 2 trainer.train() File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1539, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1537 hf_hub_utils.enable_progress_bars() 1538 else: -> 1539 return inner_training_loop( 1540 args=args, 1541 resume_from_checkpoint=resume_from_checkpoint, 1542 trial=trial, 1543 ignore_keys_for_eval=ignore_keys_for_eval, 1544 ) File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1836, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1833 rng_to_sync = True 1835 step = -1 -> 1836 for step, inputs in enumerate(epoch_iterator): 1837 total_batched_samples += 1 1839 if self.args.include_num_input_tokens_seen: File /opt/conda/lib/python3.10/site-packages/accelerate/data_loader.py:451, in DataLoaderShard.__iter__(self) 449 # We iterate one batch ahead to check when we are at the end 450 try: --> 451 current_batch = next(dataloader_iter) 452 except StopIteration: 453 yield File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:630, in _BaseDataLoaderIter.__next__(self) 627 if self._sampler_iter is None: 628 # TODO([https://github.com/pytorch/pytorch/issues/76750)](https://github.com/pytorch/pytorch/issues/76750)%3C/span%3E) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ 633 self._IterableDataset_len_called is not None and \ 634 self._num_yielded > self._IterableDataset_len_called: File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:674, in _SingleProcessDataLoaderIter._next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in _MapDatasetFetcher.fetch(self, possibly_batched_index) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in <listcomp>(.0) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1764, in Dataset.__getitem__(self, key) 1762 def __getitem__(self, key): # noqa: F811 1763 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 1764 return self._getitem( 1765 key, 1766 ) File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1749, in Dataset._getitem(self, key, decoded, **kwargs) 1747 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 1748 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 1749 formatted_output = format_table( 1750 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 1751 ) 1752 return formatted_output File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:540, in format_table(table, key, formatter, format_columns, output_all_columns) 538 else: 539 pa_table_to_format = pa_table.drop(col for col in pa_table.column_names if col not in format_columns) --> 540 formatted_output = formatter(pa_table_to_format, query_type=query_type) 541 if output_all_columns: 542 if isinstance(formatted_output, MutableMapping): File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:281, in Formatter.__call__(self, pa_table, query_type) 279 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 280 if query_type == "row": --> 281 return self.format_row(pa_table) 282 elif query_type == "column": 283 return self.format_column(pa_table) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/torch_formatter.py:57, in TorchFormatter.format_row(self, pa_table) 56 def format_row(self, pa_table: pa.Table) -> dict: ---> 57 row = self.numpy_arrow_extractor().extract_row(pa_table) 58 return self.recursive_tensorize(row) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:154, in NumpyArrowExtractor.extract_row(self, pa_table) 153 def extract_row(self, pa_table: pa.Table) -> dict: --> 154 return _unnest(self.extract_batch(pa_table)) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in NumpyArrowExtractor.extract_batch(self, pa_table) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in <dictcomp>(.0) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:196, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: --> 196 if any( 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:197, in <genexpr>(.0) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: 196 if any( --> 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations Please help me to resolve the above error ### Steps to reproduce the bug Please resolve the issue of deprecated function np.object to object in the numpy ### Expected behavior np.object should be written as object only ### Environment info kaggle notebook
25
attribute error when writing trainer.train() ### Describe the bug AttributeError Traceback (most recent call last) Cell In[39], line 2 1 # Start the training process ----> 2 trainer.train() File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1539, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1537 hf_hub_utils.enable_progress_bars() 1538 else: -> 1539 return inner_training_loop( 1540 args=args, 1541 resume_from_checkpoint=resume_from_checkpoint, 1542 trial=trial, 1543 ignore_keys_for_eval=ignore_keys_for_eval, 1544 ) File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1836, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1833 rng_to_sync = True 1835 step = -1 -> 1836 for step, inputs in enumerate(epoch_iterator): 1837 total_batched_samples += 1 1839 if self.args.include_num_input_tokens_seen: File /opt/conda/lib/python3.10/site-packages/accelerate/data_loader.py:451, in DataLoaderShard.__iter__(self) 449 # We iterate one batch ahead to check when we are at the end 450 try: --> 451 current_batch = next(dataloader_iter) 452 except StopIteration: 453 yield File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:630, in _BaseDataLoaderIter.__next__(self) 627 if self._sampler_iter is None: 628 # TODO([https://github.com/pytorch/pytorch/issues/76750)](https://github.com/pytorch/pytorch/issues/76750)%3C/span%3E) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ 633 self._IterableDataset_len_called is not None and \ 634 self._num_yielded > self._IterableDataset_len_called: File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:674, in _SingleProcessDataLoaderIter._next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in _MapDatasetFetcher.fetch(self, possibly_batched_index) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in <listcomp>(.0) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1764, in Dataset.__getitem__(self, key) 1762 def __getitem__(self, key): # noqa: F811 1763 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 1764 return self._getitem( 1765 key, 1766 ) File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1749, in Dataset._getitem(self, key, decoded, **kwargs) 1747 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 1748 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 1749 formatted_output = format_table( 1750 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 1751 ) 1752 return formatted_output File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:540, in format_table(table, key, formatter, format_columns, output_all_columns) 538 else: 539 pa_table_to_format = pa_table.drop(col for col in pa_table.column_names if col not in format_columns) --> 540 formatted_output = formatter(pa_table_to_format, query_type=query_type) 541 if output_all_columns: 542 if isinstance(formatted_output, MutableMapping): File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:281, in Formatter.__call__(self, pa_table, query_type) 279 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 280 if query_type == "row": --> 281 return self.format_row(pa_table) 282 elif query_type == "column": 283 return self.format_column(pa_table) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/torch_formatter.py:57, in TorchFormatter.format_row(self, pa_table) 56 def format_row(self, pa_table: pa.Table) -> dict: ---> 57 row = self.numpy_arrow_extractor().extract_row(pa_table) 58 return self.recursive_tensorize(row) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:154, in NumpyArrowExtractor.extract_row(self, pa_table) 153 def extract_row(self, pa_table: pa.Table) -> dict: --> 154 return _unnest(self.extract_batch(pa_table)) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in NumpyArrowExtractor.extract_batch(self, pa_table) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in <dictcomp>(.0) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:196, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: --> 196 if any( 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:197, in <genexpr>(.0) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: 196 if any( --> 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsAttributeError Traceback (most recent call last) Cell In[39], line 2 1 # Start the training process ----> 2 trainer.train() File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1539, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1537 hf_hub_utils.enable_progress_bars() 1538 else: -> 1539 return inner_training_loop( 1540 args=args, 1541 resume_from_checkpoint=resume_from_checkpoint, 1542 trial=trial, 1543 ignore_keys_for_eval=ignore_keys_for_eval, 1544 ) File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1836, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1833 rng_to_sync = True 1835 step = -1 -> 1836 for step, inputs in enumerate(epoch_iterator): 1837 total_batched_samples += 1 1839 if self.args.include_num_input_tokens_seen: File /opt/conda/lib/python3.10/site-packages/accelerate/data_loader.py:451, in DataLoaderShard.__iter__(self) 449 # We iterate one batch ahead to check when we are at the end 450 try: --> 451 current_batch = next(dataloader_iter) 452 except StopIteration: 453 yield File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:630, in _BaseDataLoaderIter.__next__(self) 627 if self._sampler_iter is None: 628 # TODO([https://github.com/pytorch/pytorch/issues/76750)](https://github.com/pytorch/pytorch/issues/76750)%3C/span%3E) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ 633 self._IterableDataset_len_called is not None and \ 634 self._num_yielded > self._IterableDataset_len_called: File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:674, in _SingleProcessDataLoaderIter._next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in _MapDatasetFetcher.fetch(self, possibly_batched_index) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in <listcomp>(.0) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1764, in Dataset.__getitem__(self, key) 1762 def __getitem__(self, key): # noqa: F811 1763 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 1764 return self._getitem( 1765 key, 1766 ) File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1749, in Dataset._getitem(self, key, decoded, **kwargs) 1747 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 1748 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 1749 formatted_output = format_table( 1750 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 1751 ) 1752 return formatted_output File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:540, in format_table(table, key, formatter, format_columns, output_all_columns) 538 else: 539 pa_table_to_format = pa_table.drop(col for col in pa_table.column_names if col not in format_columns) --> 540 formatted_output = formatter(pa_table_to_format, query_type=query_type) 541 if output_all_columns: 542 if isinstance(formatted_output, MutableMapping): File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:281, in Formatter.__call__(self, pa_table, query_type) 279 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 280 if query_type == "row": --> 281 return self.format_row(pa_table) 282 elif query_type == "column": 283 return self.format_column(pa_table) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/torch_formatter.py:57, in TorchFormatter.format_row(self, pa_table) 56 def format_row(self, pa_table: pa.Table) -> dict: ---> 57 row = self.numpy_arrow_extractor().extract_row(pa_table) 58 return self.recursive_tensorize(row) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:154, in NumpyArrowExtractor.extract_row(self, pa_table) 153 def extract_row(self, pa_table: pa.Table) -> dict: --> 154 return _unnest(self.extract_batch(pa_table)) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in NumpyArrowExtractor.extract_batch(self, pa_table) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in <dictcomp>(.0) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:196, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: --> 196 if any( 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:197, in <genexpr>(.0) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: 196 if any( --> 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations Please help me to resolve the above error ### Steps to reproduce the bug Please resolve the issue of deprecated function np.object to object in the numpy ### Expected behavior np.object should be written as object only ### Environment info kaggle notebook Hi! Kaggle notebooks use an outdated version of `datasets`, so you should update the `datasets` installation (with `!pip install -U datasets`) to avoid the error.
[ -0.2044898271560669, -0.19255059957504272, -0.10335686802864075, 0.2574501633644104, 0.34993070363998413, -0.12036560475826263, 0.45764124393463135, 0.38584330677986145, -0.28682941198349, 0.34465932846069336, -0.02690308913588524, 0.2977946102619171, -0.2215697169303894, 0.030496003106236458, -0.03208445385098457, -0.2929317355155945, -0.1402880847454071, 0.3403207063674927, -0.03901492804288864, 0.02980368584394455, -0.02637474425137043, 0.12750478088855743, -0.24501870572566986, 0.18202447891235352, -0.4642685651779175, -0.20957167446613312, 0.20115448534488678, -0.05430271476507187, -0.03636528551578522, -0.49713724851608276, 0.17120102047920227, -0.18092605471611023, 0.14267413318157196, 0.6633702516555786, -0.00010293148079654202, 0.19134365022182465, 0.2556189000606537, 0.004512624815106392, -0.4094873368740082, 0.017872542142868042, 0.2980791926383972, 0.14641104638576508, 0.11112494766712189, -0.35553327202796936, -0.07083895802497864, -0.2080835998058319, -0.0672026127576828, 0.09494951367378235, 0.28123417496681213, 0.49884358048439026, 0.34271010756492615, 0.3566547930240631, 0.003164626657962799, -0.18534746766090393, 0.036805424839258194, -0.13219545781612396, -0.010439032688736916, 0.19402442872524261, 0.041629496961832047, -0.11725559830665588, -0.37065160274505615, 0.1888279765844345, 0.04045308381319046, 0.1152830719947815, 0.1806640475988388, 0.009499668143689632, 0.17350316047668457, -0.17013289034366608, -0.06618817895650864, -0.02570544183254242, 0.24013912677764893, -0.15137174725532532, -0.28337955474853516, -0.023523621261119843, 0.13321010768413544, -0.29882529377937317, 0.10488192737102509, -0.11463306844234467, -0.2442425936460495, -0.036209847778081894, 0.07001136988401413, 0.210042342543602, -0.37296128273010254, 0.011065371334552765, -0.21458856761455536, 0.25339025259017944, -0.1504874974489212, -0.07959050685167313, 0.20366515219211578, 0.08259493112564087, 0.4980268180370331, 0.09281516075134277, 0.12338626384735107, 0.019450407475233078, -0.2401934415102005, -0.2490207850933075, -0.11535457521677017, -0.4346853196620941, -0.15102827548980713, 0.21630045771598816, 0.18786464631557465, -0.08038321137428284, 0.29534074664115906, 0.17874959111213684, -0.032412540167570114, 0.26146620512008667, 0.022736940532922745, 0.4294334948062897, 0.16619998216629028, 0.21393348276615143, -0.22537091374397278, -0.10312356799840927, -0.15607735514640808, -0.4117729365825653, 0.42527061700820923, 0.11616663634777069, 0.04735742509365082, 0.08947718143463135, -0.3743671774864197, 0.17813363671302795, -0.21140259504318237, 0.021588481962680817, 0.224067822098732, 0.2593057155609131, -0.17714212834835052, 0.07286621630191803, 0.12576669454574585, 0.056152693927288055, -0.1759413629770279, -0.1283147633075714, -0.32322707772254944, 0.3109709620475769, -0.1186484843492508, -0.25664815306663513, 0.07724250853061676, -0.055589575320482254, 0.3510217070579529, -0.0662437379360199, 0.4057304263114929, -0.15889939665794373, 0.1462966948747635, -0.32471737265586853, 0.07450606673955917, 0.15387631952762604, -0.16670961678028107, -0.045126624405384064, 0.13866360485553741, -0.02029009908437729, 0.07227770239114761, 0.12543213367462158, -0.15807780623435974, -0.34186726808547974, -0.19407981634140015, 0.37606874108314514, 0.1428837776184082, -0.06685597449541092, 0.007189460098743439, -0.20258134603500366, 0.26878196001052856, -0.11020797491073608, 0.11910082399845123, -0.32179880142211914, -0.16538816690444946, -0.13779541850090027, 0.28806862235069275, 0.16456221044063568, -0.031057577580213547, -0.11975277215242386, 0.3565133810043335, -0.029108881950378418, 0.06559976190328598, 0.13845868408679962, -0.28557288646698, 0.5593202114105225, -0.11844887584447861, 0.09121331572532654, 0.3082052171230316, -0.4420027434825897, -0.3167960047721863, 0.08218561112880707, -0.0559118390083313, 0.046914465725421906, 0.000871509313583374, -0.0420137457549572, 0.23617851734161377, 0.05320446938276291, 0.3425150513648987, 0.26253557205200195, 0.05413305386900902, -0.06429839134216309, -0.29155710339546204, 0.1973908245563507, 0.16999070346355438, 0.1865178346633911, 0.2789030373096466, 0.10470188409090042, -0.08096771687269211, 0.0862775444984436, 0.14637935161590576, -0.13636288046836853, 0.04793623834848404, 0.12295645475387573, 0.056086279451847076, 0.016939733177423477, 0.048583973199129105, -0.15916377305984497, -0.07093825191259384, 0.08838316053152084, -0.17041485011577606, 0.012795984745025635, 0.06013641878962517, 0.051224224269390106, -0.24472662806510925, 0.04921746253967285, -0.334549218416214, -0.42840737104415894, 0.3278121054172516, -0.03661501407623291, -0.05622142553329468, -0.06784989684820175, -0.25659599900245667, 0.3767905831336975, -0.4571284353733063, 0.08736035972833633, -0.0500216968357563, 0.31646785140037537, -0.28325560688972473, -0.25207123160362244, -0.13571664690971375, 0.18502183258533478, 0.17240306735038757, -0.11391034722328186, -0.2389281988143921, 0.2287411093711853, -0.0871439278125763, -0.06664979457855225, -0.10533464699983597, -0.12546558678150177, 0.14007459580898285, -0.06672190129756927, -0.18833225965499878, 0.1254103034734726, 0.1730949431657791, -0.1180051639676094, 0.338110089302063, 0.2967464327812195, 0.19650855660438538, 0.01244044303894043, 0.10496385395526886, 0.06042677164077759, 0.014558756723999977, 0.015030864626169205, -0.04014910012483597, 0.22264555096626282, 0.32329392433166504, -0.18036554753780365, 0.22173146903514862, -0.1862410604953766, -0.34516894817352295, -0.26463040709495544, 0.15365253388881683, -0.011977795511484146, -0.09126327186822891, 0.1028236448764801, -0.14280515909194946, 0.13874739408493042, -0.12595586478710175, 0.04754031077027321, 0.2574741840362549, 0.08058483898639679, -0.0133763886988163, 0.0047111548483371735, -0.12824344635009766, -0.039701998233795166, 0.07496371865272522, 0.13238784670829773, 0.320212721824646, 0.3337633013725281, -0.07150503247976303, 0.22331230342388153, -0.21900570392608643, -0.6016294956207275, 0.04820350557565689, 0.3389177918434143, -0.13769769668579102, 0.15993830561637878, 0.006265332922339439, 0.17505091428756714, -0.2187943309545517, -0.3277519941329956, 0.025835782289505005, -0.14772886037826538, 0.026419635862112045, 0.44947221875190735, -0.002518231049180031, 0.23737746477127075, -0.06514587998390198, 0.16652700304985046, 0.3238835334777832, 0.024340465664863586, -0.1101001650094986, -0.061890583485364914, -0.12224582582712173, 0.19637134671211243, 0.0905444324016571, -0.2816731929779053, 0.10689906030893326, -0.16175256669521332, 0.050346389412879944, -0.009780636057257652, -0.05553078651428223, 0.024920476600527763, -0.0077402666211128235, 0.14584654569625854, 0.04154561087489128, 0.17030151188373566, -0.2451244443655014, -0.2577669620513916, 0.3011835217475891, -0.3292582929134369, -0.2387167066335678, 0.13955983519554138, 0.07165712863206863, -0.07454250752925873, -0.06483777612447739, -0.24132093787193298, -0.2488471120595932, -0.35277414321899414, -0.06590104103088379, 0.0734519511461258, 0.1910352110862732, 0.46500468254089355, 0.1006120964884758, 0.4092179238796234, 0.22825072705745697, 0.11593522876501083, -0.012973897159099579, -0.27588024735450745, 0.3214894235134125, -0.3440704941749573, -0.39128097891807556, -0.3193226158618927, -0.14358770847320557, 0.3055579662322998, -0.13750234246253967, -0.44060397148132324, -0.42613545060157776, -0.04405953735113144, 0.09812165796756744, -0.4943973422050476, -0.07227958738803864, 0.21364238858222961, 0.034400973469018936, -0.23514506220817566, -0.08771533519029617, -0.04125653952360153, 0.19253207743167877, 0.0013542883098125458, -0.18036672472953796, -0.26333752274513245, -0.033088624477386475, 0.09474378824234009, 0.6514325141906738, 0.12188149988651276, -0.3334759473800659, 0.10484044998884201, -0.14524252712726593, -0.06931382417678833, -0.12536022067070007, -0.4075431525707245, 0.12204904109239578, -0.1690489947795868, -0.13235804438591003, -0.047804102301597595, -0.2860989272594452, 0.038078829646110535, -0.13325905799865723, -0.05355771631002426, 0.015126235783100128, -0.123653843998909, 0.13431787490844727, -0.27487051486968994, 0.22374755144119263, -0.2358139604330063, 0.1983797550201416, -0.0738627165555954, 0.18071278929710388, 0.17572128772735596, 0.12368716299533844, -0.021251268684864044, -0.07401525974273682, -0.3256182372570038, -0.2712094187736511, -0.1363230049610138, 0.10953868180513382, 0.2284209132194519, 0.43909916281700134, 0.11140947043895721, -0.061501339077949524, 0.082476906478405, -0.0752682089805603, 0.542180061340332, 0.1761312186717987, -0.028210632503032684, 0.13074566423892975, -0.19807668030261993, -0.03523558750748634, -0.19223777949810028, -0.20793290436267853, 0.09612544625997543, -0.09376224875450134, 0.23566511273384094, 0.08533971756696701, -0.15165762603282928, 0.2949850559234619, -0.06567340344190598, -0.114085353910923, -0.006182090844959021, -0.1678682118654251, -0.2891930937767029, -0.2074684351682663, 0.32835260033607483, 0.2815878689289093, 0.3220541179180145, 0.0795205757021904, -0.1029839962720871, -0.1263028383255005, -0.04918795824050903, 0.04149210825562477, 0.1454787701368332, 0.043803051114082336, -0.07906264811754227, 0.1455022394657135, 0.09519608318805695, 0.10604937374591827, 0.3057713806629181, 0.11350872367620468, -0.004414532333612442, -0.14739707112312317, 0.028573021292686462, 0.015547825954854488, 0.23320123553276062, 0.2129157930612564, -0.043425045907497406, 0.06659682840108871, -0.16480809450149536, 0.22501537203788757, -0.041321318596601486, 0.15856106579303741, 0.3854803442955017, 0.08492166548967361, -0.2847708761692047, -0.24977527558803558, 0.2546958029270172, -0.03944709524512291, 0.186028853058815, 0.22153490781784058, -0.13010059297084808, 0.022322554141283035, 0.09500891715288162, 0.06536459922790527, 0.7062796950340271, 0.2738041579723358, 0.13009773194789886, 0.43067044019699097, -0.06929511576890945, -0.1507256031036377, -0.25532272458076477, 0.29106831550598145, -0.3377818465232849, -0.3440726399421692, -0.055578067898750305, -0.12073642015457153, 0.19288769364356995, -0.06248936057090759, -0.05528029054403305, 0.018860403448343277, -0.1142694503068924, 0.14572161436080933, 0.03964265435934067, 0.07911128550767899, 0.07523665577173233, -0.1294676810503006, -0.03379702940583229, 0.24848473072052002, -0.028657741844654083, 0.23810440301895142, -0.07402682304382324, -0.10858876258134842, -0.0017063096165657043, -0.2461428940296173, 0.0893717110157013, 0.1617169976234436, -0.45463454723358154, 0.28303682804107666, 0.24331125617027283, -0.507574737071991, -0.09776048362255096, 0.07726329565048218, 0.19518537819385529, -0.06739506125450134, 0.058515049517154694, 0.10231097042560577, 0.09190899133682251, 0.10062386095523834, -0.1454736292362213, 0.003167480230331421, 0.5554509162902832, -0.2553617060184479, -0.12469854950904846, 0.2994152903556824, -0.09263363480567932, -0.2715066075325012, 0.3790610432624817, 0.06832268089056015, 0.1848323494195938, -0.42463406920433044, 0.08348102867603302, -0.07513204216957092, -0.22200465202331543, -0.3593899607658386, 0.2575615644454956, 0.02244296669960022, -0.5155063271522522, 0.005375809967517853, 0.1370551884174347, -0.22794708609580994, -0.06746701896190643, 0.13010446727275848, 0.14620980620384216, 0.10844363272190094, 0.6248371601104736, -0.09349086880683899, -0.1733625829219818, -0.32464680075645447, -0.016627255827188492, 0.3074575960636139, -0.41097623109817505, 0.18691985309123993, -0.14003746211528778, 0.03898391127586365, -0.10885324329137802, 0.29844483733177185, 0.09244338423013687, 0.1737244427204132, 0.022457297891378403, -0.31414180994033813, -0.6009495258331299, -0.15849842131137848, -0.11704808473587036, 0.22350268065929413, -0.0006546862423419952, 0.5204879641532898, -0.006188036873936653, 0.10270711779594421, -0.45212963223457336, 0.13847069442272186, -0.31228765845298767, 0.24359017610549927, -0.20638659596443176, -0.3931424021720886, 0.2099832147359848, 0.1596696674823761, 0.2498682141304016, 0.31632280349731445, -0.14430715143680573, -0.33627083897590637, -0.2737528681755066, 0.042049676179885864, 0.09479068964719772, 0.019461873918771744, 0.005556982010602951, 0.1479516625404358, -0.18004627525806427, 0.04564639925956726, -0.022154515609145164, 0.12352346628904343, 0.060708750039339066, 0.5152620077133179, 0.01498110219836235, 0.2878847122192383, 0.04893791675567627, -0.19080974161624908, 0.07499571144580841, 0.10147809982299805, -0.03787047043442726, -0.05087953060865402, -0.1261262595653534, -0.05588303506374359, -0.3533723056316376, 0.07591282576322556, -0.2122194916009903, -0.03987187147140503, 0.10645253211259842, -0.41886264085769653, -0.009113777428865433, -0.15727543830871582, 0.20639440417289734, 0.32243725657463074, -0.45571014285087585, -0.08499852567911148, 0.31320473551750183, 0.3328053653240204, -0.2804848849773407, 0.042878661304712296, -0.06791916489601135, -0.22930844128131866, 0.15056660771369934, 0.18194349110126495, -0.05731037259101868, -0.10936691612005234, 0.060728199779987335, 0.21917444467544556, -0.12359855324029922, -0.2862390875816345, 0.20063133537769318, 0.2645599842071533, -0.09647925943136215, 0.01680295169353485, 0.4919447898864746, 0.20133918523788452, 0.13576382398605347, 0.2976338863372803, -0.223268061876297, 0.36764904856681824, 0.060394302010536194, -0.2553977370262146, -0.04108776897192001, -0.10294792056083679, -0.18504443764686584, 0.05866880714893341, 0.05750834941864014, -0.03346272557973862, -0.02172572910785675, 0.37019720673561096, -0.3374691903591156, -0.16872677206993103, -0.005408303812146187, -0.09985721111297607, -0.4318879544734955, 0.21876105666160583, -0.024223942309617996, -0.16341125965118408, -0.21181102097034454, -0.18353793025016785, 0.12943489849567413, 0.13488103449344635, 0.2550562620162964, 0.019877158105373383, -0.2294149249792099, -0.10315515100955963, -0.06772951036691666, 0.3053973615169525, 0.1981930136680603, -0.34956541657447815, 0.18199770152568817, 0.1331310123205185, -0.053565993905067444, -0.15871436893939972, 0.32950079441070557, 0.4020049571990967, 0.24838019907474518, -0.19331355392932892, -0.027083363384008408, -0.1730988323688507, -0.18033237755298615, 0.09790533035993576, 0.08502478152513504, 0.14768578112125397, -0.12267753481864929, 0.46261268854141235, 0.2425481379032135, -0.2936668395996094, 0.3481547236442566, 0.09705334901809692, 0.023487312719225883, -0.257770836353302, 0.5329601168632507, 0.20069783926010132, -0.1030183807015419, -0.19729222357273102, -0.040013156831264496, -0.2634221017360687, -0.07248270511627197, 0.08391177654266357, -0.06947585195302963, 0.13399836421012878, -0.10787656158208847, 0.15089553594589233, -0.047850433737039566, 0.4070954918861389, 0.3611666262149811, 0.05737336352467537, -0.3179757297039032, -0.016551531851291656, -0.20038998126983643, 0.3248458206653595, -0.014182649552822113, 0.0885339081287384, 0.016676411032676697, 0.043136633932590485, -0.2030045986175537, 0.130397766828537, 0.3317231237888336, -0.3020399510860443, 0.058639638125896454, 0.2633800804615021, -0.42319512367248535, 0.05555789917707443, -0.1180671900510788, 0.1401948779821396, 0.20306651294231415, -0.26706501841545105, -0.03407217934727669, -0.22711554169654846, 0.2915964722633362, 0.12382800132036209, -0.21028347313404083, 0.21605324745178223, 0.022080570459365845, 0.3699898421764374, -0.14896535873413086, 0.34858429431915283, -0.11940090358257294, 0.05560305714607239, 0.08003439754247665, -0.12101462483406067, -0.21210934221744537, -0.05484120547771454, 0.36952081322669983, 0.36297520995140076, 0.08617819845676422, -0.200442835688591, -0.34623482823371887, 0.36597296595573425, 0.08859653770923615, -0.07165856659412384, -0.10423662513494492, 0.3366571068763733, -0.026850353926420212, 0.06313078105449677, 0.13449309766292572, 0.26699545979499817, 0.04231013357639313, 0.07368829101324081, -0.6446818113327026, -0.5373141765594482, 0.533737063407898, -0.46110618114471436, -0.3782752752304077, -0.011587526649236679, 0.1303616613149643, 0.18212178349494934, 0.10875400900840759, -0.6034842729568481, 0.08586978167295456, 0.2590578496456146, -0.13405436277389526, -0.3493887484073639, 0.24378979206085205, -0.032204750925302505, 0.14630575478076935, 0.09631448984146118, 0.48890042304992676, 0.013074694201350212, -0.07158602774143219, 0.04473458603024483, -0.3542524576187134 ]
https://github.com/huggingface/datasets/issues/6669
attribute error when writing trainer.train()
Thank you for your response On Thu, Feb 29, 2024 at 10:55 PM Mario Šaško ***@***.***> wrote: > Closed #6669 <https://github.com/huggingface/datasets/issues/6669> as > completed. > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6669#event-11969246964>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A2Y44YG2RRVMYONNKPLBVE3YV5SAPAVCNFSM6AAAAABDLZ3BTSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRHE3DSMRUGY4TMNA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
### Describe the bug AttributeError Traceback (most recent call last) Cell In[39], line 2 1 # Start the training process ----> 2 trainer.train() File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1539, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1537 hf_hub_utils.enable_progress_bars() 1538 else: -> 1539 return inner_training_loop( 1540 args=args, 1541 resume_from_checkpoint=resume_from_checkpoint, 1542 trial=trial, 1543 ignore_keys_for_eval=ignore_keys_for_eval, 1544 ) File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1836, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1833 rng_to_sync = True 1835 step = -1 -> 1836 for step, inputs in enumerate(epoch_iterator): 1837 total_batched_samples += 1 1839 if self.args.include_num_input_tokens_seen: File /opt/conda/lib/python3.10/site-packages/accelerate/data_loader.py:451, in DataLoaderShard.__iter__(self) 449 # We iterate one batch ahead to check when we are at the end 450 try: --> 451 current_batch = next(dataloader_iter) 452 except StopIteration: 453 yield File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:630, in _BaseDataLoaderIter.__next__(self) 627 if self._sampler_iter is None: 628 # TODO([https://github.com/pytorch/pytorch/issues/76750)](https://github.com/pytorch/pytorch/issues/76750)%3C/span%3E) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ 633 self._IterableDataset_len_called is not None and \ 634 self._num_yielded > self._IterableDataset_len_called: File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:674, in _SingleProcessDataLoaderIter._next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in _MapDatasetFetcher.fetch(self, possibly_batched_index) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in <listcomp>(.0) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1764, in Dataset.__getitem__(self, key) 1762 def __getitem__(self, key): # noqa: F811 1763 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 1764 return self._getitem( 1765 key, 1766 ) File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1749, in Dataset._getitem(self, key, decoded, **kwargs) 1747 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 1748 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 1749 formatted_output = format_table( 1750 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 1751 ) 1752 return formatted_output File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:540, in format_table(table, key, formatter, format_columns, output_all_columns) 538 else: 539 pa_table_to_format = pa_table.drop(col for col in pa_table.column_names if col not in format_columns) --> 540 formatted_output = formatter(pa_table_to_format, query_type=query_type) 541 if output_all_columns: 542 if isinstance(formatted_output, MutableMapping): File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:281, in Formatter.__call__(self, pa_table, query_type) 279 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 280 if query_type == "row": --> 281 return self.format_row(pa_table) 282 elif query_type == "column": 283 return self.format_column(pa_table) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/torch_formatter.py:57, in TorchFormatter.format_row(self, pa_table) 56 def format_row(self, pa_table: pa.Table) -> dict: ---> 57 row = self.numpy_arrow_extractor().extract_row(pa_table) 58 return self.recursive_tensorize(row) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:154, in NumpyArrowExtractor.extract_row(self, pa_table) 153 def extract_row(self, pa_table: pa.Table) -> dict: --> 154 return _unnest(self.extract_batch(pa_table)) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in NumpyArrowExtractor.extract_batch(self, pa_table) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in <dictcomp>(.0) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:196, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: --> 196 if any( 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:197, in <genexpr>(.0) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: 196 if any( --> 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsAttributeError Traceback (most recent call last) Cell In[39], line 2 1 # Start the training process ----> 2 trainer.train() File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1539, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1537 hf_hub_utils.enable_progress_bars() 1538 else: -> 1539 return inner_training_loop( 1540 args=args, 1541 resume_from_checkpoint=resume_from_checkpoint, 1542 trial=trial, 1543 ignore_keys_for_eval=ignore_keys_for_eval, 1544 ) File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1836, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1833 rng_to_sync = True 1835 step = -1 -> 1836 for step, inputs in enumerate(epoch_iterator): 1837 total_batched_samples += 1 1839 if self.args.include_num_input_tokens_seen: File /opt/conda/lib/python3.10/site-packages/accelerate/data_loader.py:451, in DataLoaderShard.__iter__(self) 449 # We iterate one batch ahead to check when we are at the end 450 try: --> 451 current_batch = next(dataloader_iter) 452 except StopIteration: 453 yield File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:630, in _BaseDataLoaderIter.__next__(self) 627 if self._sampler_iter is None: 628 # TODO([https://github.com/pytorch/pytorch/issues/76750)](https://github.com/pytorch/pytorch/issues/76750)%3C/span%3E) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ 633 self._IterableDataset_len_called is not None and \ 634 self._num_yielded > self._IterableDataset_len_called: File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:674, in _SingleProcessDataLoaderIter._next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in _MapDatasetFetcher.fetch(self, possibly_batched_index) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in <listcomp>(.0) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1764, in Dataset.__getitem__(self, key) 1762 def __getitem__(self, key): # noqa: F811 1763 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 1764 return self._getitem( 1765 key, 1766 ) File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1749, in Dataset._getitem(self, key, decoded, **kwargs) 1747 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 1748 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 1749 formatted_output = format_table( 1750 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 1751 ) 1752 return formatted_output File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:540, in format_table(table, key, formatter, format_columns, output_all_columns) 538 else: 539 pa_table_to_format = pa_table.drop(col for col in pa_table.column_names if col not in format_columns) --> 540 formatted_output = formatter(pa_table_to_format, query_type=query_type) 541 if output_all_columns: 542 if isinstance(formatted_output, MutableMapping): File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:281, in Formatter.__call__(self, pa_table, query_type) 279 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 280 if query_type == "row": --> 281 return self.format_row(pa_table) 282 elif query_type == "column": 283 return self.format_column(pa_table) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/torch_formatter.py:57, in TorchFormatter.format_row(self, pa_table) 56 def format_row(self, pa_table: pa.Table) -> dict: ---> 57 row = self.numpy_arrow_extractor().extract_row(pa_table) 58 return self.recursive_tensorize(row) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:154, in NumpyArrowExtractor.extract_row(self, pa_table) 153 def extract_row(self, pa_table: pa.Table) -> dict: --> 154 return _unnest(self.extract_batch(pa_table)) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in NumpyArrowExtractor.extract_batch(self, pa_table) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in <dictcomp>(.0) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:196, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: --> 196 if any( 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:197, in <genexpr>(.0) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: 196 if any( --> 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations Please help me to resolve the above error ### Steps to reproduce the bug Please resolve the issue of deprecated function np.object to object in the numpy ### Expected behavior np.object should be written as object only ### Environment info kaggle notebook
60
attribute error when writing trainer.train() ### Describe the bug AttributeError Traceback (most recent call last) Cell In[39], line 2 1 # Start the training process ----> 2 trainer.train() File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1539, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1537 hf_hub_utils.enable_progress_bars() 1538 else: -> 1539 return inner_training_loop( 1540 args=args, 1541 resume_from_checkpoint=resume_from_checkpoint, 1542 trial=trial, 1543 ignore_keys_for_eval=ignore_keys_for_eval, 1544 ) File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1836, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1833 rng_to_sync = True 1835 step = -1 -> 1836 for step, inputs in enumerate(epoch_iterator): 1837 total_batched_samples += 1 1839 if self.args.include_num_input_tokens_seen: File /opt/conda/lib/python3.10/site-packages/accelerate/data_loader.py:451, in DataLoaderShard.__iter__(self) 449 # We iterate one batch ahead to check when we are at the end 450 try: --> 451 current_batch = next(dataloader_iter) 452 except StopIteration: 453 yield File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:630, in _BaseDataLoaderIter.__next__(self) 627 if self._sampler_iter is None: 628 # TODO([https://github.com/pytorch/pytorch/issues/76750)](https://github.com/pytorch/pytorch/issues/76750)%3C/span%3E) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ 633 self._IterableDataset_len_called is not None and \ 634 self._num_yielded > self._IterableDataset_len_called: File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:674, in _SingleProcessDataLoaderIter._next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in _MapDatasetFetcher.fetch(self, possibly_batched_index) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in <listcomp>(.0) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1764, in Dataset.__getitem__(self, key) 1762 def __getitem__(self, key): # noqa: F811 1763 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 1764 return self._getitem( 1765 key, 1766 ) File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1749, in Dataset._getitem(self, key, decoded, **kwargs) 1747 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 1748 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 1749 formatted_output = format_table( 1750 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 1751 ) 1752 return formatted_output File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:540, in format_table(table, key, formatter, format_columns, output_all_columns) 538 else: 539 pa_table_to_format = pa_table.drop(col for col in pa_table.column_names if col not in format_columns) --> 540 formatted_output = formatter(pa_table_to_format, query_type=query_type) 541 if output_all_columns: 542 if isinstance(formatted_output, MutableMapping): File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:281, in Formatter.__call__(self, pa_table, query_type) 279 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 280 if query_type == "row": --> 281 return self.format_row(pa_table) 282 elif query_type == "column": 283 return self.format_column(pa_table) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/torch_formatter.py:57, in TorchFormatter.format_row(self, pa_table) 56 def format_row(self, pa_table: pa.Table) -> dict: ---> 57 row = self.numpy_arrow_extractor().extract_row(pa_table) 58 return self.recursive_tensorize(row) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:154, in NumpyArrowExtractor.extract_row(self, pa_table) 153 def extract_row(self, pa_table: pa.Table) -> dict: --> 154 return _unnest(self.extract_batch(pa_table)) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in NumpyArrowExtractor.extract_batch(self, pa_table) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in <dictcomp>(.0) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:196, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: --> 196 if any( 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:197, in <genexpr>(.0) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: 196 if any( --> 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsAttributeError Traceback (most recent call last) Cell In[39], line 2 1 # Start the training process ----> 2 trainer.train() File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1539, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs) 1537 hf_hub_utils.enable_progress_bars() 1538 else: -> 1539 return inner_training_loop( 1540 args=args, 1541 resume_from_checkpoint=resume_from_checkpoint, 1542 trial=trial, 1543 ignore_keys_for_eval=ignore_keys_for_eval, 1544 ) File /opt/conda/lib/python3.10/site-packages/transformers/trainer.py:1836, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval) 1833 rng_to_sync = True 1835 step = -1 -> 1836 for step, inputs in enumerate(epoch_iterator): 1837 total_batched_samples += 1 1839 if self.args.include_num_input_tokens_seen: File /opt/conda/lib/python3.10/site-packages/accelerate/data_loader.py:451, in DataLoaderShard.__iter__(self) 449 # We iterate one batch ahead to check when we are at the end 450 try: --> 451 current_batch = next(dataloader_iter) 452 except StopIteration: 453 yield File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:630, in _BaseDataLoaderIter.__next__(self) 627 if self._sampler_iter is None: 628 # TODO([https://github.com/pytorch/pytorch/issues/76750)](https://github.com/pytorch/pytorch/issues/76750)%3C/span%3E) 629 self._reset() # type: ignore[call-arg] --> 630 data = self._next_data() 631 self._num_yielded += 1 632 if self._dataset_kind == _DatasetKind.Iterable and \ 633 self._IterableDataset_len_called is not None and \ 634 self._num_yielded > self._IterableDataset_len_called: File /opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py:674, in _SingleProcessDataLoaderIter._next_data(self) 672 def _next_data(self): 673 index = self._next_index() # may raise StopIteration --> 674 data = self._dataset_fetcher.fetch(index) # may raise StopIteration 675 if self._pin_memory: 676 data = _utils.pin_memory.pin_memory(data, self._pin_memory_device) File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in _MapDatasetFetcher.fetch(self, possibly_batched_index) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py:51, in <listcomp>(.0) 49 data = self.dataset.__getitems__(possibly_batched_index) 50 else: ---> 51 data = [self.dataset[idx] for idx in possibly_batched_index] 52 else: 53 data = self.dataset[possibly_batched_index] File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1764, in Dataset.__getitem__(self, key) 1762 def __getitem__(self, key): # noqa: F811 1763 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools).""" -> 1764 return self._getitem( 1765 key, 1766 ) File /opt/conda/lib/python3.10/site-packages/datasets/arrow_dataset.py:1749, in Dataset._getitem(self, key, decoded, **kwargs) 1747 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs) 1748 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None) -> 1749 formatted_output = format_table( 1750 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns 1751 ) 1752 return formatted_output File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:540, in format_table(table, key, formatter, format_columns, output_all_columns) 538 else: 539 pa_table_to_format = pa_table.drop(col for col in pa_table.column_names if col not in format_columns) --> 540 formatted_output = formatter(pa_table_to_format, query_type=query_type) 541 if output_all_columns: 542 if isinstance(formatted_output, MutableMapping): File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:281, in Formatter.__call__(self, pa_table, query_type) 279 def __call__(self, pa_table: pa.Table, query_type: str) -> Union[RowFormat, ColumnFormat, BatchFormat]: 280 if query_type == "row": --> 281 return self.format_row(pa_table) 282 elif query_type == "column": 283 return self.format_column(pa_table) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/torch_formatter.py:57, in TorchFormatter.format_row(self, pa_table) 56 def format_row(self, pa_table: pa.Table) -> dict: ---> 57 row = self.numpy_arrow_extractor().extract_row(pa_table) 58 return self.recursive_tensorize(row) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:154, in NumpyArrowExtractor.extract_row(self, pa_table) 153 def extract_row(self, pa_table: pa.Table) -> dict: --> 154 return _unnest(self.extract_batch(pa_table)) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in NumpyArrowExtractor.extract_batch(self, pa_table) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:160, in <dictcomp>(.0) 159 def extract_batch(self, pa_table: pa.Table) -> dict: --> 160 return {col: self._arrow_array_to_numpy(pa_table[col]) for col in pa_table.column_names} File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:196, in NumpyArrowExtractor._arrow_array_to_numpy(self, pa_array) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: --> 196 if any( 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/datasets/formatting/formatting.py:197, in <genexpr>(.0) 194 array: List = pa_array.to_numpy(zero_copy_only=zero_copy_only).tolist() 195 if len(array) > 0: 196 if any( --> 197 (isinstance(x, np.ndarray) and (x.dtype == np.object or x.shape != array[0].shape)) 198 or (isinstance(x, float) and np.isnan(x)) 199 for x in array 200 ): 201 return np.array(array, copy=False, **{**self.np_array_kwargs, "dtype": np.object}) 202 return np.array(array, copy=False, **self.np_array_kwargs) File /opt/conda/lib/python3.10/site-packages/numpy/__init__.py:324, in __getattr__(attr) 319 warnings.warn( 320 f"In the future `np.{attr}` will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in __former_attrs__: --> 324 raise AttributeError(__former_attrs__[attr]) 326 if attr == 'testing': 327 import numpy.testing as testing AttributeError: module 'numpy' has no attribute 'object'. `np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations Please help me to resolve the above error ### Steps to reproduce the bug Please resolve the issue of deprecated function np.object to object in the numpy ### Expected behavior np.object should be written as object only ### Environment info kaggle notebook Thank you for your response On Thu, Feb 29, 2024 at 10:55 PM Mario Šaško ***@***.***> wrote: > Closed #6669 <https://github.com/huggingface/datasets/issues/6669> as > completed. > > — > Reply to this email directly, view it on GitHub > <https://github.com/huggingface/datasets/issues/6669#event-11969246964>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A2Y44YG2RRVMYONNKPLBVE3YV5SAPAVCNFSM6AAAAABDLZ3BTSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRHE3DSMRUGY4TMNA> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
[ -0.2044898271560669, -0.19255059957504272, -0.10335686802864075, 0.2574501633644104, 0.34993070363998413, -0.12036560475826263, 0.45764124393463135, 0.38584330677986145, -0.28682941198349, 0.34465932846069336, -0.02690308913588524, 0.2977946102619171, -0.2215697169303894, 0.030496003106236458, -0.03208445385098457, -0.2929317355155945, -0.1402880847454071, 0.3403207063674927, -0.03901492804288864, 0.02980368584394455, -0.02637474425137043, 0.12750478088855743, -0.24501870572566986, 0.18202447891235352, -0.4642685651779175, -0.20957167446613312, 0.20115448534488678, -0.05430271476507187, -0.03636528551578522, -0.49713724851608276, 0.17120102047920227, -0.18092605471611023, 0.14267413318157196, 0.6633702516555786, -0.00010293148079654202, 0.19134365022182465, 0.2556189000606537, 0.004512624815106392, -0.4094873368740082, 0.017872542142868042, 0.2980791926383972, 0.14641104638576508, 0.11112494766712189, -0.35553327202796936, -0.07083895802497864, -0.2080835998058319, -0.0672026127576828, 0.09494951367378235, 0.28123417496681213, 0.49884358048439026, 0.34271010756492615, 0.3566547930240631, 0.003164626657962799, -0.18534746766090393, 0.036805424839258194, -0.13219545781612396, -0.010439032688736916, 0.19402442872524261, 0.041629496961832047, -0.11725559830665588, -0.37065160274505615, 0.1888279765844345, 0.04045308381319046, 0.1152830719947815, 0.1806640475988388, 0.009499668143689632, 0.17350316047668457, -0.17013289034366608, -0.06618817895650864, -0.02570544183254242, 0.24013912677764893, -0.15137174725532532, -0.28337955474853516, -0.023523621261119843, 0.13321010768413544, -0.29882529377937317, 0.10488192737102509, -0.11463306844234467, -0.2442425936460495, -0.036209847778081894, 0.07001136988401413, 0.210042342543602, -0.37296128273010254, 0.011065371334552765, -0.21458856761455536, 0.25339025259017944, -0.1504874974489212, -0.07959050685167313, 0.20366515219211578, 0.08259493112564087, 0.4980268180370331, 0.09281516075134277, 0.12338626384735107, 0.019450407475233078, -0.2401934415102005, -0.2490207850933075, -0.11535457521677017, -0.4346853196620941, -0.15102827548980713, 0.21630045771598816, 0.18786464631557465, -0.08038321137428284, 0.29534074664115906, 0.17874959111213684, -0.032412540167570114, 0.26146620512008667, 0.022736940532922745, 0.4294334948062897, 0.16619998216629028, 0.21393348276615143, -0.22537091374397278, -0.10312356799840927, -0.15607735514640808, -0.4117729365825653, 0.42527061700820923, 0.11616663634777069, 0.04735742509365082, 0.08947718143463135, -0.3743671774864197, 0.17813363671302795, -0.21140259504318237, 0.021588481962680817, 0.224067822098732, 0.2593057155609131, -0.17714212834835052, 0.07286621630191803, 0.12576669454574585, 0.056152693927288055, -0.1759413629770279, -0.1283147633075714, -0.32322707772254944, 0.3109709620475769, -0.1186484843492508, -0.25664815306663513, 0.07724250853061676, -0.055589575320482254, 0.3510217070579529, -0.0662437379360199, 0.4057304263114929, -0.15889939665794373, 0.1462966948747635, -0.32471737265586853, 0.07450606673955917, 0.15387631952762604, -0.16670961678028107, -0.045126624405384064, 0.13866360485553741, -0.02029009908437729, 0.07227770239114761, 0.12543213367462158, -0.15807780623435974, -0.34186726808547974, -0.19407981634140015, 0.37606874108314514, 0.1428837776184082, -0.06685597449541092, 0.007189460098743439, -0.20258134603500366, 0.26878196001052856, -0.11020797491073608, 0.11910082399845123, -0.32179880142211914, -0.16538816690444946, -0.13779541850090027, 0.28806862235069275, 0.16456221044063568, -0.031057577580213547, -0.11975277215242386, 0.3565133810043335, -0.029108881950378418, 0.06559976190328598, 0.13845868408679962, -0.28557288646698, 0.5593202114105225, -0.11844887584447861, 0.09121331572532654, 0.3082052171230316, -0.4420027434825897, -0.3167960047721863, 0.08218561112880707, -0.0559118390083313, 0.046914465725421906, 0.000871509313583374, -0.0420137457549572, 0.23617851734161377, 0.05320446938276291, 0.3425150513648987, 0.26253557205200195, 0.05413305386900902, -0.06429839134216309, -0.29155710339546204, 0.1973908245563507, 0.16999070346355438, 0.1865178346633911, 0.2789030373096466, 0.10470188409090042, -0.08096771687269211, 0.0862775444984436, 0.14637935161590576, -0.13636288046836853, 0.04793623834848404, 0.12295645475387573, 0.056086279451847076, 0.016939733177423477, 0.048583973199129105, -0.15916377305984497, -0.07093825191259384, 0.08838316053152084, -0.17041485011577606, 0.012795984745025635, 0.06013641878962517, 0.051224224269390106, -0.24472662806510925, 0.04921746253967285, -0.334549218416214, -0.42840737104415894, 0.3278121054172516, -0.03661501407623291, -0.05622142553329468, -0.06784989684820175, -0.25659599900245667, 0.3767905831336975, -0.4571284353733063, 0.08736035972833633, -0.0500216968357563, 0.31646785140037537, -0.28325560688972473, -0.25207123160362244, -0.13571664690971375, 0.18502183258533478, 0.17240306735038757, -0.11391034722328186, -0.2389281988143921, 0.2287411093711853, -0.0871439278125763, -0.06664979457855225, -0.10533464699983597, -0.12546558678150177, 0.14007459580898285, -0.06672190129756927, -0.18833225965499878, 0.1254103034734726, 0.1730949431657791, -0.1180051639676094, 0.338110089302063, 0.2967464327812195, 0.19650855660438538, 0.01244044303894043, 0.10496385395526886, 0.06042677164077759, 0.014558756723999977, 0.015030864626169205, -0.04014910012483597, 0.22264555096626282, 0.32329392433166504, -0.18036554753780365, 0.22173146903514862, -0.1862410604953766, -0.34516894817352295, -0.26463040709495544, 0.15365253388881683, -0.011977795511484146, -0.09126327186822891, 0.1028236448764801, -0.14280515909194946, 0.13874739408493042, -0.12595586478710175, 0.04754031077027321, 0.2574741840362549, 0.08058483898639679, -0.0133763886988163, 0.0047111548483371735, -0.12824344635009766, -0.039701998233795166, 0.07496371865272522, 0.13238784670829773, 0.320212721824646, 0.3337633013725281, -0.07150503247976303, 0.22331230342388153, -0.21900570392608643, -0.6016294956207275, 0.04820350557565689, 0.3389177918434143, -0.13769769668579102, 0.15993830561637878, 0.006265332922339439, 0.17505091428756714, -0.2187943309545517, -0.3277519941329956, 0.025835782289505005, -0.14772886037826538, 0.026419635862112045, 0.44947221875190735, -0.002518231049180031, 0.23737746477127075, -0.06514587998390198, 0.16652700304985046, 0.3238835334777832, 0.024340465664863586, -0.1101001650094986, -0.061890583485364914, -0.12224582582712173, 0.19637134671211243, 0.0905444324016571, -0.2816731929779053, 0.10689906030893326, -0.16175256669521332, 0.050346389412879944, -0.009780636057257652, -0.05553078651428223, 0.024920476600527763, -0.0077402666211128235, 0.14584654569625854, 0.04154561087489128, 0.17030151188373566, -0.2451244443655014, -0.2577669620513916, 0.3011835217475891, -0.3292582929134369, -0.2387167066335678, 0.13955983519554138, 0.07165712863206863, -0.07454250752925873, -0.06483777612447739, -0.24132093787193298, -0.2488471120595932, -0.35277414321899414, -0.06590104103088379, 0.0734519511461258, 0.1910352110862732, 0.46500468254089355, 0.1006120964884758, 0.4092179238796234, 0.22825072705745697, 0.11593522876501083, -0.012973897159099579, -0.27588024735450745, 0.3214894235134125, -0.3440704941749573, -0.39128097891807556, -0.3193226158618927, -0.14358770847320557, 0.3055579662322998, -0.13750234246253967, -0.44060397148132324, -0.42613545060157776, -0.04405953735113144, 0.09812165796756744, -0.4943973422050476, -0.07227958738803864, 0.21364238858222961, 0.034400973469018936, -0.23514506220817566, -0.08771533519029617, -0.04125653952360153, 0.19253207743167877, 0.0013542883098125458, -0.18036672472953796, -0.26333752274513245, -0.033088624477386475, 0.09474378824234009, 0.6514325141906738, 0.12188149988651276, -0.3334759473800659, 0.10484044998884201, -0.14524252712726593, -0.06931382417678833, -0.12536022067070007, -0.4075431525707245, 0.12204904109239578, -0.1690489947795868, -0.13235804438591003, -0.047804102301597595, -0.2860989272594452, 0.038078829646110535, -0.13325905799865723, -0.05355771631002426, 0.015126235783100128, -0.123653843998909, 0.13431787490844727, -0.27487051486968994, 0.22374755144119263, -0.2358139604330063, 0.1983797550201416, -0.0738627165555954, 0.18071278929710388, 0.17572128772735596, 0.12368716299533844, -0.021251268684864044, -0.07401525974273682, -0.3256182372570038, -0.2712094187736511, -0.1363230049610138, 0.10953868180513382, 0.2284209132194519, 0.43909916281700134, 0.11140947043895721, -0.061501339077949524, 0.082476906478405, -0.0752682089805603, 0.542180061340332, 0.1761312186717987, -0.028210632503032684, 0.13074566423892975, -0.19807668030261993, -0.03523558750748634, -0.19223777949810028, -0.20793290436267853, 0.09612544625997543, -0.09376224875450134, 0.23566511273384094, 0.08533971756696701, -0.15165762603282928, 0.2949850559234619, -0.06567340344190598, -0.114085353910923, -0.006182090844959021, -0.1678682118654251, -0.2891930937767029, -0.2074684351682663, 0.32835260033607483, 0.2815878689289093, 0.3220541179180145, 0.0795205757021904, -0.1029839962720871, -0.1263028383255005, -0.04918795824050903, 0.04149210825562477, 0.1454787701368332, 0.043803051114082336, -0.07906264811754227, 0.1455022394657135, 0.09519608318805695, 0.10604937374591827, 0.3057713806629181, 0.11350872367620468, -0.004414532333612442, -0.14739707112312317, 0.028573021292686462, 0.015547825954854488, 0.23320123553276062, 0.2129157930612564, -0.043425045907497406, 0.06659682840108871, -0.16480809450149536, 0.22501537203788757, -0.041321318596601486, 0.15856106579303741, 0.3854803442955017, 0.08492166548967361, -0.2847708761692047, -0.24977527558803558, 0.2546958029270172, -0.03944709524512291, 0.186028853058815, 0.22153490781784058, -0.13010059297084808, 0.022322554141283035, 0.09500891715288162, 0.06536459922790527, 0.7062796950340271, 0.2738041579723358, 0.13009773194789886, 0.43067044019699097, -0.06929511576890945, -0.1507256031036377, -0.25532272458076477, 0.29106831550598145, -0.3377818465232849, -0.3440726399421692, -0.055578067898750305, -0.12073642015457153, 0.19288769364356995, -0.06248936057090759, -0.05528029054403305, 0.018860403448343277, -0.1142694503068924, 0.14572161436080933, 0.03964265435934067, 0.07911128550767899, 0.07523665577173233, -0.1294676810503006, -0.03379702940583229, 0.24848473072052002, -0.028657741844654083, 0.23810440301895142, -0.07402682304382324, -0.10858876258134842, -0.0017063096165657043, -0.2461428940296173, 0.0893717110157013, 0.1617169976234436, -0.45463454723358154, 0.28303682804107666, 0.24331125617027283, -0.507574737071991, -0.09776048362255096, 0.07726329565048218, 0.19518537819385529, -0.06739506125450134, 0.058515049517154694, 0.10231097042560577, 0.09190899133682251, 0.10062386095523834, -0.1454736292362213, 0.003167480230331421, 0.5554509162902832, -0.2553617060184479, -0.12469854950904846, 0.2994152903556824, -0.09263363480567932, -0.2715066075325012, 0.3790610432624817, 0.06832268089056015, 0.1848323494195938, -0.42463406920433044, 0.08348102867603302, -0.07513204216957092, -0.22200465202331543, -0.3593899607658386, 0.2575615644454956, 0.02244296669960022, -0.5155063271522522, 0.005375809967517853, 0.1370551884174347, -0.22794708609580994, -0.06746701896190643, 0.13010446727275848, 0.14620980620384216, 0.10844363272190094, 0.6248371601104736, -0.09349086880683899, -0.1733625829219818, -0.32464680075645447, -0.016627255827188492, 0.3074575960636139, -0.41097623109817505, 0.18691985309123993, -0.14003746211528778, 0.03898391127586365, -0.10885324329137802, 0.29844483733177185, 0.09244338423013687, 0.1737244427204132, 0.022457297891378403, -0.31414180994033813, -0.6009495258331299, -0.15849842131137848, -0.11704808473587036, 0.22350268065929413, -0.0006546862423419952, 0.5204879641532898, -0.006188036873936653, 0.10270711779594421, -0.45212963223457336, 0.13847069442272186, -0.31228765845298767, 0.24359017610549927, -0.20638659596443176, -0.3931424021720886, 0.2099832147359848, 0.1596696674823761, 0.2498682141304016, 0.31632280349731445, -0.14430715143680573, -0.33627083897590637, -0.2737528681755066, 0.042049676179885864, 0.09479068964719772, 0.019461873918771744, 0.005556982010602951, 0.1479516625404358, -0.18004627525806427, 0.04564639925956726, -0.022154515609145164, 0.12352346628904343, 0.060708750039339066, 0.5152620077133179, 0.01498110219836235, 0.2878847122192383, 0.04893791675567627, -0.19080974161624908, 0.07499571144580841, 0.10147809982299805, -0.03787047043442726, -0.05087953060865402, -0.1261262595653534, -0.05588303506374359, -0.3533723056316376, 0.07591282576322556, -0.2122194916009903, -0.03987187147140503, 0.10645253211259842, -0.41886264085769653, -0.009113777428865433, -0.15727543830871582, 0.20639440417289734, 0.32243725657463074, -0.45571014285087585, -0.08499852567911148, 0.31320473551750183, 0.3328053653240204, -0.2804848849773407, 0.042878661304712296, -0.06791916489601135, -0.22930844128131866, 0.15056660771369934, 0.18194349110126495, -0.05731037259101868, -0.10936691612005234, 0.060728199779987335, 0.21917444467544556, -0.12359855324029922, -0.2862390875816345, 0.20063133537769318, 0.2645599842071533, -0.09647925943136215, 0.01680295169353485, 0.4919447898864746, 0.20133918523788452, 0.13576382398605347, 0.2976338863372803, -0.223268061876297, 0.36764904856681824, 0.060394302010536194, -0.2553977370262146, -0.04108776897192001, -0.10294792056083679, -0.18504443764686584, 0.05866880714893341, 0.05750834941864014, -0.03346272557973862, -0.02172572910785675, 0.37019720673561096, -0.3374691903591156, -0.16872677206993103, -0.005408303812146187, -0.09985721111297607, -0.4318879544734955, 0.21876105666160583, -0.024223942309617996, -0.16341125965118408, -0.21181102097034454, -0.18353793025016785, 0.12943489849567413, 0.13488103449344635, 0.2550562620162964, 0.019877158105373383, -0.2294149249792099, -0.10315515100955963, -0.06772951036691666, 0.3053973615169525, 0.1981930136680603, -0.34956541657447815, 0.18199770152568817, 0.1331310123205185, -0.053565993905067444, -0.15871436893939972, 0.32950079441070557, 0.4020049571990967, 0.24838019907474518, -0.19331355392932892, -0.027083363384008408, -0.1730988323688507, -0.18033237755298615, 0.09790533035993576, 0.08502478152513504, 0.14768578112125397, -0.12267753481864929, 0.46261268854141235, 0.2425481379032135, -0.2936668395996094, 0.3481547236442566, 0.09705334901809692, 0.023487312719225883, -0.257770836353302, 0.5329601168632507, 0.20069783926010132, -0.1030183807015419, -0.19729222357273102, -0.040013156831264496, -0.2634221017360687, -0.07248270511627197, 0.08391177654266357, -0.06947585195302963, 0.13399836421012878, -0.10787656158208847, 0.15089553594589233, -0.047850433737039566, 0.4070954918861389, 0.3611666262149811, 0.05737336352467537, -0.3179757297039032, -0.016551531851291656, -0.20038998126983643, 0.3248458206653595, -0.014182649552822113, 0.0885339081287384, 0.016676411032676697, 0.043136633932590485, -0.2030045986175537, 0.130397766828537, 0.3317231237888336, -0.3020399510860443, 0.058639638125896454, 0.2633800804615021, -0.42319512367248535, 0.05555789917707443, -0.1180671900510788, 0.1401948779821396, 0.20306651294231415, -0.26706501841545105, -0.03407217934727669, -0.22711554169654846, 0.2915964722633362, 0.12382800132036209, -0.21028347313404083, 0.21605324745178223, 0.022080570459365845, 0.3699898421764374, -0.14896535873413086, 0.34858429431915283, -0.11940090358257294, 0.05560305714607239, 0.08003439754247665, -0.12101462483406067, -0.21210934221744537, -0.05484120547771454, 0.36952081322669983, 0.36297520995140076, 0.08617819845676422, -0.200442835688591, -0.34623482823371887, 0.36597296595573425, 0.08859653770923615, -0.07165856659412384, -0.10423662513494492, 0.3366571068763733, -0.026850353926420212, 0.06313078105449677, 0.13449309766292572, 0.26699545979499817, 0.04231013357639313, 0.07368829101324081, -0.6446818113327026, -0.5373141765594482, 0.533737063407898, -0.46110618114471436, -0.3782752752304077, -0.011587526649236679, 0.1303616613149643, 0.18212178349494934, 0.10875400900840759, -0.6034842729568481, 0.08586978167295456, 0.2590578496456146, -0.13405436277389526, -0.3493887484073639, 0.24378979206085205, -0.032204750925302505, 0.14630575478076935, 0.09631448984146118, 0.48890042304992676, 0.013074694201350212, -0.07158602774143219, 0.04473458603024483, -0.3542524576187134 ]
https://github.com/huggingface/datasets/issues/6663
`write_examples_on_file` and `write_batch` are broken in `ArrowWriter`
Thanks for reporting! I've left some comments on the PR on how to fix this recent change rather than reverting it.
### Describe the bug `write_examples_on_file` and `write_batch` are broken in `ArrowWriter` since #6636. The order between the columns and the schema is not preserved anymore. So these functions don't work anymore unless the order happens to align well. ### Steps to reproduce the bug Try to do `write_batch` with anything that has many columns, and it's likely to break. ### Expected behavior I expect these functions to work, instead of it trying to cast a column to its incorrect type. ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-5.15.0-1040-aws-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.19.4 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
21
`write_examples_on_file` and `write_batch` are broken in `ArrowWriter` ### Describe the bug `write_examples_on_file` and `write_batch` are broken in `ArrowWriter` since #6636. The order between the columns and the schema is not preserved anymore. So these functions don't work anymore unless the order happens to align well. ### Steps to reproduce the bug Try to do `write_batch` with anything that has many columns, and it's likely to break. ### Expected behavior I expect these functions to work, instead of it trying to cast a column to its incorrect type. ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-5.15.0-1040-aws-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.19.4 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 Thanks for reporting! I've left some comments on the PR on how to fix this recent change rather than reverting it.
[ -0.19194243848323822, -0.14115983247756958, 0.021778058260679245, 0.05745473876595497, 0.16321302950382233, -0.17764797806739807, 0.47671452164649963, 0.05562272667884827, 0.11575300991535187, -0.07085917890071869, 0.2996772527694702, 0.26358485221862793, 0.020313803106546402, 0.1676015406847, 0.0594901368021965, -0.34223124384880066, 0.19054915010929108, 0.015427418053150177, -0.2197045087814331, 0.06007763743400574, -0.22537532448768616, 0.21123111248016357, -0.2850267291069031, 0.26688915491104126, -0.2804783284664154, -0.20484915375709534, 0.0010746512562036514, -0.004368774592876434, -0.24781595170497894, -0.30462539196014404, 0.09909850358963013, -0.19570523500442505, 0.30980974435806274, 0.3741329312324524, -0.0001230644847964868, -0.23920536041259766, 0.39810681343078613, 0.05730082094669342, -0.18131332099437714, -0.09274913370609283, -0.12716059386730194, 0.040118612349033356, 0.17826509475708008, -0.19740208983421326, 0.356669157743454, -0.1846531331539154, -0.04311350733041763, -0.1569557785987854, 0.2178908884525299, 0.4881446063518524, 0.18387173116207123, 0.22235547006130219, 0.36294126510620117, -0.09389761090278625, 0.519633948802948, 0.34843456745147705, -0.2687489986419678, 0.008791293948888779, 0.1286083310842514, -0.2901906967163086, 0.05248262733221054, 0.09481145441532135, -0.08086597174406052, -0.14351129531860352, 0.2091529667377472, 0.16075211763381958, 0.16694843769073486, 0.027531906962394714, 0.03469804674386978, 0.12719321250915527, 0.5775811076164246, -0.3034711480140686, -0.4372648298740387, -0.057954296469688416, -0.044981565326452255, -0.28549790382385254, 0.3027459681034088, 0.24128302931785583, 0.21710214018821716, 0.20580612123012543, 0.18225231766700745, 0.06758099049329758, -0.012938056141138077, 0.12314081192016602, 0.030852027237415314, 0.08784544467926025, -0.28133445978164673, -0.02686142921447754, -0.11749476194381714, -0.06747931241989136, 0.6356316208839417, -0.15985147655010223, -0.4725233018398285, 0.10989221185445786, -0.3050355017185211, 0.17147095501422882, 0.08507943153381348, 0.2703593671321869, -0.29757699370384216, 0.1915070116519928, 0.40797159075737, -0.11776026338338852, 0.08054599910974503, 0.07511633634567261, -0.14191469550132751, 0.30480343103408813, 0.34962230920791626, 0.3240305483341217, 0.3135804533958435, 0.3105093240737915, 0.11679913103580475, -0.21020683646202087, 0.11447374522686005, -0.3023897707462311, 0.017478182911872864, 0.10955625772476196, -0.04508402571082115, -0.16660793125629425, 0.01785152219235897, 0.15895552933216095, -0.024645037949085236, -0.1484823226928711, 0.05695618316531181, 0.3400258719921112, 0.14988873898983002, 0.002710709348320961, 0.1954796016216278, 0.2633035182952881, -0.06481235474348068, 0.16327933967113495, -0.02377905696630478, 0.031182002276182175, -0.18310925364494324, -0.022441526874899864, -0.10456252098083496, 0.08796697854995728, 0.1589733213186264, 0.2753414809703827, -0.10438764095306396, -0.06067393720149994, -0.05738063156604767, -0.18950974941253662, 0.21966415643692017, 0.31977277994155884, -0.1710774004459381, 0.31061992049217224, -0.012209758162498474, -0.015220358967781067, -0.08106764405965805, 0.12184816598892212, -0.2920740246772766, -0.4005976915359497, -0.2655869722366333, 0.09474290162324905, -0.12544944882392883, -0.17279209196567535, -0.48415282368659973, -0.2394004613161087, 0.2750878930091858, -0.28112396597862244, 0.45895758271217346, -0.20211058855056763, 0.15404270589351654, -0.2146596759557724, -0.027909616008400917, 0.16000144183635712, -0.3061957359313965, 0.1831825226545334, -0.03819148615002632, 0.3342137634754181, 0.2949255108833313, 0.22001519799232483, -0.09001381695270538, 0.2493615448474884, -0.039741549640893936, 0.010304741561412811, 0.44230005145072937, -0.3443780243396759, -0.12362635135650635, 0.04922674968838692, 0.07238899171352386, -0.12732677161693573, 0.052572909742593765, -0.33586859703063965, 0.17082984745502472, -0.10854676365852356, -0.08333192765712738, 0.1491553634405136, 0.3020649552345276, 0.1417829692363739, -0.26684531569480896, -0.30292782187461853, -0.2870789170265198, -0.16003651916980743, -0.18641848862171173, -0.01702970266342163, 0.333683043718338, -0.43316876888275146, 0.2623407542705536, -0.35186561942100525, -0.06032566726207733, 0.37477678060531616, 0.3381337523460388, 0.07445495575666428, 0.26931095123291016, -0.1782645285129547, -0.5362355709075928, -0.04826006665825844, -0.05208190530538559, -0.2690960466861725, -0.11319580674171448, -0.10639122873544693, -0.09484989941120148, 0.10199557989835739, 0.13231486082077026, -0.05632593855261803, -0.05872553586959839, -0.17394891381263733, 0.09795866906642914, 0.025782812386751175, -0.1864037960767746, -0.04217571020126343, -0.4256972372531891, 0.07439275830984116, -0.18804098665714264, 0.1968950629234314, 0.010722925886511803, -0.38882654905319214, -0.08680760860443115, -0.10945960134267807, 0.2699804902076721, 0.06696555763483047, -0.2887181043624878, 0.5238942503929138, -0.1380126178264618, 0.48275822401046753, -0.39980292320251465, 0.1235227882862091, -0.0782560408115387, -0.009288694709539413, 0.0035870708525180817, 0.01895425282418728, 0.16622623801231384, 0.10543475300073624, -0.5198888182640076, 0.41983193159103394, -0.12484177947044373, 0.2523115873336792, 0.09851527214050293, 0.07704091817140579, 0.050009846687316895, -0.053712859749794006, 0.013702413067221642, -0.1869937777519226, 0.4313993752002716, 0.12282998859882355, -0.1680065244436264, -0.06700824946165085, -0.21530665457248688, 0.08693423122167587, 0.6252501010894775, 0.12351357936859131, 0.2710292637348175, 0.023037513718008995, -0.05781317502260208, 0.13955241441726685, 0.3156242072582245, 0.2908976376056671, 0.458204448223114, 0.16936364769935608, -0.10601910948753357, -0.24284830689430237, -0.06498224288225174, -0.2901488244533539, 0.33126774430274963, -0.009552255272865295, 0.10466054081916809, 0.16312965750694275, 0.2974020540714264, 0.1430402398109436, -0.31202614307403564, -0.03290097042918205, -0.16016876697540283, -0.0005991850048303604, -0.5308014154434204, 0.1611696481704712, -0.24741974472999573, 0.29871636629104614, -0.2798125445842743, 0.18695738911628723, 0.11487114429473877, -0.17765241861343384, 0.00024975091218948364, 0.12022137641906738, -0.349443256855011, -0.0033004144206643105, -0.2582549452781677, 0.28278619050979614, 0.002464035525918007, 0.3778756856918335, -0.48889869451522827, 0.004190545063465834, -0.023991920053958893, -0.028878889977931976, 0.13550008833408356, 0.34634193778038025, -0.023704448714852333, 0.25811973214149475, -0.1559719443321228, -0.4410032629966736, -0.29791393876075745, -0.12755022943019867, -0.06070946156978607, 0.1905994862318039, 0.21701259911060333, -0.06206154823303223, -0.11194796860218048, -0.43405017256736755, 0.008554081432521343, -0.41607972979545593, -0.0389261431992054, 0.07021263241767883, 0.013990350998938084, -0.12250778824090958, -0.32082805037498474, -0.01707092672586441, 0.15927180647850037, -0.378088116645813, 0.5543379187583923, 0.24826295673847198, 0.1390553116798401, -0.18676534295082092, -0.0047518122009932995, -0.1154877319931984, -0.2576400935649872, 0.04031206667423248, 0.20783409476280212, -0.15458156168460846, 0.3755895793437958, -0.3610101044178009, -0.31517645716667175, -0.2084580957889557, 0.08600571006536484, -0.17829036712646484, 0.08549052476882935, -0.028313033282756805, 0.07601611316204071, -0.6309618949890137, -0.04420792683959007, -0.1413508653640747, 0.43318337202072144, 0.2950175404548645, 0.03080652840435505, -0.013166993856430054, -0.20943108201026917, 0.1114836037158966, 0.14633195102214813, 0.13029702007770538, 0.03982438147068024, -0.17805731296539307, 0.4435640275478363, -0.22351408004760742, 0.4364164471626282, 0.29069340229034424, -0.028620358556509018, 0.09922800958156586, -0.07880976796150208, 0.05447186157107353, -0.18134447932243347, -0.10006099939346313, -0.051978450268507004, -0.14019593596458435, 0.12184163928031921, -0.06960420310497284, -0.008153539150953293, 0.18373878300189972, 0.23466607928276062, 0.23741695284843445, -0.3590071201324463, -0.1418728083372116, 0.105066679418087, -0.2590070068836212, 0.17143705487251282, -0.1096944659948349, 0.123964823782444, -0.2254321277141571, -0.13959601521492004, 0.3987201154232025, -0.04039984941482544, -0.027346111834049225, -0.13855500519275665, -0.2570309340953827, 0.005656098015606403, -0.32090550661087036, 0.2053917944431305, -0.08052480965852737, 0.31191426515579224, 0.07676678895950317, -0.22736257314682007, 0.1732245683670044, -0.2393658459186554, 0.4089452624320984, -0.32502731680870056, -0.1552952378988266, -0.026186713948845863, 0.33422303199768066, -0.45898541808128357, -0.12469975650310516, -0.3477117121219635, 0.38014644384384155, 0.014784018509089947, 0.22055086493492126, -0.03772391378879547, -0.0013147491263225675, 0.4197879135608673, -0.3228961229324341, 0.05848048999905586, -0.27133527398109436, -0.17564213275909424, -0.0678909569978714, -0.0946962982416153, -0.09836599975824356, 0.3464565873146057, 0.0037830728106200695, -0.678512454032898, -0.007166042923927307, -0.1961411088705063, 0.04895152896642685, -0.15581052005290985, -0.14961612224578857, 0.3565081059932709, -0.392625093460083, -0.15224333107471466, 0.05867060273885727, -0.25670287013053894, 0.32755231857299805, 0.4381933808326721, -0.11034096777439117, -0.070514976978302, 0.11444395035505295, -0.32387349009513855, 0.29162976145744324, 0.4197217524051666, -0.17126783728599548, 0.35634148120880127, -0.0382729172706604, 0.007174991071224213, 0.03492799028754234, -0.5471513867378235, 0.37770408391952515, 0.11316791921854019, -0.02672419883310795, -0.18696847558021545, 0.790895402431488, 0.33550727367401123, -0.054207537323236465, 0.47495797276496887, 0.5056177973747253, -0.2899269759654999, 0.6462926864624023, 0.1928287148475647, 0.9604083299636841, 0.011839888989925385, 0.33723342418670654, 0.17353442311286926, -0.27284643054008484, 0.43911194801330566, -0.1636488437652588, 0.06313235312700272, -0.5263463258743286, -0.1340729296207428, -0.07336338609457016, -0.22352294623851776, 0.329341858625412, -0.14759299159049988, -0.3338850736618042, -0.019486624747514725, -0.26450979709625244, 0.4036139249801636, -0.18640141189098358, -0.10474458336830139, -0.5392071604728699, -0.2070792019367218, -0.5884950757026672, 0.0036021992564201355, 0.5608071088790894, -0.0930996835231781, -0.09590855985879898, 0.02350582368671894, -0.09320604801177979, -0.24943892657756805, -0.21499359607696533, 0.2267950475215912, -0.11558214575052261, 0.0805429220199585, 0.19428294897079468, -0.35337913036346436, 0.42107659578323364, 0.17573751509189606, 0.4635980725288391, 0.06104491278529167, -0.07162267714738846, 0.2423800677061081, 0.3282805383205414, 0.24933189153671265, -0.06218896061182022, -0.12374399602413177, 0.14352600276470184, 0.06596880406141281, -0.01571955531835556, 0.14431652426719666, 0.0271388478577137, -0.16075891256332397, 0.05762413144111633, 0.2775610685348511, -0.22968868911266327, -0.35273101925849915, -0.14246059954166412, -0.031422533094882965, 0.01955549418926239, -0.2995528280735016, 0.13446226716041565, 0.10030484944581985, 0.05830748751759529, 0.28742632269859314, -0.3863193094730377, -0.17813080549240112, 0.05191618949174881, 0.44620463252067566, -0.10608275979757309, 0.07187864929437637, 0.49662691354751587, 0.4225940704345703, -0.22423136234283447, -0.19579997658729553, 0.08182848244905472, 0.41463303565979004, -0.7259877920150757, 0.33317798376083374, -0.24265803396701813, -0.07367882132530212, 0.40377122163772583, 0.5579317212104797, -0.1615246832370758, -0.15449580550193787, -0.4889465272426605, -0.19447195529937744, -0.15450531244277954, 0.2445223033428192, 0.2157508283853531, 0.08569270372390747, -0.11071738600730896, -0.12763620913028717, -0.0757983922958374, 0.11122021079063416, -0.25516581535339355, 0.16953769326210022, 0.06919962912797928, 0.0815965011715889, 0.07739456743001938, 0.18487805128097534, 0.1849658191204071, -0.0595327690243721, 0.005829174071550369, 0.1383472979068756, 0.18639256060123444, -0.16339325904846191, -0.24570177495479584, 0.11542917788028717, 0.10502401739358902, -0.06252729147672653, -0.1307085007429123, -0.1377507746219635, -0.0696016401052475, -0.1477629542350769, 0.11695991456508636, 0.10392691940069199, -0.019999369978904724, 0.2589970827102661, 0.38657352328300476, 0.16518472135066986, 0.030307725071907043, 0.18829891085624695, -0.32155343890190125, -0.23645459115505219, -0.19176310300827026, 0.24945475161075592, 0.03706921264529228, 0.044605374336242676, 0.37454459071159363, 0.12175297737121582, -0.08596861362457275, 0.4187210202217102, 0.37481629848480225, -0.263973593711853, -0.15254516899585724, -0.16040383279323578, 0.3578179180622101, 0.2934964895248413, -0.01676029898226261, -0.17446646094322205, 0.06674815714359283, 0.13113929331302643, -0.06698091328144073, -0.22783057391643524, -0.1268666833639145, 0.20299892127513885, -0.015217717736959457, 0.053575970232486725, 0.004223335534334183, -0.43516871333122253, -0.13195189833641052, 0.29777783155441284, -0.00033619068562984467, -0.38751792907714844, 0.19027720391750336, 0.4918992221355438, 0.2559060752391815, 0.060086898505687714, 0.4117153286933899, -0.16011565923690796, 0.3163051903247833, 0.2667144238948822, 0.4873381555080414, 0.07220833748579025, 0.2867482304573059, 0.009983547031879425, 0.13009530305862427, -0.5173643827438354, 0.033609867095947266, -0.4730992913246155, -0.021948784589767456, 0.25315648317337036, 0.39654678106307983, 0.3798978328704834, -0.06158019229769707, -0.03132420778274536, -0.2610144019126892, 0.030741071328520775, -0.2093471884727478, -0.3183097243309021, -0.35245493054389954, -0.09252749383449554, 0.19250664114952087, -0.15634049475193024, -0.2590968906879425, 0.418059766292572, 0.45993050932884216, 0.15084271132946014, 0.1641331911087036, -0.4722936451435089, -0.044572681188583374, -0.005086738616228104, 0.641827404499054, -0.15034189820289612, 0.054202012717723846, -0.008613914251327515, -0.15175123512744904, -0.251984566450119, 0.445280522108078, 0.5033653974533081, 0.3459128737449646, 0.05415821820497513, 0.07319546490907669, -0.1354682594537735, -0.16681185364723206, 0.16227000951766968, 0.3978511393070221, 0.3344939649105072, 0.03922320529818535, 0.04171181470155716, 0.1773402839899063, -0.13182812929153442, 0.2455061972141266, -0.05738892778754234, 0.20330849289894104, -0.1488291323184967, 0.44307005405426025, -0.12428046762943268, -0.4893345832824707, 0.005595214664936066, -0.12418285757303238, -0.14762866497039795, -0.09873774647712708, 0.4570741653442383, -0.19099776446819305, 0.17795297503471375, -0.32711952924728394, 0.0476900190114975, 0.34165456891059875, 0.3934616148471832, 0.5668305158615112, 0.2519474923610687, -0.11929013580083847, 0.010619297623634338, -0.13563008606433868, -0.05145398527383804, -0.20097605884075165, 0.20249876379966736, 0.12082326412200928, -0.022400623187422752, 0.027310729026794434, -0.4263383150100708, 0.3627399206161499, 0.19140049815177917, -0.17489242553710938, 0.2940204441547394, -0.4627394378185272, 0.14165563881397247, 0.0248401015996933, -0.1379600167274475, -0.15527868270874023, -0.37111276388168335, 0.34876638650894165, 0.05725185200572014, -0.016257669776678085, -0.1384764164686203, -0.05335480719804764, 0.10083244740962982, -0.3925986588001251, 0.25977998971939087, 0.08894572407007217, 0.03635616600513458, -0.1399926394224167, -0.15038692951202393, -0.4764100909233093, -0.2847071886062622, -0.11047978699207306, 0.1672394871711731, -0.15255272388458252, 0.2821720242500305, -0.2597923278808594, -0.23032481968402863, -0.2926987409591675, -0.018178870901465416, -0.16709238290786743, -0.02166108973324299, -0.2702130973339081, 0.1702793687582016, -0.2438196837902069, -0.07514334470033646, 0.1398569494485855, 0.13438962399959564, -0.04524973779916763, 0.17430469393730164, -0.28766852617263794, -0.2932153344154358, 0.3636350929737091, -0.37808218598365784, -0.20090152323246002, 0.059021443128585815, 0.45112887024879456, 0.32758650183677673, -0.03952110558748245, -0.6430671811103821, -0.21216954290866852, 0.1535530537366867, -0.10013262182474136, 0.008524339646100998, 0.19216807186603546, 0.08113895356655121, 0.13538001477718353, -0.19069240987300873, 0.4636198580265045, 0.19203409552574158, -0.12235086411237717, -0.15586979687213898, -0.3559063673019409 ]
https://github.com/huggingface/datasets/issues/6663
`write_examples_on_file` and `write_batch` are broken in `ArrowWriter`
> Thanks for reporting! I've left some comments on the PR on how to fix this recent change rather than reverting it. I feel that'd be good, but it'd be great to release a hotfix ASAP (a revert is a fast thing to do) so people can continue using this library and then focus on still applying the improvement.
### Describe the bug `write_examples_on_file` and `write_batch` are broken in `ArrowWriter` since #6636. The order between the columns and the schema is not preserved anymore. So these functions don't work anymore unless the order happens to align well. ### Steps to reproduce the bug Try to do `write_batch` with anything that has many columns, and it's likely to break. ### Expected behavior I expect these functions to work, instead of it trying to cast a column to its incorrect type. ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-5.15.0-1040-aws-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.19.4 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
59
`write_examples_on_file` and `write_batch` are broken in `ArrowWriter` ### Describe the bug `write_examples_on_file` and `write_batch` are broken in `ArrowWriter` since #6636. The order between the columns and the schema is not preserved anymore. So these functions don't work anymore unless the order happens to align well. ### Steps to reproduce the bug Try to do `write_batch` with anything that has many columns, and it's likely to break. ### Expected behavior I expect these functions to work, instead of it trying to cast a column to its incorrect type. ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-5.15.0-1040-aws-x86_64-with-glibc2.35 - Python version: 3.10.13 - `huggingface_hub` version: 0.19.4 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 > Thanks for reporting! I've left some comments on the PR on how to fix this recent change rather than reverting it. I feel that'd be good, but it'd be great to release a hotfix ASAP (a revert is a fast thing to do) so people can continue using this library and then focus on still applying the improvement.
[ -0.20024427771568298, -0.16803567111492157, 0.040487680584192276, 0.07392001152038574, 0.11709805577993393, -0.1638069897890091, 0.40580639243125916, 0.07255637645721436, 0.09887109696865082, -0.09786984324455261, 0.23623615503311157, 0.27673956751823425, -0.013462056405842304, 0.20669616758823395, 0.13362739980220795, -0.26327523589134216, 0.19920460879802704, 0.035870492458343506, -0.20868444442749023, 0.04128159582614899, -0.1713569462299347, 0.2985898554325104, -0.2776312232017517, 0.25001704692840576, -0.3303930461406708, -0.20693343877792358, -0.03125805780291557, 0.00948740541934967, -0.252305269241333, -0.33877497911453247, 0.16639475524425507, -0.12412451207637787, 0.24720880389213562, 0.3288647532463074, -0.00012515351409092546, -0.24888895452022552, 0.3963407278060913, 0.0818825513124466, -0.1013602614402771, -0.0674188882112503, -0.0188902635127306, 0.007807789370417595, 0.2230316698551178, -0.17849880456924438, 0.36230525374412537, -0.1547883301973343, -0.07517237961292267, -0.11779868602752686, 0.1973952203989029, 0.4230372905731201, 0.1730157434940338, 0.2172972559928894, 0.32598429918289185, -0.06914740800857544, 0.5386233925819397, 0.3281058669090271, -0.2696970999240875, 0.02304181270301342, 0.15520526468753815, -0.26800286769866943, 0.01040087640285492, 0.08866739273071289, -0.13151754438877106, -0.2212831676006317, 0.27880656719207764, 0.13467739522457123, 0.06738598644733429, 0.06225886940956116, -0.004651464521884918, 0.1259043663740158, 0.5503564476966858, -0.4033428430557251, -0.4259231686592102, -0.13054955005645752, -0.04606625437736511, -0.28738969564437866, 0.2978137731552124, 0.20838847756385803, 0.21472884714603424, 0.20510870218276978, 0.20196738839149475, -0.03906363993883133, -0.02100444957613945, 0.08543885499238968, 0.11954005062580109, 0.10218407213687897, -0.29989656805992126, 0.038835860788822174, -0.042098093777894974, -0.000024922192096710205, 0.5538033843040466, -0.11170588433742523, -0.4194468557834625, 0.11232675611972809, -0.3055276572704315, 0.10858821868896484, 0.1313452571630478, 0.3165218234062195, -0.215194433927536, 0.22853577136993408, 0.3851139545440674, -0.10526496917009354, 0.04512258246541023, 0.041652873158454895, -0.1677023023366928, 0.31885620951652527, 0.3659912943840027, 0.2710402309894562, 0.38891124725341797, 0.36429038643836975, 0.16648218035697937, -0.17443513870239258, 0.14540798962116241, -0.3207934498786926, 0.000495322048664093, 0.1572745442390442, -0.04860230162739754, -0.23507709801197052, 0.03494800627231598, 0.20759013295173645, -0.017789458855986595, -0.14208129048347473, 0.11236981302499771, 0.3463438153266907, 0.08696786314249039, 0.08808048069477081, 0.21858565509319305, 0.2205379605293274, -0.10115082561969757, 0.18277990818023682, -0.01267603412270546, 0.09121394157409668, -0.24895131587982178, 0.05681859701871872, -0.09789572656154633, -0.008875679224729538, 0.15187205374240875, 0.2800004780292511, -0.07844379544258118, -0.03002140112221241, -0.14532174170017242, -0.14129307866096497, 0.19116784632205963, 0.3152511715888977, -0.24712210893630981, 0.3547070026397705, -0.05430172011256218, 0.006836041808128357, -0.1794186234474182, 0.10469922423362732, -0.3178219795227051, -0.41987279057502747, -0.2557985782623291, 0.045654501765966415, -0.18638461828231812, -0.1503685563802719, -0.4822099506855011, -0.1854170858860016, 0.19915203750133514, -0.31876567006111145, 0.4842040240764618, -0.1447753757238388, 0.11146995425224304, -0.2538357377052307, -0.022182952612638474, 0.1860896795988083, -0.3315960764884949, 0.16606222093105316, 0.005070774350315332, 0.2744564116001129, 0.2820895314216614, 0.2315259724855423, -0.09503486752510071, 0.2241145372390747, -0.03808622062206268, 0.03493557125329971, 0.3542691767215729, -0.3910664916038513, -0.183198019862175, 0.031112346798181534, 0.09617763757705688, -0.08794538676738739, 0.027665957808494568, -0.28498297929763794, 0.12164371460676193, -0.10855315625667572, -0.10414338111877441, 0.15805664658546448, 0.3144060969352722, 0.11110521107912064, -0.31018003821372986, -0.3640111982822418, -0.27410393953323364, -0.12062714993953705, -0.18958738446235657, -0.020513348281383514, 0.27507850527763367, -0.36306628584861755, 0.3260601758956909, -0.35561442375183105, -0.05911363661289215, 0.39103442430496216, 0.34151673316955566, 0.13958150148391724, 0.25225386023521423, -0.2146044671535492, -0.6050011515617371, -0.03522647172212601, -0.07689446955919266, -0.26241645216941833, -0.13499756157398224, -0.16414524614810944, -0.0426969975233078, 0.10914386063814163, 0.16142579913139343, -0.09469492733478546, -0.10538912564516068, -0.1570722609758377, 0.077674001455307, 0.04649846628308296, -0.26175475120544434, 0.047543905675411224, -0.4210961163043976, 0.11562008410692215, -0.3148993253707886, 0.24200429022312164, 0.04317456856369972, -0.40310636162757874, -0.07238294929265976, -0.03143339604139328, 0.27296096086502075, 0.0460791140794754, -0.23035725951194763, 0.5264473557472229, -0.12860478460788727, 0.46320027112960815, -0.36002078652381897, 0.1929529756307602, -0.02223612554371357, -0.059342075139284134, 0.0008592307567596436, -0.013503048568964005, 0.14199870824813843, 0.11078868061304092, -0.42468276619911194, 0.4922615885734558, -0.23337693512439728, 0.22360926866531372, 0.08786267042160034, 0.032274529337882996, -0.009131127968430519, -0.051580145955085754, -0.02578175626695156, -0.11852125078439713, 0.4462740421295166, 0.13287365436553955, -0.10953384637832642, -0.05082856863737106, -0.23674480617046356, 0.0832987055182457, 0.6752465963363647, 0.08733846247196198, 0.19018250703811646, 0.05645109713077545, -0.05816187709569931, 0.10249432176351547, 0.37340134382247925, 0.23019368946552277, 0.43101751804351807, 0.17029455304145813, -0.15221689641475677, -0.1549452692270279, -0.08300475776195526, -0.2540888786315918, 0.31281477212905884, 0.02340872585773468, 0.0930035412311554, 0.14191851019859314, 0.28405481576919556, 0.21889740228652954, -0.3778165280818939, -0.09494610130786896, -0.19330979883670807, 0.017517507076263428, -0.5059450268745422, 0.16523833572864532, -0.26247692108154297, 0.2605278789997101, -0.26521575450897217, 0.09938152879476547, 0.020029347389936447, -0.1427312195301056, -0.025070134550333023, 0.12832121551036835, -0.34399598836898804, -0.024983124807476997, -0.16280539333820343, 0.34570246934890747, -0.054705534130334854, 0.3110111653804779, -0.5075883865356445, -0.0074996803887188435, -0.015112008899450302, -0.06102999299764633, 0.16308878362178802, 0.37614017724990845, -0.024422092363238335, 0.26504161953926086, -0.16341474652290344, -0.45351850986480713, -0.361261248588562, -0.12221062183380127, -0.1186981052160263, 0.1976556032896042, 0.3128102421760559, -0.09498658776283264, -0.09535934776067734, -0.43570220470428467, 0.01595684140920639, -0.5011407136917114, 0.006335251033306122, 0.05425192415714264, -0.030844854190945625, -0.10451816767454147, -0.337756872177124, -0.00024361908435821533, 0.2001221477985382, -0.3895967900753021, 0.6114529371261597, 0.19793638586997986, 0.18175707757472992, -0.15853378176689148, -0.0713416039943695, -0.06050524860620499, -0.3030400276184082, 0.0447162389755249, 0.19617773592472076, -0.17018570005893707, 0.3408939242362976, -0.33893081545829773, -0.3116098940372467, -0.21859493851661682, 0.08649424463510513, -0.12845942378044128, -0.003982014954090118, -0.11657404154539108, 0.020754896104335785, -0.666442334651947, 0.006460484117269516, -0.17047853767871857, 0.47952115535736084, 0.3103024959564209, 0.011704018339514732, 0.02932426519691944, -0.215998113155365, 0.009163424372673035, 0.15322242677211761, 0.13683325052261353, 0.014224164187908173, -0.13943392038345337, 0.37599965929985046, -0.20818543434143066, 0.45691365003585815, 0.3169492781162262, -0.00720643624663353, 0.18070484697818756, -0.027052169665694237, 0.10521434247493744, -0.2234838604927063, -0.1353086531162262, -0.046313073486089706, -0.17053580284118652, 0.11062061786651611, -0.05750897526741028, 0.01506863348186016, 0.23160937428474426, 0.18024976551532745, 0.1610143929719925, -0.33044299483299255, -0.16904360055923462, 0.1024114191532135, -0.1697346717119217, 0.05245277285575867, -0.10659942030906677, 0.111772321164608, -0.21647004783153534, -0.1353115737438202, 0.4943600296974182, -0.0032715871930122375, 0.022663086652755737, -0.12110230326652527, -0.23910704255104065, -0.01895558275282383, -0.43307626247406006, 0.20533859729766846, -0.07265444844961166, 0.2615857422351837, 0.06510578095912933, -0.20544075965881348, 0.23142124712467194, -0.26646140217781067, 0.4408206343650818, -0.2989901304244995, -0.18366380035877228, -0.014687835238873959, 0.27801477909088135, -0.5161964297294617, -0.14116249978542328, -0.30645492672920227, 0.32388800382614136, -0.013521064072847366, 0.22331075370311737, -0.11716384440660477, -0.05486766993999481, 0.38794273138046265, -0.2926954925060272, 0.12401418387889862, -0.2285657376050949, -0.22528518736362457, -0.11706189066171646, -0.12914718687534332, -0.10130070894956589, 0.30848532915115356, 0.029152991250157356, -0.5755045413970947, -0.018223194405436516, -0.08019308745861053, 0.00764542818069458, -0.09648510813713074, -0.15422150492668152, 0.37859418988227844, -0.3752758502960205, -0.11280865967273712, 0.057806357741355896, -0.1955377459526062, 0.25418969988822937, 0.5049968957901001, -0.12130704522132874, -0.03431093692779541, 0.13964813947677612, -0.2092747688293457, 0.3208385705947876, 0.5059531331062317, -0.1668028086423874, 0.4199516177177429, -0.10676540434360504, 0.021244291216135025, -0.015017676167190075, -0.5164560079574585, 0.35715407133102417, 0.1410575956106186, -0.05973036214709282, -0.20230792462825775, 0.8836389780044556, 0.3773103356361389, -0.07977372407913208, 0.5705847144126892, 0.6206122636795044, -0.2565232217311859, 0.6268187165260315, 0.17115554213523865, 1.0758079290390015, -0.02649097889661789, 0.3857845664024353, 0.20061922073364258, -0.3040304183959961, 0.5687414407730103, -0.1960497945547104, 0.07370880246162415, -0.5461763739585876, -0.13327167928218842, -0.08588254451751709, -0.2098408192396164, 0.3326844871044159, -0.23718644678592682, -0.31770944595336914, 0.020379088819026947, -0.19870787858963013, 0.317579984664917, -0.18003062903881073, -0.05207493156194687, -0.5583664178848267, -0.24672511219978333, -0.6195244193077087, -0.031901296228170395, 0.510631263256073, -0.039607349783182144, -0.1266707479953766, 0.003461172804236412, -0.10542720556259155, -0.27776187658309937, -0.28698888421058655, 0.21516883373260498, -0.10912919044494629, 0.027256138622760773, 0.2575894594192505, -0.2651207447052002, 0.43356695771217346, 0.11469482630491257, 0.4810929298400879, 0.08227622509002686, -0.10287588834762573, 0.22035828232765198, 0.18781356513500214, 0.272426038980484, -0.041645050048828125, -0.12669244408607483, 0.2004086673259735, 0.02888885885477066, -0.02981431782245636, 0.11776547133922577, 0.02863120660185814, -0.20380361378192902, 0.09032021462917328, 0.27124929428100586, -0.14017805457115173, -0.3439607620239258, -0.11427529156208038, 0.055537085980176926, 0.08997566998004913, -0.28640130162239075, 0.10661119222640991, 0.15581148862838745, 0.03870958462357521, 0.2994481027126312, -0.3912540674209595, -0.17945340275764465, 0.006467938423156738, 0.4212900698184967, -0.08957283943891525, 0.04492564499378204, 0.4123639464378357, 0.4532364010810852, -0.23452863097190857, -0.1538887321949005, 0.02351205050945282, 0.501898467540741, -0.8035920262336731, 0.3270004093647003, -0.2546236515045166, -0.10637528449296951, 0.39214447140693665, 0.5871362090110779, -0.11540882289409637, -0.11688991636037827, -0.4419049322605133, -0.18714690208435059, -0.18566979467868805, 0.27235403656959534, 0.1348462849855423, 0.10757850110530853, -0.07474552094936371, -0.09807844460010529, -0.08925487101078033, 0.11032535880804062, -0.2339056432247162, 0.19621053338050842, 0.06654641777276993, 0.0684802383184433, 0.04991341754794121, 0.21102771162986755, 0.2021225392818451, -0.07105830311775208, -0.032870322465896606, 0.20325404405593872, 0.11424175649881363, -0.12056078761816025, -0.26933708786964417, 0.13739103078842163, 0.06940214335918427, -0.07668609172105789, -0.09631016105413437, -0.07312227785587311, -0.09519803524017334, -0.17335979640483856, 0.18137100338935852, 0.1374964714050293, -0.016739249229431152, 0.28220340609550476, 0.39106354117393494, 0.12556910514831543, -0.01979007199406624, 0.15110118687152863, -0.2505330443382263, -0.17076922953128815, -0.18184411525726318, 0.23689419031143188, -0.05524180456995964, 0.021785423159599304, 0.4192831814289093, 0.14190460741519928, -0.05221736431121826, 0.3563723862171173, 0.3474038243293762, -0.2174178808927536, -0.2015034556388855, -0.1214565709233284, 0.41994935274124146, 0.31095337867736816, 0.04202044755220413, -0.19440139830112457, 0.08533889055252075, 0.09304551780223846, -0.07668247818946838, -0.21790868043899536, -0.07455053925514221, 0.2050662785768509, -0.04089658334851265, 0.046408481895923615, 0.10066354274749756, -0.3972473442554474, -0.0583396852016449, 0.2674769461154938, 0.011628881096839905, -0.3027581572532654, 0.21161748468875885, 0.4501623213291168, 0.21510569751262665, 0.06541676074266434, 0.4316568076610565, -0.14624588191509247, 0.3166118860244751, 0.26726022362709045, 0.4124089479446411, 0.09865756332874298, 0.20027455687522888, 0.035800136625766754, 0.14527690410614014, -0.5210802555084229, 0.027040202170610428, -0.3876083493232727, 0.08064618706703186, 0.24381428956985474, 0.3966519832611084, 0.47459137439727783, -0.0726403221487999, -0.11629220098257065, -0.21629337966442108, 0.10528533160686493, -0.23041662573814392, -0.2882763743400574, -0.28019067645072937, -0.04718511551618576, 0.13295771181583405, -0.09267334640026093, -0.2598365247249603, 0.3515968918800354, 0.533104658126831, 0.13425852358341217, 0.1510237157344818, -0.453499436378479, -0.08634653687477112, -0.04395028203725815, 0.7238317131996155, -0.12568572163581848, 0.08271744847297668, -0.04645708203315735, -0.20987862348556519, -0.3202841579914093, 0.48414847254753113, 0.46784883737564087, 0.2734229862689972, 0.07117463648319244, 0.11364206671714783, -0.12180015444755554, -0.06015991419553757, 0.22321371734142303, 0.422360897064209, 0.337140291929245, 0.05984252691268921, 0.013341538608074188, 0.12800100445747375, -0.10321024805307388, 0.21487927436828613, -0.12223394215106964, 0.20738394558429718, -0.1578391045331955, 0.42090463638305664, -0.15314574539661407, -0.43968209624290466, -0.045361705124378204, -0.09118027240037918, -0.1639096736907959, -0.12828858196735382, 0.47015607357025146, -0.2140723019838333, 0.13125750422477722, -0.3765348196029663, 0.03681786730885506, 0.32600152492523193, 0.3864123523235321, 0.607589602470398, 0.2664656937122345, -0.128541961312294, -0.02030400186777115, -0.17832845449447632, -0.008678257465362549, -0.09722383320331573, 0.24685028195381165, 0.12091135233640671, -0.05991072207689285, 0.005018860101699829, -0.40431177616119385, 0.3726464509963989, 0.1835634559392929, -0.11159918457269669, 0.2186218947172165, -0.46809104084968567, 0.20966282486915588, -0.031353600323200226, -0.2330242395401001, -0.1442381590604782, -0.34365329146385193, 0.3359580338001251, -0.015351749025285244, -0.07335438579320908, -0.1620422899723053, -0.034722425043582916, 0.06983669102191925, -0.3865312933921814, 0.2930149435997009, 0.1301478147506714, 0.03149683028459549, -0.15126821398735046, -0.22001633048057556, -0.4739266633987427, -0.2962801456451416, -0.09261151403188705, 0.10381428897380829, -0.20201565325260162, 0.2716337740421295, -0.2426057606935501, -0.19292013347148895, -0.3090270459651947, 0.03915071487426758, -0.1223965436220169, 0.0040653483010828495, -0.3267679810523987, 0.15684251487255096, -0.30369412899017334, -0.04526681452989578, 0.13580673933029175, 0.2066328525543213, -0.00934397429227829, 0.17430764436721802, -0.35930681228637695, -0.25985345244407654, 0.48724573850631714, -0.4024946987628937, -0.17888198792934418, 0.08448126167058945, 0.4786708652973175, 0.3595224916934967, -0.1055537536740303, -0.7128661870956421, -0.23467016220092773, 0.05426088720560074, -0.04350215196609497, -0.07261914014816284, 0.24282772839069366, 0.039915360510349274, 0.1066114753484726, -0.18869388103485107, 0.45911896228790283, 0.24238109588623047, -0.16725541651248932, -0.04548332840204239, -0.4072965979576111 ]
https://github.com/huggingface/datasets/issues/6661
Import error on Google Colab
Hi! This can happen if an incompatible `pyarrow` version (`pyarrow<12.0.0`) has been imported before the `datasets` installation and the Colab session hasn't been restarted afterward. To avoid the error, go to "Runtime -> Restart session" after `!pip install -U datasets` and before `import datasets`, or insert the `import os; os.kill(os.getpid(), 9)` cell between `!pip install -U datasets` and `import datasets` to do the same programmatically.
### Describe the bug Cannot be imported on Google Colab, the import throws the following error: ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug 1. `! pip install -U datasets` 2. `import datasets` ### Expected behavior Should be possible to use the library ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0
65
Import error on Google Colab ### Describe the bug Cannot be imported on Google Colab, the import throws the following error: ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug 1. `! pip install -U datasets` 2. `import datasets` ### Expected behavior Should be possible to use the library ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0 Hi! This can happen if an incompatible `pyarrow` version (`pyarrow<12.0.0`) has been imported before the `datasets` installation and the Colab session hasn't been restarted afterward. To avoid the error, go to "Runtime -> Restart session" after `!pip install -U datasets` and before `import datasets`, or insert the `import os; os.kill(os.getpid(), 9)` cell between `!pip install -U datasets` and `import datasets` to do the same programmatically.
[ -0.38111141324043274, 0.0420638769865036, 0.001217380166053772, 0.24291452765464783, 0.041686780750751495, -0.22087806463241577, 0.31871384382247925, 0.08693042397499084, -0.023115523159503937, 0.19101077318191528, -0.2629665732383728, 0.40718820691108704, -0.10318438708782196, 0.3794889450073242, 0.04207589104771614, -0.10482443869113922, 0.09992031008005142, 0.19215519726276398, -0.1488940417766571, 0.10304051637649536, -0.11653108894824982, 0.40806424617767334, -0.22758136689662933, -0.03601507097482681, -0.17071747779846191, -0.08360924571752548, -0.14630435407161713, 0.1622225046157837, -0.3165295422077179, -0.4180118441581726, 0.49138814210891724, -0.02940380945801735, 0.07305809110403061, 0.5249042510986328, -0.00011203775648027658, -0.056777384132146835, 0.29583069682121277, 0.09442417323589325, -0.12133315205574036, -0.2560913562774658, -0.12527823448181152, -0.14080463349819183, 0.20750808715820312, -0.11124347150325775, 0.15811219811439514, 0.11692848056554794, 0.10142803192138672, 0.4038650095462799, 0.23450589179992676, 0.3329628109931946, 0.22707130014896393, 0.18773965537548065, 0.4390079081058502, -0.06289219856262207, 0.48943382501602173, -0.16681480407714844, -0.07257059216499329, 0.6054954528808594, 0.11861740052700043, 0.057649485766887665, 0.16169235110282898, 0.014134585857391357, -0.2095980942249298, -0.10156241059303284, 0.06616227328777313, -0.0036288434639573097, -0.2685556411743164, -0.33513712882995605, 0.07238659262657166, 0.13672682642936707, 0.2183438241481781, -0.6250303983688354, -0.1235061064362526, -0.01614324375987053, 0.19681529700756073, -0.3127760887145996, 0.3075394630432129, 0.1606782078742981, 0.05122048035264015, 0.23535846173763275, -0.03950143977999687, -0.24542100727558136, -0.19470562040805817, -0.025638163089752197, -0.26006460189819336, 0.36250966787338257, -0.08897320926189423, -0.020835407078266144, 0.016195442527532578, -0.09953367710113525, 0.4676116406917572, -0.0031611379235982895, 0.004540305584669113, -0.014758131466805935, 0.0017487555742263794, 0.044088199734687805, 0.15790483355522156, 0.48331525921821594, -0.002291206270456314, -0.16099277138710022, -0.12840186059474945, -0.09276675432920456, -0.09966133534908295, 0.391932874917984, -0.06546935439109802, 0.17080481350421906, -0.23603880405426025, 0.21163219213485718, 0.5096904635429382, 0.32162150740623474, 0.007319163531064987, 0.03466576337814331, 0.0119980089366436, -0.22053366899490356, -0.04207419976592064, -0.10744660347700119, 0.4046880006790161, -0.12712709605693817, -0.4065857529640198, -0.05633998662233353, -0.24159201979637146, 0.14344510436058044, -0.08517643809318542, 0.2922855317592621, -0.32121741771698, -0.09661368280649185, 0.08460602164268494, -0.012887943536043167, -0.2814594805240631, 0.14803355932235718, -0.14662852883338928, 0.3701564073562622, -0.08099327981472015, -0.0218436811119318, 0.11747026443481445, -0.3025352954864502, 0.18622857332229614, 0.14442530274391174, 0.27247536182403564, 0.13668477535247803, -0.2380320131778717, -0.2560555636882782, -0.1830630898475647, 0.4305015206336975, 0.16695119440555573, -0.07196754962205887, -0.12054550647735596, -0.536221981048584, -0.21018345654010773, 0.24791574478149414, -0.33586421608924866, -0.09191642701625824, -0.2654677629470825, 0.14852432906627655, -0.3288886547088623, 0.002519313246011734, -0.516446590423584, 0.06737200915813446, -0.016181565821170807, -0.36853688955307007, -0.0421510711312294, -0.45169156789779663, -0.09837968647480011, -0.3930981159210205, 0.09487322717905045, 0.3319304585456848, -0.43618243932724, -0.04421480372548103, 0.05614263564348221, 0.05989561229944229, 0.15883393585681915, 0.24172641336917877, 0.0162324458360672, -0.08034821599721909, -0.08591526746749878, 0.06216062605381012, -0.09317702800035477, -0.20557540655136108, -0.6528246402740479, -0.20899909734725952, 0.010502941906452179, 0.06706751137971878, 0.05574792996048927, -0.1634337306022644, 0.11444220691919327, 0.059414248913526535, 0.21005035936832428, 0.24520127475261688, -0.14312367141246796, 0.10041656345129013, -0.3689747154712677, -0.3836851716041565, -0.016865074634552002, 0.046747345477342606, 0.31203094124794006, -0.07107294350862503, 0.18253201246261597, -0.18149305880069733, 0.0912260040640831, -0.13073322176933289, -0.056062810122966766, 0.2455442100763321, 0.659795343875885, -0.06888563930988312, -0.06307151913642883, -0.2737540602684021, -0.2954162061214447, 0.13792210817337036, -0.2081543207168579, 0.17509889602661133, -0.3431190848350525, -0.2848004102706909, -0.35154908895492554, 0.08657028526067734, 0.09875881671905518, -0.02735200896859169, 0.10022024810314178, -0.07698698341846466, 0.004377152770757675, 0.26346564292907715, 0.08689315617084503, 0.5159141421318054, 0.12848635017871857, 0.1471850723028183, -0.2684975862503052, 0.5238901972770691, -0.38873785734176636, -0.4532472789287567, 0.18858082592487335, 0.11180523037910461, -0.01946568489074707, -0.05524883419275284, -0.08460629731416702, 0.20097267627716064, -0.09256578236818314, 0.20115980505943298, -0.09953140467405319, 0.03190895915031433, 0.3729016184806824, -0.3319666087627411, 0.22487545013427734, -0.061973851174116135, 0.10885094851255417, 0.11879398673772812, 0.14326348900794983, 0.27352505922317505, -0.08292818069458008, -0.10183391720056534, 0.05870107561349869, -0.1666245311498642, 0.07718154042959213, 0.05530122295022011, 0.06602189689874649, 0.011306680738925934, 0.007497876882553101, 0.3813600242137909, 0.15389133989810944, 0.13065548241138458, -0.3187774419784546, 0.1766897290945053, 0.5697647333145142, 0.23024272918701172, 0.10089394450187683, 0.15326224267482758, -0.21396556496620178, -0.0019866731017827988, 0.42771196365356445, -0.14729993045330048, 0.3082007169723511, 0.27637672424316406, -0.08412294089794159, 0.2417527139186859, -0.11421971768140793, -0.13586288690567017, 0.04155790060758591, 0.04664520546793938, 0.18151544034481049, -0.09727723151445389, 0.39497631788253784, 0.16208985447883606, -0.2633942663669586, -0.22167560458183289, -0.22279652953147888, 0.2856740951538086, -0.3106003999710083, 0.27539241313934326, -0.32732871174812317, -0.2138800323009491, -0.16049884259700775, -0.24180211126804352, -0.253976047039032, -0.059961266815662384, -0.1773906648159027, 0.5559317469596863, 0.1055535078048706, 0.06949445605278015, 0.500870943069458, 0.18292036652565002, -0.03010593354701996, -0.19195467233657837, -0.11690549552440643, -0.10594821721315384, -0.3287254869937897, 0.12663495540618896, 0.3563675582408905, 0.253791481256485, 0.2887552082538605, -0.17289386689662933, -0.030472813174128532, 0.08332999795675278, -0.5897030234336853, 0.04640369862318039, -0.23686812818050385, 0.5333625674247742, 0.11054050922393799, -0.011663205921649933, -0.46118372678756714, -0.19516722857952118, 0.04342907667160034, -0.07057538628578186, -0.1778433471918106, -0.11291836947202682, -0.2951471507549286, -0.20209933817386627, -0.16625869274139404, -0.12244003266096115, -0.3967496156692505, -0.2655866742134094, 0.3456433415412903, 0.20076371729373932, 0.21588611602783203, 0.23542796075344086, 0.27496302127838135, 0.10093514621257782, 0.1770077794790268, -0.07698484510183334, 0.013357888907194138, -0.1723269373178482, 0.29732754826545715, -0.24817690253257751, -0.260712593793869, 0.056346822530031204, -0.0858352780342102, 0.08976602554321289, -0.037436820566654205, -0.43514716625213623, -0.36628207564353943, -0.3307816684246063, 0.4251196086406708, 0.050768204033374786, 0.3165109157562256, 0.1872517466545105, 0.07043465971946716, 0.03679291903972626, -0.01665022224187851, -0.376858115196228, -0.3208308517932892, 0.38144442439079285, 0.07967476546764374, 0.12578648328781128, 0.14907418191432953, -0.21614284813404083, 0.5414563417434692, 0.07475382089614868, -0.05426429584622383, 0.3246922492980957, -0.20156650245189667, 0.5131314992904663, -0.16638028621673584, -0.29357919096946716, 0.1412106156349182, -0.0320686399936676, -0.22697487473487854, 0.18785816431045532, -0.19200170040130615, -0.014581011608242989, -0.1319291889667511, -0.06376547366380692, -0.26735952496528625, -0.23666918277740479, -0.05088143050670624, 0.46472346782684326, 0.04665696620941162, 0.12897324562072754, -0.25933775305747986, -0.20341159403324127, -0.21534648537635803, -0.042592380195856094, 0.12448623031377792, -0.26463639736175537, 0.07471435517072678, 0.4338911473751068, -0.43299683928489685, -0.678876519203186, 0.2578180432319641, 0.25269460678100586, -0.1278112679719925, 0.0492202453315258, 0.03763529658317566, 0.15368402004241943, -0.04472542926669121, 0.2524341344833374, -0.030543474480509758, -0.29265350103378296, 0.19614678621292114, 0.1382654756307602, -0.2705281972885132, -0.24405665695667267, -0.2582198977470398, 0.2311040312051773, 0.3075951933860779, 0.026413552463054657, -0.3473981022834778, 0.2965448796749115, 0.41728898882865906, 0.32215020060539246, -0.028287742286920547, 0.0864047184586525, -0.4463064670562744, -0.47535935044288635, -0.19988003373146057, 0.10970672965049744, 0.13009293377399445, 0.3324938118457794, -0.16376198828220367, -0.10549437999725342, 0.04990933835506439, -0.24946719408035278, 0.057274751365184784, 0.45112842321395874, 0.26180946826934814, 0.0900837704539299, 0.16643665730953217, -0.38218745589256287, -0.22862470149993896, 0.522271990776062, 0.7738726139068604, -0.05873504653573036, -0.15296562016010284, -0.03984943777322769, 0.04546884819865227, -0.029104463756084442, 0.20030935108661652, -0.153094083070755, 0.019089162349700928, -0.20493243634700775, 0.23807477951049805, 0.1320958435535431, 0.1655750870704651, -0.04235333204269409, 0.08254080265760422, -0.3356606364250183, 0.028439799323678017, 0.5049200057983398, 0.21478454768657684, -0.06609764695167542, 0.27093780040740967, 0.37685686349868774, -0.22446301579475403, 0.3448878526687622, -0.02489420771598816, 0.9519283771514893, -0.19136424362659454, -0.03060964122414589, 0.4955686628818512, -0.14738675951957703, 0.5327214002609253, 0.14231084287166595, 0.1959710270166397, -0.4228503406047821, -0.24342770874500275, 0.04143166542053223, -0.13132165372371674, 0.22227224707603455, -0.41672492027282715, -0.48317039012908936, 0.2549327611923218, 0.11435356736183167, 0.20745253562927246, 0.1547470986843109, 0.005155652761459351, -0.08476018905639648, 0.07837110757827759, -0.3634079098701477, 0.12741921842098236, -0.09344692528247833, 0.1576412469148636, -0.3260035216808319, 0.03580382466316223, -0.3147490620613098, -0.20699869096279144, -0.40905487537384033, 0.05616821348667145, -0.4130915403366089, 0.04047001525759697, 0.1779855638742447, -0.4089144468307495, 0.16002768278121948, -0.057527024298906326, 0.16908735036849976, 0.2716417908668518, -0.17902347445487976, 0.0999065712094307, -0.029805026948451996, -0.17449714243412018, -0.02985701896250248, 0.09688270092010498, 0.15528737008571625, -0.09279505908489227, -0.12282669544219971, 0.07209573686122894, 0.14646682143211365, -0.10712830722332001, 0.13234242796897888, 0.18112626671791077, 0.02981884405016899, -0.10175437480211258, -0.03970967233181, -0.18691736459732056, 0.30421334505081177, -0.23352894186973572, 0.1337699145078659, -0.0695401132106781, 0.21361124515533447, 0.42101696133613586, 0.09731407463550568, -0.2394426017999649, -0.2939305007457733, 0.3240791857242584, 0.09886389970779419, 0.13766291737556458, 0.1256832480430603, 0.22519154846668243, -0.23738592863082886, -0.0360490158200264, -0.15307721495628357, -0.18823742866516113, -0.23905348777770996, 0.15229332447052002, -0.13784927129745483, 0.08055764436721802, 0.02498367801308632, 0.27475056052207947, 0.21873022615909576, 0.17358657717704773, 0.030017096549272537, -0.2703250050544739, -0.13507220149040222, 0.25228023529052734, 0.09397482872009277, 0.03465104103088379, 0.39872097969055176, 0.34226831793785095, -0.0011953618377447128, -0.1077406257390976, -0.31127405166625977, 0.22116787731647491, -0.2390768975019455, 0.06251735240221024, 0.03587863966822624, 0.07724136859178543, 0.0927204042673111, -0.1459413468837738, 0.11870077252388, 0.23339687287807465, -0.024939727038145065, -0.24811768531799316, -0.19435080885887146, 0.062138400971889496, 0.047292739152908325, -0.08500590175390244, -0.10584695637226105, 0.058848895132541656, 0.04676497355103493, -0.15157704055309296, 0.41639018058776855, 0.28337544202804565, -0.05586768686771393, -0.12174411118030548, 0.19168643653392792, 0.07603683322668076, 0.012865852564573288, 0.13447429239749908, -0.022111400961875916, 0.20598652958869934, 0.157840296626091, 0.3973463177680969, 0.03425019606947899, 0.0743914395570755, 0.28604573011398315, -0.06104772537946701, -0.09655100107192993, -0.024523258209228516, 0.0812961757183075, -0.1964692622423172, -0.01747506856918335, 0.01424255222082138, 0.14967164397239685, 0.35808390378952026, -0.08255366235971451, -0.12319637835025787, 0.29435500502586365, 0.16608460247516632, -0.2732542157173157, 0.01878136396408081, 0.24818328022956848, -0.02324245125055313, 0.004486788064241409, 0.3230556547641754, 0.2597425580024719, 0.0982542484998703, 0.019802741706371307, 0.2869454324245453, 0.40449342131614685, 0.3397465944290161, 0.07884441316127777, 0.05423635616898537, -0.01663850247859955, 0.1060657799243927, 0.33592915534973145, 0.0919664055109024, 0.26338091492652893, 0.29186132550239563, -0.17947208881378174, 0.12178903818130493, -0.3634205162525177, -0.004329297691583633, 0.1766461282968521, -0.44620609283447266, -0.04573620483279228, -0.04772485792636871, 0.13238807022571564, -0.13097751140594482, 0.30219078063964844, 0.3944261372089386, -0.19773226976394653, -0.00237679248675704, -0.16872483491897583, 0.3026978075504303, -0.1444469690322876, 0.07845130562782288, 0.20241186022758484, -0.10280704498291016, -0.14739587903022766, 0.19588938355445862, -0.09345795214176178, -0.22271941602230072, 0.27597513794898987, 0.16069620847702026, -0.35266292095184326, -0.33465147018432617, -0.02942558377981186, 0.10439813882112503, 0.002384006977081299, -0.08483931422233582, 0.24861079454421997, -0.02692614495754242, -0.3579479157924652, -0.45955705642700195, 0.3827532231807709, 0.6738026142120361, 0.11452106386423111, -0.14151953160762787, -0.15063627064228058, -0.03065885603427887, -0.0017175786197185516, 0.03420235216617584, -0.18450666964054108, 0.093622125685215, 0.3656403422355652, 0.013789599761366844, 0.18957935273647308, -0.19294473528862, 0.05701213330030441, 0.053624801337718964, 0.04905318841338158, -0.18785825371742249, 0.03719320893287659, -0.16817620396614075, -0.08360789716243744, -0.18709251284599304, 0.019066371023654938, -0.39054885506629944, 0.20983737707138062, 0.23739072680473328, -0.062104105949401855, 0.007380526512861252, -0.09331033378839493, 0.07454056292772293, 0.06979648768901825, 0.4028739035129547, 0.4781927764415741, 0.36473390460014343, -0.10563730448484421, -0.19700276851654053, -0.3974084258079529, 0.3239695727825165, -0.259764701128006, 0.05266866087913513, -0.05108995735645294, 0.06346968561410904, -0.38162899017333984, 0.11807192862033844, -0.010061889886856079, 0.2854709029197693, 0.024210132658481598, -0.1259017139673233, -0.2945593297481537, -0.04546556994318962, -0.11611561477184296, -0.5573567152023315, 0.030097421258687973, -0.2000807523727417, 0.19614329934120178, -0.5701207518577576, 0.06190548092126846, -0.3724687099456787, -0.11389261484146118, 0.010833606123924255, -0.20236623287200928, 0.6049451231956482, 0.13033264875411987, 0.3980819582939148, -0.07766782492399216, -0.007558096200227737, -0.05876188352704048, -0.3113146126270294, -0.24675537645816803, 0.30112868547439575, -0.03756040707230568, 0.3532830774784088, -0.059053488075733185, -0.3366881012916565, -0.1205572560429573, 0.5563936233520508, 0.12197349965572357, 0.24427160620689392, 0.10884098708629608, -0.13180740177631378, -0.1850903332233429, 0.07662161439657211, -0.05951278656721115, 0.07839292287826538, -0.016870684921741486, 0.1417754590511322, -0.26723262667655945, -0.5470358729362488, 0.41250211000442505, -0.3120288848876953, -0.17622801661491394, -0.209161177277565, 0.11479232460260391, 0.0486837774515152, -0.45410075783729553, -0.3583792746067047, 0.11179334670305252, 0.08074461668729782, -0.07456128299236298, -0.31458207964897156, 0.34315675497055054, -0.15199293196201324, 0.14553073048591614, -0.11685505509376526, 0.31153368949890137, -0.05871760845184326, -0.2623729705810547, -0.05258650332689285, -0.23621730506420135 ]
https://github.com/huggingface/datasets/issues/6661
Import error on Google Colab
One possible cause might be the one pointed out by @mariosasko above, and you get the following warning on Colab: ``` WARNING: The following packages were previously imported in this runtime: [pyarrow] You must restart the runtime in order to use newly installed versions. ``` On the other hand, if the old version of `pyarrow` is not previously imported (before the installation of `datasets`), the reported issue here is not reproducible: `datasets` can be installed, imported and used on Colab.
### Describe the bug Cannot be imported on Google Colab, the import throws the following error: ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug 1. `! pip install -U datasets` 2. `import datasets` ### Expected behavior Should be possible to use the library ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0
80
Import error on Google Colab ### Describe the bug Cannot be imported on Google Colab, the import throws the following error: ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug 1. `! pip install -U datasets` 2. `import datasets` ### Expected behavior Should be possible to use the library ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0 One possible cause might be the one pointed out by @mariosasko above, and you get the following warning on Colab: ``` WARNING: The following packages were previously imported in this runtime: [pyarrow] You must restart the runtime in order to use newly installed versions. ``` On the other hand, if the old version of `pyarrow` is not previously imported (before the installation of `datasets`), the reported issue here is not reproducible: `datasets` can be installed, imported and used on Colab.
[ -0.35336968302726746, 0.0966772586107254, -0.01228055078536272, 0.18350905179977417, 0.10514076054096222, -0.2476670742034912, 0.37069839239120483, 0.121758833527565, -0.03707277774810791, 0.18580856919288635, -0.25596967339515686, 0.39653581380844116, -0.08848261088132858, 0.36171725392341614, 0.008005027659237385, -0.077785924077034, 0.10329471528530121, 0.2002134621143341, -0.1531866192817688, 0.011857964098453522, -0.055265527218580246, 0.3692748248577118, -0.22278818488121033, 0.03757699951529503, -0.2750703990459442, -0.15998230874538422, -0.1439260095357895, 0.1383296698331833, -0.26025038957595825, -0.4370633363723755, 0.5262797474861145, -0.07042898237705231, 0.05911482870578766, 0.5313464999198914, -0.00010997829667758197, -0.03874208405613899, 0.275968074798584, 0.1022840291261673, -0.07977184653282166, -0.26665979623794556, -0.05928543955087662, -0.22353971004486084, 0.2773039638996124, -0.09633184969425201, 0.08413837105035782, 0.03315100446343422, 0.07751630991697311, 0.39776140451431274, 0.21196870505809784, 0.3452591598033905, 0.2648616135120392, 0.30789047479629517, 0.37099969387054443, -0.10459188371896744, 0.536283016204834, -0.18652497231960297, -0.10648517310619354, 0.6225733757019043, 0.11108620464801788, 0.08175685256719589, 0.1587987244129181, -0.019412338733673096, -0.17257502675056458, -0.0356677770614624, 0.04104980453848839, 0.050419267266988754, -0.2858577370643616, -0.31803616881370544, 0.03488932549953461, 0.1979224681854248, 0.2594088315963745, -0.6007472276687622, -0.1565483957529068, -0.0665256679058075, 0.20875699818134308, -0.2762685716152191, 0.251426100730896, 0.13973768055438995, 0.08462610840797424, 0.2286733090877533, -0.053945522755384445, -0.18494194746017456, -0.20179852843284607, -0.0367496982216835, -0.30786776542663574, 0.3174927830696106, -0.1274145543575287, 0.0023579150438308716, 0.032024137675762177, -0.06291975826025009, 0.4094879627227783, -0.04341128468513489, -0.007383823394775391, -0.0595238097012043, -0.013570573180913925, 0.032501302659511566, 0.17541685700416565, 0.46456360816955566, -0.061082031577825546, -0.09186603128910065, -0.13783977925777435, -0.04458799213171005, -0.09791319817304611, 0.3712775409221649, -0.009478125721216202, 0.20142923295497894, -0.30092892050743103, 0.13923916220664978, 0.5932076573371887, 0.23290304839611053, -0.025843890383839607, -0.011713225394487381, 0.02407347410917282, -0.1683654487133026, -0.03146115690469742, -0.17088589072227478, 0.372603178024292, -0.1667056530714035, -0.42938312888145447, -0.060613177716732025, -0.18501630425453186, 0.09970100969076157, -0.07690411061048508, 0.32496094703674316, -0.2825319766998291, -0.049807727336883545, 0.015718355774879456, 0.009104186668992043, -0.24436518549919128, 0.14521820843219757, -0.20153513550758362, 0.30766788125038147, -0.13854394853115082, -0.0433100163936615, 0.12398461997509003, -0.3506666421890259, 0.19644467532634735, 0.09626834839582443, 0.2726905345916748, 0.19704996049404144, -0.23014134168624878, -0.23986749351024628, -0.1321822702884674, 0.46351251006126404, 0.14986293017864227, 0.026987316086888313, -0.10536617040634155, -0.4020059108734131, -0.24389523267745972, 0.17611552774906158, -0.3610517978668213, -0.05315017327666283, -0.23135821521282196, 0.1596752256155014, -0.3716334104537964, -0.0415680855512619, -0.43261370062828064, 0.06213662773370743, -0.05704639106988907, -0.40788161754608154, -0.035887591540813446, -0.3859568238258362, -0.05035910755395889, -0.42807143926620483, 0.02940070442855358, 0.2504558563232422, -0.38557669520378113, -0.025397203862667084, 0.09063133597373962, -0.01231871172785759, 0.15118375420570374, 0.2647153437137604, -0.04017607122659683, -0.03090532124042511, -0.06538542360067368, 0.11998715996742249, -0.09922543913125992, -0.17412275075912476, -0.689777672290802, -0.17584481835365295, 0.012778371572494507, 0.05207987129688263, 0.015298008918762207, -0.1378428190946579, 0.11826234310865402, 0.03234964236617088, 0.17473655939102173, 0.2100580632686615, -0.05985891819000244, 0.06083414703607559, -0.3209832012653351, -0.3702772557735443, 0.015796242281794548, 0.023777958005666733, 0.2854336202144623, -0.05494799464941025, 0.19564394652843475, -0.21918946504592896, 0.03739425167441368, -0.13842104375362396, -0.0447111502289772, 0.2632367014884949, 0.6229894161224365, -0.04167261719703674, -0.07478754967451096, -0.2853753864765167, -0.27612486481666565, 0.15034052729606628, -0.16768266260623932, 0.1805475354194641, -0.2968202233314514, -0.2892749309539795, -0.28895488381385803, 0.07483373582363129, 0.07247887551784515, -0.0446908064186573, 0.1107521504163742, -0.05873844027519226, 0.07518954575061798, 0.30027103424072266, 0.03258076682686806, 0.44101428985595703, 0.13263724744319916, 0.10471748560667038, -0.18034781515598297, 0.5151720643043518, -0.34824347496032715, -0.42011216282844543, 0.15957513451576233, 0.10994811356067657, -0.018249347805976868, -0.06128368154168129, -0.04430748522281647, 0.21107739210128784, -0.1259240359067917, 0.17304357886314392, -0.07314387708902359, 0.05185297131538391, 0.3746718466281891, -0.3791242241859436, 0.26944446563720703, -0.041256584227085114, 0.13471172749996185, 0.08174978941679001, 0.08949147909879684, 0.2983641028404236, -0.09030959010124207, -0.1128155067563057, 0.11606191098690033, -0.1148148626089096, 0.15631596744060516, 0.07353797554969788, 0.08974522352218628, 0.025062285363674164, -0.049863170832395554, 0.3670559823513031, 0.25330016016960144, 0.15552617609500885, -0.3277941644191742, 0.180673286318779, 0.6118988394737244, 0.1646157205104828, 0.13213476538658142, 0.15720580518245697, -0.2497197389602661, -0.023999424651265144, 0.4161652624607086, -0.13383619487285614, 0.35684144496917725, 0.28556957840919495, -0.019429843872785568, 0.2196139395236969, -0.144273042678833, -0.17071989178657532, 0.03591032326221466, 0.07946035265922546, 0.1498919576406479, -0.058655448257923126, 0.39769142866134644, 0.14728546142578125, -0.34113848209381104, -0.15692025423049927, -0.1944693922996521, 0.2623538374900818, -0.3008641302585602, 0.2769034206867218, -0.3287278115749359, -0.08187520503997803, -0.14607253670692444, -0.28342127799987793, -0.2897092401981354, -0.10505685210227966, -0.15257528424263, 0.4834144711494446, 0.08020368218421936, 0.0936741828918457, 0.4073552191257477, 0.17478419840335846, -0.09140471369028091, -0.170778289437294, -0.13828566670417786, -0.17069274187088013, -0.3643081486225128, 0.14219345152378082, 0.3062097728252411, 0.2653128206729889, 0.23346474766731262, -0.09414417296648026, 0.015357501804828644, 0.011749694123864174, -0.5860467553138733, 0.047808825969696045, -0.25830167531967163, 0.5086372494697571, 0.11738289892673492, -0.03958249092102051, -0.4291144013404846, -0.1916835904121399, 0.05544615909457207, -0.161122664809227, -0.16871951520442963, -0.0756310224533081, -0.32868385314941406, -0.24171431362628937, -0.16514180600643158, -0.16272979974746704, -0.43140825629234314, -0.27205461263656616, 0.36506468057632446, 0.1716146171092987, 0.09331721067428589, 0.27418333292007446, 0.25253698229789734, 0.12441600859165192, 0.15679408609867096, -0.005930215120315552, -0.06375986337661743, -0.18110106885433197, 0.32455289363861084, -0.20325349271297455, -0.355167418718338, 0.09172576665878296, -0.05320798605680466, 0.09100804477930069, 0.001782772596925497, -0.44610369205474854, -0.3262172341346741, -0.3242623805999756, 0.4999036192893982, 0.1797773689031601, 0.37854379415512085, 0.22374829649925232, 0.020598309114575386, -0.01530271302908659, -0.017165105789899826, -0.3625906705856323, -0.2850531041622162, 0.3467518985271454, 0.022917091846466064, 0.060775741934776306, 0.10841228067874908, -0.2510928809642792, 0.5281487703323364, 0.05697858706116676, -0.09233899414539337, 0.42155173420906067, -0.20479264855384827, 0.5857198238372803, -0.2210102081298828, -0.2836226522922516, 0.11205711215734482, -0.0662049949169159, -0.18820449709892273, 0.19049616158008575, -0.17821714282035828, -0.07080896198749542, -0.15411078929901123, -0.12192888557910919, -0.24288955330848694, -0.22069349884986877, -0.07090407609939575, 0.5090318918228149, 0.07850034534931183, 0.14261563122272491, -0.18586179614067078, -0.12187929451465607, -0.24156293272972107, -0.039093416184186935, 0.06963399797677994, -0.21928513050079346, -0.021787775680422783, 0.2612380385398865, -0.4197542071342468, -0.691909909248352, 0.171588733792305, 0.2124071568250656, -0.1615271270275116, 0.018641222268342972, -0.04524391517043114, 0.18440468609333038, -0.0806734710931778, 0.25161224603652954, 0.011166922748088837, -0.3123880624771118, 0.18957769870758057, 0.08723385632038116, -0.32662078738212585, -0.24185951054096222, -0.3058866262435913, 0.20431825518608093, 0.2938932478427887, -0.00891740620136261, -0.36852070689201355, 0.22573354840278625, 0.3920142650604248, 0.3043161630630493, -0.03339805826544762, 0.1655312329530716, -0.4656203091144562, -0.4846494793891907, -0.19515740871429443, 0.05601704865694046, 0.06885180622339249, 0.2745676338672638, -0.16458909213542938, -0.052886415272951126, 0.011086351238191128, -0.20220068097114563, 0.04561448469758034, 0.49407660961151123, 0.2690039277076721, 0.05961952358484268, 0.20122359693050385, -0.29539716243743896, -0.15780344605445862, 0.5053236484527588, 0.8600330352783203, -0.1178758442401886, -0.17426195740699768, 0.00886552594602108, 0.05161090940237045, 0.008282460272312164, 0.23416440188884735, -0.20588377118110657, -0.05653456598520279, -0.2311856746673584, 0.16794393956661224, 0.10550952702760696, 0.12699134647846222, 0.060666680335998535, 0.12396324425935745, -0.2545042932033539, -0.01692269928753376, 0.5545302033424377, 0.22691838443279266, -0.10874617099761963, 0.21172195672988892, 0.3611406683921814, -0.1573827713727951, 0.3171720504760742, -0.07044009119272232, 0.9188809990882874, -0.1912357360124588, 0.08012767136096954, 0.5340220332145691, -0.13526302576065063, 0.5138328075408936, 0.16603326797485352, 0.13604405522346497, -0.4008598327636719, -0.23435045778751373, 0.04546121507883072, -0.11790075898170471, 0.1612626612186432, -0.37751340866088867, -0.4220784306526184, 0.2518104612827301, 0.1374160349369049, 0.2596423923969269, 0.12303178757429123, -0.0038054771721363068, -0.038006141781806946, 0.07715484499931335, -0.39968544244766235, 0.16379883885383606, -0.016578853130340576, 0.15404413640499115, -0.28279533982276917, 0.06336729228496552, -0.3340286910533905, -0.20355777442455292, -0.3582361936569214, 0.10465466231107712, -0.2836756706237793, 0.10056934505701065, 0.22345811128616333, -0.3768395781517029, 0.13452091813087463, -0.07402005791664124, 0.14665746688842773, 0.20870262384414673, -0.2325233519077301, 0.13582199811935425, -0.029756687581539154, -0.1410893350839615, 0.018312130123376846, 0.11208631098270416, 0.18225130438804626, -0.1057356595993042, -0.1854269802570343, 0.15492789447307587, 0.15650403499603271, -0.10696368664503098, 0.10990533232688904, 0.24395734071731567, -0.017509303987026215, -0.14634880423545837, -0.02071942389011383, -0.1000877171754837, 0.30782559514045715, -0.23770500719547272, 0.1617717146873474, -0.012619651854038239, 0.2409028261899948, 0.43827229738235474, 0.06349168717861176, -0.2440773844718933, -0.31423482298851013, 0.3243413269519806, 0.1100177988409996, 0.1606702208518982, 0.11177527904510498, 0.1639360785484314, -0.26968276500701904, -0.0663658082485199, -0.12897321581840515, -0.1347539722919464, -0.2542685568332672, 0.17057034373283386, -0.07159033417701721, 0.042649105191230774, 0.02860439568758011, 0.3276948928833008, 0.23428353667259216, 0.13966593146324158, -0.0486178994178772, -0.2280123382806778, -0.14785616099834442, 0.2529830038547516, 0.13654519617557526, 0.04643681272864342, 0.36313164234161377, 0.2855137586593628, 0.02693931944668293, -0.16041794419288635, -0.3311769366264343, 0.24007071554660797, -0.1972731649875641, 0.025525633245706558, -0.0066400934010744095, 0.043904732912778854, 0.1934044361114502, -0.1620226949453354, 0.11649325489997864, 0.19786345958709717, -0.04206428676843643, -0.25887757539749146, -0.18859542906284332, 0.06023193150758743, 0.04683007299900055, -0.11476385593414307, -0.10906526446342468, 0.034165170043706894, 0.00571337528526783, -0.1608067899942398, 0.42138487100601196, 0.2900046110153198, -0.06827214360237122, -0.051469188183546066, 0.2138717919588089, 0.021207425743341446, 0.059519194066524506, 0.14701741933822632, -0.05392393469810486, 0.1851060688495636, 0.16770198941230774, 0.39113691449165344, 0.038115452975034714, 0.09121274948120117, 0.27671539783477783, -0.08547054976224899, -0.13828913867473602, -0.02680955082178116, 0.14106523990631104, -0.16498775780200958, -0.01789037324488163, 0.02250475436449051, 0.18209314346313477, 0.37245243787765503, -0.09222941100597382, -0.12955094873905182, 0.2778129577636719, 0.18280327320098877, -0.3693675994873047, -0.07073082774877548, 0.24199049174785614, 0.04755450785160065, 0.012428376823663712, 0.23316547274589539, 0.3289039731025696, 0.031656309962272644, 0.022797420620918274, 0.24568840861320496, 0.42911767959594727, 0.35545533895492554, 0.09604312479496002, 0.1078721210360527, 0.010955695062875748, 0.10905273258686066, 0.37258535623550415, 0.10957950353622437, 0.2387869656085968, 0.35498636960983276, -0.20537441968917847, 0.16283388435840607, -0.4025605320930481, -0.030220281332731247, 0.13628548383712769, -0.4314366281032562, -0.01609737053513527, -0.11477917432785034, 0.12793350219726562, -0.16190916299819946, 0.2510784864425659, 0.38276106119155884, -0.23107057809829712, -0.01100233756005764, -0.18117836117744446, 0.3665001690387726, -0.19253894686698914, 0.030818115919828415, 0.16378073394298553, -0.08800303936004639, -0.06544289737939835, 0.2474515438079834, -0.07505366206169128, -0.21778322756290436, 0.36662524938583374, 0.17927959561347961, -0.3229028582572937, -0.32986241579055786, 0.004655562341213226, 0.043190762400627136, 0.05869916453957558, 0.005435101687908173, 0.26465874910354614, 0.008760794997215271, -0.2897627651691437, -0.38077443838119507, 0.3991124629974365, 0.6889095902442932, 0.08938004076480865, -0.11643724143505096, -0.11096347123384476, -0.07495276629924774, -0.029315121471881866, -0.027664002031087875, -0.07272409647703171, 0.07665680348873138, 0.41025087237358093, 0.009545408189296722, 0.19119051098823547, -0.1859995424747467, 0.03430156409740448, -0.010237853974103928, 0.04381518065929413, -0.2259584665298462, 0.09644094109535217, -0.15760177373886108, -0.1319635510444641, -0.21735736727714539, -0.006869331002235413, -0.34012576937675476, 0.22461280226707458, 0.27436593174934387, -0.09513872116804123, -0.01807856746017933, -0.1857789009809494, 0.08885963261127472, 0.07434840500354767, 0.46249040961265564, 0.44513657689094543, 0.41993191838264465, -0.06611072272062302, -0.14486858248710632, -0.4617730677127838, 0.28954586386680603, -0.30279794335365295, 0.10540470480918884, -0.05051691085100174, 0.05961546301841736, -0.34205371141433716, 0.10922657698392868, 0.01832040399312973, 0.3034083843231201, -0.048027679324150085, -0.23581749200820923, -0.31000569462776184, -0.029885288327932358, -0.1425914317369461, -0.5381022095680237, 0.002018902450799942, -0.17843881249427795, 0.17607571184635162, -0.5273449420928955, 0.06763596087694168, -0.3388604521751404, -0.10024914145469666, -0.03481678292155266, -0.19968003034591675, 0.618157684803009, 0.1464640349149704, 0.4270517826080322, -0.05963819473981857, 0.025382695719599724, -0.07911700010299683, -0.32136934995651245, -0.2099475860595703, 0.28744834661483765, -0.021010439842939377, 0.2712424099445343, -0.07049829512834549, -0.31607815623283386, -0.08901342749595642, 0.5241265296936035, 0.1772058606147766, 0.25038012862205505, 0.09828277677297592, -0.1347981095314026, -0.21255594491958618, 0.0724262073636055, -0.08598136901855469, 0.09238424897193909, -0.030960790812969208, 0.08623027801513672, -0.23704007267951965, -0.5187475085258484, 0.4442864656448364, -0.3356090188026428, -0.15356171131134033, -0.2316005527973175, 0.08197036385536194, 0.05911656469106674, -0.42316120862960815, -0.35887381434440613, 0.11600307375192642, 0.12420569360256195, -0.08632708340883255, -0.35333919525146484, 0.32387831807136536, -0.1416129171848297, 0.08326065540313721, -0.12223002314567566, 0.3164536952972412, -0.0782693475484848, -0.32049816846847534, -0.03141532838344574, -0.23782682418823242 ]
https://github.com/huggingface/datasets/issues/6661
Import error on Google Colab
Google Colab now pre-installs PyArrow 14.0.2, making this issue unlikely to happen. So, I'm unpinning it.
### Describe the bug Cannot be imported on Google Colab, the import throws the following error: ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug 1. `! pip install -U datasets` 2. `import datasets` ### Expected behavior Should be possible to use the library ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0
16
Import error on Google Colab ### Describe the bug Cannot be imported on Google Colab, the import throws the following error: ValueError: pyarrow.lib.IpcWriteOptions size changed, may indicate binary incompatibility. Expected 88 from C header, got 72 from PyObject ### Steps to reproduce the bug 1. `! pip install -U datasets` 2. `import datasets` ### Expected behavior Should be possible to use the library ### Environment info - `datasets` version: 2.17.0 - Platform: Linux-6.1.58+-x86_64-with-glibc2.35 - Python version: 3.10.12 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.6.0 Google Colab now pre-installs PyArrow 14.0.2, making this issue unlikely to happen. So, I'm unpinning it.
[ -0.3349364399909973, 0.14176785945892334, -0.019081836566329002, 0.2358921468257904, 0.06487749516963959, -0.23882025480270386, 0.3130694329738617, 0.13885673880577087, -0.17129455506801605, 0.16541755199432373, -0.25119778513908386, 0.28138142824172974, -0.1457708179950714, 0.416282594203949, 0.037998396903276443, -0.12740278244018555, 0.09190117567777634, 0.17121747136116028, -0.0953698456287384, 0.08790703117847443, -0.10286085307598114, 0.45581963658332825, -0.2910502552986145, -0.02342398464679718, -0.194722980260849, -0.03334830701351166, -0.14340025186538696, 0.16205871105194092, -0.3249037563800812, -0.3856021761894226, 0.4483063220977783, -0.0963548868894577, 0.03423468768596649, 0.44972723722457886, -0.0001117942447308451, -0.07805560529232025, 0.28357744216918945, 0.08420340716838837, -0.0759257972240448, -0.1393301635980606, 0.015305429697036743, -0.14252720773220062, 0.20998118817806244, -0.08580376952886581, 0.1576719582080841, 0.004551813472062349, 0.08626731485128403, 0.5194755792617798, 0.15151572227478027, 0.38122695684432983, 0.23730820417404175, 0.15464258193969727, 0.44021517038345337, 0.0017860912485048175, 0.5536952614784241, -0.17317438125610352, -0.04192482307553291, 0.6575208306312561, 0.11559516936540604, -0.0018278192728757858, 0.045645248144865036, -0.04227713868021965, -0.20422126352787018, -0.12806133925914764, 0.03042348101735115, -0.03248826041817665, -0.24560290575027466, -0.29462552070617676, 0.07211884111166, 0.14151069521903992, 0.22267937660217285, -0.6170530319213867, -0.10245581716299057, -0.01894541084766388, 0.21995283663272858, -0.34048306941986084, 0.30773311853408813, 0.17898337543010712, 0.10641418397426605, 0.26296254992485046, -0.07316059619188309, -0.24091708660125732, -0.21354933083057404, -0.008375823497772217, -0.3460071086883545, 0.3446984589099884, -0.09787698090076447, -0.019503280520439148, 0.004614204168319702, -0.07731973379850388, 0.46335431933403015, 0.01496581919491291, -0.029218297451734543, -0.025614775717258453, 0.028518833220005035, 0.024404048919677734, 0.18123124539852142, 0.4899634122848511, -0.019443348050117493, -0.13122662901878357, -0.16675925254821777, -0.08474082499742508, -0.04420797526836395, 0.316333144903183, -0.05119859799742699, 0.1829955130815506, -0.2643716335296631, 0.19440479576587677, 0.5136273503303528, 0.2648085057735443, 0.06000516936182976, 0.05020727962255478, 0.022063519805669785, -0.20122802257537842, -0.014740806072950363, -0.18261852860450745, 0.3986113667488098, -0.14137433469295502, -0.41066423058509827, -0.04091550037264824, -0.29446104168891907, 0.11116408556699753, -0.167287215590477, 0.2100147306919098, -0.26126760244369507, -0.03955142945051193, 0.07713788002729416, -0.023314829915761948, -0.29015862941741943, 0.0896977037191391, -0.17648664116859436, 0.36167144775390625, -0.06515425443649292, -0.023565897718071938, 0.10533168911933899, -0.2165369689464569, 0.1660965532064438, 0.08672952651977539, 0.2751331329345703, 0.1191093921661377, -0.26075875759124756, -0.2302175611257553, -0.18944233655929565, 0.45637041330337524, 0.08505603671073914, -0.08475154638290405, -0.1800900548696518, -0.518840491771698, -0.21991655230522156, 0.27740219235420227, -0.3915030360221863, -0.07548680901527405, -0.2893781363964081, 0.147456094622612, -0.36200839281082153, 0.019464699551463127, -0.49043378233909607, 0.09842589497566223, 0.020781278610229492, -0.36782020330429077, 0.023702092468738556, -0.427077054977417, -0.08112019300460815, -0.4005686640739441, 0.015316957607865334, 0.2620527744293213, -0.4285663068294525, -0.02345234528183937, 0.09413650631904602, 0.039835285395383835, 0.24147433042526245, 0.2877948582172394, -0.046046510338783264, -0.06942958384752274, -0.07606296986341476, 0.08695089817047119, -0.10995987802743912, -0.09513600915670395, -0.7084793448448181, -0.16920796036720276, -0.02977358177304268, 0.035611145198345184, 0.02829258143901825, -0.2073269784450531, 0.07656097412109375, 0.03322890028357506, 0.25268352031707764, 0.21066761016845703, -0.13722026348114014, 0.11846929043531418, -0.394797146320343, -0.4000196158885956, -0.0138336680829525, 0.050144094973802567, 0.3142480254173279, -0.10229628533124924, 0.13430196046829224, -0.2708641290664673, 0.1425304263830185, -0.15118244290351868, -0.029319511726498604, 0.28155040740966797, 0.6296983957290649, -0.11154583096504211, -0.024812569841742516, -0.24552103877067566, -0.3191525340080261, 0.1036013588309288, -0.28605014085769653, 0.1404271125793457, -0.30251413583755493, -0.26545000076293945, -0.3269045352935791, 0.05308754742145538, 0.14726370573043823, -0.03727136179804802, 0.08923466503620148, -0.14592482149600983, -0.01990625634789467, 0.27794668078422546, 0.13251331448554993, 0.4168151617050171, 0.12012167274951935, 0.1133912205696106, -0.18364985287189484, 0.5235682725906372, -0.344085693359375, -0.480105459690094, 0.19923798739910126, 0.06651972234249115, -0.04922070354223251, -0.03909162059426308, -0.09912963211536407, 0.17700627446174622, -0.08922751992940903, 0.18611708283424377, -0.10061179846525192, 0.08720986545085907, 0.3650839030742645, -0.39388543367385864, 0.23540882766246796, -0.0358017235994339, 0.0739610493183136, 0.0640537366271019, 0.17209942638874054, 0.3007723093032837, -0.046501096338033676, -0.15246814489364624, 0.023268990218639374, -0.16552101075649261, 0.04189338535070419, 0.01974368467926979, 0.055047355592250824, 0.10243935883045197, -0.022519458085298538, 0.3751693665981293, 0.20853230357170105, 0.17248788475990295, -0.3064485788345337, 0.14696769416332245, 0.5737932920455933, 0.21207021176815033, 0.04588126391172409, 0.22787192463874817, -0.28759637475013733, -0.04739527404308319, 0.42247721552848816, -0.23584409058094025, 0.31427741050720215, 0.280704140663147, -0.08001230657100677, 0.23214367032051086, -0.03553912043571472, -0.1745922714471817, 0.018640272319316864, 0.08897978812456131, 0.19075462222099304, -0.10544645041227341, 0.44572585821151733, 0.14456291496753693, -0.3336116671562195, -0.11254008114337921, -0.17305782437324524, 0.2590538561344147, -0.31676462292671204, 0.27048856019973755, -0.2899947166442871, -0.11484293639659882, -0.16372215747833252, -0.2536930441856384, -0.2746920883655548, -0.0773998498916626, -0.1450754851102829, 0.5675926208496094, 0.052635397762060165, 0.04002939164638519, 0.46941953897476196, 0.1589173525571823, 0.004841247573494911, -0.23955877125263214, -0.07259757816791534, -0.09505758434534073, -0.3544768989086151, 0.14702987670898438, 0.3556181490421295, 0.19047540426254272, 0.2270193099975586, -0.15255752205848694, -0.0481659360229969, 0.07511648535728455, -0.6286724805831909, 0.0016114972531795502, -0.22313599288463593, 0.4669184982776642, 0.07031930983066559, -0.05693560838699341, -0.4775352478027344, -0.18402045965194702, -0.027414139360189438, -0.028533250093460083, -0.20191778242588043, -0.03693569451570511, -0.3153170347213745, -0.16020585596561432, -0.12375833094120026, -0.104559026658535, -0.37099984288215637, -0.24722784757614136, 0.3516206741333008, 0.18749341368675232, 0.1763302981853485, 0.25774696469306946, 0.29751574993133545, 0.07730607688426971, 0.17743144929409027, -0.16199623048305511, 0.034647416323423386, -0.10189732909202576, 0.31745240092277527, -0.1416347473859787, -0.26824456453323364, 0.017409678548574448, -0.06832305341959, -0.0016418695449829102, -0.00010705366730690002, -0.45647239685058594, -0.30029821395874023, -0.34723100066185, 0.5109597444534302, 0.05962791293859482, 0.2565380930900574, 0.2634812593460083, 0.060980603098869324, 0.03643401712179184, 0.04190289229154587, -0.35260164737701416, -0.3199829161167145, 0.4341614246368408, 0.06703344732522964, 0.07770545780658722, 0.06554114073514938, -0.22638151049613953, 0.5656605362892151, 0.04951576516032219, -0.04376986250281334, 0.324526846408844, -0.17998188734054565, 0.46326345205307007, -0.15572035312652588, -0.24410586059093475, 0.1816333383321762, -0.04072295129299164, -0.21302005648612976, 0.2545700669288635, -0.22324803471565247, -0.11066041141748428, -0.050295427441596985, -0.10729661583900452, -0.21238160133361816, -0.23121340572834015, 0.0380389578640461, 0.46422895789146423, 0.07001876831054688, 0.10634958744049072, -0.2999950647354126, -0.1631644368171692, -0.24067232012748718, -0.054886333644390106, -0.013515889644622803, -0.24710658192634583, 0.01399235986173153, 0.43819671869277954, -0.39099302887916565, -0.6594297885894775, 0.2045554518699646, 0.24392975866794586, -0.20069995522499084, 0.11756119132041931, -0.04265095666050911, 0.1815689504146576, -0.094429612159729, 0.2734556794166565, 0.10588598251342773, -0.3447709083557129, 0.20732630789279938, 0.20106449723243713, -0.22000446915626526, -0.2864292860031128, -0.2549366354942322, 0.24020712077617645, 0.3461949825286865, 0.02127758413553238, -0.33200135827064514, 0.28520485758781433, 0.4351799488067627, 0.3511611819267273, -0.04539918527007103, 0.15893492102622986, -0.4501277804374695, -0.5087267756462097, -0.13500720262527466, 0.11168485134840012, 0.18792837858200073, 0.3288264572620392, -0.20552369952201843, -0.0638091117143631, 0.10612035542726517, -0.26810696721076965, 0.015246748924255371, 0.3775326907634735, 0.25559931993484497, 0.017831463366746902, 0.13624702394008636, -0.3917936682701111, -0.2151106595993042, 0.5029952526092529, 0.7946653366088867, 0.04754245653748512, -0.16036346554756165, 0.0031230058521032333, 0.07901819795370102, -0.0009477436542510986, 0.21484658122062683, -0.1734735518693924, -0.08303599804639816, -0.23835021257400513, 0.2325274795293808, 0.10094673186540604, 0.14910680055618286, -0.00033590570092201233, 0.0406598299741745, -0.30079057812690735, 0.11775083839893341, 0.5643752813339233, 0.1992102563381195, -0.04762886464595795, 0.2267933189868927, 0.40867674350738525, -0.20137523114681244, 0.3485974669456482, -0.058174483478069305, 0.9348971247673035, -0.18523643910884857, 0.027712326496839523, 0.49728071689605713, -0.13548913598060608, 0.4088478088378906, 0.10310162603855133, 0.1884390115737915, -0.420378178358078, -0.234958678483963, 0.0437125638127327, -0.11624407768249512, 0.1879027932882309, -0.36919403076171875, -0.4126822054386139, 0.2467072755098343, 0.1445050984621048, 0.24703052639961243, 0.19083815813064575, -0.04592786356806755, 0.008628343231976032, 0.15922124683856964, -0.32349953055381775, 0.10754197835922241, -0.09464915096759796, 0.09699368476867676, -0.24398565292358398, 0.017229676246643066, -0.3184140920639038, -0.18580126762390137, -0.40738725662231445, 0.046099185943603516, -0.3831593692302704, 0.05443444848060608, 0.2584402561187744, -0.4255635738372803, 0.1500779241323471, -0.09534934163093567, 0.08380071073770523, 0.22629347443580627, -0.19580961763858795, 0.15651223063468933, -0.0019216015934944153, -0.13329917192459106, -0.0014975795056670904, 0.10747624188661575, 0.08831792324781418, -0.09430322051048279, -0.17103496193885803, 0.0922265276312828, 0.16145162284374237, -0.09634019434452057, 0.09120407700538635, 0.18790659308433533, 0.02791195549070835, -0.16209223866462708, 0.012295551598072052, -0.19602009654045105, 0.2879338264465332, -0.2183004766702652, 0.14102965593338013, -0.05615134537220001, 0.2747059464454651, 0.3959934413433075, 0.09994607418775558, -0.2585376799106598, -0.32245609164237976, 0.37472277879714966, 0.13037559390068054, 0.17952941358089447, 0.14742326736450195, 0.21497438848018646, -0.19675901532173157, -0.029534969478845596, -0.1352245807647705, -0.1636003851890564, -0.2598675489425659, 0.17803636193275452, -0.10342390835285187, 0.08727307617664337, -0.0038194668013602495, 0.28105905652046204, 0.1865573227405548, 0.15002188086509705, 0.008824046701192856, -0.14945384860038757, -0.1892578899860382, 0.2931138873100281, 0.11939290165901184, -0.01738307997584343, 0.42179450392723083, 0.3673480749130249, 0.034869901835918427, -0.08274823427200317, -0.3100011944770813, 0.2628730535507202, -0.17758411169052124, 0.07706600427627563, 0.017767805606126785, 0.016779303550720215, 0.08876505494117737, -0.0880393385887146, 0.11772459745407104, 0.22103041410446167, 0.019659176468849182, -0.25296419858932495, -0.1779678910970688, 0.05601993203163147, 0.0435740128159523, -0.07819172739982605, -0.04283817857503891, 0.09079401195049286, 0.026199065148830414, -0.11628394573926926, 0.41632696986198425, 0.2157638669013977, -0.028925776481628418, -0.05415887013077736, 0.16568623483181, -0.016736119985580444, 0.030154742300510406, 0.09902843832969666, -0.04658868908882141, 0.2134046107530594, 0.1476251780986786, 0.45564377307891846, 0.08389757573604584, 0.050203755497932434, 0.2485174685716629, -0.04956451803445816, -0.1595771759748459, -0.028011754155158997, 0.1042250245809555, -0.19795869290828705, -0.09329849481582642, -0.032365500926971436, 0.09544534981250763, 0.3677104413509369, -0.10930663347244263, -0.17929895222187042, 0.24717414379119873, 0.16768509149551392, -0.3184000551700592, -0.01686248742043972, 0.2401123195886612, 0.01505583431571722, 0.0023379288613796234, 0.24824297428131104, 0.2828325927257538, 0.049360811710357666, 0.059918440878391266, 0.28821802139282227, 0.3880102336406708, 0.3854517340660095, 0.015430410392582417, 0.09986269474029541, 0.024927612394094467, 0.07391452044248581, 0.38966241478919983, 0.10325513780117035, 0.26675137877464294, 0.2798071503639221, -0.16263175010681152, 0.09428755939006805, -0.42999958992004395, -0.024731580168008804, 0.09830598533153534, -0.46802541613578796, -0.07009363174438477, 0.006260186433792114, 0.11627212166786194, -0.12516099214553833, 0.3573565185070038, 0.39986681938171387, -0.06644026190042496, 0.0007551051676273346, -0.17404529452323914, 0.34640824794769287, -0.16727551817893982, 0.03899016231298447, 0.2001500427722931, -0.09112943708896637, -0.15060660243034363, 0.223768413066864, -0.12868227064609528, -0.20771200954914093, 0.4183775782585144, 0.14687660336494446, -0.38811779022216797, -0.34133511781692505, 0.005819519981741905, 0.04666684567928314, 0.055388193577528, -0.09190391004085541, 0.24759741127490997, -0.0007083937525749207, -0.35614293813705444, -0.44756078720092773, 0.3239416480064392, 0.6586790680885315, 0.029993224889039993, -0.13568559288978577, -0.18223713338375092, -0.04795052483677864, -0.034004438668489456, 0.017824698239564896, -0.18489108979701996, 0.08445964008569717, 0.4161456227302551, -0.029200442135334015, 0.17584434151649475, -0.1633106768131256, 0.06122652441263199, 0.06754042953252792, 0.009874824434518814, -0.20831981301307678, 0.04084828123450279, -0.14656606316566467, -0.18032699823379517, -0.22991561889648438, -0.042421482503414154, -0.2937983274459839, 0.22893118858337402, 0.22566290199756622, -0.058642368763685226, 0.002822181209921837, -0.10792405158281326, 0.07811971753835678, 0.08201737701892853, 0.4352138638496399, 0.5038101077079773, 0.35606226325035095, -0.0759611576795578, -0.18799938261508942, -0.31995612382888794, 0.356640100479126, -0.2846611738204956, 0.13940711319446564, -0.004667268134653568, 0.1271601766347885, -0.34233736991882324, 0.08789283037185669, -0.06590527296066284, 0.31145238876342773, -0.03354594483971596, -0.203456312417984, -0.2893770933151245, -0.0062698423862457275, -0.1500314623117447, -0.4957265853881836, 0.01452263817191124, -0.16551801562309265, 0.2894371449947357, -0.5301574468612671, 0.0733083188533783, -0.4219643473625183, -0.14455340802669525, 0.015446651726961136, -0.1551772952079773, 0.5614330768585205, 0.13353990018367767, 0.3352962136268616, -0.0906631126999855, 0.026609068736433983, -0.09864544868469238, -0.2454887181520462, -0.22962604463100433, 0.23960193991661072, -0.0626835972070694, 0.31694501638412476, -0.022496702149510384, -0.3194725215435028, -0.05550217255949974, 0.6007407903671265, 0.1197437047958374, 0.2387213259935379, 0.13205039501190186, -0.14317457377910614, -0.16451025009155273, 0.08090358227491379, -0.11713025718927383, 0.09139388054609299, -0.02834095060825348, 0.06729909032583237, -0.2955646812915802, -0.5880946516990662, 0.4007754921913147, -0.31398922204971313, -0.15196064114570618, -0.14796555042266846, 0.13193058967590332, 0.07653400301933289, -0.4500201940536499, -0.29568129777908325, 0.1482134461402893, 0.12628354132175446, -0.0568576455116272, -0.33939436078071594, 0.3786832094192505, -0.11897648870944977, 0.14035062491893768, -0.08391118049621582, 0.3743218779563904, -0.06124007701873779, -0.29403597116470337, -0.08598549664020538, -0.29340434074401855 ]
https://github.com/huggingface/datasets/issues/6657
Release not pushed to conda channel
I can't fix this issue because I do not appear as a team member of the huggingface datasets project: https://anaconda.org/huggingface/datasets @lhoestq could you please add `datasets` team members to the corresponding Anaconda project? Once this done, I could recreate and update the Anaconda token, as mentioned above it seems the current one has expired.
### Describe the bug The github actions step to publish the release 2.17.0 to conda channel has failed due to expired token. Can some one please update the anaconda token rerun the failed action? @albertvillanova ? ![image](https://github.com/huggingface/datasets/assets/7138162/1b56ad3d-7643-4778-9cce-4bf531717700) ### Steps to reproduce the bug Please see this actions [link](https://github.com/huggingface/datasets/actions/runs/7842473662) ### Expected behavior The action runs successfully and the latest release is pushed to HuggingFace conda channel ### Environment info Not applicable.
54
Release not pushed to conda channel ### Describe the bug The github actions step to publish the release 2.17.0 to conda channel has failed due to expired token. Can some one please update the anaconda token rerun the failed action? @albertvillanova ? ![image](https://github.com/huggingface/datasets/assets/7138162/1b56ad3d-7643-4778-9cce-4bf531717700) ### Steps to reproduce the bug Please see this actions [link](https://github.com/huggingface/datasets/actions/runs/7842473662) ### Expected behavior The action runs successfully and the latest release is pushed to HuggingFace conda channel ### Environment info Not applicable. I can't fix this issue because I do not appear as a team member of the huggingface datasets project: https://anaconda.org/huggingface/datasets @lhoestq could you please add `datasets` team members to the corresponding Anaconda project? Once this done, I could recreate and update the Anaconda token, as mentioned above it seems the current one has expired.
[ -0.045098014175891876, -0.3802452087402344, -0.09873974323272705, -0.1472320556640625, -0.08352836221456528, -0.18843039870262146, 0.00794103741645813, 0.14652153849601746, -0.29373839497566223, -0.14194141328334808, 0.05596907436847687, 0.0923614576458931, -0.10810251533985138, 0.5392319560050964, 0.014486069791018963, 0.15329182147979736, 0.40739354491233826, -0.03250741958618164, -0.042533114552497864, -0.11428771913051605, -0.02923765406012535, 0.2053973227739334, -0.20599530637264252, 0.039125509560108185, -0.25089603662490845, -0.18883223831653595, -0.1556251347064972, -0.11975846439599991, -0.21740290522575378, -0.06532859802246094, 0.3506230115890503, 0.04248356074094772, 0.17298279702663422, 0.3827114701271057, -0.00011798866034951061, -0.19744907319545746, 0.5790353417396545, -0.004355039447546005, -0.37758225202560425, -0.17660172283649445, -0.06787745654582977, -0.32263562083244324, -0.15402767062187195, 0.2680806517601013, -0.21479028463363647, -0.262487530708313, 0.14167740941047668, -0.034439802169799805, 0.618811845779419, 0.18673920631408691, 0.15621978044509888, 0.12867391109466553, 0.6213626265525818, -0.24193789064884186, -0.31363484263420105, 0.2990911602973938, -0.1348002701997757, -0.003212299197912216, 0.20441322028636932, 0.06290797144174576, 0.417667418718338, 0.2791757881641388, 0.1170460432767868, -0.4205229580402374, -0.04782278090715408, -0.1276935189962387, 0.05905035138130188, -0.36810311675071716, 0.1868610382080078, -0.212591290473938, 0.3673328757286072, -0.21197855472564697, -0.6090368628501892, -0.1686314344406128, 0.061713848263025284, -0.35441550612449646, 0.20936378836631775, 0.00966077484190464, -0.03970359265804291, 0.2538854777812958, -0.3097960352897644, -0.21883411705493927, -0.08923517167568207, 0.02529304474592209, -0.015587318688631058, 0.41149553656578064, -0.3449140787124634, 0.11792165786027908, -0.11614280939102173, -0.42114633321762085, -0.14404159784317017, 0.11453814059495926, -0.055669594556093216, 0.14355015754699707, -0.06356488168239594, -0.07601525634527206, -0.1482098400592804, -0.07391761988401413, 0.18079039454460144, 0.1980634182691574, -0.7582408785820007, -0.19845706224441528, -0.13065281510353088, -0.05570156127214432, 0.3416955769062042, 0.206102654337883, 0.43416285514831543, 0.5131725668907166, -0.04431528598070145, 0.36088553071022034, 0.18952342867851257, -0.11081822961568832, -0.07410847395658493, 0.024404242634773254, -0.1380590796470642, -0.0771537721157074, 0.3013869524002075, -0.32063454389572144, -0.24374297261238098, 0.09817853569984436, -0.009971555322408676, 0.03136307746171951, 0.07327914983034134, 0.2818218469619751, -0.10452450066804886, -0.13184446096420288, -0.0913565456867218, 0.1330971121788025, 0.15107890963554382, -0.1878349632024765, -0.21177934110164642, -0.3588099777698517, -0.02080048806965351, 0.011608833447098732, 0.033157240599393845, -0.1954011470079422, 0.3761313557624817, -0.083697609603405, 0.12143170833587646, -0.13169512152671814, -0.2490845024585724, 0.27949732542037964, -0.13493511080741882, 0.3606020510196686, -0.25338318943977356, 0.5122752785682678, 0.06441547721624374, -0.23235201835632324, -0.136671781539917, -0.046239376068115234, -0.140780508518219, -0.23460862040519714, -0.06598719209432602, 0.08007721602916718, -0.0014705192297697067, -0.012544743716716766, -0.12412150949239731, -0.0593673475086689, 0.04762663692235947, 0.36613866686820984, 0.11502072960138321, 0.15327784419059753, 0.034270692616701126, 0.08959852159023285, 0.3086865246295929, 0.34489959478378296, 0.15313944220542908, -0.3116586208343506, 0.24030694365501404, 0.03635998070240021, 0.08594582229852676, 0.16641372442245483, -0.0994439572095871, -0.20343470573425293, -0.07408646494150162, -0.29253101348876953, -0.013557247817516327, -0.6668571829795837, -0.41909337043762207, -0.17428109049797058, -0.28227901458740234, 0.01666991226375103, -0.30846866965293884, -0.06199541687965393, 0.49701523780822754, -0.2157631665468216, 0.30828845500946045, 0.05816761404275894, -0.005490360781550407, -0.13597439229488373, -0.22024565935134888, -0.2721429169178009, -0.06936062127351761, 0.05202728137373924, -0.1220553070306778, 0.34870317578315735, 0.1197797954082489, -0.034380145370960236, 0.1282365620136261, 0.33970677852630615, 0.2713925242424011, 0.19176924228668213, 0.41483867168426514, -0.03278292715549469, 0.024266261607408524, 0.02907678112387657, -0.24584835767745972, -0.01929302327334881, 0.3681265115737915, 0.10252354294061661, 0.05695725604891777, -0.10512752830982208, -0.5386220812797546, 0.14539501070976257, -0.07306502759456635, -0.4355821907520294, -0.00675438717007637, -0.0950377881526947, 0.09060442447662354, 0.349118709564209, -0.26223260164260864, 0.7122269868850708, -0.31149935722351074, 0.36545950174331665, -0.08030232787132263, -0.12955619394779205, -0.21129290759563446, -0.19218362867832184, 0.05730360746383667, 0.1289902925491333, 0.35530203580856323, -0.24824362993240356, 0.046812500804662704, 0.15516619384288788, -0.09677306562662125, 0.08483897149562836, 0.23504731059074402, -0.089747354388237, 0.2502756416797638, -0.10913807898759842, -0.15625056624412537, 0.10965034365653992, -0.2726127505302429, 0.17898443341255188, -0.09031986445188522, 0.3577607274055481, 0.08466917276382446, -0.06734646111726761, -0.1851368397474289, 0.44433650374412537, 0.4387638568878174, 0.16116639971733093, -0.18783076107501984, -0.11316180229187012, -0.1688409447669983, -0.21459032595157623, 0.08130651712417603, -0.34907153248786926, -0.20728464424610138, 0.42478328943252563, 0.303133100271225, 0.0621279738843441, -0.16623717546463013, 0.1452033817768097, -0.2634682059288025, 0.23569375276565552, 0.4318525195121765, 0.5912756323814392, -0.1518242508172989, 0.07817414402961731, -0.14681819081306458, -0.031403474509716034, 0.004719576332718134, -0.01765240915119648, 0.20787817239761353, -0.30764514207839966, -0.10033414512872696, -0.2502044141292572, 0.13230930268764496, 0.15538594126701355, 0.003652874380350113, 0.1289759874343872, 0.03717491775751114, 0.36623814702033997, -0.1096176877617836, -0.185629203915596, -0.2254733145236969, -0.30222102999687195, -0.17953921854496002, -0.11730503290891647, -0.4619072377681732, 0.01893923245370388, 0.059597380459308624, 0.0593249648809433, 0.09653374552726746, 0.32522720098495483, 0.04730316624045372, 0.06424543261528015, -0.07719521224498749, 0.10260214656591415, -0.06992043554782867, 0.25503063201904297, -0.15665525197982788, 0.045417118817567825, 0.08730333298444748, -0.10082225501537323, 0.02643199823796749, -0.15666314959526062, 0.0038398820906877518, -0.3664453327655792, -0.37917184829711914, 0.16887614130973816, -0.1008378118276596, 0.2527756690979004, -0.19955432415008545, 0.06182786449790001, -0.02123572863638401, -0.02917252853512764, 0.20453016459941864, -0.1781841516494751, -0.4252471923828125, -0.277975469827652, -0.012394433841109276, -0.06637295335531235, -0.28937897086143494, 0.06542861461639404, -0.07655908167362213, -0.08088093996047974, 0.6888942122459412, 0.023770436644554138, 0.04848053306341171, 0.28190863132476807, 0.12380583584308624, -0.0884256660938263, -0.2747022807598114, -0.22109195590019226, -0.2268107533454895, -0.3079397678375244, 0.21406100690364838, -0.016665278002619743, -0.1543852537870407, 0.2780113220214844, 0.32584524154663086, 0.16865171492099762, -0.18999169766902924, -0.3049020767211914, -0.1704355776309967, -0.03894517570734024, 0.03431155905127525, 0.3541184365749359, -0.13516955077648163, 0.5065771341323853, -0.1300160437822342, 0.0024169404059648514, -0.002230599522590637, -0.44101837277412415, 0.25992608070373535, 0.12202830612659454, 0.2095421552658081, -0.0026256944984197617, 0.26489633321762085, -0.1276056170463562, 0.49550747871398926, 0.48703861236572266, -0.2181418389081955, 0.2000732123851776, 0.18800218403339386, 0.28639551997184753, -0.006250254809856415, -0.45068326592445374, 0.18988913297653198, 0.22920620441436768, 0.11204765737056732, -0.03656376898288727, 0.33058246970176697, 0.12444061785936356, 0.05700312554836273, -0.3369404375553131, -0.4587472081184387, -0.17953363060951233, -0.37979578971862793, 0.20924964547157288, 0.09758418053388596, 0.11169631779193878, -0.17541685700416565, -0.0819399505853653, 0.06939971446990967, 0.0221467986702919, 0.36645179986953735, 0.22906440496444702, 0.11830689013004303, -0.3788678050041199, -0.12953898310661316, -0.4272087812423706, 0.2521827220916748, -0.16719140112400055, 0.5174421072006226, -0.062392592430114746, 0.01067434623837471, 0.10734330117702484, -0.025282684713602066, 0.6621167063713074, -0.04553437978029251, -0.015773288905620575, -0.07335015386343002, 0.04991272836923599, -0.1891624629497528, -0.0880449190735817, 0.2550640404224396, 0.31335118412971497, 0.48117735981941223, 0.6062228083610535, -0.18629229068756104, -0.3416450321674347, 0.06274864822626114, -0.21477724611759186, 0.045461904257535934, 0.20331214368343353, -0.18540014326572418, -0.3507857322692871, -0.2075914442539215, 0.21420598030090332, 0.1420796513557434, 0.07297351956367493, -0.12093238532543182, -0.26835334300994873, -0.14986923336982727, -0.018454432487487793, -0.23845376074314117, -0.03646522015333176, 0.2568371295928955, -0.09300075471401215, 0.4504270851612091, 0.33335500955581665, 0.22208477556705475, 0.1569775640964508, 0.18192431330680847, 0.12231609225273132, -0.39900413155555725, 0.059097759425640106, 0.054873060435056686, 0.059200841933488846, 0.40856119990348816, -0.021643348038196564, 0.21533313393592834, -0.13126681745052338, 0.2946292459964752, 0.13171401619911194, -0.3069332540035248, 0.28347325325012207, 0.372385174036026, -0.32893043756484985, -0.17343348264694214, -0.1356206238269806, 0.02687111496925354, -0.08088822662830353, 0.43293291330337524, 0.49707913398742676, -0.006871772930026054, -0.16918544471263885, -0.14476504921913147, 1.0259696245193481, -0.17093722522258759, -0.008974596858024597, -0.060270413756370544, -0.006374165415763855, 0.5984963774681091, -0.0441681370139122, 0.001425357535481453, -0.1554568111896515, 0.12286485731601715, 0.06951495260000229, 0.12327501177787781, 0.11687906086444855, -0.30064117908477783, -0.3267388641834259, 0.30612504482269287, -0.11260378360748291, 0.22631928324699402, 0.1831369400024414, 0.08424347639083862, -0.08748467266559601, -0.1470852494239807, -0.4335200786590576, 0.15832965075969696, 0.18505188822746277, 0.5305229425430298, -0.004950722213834524, -0.19895629584789276, -0.3228340446949005, -0.20592862367630005, -0.3476296663284302, 0.048307470977306366, 0.09544344246387482, -0.40061473846435547, 0.34167441725730896, 0.01854535937309265, 0.18457633256912231, 0.061389025300741196, 0.8942569494247437, 0.0378548689186573, -0.33099475502967834, 0.177968829870224, -0.18078529834747314, -0.13227184116840363, -0.22042778134346008, -0.14467066526412964, 0.06467345356941223, -0.16344857215881348, -0.2791330814361572, -0.11738509684801102, 0.00946549978107214, -0.29252830147743225, -0.06735847890377045, 0.20296572148799896, 0.029006516560912132, 0.08167209476232529, 0.31394556164741516, 0.2171807736158371, 0.08287826180458069, -0.22857920825481415, 0.139109268784523, -0.1099238395690918, -0.15195976197719574, -0.05376388877630234, 0.024782100692391396, -0.027377434074878693, -0.09057627618312836, 0.2366260588169098, -0.12954053282737732, -0.04210156947374344, 0.2652149796485901, -0.05048544332385063, 0.07430844008922577, -0.10070928931236267, -0.37436556816101074, -0.1536308079957962, -0.728753924369812, 0.11420613527297974, -0.36589837074279785, -0.09816138446331024, 0.075201615691185, 0.4082149863243103, 0.12210121005773544, -0.005097553133964539, -0.06994074583053589, -0.059067949652671814, -0.2256520539522171, 0.2208753228187561, -0.3660530149936676, -0.26140740513801575, -0.10977867990732193, 0.395552396774292, 0.1984073966741562, -0.045684054493904114, -0.25894492864608765, 0.191392719745636, -0.08842428773641586, 0.18614177405834198, 0.2785259485244751, -0.1235765591263771, 0.26751577854156494, -0.20352940261363983, -0.003007158637046814, 0.13796484470367432, 0.005090355407446623, -0.12516766786575317, -0.11494040489196777, 0.1408250331878662, -0.05012563616037369, -0.094123974442482, -0.19003726541996002, 0.02200433239340782, -0.22355186939239502, 0.06402112543582916, -0.197520449757576, -0.006064604967832565, 0.21946536004543304, -0.2786904573440552, 0.4816065728664398, 0.30042141675949097, -0.039481062442064285, 0.03528289496898651, 0.37143567204475403, 0.20324262976646423, -0.01043299026787281, 0.1580805778503418, -0.16234613955020905, 0.010677583515644073, -0.3011593520641327, 0.20013752579689026, 0.01184140145778656, 0.38653627038002014, 0.22662955522537231, -0.25291281938552856, -0.025368642061948776, 0.022090431302785873, 0.427310585975647, -0.03929075598716736, -0.0014651663368567824, -0.1188456118106842, 0.6327642798423767, 0.1846727579832077, -0.11392850428819656, -0.05346324294805527, 0.4692626893520355, 0.1493988186120987, -0.24202708899974823, 0.31625866889953613, 0.18438096344470978, -0.020145930349826813, 0.4272065758705139, 0.0815778449177742, 0.3380221128463745, -0.03052220121026039, 0.33238935470581055, -0.012076687067747116, 0.3316861689090729, 0.13304507732391357, 0.46178704500198364, 0.11381115019321442, 0.2663666307926178, 0.14705795049667358, -0.19425079226493835, -0.08243124932050705, 0.3522986173629761, 0.28277137875556946, 0.011710979044437408, -0.23971499502658844, 0.015695592388510704, -0.11408472061157227, 0.02167755365371704, 0.06524036824703217, -0.044537708163261414, 0.5823372602462769, -0.016239598393440247, -0.47248679399490356, -0.2332618087530136, 0.32171937823295593, -0.02862146496772766, -0.034374020993709564, 0.014180853962898254, -0.13972678780555725, -0.03318001702427864, -0.16660988330841064, -0.05772397294640541, -0.21885766088962555, 0.4628632068634033, -0.182888463139534, -0.14876888692378998, -0.5018380284309387, -0.3744693994522095, 0.33650752902030945, 0.4335569143295288, 0.050190772861242294, 0.43186426162719727, 0.03781810402870178, -0.3691025674343109, -0.0038235224783420563, 0.350151389837265, 0.3333641290664673, -0.021625801920890808, 0.2701939046382904, 0.4268241226673126, 0.23550699651241302, 0.030835850164294243, 0.034753650426864624, 0.35945209860801697, 0.13195519149303436, -0.3644557297229767, -0.2157863974571228, 0.1215285211801529, -0.07471675425767899, -0.13399027287960052, -0.11004532873630524, 0.33999282121658325, -0.15098805725574493, 0.21628496050834656, -0.4772500693798065, -0.001825183629989624, -0.48689016699790955, 0.23533135652542114, -0.1939011514186859, 0.30953943729400635, -0.049835365265607834, -0.28121957182884216, 0.1396302878856659, -0.18120905756950378, 0.05281592160463333, -0.2070421278476715, -0.007948029786348343, 0.37216800451278687, 0.23558664321899414, 0.14137734472751617, -0.5624370574951172, -0.31086334586143494, 0.2048717588186264, -0.1403420865535736, -0.060501523315906525, 0.1081240102648735, 0.16380372643470764, 0.0605761893093586, -0.1349555253982544, 0.21250005066394806, 0.05892089381814003, -0.10111255198717117, 0.07495041936635971, -0.18413814902305603, 0.2284948080778122, -0.043732307851314545, 0.10245928913354874, 0.12474937736988068, -0.06954167038202286, 0.26379773020744324, -0.15657484531402588, -0.11471308767795563, 0.2481244057416916, 0.25000083446502686, -0.14455556869506836, -0.48039838671684265, 0.17975544929504395, 0.005950269289314747, -0.2883903682231903, 0.10732264071702957, -0.465922087430954, -0.40268680453300476, -0.22617261111736298, -0.34350132942199707, 0.008981294929981232, -0.19627076387405396, 0.34222352504730225, -0.22873930633068085, 0.045272067189216614, -0.29340866208076477, 0.22995181381702423, 0.20413310825824738, -0.17447388172149658, -0.13894185423851013, 0.32765570282936096, -0.25945913791656494, -0.1798582375049591, -0.018472664058208466, 0.25612005591392517, 0.026370462030172348, 0.18723435699939728, -0.4575228691101074, -0.08592824637889862, 0.3147011399269104, -0.48999032378196716, -0.022532904520630836, 0.1158917099237442, 0.2605026960372925, 0.4050556421279907, -0.4256153404712677, -0.40956977009773254, 0.02487306296825409, 0.17825861275196075, 0.2795160412788391, -0.17350147664546967, 0.25655490159988403, -0.054007817059755325, -0.24521273374557495, -0.02844720147550106, 0.3546832203865051, 0.17652705311775208, -0.1301589161157608, 0.4658791124820709, 0.076229989528656 ]
https://github.com/huggingface/datasets/issues/6656
Error when loading a big local json file
I get similar when dealing with a large jsonl file (6k lines), > TypeError: Couldn't cast array of type timestamp[us] to null Yet when I split it into 1k lines, files, load_dataset works fine! https://github.com/huggingface/course/issues/692
### Describe the bug When trying to load big json files from a local directory, `load_dataset` throws the following error ``` Traceback (most recent call last): File "/miniconda3/envs/conda-env/lib/python3.10/site-packages/datasets/builder.py", line 1989, in _prepare_split_single writer.write_table(table) File "miniconda3/envs/conda-env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 573, in write_table pa_table = pa_table.combine_chunks() File "pyarrow/table.pxi", line 3638, in pyarrow.lib.Table.combine_chunks File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays ``` ### Steps to reproduce the bug 1. Download a big file, e.g. `https://dl.fbaipublicfiles.com/dpr/data/retriever/biencoder-nq-train.json.gz` 2. Load it like `data = load_dataset("json", data_files=["nq-train.json"], split="train")` ```python from datasets import load_dataset data = load_dataset("json", data_files=["nq-train.json"], split="train") ``` A similarly formatted but smaller file, e.g. e.g. `https://dl.fbaipublicfiles.com/dpr/data/retriever/biencoder-nq-dev.json.gz` is loaded without issues ```python from datasets import load_dataset data = load_dataset("json", data_files=["nq-dev.json"], split="train") ``` ### Expected behavior It should load normally ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0
35
Error when loading a big local json file ### Describe the bug When trying to load big json files from a local directory, `load_dataset` throws the following error ``` Traceback (most recent call last): File "/miniconda3/envs/conda-env/lib/python3.10/site-packages/datasets/builder.py", line 1989, in _prepare_split_single writer.write_table(table) File "miniconda3/envs/conda-env/lib/python3.10/site-packages/datasets/arrow_writer.py", line 573, in write_table pa_table = pa_table.combine_chunks() File "pyarrow/table.pxi", line 3638, in pyarrow.lib.Table.combine_chunks File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: offset overflow while concatenating arrays ``` ### Steps to reproduce the bug 1. Download a big file, e.g. `https://dl.fbaipublicfiles.com/dpr/data/retriever/biencoder-nq-train.json.gz` 2. Load it like `data = load_dataset("json", data_files=["nq-train.json"], split="train")` ```python from datasets import load_dataset data = load_dataset("json", data_files=["nq-train.json"], split="train") ``` A similarly formatted but smaller file, e.g. e.g. `https://dl.fbaipublicfiles.com/dpr/data/retriever/biencoder-nq-dev.json.gz` is loaded without issues ```python from datasets import load_dataset data = load_dataset("json", data_files=["nq-dev.json"], split="train") ``` ### Expected behavior It should load normally ### Environment info - `datasets` version: 2.16.1 - Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.31 - Python version: 3.10.13 - `huggingface_hub` version: 0.20.3 - PyArrow version: 15.0.0 - Pandas version: 2.2.0 - `fsspec` version: 2023.10.0 I get similar when dealing with a large jsonl file (6k lines), > TypeError: Couldn't cast array of type timestamp[us] to null Yet when I split it into 1k lines, files, load_dataset works fine! https://github.com/huggingface/course/issues/692
[ -0.36725160479545593, 0.2126547396183014, 0.029540881514549255, 0.5042908191680908, 0.17106693983078003, -0.00926315039396286, 0.2477896809577942, 0.49651312828063965, -0.20996254682540894, 0.18599705398082733, 0.1524522453546524, 0.30672019720077515, 0.06911347061395645, -0.08753183484077454, -0.12196289002895355, -0.09249047935009003, 0.0868443176150322, 0.09395112842321396, 0.14815405011177063, 0.02599908411502838, -0.24389968812465668, 0.006206264719367027, -0.10875463485717773, 0.0868702381849289, -0.05564732849597931, 0.09352237731218338, 0.023542867973446846, 0.38329192996025085, -0.08864659816026688, -0.44390711188316345, 0.20628118515014648, -0.3264177143573761, 0.17620410025119781, 0.3561992943286896, -0.00012098357547074556, 0.12521231174468994, 0.5842772126197815, -0.040239620953798294, -0.17865587770938873, -0.04970735311508179, -0.24377378821372986, -0.4590946435928345, 0.19337198138237, -0.2736124098300934, 0.27052003145217896, -0.6415287256240845, -0.17866064608097076, -0.14060121774673462, 0.3161773681640625, 0.18505112826824188, 0.1240929514169693, -0.04375553876161575, 0.26954540610313416, 0.027683446183800697, 0.3036401867866516, 0.12842263281345367, 0.05621393769979477, 0.32199326157569885, 0.20837795734405518, -0.048976510763168335, -0.37992119789123535, -0.26799920201301575, -0.15681633353233337, 0.04346200451254845, 0.22650796175003052, 0.012115949764847755, 0.06194000318646431, 0.09555289149284363, -0.11177291721105576, 0.09786517918109894, 0.5158562660217285, -0.325060099363327, -0.3219962418079376, -0.4853254556655884, -0.02776798978447914, -0.057041846215724945, 0.32628241181373596, 0.3767952024936676, -0.19593283534049988, 0.022234752774238586, -0.28777167201042175, 0.06402844935655594, -0.30081892013549805, 0.26791879534721375, -0.16331890225410461, -0.14546166360378265, 0.027567245066165924, 0.12976577877998352, 0.14474934339523315, -0.17012004554271698, 0.3006182909011841, -0.21638284623622894, -0.15327677130699158, 0.24056600034236908, -0.3416641056537628, 0.22679343819618225, 0.28403496742248535, -0.34068647027015686, 0.4301249384880066, 0.055311769247055054, 0.1289655864238739, -0.062183938920497894, 0.06635860353708267, 0.30671584606170654, 0.49459317326545715, 0.2946842908859253, -0.23226189613342285, -0.0479617565870285, 0.09150204062461853, 0.14185559749603271, 0.10396353900432587, 0.017515357583761215, -0.13214440643787384, -0.4007284343242645, 0.06340079009532928, -0.03229750692844391, 0.1338212490081787, -0.22458423674106598, -0.1472501903772354, 0.24469392001628876, -0.48446324467658997, 0.10528936237096786, 0.10600601881742477, -0.026986613869667053, 0.11526646465063095, 0.38915005326271057, -0.006803825497627258, 0.34712928533554077, -0.04495374113321304, -0.0983140766620636, -0.07343494147062302, -0.1819789856672287, 0.057119984179735184, -0.04218835383653641, 0.33214887976646423, -0.007271751761436462, 0.07947088032960892, 0.02650979533791542, 0.27278611063957214, -0.018621964380145073, -0.09182306379079819, -0.13503161072731018, 0.056861452758312225, 0.27933743596076965, 0.012628939002752304, 0.09278403222560883, 0.020055321976542473, -0.04032339155673981, -0.3457857668399811, 0.4638211727142334, -0.19658535718917847, -0.558163583278656, -0.27442458271980286, 0.137314572930336, -0.1726943999528885, 0.2172752022743225, -0.290803462266922, -0.12834876775741577, 0.2924059331417084, -0.12207725644111633, 0.0715213268995285, -0.14751438796520233, 0.010745074599981308, -0.16929149627685547, 0.17754584550857544, 0.40213286876678467, -0.6950849890708923, 0.2136024832725525, -0.03894142434000969, 0.09906606376171112, 0.17777329683303833, 0.5004149675369263, -0.4351594150066376, 0.2892765402793884, -0.2453375905752182, 0.19850383698940277, 0.22544026374816895, -0.35682570934295654, -0.4976980984210968, 0.498491495847702, -0.3276594281196594, 0.07268472760915756, 0.2045910358428955, -0.16494569182395935, -0.08835568279027939, 0.08293195813894272, 0.3643040359020233, 0.6683847308158875, -0.06973865628242493, 0.2572508454322815, -0.3143198788166046, -0.2975267469882965, -0.06621038168668747, 0.3517918586730957, -0.3538252115249634, -0.23140135407447815, 0.1230214387178421, -0.25256308913230896, 0.17899090051651, -0.014727111905813217, 0.19002225995063782, 0.5780919790267944, -0.01422007754445076, -0.23909775912761688, 0.06877675652503967, 0.11777692288160324, -0.3713959753513336, 0.061324164271354675, -0.21668103337287903, -0.24530503153800964, -0.4291314482688904, -0.018943069502711296, -0.11728421598672867, 0.24511317908763885, -0.20601557195186615, 0.3921245336532593, -0.0006655268371105194, -0.041720323264598846, 0.3585270345211029, 0.16407521069049835, 0.08816023170948029, 0.19843897223472595, -0.020982004702091217, -0.032880038022994995, -0.36327028274536133, 0.2349182814359665, -0.10293390601873398, -0.25224828720092773, 0.11224019527435303, 0.17436560988426208, 0.030006110668182373, -0.2546590268611908, -0.25528958439826965, 0.37356045842170715, -0.07774832844734192, 0.026843704283237457, -0.2769854962825775, -0.16020651161670685, 0.2091643363237381, -0.02161211147904396, 0.10553918033838272, -0.00889846682548523, -0.0300782211124897, -0.04826834797859192, -0.15827390551567078, 0.4984838366508484, -0.20754916965961456, 0.2480061948299408, -0.1380823850631714, -0.15488767623901367, 0.30220285058021545, -0.040956106036901474, 0.2929534316062927, -0.06522054225206375, 0.33022138476371765, 0.5169880986213684, 0.236988827586174, 0.11185786128044128, -0.14212557673454285, -0.016729779541492462, 0.49912428855895996, -0.18735955655574799, -0.19841665029525757, 0.24287351965904236, -0.2195541262626648, -0.07582662999629974, 0.201998770236969, 0.049451474100351334, 0.4526522159576416, 0.20189979672431946, -0.09320057928562164, -0.08805745840072632, 0.12970753014087677, -0.231888547539711, 0.0981370210647583, 0.10762618482112885, 0.29174140095710754, 0.5543547868728638, 0.4865497350692749, 0.04222969710826874, -0.2528163492679596, -0.18715785443782806, 0.19331608712673187, 0.23661692440509796, -0.3616568148136139, 0.22314561903476715, -0.23090094327926636, -0.19345226883888245, -0.36803221702575684, -0.2758483588695526, -0.23879539966583252, -0.3509702980518341, 0.013317631557583809, 0.16649426519870758, -0.37883299589157104, 0.06231636554002762, 0.13730378448963165, 0.26348796486854553, 0.2897036075592041, -0.5701999068260193, -0.20326082408428192, -0.1481631100177765, -0.30954042077064514, -0.1331970989704132, 0.5327707529067993, -0.21349892020225525, -0.19159084558486938, 0.1189332976937294, -0.03845267370343208, 0.19007407128810883, 0.009375244379043579, 0.035053424537181854, 0.13334214687347412, 0.25061526894569397, 0.05288208648562431, -0.08164189755916595, 0.012726511806249619, -0.38172101974487305, 0.24501226842403412, 0.20914889872074127, -0.3044440448284149, 0.4909537434577942, 0.011113088577985764, -0.012857894413173199, -0.21452970802783966, -0.06721311062574387, -0.05661684274673462, -0.5307101607322693, 0.4812253713607788, 0.03632703796029091, 0.09451131522655487, -0.16280381381511688, 0.22279411554336548, 0.07956092059612274, 0.07464611530303955, -0.12188988924026489, 0.03671001270413399, -0.22304074466228485, 0.34442898631095886, -0.22009778022766113, -0.3243222236633301, -0.27388671040534973, 0.028373442590236664, -0.07253837585449219, 0.07928792387247086, -0.563633143901825, 0.16110572218894958, -0.19885686039924622, 0.41249755024909973, -0.3527321219444275, -0.07533930987119675, 0.08755071461200714, 0.04058166220784187, 0.004048535600304604, 0.0009511038661003113, 0.03137519583106041, 0.06750837713479996, 0.12717518210411072, 0.1342262625694275, -0.08810308575630188, 0.4260316491127014, -0.12285751104354858, 0.30267661809921265, 0.11626479029655457, -0.11661957204341888, 0.20496000349521637, 0.1274069994688034, 0.11562278866767883, -0.24931031465530396, 0.018338220193982124, 0.02869606576859951, 0.07899939268827438, -0.1993017941713333, -0.05893076956272125, 0.05348461493849754, -0.14844220876693726, -0.07959827780723572, -0.19325925409793854, -0.2842042148113251, -0.20070411264896393, 0.1894780695438385, -0.12326990067958832, -0.04947894066572189, -0.05422259122133255, -0.19968339800834656, -0.02804511785507202, -0.09016625583171844, -0.06694955378770828, -0.023242168128490448, 0.0977020189166069, -0.026032673195004463, -0.21351847052574158, -0.1725112646818161, -0.24970778822898865, 0.21449366211891174, 0.14569193124771118, 0.39430105686187744, 0.22632594406604767, -0.1289478987455368, 0.13230359554290771, -0.3372085988521576, 0.865848958492279, 0.09373366087675095, 0.10127705335617065, 0.20386596024036407, 0.3504786491394043, -0.6605269312858582, -0.13728733360767365, -0.025556912645697594, 0.33694931864738464, 0.18740162253379822, 0.3620762526988983, -0.14544840157032013, 0.04082564264535904, 0.07717034220695496, 0.3536645472049713, -0.11919388175010681, -0.38056328892707825, -0.29423388838768005, -0.12891924381256104, -0.1932285875082016, 0.0013968795537948608, -0.04628410190343857, 0.5844175219535828, 0.07863166928291321, -0.1334838569164276, 0.142234206199646, 0.08122780919075012, -0.4371910095214844, -0.03800215944647789, 0.31362709403038025, -0.3366645872592926, 0.2092142403125763, 0.006495490670204163, 0.21491438150405884, 0.6446453928947449, 0.5794607996940613, 0.3242062032222748, -0.31268593668937683, 0.04371558874845505, -0.054105330258607864, 0.22596041858196259, 0.07733546197414398, 0.007342099212110043, -0.12284905463457108, 0.0841342955827713, 0.12204206734895706, -0.10041161626577377, -0.20104622840881348, 0.014938770793378353, -0.2529112994670868, 0.02145969122648239, -0.05211993306875229, 0.5015060305595398, 0.018585938960313797, 0.1377904713153839, 0.32915595173835754, -0.2365812510251999, -0.05069325119256973, 0.29118937253952026, -0.03985083848237991, 0.6221142411231995, -0.16187642514705658, 0.16579869389533997, 0.30491623282432556, -0.3420770764350891, 0.3460184335708618, -0.45723581314086914, 0.22491826117038727, -0.340520977973938, 0.22946684062480927, 0.10695025324821472, -0.3878090977668762, -0.12692224979400635, 0.24001242220401764, 0.06432454288005829, -0.09105134010314941, -0.22195282578468323, -0.0013374760746955872, -0.21180416643619537, 0.11884517967700958, 0.01907794363796711, -0.19116641581058502, -0.5049874186515808, -0.03584354743361473, -0.05603008717298508, -0.14462104439735413, -0.005616238806396723, -0.14671066403388977, -0.2380092591047287, -0.2472166270017624, -0.2905920743942261, 0.3061164319515228, -0.032294340431690216, 0.17165352404117584, 0.30853381752967834, -0.43850094079971313, 0.16326142847537994, 0.0005424916744232178, -0.31490403413772583, 0.007576685398817062, -0.15196210145950317, -0.1288742870092392, 0.018016934394836426, -0.0051072328351438046, 0.08721080422401428, 0.037609782069921494, 0.1705714762210846, 0.04320546239614487, -0.15350019931793213, 0.0537138506770134, -0.2354586273431778, -0.1584145724773407, 0.1233198344707489, 0.32870447635650635, -0.027450963854789734, -0.26083797216415405, -0.07801893353462219, -0.2908046841621399, 0.23377692699432373, 0.005852852016687393, 0.03779587522149086, -0.018864914774894714, -0.14486342668533325, -0.14977169036865234, -0.22750093042850494, -0.41258615255355835, 0.005657484754920006, 0.5887496471405029, 0.13078811764717102, -0.07677700370550156, 0.41864389181137085, 0.27258381247520447, 0.01824873313307762, -0.05308111011981964, 0.22111111879348755, 0.3978794813156128, -0.5163158178329468, 0.035595715045928955, -0.22756923735141754, 0.16703228652477264, 0.04616425558924675, -0.0894336998462677, 0.17269904911518097, 0.004587143659591675, 0.12128205597400665, -0.4823341369628906, -0.3465074598789215, 0.175739586353302, -0.05298155918717384, -0.16350862383842468, 0.3402147591114044, 0.014679708518087864, -0.031705453991889954, -0.027216078713536263, -0.15711569786071777, 0.11335842311382294, -0.1747884750366211, 0.004948345944285393, -0.2863937020301819, 0.02365100383758545, 0.12138766050338745, -0.10393339395523071, 0.00314377062022686, 0.14859041571617126, 0.011439591646194458, -0.15722450613975525, -0.04960573837161064, 0.1404980719089508, 0.13324271142482758, -0.1672954559326172, -0.21371926367282867, -0.2739504277706146, -0.019005976617336273, 0.027974508702754974, 0.1086796373128891, -0.16876885294914246, -0.035995595157146454, -0.03544391319155693, 0.23837314546108246, -0.09337597340345383, -0.22681155800819397, 0.1924695372581482, -0.10970723628997803, 0.33518457412719727, 0.018139410763978958, 0.5322986245155334, -0.032572902739048004, -0.008001759648323059, -0.3720165193080902, 0.08424709737300873, -0.048746928572654724, 0.25174573063850403, 0.2835444211959839, -0.5042810440063477, -0.1401515007019043, 0.03281080350279808, 0.29030317068099976, 0.5191254615783691, -0.3118811547756195, -0.1774379312992096, 0.19137048721313477, 0.058147042989730835, -0.005428202450275421, -0.3944306969642639, 0.1313050091266632, -0.08269532769918442, -0.2184278666973114, 0.08562890440225601, 0.17369557917118073, -0.5921217203140259, -0.09691382944583893, 0.0968368723988533, 0.4159812033176422, 0.3678562641143799, -0.14065417647361755, 0.7142900228500366, 0.0035380423069000244, -0.04451689496636391, 0.20551352202892303, 0.20456717908382416, 0.5711724758148193, 0.572283148765564, -0.00042851269245147705, -0.1095665842294693, 0.08621300756931305, -0.005431223660707474, -0.30001145601272583, -0.554654598236084, -0.01515708863735199, 0.3891131579875946, 0.16510166227817535, 0.09922253340482712, 0.23883986473083496, 0.4411022663116455, 0.1628454476594925, 0.06431373208761215, 0.028780745342373848, -0.004974324256181717, -0.12476112693548203, 0.14042812585830688, -0.32421568036079407, -0.16833937168121338, -0.02708468586206436, 0.15613222122192383, -0.08310072124004364, 0.11805439740419388, 0.48536521196365356, 0.16279500722885132, -0.15829777717590332, -0.3497958481311798, 0.562014102935791, 0.18163174390792847, -0.0014753490686416626, -0.48724856972694397, 0.38693928718566895, 0.3276992440223694, -0.18125799298286438, 0.06028170883655548, 0.10370519012212753, 0.6170678734779358, 0.44820699095726013, -0.08566771447658539, -0.12396504729986191, -0.1634831428527832, -0.014329918660223484, -0.25722450017929077, 0.1601681262254715, 0.15923616290092468, 0.07284393161535263, 0.3148796558380127, 0.05805405229330063, -0.019633028656244278, 0.24944348633289337, 0.33427879214286804, 0.08294467628002167, -0.06984426081180573, -0.08401306718587875, -0.11988900601863861, -0.38656723499298096, -0.007610589265823364, -0.06451848894357681, -0.1306256204843521, -0.03294134512543678, 0.2989773452281952, 0.24487349390983582, 0.0988675206899643, 0.058203455060720444, 0.021808914840221405, -0.18105165660381317, 0.7266967296600342, 0.6556151509284973, 0.11629558354616165, -0.19400836527347565, -0.2587449550628662, -0.2630125880241394, 0.4540084898471832, -0.39956969022750854, 0.17079319059848785, 0.385925829410553, 0.34073901176452637, -0.09432853013277054, 0.15729427337646484, -0.11200977861881256, 0.362716943025589, -0.46250274777412415, 0.2270524501800537, -0.4551643133163452, -0.37295714020729065, 0.31322115659713745, -0.19722558557987213, -0.12392643839120865, -0.40778470039367676, 0.29154515266418457, -0.2059696465730667, 0.02023141086101532, -0.03272966668009758, 0.02223414182662964, -0.021975399926304817, 0.17649714648723602, 0.481381893157959, 0.3221551179885864, 0.038139116019010544, 0.0012896358966827393, -0.1442209929227829, -0.25303447246551514, -0.18102268874645233, -0.30846866965293884, 0.4147832989692688, -0.1688900738954544, 0.16731294989585876, -0.3421745002269745, -0.051044609397649765, -0.22468684613704681, -0.01769319362938404, -0.2560497522354126, -0.041565585881471634, -0.00899649690836668, -0.06981749832630157, -0.20054742693901062, 0.025890318676829338, 0.09776963293552399, -0.04318936914205551, 0.13703936338424683, 0.2597538232803345, -0.3135032057762146, -0.11107078939676285, 0.07222481817007065, -0.20050913095474243, -0.13567379117012024, 0.2731229066848755, 0.07316344976425171, -0.0813070610165596, -0.19340676069259644, -0.30141201615333557, 0.2146109938621521, 0.49007534980773926, 0.11187326163053513, -0.22546158730983734, 0.10942718386650085, -0.10376054048538208, -0.13250143826007843, -0.11744210124015808, 0.10130584239959717, 0.14453715085983276, -0.3831602931022644, 0.010885138064622879, -0.23337452113628387 ]
https://github.com/huggingface/datasets/issues/6655
Cannot load the dataset go_emotions
Thanks for reporting, @arame. I guess you have an old version of `transformers` (that submodule is present in `transformers` since version 3.0.1, since nearly 4 years ago). If you update it, the error should disappear: ```shell pip install -U transformers ``` On the other hand, I am wondering: does it make sense to use `transformers` in this case, even if we don't need it to load the `go_emotions` dataset (already converted to Parquet files)? - Maybe @mariosasko can give some insight, as he included these code lines: - #6454 https://github.com/huggingface/datasets/blob/9751fb14594d354e952f0ebdfaf31cb203b011e7/src/datasets/utils/_dill.py#L60-L63
### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&line=1) go_emotions = load_dataset("go_emotions") [2](vscode-notebook-cell:?execution_count=6&line=2) data = go_emotions.data File [c:\Users\hijik\anaconda3\Lib\site-packages\datasets\load.py:2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs) [2518](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2518) verification_mode = VerificationMode( [2519](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2519) (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS [2520](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2520) ) [2522](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2522) # Create a dataset builder -> [2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523) builder_instance = load_dataset_builder( [2524](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2524) path=path, [2525](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2525) name=name, [2526](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2526) data_dir=data_dir, [2527](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2527) data_files=data_files, [2528](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2528) cache_dir=cache_dir, [2529](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2529) features=features, [2530](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2530) download_config=download_config, [2531](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2531) download_mode=download_mode, [2532](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2532) revision=revision, [2533](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2533) token=token, [2534](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2534) storage_options=storage_options, [2535](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2535) trust_remote_code=trust_remote_code, [2536](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2536) _require_default_config_name=name is None, ... ---> [63](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:63) if issubclass(obj_type, transformers.PreTrainedTokenizerBase): [64](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:64) pklregister(obj_type)(_save_transformersPreTrainedTokenizerBase) [66](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:66) # Unwrap `torch.compile`-ed functions AttributeError: module 'transformers' has no attribute 'PreTrainedTokenizerBase' Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?10bc0728-6947-456e-9a3e-f056872b04c6) or open in a [text editor](command:workbench.action.openLargeOutput?10bc0728-6947-456e-9a3e-f056872b04c6). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)... ### Steps to reproduce the bug ``` from datasets import load_dataset go_emotions = load_dataset("go_emotions") ``` ### Expected behavior Should simply load the variable with the data from the file ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.16.1 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.4 - `huggingface_hub` version: 0.20.3 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
90
Cannot load the dataset go_emotions ### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&line=1) go_emotions = load_dataset("go_emotions") [2](vscode-notebook-cell:?execution_count=6&line=2) data = go_emotions.data File [c:\Users\hijik\anaconda3\Lib\site-packages\datasets\load.py:2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs) [2518](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2518) verification_mode = VerificationMode( [2519](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2519) (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS [2520](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2520) ) [2522](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2522) # Create a dataset builder -> [2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523) builder_instance = load_dataset_builder( [2524](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2524) path=path, [2525](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2525) name=name, [2526](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2526) data_dir=data_dir, [2527](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2527) data_files=data_files, [2528](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2528) cache_dir=cache_dir, [2529](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2529) features=features, [2530](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2530) download_config=download_config, [2531](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2531) download_mode=download_mode, [2532](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2532) revision=revision, [2533](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2533) token=token, [2534](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2534) storage_options=storage_options, [2535](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2535) trust_remote_code=trust_remote_code, [2536](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2536) _require_default_config_name=name is None, ... ---> [63](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:63) if issubclass(obj_type, transformers.PreTrainedTokenizerBase): [64](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:64) pklregister(obj_type)(_save_transformersPreTrainedTokenizerBase) [66](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:66) # Unwrap `torch.compile`-ed functions AttributeError: module 'transformers' has no attribute 'PreTrainedTokenizerBase' Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?10bc0728-6947-456e-9a3e-f056872b04c6) or open in a [text editor](command:workbench.action.openLargeOutput?10bc0728-6947-456e-9a3e-f056872b04c6). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)... ### Steps to reproduce the bug ``` from datasets import load_dataset go_emotions = load_dataset("go_emotions") ``` ### Expected behavior Should simply load the variable with the data from the file ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.16.1 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.4 - `huggingface_hub` version: 0.20.3 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0 Thanks for reporting, @arame. I guess you have an old version of `transformers` (that submodule is present in `transformers` since version 3.0.1, since nearly 4 years ago). If you update it, the error should disappear: ```shell pip install -U transformers ``` On the other hand, I am wondering: does it make sense to use `transformers` in this case, even if we don't need it to load the `go_emotions` dataset (already converted to Parquet files)? - Maybe @mariosasko can give some insight, as he included these code lines: - #6454 https://github.com/huggingface/datasets/blob/9751fb14594d354e952f0ebdfaf31cb203b011e7/src/datasets/utils/_dill.py#L60-L63
[ -0.4397527873516083, -0.06399113684892654, -0.07161179184913635, 0.5826753377914429, 0.6256293654441833, 0.07131221145391464, 0.06615027040243149, 0.13112905621528625, 0.05428558215498924, 0.03706338256597519, -0.1652708351612091, 0.14455163478851318, -0.08863478899002075, 0.18902641534805298, 0.0047144340351223946, -0.24216148257255554, -0.2684483826160431, 0.399101585149765, 0.20813032984733582, 0.15451101958751678, -0.30821165442466736, 0.1393652856349945, -0.3345146179199219, 0.17376095056533813, -0.04480435699224472, -0.333909809589386, 0.11562690138816833, 0.26559191942214966, -0.08010837435722351, -0.6466490030288696, 0.2600073218345642, -0.15562890470027924, 0.3555251359939575, 0.5283472537994385, -0.0001106037525460124, 0.07421648502349854, 0.4536481499671936, -0.018296251073479652, -0.4489193856716156, -0.21763284504413605, -0.25908327102661133, -0.13189800083637238, -0.0775567889213562, -0.04730560630559921, -0.1624513864517212, -0.49877795577049255, -0.21037191152572632, -0.6319648027420044, 0.1510661244392395, 0.5190802216529846, 0.22588706016540527, 0.1050674170255661, 0.06848497688770294, -0.13558189570903778, 0.26765573024749756, 0.11047188937664032, -0.06414376199245453, 0.11890040338039398, 0.22246868908405304, -0.18872323632240295, 0.2325308918952942, 0.10070839524269104, 0.09430710226297379, 0.15677684545516968, 0.3357968330383301, 0.006197670474648476, 0.40585315227508545, -0.08024571090936661, 0.22801345586776733, 0.1931697428226471, 0.6910155415534973, 0.09076434373855591, -0.4217729866504669, -0.042424365878105164, 0.125554621219635, -0.27721673250198364, 0.276551216840744, 0.035128843039274216, -0.22516809403896332, -0.03270350769162178, -0.1869422197341919, -0.1403498500585556, -0.2569015622138977, 0.21168924868106842, -0.11688809841871262, -0.24285930395126343, -0.21003594994544983, 0.10965273529291153, 0.2853080630302429, 0.02182287722826004, 0.17346276342868805, 0.16399267315864563, -0.4163037836551666, 0.3127909302711487, -0.3350009322166443, 0.13182617723941803, -0.20413556694984436, -0.03307196497917175, 0.08708346635103226, 0.04647504538297653, 0.031267937272787094, -0.12289094179868698, 0.021820031106472015, 0.16154327988624573, 0.24118298292160034, 0.3192739188671112, 0.21053221821784973, 0.10463149845600128, 0.08517411351203918, 0.022738315165042877, -0.18559889495372772, -0.17778390645980835, -0.2836458086967468, -0.10531534254550934, 0.2906724512577057, -0.07810256630182266, 0.11399932205677032, -0.2562594413757324, -0.5179859399795532, 0.11287634074687958, -0.28162291646003723, -0.036958981305360794, 0.21590879559516907, 0.6174511313438416, 0.10805796086788177, 0.08845426142215729, 0.21872718632221222, 0.1198735386133194, -0.08702973276376724, -0.18589480221271515, -0.27906477451324463, 0.13903672993183136, -0.17490054666996002, -0.11855063587427139, 0.18957239389419556, -0.18975403904914856, 0.34199652075767517, -0.19100017845630646, -0.0827641636133194, -0.2138439416885376, 0.3162747919559479, -0.24622654914855957, -0.04653414338827133, 0.24626702070236206, -0.15853102505207062, -0.05776987969875336, 0.1569301337003708, -0.39295488595962524, 0.06132339686155319, 0.09381735324859619, -0.1261746883392334, -0.3397950828075409, -0.06521747261285782, 0.22542428970336914, -0.1719667762517929, -0.10121747851371765, -0.3907018303871155, -0.0812833160161972, 0.15439406037330627, -0.16643883287906647, -0.12247908860445023, -0.2960051894187927, 0.009048212319612503, -0.2065829336643219, 0.4852399528026581, 0.5193719267845154, -0.2621736526489258, -0.30833643674850464, -0.2195662409067154, -0.08773639798164368, -0.05993626266717911, 0.040987689048051834, -0.46983397006988525, 0.3272416889667511, -0.3650483787059784, -0.1915591061115265, 0.46961137652397156, -0.43522313237190247, -0.30466899275779724, 0.22673794627189636, -0.1328669786453247, 0.04458224028348923, -0.10778560489416122, 0.04584355652332306, 0.10297565907239914, 0.12813040614128113, 0.16053807735443115, 0.46058738231658936, 0.058994077146053314, -0.01474249828606844, -0.1156819611787796, -0.14632432162761688, 0.339478075504303, 0.20120885968208313, -0.02106122300028801, 0.028421111404895782, 0.29710087180137634, -0.03878052905201912, 0.07431375980377197, -0.0071036554872989655, -0.18453067541122437, 0.012506237253546715, 0.1508089303970337, 0.05953936651349068, 0.0794680044054985, -0.19171380996704102, -0.24358707666397095, 0.18130305409431458, 0.014477990567684174, -0.2341403067111969, 0.02897060662508011, 0.023044146597385406, -0.5283482670783997, 0.024146871641278267, -0.3464431166648865, -0.2545599043369293, 0.08996358513832092, 0.377180278301239, 0.02669757977128029, 0.007516484707593918, -0.30776217579841614, 0.6079838871955872, -0.13013902306556702, -0.039613813161849976, -0.03859506919980049, 0.23077510297298431, -0.01101982407271862, -0.16297310590744019, 0.019709698855876923, 0.2607417702674866, 0.14300240576267242, -0.2011110484600067, -0.1531473994255066, 0.5061609148979187, -0.02501966990530491, 0.09404030442237854, 0.16219118237495422, -0.2915613651275635, 0.02201201766729355, -0.16883628070354462, 0.06594007462263107, 0.03378816694021225, 0.2603028118610382, 0.07612987607717514, 0.1146717518568039, 0.1935313493013382, 0.10091716796159744, 0.22794383764266968, 0.053473666310310364, 0.18939915299415588, 0.29875510931015015, 0.0227615125477314, -0.06665099412202835, -0.08246255666017532, 0.2429976761341095, -0.007517857477068901, 0.4389483630657196, -0.1387156993150711, -0.21776382625102997, -0.05847065895795822, 0.2495730221271515, 0.11857214570045471, 0.06822448968887329, -0.10537951439619064, -0.311926931142807, 0.1657208502292633, -0.09030617028474808, 0.1456936001777649, 0.6451862454414368, 0.194353386759758, -0.37989574670791626, -0.1036364957690239, 0.009723840281367302, 0.038366880267858505, 0.3107738792896271, 0.15210238099098206, 0.6034831404685974, 0.18058159947395325, 0.02251479960978031, 0.14001384377479553, -0.3064092695713043, -0.24060305953025818, 0.2263323962688446, 0.5370239615440369, -0.5126972198486328, 0.21018218994140625, -0.08934241533279419, -0.1535012125968933, 0.04053330048918724, -0.09637434035539627, -0.18500585854053497, -0.14753088355064392, -0.18226836621761322, 0.012410998344421387, 0.1741802990436554, 0.11573173850774765, -0.39329782128334045, 0.28759199380874634, 0.10169738531112671, 0.04831630736589432, -0.24758484959602356, -0.018236735835671425, -0.14497101306915283, 0.07611063122749329, 0.19218215346336365, -0.01925777457654476, 0.40590405464172363, -0.12148118019104004, 0.036609575152397156, 0.06838532537221909, -0.05625990778207779, 0.032395295798778534, -0.08898626267910004, 0.5337874293327332, 0.025816738605499268, 0.2986016869544983, 0.21388362348079681, -0.04859675467014313, 0.4103662669658661, -0.1959453970193863, -0.28375163674354553, 0.22189581394195557, 0.09199053794145584, -0.15899409353733063, 0.059227172285318375, -0.5100253820419312, -0.3641575574874878, -0.4799742102622986, 0.07707693427801132, -0.07429256290197372, 0.1420985460281372, 0.4682738482952118, 0.18191483616828918, 0.29959049820899963, -0.08914466947317123, 0.09397244453430176, -0.18905100226402283, -0.16305828094482422, 0.06759421527385712, -0.27891072630882263, -0.24963898956775665, 0.1020582914352417, 0.1311127096414566, 0.3703189790248871, 0.04817910119891167, -0.3811292052268982, 0.041972532868385315, -0.21474558115005493, 0.04429155960679054, -0.5274266600608826, -0.00198369100689888, 0.27386152744293213, 0.02523638680577278, -0.10780201107263565, 0.08759880810976028, -0.13708804547786713, 0.13079360127449036, -0.10495968908071518, 0.18779858946800232, 0.007410280406475067, 0.12608446180820465, -0.09435491263866425, 0.3064136207103729, 0.19270068407058716, -0.18346861004829407, 0.3289410173892975, -0.06353913992643356, 0.26612937450408936, -0.12081625312566757, -0.6607629060745239, 0.11438003927469254, -0.00863569974899292, 0.08794650435447693, -0.010605528950691223, -0.13124936819076538, -0.013714198023080826, -0.24059508740901947, -0.2727923095226288, -0.09641123563051224, -0.04320376366376877, 0.06582523137331009, -0.2969970107078552, 0.11886127293109894, -0.17971481382846832, 0.19152384996414185, -0.009621084667742252, 0.09533216059207916, 0.07548905909061432, 0.262894868850708, 0.14577126502990723, 0.07093426585197449, -0.3617313802242279, -0.042226389050483704, 0.1370488405227661, 0.3300974369049072, -0.0032665973994880915, 0.4891047179698944, 0.009748037904500961, 0.18494710326194763, 0.04660177230834961, -0.12851926684379578, 0.5859230756759644, -0.21266485750675201, 0.35258913040161133, 0.33818426728248596, 0.2880720794200897, -0.27588599920272827, 0.031634215265512466, -0.08150075376033783, 0.43282461166381836, -0.015159927308559418, 0.36504262685775757, 0.07152987271547318, -0.24635536968708038, 0.17698679864406586, 0.1996430605649948, -0.2530452311038971, -0.2113819122314453, -0.17153576016426086, -0.22062978148460388, -0.3542931377887726, 0.10818330198526382, -0.034437425434589386, 0.4344746768474579, -0.012453950010240078, -0.08796685934066772, -0.4342901110649109, -0.19077306985855103, 0.07191653549671173, 0.11572317779064178, 0.29515767097473145, 0.004936073441058397, 0.30878308415412903, 0.375965416431427, 0.023347485810518265, 0.15152817964553833, 0.5988423824310303, 0.1250535100698471, -0.6206970810890198, -0.07927233725786209, -0.129106804728508, 0.5378156304359436, 0.07513467222452164, -0.30636632442474365, -0.16844937205314636, -0.09788093715906143, -0.08400419354438782, -0.10837467014789581, 0.027507351711392403, 0.32401537895202637, 0.07923583686351776, -0.186491459608078, -0.48404139280319214, 0.23687055706977844, -0.15111011266708374, -0.017810828983783722, 0.15956351161003113, 0.4911623001098633, -0.19557024538516998, 0.22057966887950897, 0.11180099844932556, 0.7553495764732361, 0.19761742651462555, 0.03969847038388252, 0.2952796220779419, 0.16112448275089264, -0.07552812993526459, -0.14939086139202118, 0.1080431342124939, -0.3295922577381134, -0.32027098536491394, -0.06876753270626068, -0.3301829695701599, 0.3876402974128723, 0.08959130942821503, -0.09687380492687225, -0.021014433354139328, -0.01441463828086853, 0.001297149807214737, 0.2541862428188324, 0.21493229269981384, 0.09952130913734436, -0.13182184100151062, -0.1527717560529709, 0.16308742761611938, -0.3259114623069763, 0.20598703622817993, 0.028951216489076614, -0.003557051531970501, -0.07612480968236923, -0.10738011449575424, -0.22824043035507202, 0.20229989290237427, -0.6868702173233032, 0.0723312571644783, -0.11227288842201233, -0.19073298573493958, 0.2850729525089264, 0.3430377244949341, 0.2909253239631653, 0.13164690136909485, -0.14575350284576416, 0.21582365036010742, 0.08159103989601135, -0.2175918072462082, 0.0747108981013298, -0.05680094659328461, 0.3346737027168274, -0.04671238735318184, -0.38352450728416443, 0.48226067423820496, -0.11024913191795349, -0.2466370016336441, 0.20069372653961182, -0.06610220670700073, -0.08255772292613983, -0.31853926181793213, -0.09229731559753418, -0.02105364203453064, 0.14708206057548523, -0.12965518236160278, 0.14247411489486694, 0.2922906279563904, -0.1950228214263916, -0.0034235194325447083, 0.01745479553937912, -0.2582153081893921, 0.03250812739133835, 0.22247713804244995, -0.1066552922129631, 0.0027430690824985504, 0.5560396909713745, 0.007311929017305374, -0.07638661563396454, -0.3158021569252014, 0.17691171169281006, 0.13832318782806396, -0.5095139741897583, 0.05485078692436218, 0.16647517681121826, -0.17790481448173523, -0.025581300258636475, 0.4421418607234955, 0.017734378576278687, -0.22724926471710205, 0.035870809108018875, -0.6369439959526062, -0.3334208130836487, 0.12812891602516174, 0.022642062976956367, -0.001961126923561096, -0.006580088287591934, -0.0810127854347229, -0.21348224580287933, 0.20946712791919708, -0.3169683814048767, -0.027914537116885185, 0.009261095896363258, 0.014092301949858665, 0.1409546583890915, -0.22244492173194885, 0.38597121834754944, -0.21960166096687317, 0.1709579974412918, 0.039824895560741425, 0.04437723755836487, -0.24607956409454346, -0.1012236475944519, 0.14818093180656433, -0.04169514775276184, -0.038373082876205444, -0.10893858969211578, -0.2657155990600586, -0.05425006523728371, -0.1723552793264389, 0.07521246373653412, 0.04520239681005478, -0.12551601231098175, 0.2833082675933838, 0.03931402787566185, 0.10704492032527924, -0.09352420270442963, 0.360638290643692, -0.0952652096748352, 0.15198759734630585, 0.03879587724804878, 0.07057406008243561, -0.10658419877290726, -0.20088887214660645, -0.325538694858551, 0.016384895890951157, -0.25104111433029175, 0.30962133407592773, 0.24696746468544006, -0.4206361770629883, 0.08008784055709839, -0.09705661982297897, -0.0673409178853035, 0.24710437655448914, -0.26445242762565613, 0.2445635348558426, -0.021232616156339645, 0.19136853516101837, -0.37274569272994995, -0.10600628703832626, -0.1993282288312912, -0.11877947300672531, 0.05636386200785637, 0.37374937534332275, -0.031228801235556602, -0.07933826744556427, -0.1581609547138214, -0.06844176352024078, 0.5060697197914124, -0.019507888704538345, 0.017463846132159233, 0.15453273057937622, -0.17257963120937347, -0.1536426693201065, 0.09334207326173782, 0.42327794432640076, 0.1152476891875267, 0.269716739654541, -0.5678473114967346, -0.23181010782718658, 0.27843374013900757, 0.11143892258405685, -0.3035880923271179, -0.21615543961524963, 0.14215725660324097, 0.0628841370344162, -0.035100057721138, 0.05407802760601044, -0.018824882805347443, 0.40681859850883484, -0.08544638007879257, -0.02949981763958931, -0.13689999282360077, -0.14452537894248962, -0.21516460180282593, 0.1661476045846939, -0.3085136115550995, -0.2695310711860657, -0.47974514961242676, -0.06550708413124084, -0.1537787765264511, -0.32755184173583984, 0.17083615064620972, 0.10886228084564209, -0.28721940517425537, -0.33956125378608704, 0.37582868337631226, 0.3521571159362793, 0.01267194002866745, -0.34628888964653015, 0.4838087558746338, 0.2542344927787781, 0.15041346848011017, 0.39246439933776855, 0.4023367762565613, 0.35744431614875793, 0.34091272950172424, -0.15778854489326477, 0.20465731620788574, 0.052415136247873306, -0.2728022634983063, -0.03513225167989731, 0.15572412312030792, -0.14291298389434814, 0.037399500608444214, 0.20290818810462952, 0.20947718620300293, -0.11334437131881714, 0.09773275256156921, 0.016990959644317627, 0.3066137731075287, -0.31195008754730225, 0.5624394416809082, -0.08001703768968582, -0.04511728137731552, -0.2309151291847229, 0.033127740025520325, -0.34612882137298584, -0.02949913591146469, 0.12218931317329407, 0.0015561396721750498, 0.13306692242622375, -0.12717485427856445, 0.07706247270107269, -0.01811164990067482, 0.29168298840522766, 0.415905237197876, 0.33263707160949707, -0.4432153105735779, 0.09962207078933716, -0.7385666370391846, 0.19566947221755981, 0.07800674438476562, -0.33580705523490906, 0.171550452709198, 0.12619899213314056, 0.09814121574163437, 0.1277821958065033, 0.40985268354415894, 0.1869882345199585, 0.3383786380290985, 0.11439850181341171, -0.3232928514480591, -0.3539623022079468, 0.3181748390197754, 0.3774873912334442, -0.0705467015504837, -0.28412312269210815, 0.16311095654964447, 0.11230367422103882, 0.0581808015704155, -0.035395003855228424, -0.0705888494849205, 0.039601732045412064, -0.3177497982978821, 0.4908187687397003, -0.1943577378988266, 0.32011958956718445, -0.08927959203720093, -0.06974577903747559, -0.15863841772079468, -0.12350192666053772, -0.2217208296060562, 0.24103450775146484, 0.3984376788139343, 0.36611995100975037, -0.23480458557605743, -0.10787245631217957, -0.3772940933704376, -0.10373369604349136, -0.16979584097862244, 0.10012686252593994, -0.329321950674057, 0.14291556179523468, 0.0018421709537506104, 0.010885144583880901, -0.15931375324726105, 0.0026384256780147552, -0.11198186874389648, 0.1473568230867386, -0.4175291657447815, -0.25438573956489563, 0.4914582669734955, -0.20825734734535217, -0.03881244361400604, 0.3382033407688141, 0.19438526034355164, 0.3494149148464203, 0.026793576776981354, -0.4537043273448944, 0.052789561450481415, 0.553665041923523, 0.04880108684301376, -0.15713317692279816, -0.0030294768512248993, -0.10989280045032501, -0.018498778343200684, -0.025383900851011276, 0.4734540283679962, -0.07353968918323517, 0.10507281124591827, 0.08971582353115082, -0.010379347950220108 ]
https://github.com/huggingface/datasets/issues/6655
Cannot load the dataset go_emotions
The linked code lazily registers a custom reducer for `transformers.PreTrainedTokenizerBase` only if `transformers` have already been imported (imports are expensive, so we check `sys.modules`). However, the logic does not account for `transformers<3`, so we should add a version check to fix that.
### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&line=1) go_emotions = load_dataset("go_emotions") [2](vscode-notebook-cell:?execution_count=6&line=2) data = go_emotions.data File [c:\Users\hijik\anaconda3\Lib\site-packages\datasets\load.py:2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs) [2518](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2518) verification_mode = VerificationMode( [2519](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2519) (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS [2520](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2520) ) [2522](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2522) # Create a dataset builder -> [2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523) builder_instance = load_dataset_builder( [2524](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2524) path=path, [2525](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2525) name=name, [2526](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2526) data_dir=data_dir, [2527](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2527) data_files=data_files, [2528](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2528) cache_dir=cache_dir, [2529](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2529) features=features, [2530](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2530) download_config=download_config, [2531](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2531) download_mode=download_mode, [2532](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2532) revision=revision, [2533](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2533) token=token, [2534](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2534) storage_options=storage_options, [2535](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2535) trust_remote_code=trust_remote_code, [2536](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2536) _require_default_config_name=name is None, ... ---> [63](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:63) if issubclass(obj_type, transformers.PreTrainedTokenizerBase): [64](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:64) pklregister(obj_type)(_save_transformersPreTrainedTokenizerBase) [66](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:66) # Unwrap `torch.compile`-ed functions AttributeError: module 'transformers' has no attribute 'PreTrainedTokenizerBase' Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?10bc0728-6947-456e-9a3e-f056872b04c6) or open in a [text editor](command:workbench.action.openLargeOutput?10bc0728-6947-456e-9a3e-f056872b04c6). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)... ### Steps to reproduce the bug ``` from datasets import load_dataset go_emotions = load_dataset("go_emotions") ``` ### Expected behavior Should simply load the variable with the data from the file ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.16.1 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.4 - `huggingface_hub` version: 0.20.3 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
42
Cannot load the dataset go_emotions ### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&line=1) go_emotions = load_dataset("go_emotions") [2](vscode-notebook-cell:?execution_count=6&line=2) data = go_emotions.data File [c:\Users\hijik\anaconda3\Lib\site-packages\datasets\load.py:2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs) [2518](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2518) verification_mode = VerificationMode( [2519](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2519) (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS [2520](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2520) ) [2522](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2522) # Create a dataset builder -> [2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523) builder_instance = load_dataset_builder( [2524](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2524) path=path, [2525](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2525) name=name, [2526](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2526) data_dir=data_dir, [2527](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2527) data_files=data_files, [2528](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2528) cache_dir=cache_dir, [2529](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2529) features=features, [2530](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2530) download_config=download_config, [2531](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2531) download_mode=download_mode, [2532](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2532) revision=revision, [2533](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2533) token=token, [2534](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2534) storage_options=storage_options, [2535](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2535) trust_remote_code=trust_remote_code, [2536](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2536) _require_default_config_name=name is None, ... ---> [63](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:63) if issubclass(obj_type, transformers.PreTrainedTokenizerBase): [64](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:64) pklregister(obj_type)(_save_transformersPreTrainedTokenizerBase) [66](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:66) # Unwrap `torch.compile`-ed functions AttributeError: module 'transformers' has no attribute 'PreTrainedTokenizerBase' Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?10bc0728-6947-456e-9a3e-f056872b04c6) or open in a [text editor](command:workbench.action.openLargeOutput?10bc0728-6947-456e-9a3e-f056872b04c6). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)... ### Steps to reproduce the bug ``` from datasets import load_dataset go_emotions = load_dataset("go_emotions") ``` ### Expected behavior Should simply load the variable with the data from the file ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.16.1 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.4 - `huggingface_hub` version: 0.20.3 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0 The linked code lazily registers a custom reducer for `transformers.PreTrainedTokenizerBase` only if `transformers` have already been imported (imports are expensive, so we check `sys.modules`). However, the logic does not account for `transformers<3`, so we should add a version check to fix that.
[ -0.4397527873516083, -0.06399113684892654, -0.07161179184913635, 0.5826753377914429, 0.6256293654441833, 0.07131221145391464, 0.06615027040243149, 0.13112905621528625, 0.05428558215498924, 0.03706338256597519, -0.1652708351612091, 0.14455163478851318, -0.08863478899002075, 0.18902641534805298, 0.0047144340351223946, -0.24216148257255554, -0.2684483826160431, 0.399101585149765, 0.20813032984733582, 0.15451101958751678, -0.30821165442466736, 0.1393652856349945, -0.3345146179199219, 0.17376095056533813, -0.04480435699224472, -0.333909809589386, 0.11562690138816833, 0.26559191942214966, -0.08010837435722351, -0.6466490030288696, 0.2600073218345642, -0.15562890470027924, 0.3555251359939575, 0.5283472537994385, -0.0001106037525460124, 0.07421648502349854, 0.4536481499671936, -0.018296251073479652, -0.4489193856716156, -0.21763284504413605, -0.25908327102661133, -0.13189800083637238, -0.0775567889213562, -0.04730560630559921, -0.1624513864517212, -0.49877795577049255, -0.21037191152572632, -0.6319648027420044, 0.1510661244392395, 0.5190802216529846, 0.22588706016540527, 0.1050674170255661, 0.06848497688770294, -0.13558189570903778, 0.26765573024749756, 0.11047188937664032, -0.06414376199245453, 0.11890040338039398, 0.22246868908405304, -0.18872323632240295, 0.2325308918952942, 0.10070839524269104, 0.09430710226297379, 0.15677684545516968, 0.3357968330383301, 0.006197670474648476, 0.40585315227508545, -0.08024571090936661, 0.22801345586776733, 0.1931697428226471, 0.6910155415534973, 0.09076434373855591, -0.4217729866504669, -0.042424365878105164, 0.125554621219635, -0.27721673250198364, 0.276551216840744, 0.035128843039274216, -0.22516809403896332, -0.03270350769162178, -0.1869422197341919, -0.1403498500585556, -0.2569015622138977, 0.21168924868106842, -0.11688809841871262, -0.24285930395126343, -0.21003594994544983, 0.10965273529291153, 0.2853080630302429, 0.02182287722826004, 0.17346276342868805, 0.16399267315864563, -0.4163037836551666, 0.3127909302711487, -0.3350009322166443, 0.13182617723941803, -0.20413556694984436, -0.03307196497917175, 0.08708346635103226, 0.04647504538297653, 0.031267937272787094, -0.12289094179868698, 0.021820031106472015, 0.16154327988624573, 0.24118298292160034, 0.3192739188671112, 0.21053221821784973, 0.10463149845600128, 0.08517411351203918, 0.022738315165042877, -0.18559889495372772, -0.17778390645980835, -0.2836458086967468, -0.10531534254550934, 0.2906724512577057, -0.07810256630182266, 0.11399932205677032, -0.2562594413757324, -0.5179859399795532, 0.11287634074687958, -0.28162291646003723, -0.036958981305360794, 0.21590879559516907, 0.6174511313438416, 0.10805796086788177, 0.08845426142215729, 0.21872718632221222, 0.1198735386133194, -0.08702973276376724, -0.18589480221271515, -0.27906477451324463, 0.13903672993183136, -0.17490054666996002, -0.11855063587427139, 0.18957239389419556, -0.18975403904914856, 0.34199652075767517, -0.19100017845630646, -0.0827641636133194, -0.2138439416885376, 0.3162747919559479, -0.24622654914855957, -0.04653414338827133, 0.24626702070236206, -0.15853102505207062, -0.05776987969875336, 0.1569301337003708, -0.39295488595962524, 0.06132339686155319, 0.09381735324859619, -0.1261746883392334, -0.3397950828075409, -0.06521747261285782, 0.22542428970336914, -0.1719667762517929, -0.10121747851371765, -0.3907018303871155, -0.0812833160161972, 0.15439406037330627, -0.16643883287906647, -0.12247908860445023, -0.2960051894187927, 0.009048212319612503, -0.2065829336643219, 0.4852399528026581, 0.5193719267845154, -0.2621736526489258, -0.30833643674850464, -0.2195662409067154, -0.08773639798164368, -0.05993626266717911, 0.040987689048051834, -0.46983397006988525, 0.3272416889667511, -0.3650483787059784, -0.1915591061115265, 0.46961137652397156, -0.43522313237190247, -0.30466899275779724, 0.22673794627189636, -0.1328669786453247, 0.04458224028348923, -0.10778560489416122, 0.04584355652332306, 0.10297565907239914, 0.12813040614128113, 0.16053807735443115, 0.46058738231658936, 0.058994077146053314, -0.01474249828606844, -0.1156819611787796, -0.14632432162761688, 0.339478075504303, 0.20120885968208313, -0.02106122300028801, 0.028421111404895782, 0.29710087180137634, -0.03878052905201912, 0.07431375980377197, -0.0071036554872989655, -0.18453067541122437, 0.012506237253546715, 0.1508089303970337, 0.05953936651349068, 0.0794680044054985, -0.19171380996704102, -0.24358707666397095, 0.18130305409431458, 0.014477990567684174, -0.2341403067111969, 0.02897060662508011, 0.023044146597385406, -0.5283482670783997, 0.024146871641278267, -0.3464431166648865, -0.2545599043369293, 0.08996358513832092, 0.377180278301239, 0.02669757977128029, 0.007516484707593918, -0.30776217579841614, 0.6079838871955872, -0.13013902306556702, -0.039613813161849976, -0.03859506919980049, 0.23077510297298431, -0.01101982407271862, -0.16297310590744019, 0.019709698855876923, 0.2607417702674866, 0.14300240576267242, -0.2011110484600067, -0.1531473994255066, 0.5061609148979187, -0.02501966990530491, 0.09404030442237854, 0.16219118237495422, -0.2915613651275635, 0.02201201766729355, -0.16883628070354462, 0.06594007462263107, 0.03378816694021225, 0.2603028118610382, 0.07612987607717514, 0.1146717518568039, 0.1935313493013382, 0.10091716796159744, 0.22794383764266968, 0.053473666310310364, 0.18939915299415588, 0.29875510931015015, 0.0227615125477314, -0.06665099412202835, -0.08246255666017532, 0.2429976761341095, -0.007517857477068901, 0.4389483630657196, -0.1387156993150711, -0.21776382625102997, -0.05847065895795822, 0.2495730221271515, 0.11857214570045471, 0.06822448968887329, -0.10537951439619064, -0.311926931142807, 0.1657208502292633, -0.09030617028474808, 0.1456936001777649, 0.6451862454414368, 0.194353386759758, -0.37989574670791626, -0.1036364957690239, 0.009723840281367302, 0.038366880267858505, 0.3107738792896271, 0.15210238099098206, 0.6034831404685974, 0.18058159947395325, 0.02251479960978031, 0.14001384377479553, -0.3064092695713043, -0.24060305953025818, 0.2263323962688446, 0.5370239615440369, -0.5126972198486328, 0.21018218994140625, -0.08934241533279419, -0.1535012125968933, 0.04053330048918724, -0.09637434035539627, -0.18500585854053497, -0.14753088355064392, -0.18226836621761322, 0.012410998344421387, 0.1741802990436554, 0.11573173850774765, -0.39329782128334045, 0.28759199380874634, 0.10169738531112671, 0.04831630736589432, -0.24758484959602356, -0.018236735835671425, -0.14497101306915283, 0.07611063122749329, 0.19218215346336365, -0.01925777457654476, 0.40590405464172363, -0.12148118019104004, 0.036609575152397156, 0.06838532537221909, -0.05625990778207779, 0.032395295798778534, -0.08898626267910004, 0.5337874293327332, 0.025816738605499268, 0.2986016869544983, 0.21388362348079681, -0.04859675467014313, 0.4103662669658661, -0.1959453970193863, -0.28375163674354553, 0.22189581394195557, 0.09199053794145584, -0.15899409353733063, 0.059227172285318375, -0.5100253820419312, -0.3641575574874878, -0.4799742102622986, 0.07707693427801132, -0.07429256290197372, 0.1420985460281372, 0.4682738482952118, 0.18191483616828918, 0.29959049820899963, -0.08914466947317123, 0.09397244453430176, -0.18905100226402283, -0.16305828094482422, 0.06759421527385712, -0.27891072630882263, -0.24963898956775665, 0.1020582914352417, 0.1311127096414566, 0.3703189790248871, 0.04817910119891167, -0.3811292052268982, 0.041972532868385315, -0.21474558115005493, 0.04429155960679054, -0.5274266600608826, -0.00198369100689888, 0.27386152744293213, 0.02523638680577278, -0.10780201107263565, 0.08759880810976028, -0.13708804547786713, 0.13079360127449036, -0.10495968908071518, 0.18779858946800232, 0.007410280406475067, 0.12608446180820465, -0.09435491263866425, 0.3064136207103729, 0.19270068407058716, -0.18346861004829407, 0.3289410173892975, -0.06353913992643356, 0.26612937450408936, -0.12081625312566757, -0.6607629060745239, 0.11438003927469254, -0.00863569974899292, 0.08794650435447693, -0.010605528950691223, -0.13124936819076538, -0.013714198023080826, -0.24059508740901947, -0.2727923095226288, -0.09641123563051224, -0.04320376366376877, 0.06582523137331009, -0.2969970107078552, 0.11886127293109894, -0.17971481382846832, 0.19152384996414185, -0.009621084667742252, 0.09533216059207916, 0.07548905909061432, 0.262894868850708, 0.14577126502990723, 0.07093426585197449, -0.3617313802242279, -0.042226389050483704, 0.1370488405227661, 0.3300974369049072, -0.0032665973994880915, 0.4891047179698944, 0.009748037904500961, 0.18494710326194763, 0.04660177230834961, -0.12851926684379578, 0.5859230756759644, -0.21266485750675201, 0.35258913040161133, 0.33818426728248596, 0.2880720794200897, -0.27588599920272827, 0.031634215265512466, -0.08150075376033783, 0.43282461166381836, -0.015159927308559418, 0.36504262685775757, 0.07152987271547318, -0.24635536968708038, 0.17698679864406586, 0.1996430605649948, -0.2530452311038971, -0.2113819122314453, -0.17153576016426086, -0.22062978148460388, -0.3542931377887726, 0.10818330198526382, -0.034437425434589386, 0.4344746768474579, -0.012453950010240078, -0.08796685934066772, -0.4342901110649109, -0.19077306985855103, 0.07191653549671173, 0.11572317779064178, 0.29515767097473145, 0.004936073441058397, 0.30878308415412903, 0.375965416431427, 0.023347485810518265, 0.15152817964553833, 0.5988423824310303, 0.1250535100698471, -0.6206970810890198, -0.07927233725786209, -0.129106804728508, 0.5378156304359436, 0.07513467222452164, -0.30636632442474365, -0.16844937205314636, -0.09788093715906143, -0.08400419354438782, -0.10837467014789581, 0.027507351711392403, 0.32401537895202637, 0.07923583686351776, -0.186491459608078, -0.48404139280319214, 0.23687055706977844, -0.15111011266708374, -0.017810828983783722, 0.15956351161003113, 0.4911623001098633, -0.19557024538516998, 0.22057966887950897, 0.11180099844932556, 0.7553495764732361, 0.19761742651462555, 0.03969847038388252, 0.2952796220779419, 0.16112448275089264, -0.07552812993526459, -0.14939086139202118, 0.1080431342124939, -0.3295922577381134, -0.32027098536491394, -0.06876753270626068, -0.3301829695701599, 0.3876402974128723, 0.08959130942821503, -0.09687380492687225, -0.021014433354139328, -0.01441463828086853, 0.001297149807214737, 0.2541862428188324, 0.21493229269981384, 0.09952130913734436, -0.13182184100151062, -0.1527717560529709, 0.16308742761611938, -0.3259114623069763, 0.20598703622817993, 0.028951216489076614, -0.003557051531970501, -0.07612480968236923, -0.10738011449575424, -0.22824043035507202, 0.20229989290237427, -0.6868702173233032, 0.0723312571644783, -0.11227288842201233, -0.19073298573493958, 0.2850729525089264, 0.3430377244949341, 0.2909253239631653, 0.13164690136909485, -0.14575350284576416, 0.21582365036010742, 0.08159103989601135, -0.2175918072462082, 0.0747108981013298, -0.05680094659328461, 0.3346737027168274, -0.04671238735318184, -0.38352450728416443, 0.48226067423820496, -0.11024913191795349, -0.2466370016336441, 0.20069372653961182, -0.06610220670700073, -0.08255772292613983, -0.31853926181793213, -0.09229731559753418, -0.02105364203453064, 0.14708206057548523, -0.12965518236160278, 0.14247411489486694, 0.2922906279563904, -0.1950228214263916, -0.0034235194325447083, 0.01745479553937912, -0.2582153081893921, 0.03250812739133835, 0.22247713804244995, -0.1066552922129631, 0.0027430690824985504, 0.5560396909713745, 0.007311929017305374, -0.07638661563396454, -0.3158021569252014, 0.17691171169281006, 0.13832318782806396, -0.5095139741897583, 0.05485078692436218, 0.16647517681121826, -0.17790481448173523, -0.025581300258636475, 0.4421418607234955, 0.017734378576278687, -0.22724926471710205, 0.035870809108018875, -0.6369439959526062, -0.3334208130836487, 0.12812891602516174, 0.022642062976956367, -0.001961126923561096, -0.006580088287591934, -0.0810127854347229, -0.21348224580287933, 0.20946712791919708, -0.3169683814048767, -0.027914537116885185, 0.009261095896363258, 0.014092301949858665, 0.1409546583890915, -0.22244492173194885, 0.38597121834754944, -0.21960166096687317, 0.1709579974412918, 0.039824895560741425, 0.04437723755836487, -0.24607956409454346, -0.1012236475944519, 0.14818093180656433, -0.04169514775276184, -0.038373082876205444, -0.10893858969211578, -0.2657155990600586, -0.05425006523728371, -0.1723552793264389, 0.07521246373653412, 0.04520239681005478, -0.12551601231098175, 0.2833082675933838, 0.03931402787566185, 0.10704492032527924, -0.09352420270442963, 0.360638290643692, -0.0952652096748352, 0.15198759734630585, 0.03879587724804878, 0.07057406008243561, -0.10658419877290726, -0.20088887214660645, -0.325538694858551, 0.016384895890951157, -0.25104111433029175, 0.30962133407592773, 0.24696746468544006, -0.4206361770629883, 0.08008784055709839, -0.09705661982297897, -0.0673409178853035, 0.24710437655448914, -0.26445242762565613, 0.2445635348558426, -0.021232616156339645, 0.19136853516101837, -0.37274569272994995, -0.10600628703832626, -0.1993282288312912, -0.11877947300672531, 0.05636386200785637, 0.37374937534332275, -0.031228801235556602, -0.07933826744556427, -0.1581609547138214, -0.06844176352024078, 0.5060697197914124, -0.019507888704538345, 0.017463846132159233, 0.15453273057937622, -0.17257963120937347, -0.1536426693201065, 0.09334207326173782, 0.42327794432640076, 0.1152476891875267, 0.269716739654541, -0.5678473114967346, -0.23181010782718658, 0.27843374013900757, 0.11143892258405685, -0.3035880923271179, -0.21615543961524963, 0.14215725660324097, 0.0628841370344162, -0.035100057721138, 0.05407802760601044, -0.018824882805347443, 0.40681859850883484, -0.08544638007879257, -0.02949981763958931, -0.13689999282360077, -0.14452537894248962, -0.21516460180282593, 0.1661476045846939, -0.3085136115550995, -0.2695310711860657, -0.47974514961242676, -0.06550708413124084, -0.1537787765264511, -0.32755184173583984, 0.17083615064620972, 0.10886228084564209, -0.28721940517425537, -0.33956125378608704, 0.37582868337631226, 0.3521571159362793, 0.01267194002866745, -0.34628888964653015, 0.4838087558746338, 0.2542344927787781, 0.15041346848011017, 0.39246439933776855, 0.4023367762565613, 0.35744431614875793, 0.34091272950172424, -0.15778854489326477, 0.20465731620788574, 0.052415136247873306, -0.2728022634983063, -0.03513225167989731, 0.15572412312030792, -0.14291298389434814, 0.037399500608444214, 0.20290818810462952, 0.20947718620300293, -0.11334437131881714, 0.09773275256156921, 0.016990959644317627, 0.3066137731075287, -0.31195008754730225, 0.5624394416809082, -0.08001703768968582, -0.04511728137731552, -0.2309151291847229, 0.033127740025520325, -0.34612882137298584, -0.02949913591146469, 0.12218931317329407, 0.0015561396721750498, 0.13306692242622375, -0.12717485427856445, 0.07706247270107269, -0.01811164990067482, 0.29168298840522766, 0.415905237197876, 0.33263707160949707, -0.4432153105735779, 0.09962207078933716, -0.7385666370391846, 0.19566947221755981, 0.07800674438476562, -0.33580705523490906, 0.171550452709198, 0.12619899213314056, 0.09814121574163437, 0.1277821958065033, 0.40985268354415894, 0.1869882345199585, 0.3383786380290985, 0.11439850181341171, -0.3232928514480591, -0.3539623022079468, 0.3181748390197754, 0.3774873912334442, -0.0705467015504837, -0.28412312269210815, 0.16311095654964447, 0.11230367422103882, 0.0581808015704155, -0.035395003855228424, -0.0705888494849205, 0.039601732045412064, -0.3177497982978821, 0.4908187687397003, -0.1943577378988266, 0.32011958956718445, -0.08927959203720093, -0.06974577903747559, -0.15863841772079468, -0.12350192666053772, -0.2217208296060562, 0.24103450775146484, 0.3984376788139343, 0.36611995100975037, -0.23480458557605743, -0.10787245631217957, -0.3772940933704376, -0.10373369604349136, -0.16979584097862244, 0.10012686252593994, -0.329321950674057, 0.14291556179523468, 0.0018421709537506104, 0.010885144583880901, -0.15931375324726105, 0.0026384256780147552, -0.11198186874389648, 0.1473568230867386, -0.4175291657447815, -0.25438573956489563, 0.4914582669734955, -0.20825734734535217, -0.03881244361400604, 0.3382033407688141, 0.19438526034355164, 0.3494149148464203, 0.026793576776981354, -0.4537043273448944, 0.052789561450481415, 0.553665041923523, 0.04880108684301376, -0.15713317692279816, -0.0030294768512248993, -0.10989280045032501, -0.018498778343200684, -0.025383900851011276, 0.4734540283679962, -0.07353968918323517, 0.10507281124591827, 0.08971582353115082, -0.010379347950220108 ]
https://github.com/huggingface/datasets/issues/6655
Cannot load the dataset go_emotions
> The linked code lazily registers a custom reducer for `transformers.PreTrainedTokenizerBase` only if `transformers` have already been imported (imports are expensive, so we check `sys.modules`). > > However, the logic does not account for `transformers<3`, so we should add a version check to fix that. Thank you for that Mario. Would this fix solve the problem and do you have any idea when it will be done? I tried the pip install suggested by Albert and it made no difference.
### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&line=1) go_emotions = load_dataset("go_emotions") [2](vscode-notebook-cell:?execution_count=6&line=2) data = go_emotions.data File [c:\Users\hijik\anaconda3\Lib\site-packages\datasets\load.py:2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs) [2518](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2518) verification_mode = VerificationMode( [2519](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2519) (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS [2520](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2520) ) [2522](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2522) # Create a dataset builder -> [2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523) builder_instance = load_dataset_builder( [2524](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2524) path=path, [2525](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2525) name=name, [2526](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2526) data_dir=data_dir, [2527](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2527) data_files=data_files, [2528](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2528) cache_dir=cache_dir, [2529](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2529) features=features, [2530](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2530) download_config=download_config, [2531](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2531) download_mode=download_mode, [2532](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2532) revision=revision, [2533](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2533) token=token, [2534](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2534) storage_options=storage_options, [2535](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2535) trust_remote_code=trust_remote_code, [2536](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2536) _require_default_config_name=name is None, ... ---> [63](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:63) if issubclass(obj_type, transformers.PreTrainedTokenizerBase): [64](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:64) pklregister(obj_type)(_save_transformersPreTrainedTokenizerBase) [66](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:66) # Unwrap `torch.compile`-ed functions AttributeError: module 'transformers' has no attribute 'PreTrainedTokenizerBase' Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?10bc0728-6947-456e-9a3e-f056872b04c6) or open in a [text editor](command:workbench.action.openLargeOutput?10bc0728-6947-456e-9a3e-f056872b04c6). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)... ### Steps to reproduce the bug ``` from datasets import load_dataset go_emotions = load_dataset("go_emotions") ``` ### Expected behavior Should simply load the variable with the data from the file ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.16.1 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.4 - `huggingface_hub` version: 0.20.3 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0
80
Cannot load the dataset go_emotions ### Describe the bug When I run the following code I get an exception; `go_emotions = load_dataset("go_emotions")` > AttributeError Traceback (most recent call last) Cell In[6], [line 1](vscode-notebook-cell:?execution_count=6&line=1) ----> [1](vscode-notebook-cell:?execution_count=6&line=1) go_emotions = load_dataset("go_emotions") [2](vscode-notebook-cell:?execution_count=6&line=2) data = go_emotions.data File [c:\Users\hijik\anaconda3\Lib\site-packages\datasets\load.py:2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs) [2518](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2518) verification_mode = VerificationMode( [2519](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2519) (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS [2520](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2520) ) [2522](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2522) # Create a dataset builder -> [2523](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2523) builder_instance = load_dataset_builder( [2524](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2524) path=path, [2525](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2525) name=name, [2526](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2526) data_dir=data_dir, [2527](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2527) data_files=data_files, [2528](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2528) cache_dir=cache_dir, [2529](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2529) features=features, [2530](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2530) download_config=download_config, [2531](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2531) download_mode=download_mode, [2532](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2532) revision=revision, [2533](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2533) token=token, [2534](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2534) storage_options=storage_options, [2535](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2535) trust_remote_code=trust_remote_code, [2536](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/load.py:2536) _require_default_config_name=name is None, ... ---> [63](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:63) if issubclass(obj_type, transformers.PreTrainedTokenizerBase): [64](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:64) pklregister(obj_type)(_save_transformersPreTrainedTokenizerBase) [66](file:///C:/Users/hijik/anaconda3/Lib/site-packages/datasets/utils/_dill.py:66) # Unwrap `torch.compile`-ed functions AttributeError: module 'transformers' has no attribute 'PreTrainedTokenizerBase' Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?10bc0728-6947-456e-9a3e-f056872b04c6) or open in a [text editor](command:workbench.action.openLargeOutput?10bc0728-6947-456e-9a3e-f056872b04c6). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)... ### Steps to reproduce the bug ``` from datasets import load_dataset go_emotions = load_dataset("go_emotions") ``` ### Expected behavior Should simply load the variable with the data from the file ### Environment info Copy-and-paste the text below in your GitHub issue. - `datasets` version: 2.16.1 - Platform: Windows-10-10.0.22631-SP0 - Python version: 3.11.4 - `huggingface_hub` version: 0.20.3 - PyArrow version: 11.0.0 - Pandas version: 1.5.3 - `fsspec` version: 2023.10.0 > The linked code lazily registers a custom reducer for `transformers.PreTrainedTokenizerBase` only if `transformers` have already been imported (imports are expensive, so we check `sys.modules`). > > However, the logic does not account for `transformers<3`, so we should add a version check to fix that. Thank you for that Mario. Would this fix solve the problem and do you have any idea when it will be done? I tried the pip install suggested by Albert and it made no difference.
[ -0.4397527873516083, -0.06399113684892654, -0.07161179184913635, 0.5826753377914429, 0.6256293654441833, 0.07131221145391464, 0.06615027040243149, 0.13112905621528625, 0.05428558215498924, 0.03706338256597519, -0.1652708351612091, 0.14455163478851318, -0.08863478899002075, 0.18902641534805298, 0.0047144340351223946, -0.24216148257255554, -0.2684483826160431, 0.399101585149765, 0.20813032984733582, 0.15451101958751678, -0.30821165442466736, 0.1393652856349945, -0.3345146179199219, 0.17376095056533813, -0.04480435699224472, -0.333909809589386, 0.11562690138816833, 0.26559191942214966, -0.08010837435722351, -0.6466490030288696, 0.2600073218345642, -0.15562890470027924, 0.3555251359939575, 0.5283472537994385, -0.0001106037525460124, 0.07421648502349854, 0.4536481499671936, -0.018296251073479652, -0.4489193856716156, -0.21763284504413605, -0.25908327102661133, -0.13189800083637238, -0.0775567889213562, -0.04730560630559921, -0.1624513864517212, -0.49877795577049255, -0.21037191152572632, -0.6319648027420044, 0.1510661244392395, 0.5190802216529846, 0.22588706016540527, 0.1050674170255661, 0.06848497688770294, -0.13558189570903778, 0.26765573024749756, 0.11047188937664032, -0.06414376199245453, 0.11890040338039398, 0.22246868908405304, -0.18872323632240295, 0.2325308918952942, 0.10070839524269104, 0.09430710226297379, 0.15677684545516968, 0.3357968330383301, 0.006197670474648476, 0.40585315227508545, -0.08024571090936661, 0.22801345586776733, 0.1931697428226471, 0.6910155415534973, 0.09076434373855591, -0.4217729866504669, -0.042424365878105164, 0.125554621219635, -0.27721673250198364, 0.276551216840744, 0.035128843039274216, -0.22516809403896332, -0.03270350769162178, -0.1869422197341919, -0.1403498500585556, -0.2569015622138977, 0.21168924868106842, -0.11688809841871262, -0.24285930395126343, -0.21003594994544983, 0.10965273529291153, 0.2853080630302429, 0.02182287722826004, 0.17346276342868805, 0.16399267315864563, -0.4163037836551666, 0.3127909302711487, -0.3350009322166443, 0.13182617723941803, -0.20413556694984436, -0.03307196497917175, 0.08708346635103226, 0.04647504538297653, 0.031267937272787094, -0.12289094179868698, 0.021820031106472015, 0.16154327988624573, 0.24118298292160034, 0.3192739188671112, 0.21053221821784973, 0.10463149845600128, 0.08517411351203918, 0.022738315165042877, -0.18559889495372772, -0.17778390645980835, -0.2836458086967468, -0.10531534254550934, 0.2906724512577057, -0.07810256630182266, 0.11399932205677032, -0.2562594413757324, -0.5179859399795532, 0.11287634074687958, -0.28162291646003723, -0.036958981305360794, 0.21590879559516907, 0.6174511313438416, 0.10805796086788177, 0.08845426142215729, 0.21872718632221222, 0.1198735386133194, -0.08702973276376724, -0.18589480221271515, -0.27906477451324463, 0.13903672993183136, -0.17490054666996002, -0.11855063587427139, 0.18957239389419556, -0.18975403904914856, 0.34199652075767517, -0.19100017845630646, -0.0827641636133194, -0.2138439416885376, 0.3162747919559479, -0.24622654914855957, -0.04653414338827133, 0.24626702070236206, -0.15853102505207062, -0.05776987969875336, 0.1569301337003708, -0.39295488595962524, 0.06132339686155319, 0.09381735324859619, -0.1261746883392334, -0.3397950828075409, -0.06521747261285782, 0.22542428970336914, -0.1719667762517929, -0.10121747851371765, -0.3907018303871155, -0.0812833160161972, 0.15439406037330627, -0.16643883287906647, -0.12247908860445023, -0.2960051894187927, 0.009048212319612503, -0.2065829336643219, 0.4852399528026581, 0.5193719267845154, -0.2621736526489258, -0.30833643674850464, -0.2195662409067154, -0.08773639798164368, -0.05993626266717911, 0.040987689048051834, -0.46983397006988525, 0.3272416889667511, -0.3650483787059784, -0.1915591061115265, 0.46961137652397156, -0.43522313237190247, -0.30466899275779724, 0.22673794627189636, -0.1328669786453247, 0.04458224028348923, -0.10778560489416122, 0.04584355652332306, 0.10297565907239914, 0.12813040614128113, 0.16053807735443115, 0.46058738231658936, 0.058994077146053314, -0.01474249828606844, -0.1156819611787796, -0.14632432162761688, 0.339478075504303, 0.20120885968208313, -0.02106122300028801, 0.028421111404895782, 0.29710087180137634, -0.03878052905201912, 0.07431375980377197, -0.0071036554872989655, -0.18453067541122437, 0.012506237253546715, 0.1508089303970337, 0.05953936651349068, 0.0794680044054985, -0.19171380996704102, -0.24358707666397095, 0.18130305409431458, 0.014477990567684174, -0.2341403067111969, 0.02897060662508011, 0.023044146597385406, -0.5283482670783997, 0.024146871641278267, -0.3464431166648865, -0.2545599043369293, 0.08996358513832092, 0.377180278301239, 0.02669757977128029, 0.007516484707593918, -0.30776217579841614, 0.6079838871955872, -0.13013902306556702, -0.039613813161849976, -0.03859506919980049, 0.23077510297298431, -0.01101982407271862, -0.16297310590744019, 0.019709698855876923, 0.2607417702674866, 0.14300240576267242, -0.2011110484600067, -0.1531473994255066, 0.5061609148979187, -0.02501966990530491, 0.09404030442237854, 0.16219118237495422, -0.2915613651275635, 0.02201201766729355, -0.16883628070354462, 0.06594007462263107, 0.03378816694021225, 0.2603028118610382, 0.07612987607717514, 0.1146717518568039, 0.1935313493013382, 0.10091716796159744, 0.22794383764266968, 0.053473666310310364, 0.18939915299415588, 0.29875510931015015, 0.0227615125477314, -0.06665099412202835, -0.08246255666017532, 0.2429976761341095, -0.007517857477068901, 0.4389483630657196, -0.1387156993150711, -0.21776382625102997, -0.05847065895795822, 0.2495730221271515, 0.11857214570045471, 0.06822448968887329, -0.10537951439619064, -0.311926931142807, 0.1657208502292633, -0.09030617028474808, 0.1456936001777649, 0.6451862454414368, 0.194353386759758, -0.37989574670791626, -0.1036364957690239, 0.009723840281367302, 0.038366880267858505, 0.3107738792896271, 0.15210238099098206, 0.6034831404685974, 0.18058159947395325, 0.02251479960978031, 0.14001384377479553, -0.3064092695713043, -0.24060305953025818, 0.2263323962688446, 0.5370239615440369, -0.5126972198486328, 0.21018218994140625, -0.08934241533279419, -0.1535012125968933, 0.04053330048918724, -0.09637434035539627, -0.18500585854053497, -0.14753088355064392, -0.18226836621761322, 0.012410998344421387, 0.1741802990436554, 0.11573173850774765, -0.39329782128334045, 0.28759199380874634, 0.10169738531112671, 0.04831630736589432, -0.24758484959602356, -0.018236735835671425, -0.14497101306915283, 0.07611063122749329, 0.19218215346336365, -0.01925777457654476, 0.40590405464172363, -0.12148118019104004, 0.036609575152397156, 0.06838532537221909, -0.05625990778207779, 0.032395295798778534, -0.08898626267910004, 0.5337874293327332, 0.025816738605499268, 0.2986016869544983, 0.21388362348079681, -0.04859675467014313, 0.4103662669658661, -0.1959453970193863, -0.28375163674354553, 0.22189581394195557, 0.09199053794145584, -0.15899409353733063, 0.059227172285318375, -0.5100253820419312, -0.3641575574874878, -0.4799742102622986, 0.07707693427801132, -0.07429256290197372, 0.1420985460281372, 0.4682738482952118, 0.18191483616828918, 0.29959049820899963, -0.08914466947317123, 0.09397244453430176, -0.18905100226402283, -0.16305828094482422, 0.06759421527385712, -0.27891072630882263, -0.24963898956775665, 0.1020582914352417, 0.1311127096414566, 0.3703189790248871, 0.04817910119891167, -0.3811292052268982, 0.041972532868385315, -0.21474558115005493, 0.04429155960679054, -0.5274266600608826, -0.00198369100689888, 0.27386152744293213, 0.02523638680577278, -0.10780201107263565, 0.08759880810976028, -0.13708804547786713, 0.13079360127449036, -0.10495968908071518, 0.18779858946800232, 0.007410280406475067, 0.12608446180820465, -0.09435491263866425, 0.3064136207103729, 0.19270068407058716, -0.18346861004829407, 0.3289410173892975, -0.06353913992643356, 0.26612937450408936, -0.12081625312566757, -0.6607629060745239, 0.11438003927469254, -0.00863569974899292, 0.08794650435447693, -0.010605528950691223, -0.13124936819076538, -0.013714198023080826, -0.24059508740901947, -0.2727923095226288, -0.09641123563051224, -0.04320376366376877, 0.06582523137331009, -0.2969970107078552, 0.11886127293109894, -0.17971481382846832, 0.19152384996414185, -0.009621084667742252, 0.09533216059207916, 0.07548905909061432, 0.262894868850708, 0.14577126502990723, 0.07093426585197449, -0.3617313802242279, -0.042226389050483704, 0.1370488405227661, 0.3300974369049072, -0.0032665973994880915, 0.4891047179698944, 0.009748037904500961, 0.18494710326194763, 0.04660177230834961, -0.12851926684379578, 0.5859230756759644, -0.21266485750675201, 0.35258913040161133, 0.33818426728248596, 0.2880720794200897, -0.27588599920272827, 0.031634215265512466, -0.08150075376033783, 0.43282461166381836, -0.015159927308559418, 0.36504262685775757, 0.07152987271547318, -0.24635536968708038, 0.17698679864406586, 0.1996430605649948, -0.2530452311038971, -0.2113819122314453, -0.17153576016426086, -0.22062978148460388, -0.3542931377887726, 0.10818330198526382, -0.034437425434589386, 0.4344746768474579, -0.012453950010240078, -0.08796685934066772, -0.4342901110649109, -0.19077306985855103, 0.07191653549671173, 0.11572317779064178, 0.29515767097473145, 0.004936073441058397, 0.30878308415412903, 0.375965416431427, 0.023347485810518265, 0.15152817964553833, 0.5988423824310303, 0.1250535100698471, -0.6206970810890198, -0.07927233725786209, -0.129106804728508, 0.5378156304359436, 0.07513467222452164, -0.30636632442474365, -0.16844937205314636, -0.09788093715906143, -0.08400419354438782, -0.10837467014789581, 0.027507351711392403, 0.32401537895202637, 0.07923583686351776, -0.186491459608078, -0.48404139280319214, 0.23687055706977844, -0.15111011266708374, -0.017810828983783722, 0.15956351161003113, 0.4911623001098633, -0.19557024538516998, 0.22057966887950897, 0.11180099844932556, 0.7553495764732361, 0.19761742651462555, 0.03969847038388252, 0.2952796220779419, 0.16112448275089264, -0.07552812993526459, -0.14939086139202118, 0.1080431342124939, -0.3295922577381134, -0.32027098536491394, -0.06876753270626068, -0.3301829695701599, 0.3876402974128723, 0.08959130942821503, -0.09687380492687225, -0.021014433354139328, -0.01441463828086853, 0.001297149807214737, 0.2541862428188324, 0.21493229269981384, 0.09952130913734436, -0.13182184100151062, -0.1527717560529709, 0.16308742761611938, -0.3259114623069763, 0.20598703622817993, 0.028951216489076614, -0.003557051531970501, -0.07612480968236923, -0.10738011449575424, -0.22824043035507202, 0.20229989290237427, -0.6868702173233032, 0.0723312571644783, -0.11227288842201233, -0.19073298573493958, 0.2850729525089264, 0.3430377244949341, 0.2909253239631653, 0.13164690136909485, -0.14575350284576416, 0.21582365036010742, 0.08159103989601135, -0.2175918072462082, 0.0747108981013298, -0.05680094659328461, 0.3346737027168274, -0.04671238735318184, -0.38352450728416443, 0.48226067423820496, -0.11024913191795349, -0.2466370016336441, 0.20069372653961182, -0.06610220670700073, -0.08255772292613983, -0.31853926181793213, -0.09229731559753418, -0.02105364203453064, 0.14708206057548523, -0.12965518236160278, 0.14247411489486694, 0.2922906279563904, -0.1950228214263916, -0.0034235194325447083, 0.01745479553937912, -0.2582153081893921, 0.03250812739133835, 0.22247713804244995, -0.1066552922129631, 0.0027430690824985504, 0.5560396909713745, 0.007311929017305374, -0.07638661563396454, -0.3158021569252014, 0.17691171169281006, 0.13832318782806396, -0.5095139741897583, 0.05485078692436218, 0.16647517681121826, -0.17790481448173523, -0.025581300258636475, 0.4421418607234955, 0.017734378576278687, -0.22724926471710205, 0.035870809108018875, -0.6369439959526062, -0.3334208130836487, 0.12812891602516174, 0.022642062976956367, -0.001961126923561096, -0.006580088287591934, -0.0810127854347229, -0.21348224580287933, 0.20946712791919708, -0.3169683814048767, -0.027914537116885185, 0.009261095896363258, 0.014092301949858665, 0.1409546583890915, -0.22244492173194885, 0.38597121834754944, -0.21960166096687317, 0.1709579974412918, 0.039824895560741425, 0.04437723755836487, -0.24607956409454346, -0.1012236475944519, 0.14818093180656433, -0.04169514775276184, -0.038373082876205444, -0.10893858969211578, -0.2657155990600586, -0.05425006523728371, -0.1723552793264389, 0.07521246373653412, 0.04520239681005478, -0.12551601231098175, 0.2833082675933838, 0.03931402787566185, 0.10704492032527924, -0.09352420270442963, 0.360638290643692, -0.0952652096748352, 0.15198759734630585, 0.03879587724804878, 0.07057406008243561, -0.10658419877290726, -0.20088887214660645, -0.325538694858551, 0.016384895890951157, -0.25104111433029175, 0.30962133407592773, 0.24696746468544006, -0.4206361770629883, 0.08008784055709839, -0.09705661982297897, -0.0673409178853035, 0.24710437655448914, -0.26445242762565613, 0.2445635348558426, -0.021232616156339645, 0.19136853516101837, -0.37274569272994995, -0.10600628703832626, -0.1993282288312912, -0.11877947300672531, 0.05636386200785637, 0.37374937534332275, -0.031228801235556602, -0.07933826744556427, -0.1581609547138214, -0.06844176352024078, 0.5060697197914124, -0.019507888704538345, 0.017463846132159233, 0.15453273057937622, -0.17257963120937347, -0.1536426693201065, 0.09334207326173782, 0.42327794432640076, 0.1152476891875267, 0.269716739654541, -0.5678473114967346, -0.23181010782718658, 0.27843374013900757, 0.11143892258405685, -0.3035880923271179, -0.21615543961524963, 0.14215725660324097, 0.0628841370344162, -0.035100057721138, 0.05407802760601044, -0.018824882805347443, 0.40681859850883484, -0.08544638007879257, -0.02949981763958931, -0.13689999282360077, -0.14452537894248962, -0.21516460180282593, 0.1661476045846939, -0.3085136115550995, -0.2695310711860657, -0.47974514961242676, -0.06550708413124084, -0.1537787765264511, -0.32755184173583984, 0.17083615064620972, 0.10886228084564209, -0.28721940517425537, -0.33956125378608704, 0.37582868337631226, 0.3521571159362793, 0.01267194002866745, -0.34628888964653015, 0.4838087558746338, 0.2542344927787781, 0.15041346848011017, 0.39246439933776855, 0.4023367762565613, 0.35744431614875793, 0.34091272950172424, -0.15778854489326477, 0.20465731620788574, 0.052415136247873306, -0.2728022634983063, -0.03513225167989731, 0.15572412312030792, -0.14291298389434814, 0.037399500608444214, 0.20290818810462952, 0.20947718620300293, -0.11334437131881714, 0.09773275256156921, 0.016990959644317627, 0.3066137731075287, -0.31195008754730225, 0.5624394416809082, -0.08001703768968582, -0.04511728137731552, -0.2309151291847229, 0.033127740025520325, -0.34612882137298584, -0.02949913591146469, 0.12218931317329407, 0.0015561396721750498, 0.13306692242622375, -0.12717485427856445, 0.07706247270107269, -0.01811164990067482, 0.29168298840522766, 0.415905237197876, 0.33263707160949707, -0.4432153105735779, 0.09962207078933716, -0.7385666370391846, 0.19566947221755981, 0.07800674438476562, -0.33580705523490906, 0.171550452709198, 0.12619899213314056, 0.09814121574163437, 0.1277821958065033, 0.40985268354415894, 0.1869882345199585, 0.3383786380290985, 0.11439850181341171, -0.3232928514480591, -0.3539623022079468, 0.3181748390197754, 0.3774873912334442, -0.0705467015504837, -0.28412312269210815, 0.16311095654964447, 0.11230367422103882, 0.0581808015704155, -0.035395003855228424, -0.0705888494849205, 0.039601732045412064, -0.3177497982978821, 0.4908187687397003, -0.1943577378988266, 0.32011958956718445, -0.08927959203720093, -0.06974577903747559, -0.15863841772079468, -0.12350192666053772, -0.2217208296060562, 0.24103450775146484, 0.3984376788139343, 0.36611995100975037, -0.23480458557605743, -0.10787245631217957, -0.3772940933704376, -0.10373369604349136, -0.16979584097862244, 0.10012686252593994, -0.329321950674057, 0.14291556179523468, 0.0018421709537506104, 0.010885144583880901, -0.15931375324726105, 0.0026384256780147552, -0.11198186874389648, 0.1473568230867386, -0.4175291657447815, -0.25438573956489563, 0.4914582669734955, -0.20825734734535217, -0.03881244361400604, 0.3382033407688141, 0.19438526034355164, 0.3494149148464203, 0.026793576776981354, -0.4537043273448944, 0.052789561450481415, 0.553665041923523, 0.04880108684301376, -0.15713317692279816, -0.0030294768512248993, -0.10989280045032501, -0.018498778343200684, -0.025383900851011276, 0.4734540283679962, -0.07353968918323517, 0.10507281124591827, 0.08971582353115082, -0.010379347950220108 ]
https://github.com/huggingface/datasets/issues/6654
Batched dataset map throws exception that cannot cast fixed length array to Sequence
Hi ! This issue has been fixed by https://github.com/huggingface/datasets/pull/6283 Can you try again with the new release 2.17.0 ? ``` pip install -U datasets ```
### Describe the bug I encountered a TypeError when batch processing a dataset with Sequence features in datasets package version 2.16.1. The error arises from a mismatch in handling fixed-size list arrays during the map function execution. Debugging pinpoints the issue to an if-statement in datasets/table.py, line 2093, failing to correctly process sequence lengths. ### Steps to reproduce the bug Create virtual environment and activate ``` virtualenv venv source venv/bin/activate ``` Then install the datasets package (I'm using the latest version) ``` pip install datasets==2.16.1 ``` Then run ```python # bug.py from datasets import Dataset from datasets.features import Features, Sequence, Value data = { "num": [[1, 2], [3, 4]], } features = Features({'num': Sequence(feature=Value(dtype='int32'), length=2)}) dataset = Dataset.from_dict(data, features=features) dataset.map(lambda x: x, batched=True, batch_size=1) ``` ### Expected behavior I get the following stack trace ``` Map: 50%|█████ | 1/2 [00:00<00:00, 423.92 examples/s] Traceback (most recent call last): File "/PATH/TO/BUG_PORT/bug.py", line 9, in <module> dataset.map(lambda x: x, batched=True, batch_size=1) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3093, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3489, in _map_single writer.write_batch(batch) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 551, in write_batch array = cast_array_to_feature(col_values, col_type) if col_type is not None else col_values File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/table.py", line 1797, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/table.py", line 1797, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}") TypeError: Couldn't cast array of type fixed_size_list<item: int32>[2] to Sequence(feature=Value(dtype='int32', id=None), length=2, id=None) ``` After some debugging, I found that the if-statement that is actually failing is line 2093 in `datasets/table.py` ```python # datasets/table.py ... 2093 if feature.length * len(array) == len(array_values): 2094 return pa.FixedSizeListArray.from_arrays(_c(array_values, feature.feature), feature.length) ... ``` ### Environment info Platform: MacOS Datasets version: datasets==2.16.1 Python version: 3.9.6
25
Batched dataset map throws exception that cannot cast fixed length array to Sequence ### Describe the bug I encountered a TypeError when batch processing a dataset with Sequence features in datasets package version 2.16.1. The error arises from a mismatch in handling fixed-size list arrays during the map function execution. Debugging pinpoints the issue to an if-statement in datasets/table.py, line 2093, failing to correctly process sequence lengths. ### Steps to reproduce the bug Create virtual environment and activate ``` virtualenv venv source venv/bin/activate ``` Then install the datasets package (I'm using the latest version) ``` pip install datasets==2.16.1 ``` Then run ```python # bug.py from datasets import Dataset from datasets.features import Features, Sequence, Value data = { "num": [[1, 2], [3, 4]], } features = Features({'num': Sequence(feature=Value(dtype='int32'), length=2)}) dataset = Dataset.from_dict(data, features=features) dataset.map(lambda x: x, batched=True, batch_size=1) ``` ### Expected behavior I get the following stack trace ``` Map: 50%|█████ | 1/2 [00:00<00:00, 423.92 examples/s] Traceback (most recent call last): File "/PATH/TO/BUG_PORT/bug.py", line 9, in <module> dataset.map(lambda x: x, batched=True, batch_size=1) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3093, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3489, in _map_single writer.write_batch(batch) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 551, in write_batch array = cast_array_to_feature(col_values, col_type) if col_type is not None else col_values File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/table.py", line 1797, in wrapper return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/table.py", line 1797, in <listcomp> return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks]) File "/PATH/TO/BUG_PORT/venv/lib/python3.9/site-packages/datasets/table.py", line 2111, in cast_array_to_feature raise TypeError(f"Couldn't cast array of type\n{array.type}\nto\n{feature}") TypeError: Couldn't cast array of type fixed_size_list<item: int32>[2] to Sequence(feature=Value(dtype='int32', id=None), length=2, id=None) ``` After some debugging, I found that the if-statement that is actually failing is line 2093 in `datasets/table.py` ```python # datasets/table.py ... 2093 if feature.length * len(array) == len(array_values): 2094 return pa.FixedSizeListArray.from_arrays(_c(array_values, feature.feature), feature.length) ... ``` ### Environment info Platform: MacOS Datasets version: datasets==2.16.1 Python version: 3.9.6 Hi ! This issue has been fixed by https://github.com/huggingface/datasets/pull/6283 Can you try again with the new release 2.17.0 ? ``` pip install -U datasets ```
[ -0.24830293655395508, -0.1264929473400116, -0.0885014683008194, 0.11196708679199219, 0.12530845403671265, 0.05444198101758957, 0.4358169734477997, 0.2685173451900482, 0.2574767470359802, -0.1156468391418457, 0.4247094988822937, 0.35906529426574707, -0.28999531269073486, -0.0033259037882089615, -0.02002507820725441, -0.06226930767297745, 0.24013429880142212, 0.12625519931316376, -0.28244438767433167, 0.17064514756202698, -0.30140626430511475, 0.15755660831928253, -0.5544657707214355, -0.06411845982074738, 0.19252362847328186, -0.1997215896844864, 0.044186100363731384, -0.39959222078323364, 0.17277385294437408, -0.5570502281188965, 0.32534709572792053, -0.1313106119632721, 0.22770701348781586, 0.24494343996047974, -0.00012070436059730127, -0.03320682793855667, 0.2767907381057739, -0.09382566064596176, -0.12356731295585632, 0.10073602199554443, -0.6848092675209045, -0.3577392101287842, -0.25922995805740356, -0.37820330262184143, 0.16413354873657227, -0.17847280204296112, -0.07868584990501404, -0.7473521828651428, 0.025590144097805023, 0.17900165915489197, 0.13636602461338043, 0.1996353268623352, -0.000684596598148346, -0.07002589106559753, 0.1328664869070053, 0.08717628568410873, -0.09477470070123672, -0.08594802021980286, 0.5816190242767334, -0.01579710654914379, 0.03980705887079239, 0.3071475028991699, -0.27146393060684204, -0.016850117594003677, 0.38470688462257385, -0.2037777155637741, -0.021060071885585785, -0.1764589250087738, -0.2566056549549103, 0.17685452103614807, 0.1162794902920723, -0.20610585808753967, -0.1534671187400818, -0.575151801109314, -0.07932937890291214, -0.05498743802309036, -0.007668577134609222, -0.24798473715782166, -0.07899820804595947, -0.06623831391334534, -0.40428587794303894, 0.25616076588630676, -0.16157586872577667, 0.11531186103820801, 0.14206688106060028, 0.20381182432174683, -0.037364546209573746, 0.31011414527893066, -0.10688494145870209, -0.36625760793685913, 0.16076652705669403, -0.16887158155441284, -0.06602917611598969, 0.3861424922943115, -0.20169346034526825, -0.06824570149183273, 0.09336081147193909, -0.18278786540031433, 0.39668816328048706, -0.21466657519340515, -0.15158894658088684, 0.008053261786699295, 0.17019017040729523, -0.09974002093076706, 0.32637819647789, 0.2965145707130432, 0.1210361123085022, 0.19269713759422302, -0.07787635922431946, 0.16744016110897064, 0.03365432098507881, 0.21341639757156372, 0.16779334843158722, -0.491360604763031, 0.4419422149658203, 0.46773332357406616, 0.2832380533218384, -0.06399558484554291, -0.15439170598983765, 0.32240399718284607, -0.275435209274292, 0.08393412828445435, 0.16368703544139862, 0.059470780193805695, -0.020096000283956528, 0.11441954225301743, 0.059950217604637146, 0.27757686376571655, -0.07777640223503113, -0.012822709046304226, -0.06678935140371323, -0.34284302592277527, -0.06500101089477539, -0.3945102393627167, 0.11538991332054138, -0.027042482048273087, 0.04925031214952469, -0.019385242834687233, 0.017271514981985092, -0.051038242876529694, -0.20164911448955536, -0.10946047306060791, 0.28253430128097534, 0.01953119784593582, -0.08587165921926498, 0.2616017460823059, 0.15360930562019348, 0.2883509397506714, -0.13407492637634277, 0.2892261743545532, -0.31358566880226135, -0.05241505056619644, 0.3115345239639282, 0.08531031012535095, -0.1830468624830246, 0.16958147287368774, -0.28484368324279785, -0.056182343512773514, 0.5088402032852173, -0.23484991490840912, 0.06711086630821228, -0.6546051502227783, -0.1832009255886078, -0.3457203805446625, 0.03453804552555084, 0.2721191644668579, -0.41353416442871094, 0.21244341135025024, -0.12082383036613464, 0.0306618120521307, 0.040806133300065994, 0.21931517124176025, -0.0035064350813627243, 0.12350990623235703, -0.5047500133514404, 0.3463047742843628, 0.06150464341044426, -0.001963522285223007, -0.21548409759998322, 0.374053955078125, -0.11565674096345901, 0.12949055433273315, -0.2388780117034912, 0.2369152009487152, 0.5160232782363892, -0.36016446352005005, 0.05266035348176956, 0.1455419510602951, -0.33549121022224426, 0.23227646946907043, -0.1237204521894455, -0.16483671963214874, 0.21805688738822937, -0.1925162672996521, 0.057321712374687195, 0.023054510354995728, 0.07234419882297516, 0.08930859714746475, 0.1392793357372284, -0.0008351467549800873, 0.23859605193138123, 0.3308268189430237, 0.16560205817222595, -0.06048451364040375, 0.14808468520641327, -0.2830163538455963, -0.5411792397499084, 0.22345185279846191, -0.17298679053783417, -0.24126893281936646, -0.1165531724691391, -0.06589199602603912, -0.31953489780426025, 0.39272335171699524, -0.12142561376094818, 0.25135618448257446, 0.012370467185974121, -0.14233610033988953, 0.08057786524295807, -0.22781504690647125, 0.13500326871871948, -0.013899553567171097, 0.026608942076563835, -0.16754001379013062, -0.2124248892068863, -0.011467501521110535, 0.07365969568490982, -0.101861372590065, -0.02941691130399704, 0.1564834713935852, 0.20095643401145935, -0.05593198537826538, -0.17742356657981873, 0.3266036808490753, 0.19607485830783844, -0.07874657213687897, -0.43013519048690796, -0.11072014272212982, 0.08481688052415848, -0.36163708567619324, 0.01017707958817482, 0.28690555691719055, 0.1315491944551468, -0.1685405820608139, -0.16512122750282288, 0.35765406489372253, -0.16038256883621216, 0.6515038013458252, -0.2435159683227539, 0.16030654311180115, 0.10466071963310242, 0.1494923084974289, -0.061977073550224304, -0.38880684971809387, 0.12056055665016174, -0.0825454592704773, -0.0006147399544715881, -0.0456370934844017, -0.1759832799434662, 0.25369498133659363, 0.22609233856201172, 0.22690993547439575, 0.253717303276062, 0.0588369145989418, -0.08028849214315414, 0.22703179717063904, 0.10530673712491989, 0.07561524212360382, 0.4005472660064697, 0.047741059213876724, -0.0270981602370739, -0.041231103241443634, 0.06573434919118881, -0.047949034720659256, 0.22267445921897888, 0.0018120482563972473, 0.19528931379318237, 0.10234027355909348, 0.10380710661411285, -0.08320166170597076, 0.3070603311061859, -0.29549524188041687, -0.12366283684968948, 0.06652314215898514, -0.3619919717311859, 0.002131948247551918, -0.33259668946266174, -0.2605549693107605, -0.2846825420856476, -0.007571433670818806, -0.10596449673175812, -0.4512304961681366, -0.1510336548089981, 0.24023663997650146, -0.1870691031217575, 0.3500603437423706, -0.059678688645362854, -0.20961953699588776, 0.45038989186286926, -0.40180760622024536, -0.025758452713489532, 0.09823500365018845, -0.17402029037475586, 0.04293600097298622, -0.02144881710410118, -0.15714897215366364, 0.2544066309928894, 0.3279005289077759, -0.05315801501274109, -0.3016589879989624, -0.13146157562732697, -0.05851481109857559, -0.23810623586177826, 0.16104741394519806, 0.5046600103378296, 0.31150752305984497, 0.13704204559326172, -0.06752220541238785, 0.10721519589424133, 0.041768722236156464, -0.07708944380283356, 0.09900631755590439, 0.0853610411286354, -0.07736308127641678, -0.1570092737674713, -0.09268531948328018, -0.06844881176948547, -0.21852320432662964, 0.16393768787384033, -0.1968611776828766, 0.08456256240606308, 0.0732574388384819, 0.3273375630378723, 0.07358431071043015, 0.21423187851905823, -0.41395074129104614, 0.01214495301246643, 0.3617669343948364, 0.24840931594371796, -0.02688233181834221, -0.13508351147174835, -0.14394402503967285, -0.17087051272392273, -0.13387449085712433, 0.31336474418640137, -0.3231313228607178, 0.3064253032207489, -0.04891089349985123, 0.06235327944159508, 0.19422072172164917, -0.12321417033672333, 0.27613532543182373, 0.0018351846374571323, 0.1323227733373642, -0.3249633014202118, -0.09863829612731934, 0.3302812874317169, -0.06115525960922241, 0.2369362711906433, 0.33788374066352844, 0.48211172223091125, 0.12557007372379303, 0.5360462069511414, 0.4146057665348053, -0.14674212038516998, 0.17739659547805786, -0.18331816792488098, -0.001489635556936264, -0.16381198167800903, -0.2258629947900772, -0.05214133486151695, 0.13035963475704193, -0.2557183802127838, 0.006157934665679932, -0.19603443145751953, -0.2556226849555969, 0.2904989421367645, -0.024645214900374413, 0.23396775126457214, -0.2993113398551941, 0.24353566765785217, -0.42858755588531494, 0.4743292033672333, 0.15192948281764984, 0.004974082112312317, -0.3048015236854553, -0.1643255352973938, -0.37028294801712036, -0.2384827882051468, 0.2433624267578125, -0.06874929368495941, -0.4701502025127411, -0.36621421575546265, -0.14341697096824646, 0.32965877652168274, 0.48615115880966187, 0.8165829181671143, -0.06539036333560944, -0.1475127935409546, -0.2218778282403946, -0.022429369390010834, 0.5268909335136414, -0.4288159906864166, 0.2671894133090973, 0.01696760207414627, 0.3535064160823822, -0.5187116265296936, -0.1428050994873047, 0.003738176077604294, 0.14168690145015717, 0.13038043677806854, 0.26593875885009766, -0.059163328260183334, 0.15369874238967896, 0.1830633580684662, 0.1401778906583786, -0.021539468318223953, -0.04898246005177498, -0.07528065145015717, -0.03249990940093994, -0.3127146363258362, 0.2845328152179718, 0.46664461493492126, 0.10098821669816971, 0.12774613499641418, -0.27644026279449463, -0.2912777066230774, -0.0781664252281189, -0.01910247653722763, 0.07814352214336395, 0.28169870376586914, -0.11664703488349915, 0.38815373182296753, -0.0738096609711647, -0.1540849357843399, 0.2862994074821472, 0.15960508584976196, -0.1681082546710968, -0.03742305934429169, 0.13642197847366333, -0.08087832480669022, 0.26995527744293213, 0.21893885731697083, -0.3639505207538605, 0.013206802308559418, 0.3342059850692749, 0.22823002934455872, -0.20706413686275482, -0.2564588189125061, 0.35086169838905334, 0.1973799169063568, -0.693780243396759, -0.4326733648777008, 0.08717095851898193, 0.11132879555225372, -0.16557645797729492, 0.23451054096221924, -0.17005757987499237, -0.37823909521102905, 0.4722491502761841, 0.16238194704055786, 0.6157733201980591, 0.17254818975925446, -0.13319382071495056, 0.3444655239582062, 0.11172029376029968, 0.20907577872276306, 0.44270312786102295, 0.07178359478712082, -0.42078250646591187, -0.012943054549396038, -0.11328699439764023, -0.2636193633079529, 0.11819750815629959, 0.31128251552581787, -0.1780773103237152, 0.281623899936676, 0.015973366796970367, 0.2738339602947235, -0.19037559628486633, -0.25496917963027954, 0.011601432226598263, -0.27331414818763733, -0.08582328259944916, 0.05610579997301102, -0.051147282123565674, 0.1138714849948883, -0.07326474785804749, -0.2177358865737915, -0.18027208745479584, -0.3389449715614319, -0.5354493856430054, 0.09223732352256775, -0.44714751839637756, 0.0645064264535904, -0.08896246552467346, 0.033852435648441315, 0.2541764974594116, 0.19601555168628693, 0.08700671046972275, 0.2421495020389557, 0.02711290493607521, 0.009987179189920425, 0.369938462972641, 0.23182344436645508, 0.2267250269651413, -0.20207089185714722, -0.0604291632771492, 0.13065901398658752, 0.012162856757640839, -0.13503631949424744, -0.2874581515789032, -0.2222977578639984, -0.11601952463388443, 0.24722391366958618, -0.04029920697212219, -0.4012140929698944, -0.45356491208076477, -0.049124568700790405, 0.11282719671726227, -0.022453317418694496, -0.0024461131542921066, -0.03395862877368927, 0.0862516537308693, 0.6743112802505493, -0.12997320294380188, -0.2090282142162323, 0.03520560637116432, 0.3248496651649475, 0.06277795135974884, -0.01883506588637829, 0.40831562876701355, 0.13471978902816772, -0.17168700695037842, -0.14841973781585693, 0.17406049370765686, -0.016180627048015594, -0.620358407497406, 0.28718486428260803, -0.3046334981918335, -0.07892563939094543, 0.1649571806192398, 0.28882548213005066, 0.09563270956277847, 0.16946488618850708, 0.009871672838926315, -0.3745473623275757, -0.33011284470558167, 0.190769225358963, -0.08851388096809387, 0.17380273342132568, 0.0818886011838913, 0.16081562638282776, -0.16546010971069336, -0.20409350097179413, -0.17106354236602783, -0.17224235832691193, 0.008189955726265907, 0.25928395986557007, -0.02569206804037094, 0.22245264053344727, 0.12970265746116638, -0.12973181903362274, 0.033476002514362335, 0.25013959407806396, -0.2898062765598297, -0.08079187572002411, 0.014459285885095596, 0.11373312026262283, -0.0346156470477581, -0.09770826995372772, -0.10111336410045624, -0.595920741558075, -0.10959091782569885, -0.18876083195209503, -0.09831321239471436, 0.14187723398208618, 0.0355960950255394, -0.05981697887182236, 0.18041154742240906, 0.019614234566688538, 0.08640424907207489, 0.40400680899620056, -0.247084379196167, -0.11365008354187012, -0.03381197899580002, 0.44023898243904114, -0.19565945863723755, -0.05804475396871567, -0.14331099390983582, 0.06390123069286346, 0.032459162175655365, 0.10927917063236237, 0.4148852527141571, -0.24461506307125092, 0.01160953938961029, 0.36087873578071594, 0.28080886602401733, 0.0742279514670372, -0.24750444293022156, -0.2412732094526291, -0.059698544442653656, 0.09422026574611664, -0.2494807243347168, 0.06450333446264267, 0.3150806128978729, 0.17571793496608734, 0.06853748857975006, 0.5675105452537537, 0.25009220838546753, -0.1930563896894455, 0.2783712148666382, 0.17419463396072388, 0.5953623056411743, -0.22444303333759308, 0.09259919822216034, 0.5101299285888672, 0.1835985630750656, 0.07846066355705261, 0.05900769680738449, 0.012266525998711586, 0.5580350160598755, 0.6377922296524048, -0.053670547902584076, 0.16504992544651031, 0.6628643870353699, -0.051191460341215134, 0.19001644849777222, -0.3463231325149536, -0.15548211336135864, 0.2948938012123108, -0.17339873313903809, 0.3754739463329315, 0.3698248267173767, 0.009300030767917633, -0.2731875479221344, -0.38154250383377075, 0.13163518905639648, 0.1087912768125534, -0.2603110373020172, 0.060100894421339035, -0.1527978777885437, -0.06927288323640823, -0.017002664506435394, -0.444240003824234, -0.13778674602508545, -0.057854168117046356, 0.33473894000053406, 0.05526742711663246, 0.19275027513504028, -0.4156293272972107, -0.06731849908828735, 0.09160616248846054, 0.07765533775091171, -0.23101715743541718, 0.25837990641593933, 0.029610708355903625, 0.08758167922496796, 0.32316505908966064, 0.3674868643283844, 0.5790191292762756, 0.4677126705646515, 0.09317944943904877, 0.033411215990781784, 0.04218793660402298, -0.006325123831629753, -0.1726694107055664, -0.12525205314159393, -0.2384156584739685, 0.12338164448738098, 0.3095909655094147, 0.062433481216430664, 0.008741653524339199, 0.24440854787826538, 0.11147455871105194, 0.04663645103573799, 0.07873335480690002, 0.1524083912372589, -0.24284562468528748, -0.07541021704673767, -0.17203287780284882, -0.0154806450009346, -0.14591610431671143, -0.04176117852330208, 0.5607495307922363, -0.16940762102603912, 0.3432622253894806, 0.21187710762023926, 0.049335941672325134, -0.07641731202602386, 0.15256847441196442, 0.32686784863471985, -0.03974451124668121, -0.23251383006572723, -0.15249404311180115, -0.5572457313537598, 0.05206770449876785, -0.3018133342266083, 0.19903236627578735, 0.2971741557121277, 0.06880868971347809, -0.07512540370225906, -0.15728609263896942, 0.29468101263046265, -0.047413669526576996, -0.2280479371547699, 0.5959875583648682, -0.07851790636777878, -0.28666090965270996, -0.009324304759502411, -0.007076112553477287, 0.13724955916404724, -0.43285393714904785, 0.29315510392189026, 0.08641654998064041, 0.01991315186023712, -0.08837106823921204, -0.14627164602279663, 0.051474716514348984, 0.013244763016700745, 0.2929982542991638, 0.11799608170986176, 0.02247711271047592, 0.034506313502788544, -0.0682571604847908, -0.36430269479751587, -0.12952837347984314, -0.17682914435863495, 0.5057869553565979, 0.07834859192371368, 0.433988094329834, -0.37531086802482605, 0.08029910922050476, -0.004772437270730734, -0.17210811376571655, 0.09368428587913513, 0.10230954736471176, -0.371313214302063, 0.3879096806049347, -0.5847607254981995, 0.4539521634578705, -0.08957421034574509, 0.07720494270324707, 0.23813290894031525, 0.4502834975719452, -0.17655973136425018, -0.6113337278366089, 0.4560929834842682, -0.27077004313468933, -0.38460227847099304, 0.17945195734500885, -0.013114452362060547, -0.10237813740968704, -0.15490901470184326, -0.39458853006362915, -0.34700480103492737, 0.43383610248565674, -0.06354500353336334, 0.09236173331737518, -0.32284989953041077, -0.16002507507801056, 0.08124466240406036, -0.20017364621162415, 0.48212310671806335, 0.05163021758198738, -0.33350908756256104, 0.2204730212688446, -0.30957818031311035 ]
https://github.com/huggingface/datasets/issues/6650
AttributeError: 'InMemoryTable' object has no attribute '_batches'
Hi! Does running the following code also return the same error on your machine? ```python import copy import pyarrow as pa from datasets.table import InMemoryTable copy.deepcopy(InMemoryTable(pa.table({"a": [1, 2, 3], "b": ["foo", "bar", "foobar"]}))) ```
### Describe the bug ``` Traceback (most recent call last): File "finetune.py", line 103, in <module> main(args) File "finetune.py", line 45, in main data_tokenized = data.map(partial(funcs.tokenize_function, tokenizer, File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/dataset_dict.py", line 868, in map { File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/dataset_dict.py", line 869, in <dictcomp> k: dataset.map( File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3093, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3432, in _map_single arrow_formatted_shard = shard.with_format("arrow") File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2667, in with_format dataset = copy.deepcopy(self) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 146, in deepcopy y = copier(x, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 153, in deepcopy y = copier(memo) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/table.py", line 176, in __deepcopy__ memo[id(self._batches)] = list(self._batches) AttributeError: 'InMemoryTable' object has no attribute '_batches' ``` ### Steps to reproduce the bug I'm running an MLOps flow using AzureML. The error appears when I run the following function in my training script: ```python data_tokenized = data.map(partial(funcs.tokenize_function, tokenizer, seq_length), batched=True, batch_size=batch_size, remove_columns=['col1', 'col2']) ``` ```python def tokenize_function(tok, seq_length, example) # Pad so that each batch has the same sequence length inp = tok(example['col1'], padding=True, truncation=True) outp = tok(example['col2'], padding="max_length", max_length=seq_length) res = { 'input_ids': inp['input_ids'], 'attention_mask': inp['attention_mask'], 'decoder_input_ids': outp['input_ids'], 'labels': outp['input_ids'], 'decoder_attention_mask': outp['attention_mask'] } return res ``` ### Expected behavior Processing proceeds without errors. I ran this same workflow 2 weeks ago without a problem. I recreated the environment since then but it doesn't appear that datasets versions have changed since Dec. '23. ### Environment info datasets 2.16.1 transformers 4.35.2 pyarrow 15.0.0 pyarrow-hotfix 0.6 torch 2.0.1 I'm not using the latest transformers version because there was an error due to a conflict with Azure mlflow when I tried the last time.
34
AttributeError: 'InMemoryTable' object has no attribute '_batches' ### Describe the bug ``` Traceback (most recent call last): File "finetune.py", line 103, in <module> main(args) File "finetune.py", line 45, in main data_tokenized = data.map(partial(funcs.tokenize_function, tokenizer, File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/dataset_dict.py", line 868, in map { File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/dataset_dict.py", line 869, in <dictcomp> k: dataset.map( File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3093, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3432, in _map_single arrow_formatted_shard = shard.with_format("arrow") File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2667, in with_format dataset = copy.deepcopy(self) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 146, in deepcopy y = copier(x, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 153, in deepcopy y = copier(memo) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/table.py", line 176, in __deepcopy__ memo[id(self._batches)] = list(self._batches) AttributeError: 'InMemoryTable' object has no attribute '_batches' ``` ### Steps to reproduce the bug I'm running an MLOps flow using AzureML. The error appears when I run the following function in my training script: ```python data_tokenized = data.map(partial(funcs.tokenize_function, tokenizer, seq_length), batched=True, batch_size=batch_size, remove_columns=['col1', 'col2']) ``` ```python def tokenize_function(tok, seq_length, example) # Pad so that each batch has the same sequence length inp = tok(example['col1'], padding=True, truncation=True) outp = tok(example['col2'], padding="max_length", max_length=seq_length) res = { 'input_ids': inp['input_ids'], 'attention_mask': inp['attention_mask'], 'decoder_input_ids': outp['input_ids'], 'labels': outp['input_ids'], 'decoder_attention_mask': outp['attention_mask'] } return res ``` ### Expected behavior Processing proceeds without errors. I ran this same workflow 2 weeks ago without a problem. I recreated the environment since then but it doesn't appear that datasets versions have changed since Dec. '23. ### Environment info datasets 2.16.1 transformers 4.35.2 pyarrow 15.0.0 pyarrow-hotfix 0.6 torch 2.0.1 I'm not using the latest transformers version because there was an error due to a conflict with Azure mlflow when I tried the last time. Hi! Does running the following code also return the same error on your machine? ```python import copy import pyarrow as pa from datasets.table import InMemoryTable copy.deepcopy(InMemoryTable(pa.table({"a": [1, 2, 3], "b": ["foo", "bar", "foobar"]}))) ```
[ -0.29193076491355896, -0.05730609595775604, -0.14919856190681458, 0.2503703832626343, 0.3699331283569336, 0.0331215038895607, 0.23557183146476746, 0.3699260950088501, -0.3387131690979004, 0.19476646184921265, -0.18983161449432373, 0.37972354888916016, -0.08334936201572418, 0.12550480663776398, -0.002201044000685215, -0.12222671508789062, 0.08326008915901184, 0.15972450375556946, -0.010805509984493256, -0.1069834977388382, -0.3507539629936218, 0.08173366636037827, -0.2875651717185974, -0.008405640721321106, -0.22473174333572388, -0.23459339141845703, 0.049051716923713684, -0.10095281153917313, -0.028400158509612083, -0.6059597134590149, 0.16984052956104279, -0.15129071474075317, -0.11106103658676147, 0.4583424925804138, -0.00011134566739201546, 0.1504436880350113, 0.2849867343902588, 0.04159267991781235, -0.39333850145339966, 0.08241662383079529, -0.1508232057094574, -0.07331936806440353, -0.02285481058061123, -0.2134401500225067, 0.019413501024246216, 0.2525597810745239, -0.26271942257881165, -0.5123488903045654, 0.20370817184448242, 0.316326379776001, 0.24233359098434448, 0.05454526096582413, 0.0381937213242054, -0.2563045024871826, 0.39344900846481323, -0.08987754583358765, -0.21738260984420776, 0.09270873665809631, 0.12666833400726318, -0.2685505449771881, 0.01885095238685608, 0.33265429735183716, -0.12667246162891388, 0.23685318231582642, -0.073668472468853, 0.13350340723991394, 0.28833651542663574, -0.17957547307014465, 0.20697984099388123, 0.12345746159553528, -0.08416106551885605, -0.3041691482067108, -0.30883386731147766, -0.08602119982242584, -0.016922734677791595, -0.5507357120513916, -0.16087979078292847, 0.14729703962802887, -0.07760216295719147, 0.02080477774143219, 0.1016756147146225, 0.2092806100845337, -0.16708001494407654, 0.14087775349617004, 0.016945891082286835, 0.44224607944488525, -0.05043630301952362, 0.10173296928405762, 0.1555488258600235, -0.1026705801486969, -0.0490899495780468, 0.17206071317195892, -0.32100939750671387, -0.05071991682052612, -0.48433035612106323, -0.032629095017910004, 0.19701489806175232, -0.0544738695025444, 0.3002103567123413, 0.12440495193004608, 0.01005801185965538, 0.09452736377716064, 0.4106733500957489, 0.09607796370983124, 0.06583234667778015, 0.334725022315979, 0.26388058066368103, 0.5171715021133423, 0.05041319504380226, 0.06921377778053284, -0.12918084859848022, 0.010312763974070549, -0.015726493671536446, -0.36841389536857605, 0.18828816711902618, 0.30874261260032654, 0.3257814049720764, -0.05201834440231323, -0.3902720808982849, -0.000569668598473072, 0.2132854461669922, 0.04259341582655907, 0.0732082650065422, 0.6891337633132935, -0.006743260193616152, -0.08609848469495773, -0.13524606823921204, 0.18665044009685516, -0.03295742720365524, -0.07422272861003876, -0.3314628005027771, 0.17762868106365204, -0.230527862906456, -0.022599155083298683, 0.06675949692726135, -0.009327022358775139, 0.19730575382709503, -0.20468872785568237, 0.4666316509246826, -0.1771596372127533, -0.005647335201501846, -0.38727688789367676, 0.14568372070789337, 0.16854175925254822, -0.10593421757221222, 0.03244791179895401, 0.43841761350631714, -0.030082253739237785, 0.04547377675771713, -0.001954786479473114, -0.373349130153656, -0.3810170292854309, -0.06636514514684677, 0.3018644452095032, 0.20361506938934326, 0.023082153871655464, -0.4514687955379486, -0.22303415834903717, 0.450897753238678, -0.0680004358291626, -0.02913481742143631, -0.1913902759552002, -0.15835259854793549, -0.43980222940444946, 0.14299163222312927, 0.30488747358322144, -0.3520391881465912, 0.20811998844146729, -0.21986833214759827, 0.030745474621653557, 0.23360031843185425, 0.10134515166282654, -0.15202197432518005, 0.21334555745124817, -0.08759250491857529, 0.20760007202625275, 0.41793856024742126, -0.45110443234443665, -0.5092655420303345, 0.08230029046535492, -0.09335498511791229, -0.3393595218658447, 0.08466245979070663, -0.19434988498687744, 0.39887377619743347, 0.005998932756483555, 0.5042550563812256, 0.18282708525657654, 0.015889964997768402, 0.12340351194143295, -0.24942155182361603, -0.1599908173084259, 0.18845494091510773, -0.0873740017414093, 0.17704790830612183, 0.010516420006752014, 0.24918586015701294, -0.6667218208312988, 0.05729740113019943, 0.0863894522190094, 0.19441641867160797, 0.23424403369426727, 0.38220277428627014, -0.032773688435554504, 0.14874733984470367, -0.14697909355163574, -0.25203627347946167, 0.2095852494239807, -0.2586453855037689, 0.09073369204998016, -0.5735853910446167, -0.3051484227180481, -0.2943800687789917, 0.31513142585754395, -0.4015228748321533, -0.24821904301643372, 0.29995089769363403, -0.029995962977409363, 0.09460073709487915, -0.10466662049293518, -0.23352652788162231, -0.35158073902130127, -0.036671869456768036, -0.002342289313673973, -0.04546383395791054, 0.3395688831806183, -0.2401486188173294, -0.31604287028312683, 0.019985709339380264, 0.16127893328666687, 0.36479148268699646, -0.13317662477493286, -0.18163511157035828, 0.4764063358306885, -0.05309651046991348, 0.0519656278192997, -0.01877472549676895, -0.11901409924030304, -0.07371440529823303, -0.25993916392326355, -0.12775109708309174, 0.037110403180122375, 0.20748937129974365, -0.06040013208985329, 0.15049892663955688, 0.4925763010978699, -0.08239592611789703, 0.27258267998695374, -0.0003382675349712372, 0.10202573984861374, 0.22148019075393677, -0.02346407249569893, 0.2189115285873413, -0.4596880078315735, 0.03258908540010452, 0.18851615488529205, 0.2778548002243042, -0.19126281142234802, 0.07266651093959808, 0.1657600998878479, 0.5589634776115417, 0.13668771088123322, 0.256976842880249, -0.07920580357313156, -0.16271495819091797, -0.03480414301156998, 0.11115953326225281, 0.287224143743515, 0.5213750004768372, 0.24956580996513367, -0.2400650680065155, 0.06565451622009277, 0.09801839292049408, -0.057259440422058105, 0.23844939470291138, 0.11156336963176727, 0.2878836989402771, 0.33273160457611084, 0.069654680788517, 0.03179514780640602, -0.3383305072784424, -0.35898256301879883, -0.03814414143562317, 0.4084165096282959, -0.23700030148029327, 0.014085153117775917, -0.3080065846443176, 0.1353801190853119, -0.012360665015876293, -0.18020249903202057, 0.04652133211493492, -0.2103707641363144, 0.06878524273633957, -0.05372804030776024, -0.21892674267292023, 0.3741690218448639, -0.11959879100322723, 0.193720743060112, 0.4160488545894623, -0.026839660480618477, -0.16498267650604248, -0.33925098180770874, -0.21983933448791504, 0.10625278949737549, 0.16049157083034515, 0.036711063235998154, 0.34684091806411743, 0.15931762754917145, 0.08545588701963425, -0.1241006925702095, -0.05570579320192337, 0.016432642936706543, -0.19020497798919678, 0.3138899803161621, 0.23618705570697784, 0.30969852209091187, -0.30922263860702515, -0.10661974549293518, 0.4365842938423157, -0.3333086371421814, -0.12568920850753784, 0.2874685525894165, 0.02483149617910385, -0.28647807240486145, -0.10032579302787781, -0.28808116912841797, -0.27735868096351624, -0.33211806416511536, -0.0062757208943367004, 0.15854300558567047, 0.2570100426673889, 0.22572433948516846, 0.30299806594848633, 0.2754988372325897, 0.12158535420894623, 0.2690315246582031, -0.14181964099407196, -0.015608448535203934, 0.22862696647644043, -0.27422866225242615, -0.43234243988990784, -0.11342425644397736, -0.2823578119277954, 0.10922081768512726, 0.1923634558916092, -0.09842301905155182, -0.06249646842479706, -0.08348877727985382, -0.05004337430000305, -0.045125916600227356, 0.09131118655204773, 0.39529579877853394, 0.19201143085956573, -0.2400340884923935, -0.2560864984989166, -0.07340763509273529, 0.1615474820137024, -0.026939861476421356, -0.21883785724639893, -0.1331825852394104, 0.37127161026000977, 0.10268720984458923, 0.505125880241394, 0.16468673944473267, 0.05015933886170387, 0.18623313307762146, -0.17273187637329102, 0.09156127274036407, -0.03184626251459122, -0.4548857510089874, -0.05508040264248848, -0.0640975832939148, -0.0882154107093811, 0.266193151473999, -0.12801328301429749, 0.0930834710597992, 0.04014402627944946, 0.1506088227033615, -0.294343501329422, -0.015827495604753494, 0.0664270743727684, -0.3019809126853943, 0.15699970722198486, -0.0921827107667923, 0.08242329210042953, -0.2231212556362152, -0.005157759878784418, 0.11193212866783142, 0.0044176653027534485, -0.31402096152305603, -0.27737748622894287, -0.34311071038246155, -0.2590327262878418, -0.18548154830932617, 0.35405656695365906, 0.18018946051597595, 0.4166077971458435, 0.08973942697048187, -0.05526223033666611, 0.027495115995407104, -0.04210080951452255, 0.5572918057441711, -0.41244634985923767, 0.10893416404724121, 0.15489938855171204, 0.1529524177312851, -0.12435537576675415, -0.06649338454008102, -0.2894642949104309, 0.17595595121383667, -0.22056590020656586, 0.14850203692913055, -0.23882260918617249, -0.00795374158769846, 0.07655839622020721, 0.030985232442617416, -0.11187200248241425, 0.07187264412641525, -0.3049045205116272, -0.19809529185295105, -0.5379122495651245, 0.11186952143907547, 0.10803254693746567, 0.19181063771247864, 0.008061923086643219, -0.1046406626701355, -0.21379055082798004, -0.23084789514541626, 0.11819945275783539, 0.07256627082824707, 0.43621891736984253, 0.051403775811195374, -0.07939644157886505, -0.20702673494815826, 0.06129297986626625, 0.5854659676551819, 0.31458789110183716, -0.15517756342887878, -0.11362917721271515, -0.3234168291091919, -0.0467054583132267, 0.2063203901052475, 0.15688465535640717, -0.28604963421821594, 0.32737410068511963, -0.29248204827308655, 0.24608637392520905, 0.4398491382598877, -0.13934984803199768, 0.1212768703699112, -0.09357043355703354, -0.366599440574646, -0.24172855913639069, 0.40461838245391846, -0.08956392109394073, -0.04657890275120735, 0.40520673990249634, 0.15127097070217133, -0.26821884512901306, 0.5147972106933594, 0.18529346585273743, 0.8269582390785217, 0.2752290368080139, 0.051163457334041595, 0.31890666484832764, 0.3702716827392578, -0.054308824241161346, 0.18524175882339478, 0.13066431879997253, -0.34103769063949585, -0.1854579746723175, -0.048313237726688385, -0.15975143015384674, 0.18278373777866364, 0.1086026057600975, -0.29811376333236694, 0.21272282302379608, -0.1878969669342041, 0.08649720996618271, -0.03787519782781601, -0.2454100251197815, 0.3080536425113678, -0.18350940942764282, -0.302442342042923, 0.16387194395065308, -0.011863626539707184, -0.026227425783872604, -0.18817216157913208, -0.06891076266765594, -0.2608773112297058, -0.24808058142662048, 0.04628582298755646, 0.1390332281589508, -0.44013097882270813, 0.592263400554657, 0.17259013652801514, -0.2687307596206665, -0.20921948552131653, -0.07482703030109406, 0.08269514888525009, 0.10173526406288147, 0.005938172340393066, 0.009561993181705475, 0.4133537709712982, 0.05488508194684982, -0.06137104332447052, -0.09480258077383041, 0.36865168809890747, -0.09708228707313538, -0.17116603255271912, 0.2121887505054474, 0.05171423777937889, -0.33376288414001465, 0.09825098514556885, 0.1795797348022461, 0.10146495699882507, -0.27303552627563477, -0.2908453643321991, -0.11854556202888489, -0.2992326617240906, -0.344868540763855, 0.12631818652153015, 0.08041132986545563, -0.3199543058872223, 0.3514913022518158, 0.2554602324962616, -0.14322498440742493, -0.011401519179344177, 0.22039636969566345, 0.18797606229782104, 0.03857313096523285, 0.4687899947166443, -0.022905267775058746, -0.1521792709827423, -0.3557770848274231, -0.0027629882097244263, 0.030769066885113716, -0.41632893681526184, 0.28832730650901794, -0.2263733595609665, 0.15698103606700897, 0.3596687316894531, 0.4121738374233246, 0.06240179017186165, 0.33251532912254333, -0.1542081981897354, -0.4469600319862366, -0.2739616632461548, 0.1030600517988205, -0.05361979082226753, 0.21454939246177673, -0.1938759982585907, 0.41026395559310913, -0.06856870651245117, 0.19832435250282288, -0.37101680040359497, -0.008685562759637833, -0.13316193222999573, 0.2178255170583725, 0.07053347676992416, 0.06595973670482635, -0.06943480670452118, 0.1451970934867859, 0.2091398984193802, 0.28232240676879883, -0.23671984672546387, -0.31507372856140137, 0.016390495002269745, 0.12112763524055481, 0.004797171801328659, -0.013977650552988052, -0.2211773693561554, 0.13103458285331726, -0.18942683935165405, -0.20123571157455444, -0.025638969615101814, -0.14287933707237244, -0.07614850997924805, 0.12951494753360748, 0.30079901218414307, 0.05736205726861954, 0.02733827382326126, -0.0013162977993488312, -0.23187217116355896, -0.272935688495636, -0.06353245675563812, 0.14180445671081543, -0.02160482481122017, -0.09361360967159271, -0.08825457096099854, 0.01305805891752243, -0.02989818900823593, 0.10029669106006622, 0.3894089162349701, -0.5034321546554565, -0.2726497948169708, 0.22140520811080933, 0.1873408854007721, 0.24958571791648865, -0.2355673760175705, 0.001987818628549576, 0.19029787182807922, 0.31232988834381104, -0.40305376052856445, -0.009986387565732002, 0.10884881019592285, -0.0947481095790863, 0.1697930246591568, 0.27675285935401917, -0.10663177073001862, -0.1511068195104599, 0.006678156554698944, 0.2989698052406311, 0.20099198818206787, -0.4751768708229065, 0.2714845836162567, 0.22700704634189606, 0.04220324382185936, 0.06052884832024574, 0.1872379332780838, 0.23914746940135956, 0.42531052231788635, 0.42206913232803345, -0.07062425464391708, 0.5361705422401428, 0.004826076328754425, -0.11599387228488922, -0.03446877747774124, -0.21435363590717316, 0.21715152263641357, 0.31646689772605896, -0.09028254449367523, -0.09756080061197281, 0.16228008270263672, 0.27489015460014343, -0.11424616724252701, -0.1011696383357048, -0.011483915150165558, 0.03889616206288338, -0.2506614327430725, -0.07061894237995148, -0.17272518575191498, -0.10837167501449585, -0.024721384048461914, -0.2650902569293976, 0.20119649171829224, 0.19161583483219147, 0.3377454876899719, -0.0000562816858291626, 0.023876160383224487, -0.22750084102153778, 0.014537982642650604, 0.4773048162460327, 0.272611528635025, -0.38497185707092285, 0.016363853588700294, 0.14487940073013306, 0.11183604598045349, -0.22809794545173645, 0.2767229676246643, 0.631988525390625, 0.42951396107673645, -0.07620224356651306, -0.16885897517204285, 0.03945110738277435, -0.22155216336250305, -0.10505229234695435, 0.1542385369539261, 0.015695206820964813, 0.12913335859775543, 0.2133466750383377, 0.22133493423461914, -0.22301499545574188, 0.12572430074214935, 0.253006249666214, -0.04391993582248688, -0.10036948323249817, 0.059015240520238876, -0.03266789764165878, -0.5640398263931274, -0.1029278039932251, -0.047377072274684906, -0.3923264443874359, -0.19195197522640228, 0.4272457957267761, -0.20527997612953186, 0.19443067908287048, -0.33184561133384705, 0.12681590020656586, 0.14817871153354645, 0.3899006247520447, 0.18149805068969727, -0.010490112006664276, -0.3196038007736206, -0.1383783519268036, -0.46316617727279663, 0.2695225477218628, -0.13026776909828186, 0.055634282529354095, -0.11657735705375671, 0.18452265858650208, -0.14453938603401184, 0.2579147517681122, 0.2946664094924927, -0.0018551979446783662, -0.14168842136859894, 0.21781405806541443, -0.41723474860191345, 0.01717889867722988, 0.018289532512426376, -0.02941143698990345, 0.15779823064804077, -0.41344547271728516, -0.12580977380275726, -0.14218442142009735, 0.19543388485908508, -0.3353341817855835, -0.0931108146905899, 0.14880584180355072, -0.02746981382369995, 0.35495468974113464, 0.15168550610542297, 0.4302510917186737, -0.21117326617240906, 0.13816547393798828, -0.12497161328792572, -0.31315141916275024, -0.011596545577049255, 0.17704692482948303, 0.3888820707798004, 0.3304320275783539, 0.15342378616333008, -0.2953548729419708, -0.14473967254161835, 0.02034096233546734, 0.10942329466342926, 0.11060834676027298, -0.19611327350139618, 0.44031742215156555, 0.007967248558998108, -0.05450645834207535, -0.0769212618470192, -0.03463213890790939, 0.11078396439552307, 0.17734035849571228, -0.27361956238746643, -0.6913340091705322, 0.4529777765274048, -0.44141584634780884, -0.4601197838783264, -0.0811866894364357, 0.3141782283782959, -0.03249683231115341, -0.06257208436727524, -0.2927192449569702, 0.027903780341148376, 0.29255837202072144, 0.09449455142021179, -0.21734851598739624, 0.3600305914878845, -0.12249831855297089, 0.1693536341190338, -0.028058253228664398, 0.1530919075012207, -0.0061799511313438416, -0.0840131863951683, -0.0006350427865982056, -0.3253878951072693 ]
https://github.com/huggingface/datasets/issues/6650
AttributeError: 'InMemoryTable' object has no attribute '_batches'
No, it doesn't, it runs fine. But what's really strange is that the error just went away after I reran the data prep script for conversion from csv to a datasets object. I realize that's not very helpful since the problem isn't reproducible.
### Describe the bug ``` Traceback (most recent call last): File "finetune.py", line 103, in <module> main(args) File "finetune.py", line 45, in main data_tokenized = data.map(partial(funcs.tokenize_function, tokenizer, File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/dataset_dict.py", line 868, in map { File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/dataset_dict.py", line 869, in <dictcomp> k: dataset.map( File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3093, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3432, in _map_single arrow_formatted_shard = shard.with_format("arrow") File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2667, in with_format dataset = copy.deepcopy(self) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 146, in deepcopy y = copier(x, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 153, in deepcopy y = copier(memo) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/table.py", line 176, in __deepcopy__ memo[id(self._batches)] = list(self._batches) AttributeError: 'InMemoryTable' object has no attribute '_batches' ``` ### Steps to reproduce the bug I'm running an MLOps flow using AzureML. The error appears when I run the following function in my training script: ```python data_tokenized = data.map(partial(funcs.tokenize_function, tokenizer, seq_length), batched=True, batch_size=batch_size, remove_columns=['col1', 'col2']) ``` ```python def tokenize_function(tok, seq_length, example) # Pad so that each batch has the same sequence length inp = tok(example['col1'], padding=True, truncation=True) outp = tok(example['col2'], padding="max_length", max_length=seq_length) res = { 'input_ids': inp['input_ids'], 'attention_mask': inp['attention_mask'], 'decoder_input_ids': outp['input_ids'], 'labels': outp['input_ids'], 'decoder_attention_mask': outp['attention_mask'] } return res ``` ### Expected behavior Processing proceeds without errors. I ran this same workflow 2 weeks ago without a problem. I recreated the environment since then but it doesn't appear that datasets versions have changed since Dec. '23. ### Environment info datasets 2.16.1 transformers 4.35.2 pyarrow 15.0.0 pyarrow-hotfix 0.6 torch 2.0.1 I'm not using the latest transformers version because there was an error due to a conflict with Azure mlflow when I tried the last time.
43
AttributeError: 'InMemoryTable' object has no attribute '_batches' ### Describe the bug ``` Traceback (most recent call last): File "finetune.py", line 103, in <module> main(args) File "finetune.py", line 45, in main data_tokenized = data.map(partial(funcs.tokenize_function, tokenizer, File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/dataset_dict.py", line 868, in map { File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/dataset_dict.py", line 869, in <dictcomp> k: dataset.map( File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3093, in map for rank, done, content in Dataset._map_single(**dataset_kwargs): File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 3432, in _map_single arrow_formatted_shard = shard.with_format("arrow") File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2667, in with_format dataset = copy.deepcopy(self) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 146, in deepcopy y = copier(x, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/opt/conda/envs/ptca/lib/python3.8/copy.py", line 153, in deepcopy y = copier(memo) File "/opt/conda/envs/ptca/lib/python3.8/site-packages/datasets/table.py", line 176, in __deepcopy__ memo[id(self._batches)] = list(self._batches) AttributeError: 'InMemoryTable' object has no attribute '_batches' ``` ### Steps to reproduce the bug I'm running an MLOps flow using AzureML. The error appears when I run the following function in my training script: ```python data_tokenized = data.map(partial(funcs.tokenize_function, tokenizer, seq_length), batched=True, batch_size=batch_size, remove_columns=['col1', 'col2']) ``` ```python def tokenize_function(tok, seq_length, example) # Pad so that each batch has the same sequence length inp = tok(example['col1'], padding=True, truncation=True) outp = tok(example['col2'], padding="max_length", max_length=seq_length) res = { 'input_ids': inp['input_ids'], 'attention_mask': inp['attention_mask'], 'decoder_input_ids': outp['input_ids'], 'labels': outp['input_ids'], 'decoder_attention_mask': outp['attention_mask'] } return res ``` ### Expected behavior Processing proceeds without errors. I ran this same workflow 2 weeks ago without a problem. I recreated the environment since then but it doesn't appear that datasets versions have changed since Dec. '23. ### Environment info datasets 2.16.1 transformers 4.35.2 pyarrow 15.0.0 pyarrow-hotfix 0.6 torch 2.0.1 I'm not using the latest transformers version because there was an error due to a conflict with Azure mlflow when I tried the last time. No, it doesn't, it runs fine. But what's really strange is that the error just went away after I reran the data prep script for conversion from csv to a datasets object. I realize that's not very helpful since the problem isn't reproducible.
[ -0.29193076491355896, -0.05730609595775604, -0.14919856190681458, 0.2503703832626343, 0.3699331283569336, 0.0331215038895607, 0.23557183146476746, 0.3699260950088501, -0.3387131690979004, 0.19476646184921265, -0.18983161449432373, 0.37972354888916016, -0.08334936201572418, 0.12550480663776398, -0.002201044000685215, -0.12222671508789062, 0.08326008915901184, 0.15972450375556946, -0.010805509984493256, -0.1069834977388382, -0.3507539629936218, 0.08173366636037827, -0.2875651717185974, -0.008405640721321106, -0.22473174333572388, -0.23459339141845703, 0.049051716923713684, -0.10095281153917313, -0.028400158509612083, -0.6059597134590149, 0.16984052956104279, -0.15129071474075317, -0.11106103658676147, 0.4583424925804138, -0.00011134566739201546, 0.1504436880350113, 0.2849867343902588, 0.04159267991781235, -0.39333850145339966, 0.08241662383079529, -0.1508232057094574, -0.07331936806440353, -0.02285481058061123, -0.2134401500225067, 0.019413501024246216, 0.2525597810745239, -0.26271942257881165, -0.5123488903045654, 0.20370817184448242, 0.316326379776001, 0.24233359098434448, 0.05454526096582413, 0.0381937213242054, -0.2563045024871826, 0.39344900846481323, -0.08987754583358765, -0.21738260984420776, 0.09270873665809631, 0.12666833400726318, -0.2685505449771881, 0.01885095238685608, 0.33265429735183716, -0.12667246162891388, 0.23685318231582642, -0.073668472468853, 0.13350340723991394, 0.28833651542663574, -0.17957547307014465, 0.20697984099388123, 0.12345746159553528, -0.08416106551885605, -0.3041691482067108, -0.30883386731147766, -0.08602119982242584, -0.016922734677791595, -0.5507357120513916, -0.16087979078292847, 0.14729703962802887, -0.07760216295719147, 0.02080477774143219, 0.1016756147146225, 0.2092806100845337, -0.16708001494407654, 0.14087775349617004, 0.016945891082286835, 0.44224607944488525, -0.05043630301952362, 0.10173296928405762, 0.1555488258600235, -0.1026705801486969, -0.0490899495780468, 0.17206071317195892, -0.32100939750671387, -0.05071991682052612, -0.48433035612106323, -0.032629095017910004, 0.19701489806175232, -0.0544738695025444, 0.3002103567123413, 0.12440495193004608, 0.01005801185965538, 0.09452736377716064, 0.4106733500957489, 0.09607796370983124, 0.06583234667778015, 0.334725022315979, 0.26388058066368103, 0.5171715021133423, 0.05041319504380226, 0.06921377778053284, -0.12918084859848022, 0.010312763974070549, -0.015726493671536446, -0.36841389536857605, 0.18828816711902618, 0.30874261260032654, 0.3257814049720764, -0.05201834440231323, -0.3902720808982849, -0.000569668598473072, 0.2132854461669922, 0.04259341582655907, 0.0732082650065422, 0.6891337633132935, -0.006743260193616152, -0.08609848469495773, -0.13524606823921204, 0.18665044009685516, -0.03295742720365524, -0.07422272861003876, -0.3314628005027771, 0.17762868106365204, -0.230527862906456, -0.022599155083298683, 0.06675949692726135, -0.009327022358775139, 0.19730575382709503, -0.20468872785568237, 0.4666316509246826, -0.1771596372127533, -0.005647335201501846, -0.38727688789367676, 0.14568372070789337, 0.16854175925254822, -0.10593421757221222, 0.03244791179895401, 0.43841761350631714, -0.030082253739237785, 0.04547377675771713, -0.001954786479473114, -0.373349130153656, -0.3810170292854309, -0.06636514514684677, 0.3018644452095032, 0.20361506938934326, 0.023082153871655464, -0.4514687955379486, -0.22303415834903717, 0.450897753238678, -0.0680004358291626, -0.02913481742143631, -0.1913902759552002, -0.15835259854793549, -0.43980222940444946, 0.14299163222312927, 0.30488747358322144, -0.3520391881465912, 0.20811998844146729, -0.21986833214759827, 0.030745474621653557, 0.23360031843185425, 0.10134515166282654, -0.15202197432518005, 0.21334555745124817, -0.08759250491857529, 0.20760007202625275, 0.41793856024742126, -0.45110443234443665, -0.5092655420303345, 0.08230029046535492, -0.09335498511791229, -0.3393595218658447, 0.08466245979070663, -0.19434988498687744, 0.39887377619743347, 0.005998932756483555, 0.5042550563812256, 0.18282708525657654, 0.015889964997768402, 0.12340351194143295, -0.24942155182361603, -0.1599908173084259, 0.18845494091510773, -0.0873740017414093, 0.17704790830612183, 0.010516420006752014, 0.24918586015701294, -0.6667218208312988, 0.05729740113019943, 0.0863894522190094, 0.19441641867160797, 0.23424403369426727, 0.38220277428627014, -0.032773688435554504, 0.14874733984470367, -0.14697909355163574, -0.25203627347946167, 0.2095852494239807, -0.2586453855037689, 0.09073369204998016, -0.5735853910446167, -0.3051484227180481, -0.2943800687789917, 0.31513142585754395, -0.4015228748321533, -0.24821904301643372, 0.29995089769363403, -0.029995962977409363, 0.09460073709487915, -0.10466662049293518, -0.23352652788162231, -0.35158073902130127, -0.036671869456768036, -0.002342289313673973, -0.04546383395791054, 0.3395688831806183, -0.2401486188173294, -0.31604287028312683, 0.019985709339380264, 0.16127893328666687, 0.36479148268699646, -0.13317662477493286, -0.18163511157035828, 0.4764063358306885, -0.05309651046991348, 0.0519656278192997, -0.01877472549676895, -0.11901409924030304, -0.07371440529823303, -0.25993916392326355, -0.12775109708309174, 0.037110403180122375, 0.20748937129974365, -0.06040013208985329, 0.15049892663955688, 0.4925763010978699, -0.08239592611789703, 0.27258267998695374, -0.0003382675349712372, 0.10202573984861374, 0.22148019075393677, -0.02346407249569893, 0.2189115285873413, -0.4596880078315735, 0.03258908540010452, 0.18851615488529205, 0.2778548002243042, -0.19126281142234802, 0.07266651093959808, 0.1657600998878479, 0.5589634776115417, 0.13668771088123322, 0.256976842880249, -0.07920580357313156, -0.16271495819091797, -0.03480414301156998, 0.11115953326225281, 0.287224143743515, 0.5213750004768372, 0.24956580996513367, -0.2400650680065155, 0.06565451622009277, 0.09801839292049408, -0.057259440422058105, 0.23844939470291138, 0.11156336963176727, 0.2878836989402771, 0.33273160457611084, 0.069654680788517, 0.03179514780640602, -0.3383305072784424, -0.35898256301879883, -0.03814414143562317, 0.4084165096282959, -0.23700030148029327, 0.014085153117775917, -0.3080065846443176, 0.1353801190853119, -0.012360665015876293, -0.18020249903202057, 0.04652133211493492, -0.2103707641363144, 0.06878524273633957, -0.05372804030776024, -0.21892674267292023, 0.3741690218448639, -0.11959879100322723, 0.193720743060112, 0.4160488545894623, -0.026839660480618477, -0.16498267650604248, -0.33925098180770874, -0.21983933448791504, 0.10625278949737549, 0.16049157083034515, 0.036711063235998154, 0.34684091806411743, 0.15931762754917145, 0.08545588701963425, -0.1241006925702095, -0.05570579320192337, 0.016432642936706543, -0.19020497798919678, 0.3138899803161621, 0.23618705570697784, 0.30969852209091187, -0.30922263860702515, -0.10661974549293518, 0.4365842938423157, -0.3333086371421814, -0.12568920850753784, 0.2874685525894165, 0.02483149617910385, -0.28647807240486145, -0.10032579302787781, -0.28808116912841797, -0.27735868096351624, -0.33211806416511536, -0.0062757208943367004, 0.15854300558567047, 0.2570100426673889, 0.22572433948516846, 0.30299806594848633, 0.2754988372325897, 0.12158535420894623, 0.2690315246582031, -0.14181964099407196, -0.015608448535203934, 0.22862696647644043, -0.27422866225242615, -0.43234243988990784, -0.11342425644397736, -0.2823578119277954, 0.10922081768512726, 0.1923634558916092, -0.09842301905155182, -0.06249646842479706, -0.08348877727985382, -0.05004337430000305, -0.045125916600227356, 0.09131118655204773, 0.39529579877853394, 0.19201143085956573, -0.2400340884923935, -0.2560864984989166, -0.07340763509273529, 0.1615474820137024, -0.026939861476421356, -0.21883785724639893, -0.1331825852394104, 0.37127161026000977, 0.10268720984458923, 0.505125880241394, 0.16468673944473267, 0.05015933886170387, 0.18623313307762146, -0.17273187637329102, 0.09156127274036407, -0.03184626251459122, -0.4548857510089874, -0.05508040264248848, -0.0640975832939148, -0.0882154107093811, 0.266193151473999, -0.12801328301429749, 0.0930834710597992, 0.04014402627944946, 0.1506088227033615, -0.294343501329422, -0.015827495604753494, 0.0664270743727684, -0.3019809126853943, 0.15699970722198486, -0.0921827107667923, 0.08242329210042953, -0.2231212556362152, -0.005157759878784418, 0.11193212866783142, 0.0044176653027534485, -0.31402096152305603, -0.27737748622894287, -0.34311071038246155, -0.2590327262878418, -0.18548154830932617, 0.35405656695365906, 0.18018946051597595, 0.4166077971458435, 0.08973942697048187, -0.05526223033666611, 0.027495115995407104, -0.04210080951452255, 0.5572918057441711, -0.41244634985923767, 0.10893416404724121, 0.15489938855171204, 0.1529524177312851, -0.12435537576675415, -0.06649338454008102, -0.2894642949104309, 0.17595595121383667, -0.22056590020656586, 0.14850203692913055, -0.23882260918617249, -0.00795374158769846, 0.07655839622020721, 0.030985232442617416, -0.11187200248241425, 0.07187264412641525, -0.3049045205116272, -0.19809529185295105, -0.5379122495651245, 0.11186952143907547, 0.10803254693746567, 0.19181063771247864, 0.008061923086643219, -0.1046406626701355, -0.21379055082798004, -0.23084789514541626, 0.11819945275783539, 0.07256627082824707, 0.43621891736984253, 0.051403775811195374, -0.07939644157886505, -0.20702673494815826, 0.06129297986626625, 0.5854659676551819, 0.31458789110183716, -0.15517756342887878, -0.11362917721271515, -0.3234168291091919, -0.0467054583132267, 0.2063203901052475, 0.15688465535640717, -0.28604963421821594, 0.32737410068511963, -0.29248204827308655, 0.24608637392520905, 0.4398491382598877, -0.13934984803199768, 0.1212768703699112, -0.09357043355703354, -0.366599440574646, -0.24172855913639069, 0.40461838245391846, -0.08956392109394073, -0.04657890275120735, 0.40520673990249634, 0.15127097070217133, -0.26821884512901306, 0.5147972106933594, 0.18529346585273743, 0.8269582390785217, 0.2752290368080139, 0.051163457334041595, 0.31890666484832764, 0.3702716827392578, -0.054308824241161346, 0.18524175882339478, 0.13066431879997253, -0.34103769063949585, -0.1854579746723175, -0.048313237726688385, -0.15975143015384674, 0.18278373777866364, 0.1086026057600975, -0.29811376333236694, 0.21272282302379608, -0.1878969669342041, 0.08649720996618271, -0.03787519782781601, -0.2454100251197815, 0.3080536425113678, -0.18350940942764282, -0.302442342042923, 0.16387194395065308, -0.011863626539707184, -0.026227425783872604, -0.18817216157913208, -0.06891076266765594, -0.2608773112297058, -0.24808058142662048, 0.04628582298755646, 0.1390332281589508, -0.44013097882270813, 0.592263400554657, 0.17259013652801514, -0.2687307596206665, -0.20921948552131653, -0.07482703030109406, 0.08269514888525009, 0.10173526406288147, 0.005938172340393066, 0.009561993181705475, 0.4133537709712982, 0.05488508194684982, -0.06137104332447052, -0.09480258077383041, 0.36865168809890747, -0.09708228707313538, -0.17116603255271912, 0.2121887505054474, 0.05171423777937889, -0.33376288414001465, 0.09825098514556885, 0.1795797348022461, 0.10146495699882507, -0.27303552627563477, -0.2908453643321991, -0.11854556202888489, -0.2992326617240906, -0.344868540763855, 0.12631818652153015, 0.08041132986545563, -0.3199543058872223, 0.3514913022518158, 0.2554602324962616, -0.14322498440742493, -0.011401519179344177, 0.22039636969566345, 0.18797606229782104, 0.03857313096523285, 0.4687899947166443, -0.022905267775058746, -0.1521792709827423, -0.3557770848274231, -0.0027629882097244263, 0.030769066885113716, -0.41632893681526184, 0.28832730650901794, -0.2263733595609665, 0.15698103606700897, 0.3596687316894531, 0.4121738374233246, 0.06240179017186165, 0.33251532912254333, -0.1542081981897354, -0.4469600319862366, -0.2739616632461548, 0.1030600517988205, -0.05361979082226753, 0.21454939246177673, -0.1938759982585907, 0.41026395559310913, -0.06856870651245117, 0.19832435250282288, -0.37101680040359497, -0.008685562759637833, -0.13316193222999573, 0.2178255170583725, 0.07053347676992416, 0.06595973670482635, -0.06943480670452118, 0.1451970934867859, 0.2091398984193802, 0.28232240676879883, -0.23671984672546387, -0.31507372856140137, 0.016390495002269745, 0.12112763524055481, 0.004797171801328659, -0.013977650552988052, -0.2211773693561554, 0.13103458285331726, -0.18942683935165405, -0.20123571157455444, -0.025638969615101814, -0.14287933707237244, -0.07614850997924805, 0.12951494753360748, 0.30079901218414307, 0.05736205726861954, 0.02733827382326126, -0.0013162977993488312, -0.23187217116355896, -0.272935688495636, -0.06353245675563812, 0.14180445671081543, -0.02160482481122017, -0.09361360967159271, -0.08825457096099854, 0.01305805891752243, -0.02989818900823593, 0.10029669106006622, 0.3894089162349701, -0.5034321546554565, -0.2726497948169708, 0.22140520811080933, 0.1873408854007721, 0.24958571791648865, -0.2355673760175705, 0.001987818628549576, 0.19029787182807922, 0.31232988834381104, -0.40305376052856445, -0.009986387565732002, 0.10884881019592285, -0.0947481095790863, 0.1697930246591568, 0.27675285935401917, -0.10663177073001862, -0.1511068195104599, 0.006678156554698944, 0.2989698052406311, 0.20099198818206787, -0.4751768708229065, 0.2714845836162567, 0.22700704634189606, 0.04220324382185936, 0.06052884832024574, 0.1872379332780838, 0.23914746940135956, 0.42531052231788635, 0.42206913232803345, -0.07062425464391708, 0.5361705422401428, 0.004826076328754425, -0.11599387228488922, -0.03446877747774124, -0.21435363590717316, 0.21715152263641357, 0.31646689772605896, -0.09028254449367523, -0.09756080061197281, 0.16228008270263672, 0.27489015460014343, -0.11424616724252701, -0.1011696383357048, -0.011483915150165558, 0.03889616206288338, -0.2506614327430725, -0.07061894237995148, -0.17272518575191498, -0.10837167501449585, -0.024721384048461914, -0.2650902569293976, 0.20119649171829224, 0.19161583483219147, 0.3377454876899719, -0.0000562816858291626, 0.023876160383224487, -0.22750084102153778, 0.014537982642650604, 0.4773048162460327, 0.272611528635025, -0.38497185707092285, 0.016363853588700294, 0.14487940073013306, 0.11183604598045349, -0.22809794545173645, 0.2767229676246643, 0.631988525390625, 0.42951396107673645, -0.07620224356651306, -0.16885897517204285, 0.03945110738277435, -0.22155216336250305, -0.10505229234695435, 0.1542385369539261, 0.015695206820964813, 0.12913335859775543, 0.2133466750383377, 0.22133493423461914, -0.22301499545574188, 0.12572430074214935, 0.253006249666214, -0.04391993582248688, -0.10036948323249817, 0.059015240520238876, -0.03266789764165878, -0.5640398263931274, -0.1029278039932251, -0.047377072274684906, -0.3923264443874359, -0.19195197522640228, 0.4272457957267761, -0.20527997612953186, 0.19443067908287048, -0.33184561133384705, 0.12681590020656586, 0.14817871153354645, 0.3899006247520447, 0.18149805068969727, -0.010490112006664276, -0.3196038007736206, -0.1383783519268036, -0.46316617727279663, 0.2695225477218628, -0.13026776909828186, 0.055634282529354095, -0.11657735705375671, 0.18452265858650208, -0.14453938603401184, 0.2579147517681122, 0.2946664094924927, -0.0018551979446783662, -0.14168842136859894, 0.21781405806541443, -0.41723474860191345, 0.01717889867722988, 0.018289532512426376, -0.02941143698990345, 0.15779823064804077, -0.41344547271728516, -0.12580977380275726, -0.14218442142009735, 0.19543388485908508, -0.3353341817855835, -0.0931108146905899, 0.14880584180355072, -0.02746981382369995, 0.35495468974113464, 0.15168550610542297, 0.4302510917186737, -0.21117326617240906, 0.13816547393798828, -0.12497161328792572, -0.31315141916275024, -0.011596545577049255, 0.17704692482948303, 0.3888820707798004, 0.3304320275783539, 0.15342378616333008, -0.2953548729419708, -0.14473967254161835, 0.02034096233546734, 0.10942329466342926, 0.11060834676027298, -0.19611327350139618, 0.44031742215156555, 0.007967248558998108, -0.05450645834207535, -0.0769212618470192, -0.03463213890790939, 0.11078396439552307, 0.17734035849571228, -0.27361956238746643, -0.6913340091705322, 0.4529777765274048, -0.44141584634780884, -0.4601197838783264, -0.0811866894364357, 0.3141782283782959, -0.03249683231115341, -0.06257208436727524, -0.2927192449569702, 0.027903780341148376, 0.29255837202072144, 0.09449455142021179, -0.21734851598739624, 0.3600305914878845, -0.12249831855297089, 0.1693536341190338, -0.028058253228664398, 0.1530919075012207, -0.0061799511313438416, -0.0840131863951683, -0.0006350427865982056, -0.3253878951072693 ]
https://github.com/huggingface/datasets/issues/6644
Support fsspec 2023.12
The pinned fsspec version range dependency conflict has been affecting several of our users in https://github.com/iterative/dvc. I've opened an initial PR that I think should resolve the glob behavior changes with using datasets + the latest fsspec release. Please let us know if there's any other fsspec related behavior in datasets that needs to be updated to get 2024.2 supported, we'd like to get this conflict resolved as quickly as possible and we're willing to contribute any additional work that's required here. cc @dberenbaum
Support fsspec 2023.12 by handling previous and new glob behavior.
84
Support fsspec 2023.12 Support fsspec 2023.12 by handling previous and new glob behavior. The pinned fsspec version range dependency conflict has been affecting several of our users in https://github.com/iterative/dvc. I've opened an initial PR that I think should resolve the glob behavior changes with using datasets + the latest fsspec release. Please let us know if there's any other fsspec related behavior in datasets that needs to be updated to get 2024.2 supported, we'd like to get this conflict resolved as quickly as possible and we're willing to contribute any additional work that's required here. cc @dberenbaum
[ -0.460008442401886, 0.1365230679512024, -0.1425005942583084, -0.03896232694387436, -0.06342202425003052, -0.434259295463562, 0.09270447492599487, 0.2794745862483978, -0.22806322574615479, 0.2362087070941925, 0.16282853484153748, 0.18400196731090546, -0.131169393658638, 0.8971191048622131, -0.24821072816848755, 0.05445324257016182, 0.24307546019554138, 0.1723707616329193, -0.4660928547382355, 0.1851007044315338, -0.11983422189950943, 0.26665759086608887, -0.34544962644577026, -0.3992806673049927, -0.3641245663166046, -0.07123785465955734, 0.025406798347830772, 0.22621527314186096, -0.2156609445810318, -0.43674567341804504, 0.66472327709198, 0.2918171286582947, 0.2255638837814331, 0.13441692292690277, -0.00011535431985976174, -0.17687350511550903, 0.16147416830062866, -0.03564506024122238, -0.032808929681777954, -0.063142791390419, -0.13051223754882812, -0.1041073426604271, -0.012099095620214939, 0.20361164212226868, -0.0332023948431015, -0.327092707157135, -0.23521973192691803, -0.3740253746509552, 0.3991329073905945, 0.04852721095085144, 0.16467773914337158, -0.14607982337474823, 0.18477065861225128, -0.11686187237501144, 0.13186149299144745, -0.3056727647781372, -0.2106923758983612, -0.0915101170539856, 0.4174024164676666, -0.06117871403694153, -0.07424400001764297, 0.07962387800216675, 0.04290028661489487, 0.14754389226436615, 0.22345706820487976, -0.24338309466838837, 0.041726864874362946, -0.4026430547237396, 0.15778860449790955, -0.045287780463695526, 0.46514955163002014, -0.2398279309272766, -0.2748356759548187, -0.21721071004867554, -0.19157011806964874, -0.2490498572587967, 0.43655821681022644, -0.3900851905345917, 0.2551961839199066, 0.14498351514339447, 0.11393716186285019, -0.011092360131442547, -0.2173662930727005, 0.0014615729451179504, -0.20764532685279846, 0.07235395908355713, -0.3150089681148529, -0.00047184526920318604, 0.2634713351726532, -0.2183387726545334, 0.2101764976978302, -0.05265532433986664, -0.20585879683494568, -0.004795534536242485, -0.2264544516801834, -0.28363239765167236, 0.015175748616456985, 0.32862451672554016, 0.14596006274223328, 0.42127835750579834, -0.43320709466934204, 0.21240514516830444, -0.41027724742889404, 0.016255594789981842, 0.15041446685791016, 0.11149740219116211, 0.20889461040496826, 0.03649962693452835, 0.3087582588195801, -0.016972705721855164, -0.03481728583574295, 0.15888744592666626, 0.126684308052063, -0.5892428755760193, -0.2278519570827484, 0.17827579379081726, 0.47504723072052, -0.4747035503387451, -0.3012281060218811, 0.15879462659358978, -0.27510467171669006, -0.20473335683345795, -0.14494776725769043, 0.1123366728425026, 0.17082735896110535, 0.7843657732009888, -0.20533911883831024, 0.04946461319923401, -0.04371023178100586, -0.21771331131458282, -0.039146069437265396, -0.17426945269107819, -0.021112384274601936, 0.17045481503009796, 0.13996578752994537, -0.3274245262145996, -0.04994512349367142, 0.11953956633806229, 0.3392665982246399, 0.16753485798835754, -0.24767419695854187, 0.07396730780601501, 0.15481898188591003, 0.1557416468858719, -0.36064472794532776, 0.07710596174001694, -0.1714065819978714, 0.03899095207452774, -0.13785578310489655, 0.13941888511180878, 0.0699954703450203, -0.03764050453901291, -0.18926383554935455, 0.07831554114818573, -0.09351104497909546, 0.02669992670416832, -0.43313291668891907, 0.18101124465465546, -0.4296983778476715, -0.14168418943881989, 0.08233335614204407, -0.11534054577350616, -0.15595993399620056, -0.31712794303894043, 0.05368249863386154, 0.18971990048885345, -0.6752727627754211, -0.011304844170808792, 0.10359913110733032, -0.03133601322770119, -0.026424162089824677, -0.08568704128265381, -0.0931655615568161, -0.5292168855667114, -0.018989110365509987, 0.05218309164047241, 0.058226361870765686, -0.20357495546340942, -0.7024993896484375, 0.36461523175239563, 0.024082183837890625, 0.15891088545322418, 0.25998708605766296, -0.031246855854988098, 0.1610671728849411, -0.4550751745700836, -0.18085059523582458, -0.024290192872285843, 0.05103929713368416, -0.058844663202762604, -0.20870725810527802, -0.2963387966156006, 0.11670705676078796, -0.04187238588929176, 0.004031326621770859, -0.09328589588403702, 0.18585199117660522, -0.08990488201379776, 0.2301783263683319, -0.011850062757730484, 0.017047539353370667, 0.10707519948482513, 0.7080668210983276, 0.02641766518354416, 0.11206758767366409, -0.24168282747268677, -0.7520757913589478, 0.29323649406433105, -0.04120466485619545, -0.3457106351852417, 0.43017542362213135, -0.05612782761454582, -0.06488775461912155, -0.04948189854621887, -0.09861928224563599, -0.3045097291469574, 0.052281565964221954, -0.09590764343738556, 0.1036580502986908, -0.1277562826871872, -0.23502971231937408, 0.24705743789672852, 0.06811489164829254, -0.05123046040534973, 0.2511940598487854, 0.5407406687736511, -0.12067911773920059, -0.27908098697662354, 0.3987608253955841, 0.25454872846603394, 0.26181697845458984, -0.270883172750473, -0.04692395031452179, 0.46252620220184326, 0.21564874053001404, 0.2567785382270813, -0.06228193640708923, 0.7533000707626343, 0.2639313340187073, 0.007541533559560776, -0.035996079444885254, -0.2723550796508789, -0.19189278781414032, 0.17938140034675598, 0.3046906888484955, 0.2148800641298294, -0.0469193197786808, -0.035385020077228546, -0.12418729066848755, -0.10557542741298676, 0.12121923267841339, -0.025918899103999138, 0.0028127189725637436, -0.06104457378387451, -0.1515866369009018, 0.027187872678041458, 0.39851880073547363, 0.28641176223754883, -0.23875568807125092, 0.5132220387458801, 0.3412414491176605, -0.002361360937356949, -0.16871914267539978, -0.013988178223371506, -0.0933399423956871, -0.11369805783033371, 0.40508726239204407, 0.36533820629119873, 0.35054904222488403, 0.3317837417125702, -0.12846733629703522, -0.0549304261803627, -0.052525799721479416, -0.1430809199810028, 0.10581653565168381, -0.1590762436389923, 0.3191292881965637, 0.011637963354587555, 0.13792836666107178, 0.295910507440567, 0.09602463990449905, 0.10338672995567322, -0.06643342971801758, 0.016862215474247932, -0.09773197770118713, -0.20525291562080383, -0.5582850575447083, -0.411377876996994, -0.07806914299726486, -0.03196989744901657, -0.07422345876693726, 0.012666137889027596, 0.10728774964809418, 0.4393131732940674, 0.0006611086428165436, 0.36393973231315613, -0.008217491209506989, 0.43598273396492004, -0.1575552225112915, 0.07314234226942062, -0.14950457215309143, 0.2630634605884552, -0.25027337670326233, 0.10518968105316162, 0.2521345317363739, -0.22143545746803284, 0.16894826292991638, 0.2768752872943878, -0.0677892416715622, -0.4690970778465271, -0.5318471789360046, 0.17153435945510864, -0.06074021756649017, 0.16643571853637695, 0.18359744548797607, -0.13516117632389069, 0.3944748044013977, -0.010983621701598167, -0.23992592096328735, -0.19203010201454163, -0.16379579901695251, -0.3660562038421631, -0.07830779254436493, 0.053729455918073654, -0.2520392835140228, -0.26253315806388855, 0.16301023960113525, -0.32733526825904846, 0.3920179605484009, -0.17326483130455017, 0.0006196573376655579, 0.06838960200548172, 0.12402278184890747, -0.19622118771076202, 0.12926848232746124, -0.18712766468524933, -0.1473112404346466, 0.021842021495103836, 0.16491258144378662, -0.09028466045856476, -0.3116598129272461, -0.03421013429760933, 0.14627201855182648, -0.02314286306500435, 0.040670424699783325, -0.29348960518836975, -0.43013718724250793, -0.23564468324184418, 0.20485219359397888, 0.11978472024202347, -0.3159237504005432, 0.5039321184158325, 0.24956856667995453, -0.16949054598808289, -0.25379112362861633, -0.2627345025539398, 0.2897377610206604, 0.12192671000957489, -0.12002413719892502, 0.20511209964752197, -0.15874269604682922, 0.3057621419429779, 0.3878466486930847, 0.21388986706733704, -0.36823731660842896, 0.39754369854927063, 0.2096516191959381, 0.3438992500305176, -0.15845075249671936, 0.05670228600502014, 0.17666232585906982, -0.09627623856067657, 0.07329273968935013, 0.32828497886657715, -0.05378226190805435, -0.11068687587976456, -0.019928494468331337, -0.19258402287960052, 0.06999468803405762, -0.08935005962848663, -0.06809213757514954, -0.2124260663986206, 0.22915002703666687, 0.02116336300969124, -0.1171751469373703, 0.12487813830375671, 0.054807133972644806, 0.13098321855068207, -0.16716508567333221, 0.22113043069839478, 0.10491745918989182, -0.043805792927742004, 0.08056921511888504, -0.17671188712120056, 0.6008233428001404, 0.290730357170105, 0.031766049563884735, -0.21157091856002808, -0.0707583874464035, -0.2554627060890198, -0.11121126264333725, 0.1366591900587082, -0.193120077252388, 0.18876242637634277, 0.11398474872112274, -0.18154412508010864, 0.01503056101500988, -0.13158100843429565, -0.08961658179759979, 0.18916597962379456, 0.0618225634098053, 0.352701336145401, -0.1591987907886505, -0.4500895142555237, 0.016182687133550644, -0.2673788070678711, 0.21738949418067932, 0.1856585294008255, 0.0204244963824749, 0.21414592862129211, -0.0699915885925293, -0.2084517478942871, 0.15706214308738708, -0.07497276365756989, -0.5908846259117126, -0.2753608226776123, 0.018798278644680977, -0.4326309561729431, -0.0077462270855903625, -0.019313987344503403, 0.18190518021583557, 0.1404496282339096, 0.0716608464717865, 0.4089302718639374, 0.2868884801864624, 0.6195971965789795, 0.07593921571969986, 0.04231589660048485, 0.06566614657640457, 0.13013002276420593, 0.19636113941669464, 0.29067298769950867, 0.47942882776260376, -0.27948394417762756, 0.1596592217683792, -0.38640695810317993, -0.10554452240467072, -0.33935943245887756, 0.034654486924409866, 0.3896467685699463, 0.09361863881349564, -0.2858772277832031, -0.3143627643585205, 0.2406519651412964, 0.09217239916324615, -0.31665271520614624, 0.6499089598655701, 0.3174118399620056, -0.0654844120144844, -0.012129953131079674, 0.034588105976581573, 0.6445521116256714, 0.31217241287231445, -0.02132738009095192, -0.14891034364700317, -0.25384530425071716, 0.1451036036014557, 0.05837312340736389, -0.019285526126623154, -0.180792436003685, -0.14034000039100647, -0.17181050777435303, -0.0990585908293724, 0.4877511262893677, 0.05134963616728783, -0.2452715039253235, 0.3817504346370697, 0.19222210347652435, -0.16862572729587555, 0.1847422868013382, -0.00496157631278038, -0.06809063255786896, -0.0592515654861927, -0.28806614875793457, 0.1488158106803894, 0.031111977994441986, -0.026582513004541397, -0.09478777647018433, -0.20402182638645172, 0.15089036524295807, -0.22684279084205627, -0.4898989796638489, 0.12260923534631729, -0.6946750283241272, -0.07003861665725708, 0.19716939330101013, 0.007187709212303162, 0.4018385410308838, 0.25109627842903137, 0.17515996098518372, -0.05654053017497063, -0.167737677693367, 0.18949171900749207, -0.02476166933774948, 0.1360524743795395, 0.16970671713352203, -0.17815262079238892, 0.22806674242019653, 0.022214844822883606, -0.011331342160701752, -0.13418397307395935, -0.1578793227672577, -0.24987414479255676, -0.266494482755661, -0.053147926926612854, 0.08887504041194916, -0.006119708530604839, 0.16594548523426056, 0.02511942759156227, -0.050291769206523895, -0.16566897928714752, 0.13415303826332092, -0.26231372356414795, 0.12762252986431122, 0.14715880155563354, -0.08011046051979065, -0.08959174156188965, -0.004118982702493668, 0.33412426710128784, -0.19818297028541565, 0.43217557668685913, 0.22068016231060028, -0.02674267813563347, -0.00886843167245388, -0.12802547216415405, -0.20394375920295715, -0.10126811265945435, -0.04153233766555786, 0.044724345207214355, -0.03607796132564545, -0.3764936327934265, 0.25891193747520447, 1.0310919284820557, 0.06749098002910614, 0.12135171890258789, -0.047031279653310776, 0.003645174205303192, 0.10107462853193283, 0.10590587556362152, -0.44303497672080994, 0.2524413764476776, 0.030930019915103912, 0.300139456987381, -0.057929329574108124, 0.00313611701130867, -0.2882905602455139, 0.11513988673686981, -0.00009046494960784912, -0.06866832822561264, -0.08266414701938629, -0.02166503667831421, 0.33397620916366577, -0.037846531718969345, -0.024595560505986214, 0.3065456748008728, -0.20041845738887787, -0.11120092868804932, -0.042294953018426895, 0.13844388723373413, 0.013800939545035362, -0.0079030841588974, -0.10749804973602295, -0.11538723856210709, -0.15652139484882355, 0.08238566666841507, 0.21727123856544495, 0.24940556287765503, 0.08884938806295395, 0.051999952644109726, 0.04951997101306915, 0.1009633019566536, 0.1473037153482437, 0.25978925824165344, 0.03338286280632019, 0.2063988447189331, 0.01936744898557663, 0.26415300369262695, -0.10254829376935959, -0.09109022468328476, 0.11188602447509766, 0.1183718740940094, 0.31369549036026, 0.02956557087600231, -0.0663873627781868, -0.009641014039516449, -0.4568382799625397, 0.43256300687789917, 0.5305948257446289, 0.09544380009174347, 0.09386882930994034, -0.12367228418588638, 0.1874104142189026, 0.17744794487953186, -0.1557295173406601, -0.05833675339818001, 0.13177525997161865, 0.16650603711605072, 0.06725415587425232, 0.09138478338718414, 0.6560179591178894, -0.05848757550120354, 0.4235073924064636, 0.33183228969573975, -0.07499667257070541, -0.0787879154086113, 0.33897820115089417, -0.2912139594554901, 0.10508869588375092, 0.029957054182887077, 0.3278288245201111, -0.03518463298678398, 0.2673773765563965, 0.049752335995435715, 0.025672808289527893, 0.20684288442134857, 0.07788293063640594, 0.01908252388238907, 0.3788857161998749, -0.38032880425453186, -0.09954720735549927, 0.2172335982322693, 0.008874066174030304, -0.04120858758687973, 0.1545335054397583, 0.5047799348831177, 0.17179106175899506, -0.4376966655254364, -0.07588833570480347, -0.11658874154090881, -0.032922983169555664, -0.07680214941501617, 0.1752493679523468, -0.14446282386779785, -0.09330447763204575, -0.10874845087528229, -0.2442617416381836, -0.0982210636138916, 0.9796034097671509, -0.09009113907814026, 0.02626921236515045, -0.24916230142116547, 0.01820950396358967, 0.05656838417053223, 0.23240330815315247, 0.10889671742916107, 0.5189063549041748, -0.03783555328845978, -0.2908386290073395, 0.3860861361026764, 0.26178422570228577, 0.32780441641807556, 0.12181013822555542, -0.0975414365530014, -0.3197236657142639, 0.07487724721431732, -0.03249334171414375, -0.037988416850566864, 0.16080158948898315, -0.20824870467185974, 0.17250148952007294, 0.39653798937797546, 0.16353781521320343, 0.01735122874379158, -0.10462340712547302, -0.1454218626022339, 0.14455538988113403, -0.5227981209754944, 0.3083231747150421, -0.08408069610595703, 0.17954275012016296, -0.003301519900560379, 0.13689884543418884, -0.22616252303123474, -0.432265043258667, 0.10076119005680084, -0.09523192793130875, 0.049284324049949646, -0.08552002161741257, 0.1069122701883316, 0.10164386034011841, 0.29830580949783325, -0.023014280945062637, -0.004404604434967041, 0.046747658401727676, -0.4754329323768616, -0.42097875475883484, 0.14198938012123108, 0.2822800874710083, 0.1997239589691162, -0.007052239030599594, 0.14772747457027435, 0.24874228239059448, -0.05194611847400665, 0.3061516284942627, -0.12927645444869995, 0.14544285833835602, 0.11949343234300613, -0.5190434455871582, 0.28695282340049744, 0.13671225309371948, -0.25944194197654724, 0.0565570667386055, -0.28739723563194275, 0.1033191829919815, 0.24011297523975372, 0.061582230031490326, -0.006959283724427223, 0.03178943693637848, -0.01689784601330757, -0.288327693939209, 0.45538070797920227, 0.21947425603866577, 0.25395575165748596, -0.19698747992515564, -0.16920210421085358, -0.28448712825775146, -0.09120243042707443, -0.18017242848873138, -0.15677431225776672, -0.45850643515586853, 0.086887426674366, -0.4631282091140747, 0.1347530037164688, -0.2524734139442444, 0.045691367238759995, -0.010274235159158707, 0.19982461631298065, -0.44598039984703064, 0.1542733758687973, -0.36949336528778076, -0.004109666217118502, -0.2501716911792755, 0.391426682472229, 0.022161126136779785, 0.10636682063341141, -0.41501086950302124, -0.29154694080352783, 0.45019829273223877, -0.58191978931427, -0.19469070434570312, 0.17982177436351776, 0.16471295058727264, 0.631458044052124, -0.31492534279823303, -0.040125772356987, -0.006075747311115265, 0.1411198377609253, 0.21247804164886475, -0.013548268005251884, 0.1516452580690384, -0.3153561055660248, -0.06770814955234528, -0.1730479896068573, 0.43305426836013794, 0.21310395002365112, -0.055241867899894714, 0.28466975688934326, -0.23736679553985596 ]
https://github.com/huggingface/datasets/issues/6643
Faiss GPU index cannot be serialised when passed to trainer
Hi Quentin, not sure how that solves the problem number 1. I am trying to pass on a dataset with a faiss gpu for training to the standard trainer but getting this serialisation error. What is a workaround this? I do not want to remove the faiss index, as I would want to use it to create batches of retrieved samples from the dataset. Thanks in advance for your help!
### Describe the bug I am working on a retrieval project and encountering I have encountered two issues in the hugging face faiss integration: 1. I am trying to pass in a dataset with a faiss index to the Huggingface trainer. The code works for a cpu faiss index, but doesn't for a gpu one, getting error: ``` File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/transformers/trainer.py", line 1543, in train return inner_training_loop( File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/transformers/trainer.py", line 1555, in _inner_training_loop train_dataloader = self.get_train_dataloader() File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/transformers/trainer.py", line 831, in get_train_dataloader train_dataset = self._remove_unused_columns(train_dataset, description="training") File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/transformers/trainer.py", line 725, in _remove_unused_columns return dataset.remove_columns(ignored_columns) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/fingerprint.py", line 481, in wrapper out = func(dataset, *args, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2146, in remove_columns dataset = copy.deepcopy(self) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 271, in _reconstruct state = deepcopy(state, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 271, in _reconstruct state = deepcopy(state, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 161, in deepcopy rv = reductor(4) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/faiss/__init__.py", line 556, in index_getstate return {"this": serialize_index(self).tobytes()} File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/faiss/__init__.py", line 1607, in serialize_index write_index(index, writer) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/faiss/swigfaiss.py", line 9843, in write_index return _swigfaiss.write_index(*args) RuntimeError: Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) at /project/faiss/faiss/impl/index_write.cpp:590: don't know how to serialize this type of index ``` The index was created with the add_faiss_index method ``` train_dataset.add_faiss_index( column='embeddings', index_name='embeddings', string_factory=faiss_index_string, train_size=config.faiss_train_size, device=0, # Use -1 for CPU, or specify GPU device ID faiss_verbose=True ) ``` 2. Athough faiss is written to be compatible on the gpu for searching [https://github.com/facebookresearch/faiss/wiki/Faiss-on-the-GPU](https://github.com/facebookresearch/faiss/wiki/Faiss-on-the-GPU) I am getting error when trying to use the hugggingface code to do the search on gpu. This seems to be caused by this line https://github.com/huggingface/datasets/blob/f9975f636542df7f95c27065ea93147440d690b7/src/datasets/search.py#L376 producing error ``` total_scores, total_examples = self.dataset.get_nearest_examples_batch('embeddings', embeddings, k=self.k) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/search.py", line 773, in get_nearest_examples_batch total_scores, total_indices = self.search_batch(index_name, queries, k, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/search.py", line 727, in search_batch return self._indexes[index_name].search_batch(queries, k, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/search.py", line 376, in search_batch if not queries.flags.c_contiguous: AttributeError: 'Tensor' object has no attribute 'flags' ``` ### Steps to reproduce the bug ``` train_dataset.add_faiss_index( column='embeddings', index_name='embeddings', string_factory=faiss_index_string, train_size=config.faiss_train_size, device=0, # Use -1 for CPU, or specify GPU device ID faiss_verbose=True ) Trainer( model=model, args=args, train_dataset=train_dataset, eval_dataset=eval_dataset, data_collator=data_collator, tokenizer=tokenizer ) train_dataset.get_nearest_examples_batch('embeddings', embeddings, k=self.k) ``` ### Expected behavior I would expect the faiss database code to be gpu compatible ### Environment info huggingface Version: 2.16.1
70
Faiss GPU index cannot be serialised when passed to trainer ### Describe the bug I am working on a retrieval project and encountering I have encountered two issues in the hugging face faiss integration: 1. I am trying to pass in a dataset with a faiss index to the Huggingface trainer. The code works for a cpu faiss index, but doesn't for a gpu one, getting error: ``` File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/transformers/trainer.py", line 1543, in train return inner_training_loop( File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/transformers/trainer.py", line 1555, in _inner_training_loop train_dataloader = self.get_train_dataloader() File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/transformers/trainer.py", line 831, in get_train_dataloader train_dataset = self._remove_unused_columns(train_dataset, description="training") File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/transformers/trainer.py", line 725, in _remove_unused_columns return dataset.remove_columns(ignored_columns) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 592, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 557, in wrapper out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/fingerprint.py", line 481, in wrapper out = func(dataset, *args, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2146, in remove_columns dataset = copy.deepcopy(self) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 271, in _reconstruct state = deepcopy(state, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 271, in _reconstruct state = deepcopy(state, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/copy.py", line 161, in deepcopy rv = reductor(4) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/faiss/__init__.py", line 556, in index_getstate return {"this": serialize_index(self).tobytes()} File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/faiss/__init__.py", line 1607, in serialize_index write_index(index, writer) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/faiss/swigfaiss.py", line 9843, in write_index return _swigfaiss.write_index(*args) RuntimeError: Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) at /project/faiss/faiss/impl/index_write.cpp:590: don't know how to serialize this type of index ``` The index was created with the add_faiss_index method ``` train_dataset.add_faiss_index( column='embeddings', index_name='embeddings', string_factory=faiss_index_string, train_size=config.faiss_train_size, device=0, # Use -1 for CPU, or specify GPU device ID faiss_verbose=True ) ``` 2. Athough faiss is written to be compatible on the gpu for searching [https://github.com/facebookresearch/faiss/wiki/Faiss-on-the-GPU](https://github.com/facebookresearch/faiss/wiki/Faiss-on-the-GPU) I am getting error when trying to use the hugggingface code to do the search on gpu. This seems to be caused by this line https://github.com/huggingface/datasets/blob/f9975f636542df7f95c27065ea93147440d690b7/src/datasets/search.py#L376 producing error ``` total_scores, total_examples = self.dataset.get_nearest_examples_batch('embeddings', embeddings, k=self.k) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/search.py", line 773, in get_nearest_examples_batch total_scores, total_indices = self.search_batch(index_name, queries, k, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/search.py", line 727, in search_batch return self._indexes[index_name].search_batch(queries, k, **kwargs) File "/users/rubman/.conda/envs/protein_npt_env/lib/python3.10/site-packages/datasets/search.py", line 376, in search_batch if not queries.flags.c_contiguous: AttributeError: 'Tensor' object has no attribute 'flags' ``` ### Steps to reproduce the bug ``` train_dataset.add_faiss_index( column='embeddings', index_name='embeddings', string_factory=faiss_index_string, train_size=config.faiss_train_size, device=0, # Use -1 for CPU, or specify GPU device ID faiss_verbose=True ) Trainer( model=model, args=args, train_dataset=train_dataset, eval_dataset=eval_dataset, data_collator=data_collator, tokenizer=tokenizer ) train_dataset.get_nearest_examples_batch('embeddings', embeddings, k=self.k) ``` ### Expected behavior I would expect the faiss database code to be gpu compatible ### Environment info huggingface Version: 2.16.1 Hi Quentin, not sure how that solves the problem number 1. I am trying to pass on a dataset with a faiss gpu for training to the standard trainer but getting this serialisation error. What is a workaround this? I do not want to remove the faiss index, as I would want to use it to create batches of retrieved samples from the dataset. Thanks in advance for your help!
[ 0.33449989557266235, -0.47561341524124146, 0.08602184057235718, 0.46754151582717896, 0.31379324197769165, 0.012356095016002655, 0.38386812806129456, 0.265895813703537, 0.25768259167671204, 0.3435285985469818, -0.10524050146341324, 0.07955443859100342, 0.24386811256408691, 0.24291692674160004, -0.20981153845787048, -0.1343718022108078, 0.27522996068000793, 0.015165507793426514, 0.03683272376656532, -0.13593846559524536, -0.16226649284362793, 0.26976343989372253, 0.009446077048778534, 0.121526800096035, -0.1904338002204895, 0.13839727640151978, -0.06530388444662094, 0.10345317423343658, -0.18484698235988617, -0.36344268918037415, 0.08420588821172714, -0.033268559724092484, 0.31634002923965454, 0.6068987846374512, -0.00012635579332709312, 0.12968921661376953, 0.15648098289966583, -0.10014177113771439, -0.15906217694282532, 0.019120119512081146, 0.22629383206367493, 0.17821243405342102, 0.25013816356658936, -0.13551011681556702, -0.5324463844299316, -0.16035161912441254, -0.30855971574783325, 0.03545820713043213, 0.43641960620880127, 0.08043359965085983, 0.08180300891399384, 0.11077931523323059, 0.16789264976978302, -0.15592887997627258, -0.016533449292182922, 0.10457950085401535, -0.22270776331424713, 0.05041353404521942, -0.2023097276687622, 0.2706650197505951, 0.03690717741847038, 0.21975654363632202, 0.15791180729866028, -0.25204217433929443, 0.053311511874198914, 0.07540777325630188, 0.3727273643016815, -0.056102633476257324, 0.1101464107632637, -0.1348474621772766, 0.16932395100593567, -0.06047658622264862, -0.5952131748199463, -0.07672188431024551, 0.25130030512809753, -0.15202508866786957, 0.051332052797079086, -0.06691823899745941, -0.007192673161625862, 0.3652033805847168, 0.08294759690761566, 0.023390479385852814, -0.2190779447555542, -0.21530507504940033, -0.07441119104623795, -0.03270788490772247, -0.0839330404996872, 0.10175540298223495, 0.11086645722389221, -0.09114478528499603, -0.25550463795661926, 0.1319819688796997, 0.42941898107528687, 0.04234546050429344, -0.3936728239059448, -0.001685861498117447, 0.05630578473210335, -0.2648388743400574, 0.09490828961133957, 0.27144891023635864, -0.48326289653778076, -0.06927560269832611, 0.05768699571490288, 0.04085932672023773, 0.0022517740726470947, 0.11600999534130096, -0.1854846477508545, -0.10648210346698761, -0.019951142370700836, 0.23623298108577728, -0.23752610385417938, -0.13035663962364197, 0.007153889164328575, 0.12625440955162048, -0.5121660828590393, -0.10342998057603836, 0.09285873174667358, -0.38526397943496704, -0.4900103807449341, 0.09769874066114426, -0.23725783824920654, 0.20274819433689117, 0.31025195121765137, 0.45008584856987, 0.04670266807079315, 0.014480331912636757, 0.19451570510864258, 0.15613135695457458, -0.10693541914224625, -0.24671733379364014, -0.19742938876152039, -0.30676451325416565, 0.10310782492160797, 0.3927438259124756, -0.08474406599998474, -0.6039734482765198, 0.10683942586183548, 0.12421312183141708, 0.0893297791481018, -0.06176239624619484, -0.18694739043712616, -0.17223457992076874, 0.21236225962638855, 0.188371941447258, -0.02042301371693611, 0.16884037852287292, 0.09910158812999725, -0.22052326798439026, -0.062478285282850266, 0.024477463215589523, -0.31335705518722534, -0.006434854120016098, -0.008793121203780174, 0.0527648888528347, 0.054702118039131165, -0.0809776708483696, 0.20984837412834167, 0.09923823177814484, 0.04716293141245842, 0.08183503150939941, -0.03227858990430832, 0.02446094900369644, -0.019595790654420853, -0.2595572769641876, 0.47593677043914795, 0.15066906809806824, 0.06436815857887268, -0.42760780453681946, 0.3809201419353485, -0.08836932480335236, -0.07713402062654495, 0.8428109288215637, 0.15758724510669708, 0.09031391888856888, -0.3402208089828491, 0.24882669746875763, -0.161283940076828, -0.5276352167129517, -0.2535742223262787, 0.19790054857730865, -0.092654287815094, 0.08503342419862747, 0.22852638363838196, -0.29254621267318726, -0.021116280928254128, 0.13056473433971405, 0.21123798191547394, 0.3571895360946655, -0.1518271118402481, -0.18369077146053314, -0.22551335394382477, -0.29864057898521423, 0.5137009024620056, 0.14426389336585999, 0.20520535111427307, 0.26621437072753906, -0.28083643317222595, -0.5313343405723572, 0.39565494656562805, -0.23520159721374512, 0.06504517793655396, 0.07287268340587616, 0.4699798822402954, 0.0995461717247963, 0.30104565620422363, 0.29188624024391174, -0.024434201419353485, -0.004515603184700012, -0.1515348255634308, 0.01644141599535942, -0.24512122571468353, -0.1721704602241516, -0.1862688958644867, 0.08452235907316208, 0.14813987910747528, 0.14841169118881226, -0.026652060449123383, -0.04116256535053253, 0.033483151346445084, 0.2593391239643097, -0.24785439670085907, 0.36156415939331055, -0.26932886242866516, 0.2985454797744751, -0.25388553738594055, 0.2732636034488678, -0.07209401577711105, -0.4003886282444, -0.005714666098356247, 0.37510761618614197, 0.5505262613296509, -0.3363082706928253, 0.09380794316530228, 0.18367037177085876, 0.21646197140216827, -0.11102698743343353, -0.02170596271753311, -0.07938297092914581, 0.2460344135761261, 0.09293632209300995, -0.33690720796585083, 0.37410473823547363, -0.07480396330356598, -0.08260198682546616, 0.017608851194381714, 0.5938842296600342, 0.11545264720916748, 0.057956017553806305, 0.05350308120250702, 0.1071765199303627, 0.1323878914117813, -0.10245473682880402, -0.2615429162979126, -0.13695329427719116, -0.07368077337741852, -0.04104290157556534, 0.18154580891132355, 0.013955227099359035, -0.634635865688324, 0.1909678429365158, 0.05142560973763466, -0.05050703138113022, -0.23703953623771667, 0.0544251874089241, -0.09358354657888412, 0.07429318130016327, 0.0921626165509224, -0.5846851468086243, 0.3246452808380127, 0.12936677038669586, -0.18282243609428406, -0.08564505726099014, 0.03736761212348938, -0.2002418488264084, 0.016995616257190704, -0.01908792555332184, -0.122416652739048, 0.03957279771566391, 0.04909215494990349, 0.0030079809948801994, 0.046758659183979034, 0.06669837236404419, -0.19993862509727478, -0.07509852200746536, -0.45384010672569275, 0.17218387126922607, -0.20268912613391876, -0.2746267020702362, -0.3511757254600525, -0.22963272035121918, -0.23711290955543518, 0.10691353678703308, -0.043719492852687836, 0.08919653296470642, -0.05820851027965546, 0.1883271485567093, -0.23207058012485504, 0.4118146002292633, 0.2064964473247528, 0.06634905934333801, -0.2298019528388977, 0.15530064702033997, -0.19786342978477478, -0.15167313814163208, -0.1277567446231842, -0.1343248188495636, 0.14399129152297974, 0.13275092840194702, 0.20638954639434814, -0.18654124438762665, -0.18424570560455322, 0.18529009819030762, -0.19169266521930695, 0.2905665636062622, -0.23302435874938965, -0.06410828232765198, -0.2841307818889618, 0.1180461198091507, 0.27021321654319763, -0.3304491937160492, -0.11466062068939209, -0.19964715838432312, 0.05828772857785225, -0.051428865641355515, -0.21156762540340424, 0.06834116578102112, -0.17217780649662018, -0.051485300064086914, 0.3840864896774292, -0.031146680936217308, -0.013951465487480164, 0.14773821830749512, 0.14761698246002197, 0.08907117694616318, 0.08014524728059769, -0.06950528174638748, -0.26272961497306824, -0.5247941613197327, 0.1190451979637146, -0.20007754862308502, -0.5778636932373047, -0.03198344632983208, 0.29699939489364624, 0.15744204819202423, 0.04766464978456497, -0.05304096266627312, 0.06325500458478928, 0.14574448764324188, -0.023442866280674934, -0.18132257461547852, 0.1384616643190384, -0.03158120810985565, -0.1923072338104248, -0.015728339552879333, -0.18890035152435303, -0.32757896184921265, 0.2634226679801941, 0.22311878204345703, 0.16077271103858948, -0.008782874792814255, -0.010873500257730484, 0.025756385177373886, 0.5322390794754028, 0.3144913613796234, -0.2847365140914917, 0.30326056480407715, -0.034156233072280884, 0.19392003118991852, 0.09665219485759735, -0.34139811992645264, 0.24186304211616516, 0.16485485434532166, -0.18827369809150696, 0.16737961769104004, -0.2589002847671509, 0.376977801322937, 0.016926489770412445, 0.02766668051481247, 0.008702404797077179, -0.2921762466430664, -0.11296194791793823, 0.3200048506259918, 0.351240336894989, -0.21499523520469666, 0.3139804005622864, -0.029391493648290634, 0.20838090777397156, 0.39978882670402527, 0.350752592086792, 0.4586847722530365, 0.14360961318016052, 0.06084539368748665, -0.587316632270813, -0.24356895685195923, 0.14687420427799225, 0.03101705200970173, 0.38320761919021606, -0.24942024052143097, -0.10660988092422485, 0.3021163046360016, 0.2139435112476349, 0.688730001449585, 0.3513651192188263, -0.28501421213150024, 0.11683192849159241, -0.28422075510025024, -0.39785119891166687, -0.0735606849193573, -0.0005169063806533813, -0.05294903367757797, -0.09355540573596954, 0.6724238395690918, -0.2260492742061615, -0.4496745765209198, -0.019216232001781464, -0.18699803948402405, -0.25250929594039917, -0.36730608344078064, -0.3986870050430298, -0.35518884658813477, -0.08210911601781845, 0.3086872696876526, 0.09074849635362625, 0.3303987681865692, -0.1310468316078186, 0.20868496596813202, -0.4032890498638153, -0.05108426511287689, 0.06963799893856049, -0.034796468913555145, 0.4034770429134369, -0.09313199669122696, 0.055078793317079544, 0.6000816822052002, 0.41832655668258667, 0.2597804665565491, 0.17958572506904602, 0.27061399817466736, -0.10960763692855835, -0.02202795073390007, 0.014637897722423077, 0.28050562739372253, 0.44587641954421997, -0.14673902094364166, 0.4174160063266754, -0.09294010698795319, 0.0903395488858223, -0.25008660554885864, -0.1781543791294098, 0.09503450989723206, -0.1620655357837677, -0.22840264439582825, -0.08670258522033691, 0.256027489900589, 0.03135628253221512, 0.04559646546840668, -0.11853539943695068, 0.684437096118927, -0.10143909603357315, 0.5763134956359863, 0.13202980160713196, 1.034103512763977, 0.01676337420940399, 0.13250374794006348, 0.6295909285545349, -0.37520909309387207, 0.3941496014595032, -0.02460062876343727, 0.2567916512489319, -0.5145505666732788, -0.11925451457500458, -0.009991943836212158, -0.0008933581411838531, 0.1723857969045639, -0.25734496116638184, -0.33475261926651, 0.028327735140919685, -0.12218928337097168, 0.13182669878005981, -0.07683055847883224, 0.2998487055301666, 0.3885140120983124, -0.2663012444972992, -0.562163233757019, 0.005436796694993973, 0.13008996844291687, 0.1956322193145752, 0.007670003920793533, -0.49507755041122437, -0.3146573007106781, -0.018095243722200394, 0.1434573084115982, 0.019252583384513855, -0.2039773315191269, 0.3033994436264038, 0.5454999804496765, -0.3048855662345886, -0.08934929966926575, -0.19662459194660187, 0.3610629439353943, -0.35439619421958923, -0.33971747756004333, -0.05522018298506737, -0.48858243227005005, -0.1542523354291916, -0.25313061475753784, -0.1774822175502777, 0.48738551139831543, 0.06607363373041153, -0.25954335927963257, 0.047300223261117935, 0.14048442244529724, -0.07157765328884125, -0.2275625467300415, -0.18961180746555328, -0.6321312785148621, -0.3590470254421234, -0.16124117374420166, -0.380327045917511, 0.1800026297569275, -0.038721561431884766, 0.01683524250984192, 0.25209569931030273, -0.1676184982061386, 0.10921433568000793, 0.2500651478767395, -0.2663688659667969, -0.024838265031576157, 0.6807489991188049, -0.10079766064882278, -0.1829005777835846, 0.498997300863266, 0.1154361367225647, -0.026857469230890274, 0.058002062141895294, -0.36991071701049805, 0.42150723934173584, -0.058232180774211884, 0.08102773129940033, -0.2498110979795456, -0.05918828397989273, -0.10686146467924118, 0.03735840320587158, 0.1344900280237198, -0.3314291536808014, -0.20808926224708557, 0.03735338896512985, -0.40619945526123047, 0.03239728882908821, -0.15399959683418274, 0.0904284194111824, 0.01743277907371521, 0.34334927797317505, -0.07217083871364594, -0.19462290406227112, -0.16999682784080505, 0.032891470938920975, -0.24740098416805267, -0.06769994646310806, 0.052680909633636475, -0.19918310642242432, -0.059798676520586014, -0.09857995808124542, 0.043546952307224274, 0.1310531198978424, 0.11420030146837234, -0.01124647818505764, -0.33757853507995605, 0.17711593210697174, 0.26978304982185364, 0.12551067769527435, -0.15759459137916565, 0.03568258881568909, -0.04075726494193077, -0.09552542120218277, 0.16490720212459564, 0.18139803409576416, 0.08251011371612549, 0.18580932915210724, -0.17918720841407776, 0.06623488664627075, -0.10655423998832703, 0.09609147906303406, 0.45391345024108887, 0.2439393699169159, 0.07833830267190933, -0.15479828417301178, -0.41779854893684387, 0.0666612982749939, -0.0543372705578804, 0.1746126413345337, 0.40676188468933105, 0.059298496693372726, 0.036420054733753204, -0.29154133796691895, -0.11652247607707977, 0.07572528719902039, 0.16066594421863556, 0.204387828707695, -0.29415303468704224, 0.053468428552150726, 0.21177545189857483, 0.04584053158760071, 0.052257560193538666, 0.02638763189315796, 0.4944626986980438, -0.06805039942264557, -0.24252375960350037, 0.3683655261993408, 0.3033207058906555, 0.27720367908477783, -0.10247905552387238, -0.0009347796440124512, 0.271444708108902, 0.41997212171554565, -0.13468877971172333, -0.03392383083701134, 0.14790235459804535, 0.32569506764411926, 0.1758224219083786, 0.19347307085990906, 0.30337288975715637, 0.35733431577682495, -0.12177356332540512, -0.036772094666957855, -0.1037030890583992, 0.10937666893005371, 0.09133566170930862, -0.061218224465847015, -0.2501898407936096, 0.01239044964313507, 0.017845958471298218, -0.14606845378875732, -0.22262677550315857, 0.6342397332191467, 0.02449042722582817, -0.8223788738250732, 0.1053476557135582, 0.1810312122106552, -0.35975170135498047, -0.1423293501138687, 0.26854628324508667, 0.02486231178045273, -0.29756689071655273, 0.04028300568461418, -0.04067320004105568, -0.05403563380241394, 0.115240678191185, 0.05287589132785797, -0.05604542791843414, -0.11462289094924927, -0.6008148193359375, 0.5063607096672058, 0.34611088037490845, -0.10573302209377289, -0.12987351417541504, -0.11323456466197968, -0.1800200343132019, 0.1625169813632965, -0.05119886249303818, 0.4051387906074524, 0.24929946660995483, -0.06468330323696136, 0.08727862685918808, 0.06569226086139679, 0.07921691983938217, 0.08752705901861191, 0.13560998439788818, 0.20264723896980286, -0.02952473610639572, 0.0673079788684845, 0.013570936396718025, 0.02742239460349083, -0.1926896870136261, 0.03072148561477661, 0.4481266736984253, -0.4172351360321045, 0.296002060174942, -0.45694467425346375, -0.10104836523532867, -0.1307857632637024, -0.19281849265098572, -0.31050845980644226, 0.35397183895111084, 0.12547467648983002, 0.21328164637088776, 0.14776664972305298, 0.06192503497004509, -0.02480817772448063, -0.08164344727993011, 0.49897536635398865, 0.2473924458026886, 0.1835564374923706, -0.3826953172683716, -0.10712637007236481, -0.06791920214891434, 0.20708657801151276, 0.18074844777584076, 0.1406216025352478, 0.2740951478481293, 0.45611998438835144, -0.036060579121112823, -0.2586125135421753, 0.28245896100997925, -0.1196419969201088, 0.5100120306015015, 0.10711850225925446, -0.060480646789073944, 0.015055142343044281, -0.3954136371612549, -0.19435101747512817, 0.17984077334403992, 0.22133848071098328, 0.31558164954185486, -0.0007894476875662804, -0.04988045245409012, -0.06185796111822128, 0.04257487505674362, -0.31493598222732544, -0.24119973182678223, 0.5474160313606262, 0.13812614977359772, 0.20030707120895386, 0.01696602627635002, -0.18512986600399017, -0.25438278913497925, -0.0962269976735115, -0.24547454714775085, 0.2496834695339203, -0.2203928828239441, 0.20478425920009613, -0.1933729201555252, -0.23018307983875275, -0.36629584431648254, 0.5116234421730042, 0.1902792900800705, -0.3338949978351593, -0.19089657068252563, 0.42331528663635254, -0.3577274978160858, -0.08908800780773163, 0.3146960735321045, 0.2526971995830536, 0.05481904000043869, 0.43790140748023987, -0.2554783821105957, -0.1407472789287567, 0.61647629737854, -0.6008696556091309, -0.08277403563261032, -0.05115438997745514, 0.2258068323135376, 0.3839710056781769, -0.08539316058158875, -0.814344048500061, 0.002805948257446289, -0.052151869982481, 0.04839349538087845, -0.26598432660102844, 0.07038827985525131, 0.2586808502674103, -0.02888045832514763, -0.027690179646015167, 0.016216259449720383, 0.2569993734359741, 0.15957312285900116, 0.23945358395576477, -0.037824228405952454 ]