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/4980 | Make `pyarrow` optional | Thanks for the proposal, @KOLANICH. And also thanks for your answer, @dconathan.
Indeed, we are using `pyarrow` as the backend for our datasets, in order to cache them and also allow memory-mapping (using datasets larger than your RAM memory).
One way to avoid using `pyarrow` could be loading the datasets in streaming mode, by passing `streaming=True` to `load_dataset`. This way you basically get a generator for the dataset; nothing is downloaded, nor cached. | **Is your feature request related to a problem? Please describe.**
Is `pyarrow` really needed for every dataset?
**Describe the solution you'd like**
It is made optional.
**Describe alternatives you've considered**
Likely, no.
| 73 | Make `pyarrow` optional
**Is your feature request related to a problem? Please describe.**
Is `pyarrow` really needed for every dataset?
**Describe the solution you'd like**
It is made optional.
**Describe alternatives you've considered**
Likely, no.
Thanks for the proposal, @KOLANICH. And also thanks for your answer, @dconathan.
Indeed, we are using `pyarrow` as the backend for our datasets, in order to cache them and also allow memory-mapping (using datasets larger than your RAM memory).
One way to avoid using `pyarrow` could be loading the datasets in streaming mode, by passing `streaming=True` to `load_dataset`. This way you basically get a generator for the dataset; nothing is downloaded, nor cached. | [
-0.25128304958343506,
0.2335464358329773,
-0.06958980858325958,
-0.17832010984420776,
0.225427508354187,
-0.09293592721223831,
0.16923241317272186,
0.24594300985336304,
-0.29941484332084656,
0.41223078966140747,
0.1802467405796051,
0.27408692240715027,
0.03926080837845802,
-0.14449645578861237,
0.06775837391614914,
0.08703449368476868,
-0.005930371582508087,
0.44258391857147217,
0.0722520500421524,
0.17137408256530762,
-0.24248406291007996,
-0.1760639101266861,
-0.10579235851764679,
-0.04195624589920044,
-0.3171958923339844,
0.1554088294506073,
0.13940955698490143,
-0.10771309584379196,
-0.16964852809906006,
-0.45747867226600647,
0.13858453929424286,
0.28597041964530945,
-0.18934372067451477,
-0.06289418786764145,
-0.00010279956040903926,
-0.07430599629878998,
0.27008533477783203,
-0.022727107629179955,
-0.32988622784614563,
-0.01651144027709961,
-0.10729486495256424,
0.040101952850818634,
0.25654491782188416,
-0.27585527300834656,
0.034406647086143494,
-0.27242767810821533,
0.24788770079612732,
0.013852052390575409,
0.1963551640510559,
0.024906925857067108,
0.25556790828704834,
0.3110041618347168,
-0.22418047487735748,
0.0809386745095253,
0.5368403196334839,
0.2272356003522873,
-0.1443812996149063,
0.35031524300575256,
0.0945705771446228,
0.013963030651211739,
-0.1854427456855774,
0.24384646117687225,
-0.3862510621547699,
-0.055750805884599686,
0.27895388007164,
0.11250439286231995,
0.16660131514072418,
-0.2091422975063324,
0.037445317953825,
0.19807201623916626,
0.6165902614593506,
-0.4984549582004547,
-0.027448546141386032,
-0.1111123114824295,
0.006485501304268837,
-0.45350396633148193,
0.03721090406179428,
0.3118240237236023,
-0.34835609793663025,
0.3231242895126343,
-0.2017705887556076,
-0.30525219440460205,
-0.17963680624961853,
0.13579542934894562,
-0.014561053365468979,
0.05903809890151024,
0.2787461578845978,
0.05549924075603485,
0.0017004534602165222,
0.1507679522037506,
0.23759643733501434,
-0.19049246609210968,
0.012352563440799713,
-0.02847636491060257,
-0.04961670562624931,
-0.22032615542411804,
-0.014917761087417603,
0.10395598411560059,
0.30574387311935425,
0.2117123305797577,
0.14492131769657135,
0.15121686458587646,
0.33149057626724243,
0.17619194090366364,
-0.17670126259326935,
-0.026964183896780014,
0.02777392417192459,
-0.27061498165130615,
0.48520976305007935,
-0.38563868403434753,
0.1485506147146225,
-0.08685815334320068,
0.22785033285617828,
-0.04191463068127632,
0.5146234631538391,
0.014535322785377502,
0.3992919325828552,
-0.10056203603744507,
-0.03263075277209282,
-0.2506101727485657,
-0.17970269918441772,
0.045137129724025726,
0.04574691131711006,
0.25343090295791626,
-0.0008013744372874498,
-0.06664536148309708,
-0.14386768639087677,
0.09163612872362137,
-0.08217570930719376,
-0.3997432291507721,
-0.07675022631883621,
-0.07714797556400299,
-0.13917414844036102,
0.38413795828819275,
0.24844719469547272,
-0.027281906455755234,
0.1406041383743286,
0.14720331132411957,
-0.006478555500507355,
0.41035476326942444,
0.27591654658317566,
-0.16784745454788208,
0.0522906593978405,
0.33840614557266235,
-0.10686086118221283,
-0.02726961486041546,
-0.22668986022472382,
0.26129859685897827,
-0.27741822600364685,
0.5540390610694885,
-0.18684425950050354,
-0.6748183369636536,
-0.10531085729598999,
0.2512475550174713,
-0.11189767718315125,
-0.024590499699115753,
-0.11368054896593094,
0.09406600892543793,
-0.04130799323320389,
-0.11181418597698212,
0.12015698850154877,
0.031413670629262924,
-0.12082615494728088,
-0.3953135311603546,
-0.0011610426008701324,
0.17980240285396576,
-0.48235243558883667,
-0.015901852399110794,
0.01839948631823063,
-0.36497703194618225,
0.1883547008037567,
0.1845448911190033,
-0.5272563695907593,
0.07339990884065628,
-0.12834382057189941,
0.2808564305305481,
0.45291343331336975,
0.04815422371029854,
-0.27148470282554626,
-0.07353530079126358,
-0.2663918733596802,
-0.05333548039197922,
0.027426600456237793,
0.4123287498950958,
-0.08704999834299088,
0.00006978824967518449,
-0.01287921518087387,
0.38061076402664185,
-0.017891494557261467,
0.19998617470264435,
-0.21280604600906372,
-0.35027968883514404,
0.3568999171257019,
0.25282561779022217,
-0.14843691885471344,
-0.0029358789324760437,
-0.07658501714468002,
-0.20870408415794373,
0.15331274271011353,
-0.35942333936691284,
0.026930388063192368,
-0.05445868521928787,
0.5386935472488403,
-0.1114148497581482,
-0.07487589865922928,
-0.10954658687114716,
-0.5285980701446533,
0.1920088827610016,
-0.13460467755794525,
0.08637475222349167,
-0.2915346622467041,
-0.461831271648407,
0.25526028871536255,
0.05338911712169647,
0.04644191265106201,
0.28889885544776917,
0.15858186781406403,
-0.08879506587982178,
0.15458936989307404,
0.01400630921125412,
-0.06593240797519684,
-0.015706321224570274,
-0.052717410027980804,
0.15494349598884583,
0.08425652980804443,
0.05017045885324478,
0.012116974219679832,
-0.11055270582437515,
-0.07366326451301575,
-0.17429205775260925,
0.12464172393083572,
0.0947100892663002,
0.1925494372844696,
0.3521448075771332,
0.17525391280651093,
0.05337256193161011,
-0.3748544752597809,
0.26634418964385986,
0.07634025812149048,
-0.1446477472782135,
0.14127808809280396,
-0.04389790818095207,
-0.06630023568868637,
-0.09852480888366699,
0.21409648656845093,
0.17258360981941223,
0.18394267559051514,
0.06620585918426514,
-0.04273585230112076,
-0.13022947311401367,
-0.02905847504734993,
-0.21228571236133575,
-0.02204311639070511,
-0.04845413565635681,
0.04357844963669777,
0.2898477613925934,
0.3146387040615082,
0.28940650820732117,
-0.3570386469364166,
0.016067534685134888,
0.3823227286338806,
-0.06425389647483826,
0.22777444124221802,
0.25853365659713745,
-0.19868925213813782,
-0.2201162576675415,
0.3229760527610779,
-0.3375415802001953,
0.31037312746047974,
0.4690919518470764,
0.05494876950979233,
0.15765595436096191,
0.05975911021232605,
-0.24070170521736145,
0.1598486304283142,
0.08707796037197113,
0.28606900572776794,
-0.1431136429309845,
0.368980348110199,
-0.18329216539859772,
-0.37095320224761963,
-0.04690054431557655,
0.04198350012302399,
-0.166227325797081,
-0.18200001120567322,
-0.13072027266025543,
-0.28356286883354187,
-0.2158113718032837,
0.08079203963279724,
-0.2803427278995514,
-0.3775293529033661,
-0.1285284459590912,
0.44476157426834106,
0.2895609736442566,
-0.25026968121528625,
0.35478436946868896,
-0.008437996730208397,
0.4259779453277588,
-0.2519803047180176,
-0.5822714567184448,
-0.19823406636714935,
-0.21378213167190552,
-0.25438833236694336,
0.12532201409339905,
0.006269476376473904,
-0.18971030414104462,
0.47550439834594727,
0.07701773941516876,
0.10399653762578964,
-0.4801872670650482,
-0.1696593016386032,
0.18720340728759766,
0.16851502656936646,
0.12630470097064972,
0.1436796337366104,
0.19029587507247925,
0.20204532146453857,
-0.16774329543113708,
0.10555218905210495,
-0.06636722385883331,
-0.20539039373397827,
0.16859212517738342,
-0.0562426820397377,
0.1376153528690338,
-0.21422696113586426,
0.05461057648062706,
-0.17041869461536407,
-0.27347639203071594,
0.15464124083518982,
-0.149138942360878,
0.22297053039073944,
0.06013551354408264,
0.1792641580104828,
-0.21617308259010315,
-0.2550882399082184,
-0.026549631729722023,
-0.08691460639238358,
-0.27034640312194824,
0.35068127512931824,
-0.0927388146519661,
-0.08995406329631805,
0.008777808398008347,
0.031131312251091003,
0.06688807904720306,
0.5049368143081665,
-0.47863560914993286,
-0.33884358406066895,
-0.07180368900299072,
0.7648442387580872,
-0.17704614996910095,
-0.17367713153362274,
0.5059131383895874,
0.20570413768291473,
-0.2103714793920517,
0.1473618745803833,
-0.10155287384986877,
-0.09524058550596237,
-0.053472861647605896,
-0.003173619508743286,
0.12058351188898087,
0.08880224078893661,
0.16063426434993744,
0.9555615782737732,
-0.34235361218452454,
0.027777448296546936,
0.3938870131969452,
-0.1338954120874405,
0.3078193664550781,
-0.17200836539268494,
-0.0015683919191360474,
-0.26326239109039307,
-0.16375207901000977,
-0.2169162482023239,
0.21183112263679504,
-0.07362407445907593,
-0.45389455556869507,
-0.3091485798358917,
-0.31256794929504395,
-0.061060816049575806,
-0.30739226937294006,
0.24998719990253448,
0.2134704887866974,
0.1824539303779602,
0.1394483596086502,
0.09514216333627701,
-0.31834444403648376,
-0.27646929025650024,
0.17235763370990753,
-0.11531135439872742,
0.11937393248081207,
-0.13660942018032074,
-0.23874329030513763,
0.10931945592164993,
-0.5248340964317322,
0.28161385655403137,
0.07006647437810898,
-0.4015287160873413,
0.07661627233028412,
-0.13404467701911926,
-0.005210258066654205,
-0.0791504755616188,
0.6763618588447571,
0.17632955312728882,
-0.13505378365516663,
0.020153172314167023,
0.14665602147579193,
-0.1900654286146164,
0.013887569308280945,
0.14436808228492737,
-0.05294042080640793,
-0.05404673144221306,
-0.04791256785392761,
-0.3952270746231079,
-0.1090780720114708,
0.1122513860464096,
0.3195677399635315,
-0.22513975203037262,
-0.34310397505760193,
-0.2904937267303467,
-0.08909249305725098,
-0.04168274626135826,
-0.0003254935145378113,
-0.04983721673488617,
-0.07547872513532639,
0.08758056163787842,
-0.026872269809246063,
0.019413597881793976,
-0.0021335408091545105,
0.07952280342578888,
0.16076989471912384,
0.060798462480306625,
-0.2983730733394623,
-0.12925302982330322,
-0.18957747519016266,
-0.04110550880432129,
0.4074695110321045,
0.24506190419197083,
0.001131586730480194,
-0.3214096426963806,
-0.21026599407196045,
0.01603669673204422,
0.45544737577438354,
0.24356356263160706,
-0.09869825094938278,
0.16632191836833954,
-0.17879366874694824,
0.057374756783246994,
-0.3696717619895935,
-0.017799746245145798,
0.09200844913721085,
-0.4150876998901367,
-0.0451665073633194,
-0.09552884846925735,
0.5572196245193481,
0.10417439043521881,
-0.15231582522392273,
0.07149320840835571,
0.2166067361831665,
-0.2265390008687973,
0.07062919437885284,
0.2902606129646301,
1.0452015399932861,
0.005397364497184753,
0.3377446234226227,
0.353461354970932,
-0.10299396514892578,
0.426845520734787,
-0.22071844339370728,
0.3276281952857971,
-0.18206551671028137,
-0.1825225055217743,
0.028827594593167305,
-0.219460591673851,
-0.010783612728118896,
0.19520102441310883,
-0.13077887892723083,
0.1750437319278717,
0.02257700264453888,
0.19236740469932556,
-0.07449136674404144,
0.3374825716018677,
0.02370801940560341,
-0.3322495222091675,
-0.0566820427775383,
0.22482097148895264,
-0.012528710067272186,
-0.1541023999452591,
-0.17268210649490356,
-0.0731048583984375,
0.3281325399875641,
-0.2509315013885498,
0.08968891203403473,
0.12895840406417847,
-0.3705393970012665,
0.022209612652659416,
-0.17688900232315063,
-0.06634838879108429,
-0.2354326844215393,
-0.021233167499303818,
-0.2768252491950989,
0.04350041598081589,
-0.20232369005680084,
0.08877275884151459,
0.1329709142446518,
0.21186751127243042,
-0.1822211891412735,
-0.0003756331279873848,
0.13823892176151276,
-0.2526567578315735,
-0.23126035928726196,
0.31993240118026733,
-0.0561220608651638,
-0.42333298921585083,
-0.11835741996765137,
-0.26178693771362305,
0.2832111716270447,
-0.17667052149772644,
0.10392585396766663,
-0.029499724507331848,
0.12029705941677094,
-0.030814478173851967,
0.213344544172287,
-0.028120994567871094,
0.17651225626468658,
0.030871354043483734,
-0.044693414121866226,
-0.11238307505846024,
-0.2824161946773529,
0.17434293031692505,
0.0920386016368866,
0.06420313566923141,
0.15251418948173523,
-0.043047234416007996,
-0.3307005763053894,
-0.27036958932876587,
-0.04521843045949936,
-0.06946493685245514,
-0.37716159224510193,
0.08214421570301056,
0.19470061361789703,
0.24012787640094757,
-0.3272526264190674,
0.10187013447284698,
0.15602999925613403,
-0.06553295999765396,
-0.03518321365118027,
0.11432813107967377,
-0.2206113636493683,
0.1445012390613556,
0.3366747796535492,
0.22331638634204865,
0.2750755846500397,
0.0722406804561615,
0.062113650143146515,
0.03123489022254944,
-0.44850099086761475,
-0.0803644135594368,
0.012045970186591148,
0.2468319684267044,
-0.39227643609046936,
0.011785991489887238,
0.05445360764861107,
-0.009618367068469524,
0.16407835483551025,
-0.05617106705904007,
-0.31820741295814514,
-0.27636900544166565,
-0.022408533841371536,
0.1242738664150238,
-0.0406964048743248,
0.0008340268395841122,
0.19592298567295074,
-0.13103553652763367,
0.08389154076576233,
-0.0636444091796875,
0.32750850915908813,
0.12464392930269241,
-0.20465199649333954,
0.05882420763373375,
0.40806010365486145,
0.03672540932893753,
-0.38082700967788696,
0.05165744572877884,
-0.1442710906267166,
0.3233930468559265,
0.035643626004457474,
0.2501782774925232,
-0.22816747426986694,
-0.06801221519708633,
0.07523060590028763,
0.05984257906675339,
0.2335336059331894,
-0.17092019319534302,
-0.048170000314712524,
-0.1052030622959137,
-0.38771161437034607,
-0.2678881287574768,
0.21643762290477753,
-0.006056375801563263,
-0.1795615255832672,
0.005920577794313431,
0.4193461239337921,
0.3095819652080536,
-0.2826247215270996,
-0.14594854414463043,
0.19423919916152954,
-0.0659935250878334,
0.11200781166553497,
0.20047196745872498,
0.17175716161727905,
0.1559562385082245,
0.26633521914482117,
-0.14044369757175446,
0.2912520170211792,
-0.050531432032585144,
-0.18194352090358734,
0.3009444773197174,
0.002355419099330902,
-0.09911075234413147,
0.4771677255630493,
0.5397570133209229,
0.17355868220329285,
0.1439814269542694,
-0.26147937774658203,
0.2609955668449402,
-0.07504281401634216,
-0.01935392990708351,
-0.10603555291891098,
-0.05093727260828018,
-0.026525337249040604,
0.393629252910614,
0.10507570207118988,
-0.05664001405239105,
0.11540248990058899,
0.10641653090715408,
0.46771061420440674,
-0.014909205958247185,
-0.36384016275405884,
0.31063681840896606,
-0.08139386773109436,
0.07099002599716187,
-0.16228273510932922,
-0.014454200863838196,
0.009010769426822662,
0.22102385759353638,
-0.037519436329603195,
-0.39301979541778564,
0.42042040824890137,
0.15346156060695648,
0.05624222382903099,
-0.025435613468289375,
0.3434225916862488,
0.07461510598659515,
0.19641992449760437,
-0.22502511739730835,
-0.21110579371452332,
-0.00996764749288559,
-0.09224455058574677,
-0.03112753853201866,
0.27947506308555603,
0.06166548281908035,
0.2568713426589966,
-0.15628869831562042,
-0.16535745561122894,
-0.1590518057346344,
-0.0906653180718422,
-0.3291304409503937,
0.07331053912639618,
0.2943952679634094,
0.44014495611190796,
0.2390865832567215,
0.20257581770420074,
-0.21491044759750366,
0.1745109260082245,
0.12649838626384735,
0.16626182198524475,
-0.275372713804245,
-0.01612168550491333,
0.5091496706008911,
-0.44111916422843933,
0.03787028044462204,
-0.05052732676267624,
-0.10449680685997009,
0.24563750624656677,
0.2307598739862442,
-0.05149298906326294,
-0.05639869347214699,
-0.1891515702009201,
0.14890927076339722,
-0.03643568977713585,
0.4231000542640686,
0.2783065736293793,
0.2777864634990692,
-0.28770533204078674,
-0.051694680005311966,
-0.3176306486129761,
0.1564159095287323,
-0.5539383292198181,
0.16663004457950592,
0.15987908840179443,
0.10200545191764832,
0.10347270965576172,
0.5748132467269897,
-0.1977265328168869,
0.17598091065883636,
-0.31325069069862366,
0.05287768319249153,
-0.2904157340526581,
0.21163780987262726,
0.08647893369197845,
-0.14154204726219177,
-0.06631234288215637,
-0.34160318970680237,
0.3033045530319214,
-0.3045099675655365,
0.11571981757879257,
-0.2772308588027954,
0.05941435694694519,
0.37774696946144104,
0.5052100419998169,
0.8169475793838501,
0.04554930329322815,
0.06066614016890526,
0.09338691085577011,
-0.04749147593975067,
0.17870791256427765,
0.03604988008737564,
-0.15639221668243408,
-0.2791903018951416,
0.13304755091667175,
0.0009465869516134262,
-0.1509549468755722,
-0.0024157389998435974,
-0.25276029109954834,
0.46142277121543884,
0.028487004339694977,
-0.07002460211515427,
0.004053980112075806,
0.018100177869200706,
0.2650105357170105,
-0.009914549067616463,
-0.3587076961994171,
-0.13193348050117493,
-0.06986846029758453,
-0.17695023119449615,
-0.4861096143722534,
-0.04391735419631004,
0.3469734787940979,
-0.38086098432540894,
-0.08261962234973907,
-0.12647058069705963,
0.31481653451919556,
0.2144635021686554,
-0.11534930020570755,
-0.24164852499961853,
0.003032408654689789,
0.4177141785621643,
-0.012095633894205093,
-0.033797428011894226,
0.3544541001319885,
-0.08365163207054138,
-0.05251939222216606,
-0.1027495488524437,
0.2667659521102905,
-0.26607760787010193,
-0.23258820176124573,
-0.45855462551116943,
-0.5881471037864685
] |
https://github.com/huggingface/datasets/issues/4980 | Make `pyarrow` optional | Thanks for the info. Could `datasets` then be made optional for `transformers` instead? I used `transformers` only to deal with pretrained models to deploy them (convert to ONNX, and then I use TVM), so I don't really need `pyarrow` and `datasets` by now.
| **Is your feature request related to a problem? Please describe.**
Is `pyarrow` really needed for every dataset?
**Describe the solution you'd like**
It is made optional.
**Describe alternatives you've considered**
Likely, no.
| 43 | Make `pyarrow` optional
**Is your feature request related to a problem? Please describe.**
Is `pyarrow` really needed for every dataset?
**Describe the solution you'd like**
It is made optional.
**Describe alternatives you've considered**
Likely, no.
Thanks for the info. Could `datasets` then be made optional for `transformers` instead? I used `transformers` only to deal with pretrained models to deploy them (convert to ONNX, and then I use TVM), so I don't really need `pyarrow` and `datasets` by now.
| [
-0.11282633244991302,
0.11583815515041351,
-0.014203324913978577,
-0.30617713928222656,
0.27623462677001953,
-0.12688398361206055,
0.45049721002578735,
0.06423303484916687,
-0.616065502166748,
0.2382810413837433,
0.1601678729057312,
0.27665045857429504,
0.11531917750835419,
-0.07696682959794998,
-0.08305653184652328,
-0.07289109379053116,
0.0017551183700561523,
0.48905783891677856,
0.024019017815589905,
0.03513207286596298,
-0.13010141253471375,
-0.1655515432357788,
-0.3005187213420868,
0.09564422070980072,
-0.46808719635009766,
0.02231276035308838,
0.14005325734615326,
-0.37845319509506226,
-0.19631288945674896,
-0.43212467432022095,
0.21909114718437195,
0.34546664357185364,
0.03997582197189331,
0.05263756588101387,
-0.00011237867147428915,
-0.04871847480535507,
0.14115771651268005,
0.055850401520729065,
-0.3201301097869873,
-0.08527542650699615,
-0.1934400498867035,
-0.10398709028959274,
0.391502320766449,
-0.16612717509269714,
0.0803646519780159,
-0.17332328855991364,
0.055700138211250305,
0.3707382082939148,
0.19711336493492126,
0.23022685945034027,
0.17258033156394958,
0.36636367440223694,
-0.20934747159481049,
-0.014585992321372032,
0.31189432740211487,
0.4603140354156494,
-0.25892800092697144,
0.328533798456192,
-0.04997630417346954,
-0.08667066693305969,
-0.0709281638264656,
0.1587718427181244,
-0.1270875185728073,
-0.2861388027667999,
0.41510939598083496,
0.061211876571178436,
0.179555743932724,
-0.3373856246471405,
-0.09214047342538834,
0.3104161024093628,
0.6915389895439148,
-0.5063931345939636,
-0.1919516921043396,
-0.3080154061317444,
0.04414939880371094,
-0.2567705512046814,
-0.02171492576599121,
0.1338418573141098,
-0.23028849065303802,
0.35340267419815063,
-0.1961800456047058,
-0.35215312242507935,
-0.22559969127178192,
0.060697223991155624,
-0.24704405665397644,
0.30716371536254883,
0.27007585763931274,
0.05055181682109833,
-0.07517397403717041,
0.1259467899799347,
0.34209582209587097,
-0.18818818032741547,
0.11389286816120148,
-0.10398347675800323,
-0.16934986412525177,
-0.3934522569179535,
0.141082763671875,
0.16669151186943054,
0.013184435665607452,
0.10755015909671783,
-0.11397981643676758,
-0.2060243785381317,
0.16259093582630157,
0.10226409137248993,
-0.12161731719970703,
-0.11928446590900421,
-0.000726453959941864,
0.05005810409784317,
0.24322880804538727,
-0.31985852122306824,
0.115955650806427,
-0.053042612969875336,
0.21722236275672913,
-0.07845389097929001,
0.3794213831424713,
0.25635069608688354,
0.4819577932357788,
-0.11909843981266022,
-0.09525211900472641,
-0.2961798310279846,
-0.1795465052127838,
-0.050657957792282104,
0.05923381447792053,
0.09591216593980789,
0.07728710025548935,
0.055019184947013855,
-0.2178749144077301,
0.26498740911483765,
0.06076517701148987,
-0.2672176957130432,
0.05870850756764412,
-0.07909853756427765,
-0.1526837795972824,
0.19893620908260345,
0.19331111013889313,
0.18217957019805908,
0.06698273122310638,
0.299031525850296,
0.09544970095157623,
0.5730239748954773,
0.09678652882575989,
-0.08961673080921173,
-0.09716122597455978,
0.3029271364212036,
-0.3394216299057007,
-0.022489245980978012,
-0.14471964538097382,
0.45777493715286255,
-0.2645708918571472,
0.5630815625190735,
-0.006741508841514587,
-0.4848264455795288,
-0.12692955136299133,
0.19202566146850586,
-0.22033821046352386,
-0.21444189548492432,
0.05676412582397461,
0.19597069919109344,
-0.18114694952964783,
-0.011175662279129028,
0.323280394077301,
-0.17607775330543518,
0.0630904883146286,
-0.3163995146751404,
-0.04502213001251221,
0.017692402005195618,
-0.4473132789134979,
-0.11460928618907928,
-0.16173523664474487,
-0.4493301510810852,
0.06599660217761993,
0.2981054186820984,
-0.7123932242393494,
0.30061817169189453,
-0.0003395434468984604,
0.20742599666118622,
0.55113285779953,
0.008705344051122665,
-0.15901878476142883,
0.026294751092791557,
-0.37047094106674194,
-0.0650295838713646,
0.09483323991298676,
0.19537629187107086,
-0.08875283598899841,
-0.05998889356851578,
-0.13038738071918488,
0.291839063167572,
-0.18199017643928528,
-0.048328813165426254,
-0.20056718587875366,
-0.24905544519424438,
0.4823912978172302,
0.25919362902641296,
-0.12091593444347382,
0.14402617514133453,
-0.16530677676200867,
-0.12379249930381775,
0.11947381496429443,
-0.3048604726791382,
-0.19634322822093964,
0.04915008693933487,
0.7499383091926575,
-0.15498308837413788,
-0.06897878646850586,
-0.14594805240631104,
-0.7399266362190247,
0.06218110769987106,
-0.16103264689445496,
0.2630581557750702,
-0.2317046970129013,
-0.4547386169433594,
0.12210089713335037,
0.04864935576915741,
0.19244025647640228,
0.32106325030326843,
0.10604090988636017,
-0.3000272512435913,
-0.11129309237003326,
-0.0989115983247757,
-0.17039057612419128,
-0.16817772388458252,
0.07402670383453369,
0.26905399560928345,
0.18837220966815948,
0.24717389047145844,
-0.12005027383565903,
-0.02563188597559929,
0.007331080734729767,
-0.0762956365942955,
0.1838240921497345,
0.15493185818195343,
0.16281631588935852,
0.23170733451843262,
0.040205612778663635,
0.008049853146076202,
-0.3797668218612671,
0.44778579473495483,
0.1787591576576233,
-0.34834039211273193,
0.040220074355602264,
0.018271273002028465,
-0.13877682387828827,
0.1002446636557579,
-0.1427609622478485,
0.2822611331939697,
0.19261115789413452,
0.14074188470840454,
0.11039690673351288,
-0.1491757333278656,
-0.17156989872455597,
-0.2576662302017212,
-0.22782044112682343,
0.03740639239549637,
0.05376223847270012,
0.3842966854572296,
0.14849776029586792,
0.4630591869354248,
-0.26213282346725464,
0.007013700902462006,
0.5086028575897217,
0.06589411199092865,
0.13150611519813538,
0.19695156812667847,
-0.20939984917640686,
-0.12885600328445435,
0.20842216908931732,
-0.3503909707069397,
0.30743592977523804,
0.38737449049949646,
-0.02425689622759819,
0.1613422930240631,
-0.1594894379377365,
-0.2648211121559143,
0.23842057585716248,
0.20978732407093048,
0.09469184279441833,
-0.10173400491476059,
0.36649152636528015,
0.12477634102106094,
-0.2829476594924927,
-0.29084333777427673,
0.0937877967953682,
-0.12316425144672394,
-0.22092966735363007,
-0.07203404605388641,
-0.13855959475040436,
-0.11284206807613373,
-0.06719991564750671,
-0.32075509428977966,
-0.48484188318252563,
-0.15139147639274597,
0.40088629722595215,
0.020710470154881477,
-0.13221272826194763,
0.5197092890739441,
-0.07616238296031952,
0.3041457533836365,
-0.24357326328754425,
-0.23062829673290253,
-0.13272632658481598,
-0.2782638370990753,
-0.13288947939872742,
0.09616778790950775,
-0.1494830995798111,
-0.11960173398256302,
0.4138689637184143,
0.17415030300617218,
0.1814533770084381,
-0.4661213159561157,
-0.4403088688850403,
0.1254909634590149,
0.11115222424268723,
0.1746857464313507,
0.18542486429214478,
0.20228520035743713,
0.15687672793865204,
-0.3046921491622925,
0.13180428743362427,
0.15092526376247406,
0.0413614958524704,
0.023778852075338364,
-0.2656837999820709,
-0.024264883249998093,
-0.120541051030159,
-0.10107902437448502,
-0.09444339573383331,
-0.23123662173748016,
0.3016631603240967,
-0.24216751754283905,
0.003963276743888855,
0.32917270064353943,
0.23852816224098206,
-0.13192591071128845,
-0.23869389295578003,
-0.06204507499933243,
0.2566556930541992,
0.031348686665296555,
0.3786377012729645,
0.14232906699180603,
0.060826435685157776,
-0.05933581665158272,
-0.09443224966526031,
0.07068973779678345,
0.4692544937133789,
-0.22674764692783356,
-0.1469641625881195,
-0.1763395071029663,
0.753424346446991,
-0.05926671624183655,
-0.1496172845363617,
0.5451909303665161,
0.24529105424880981,
-0.11453618109226227,
0.13300374150276184,
-0.17209123075008392,
-0.028140462934970856,
0.23409664630889893,
0.11231692135334015,
-0.03964658081531525,
0.20501583814620972,
0.006996624171733856,
0.8852596879005432,
-0.2748347520828247,
-0.11023479700088501,
0.1746228039264679,
-0.03136129677295685,
0.20890399813652039,
0.005319461226463318,
-0.24491986632347107,
-0.12470090389251709,
-0.08383621275424957,
-0.14137068390846252,
0.31975144147872925,
-0.14625397324562073,
-0.2845977544784546,
-0.13721883296966553,
-0.3292258381843567,
-0.04026998206973076,
-0.3942427933216095,
0.2868700623512268,
0.025765277445316315,
0.3487708568572998,
0.09011603891849518,
0.06868516653776169,
-0.34416359663009644,
-0.10089637339115143,
0.13447652757167816,
0.11021971702575684,
0.22595074772834778,
-0.35757672786712646,
-0.40350449085235596,
-0.05942393094301224,
-0.13165238499641418,
0.042774125933647156,
-0.02880401723086834,
-0.1669216901063919,
0.2511064410209656,
-0.0517045259475708,
-0.021397478878498077,
0.16324977576732635,
0.5457305908203125,
0.049628786742687225,
-0.26728570461273193,
0.06565050780773163,
0.20956391096115112,
-0.30775371193885803,
-0.03416704386472702,
-0.016154970973730087,
-0.18920984864234924,
0.05666911602020264,
0.05606267601251602,
-0.36472293734550476,
-0.26579418778419495,
0.24201875925064087,
0.2773793935775757,
-0.16746734082698822,
-0.3622613251209259,
-0.14560416340827942,
0.11498699337244034,
-0.10888620465993881,
-0.027377374470233917,
0.1431204378604889,
-0.3130897283554077,
-0.20234113931655884,
0.0539761446416378,
0.07250805199146271,
-0.15543556213378906,
0.2742297351360321,
0.010655209422111511,
-0.04925639554858208,
-0.1928953379392624,
-0.06952738761901855,
-0.18664154410362244,
-0.06561389565467834,
0.34200283885002136,
0.1235128864645958,
-0.16494102776050568,
-0.6702327728271484,
-0.3690461814403534,
0.08327177911996841,
0.6167809367179871,
0.34336668252944946,
-0.05261022225022316,
0.30095693469047546,
-0.009852632880210876,
0.027804896235466003,
-0.056713346391916275,
0.02915951795876026,
0.19134767353534698,
-0.49643978476524353,
-0.200238898396492,
-0.014324059709906578,
0.4025372266769409,
0.0406043641269207,
-0.12271915376186371,
-0.07885648310184479,
0.29936572909355164,
-0.20813201367855072,
0.04599153995513916,
0.13066452741622925,
0.9996390342712402,
0.27230048179626465,
0.27610087394714355,
0.3591972589492798,
-0.07675930857658386,
0.3211827874183655,
-0.12341057509183884,
0.2657652497291565,
-0.2839183211326599,
-0.3001162111759186,
-0.04033568501472473,
-0.34892988204956055,
0.1666121780872345,
0.3336332440376282,
-0.3081015646457672,
0.1610533893108368,
-0.0490632988512516,
0.4674491286277771,
0.16987228393554688,
0.25952479243278503,
0.21349012851715088,
-0.2567293047904968,
-0.09134958684444427,
0.08675970882177353,
0.05303999036550522,
-0.034760866314172745,
-0.13288603723049164,
-0.26421618461608887,
0.21845033764839172,
-0.3007514476776123,
0.029894597828388214,
0.06601870059967041,
-0.40269389748573303,
-0.04921136051416397,
0.1278897523880005,
-0.013591505587100983,
0.20262518525123596,
0.12727785110473633,
0.04345247521996498,
0.01661921665072441,
-0.2555442154407501,
0.21035802364349365,
0.11136029660701752,
0.03510333225131035,
-0.2216319590806961,
-0.015029522590339184,
0.18801061809062958,
-0.15380334854125977,
-0.24824824929237366,
0.24798929691314697,
-0.06400811672210693,
-0.15442097187042236,
-0.29339683055877686,
-0.4440922737121582,
0.2733110785484314,
-0.33760547637939453,
0.1515524536371231,
-0.11998520791530609,
0.12781192362308502,
-0.19607849419116974,
0.16141167283058167,
-0.04789137840270996,
0.16058887541294098,
0.0190296471118927,
-0.08542874455451965,
-0.03706713393330574,
-0.2824442684650421,
0.030171163380146027,
0.12716299295425415,
-0.06026018410921097,
0.1620243787765503,
-0.022279735654592514,
-0.3643351197242737,
-0.266783744096756,
0.029822252690792084,
0.1338253617286682,
-0.5666682720184326,
0.11625911295413971,
0.17971709370613098,
0.19647224247455597,
-0.26417315006256104,
0.15272477269172668,
0.1834714263677597,
-0.17613890767097473,
-0.12622645497322083,
0.2161726951599121,
-0.32953107357025146,
0.2405778169631958,
0.22110627591609955,
0.12809573113918304,
0.02532145380973816,
0.3363204002380371,
0.2832261919975281,
0.08482334017753601,
-0.3852357566356659,
-0.0052982959896326065,
0.06502866744995117,
0.4029894471168518,
-0.1925891488790512,
-0.28901222348213196,
-0.07865490764379501,
-0.015683699399232864,
0.11963388323783875,
-0.23779408633708954,
-0.13672998547554016,
-0.22295299172401428,
-0.17377620935440063,
0.1780145764350891,
0.22004038095474243,
-0.06527521461248398,
0.2453227937221527,
0.046988025307655334,
-0.02816126123070717,
0.014147475361824036,
0.04444778338074684,
-0.02171621099114418,
-0.05933697521686554,
0.3044278621673584,
0.367704838514328,
0.12122711539268494,
-0.4354148507118225,
-0.14404375851154327,
-0.0899408608675003,
0.21243003010749817,
0.28893107175827026,
0.19292977452278137,
-0.2021145522594452,
-0.019396964460611343,
-0.03121192380785942,
0.10262860357761383,
0.313790500164032,
0.005480609834194183,
-0.08398788422346115,
-0.07353104650974274,
-0.20199432969093323,
-0.19317351281642914,
0.20798581838607788,
0.05904899910092354,
-0.17614628374576569,
0.08882397413253784,
0.4179161787033081,
0.22736060619354248,
-0.42353498935699463,
-0.02354869246482849,
0.4565483331680298,
-0.13133621215820312,
0.1583067923784256,
0.29739975929260254,
0.1990446150302887,
0.1728546917438507,
0.32768407464027405,
-0.12881433963775635,
0.2309836745262146,
0.008670814335346222,
0.06963422894477844,
0.7282086610794067,
0.1357080489397049,
-0.016441259533166885,
0.5245151519775391,
0.559106707572937,
0.18244755268096924,
0.1840783655643463,
-0.21130195260047913,
0.24666830897331238,
-0.2139604389667511,
-0.11384269595146179,
0.2702268064022064,
0.05179144814610481,
-0.15078189969062805,
0.1463640332221985,
0.29323810338974,
-0.3381204903125763,
0.12344343215227127,
-0.05343521386384964,
0.5544940233230591,
-0.08093143254518509,
-0.1907675415277481,
0.3057853579521179,
-0.146473228931427,
0.05868185684084892,
-0.10380634665489197,
-0.0764269232749939,
-0.009041078388690948,
0.001992546021938324,
-0.051363635808229446,
-0.23563708364963531,
0.346721887588501,
0.032792262732982635,
0.1915532946586609,
-0.09290152043104172,
0.44353166222572327,
0.156290203332901,
0.14690333604812622,
-0.09778827428817749,
-0.26743030548095703,
-0.04418554902076721,
-0.08032087981700897,
0.07216408848762512,
0.2524423599243164,
0.07872401177883148,
0.29961538314819336,
-0.21686646342277527,
-0.11440823972225189,
-0.12975585460662842,
-0.21893133223056793,
-0.018276304006576538,
-0.03239073231816292,
0.06751854717731476,
0.7279794812202454,
0.08793239295482635,
0.14997056126594543,
-0.19791005551815033,
0.19383776187896729,
-0.12695418298244476,
-0.02261640504002571,
-0.5381754636764526,
0.24680891633033752,
0.4086059629917145,
-0.5310648083686829,
0.014348428696393967,
-0.0703899934887886,
-0.015358708798885345,
0.12405405193567276,
0.3679082691669464,
0.11505372822284698,
-0.10439397394657135,
-0.21482577919960022,
0.08315412700176239,
-0.04104921594262123,
0.2147596925497055,
0.29186204075813293,
0.4271315634250641,
-0.31501972675323486,
0.12461382150650024,
-0.3516105115413666,
-0.02076137810945511,
-0.2660483419895172,
0.2193550020456314,
0.39496779441833496,
-0.1407703161239624,
0.003033764660358429,
0.5133622288703918,
-0.14937575161457062,
0.08631070703268051,
-0.21600914001464844,
0.004683829843997955,
-0.3054425120353699,
0.21800808608531952,
0.012321975082159042,
-0.10902871191501617,
-0.1140347272157669,
-0.18319138884544373,
0.23410074412822723,
-0.021948475390672684,
-0.012454457581043243,
-0.41651397943496704,
-0.03257717564702034,
0.44775474071502686,
0.4067823588848114,
0.5978631973266602,
0.05174611508846283,
0.3620205521583557,
0.17583364248275757,
-0.12326563149690628,
0.22910375893115997,
-0.016946589574217796,
-0.15529890358448029,
-0.09386297315359116,
0.20900249481201172,
0.1390465497970581,
-0.14261648058891296,
-0.019079100340604782,
-0.27674922347068787,
0.12969401478767395,
0.12694436311721802,
-0.2107173651456833,
-0.1020486131310463,
0.07829194515943527,
0.20615270733833313,
0.018526628613471985,
-0.28353384137153625,
-0.1885835826396942,
-0.008942440152168274,
-0.12453927844762802,
-0.522282063961029,
-0.09549345821142197,
0.5144590735435486,
-0.14427249133586884,
-0.23021073639392853,
-0.3582679033279419,
0.18420624732971191,
0.16442739963531494,
-0.029550639912486076,
-0.4050195813179016,
-0.17443613708019257,
0.46310511231422424,
-0.11758998781442642,
0.015045147389173508,
0.2866072654724121,
0.21045224368572235,
-0.10211373120546341,
-0.12505978345870972,
0.3655056655406952,
-0.27156928181648254,
-0.20307178795337677,
-0.49213361740112305,
-0.32272690534591675
] |
https://github.com/huggingface/datasets/issues/4977 | Providing dataset size | Hi @sashavor, thanks for your suggestion.
Until now we have the CLI command
```
datasets-cli test datasets/<your-dataset-folder> --save_infos --all_configs
```
that generates the `dataset_infos.json` with the size of the downloaded dataset, among other information.
We are currently in the middle of removing those JSON files and putting their information directly in the header of the `README.md` (as YAML tags). Normally, the CLI command should continue working but saving its output to the dataset card instead. See:
- #4926 | **Is your feature request related to a problem? Please describe.**
Especially for big datasets like [LAION](https://huggingface.co/datasets/laion/laion2B-en/), it's hard to know exactly the downloaded size (because there are many files and you don't have their exact size when downloaded).
**Describe the solution you'd like**
Auto-populating the downloaded dataset size on the dataset page would be really useful, including that of each split (when there are some).
**Describe alternatives you've considered**
People should be adding this to dataset cards, but I don't think that is systematically the case :slightly_smiling_face:
**Additional context**
Mentioned to @lhoestq
| 78 | Providing dataset size
**Is your feature request related to a problem? Please describe.**
Especially for big datasets like [LAION](https://huggingface.co/datasets/laion/laion2B-en/), it's hard to know exactly the downloaded size (because there are many files and you don't have their exact size when downloaded).
**Describe the solution you'd like**
Auto-populating the downloaded dataset size on the dataset page would be really useful, including that of each split (when there are some).
**Describe alternatives you've considered**
People should be adding this to dataset cards, but I don't think that is systematically the case :slightly_smiling_face:
**Additional context**
Mentioned to @lhoestq
Hi @sashavor, thanks for your suggestion.
Until now we have the CLI command
```
datasets-cli test datasets/<your-dataset-folder> --save_infos --all_configs
```
that generates the `dataset_infos.json` with the size of the downloaded dataset, among other information.
We are currently in the middle of removing those JSON files and putting their information directly in the header of the `README.md` (as YAML tags). Normally, the CLI command should continue working but saving its output to the dataset card instead. See:
- #4926 | [
-0.6399008631706238,
-0.21281209588050842,
-0.1131865382194519,
0.14964421093463898,
-0.009436305612325668,
0.12655416131019592,
0.1680154800415039,
0.3114834427833557,
0.14171119034290314,
0.41401559114456177,
-0.08500179648399353,
0.09813991189002991,
0.12638558447360992,
0.5448517203330994,
0.05198296532034874,
-0.07836778461933136,
-0.25980344414711,
0.2505093812942505,
-0.038945406675338745,
0.12242090702056885,
-0.2576656639575958,
-0.017729083076119423,
0.28838449716567993,
-0.31719303131103516,
-0.03999697417020798,
-0.01757070980966091,
-0.35610637068748474,
-0.07580005377531052,
-0.27336034178733826,
-0.5118666887283325,
0.27055492997169495,
0.25003528594970703,
0.416245698928833,
-0.3200893700122833,
-0.00010835158900590613,
-0.18741461634635925,
0.36373353004455566,
-0.20537027716636658,
-0.5125887393951416,
0.007582575082778931,
-0.5328436493873596,
-0.5116864442825317,
0.046958453953266144,
-0.28997260332107544,
0.06130148470401764,
-0.11397694051265717,
-0.032687991857528687,
-0.23728255927562714,
0.07711659371852875,
-0.006426728330552578,
0.20940770208835602,
-0.05099822208285332,
0.06574046611785889,
-0.1892305463552475,
0.3499094843864441,
0.4873080253601074,
-0.11323592811822891,
-0.04370764642953873,
0.25936904549598694,
0.20571452379226685,
0.04645823687314987,
0.3652476668357849,
0.3906901180744171,
-0.05715061351656914,
0.1738554835319519,
0.1329478770494461,
0.1924041211605072,
-0.2158716320991516,
0.18309366703033447,
0.39007455110549927,
0.7215890288352966,
-0.3698939383029938,
-0.4107184410095215,
-0.7214623689651489,
0.16920296847820282,
-0.15116830170154572,
-0.12106002122163773,
0.36944955587387085,
-0.010618527419865131,
0.12069489061832428,
-0.2991392910480499,
-0.13785576820373535,
-0.0857696682214737,
-0.050542205572128296,
-0.13456708192825317,
0.1108073890209198,
-0.03827936202287674,
0.02113400027155876,
0.16404372453689575,
-0.12819232046604156,
-0.06623566150665283,
-0.07206045091152191,
-0.318223774433136,
0.11416333168745041,
-0.09810809791088104,
-0.4583163559436798,
0.021839071065187454,
-0.05351337045431137,
0.579525351524353,
0.20875972509384155,
0.049932241439819336,
-0.14402887225151062,
-0.0315542072057724,
0.06359632313251495,
0.6407613754272461,
0.15713752806186676,
0.22163450717926025,
0.2067115157842636,
0.09473299980163574,
0.1616317480802536,
0.4927615523338318,
-0.20340073108673096,
-0.07831326872110367,
0.3414209187030792,
0.0341193787753582,
-0.049551837146282196,
0.000476006418466568,
-0.04147233068943024,
-0.20567117631435394,
-0.022478025406599045,
0.14434373378753662,
-0.12641218304634094,
-0.2112523317337036,
0.34021908044815063,
-0.21588607132434845,
0.20659229159355164,
-0.23344717919826508,
-0.10990020632743835,
0.09282831847667694,
-0.3964982032775879,
0.002003107685595751,
-0.14474880695343018,
-0.15105411410331726,
0.10007207095623016,
0.1814289391040802,
0.11598660051822662,
0.24214480817317963,
-0.33483219146728516,
0.0831252783536911,
0.07277148216962814,
0.04577941447496414,
-0.19492268562316895,
0.051573652774095535,
0.23689556121826172,
0.2572059631347656,
-0.012759329751133919,
-0.25750890374183655,
0.03592026233673096,
-0.39550837874412537,
0.41161736845970154,
-0.25058379769325256,
-0.07589145004749298,
-0.21398994326591492,
0.2187630832195282,
-0.03818659111857414,
0.012193292379379272,
-0.17608174681663513,
0.3414495289325714,
0.10712973773479462,
-0.12985491752624512,
-0.14193883538246155,
-0.12733422219753265,
-0.06821585446596146,
-0.3509555757045746,
0.23799648880958557,
0.5107987523078918,
-0.418650358915329,
-0.35229483246803284,
-0.3320239782333374,
-0.3073548674583435,
-0.04654475301504135,
0.002858363091945648,
-0.17310382425785065,
0.0946090891957283,
-0.1198437511920929,
0.31760698556900024,
0.45841705799102783,
-0.12095928192138672,
-0.4368283748626709,
0.2124224305152893,
0.07306830585002899,
0.08655377477407455,
0.09653332084417343,
0.19187618792057037,
0.4515446722507477,
0.044206615537405014,
-0.021239779889583588,
0.37793225049972534,
-0.30956244468688965,
0.2217826247215271,
-0.09237849712371826,
-0.5880550146102905,
-0.2247367650270462,
0.2410650998353958,
0.21547453105449677,
-0.08694536238908768,
0.4355250895023346,
0.296851247549057,
0.6154323220252991,
-0.05930260196328163,
0.30151674151420593,
0.14878621697425842,
0.4421796500682831,
-0.1261107325553894,
0.04145197942852974,
-0.11432762444019318,
-0.4561457633972168,
0.14855170249938965,
-0.17981642484664917,
-0.12793439626693726,
-0.08749896287918091,
-0.5474929213523865,
-0.3151226043701172,
0.06855346262454987,
-0.01418888196349144,
-0.19466376304626465,
0.12093599140644073,
0.2981100082397461,
0.25734061002731323,
-0.18321026861667633,
-0.003558918833732605,
0.16782285273075104,
-0.25951871275901794,
0.14319194853305817,
-0.057511474937200546,
0.07401590049266815,
0.22522850334644318,
0.13261297345161438,
0.13369493186473846,
0.04051807522773743,
-0.07482147961854935,
-0.047466229647397995,
-0.036160681396722794,
0.44037237763404846,
0.2608948349952698,
0.06514783203601837,
0.14044299721717834,
-0.01685670018196106,
0.36489924788475037,
0.20255056023597717,
0.20472240447998047,
-0.2629701793193817,
-0.15016938745975494,
0.15101578831672668,
-0.5082247257232666,
0.22799718379974365,
0.019025906920433044,
0.185543492436409,
-0.0029948726296424866,
-0.1386946439743042,
0.24256712198257446,
-0.10479389876127243,
0.023204775527119637,
-0.4676693081855774,
-0.36297255754470825,
0.16623929142951965,
0.07075591385364532,
-0.07555051147937775,
-0.1852843016386032,
0.23967471718788147,
0.49225345253944397,
0.04340411350131035,
-0.16881102323532104,
0.22040259838104248,
-0.26431217789649963,
-0.00587891973555088,
0.30289050936698914,
0.658636748790741,
0.42415159940719604,
0.42032676935195923,
0.29905518889427185,
-0.08833179622888565,
0.1063859686255455,
-0.0008903108537197113,
0.14019224047660828,
-0.050003305077552795,
-0.04055817425251007,
0.08227619528770447,
0.127405047416687,
-0.2715095579624176,
-0.07146517187356949,
0.14222827553749084,
0.03925558179616928,
-0.03903671354055405,
-0.10217227786779404,
-0.29323360323905945,
0.02159886620938778,
-0.3956097960472107,
-0.11232390999794006,
-0.15371672809123993,
-0.007792472839355469,
-0.23769506812095642,
0.2172720581293106,
-0.05619891360402107,
-0.0066048335283994675,
-0.03364130109548569,
-0.3309272527694702,
0.41261541843414307,
-0.0025942642241716385,
-0.11466854065656662,
0.26942625641822815,
0.2337411642074585,
-0.1477956473827362,
0.21671871840953827,
-0.024050675332546234,
-0.10877449065446854,
0.6068367958068848,
-0.37134817242622375,
0.35679876804351807,
-0.24343806505203247,
-0.20458465814590454,
0.35193538665771484,
0.1479150950908661,
0.07296235114336014,
0.05754639953374863,
0.2960631251335144,
0.2558860778808594,
-0.01658509485423565,
-0.06902670860290527,
0.22577154636383057,
-0.09760865569114685,
-0.3038756847381592,
0.12870454788208008,
0.1449427753686905,
-0.38250064849853516,
-0.3598257601261139,
-0.33805277943611145,
-0.22844475507736206,
0.31994354724884033,
0.17260508239269257,
0.20873785018920898,
0.0008233385160565376,
0.07752226293087006,
-0.18462343513965607,
-0.24364498257637024,
-0.19218610227108002,
-0.09010250866413116,
-0.22107386589050293,
0.24466033279895782,
-0.35083097219467163,
-0.08253511786460876,
0.08555623888969421,
-0.028380103409290314,
0.10543028265237808,
0.3693488836288452,
-0.3687848448753357,
0.200042262673378,
-0.2016633301973343,
0.10588386654853821,
-0.200516015291214,
0.16576750576496124,
0.26815593242645264,
0.07424615323543549,
0.008635284379124641,
0.03305262327194214,
-0.037823379039764404,
0.025932781398296356,
0.21222153306007385,
0.6059243083000183,
-0.06780590862035751,
0.10881907492876053,
0.12465965747833252,
0.40881913900375366,
0.21887658536434174,
-0.11454926431179047,
0.09709213674068451,
-0.08520661294460297,
0.22916924953460693,
0.0164451003074646,
0.20211580395698547,
0.12111098319292068,
-0.047329261898994446,
-0.03791665658354759,
0.37830406427383423,
0.2525748908519745,
-0.22838051617145538,
-0.06965582072734833,
-0.06718132644891739,
-0.17108187079429626,
-0.25035277009010315,
0.2563205063343048,
0.07403729110956192,
0.25609293580055237,
-0.12819334864616394,
0.13926422595977783,
-0.16050457954406738,
-0.09298864006996155,
-0.27898603677749634,
0.12637542188167572,
0.1957668960094452,
0.1587986797094345,
-0.2605600655078888,
0.10105611383914948,
-0.2914201021194458,
0.1286098062992096,
0.19188056886196136,
-0.13164645433425903,
-0.05766918510198593,
-0.21792927384376526,
-0.13658471405506134,
0.03206745535135269,
0.17737507820129395,
-0.2510813772678375,
-0.29296666383743286,
-0.3254799544811249,
-0.05355307459831238,
0.06550848484039307,
-0.042396821081638336,
-0.10332275927066803,
-0.12016534805297852,
0.28418105840682983,
0.2277219444513321,
-0.4818289875984192,
-0.03197788819670677,
0.24557752907276154,
0.26192551851272583,
-0.3305884897708893,
-0.053143370896577835,
0.06609810888767242,
0.1390506625175476,
-0.33769491314888,
0.06171634420752525,
-0.020252689719200134,
0.11347595602273941,
-0.10319255292415619,
-0.34004220366477966,
-0.02155577577650547,
-0.0685916319489479,
-0.020092271268367767,
0.3301968276500702,
0.41262269020080566,
0.269218772649765,
0.17978119850158691,
0.1781793087720871,
0.4729018211364746,
0.5356065630912781,
0.4276432693004608,
-0.10184061527252197,
-0.09617756307125092,
0.10501353442668915,
-0.257407009601593,
0.2972448766231537,
0.2882125973701477,
0.06078418344259262,
-0.21831142902374268,
-0.1375967413187027,
0.2993382215499878,
-0.2547197937965393,
0.2328932285308838,
0.033286988735198975,
-0.3322593867778778,
-0.45268601179122925,
-0.7384263277053833,
0.23722463846206665,
-0.12810897827148438,
0.14534196257591248,
0.3333384394645691,
0.059702809900045395,
-0.4154929518699646,
-0.1064145565032959,
0.22274073958396912,
0.8087397217750549,
0.0474727600812912,
-0.033085789531469345,
-0.25732094049453735,
-0.14564236998558044,
0.3589402735233307,
-0.407995343208313,
0.09242381155490875,
-0.31561410427093506,
0.1582341492176056,
-0.10199573636054993,
0.11706790328025818,
0.06908340007066727,
0.139694482088089,
-0.3695802092552185,
0.09219039231538773,
0.13810449838638306,
-0.1301444172859192,
-0.20827777683734894,
0.6027504205703735,
-0.5205036401748657,
-0.36943909525871277,
0.15866750478744507,
0.15084441006183624,
-0.12496644258499146,
0.05840305984020233,
-0.12366785109043121,
-0.17178772389888763,
0.0067243799567222595,
-0.09067848324775696,
-0.27792325615882874,
-0.10083235800266266,
-0.3593153953552246,
-0.18998859822750092,
-0.31505340337753296,
-0.0038333460688591003,
-0.07101419568061829,
0.1493869125843048,
-0.11675302684307098,
0.35767385363578796,
-0.35378655791282654,
0.3025822341442108,
-0.3790154457092285,
0.20845237374305725,
0.02984621562063694,
0.08724520355463028,
0.17325459420681,
0.03187469393014908,
-0.21746417880058289,
-0.03513333201408386,
-0.03177427873015404,
-0.06933332979679108,
-0.15513567626476288,
-0.20712371170520782,
0.08622978627681732,
-0.4311884045600891,
-0.024600064381957054,
-0.1010752022266388,
0.05076245591044426,
-0.06442946195602417,
0.14069555699825287,
0.10869239270687103,
0.17261186242103577,
0.15037831664085388,
0.21485453844070435,
-0.14102956652641296,
-0.4111585021018982,
0.10032009333372116,
-0.022681571543216705,
-0.08608102798461914,
0.00012832507491111755,
-0.18865221738815308,
-0.039264969527721405,
-0.07322881370782852,
0.3300298750400543,
-0.09115678817033768,
-0.04285561293363571,
-0.32086998224258423,
-0.14495974779129028,
0.005153626203536987,
-0.0563725121319294,
0.15913519263267517,
0.1634637862443924,
0.19677403569221497,
-0.07195281982421875,
-0.23563027381896973,
-0.2586109936237335,
0.2622773051261902,
-0.158847376704216,
0.4622393548488617,
0.14480692148208618,
-0.09105782210826874,
0.05850323289632797,
0.176509827375412,
-0.34713923931121826,
-0.24615921080112457,
0.032800234854221344,
0.05856148153543472,
0.12482725828886032,
0.4556291699409485,
0.19978144764900208,
-0.08268938958644867,
0.036139197647571564,
0.06883084774017334,
-0.16711747646331787,
-0.17022061347961426,
-0.22002674639225006,
0.08576518297195435,
-0.10357282310724258,
0.3522040843963623,
-0.17500147223472595,
-0.2592911720275879,
-0.0023876726627349854,
-0.4350054860115051,
0.2606752812862396,
-0.2738289535045624,
-0.1126718819141388,
-0.08741647750139236,
0.169573575258255,
-0.13648581504821777,
-0.18107390403747559,
0.3455166220664978,
0.20344850420951843,
0.1882011741399765,
-0.08098256587982178,
0.40863120555877686,
-0.3316366672515869,
0.05965353548526764,
0.061290010809898376,
0.1675567328929901,
0.3281901776790619,
-0.058069780468940735,
-0.012952320277690887,
0.11954575777053833,
0.09988261759281158,
0.05110035836696625,
0.3884524405002594,
0.18234217166900635,
0.07274378091096878,
0.1630159616470337,
0.06318983435630798,
0.2499411255121231,
-0.022583913058042526,
0.00615724828094244,
0.10969811677932739,
0.03848996013402939,
0.05083951726555824,
0.45922592282295227,
0.26679033041000366,
0.18700501322746277,
0.08889798820018768,
-0.03964298218488693,
0.4202340245246887,
0.03214883431792259,
0.16786985099315643,
0.8943660855293274,
0.03479732200503349,
0.21801523864269257,
0.17808732390403748,
-0.04098561778664589,
0.3860107660293579,
0.3733592629432678,
-0.2475128173828125,
0.4629082679748535,
0.17892155051231384,
-0.14503927528858185,
-0.023979924619197845,
-0.29198360443115234,
0.04387133568525314,
0.02278558909893036,
0.0417289212346077,
0.19764673709869385,
0.31807059049606323,
0.30176326632499695,
0.07509475201368332,
-0.008152879774570465,
-0.34094762802124023,
0.020057925954461098,
-0.1815522313117981,
0.038727711886167526,
-0.19070452451705933,
-0.36448660492897034,
-0.3318741023540497,
0.1370019167661667,
0.0004045739769935608,
-0.34353119134902954,
0.06739102303981781,
-0.1512022167444229,
0.05117935687303543,
-0.1538246124982834,
-0.01786790043115616,
0.09426646679639816,
0.04677704721689224,
-0.5411748886108398,
-0.17655543982982635,
-0.028271809220314026,
-0.06532560288906097,
0.053013455122709274,
0.05066724121570587,
0.12552320957183838,
0.2016485184431076,
0.262045294046402,
-0.02203907072544098,
0.23381121456623077,
0.011705288663506508,
-0.2727116048336029,
-0.29832983016967773,
0.13708513975143433,
-0.018561482429504395,
0.35126352310180664,
0.23746448755264282,
-0.19373899698257446,
-0.10635824501514435,
0.03325319290161133,
-0.10878336429595947,
-0.34173548221588135,
0.09343073517084122,
0.008327525109052658,
-0.15523365139961243,
0.07744869589805603,
-0.17483630776405334,
-0.4107079803943634,
0.05560773238539696,
0.38603609800338745,
-0.08859653770923615,
0.06273666769266129,
-0.06837562471628189,
0.08849257230758667,
-0.08641733229160309,
0.1222739964723587,
0.09655022621154785,
-0.4270593225955963,
-0.04185054451227188,
-0.24323947727680206,
-0.5026156306266785,
-0.07174917310476303,
-0.18822798132896423,
-0.26247987151145935,
0.1704997420310974,
0.23599489033222198,
0.12841656804084778,
0.16259810328483582,
0.0689036101102829,
-0.02174588292837143,
0.3077738285064697,
0.26300910115242004,
-0.26650944352149963,
-0.45752012729644775,
-0.15499213337898254,
0.21753816306591034,
0.09792201220989227,
-0.2090403139591217,
0.10557247698307037,
-0.03477054461836815,
-0.02568669430911541,
-0.13131456077098846,
0.1025804728269577,
0.22092442214488983,
-0.1700039952993393,
0.48075082898139954,
-0.15902873873710632,
0.45016515254974365,
-0.19771763682365417,
-0.03051682934165001,
-0.14527320861816406,
-0.032983697950839996,
0.01052736584097147,
0.19049882888793945,
0.028441300615668297,
0.4636881351470947,
-0.08048930019140244,
0.037286512553691864,
-0.31175538897514343,
-0.01799812540411949,
0.22923173010349274,
-0.07366518676280975,
0.0774879977107048,
-0.12586098909378052,
0.00562700629234314,
-0.19310791790485382,
0.3585842251777649,
0.2682046890258789,
-0.12769292294979095,
-0.1549598127603531,
0.08336646854877472,
-0.23070856928825378,
0.07642726600170135,
-0.0034402478486299515,
0.0005958657711744308,
-0.07892903685569763,
0.14428478479385376,
0.0467759370803833,
-0.03472848981618881,
-0.44291630387306213,
0.18618416786193848,
0.39903879165649414,
-0.08588499575853348,
-0.0018245000392198563,
0.021382857114076614,
0.2596297860145569,
-0.017221741378307343,
-0.18457192182540894,
0.2776520252227783,
0.14385545253753662,
-0.2660193145275116,
-0.22387564182281494,
-0.20915047824382782
] |
https://github.com/huggingface/datasets/issues/4977 | Providing dataset size | Additionally, the download size can be inferred by doing HEAD requests to the files to be downloaded. And for files hosted on the hub you can even get the file sizes using the Hub API | **Is your feature request related to a problem? Please describe.**
Especially for big datasets like [LAION](https://huggingface.co/datasets/laion/laion2B-en/), it's hard to know exactly the downloaded size (because there are many files and you don't have their exact size when downloaded).
**Describe the solution you'd like**
Auto-populating the downloaded dataset size on the dataset page would be really useful, including that of each split (when there are some).
**Describe alternatives you've considered**
People should be adding this to dataset cards, but I don't think that is systematically the case :slightly_smiling_face:
**Additional context**
Mentioned to @lhoestq
| 35 | Providing dataset size
**Is your feature request related to a problem? Please describe.**
Especially for big datasets like [LAION](https://huggingface.co/datasets/laion/laion2B-en/), it's hard to know exactly the downloaded size (because there are many files and you don't have their exact size when downloaded).
**Describe the solution you'd like**
Auto-populating the downloaded dataset size on the dataset page would be really useful, including that of each split (when there are some).
**Describe alternatives you've considered**
People should be adding this to dataset cards, but I don't think that is systematically the case :slightly_smiling_face:
**Additional context**
Mentioned to @lhoestq
Additionally, the download size can be inferred by doing HEAD requests to the files to be downloaded. And for files hosted on the hub you can even get the file sizes using the Hub API | [
-0.6667077541351318,
-0.4214353859424591,
-0.16970433294773102,
0.18404635787010193,
-0.12761026620864868,
0.03915034979581833,
0.07760560512542725,
0.20611728727817535,
0.1928451657295227,
0.4761049747467041,
-0.14310626685619354,
0.030921783298254013,
0.1071857437491417,
0.5899710059165955,
-0.07314696907997131,
-0.19674988090991974,
-0.2761744260787964,
0.309065580368042,
-0.010961957275867462,
0.07456006109714508,
-0.134500190615654,
0.01824631169438362,
0.24927224218845367,
-0.2635413408279419,
-0.23776768147945404,
0.02814982272684574,
-0.399711012840271,
0.020032908767461777,
-0.42751672863960266,
-0.3845656216144562,
0.1724373996257782,
0.29862523078918457,
0.42918720841407776,
-0.36450204253196716,
-0.00011004129919456318,
-0.2402837723493576,
0.33346623182296753,
-0.22085997462272644,
-0.3396822512149811,
0.00828656554222107,
-0.4229561984539032,
-0.42351558804512024,
0.12695960700511932,
-0.19711518287658691,
0.11955326050519943,
0.006030192598700523,
0.0021993238478899,
0.16111458837985992,
0.0310521200299263,
-0.050629593431949615,
0.20958440005779266,
0.10301308333873749,
0.13401582837104797,
-0.28057095408439636,
0.32678329944610596,
0.5479965209960938,
-0.17075905203819275,
0.04301496595144272,
0.28874582052230835,
0.2683221399784088,
-0.1902446150779724,
0.3171232342720032,
0.4605957865715027,
-0.014064010232686996,
0.25820720195770264,
0.04683760926127434,
-0.09008077532052994,
-0.22313153743743896,
0.09835059940814972,
0.3695739507675171,
0.7135280966758728,
-0.25378674268722534,
-0.3432152271270752,
-0.7756764888763428,
0.1537260115146637,
-0.08445869386196136,
-0.084891177713871,
0.26266515254974365,
0.056949716061353683,
0.1742319017648697,
-0.2346920520067215,
-0.18653948605060577,
-0.01411951333284378,
-0.0007940232753753662,
-0.09185833483934402,
0.12680324912071228,
-0.09626630693674088,
-0.02595788985490799,
0.030648725107312202,
-0.003537394106388092,
0.07361718267202377,
-0.11634190380573273,
-0.17609789967536926,
-0.0018552038818597794,
-0.07660365104675293,
-0.3946433961391449,
0.11979930102825165,
0.19908800721168518,
0.39939773082733154,
0.2950044870376587,
0.13037844002246857,
-0.16773062944412231,
-0.23730923235416412,
-0.013691805303096771,
0.5976245999336243,
0.2134154587984085,
0.13718771934509277,
0.034009870141744614,
0.1136380136013031,
0.19043684005737305,
0.4758511781692505,
-0.18555566668510437,
-0.11411937326192856,
0.3386366367340088,
-0.10805459320545197,
-0.047224149107933044,
0.03025878593325615,
0.04149192199110985,
-0.14077752828598022,
-0.19985643029212952,
0.3549559712409973,
-0.010837138630449772,
-0.13271890580654144,
0.3072201907634735,
-0.180660218000412,
0.2962130308151245,
-0.40139997005462646,
-0.12813343107700348,
0.023193469271063805,
-0.4176907539367676,
-0.05315190181136131,
-0.15098106861114502,
-0.13763786852359772,
-0.0151669941842556,
0.2048315852880478,
-0.032830771058797836,
0.26819437742233276,
-0.3679826259613037,
0.14795055985450745,
0.056592799723148346,
-0.026511136442422867,
-0.2826167643070221,
0.03270599618554115,
0.1176179051399231,
0.21272119879722595,
-0.05563605576753616,
-0.3123113512992859,
0.21043865382671356,
-0.29790255427360535,
0.33815786242485046,
-0.4319390654563904,
-0.09511485695838928,
-0.28616392612457275,
0.20850931107997894,
-0.10812035202980042,
-0.0824231281876564,
-0.2438991367816925,
0.33844494819641113,
-0.07729040831327438,
-0.08798180520534515,
-0.09661027044057846,
-0.06795548647642136,
-0.18980072438716888,
-0.3158590495586395,
0.07130096852779388,
0.5024399161338806,
-0.2093653380870819,
-0.33967310190200806,
-0.29801586270332336,
-0.3690904378890991,
-0.030342094600200653,
0.022182302549481392,
-0.10706434398889542,
0.2354050576686859,
-0.17332589626312256,
0.4815492630004883,
0.44888392090797424,
-0.17519108951091766,
-0.5241066217422485,
0.19379787147045135,
0.024607062339782715,
0.021852785721421242,
0.06526288390159607,
0.25259312987327576,
0.5576223134994507,
0.046925757080316544,
0.019237644970417023,
0.45828986167907715,
-0.22753533720970154,
0.21748390793800354,
-0.049959104508161545,
-0.6154555678367615,
-0.36623162031173706,
0.2763865292072296,
0.30711865425109863,
-0.009966924786567688,
0.44183674454689026,
0.31522849202156067,
0.5402700901031494,
0.04120858758687973,
0.21017098426818848,
0.16420207917690277,
0.3074827492237091,
-0.13289900124073029,
0.011799909174442291,
-0.19227802753448486,
-0.3096427917480469,
0.16900715231895447,
-0.29934871196746826,
-0.19418226182460785,
0.060649573802948,
-0.5567275881767273,
-0.3490377962589264,
0.0040714554488658905,
0.007843129336833954,
-0.05870885029435158,
0.13811691105365753,
0.09400025755167007,
0.2151363044977188,
-0.16341985762119293,
0.04061388596892357,
0.14311622083187103,
-0.17074662446975708,
0.14220640063285828,
-0.10407558083534241,
0.11813764274120331,
0.3158334493637085,
0.07825487107038498,
0.2167433500289917,
0.03613875061273575,
0.022407662123441696,
0.06283268332481384,
-0.05249788239598274,
0.3566531836986542,
0.31161612272262573,
0.1813153624534607,
0.2739429175853729,
0.004523128271102905,
0.3833600878715515,
0.3333452343940735,
0.25890594720840454,
-0.32851797342300415,
-0.16528372466564178,
0.1393558382987976,
-0.411189466714859,
0.13682128489017487,
-0.13150013983249664,
0.021459750831127167,
-0.10281598567962646,
-0.11571335047483444,
0.16108284890651703,
-0.0459815114736557,
0.09644011408090591,
-0.26991474628448486,
-0.25250425934791565,
0.13458400964736938,
-0.041694194078445435,
-0.045715101063251495,
-0.07014314830303192,
0.12428174167871475,
0.44009658694267273,
0.03396725282073021,
-0.09466703981161118,
0.3070504367351532,
-0.2437199056148529,
-0.05832582712173462,
0.31044310331344604,
0.40869536995887756,
0.47065865993499756,
0.44567441940307617,
0.3878825604915619,
-0.13421526551246643,
0.2415161281824112,
-0.02847316861152649,
0.03455493599176407,
-0.010010801255702972,
-0.21040008962154388,
0.0374944694340229,
0.023373601958155632,
-0.32566332817077637,
-0.25078335404396057,
-0.03959127143025398,
0.0225790124386549,
-0.08970225602388382,
-0.09517954289913177,
-0.46990954875946045,
0.12704481184482574,
-0.34443479776382446,
-0.019793972373008728,
-0.19763125479221344,
-0.0418875552713871,
-0.2615020275115967,
0.2609817385673523,
0.09710220992565155,
-0.016351692378520966,
-0.20723430812358856,
-0.2878328263759613,
0.4995991587638855,
-0.005826616659760475,
-0.00645485520362854,
0.2870529294013977,
0.2906756103038788,
-0.013416197150945663,
0.22016757726669312,
-0.10316220670938492,
-0.06193834915757179,
0.5721621513366699,
-0.3881462812423706,
0.46475493907928467,
-0.16572043299674988,
-0.0550822988152504,
0.32140931487083435,
0.2103528380393982,
-0.07575227320194244,
0.028800033032894135,
0.28945183753967285,
0.23332946002483368,
0.062421634793281555,
-0.14773380756378174,
0.19415061175823212,
-0.08283950388431549,
-0.3247339427471161,
0.11442334204912186,
0.16061042249202728,
-0.24677780270576477,
-0.1455884873867035,
-0.38211479783058167,
-0.25753429532051086,
0.40637731552124023,
0.17850293219089508,
0.1513761281967163,
-0.15826496481895447,
0.01827426254749298,
-0.15578433871269226,
-0.2340729683637619,
-0.3018050193786621,
-0.13174496591091156,
-0.27862778306007385,
0.1670219600200653,
-0.3648729622364044,
-0.14888645708560944,
0.052906136959791183,
0.05302061140537262,
0.061401668936014175,
0.29165542125701904,
-0.2976171374320984,
-0.020194463431835175,
-0.27393215894699097,
0.12049993872642517,
-0.23963144421577454,
0.1608247458934784,
0.26986104249954224,
-0.05143808200955391,
-0.03370721638202667,
0.096320740878582,
0.05390976741909981,
-0.06854831427335739,
0.30449479818344116,
0.497314989566803,
-0.1224198266863823,
-0.12926828861236572,
0.1282442957162857,
0.4165574312210083,
0.2221948802471161,
0.00040774792432785034,
0.22220481932163239,
0.004034468904137611,
0.13664880394935608,
-0.1176849827170372,
0.34920552372932434,
0.22219324111938477,
-0.1532205045223236,
-0.01900387555360794,
0.4690535068511963,
0.3169648051261902,
-0.16450773179531097,
-0.12087301909923553,
-0.3474339544773102,
-0.2633243203163147,
-0.2096833884716034,
0.26363059878349304,
0.005368925631046295,
0.16976697742938995,
-0.15235668420791626,
0.12513002753257751,
-0.13567101955413818,
-0.1652757227420807,
-0.16699925065040588,
0.04736660048365593,
0.2608914077281952,
0.15907040238380432,
-0.05601509287953377,
0.0780150517821312,
-0.34718573093414307,
0.11989692598581314,
0.18186020851135254,
-0.1560344099998474,
-0.0722515881061554,
-0.09992770850658417,
-0.09394505620002747,
0.1681605726480484,
0.19656608998775482,
-0.11495459824800491,
-0.33048075437545776,
-0.5467911958694458,
-0.1644097864627838,
0.04435829818248749,
-0.024706918746232986,
-0.04608133062720299,
-0.11030300706624985,
0.04822263866662979,
0.15722940862178802,
-0.4172365963459015,
-0.013798733241856098,
0.196491539478302,
0.11079339683055878,
-0.2940816879272461,
-0.05796310305595398,
0.036954473704099655,
0.16096091270446777,
-0.30161723494529724,
0.11208993196487427,
0.11683761328458786,
0.07096629589796066,
-0.19381007552146912,
-0.33285894989967346,
-0.060771048069000244,
-0.04864555597305298,
-0.023471295833587646,
0.22707201540470123,
0.3498021066188812,
0.25716233253479004,
-0.027147840708494186,
0.25817400217056274,
0.38920751214027405,
0.2542850077152252,
0.5100826025009155,
0.001050565391778946,
-0.10484908521175385,
0.23403334617614746,
-0.23255768418312073,
0.10553526878356934,
0.38654887676239014,
0.07271110266447067,
-0.10062136501073837,
-0.1434415578842163,
0.3407623767852783,
-0.4533246159553528,
0.24304814636707306,
0.0732051283121109,
-0.29823818802833557,
-0.3937920928001404,
-0.5068974494934082,
0.27040600776672363,
-0.17310549318790436,
0.11779460310935974,
0.3791896104812622,
0.13475675880908966,
-0.30361807346343994,
0.034302130341529846,
0.04481739178299904,
0.8210147619247437,
0.10527917742729187,
-0.020427215844392776,
-0.2983601689338684,
-0.22141066193580627,
0.31493905186653137,
-0.39879995584487915,
0.06654606759548187,
-0.24228617548942566,
-0.034506458789110184,
-0.19153478741645813,
0.1793832629919052,
-0.006878279149532318,
0.1637071669101715,
-0.2987169623374939,
0.062336649745702744,
0.23381642997264862,
0.14953945577144623,
-0.2385367900133133,
0.6474950313568115,
-0.6329575777053833,
-0.28298166394233704,
0.21251705288887024,
0.14695991575717926,
-0.20151199400424957,
0.2326398640871048,
-0.2402251958847046,
-0.1488255113363266,
-0.030224040150642395,
-0.14213556051254272,
-0.29032963514328003,
-0.1918913722038269,
-0.26189160346984863,
-0.12770390510559082,
-0.37479230761528015,
0.12354479730129242,
-0.12270981073379517,
0.16027282178401947,
-0.1616976261138916,
0.22956536710262299,
-0.486483633518219,
0.3884166181087494,
-0.42135247588157654,
0.2143384963274002,
-0.012658658437430859,
0.0507165901362896,
0.04470624402165413,
0.00719127431511879,
-0.23332443833351135,
-0.04457104206085205,
0.00125145073980093,
-0.066346675157547,
-0.18266333639621735,
-0.11661241948604584,
-0.05672714114189148,
-0.4467194080352783,
-0.15475955605506897,
-0.22383230924606323,
-0.020158356055617332,
-0.0030083544552326202,
0.1369429975748062,
0.17862382531166077,
0.20821522176265717,
0.1269044727087021,
0.3281767666339874,
-0.14269602298736572,
-0.4170932173728943,
0.2778407633304596,
-0.030145280063152313,
-0.1677224040031433,
-0.0896071344614029,
-0.30159786343574524,
-0.1506376713514328,
0.037938572466373444,
0.3477187752723694,
-0.1026083454489708,
-0.2009335160255432,
-0.31297779083251953,
-0.17345057427883148,
0.03342698514461517,
-0.1696707010269165,
0.04432855546474457,
0.15725573897361755,
0.2079988420009613,
-0.06389879435300827,
-0.1900898814201355,
-0.16218580305576324,
0.29305416345596313,
-0.22790034115314484,
0.5118396282196045,
0.1509891152381897,
-0.1370546817779541,
0.24850526452064514,
0.18882440030574799,
-0.32019951939582825,
-0.1320991814136505,
0.02140468917787075,
-0.05101694166660309,
-0.16697223484516144,
0.3604361414909363,
0.13627766072750092,
-0.08122819662094116,
-0.02069726213812828,
0.11417604237794876,
-0.17400145530700684,
-0.15218758583068848,
-0.13798080384731293,
0.07918793708086014,
-0.03825929015874863,
0.4506249725818634,
-0.22232772409915924,
-0.29713010787963867,
-0.00409754179418087,
-0.3742096424102783,
0.3075685501098633,
-0.16862279176712036,
-0.04370097070932388,
-0.12337087094783783,
0.4022795855998993,
-0.09975563734769821,
-0.2087870091199875,
0.4373280704021454,
0.2634047865867615,
0.25710946321487427,
-0.07508039474487305,
0.3478805124759674,
-0.3129555583000183,
0.10772649943828583,
0.07757807523012161,
0.24841701984405518,
0.47288256883621216,
-0.11770681291818619,
-0.07313884049654007,
0.22834452986717224,
0.19008700549602509,
-0.060502804815769196,
0.3760114312171936,
0.11504887044429779,
0.09720470756292343,
0.07128474116325378,
-0.04929294437170029,
0.2540532648563385,
0.017613444477319717,
0.05183417722582817,
0.10901176929473877,
0.1171751320362091,
0.020748209208250046,
0.32234132289886475,
0.34973448514938354,
0.30126792192459106,
-0.047338902950286865,
-0.08791998773813248,
0.3455764055252075,
0.1762712001800537,
0.06767860054969788,
0.7057863473892212,
0.1121092289686203,
0.3152691125869751,
0.20041236281394958,
-0.15982860326766968,
0.27833810448646545,
0.48350876569747925,
-0.10219050198793411,
0.5561985969543457,
0.09636567533016205,
-0.005667988210916519,
0.14601591229438782,
-0.3460581302642822,
-0.16537363827228546,
-0.09435063600540161,
0.1751769781112671,
0.15009090304374695,
0.2540286183357239,
0.2117999792098999,
-0.005182499997317791,
0.06386107951402664,
-0.38562703132629395,
-0.06730574369430542,
-0.12897732853889465,
0.03620245307683945,
-0.18693557381629944,
-0.3380443751811981,
-0.36762529611587524,
0.17144297063350677,
0.00315973162651062,
-0.2251737266778946,
0.02672184258699417,
-0.0959242582321167,
0.09243285655975342,
-0.042189836502075195,
-0.08145251125097275,
0.11320952326059341,
0.16216839849948883,
-0.5041803121566772,
-0.24996797740459442,
0.006407886743545532,
0.05356859788298607,
0.11913226544857025,
0.07164302468299866,
0.044706542044878006,
0.09479416906833649,
0.2157660275697708,
-0.0775272399187088,
0.24092593789100647,
0.059784241020679474,
-0.36644113063812256,
-0.2375185191631317,
0.19895972311496735,
0.1860785186290741,
0.3946984112262726,
0.26589345932006836,
-0.2056085765361786,
-0.11631050705909729,
-0.027681943029165268,
-0.15771152079105377,
-0.34709373116493225,
0.20991899073123932,
-0.06416553258895874,
-0.13023217022418976,
0.023045692592859268,
-0.19047555327415466,
-0.3558315932750702,
0.12880495190620422,
0.2828443944454193,
-0.1713913530111313,
0.05473773181438446,
-0.07439782470464706,
0.06623866409063339,
-0.05807051435112953,
0.12158690392971039,
0.26689499616622925,
-0.20170876383781433,
-0.11513038724660873,
-0.2325742095708847,
-0.3520640730857849,
0.03508410602807999,
-0.13937003910541534,
-0.12702544033527374,
0.245997354388237,
0.13272421061992645,
-0.00016207993030548096,
0.25673383474349976,
-0.028528034687042236,
-0.04057137295603752,
0.3191039264202118,
0.331617146730423,
-0.18498171865940094,
-0.411918967962265,
-0.18269743025302887,
0.1660536825656891,
0.05473151057958603,
-0.2593725323677063,
0.17430107295513153,
0.012577827088534832,
-0.0687403678894043,
-0.10765810310840607,
0.023565351963043213,
0.14076873660087585,
-0.2638143301010132,
0.398773729801178,
-0.2253723442554474,
0.4131539463996887,
-0.21164622902870178,
0.12039113789796829,
-0.19890910387039185,
-0.03409018740057945,
0.048102010041475296,
0.026146013289690018,
0.016176536679267883,
0.39407670497894287,
0.050347864627838135,
0.058167457580566406,
-0.16729846596717834,
0.165504589676857,
0.20537282526493073,
0.12370841950178146,
-0.007452483754605055,
-0.17000553011894226,
-0.04327057674527168,
-0.09207430481910706,
0.3745267689228058,
0.3023794889450073,
-0.058525629341602325,
-0.1908179074525833,
0.17870132625102997,
-0.2338372766971588,
0.06105726957321167,
0.10863190144300461,
0.0464838482439518,
-0.020612683147192,
0.1380181908607483,
0.16738757491111755,
-0.07582435011863708,
-0.420761376619339,
0.20235127210617065,
0.31090429425239563,
-0.08291450142860413,
0.138258159160614,
0.12786148488521576,
0.2810538113117218,
-0.005142733454704285,
-0.14684651792049408,
0.34205612540245056,
0.12637931108474731,
-0.23895978927612305,
-0.19011670351028442,
-0.22491370141506195
] |
https://github.com/huggingface/datasets/issues/4977 | Providing dataset size | Amazing @albertvillanova ! I think just having that information visible in the dataset info (without having to do any requests/additional coding) would be really useful :hugs: | **Is your feature request related to a problem? Please describe.**
Especially for big datasets like [LAION](https://huggingface.co/datasets/laion/laion2B-en/), it's hard to know exactly the downloaded size (because there are many files and you don't have their exact size when downloaded).
**Describe the solution you'd like**
Auto-populating the downloaded dataset size on the dataset page would be really useful, including that of each split (when there are some).
**Describe alternatives you've considered**
People should be adding this to dataset cards, but I don't think that is systematically the case :slightly_smiling_face:
**Additional context**
Mentioned to @lhoestq
| 26 | Providing dataset size
**Is your feature request related to a problem? Please describe.**
Especially for big datasets like [LAION](https://huggingface.co/datasets/laion/laion2B-en/), it's hard to know exactly the downloaded size (because there are many files and you don't have their exact size when downloaded).
**Describe the solution you'd like**
Auto-populating the downloaded dataset size on the dataset page would be really useful, including that of each split (when there are some).
**Describe alternatives you've considered**
People should be adding this to dataset cards, but I don't think that is systematically the case :slightly_smiling_face:
**Additional context**
Mentioned to @lhoestq
Amazing @albertvillanova ! I think just having that information visible in the dataset info (without having to do any requests/additional coding) would be really useful :hugs: | [
-0.5743656754493713,
-0.3249141573905945,
-0.18929700553417206,
0.19186553359031677,
-0.06566028296947479,
0.06097155064344406,
0.09056255966424942,
0.19731135666370392,
0.10598073899745941,
0.45677095651626587,
-0.0811370387673378,
0.0730317085981369,
0.06301722675561905,
0.6416533589363098,
-0.03395138308405876,
-0.2665846347808838,
-0.267294704914093,
0.32219064235687256,
-0.019690312445163727,
0.09282925724983215,
-0.2197674810886383,
0.033808231353759766,
0.21681298315525055,
-0.28433239459991455,
-0.1670161783695221,
-0.01849980838596821,
-0.3865778148174286,
-0.03613411635160446,
-0.33371496200561523,
-0.45428967475891113,
0.10742734372615814,
0.2033422738313675,
0.4170709550380707,
-0.3825424909591675,
-0.00010726660548243672,
-0.21518288552761078,
0.21834804117679596,
-0.13767923414707184,
-0.380699098110199,
0.07271575927734375,
-0.47641071677207947,
-0.5181007981300354,
0.12320446968078613,
-0.2099139243364334,
0.114202581346035,
-0.05122905224561691,
-0.01930307410657406,
-0.03050815314054489,
0.060115255415439606,
-0.06991149485111237,
0.23320269584655762,
0.06520648300647736,
0.10794176161289215,
-0.2754494547843933,
0.3454887270927429,
0.4942920207977295,
-0.2014937698841095,
-0.06555262207984924,
0.2314605861902237,
0.2115844488143921,
-0.07313070446252823,
0.441057950258255,
0.4910721182823181,
-0.020123321563005447,
0.1757936030626297,
0.08502818644046783,
-0.04635084420442581,
-0.2543235421180725,
0.10897168517112732,
0.39892131090164185,
0.6906548738479614,
-0.24959078431129456,
-0.4265669882297516,
-0.7569478750228882,
0.16953665018081665,
-0.17708535492420197,
-0.11853528767824173,
0.32837337255477905,
0.06376659870147705,
0.1872442066669464,
-0.2186303734779358,
-0.07511451095342636,
-0.04772289842367172,
-0.034125521779060364,
-0.11095340549945831,
0.11241810768842697,
-0.12950579822063446,
-0.04537517577409744,
0.16139234602451324,
-0.061658017337322235,
-0.062084075063467026,
-0.02941347286105156,
-0.15879841148853302,
0.030148547142744064,
-0.07959932088851929,
-0.4275243878364563,
0.07600957155227661,
0.02658897265791893,
0.41878366470336914,
0.23934786021709442,
0.06982551515102386,
-0.22579896450042725,
-0.15557333827018738,
0.03678653761744499,
0.5865686535835266,
0.10517564415931702,
0.12802278995513916,
0.09045732021331787,
0.07690856605768204,
0.09212276339530945,
0.4742838144302368,
-0.19944122433662415,
-0.17694982886314392,
0.2758232355117798,
-0.0001536235213279724,
-0.027790479362010956,
0.018560979515314102,
-0.008724402636289597,
-0.2242206484079361,
-0.07618792355060577,
0.2638589143753052,
-0.07924611866474152,
-0.22241611778736115,
0.3059461712837219,
-0.19806687533855438,
0.2375504970550537,
-0.3607102632522583,
-0.11190041899681091,
0.06502819061279297,
-0.5110538601875305,
-0.02402183972299099,
-0.13964791595935822,
-0.22367066144943237,
0.005660464987158775,
0.16756072640419006,
-0.01317647099494934,
0.26342689990997314,
-0.29654327034950256,
0.12699013948440552,
0.0684221014380455,
0.042688608169555664,
-0.2104344218969345,
0.0666893944144249,
0.13423024117946625,
0.18492244184017181,
-0.033129606395959854,
-0.21227143704891205,
0.2542880177497864,
-0.31307387351989746,
0.37085720896720886,
-0.2715093493461609,
-0.028993261978030205,
-0.3598722219467163,
0.2295977771282196,
-0.05693495273590088,
-0.10026408731937408,
-0.10712838917970657,
0.3886251449584961,
-0.0443885400891304,
-0.09148983657360077,
-0.0933554545044899,
-0.0828261524438858,
-0.1889296919107437,
-0.32451027631759644,
0.13244366645812988,
0.5082219243049622,
-0.3733050525188446,
-0.3336094915866852,
-0.37992122769355774,
-0.37213975191116333,
0.04081302881240845,
0.06326775252819061,
-0.1239176020026207,
0.09456157684326172,
-0.14376792311668396,
0.3784831762313843,
0.5571249127388,
0.06832017004489899,
-0.4532773196697235,
0.29072052240371704,
0.013720393180847168,
-0.005691489204764366,
0.15984369814395905,
0.18881110846996307,
0.5144660472869873,
0.14667391777038574,
-0.002561144530773163,
0.46190929412841797,
-0.27776598930358887,
0.2022094875574112,
-0.06269506365060806,
-0.6116664409637451,
-0.17319399118423462,
0.3006165325641632,
0.27654829621315,
-0.024247154593467712,
0.4926728904247284,
0.18238139152526855,
0.5524920225143433,
-0.013593081384897232,
0.1380062848329544,
0.15208089351654053,
0.34753838181495667,
-0.02979971468448639,
-0.008778084069490433,
-0.22365209460258484,
-0.32707127928733826,
0.0944446548819542,
-0.2859194278717041,
-0.17319218814373016,
0.029303930699825287,
-0.5804868340492249,
-0.36049768328666687,
0.048793353140354156,
0.03500242158770561,
-0.14829762279987335,
0.13500972092151642,
0.19759593904018402,
0.17317794263362885,
-0.13503775000572205,
0.025032389909029007,
0.01410429086536169,
-0.14228254556655884,
0.09639481455087662,
-0.0386754646897316,
0.008888335898518562,
0.2531202435493469,
0.10675904154777527,
0.1877935230731964,
0.18228676915168762,
-0.02345031499862671,
0.09869597852230072,
-0.014976458624005318,
0.3317631781101227,
0.3040158450603485,
-0.0057906657457351685,
0.19546934962272644,
-0.019339248538017273,
0.363630086183548,
0.20561307668685913,
0.23289771378040314,
-0.3135695159435272,
-0.21643184125423431,
0.18720775842666626,
-0.4056430160999298,
0.22364801168441772,
-0.120510995388031,
0.09379048645496368,
-0.04239201918244362,
-0.10899581015110016,
0.15325050055980682,
-0.013699453324079514,
0.15110817551612854,
-0.39815202355384827,
-0.2722744941711426,
0.11321519315242767,
0.0013260319828987122,
-0.022750942036509514,
-0.22605696320533752,
0.19116023182868958,
0.4446031153202057,
0.11115208268165588,
-0.15812280774116516,
0.24946343898773193,
-0.2581292688846588,
-0.026552610099315643,
0.3026563227176666,
0.5008817911148071,
0.42500340938568115,
0.501408040523529,
0.2799832820892334,
-0.13738517463207245,
0.17072977125644684,
-0.007241387851536274,
0.06318339705467224,
-0.024326562881469727,
-0.163429856300354,
-0.006180614233016968,
0.020006736740469933,
-0.23647211492061615,
-0.14709120988845825,
-0.018810750916600227,
0.012212386354804039,
-0.05822228640317917,
-0.0707339346408844,
-0.4223893880844116,
0.0942922979593277,
-0.5272331237792969,
-0.17484168708324432,
-0.07623378187417984,
-0.0450599379837513,
-0.29491832852363586,
0.2475229799747467,
-0.023348014801740646,
-0.030365368351340294,
-0.0581696480512619,
-0.34878599643707275,
0.4500632584095001,
-0.06527441740036011,
-0.0004116427153348923,
0.4165670573711395,
0.2807491719722748,
-0.05871070176362991,
0.26087939739227295,
-0.10421361774206161,
-0.082475945353508,
0.702416718006134,
-0.32653185725212097,
0.37976938486099243,
-0.22257792949676514,
-0.1573488563299179,
0.3022462725639343,
0.18684054911136627,
-0.06588264554738998,
0.05726953595876694,
0.2818790376186371,
0.2849298119544983,
-0.0655457153916359,
-0.07201547175645828,
0.19632026553153992,
-0.06942768394947052,
-0.3149070143699646,
0.13401585817337036,
0.17172767221927643,
-0.28023436665534973,
-0.22309789061546326,
-0.42756977677345276,
-0.2407987117767334,
0.41439104080200195,
0.06540921330451965,
0.17125104367733002,
-0.09796705842018127,
0.04856569319963455,
-0.1763877272605896,
-0.2623272240161896,
-0.20691369473934174,
-0.1563064455986023,
-0.207207590341568,
0.15544310212135315,
-0.40039950609207153,
-0.11064618825912476,
0.017839480191469193,
0.00539354607462883,
0.011498142033815384,
0.33664804697036743,
-0.2657071352005005,
0.1547815352678299,
-0.3808424770832062,
0.10670782625675201,
-0.218624085187912,
0.19999732077121735,
0.2644008696079254,
0.017526740208268166,
-0.07757776230573654,
0.09697239845991135,
-0.007884444668889046,
-0.10692847520112991,
0.157894566655159,
0.4958059787750244,
-0.12835907936096191,
0.010463377460837364,
0.08915182948112488,
0.4997723698616028,
0.20253261923789978,
-0.08554220199584961,
0.10995317995548248,
-0.09702284634113312,
0.1755482405424118,
-0.040649645030498505,
0.18125350773334503,
0.1915961056947708,
-0.0983048677444458,
0.0037368927150964737,
0.4342179298400879,
0.24889788031578064,
-0.19562162458896637,
-0.05321980640292168,
-0.16805113852024078,
-0.241438090801239,
-0.1336740404367447,
0.3370761275291443,
0.013373076915740967,
0.29208484292030334,
-0.21088314056396484,
0.09438958019018173,
-0.132027730345726,
-0.030838675796985626,
-0.29696953296661377,
0.051765114068984985,
0.2879030108451843,
0.1490960419178009,
-0.06809177249670029,
0.06079290434718132,
-0.24787098169326782,
0.03926607221364975,
0.19406293332576752,
-0.15484671294689178,
-0.18646441400051117,
-0.21637576818466187,
-0.11066779494285583,
0.26284539699554443,
0.14731699228286743,
-0.14271272718906403,
-0.36832547187805176,
-0.47580018639564514,
-0.2517452836036682,
0.09809397906064987,
0.009021744132041931,
-0.0479174442589283,
-0.19244442880153656,
0.16081884503364563,
0.1147894412279129,
-0.3840833902359009,
0.016864482313394547,
0.41592326760292053,
0.20458060503005981,
-0.29459425806999207,
-0.12299990653991699,
0.03472626581788063,
0.29118236899375916,
-0.2600565552711487,
0.12840498983860016,
0.1399681121110916,
0.10953954607248306,
-0.1330196112394333,
-0.2611832618713379,
-0.07653886824846268,
-0.08074747025966644,
0.010761626064777374,
0.2863812744617462,
0.3362523019313812,
0.29740840196609497,
0.033237431198358536,
0.2817205786705017,
0.4252229928970337,
0.3338569402694702,
0.5004880428314209,
-0.14570975303649902,
-0.1668054461479187,
0.2537621259689331,
-0.24263933300971985,
0.3147384822368622,
0.3369278907775879,
0.06639454513788223,
-0.11171724647283554,
-0.14099761843681335,
0.3253133296966553,
-0.3870847821235657,
0.24345055222511292,
0.05868414044380188,
-0.3306312561035156,
-0.38380420207977295,
-0.6803562641143799,
0.17795801162719727,
-0.1415499597787857,
0.12069198489189148,
0.3236291706562042,
0.12992657721042633,
-0.27876725792884827,
-0.00993405282497406,
0.03361111134290695,
0.8121975660324097,
0.05160265415906906,
0.018637925386428833,
-0.3105384409427643,
-0.15598246455192566,
0.4001242220401764,
-0.26357704401016235,
0.047049909830093384,
-0.28268754482269287,
-0.044405508786439896,
-0.1232345700263977,
0.14691755175590515,
0.015719987452030182,
0.0658363625407219,
-0.338191419839859,
0.08834078907966614,
0.22277437150478363,
-0.010474931448698044,
-0.183466836810112,
0.6366422772407532,
-0.4682343602180481,
-0.3029758036136627,
0.17531834542751312,
0.14250874519348145,
-0.15558244287967682,
0.10634148120880127,
-0.2045268714427948,
-0.1839732527732849,
0.051827121526002884,
-0.08211345970630646,
-0.3491278886795044,
-0.17642688751220703,
-0.4156797230243683,
-0.11690686643123627,
-0.34515824913978577,
0.024235591292381287,
0.022440463304519653,
0.18758602440357208,
-0.13741421699523926,
0.21800413727760315,
-0.35306698083877563,
0.27631887793540955,
-0.34779250621795654,
0.21638628840446472,
-0.025567296892404556,
0.08241645991802216,
0.093169666826725,
0.03479330241680145,
-0.15432831645011902,
-0.047880806028842926,
-0.0063018519431352615,
-0.058006152510643005,
-0.27961117029190063,
-0.10233375430107117,
-0.08201652765274048,
-0.5148199200630188,
-0.06517696380615234,
-0.22294831275939941,
0.05757296457886696,
-0.045487549155950546,
0.15983854234218597,
0.19917047023773193,
0.18905705213546753,
0.042036090046167374,
0.32448700070381165,
-0.15759888291358948,
-0.43984079360961914,
0.18104082345962524,
-0.0652531161904335,
-0.0533708818256855,
-0.049524612724781036,
-0.26942071318626404,
-0.1343529224395752,
-0.048676423728466034,
0.3954877555370331,
-0.04658554494380951,
-0.18054941296577454,
-0.3367009460926056,
-0.1850154995918274,
0.009123668074607849,
-0.1260494589805603,
0.06975576281547546,
0.1873718649148941,
0.20940828323364258,
-0.024259570986032486,
-0.2046804130077362,
-0.175400048494339,
0.2922828197479248,
-0.31643736362457275,
0.5340735912322998,
0.08251962065696716,
-0.009119972586631775,
0.13863566517829895,
0.2046716958284378,
-0.3470427393913269,
-0.18976952135562897,
0.10709764808416367,
-0.038335107266902924,
-0.0032564084976911545,
0.36267969012260437,
0.13448289036750793,
-0.0195779986679554,
0.0037053488194942474,
0.10202550143003464,
-0.11894245445728302,
-0.1707017719745636,
-0.19579927623271942,
0.07504305988550186,
-0.13133645057678223,
0.3922746181488037,
-0.14210879802703857,
-0.2441943883895874,
0.025596577674150467,
-0.3341812491416931,
0.30624687671661377,
-0.22388723492622375,
-0.07439537346363068,
-0.02340725064277649,
0.24941469728946686,
-0.11907663196325302,
-0.222211092710495,
0.36557167768478394,
0.18915274739265442,
0.29822859168052673,
0.005798656959086657,
0.3329825699329376,
-0.3384685814380646,
0.09668965637683868,
0.06069076061248779,
0.17293338477611542,
0.37756502628326416,
-0.14353421330451965,
-0.12027520686388016,
0.16783982515335083,
0.11175699532032013,
0.008945384994149208,
0.40564197301864624,
0.10399795323610306,
0.07859867066144943,
0.15172699093818665,
0.02671336568892002,
0.27761751413345337,
-0.020846698433160782,
0.0793485939502716,
0.11512283980846405,
0.10075430572032928,
0.07101233303546906,
0.3469386696815491,
0.2904600501060486,
0.3205418586730957,
0.037908561527729034,
-0.09227389842271805,
0.2727854251861572,
0.1138441264629364,
0.182308629155159,
0.7830909490585327,
0.14481474459171295,
0.24007795751094818,
0.17955456674098969,
-0.05191659554839134,
0.3239299952983856,
0.3790356516838074,
-0.1582343876361847,
0.49151018261909485,
0.07298275828361511,
-0.11339406669139862,
0.09356649219989777,
-0.3181646466255188,
-0.06172705069184303,
0.023571327328681946,
0.1261318027973175,
0.11928373575210571,
0.2885879874229431,
0.3261634409427643,
-0.003239552490413189,
0.01770787313580513,
-0.3322073221206665,
-0.047716815024614334,
-0.11979817599058151,
0.057558413594961166,
-0.14103317260742188,
-0.3100246489048004,
-0.38863176107406616,
0.1631823480129242,
-0.0007956437766551971,
-0.23861609399318695,
0.10715135931968689,
-0.19548188149929047,
0.08992084115743637,
-0.17204886674880981,
-0.05690542608499527,
0.17109760642051697,
0.1659129559993744,
-0.5371617674827576,
-0.2569512128829956,
-0.046305179595947266,
0.00940144807100296,
0.1434299498796463,
0.1287817507982254,
0.15376092493534088,
0.1303597390651703,
0.26697584986686707,
-0.15215899050235748,
0.1497713029384613,
0.03845769166946411,
-0.3415229320526123,
-0.31219547986984253,
0.15701141953468323,
0.16938334703445435,
0.3828497529029846,
0.24702191352844238,
-0.18972176313400269,
-0.08674971759319305,
0.05761158838868141,
-0.08686284720897675,
-0.4255515933036804,
0.10776077210903168,
-0.024842411279678345,
-0.18074119091033936,
0.09612369537353516,
-0.1473492681980133,
-0.3330555558204651,
0.11907071620225906,
0.32635003328323364,
-0.07715466618537903,
0.012899927794933319,
-0.04850330576300621,
0.07722089439630508,
0.018649520352482796,
0.10693701356649399,
0.2973180115222931,
-0.21229887008666992,
-0.14481858909130096,
-0.21824464201927185,
-0.42360562086105347,
-0.03504505008459091,
-0.18726134300231934,
-0.1536828875541687,
0.2942860722541809,
0.18603631854057312,
0.07121170312166214,
0.2662099301815033,
0.02081242948770523,
-0.03325643390417099,
0.304029643535614,
0.31053438782691956,
-0.24393656849861145,
-0.4757118225097656,
-0.1540488302707672,
0.1935378611087799,
0.07956447452306747,
-0.1846529245376587,
0.14481328427791595,
-0.023240089416503906,
-0.044595569372177124,
-0.16302557289600372,
0.03323251008987427,
0.09413734078407288,
-0.17268483340740204,
0.370364785194397,
-0.19034865498542786,
0.42189106345176697,
-0.21455171704292297,
0.04903373122215271,
-0.13480117917060852,
-0.07775620371103287,
0.02269413322210312,
0.178821861743927,
0.12706470489501953,
0.45563608407974243,
-0.0315103605389595,
-0.006039388477802277,
-0.25238165259361267,
0.19193536043167114,
0.22990094125270844,
0.031026775017380714,
0.03347194939851761,
-0.10867014527320862,
0.11518410593271255,
-0.14729806780815125,
0.3437809944152832,
0.3218652606010437,
-0.13225774466991425,
-0.17170469462871552,
0.1694527119398117,
-0.23501010239124298,
0.0243527889251709,
0.10107535123825073,
0.007037702947854996,
-0.025610648095607758,
0.12487833946943283,
0.2285553514957428,
-0.01967107690870762,
-0.46631377935409546,
0.20852982997894287,
0.3428938388824463,
-0.037889719009399414,
0.10983088612556458,
0.08925187587738037,
0.2458961457014084,
0.004938814789056778,
-0.13969694077968597,
0.3786109387874603,
0.08074524253606796,
-0.24627277255058289,
-0.13966430723667145,
-0.26040342450141907
] |
https://github.com/huggingface/datasets/issues/4976 | Hope to adapt Python3.9 as soon as possible | There is this related issue already: https://github.com/huggingface/datasets/issues/4113
And I guess we need a CI job for 3.9 ^^ | **Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context about the feature request here.
| 18 | Hope to adapt Python3.9 as soon as possible
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context about the feature request here.
There is this related issue already: https://github.com/huggingface/datasets/issues/4113
And I guess we need a CI job for 3.9 ^^ | [
-0.07192493975162506,
-0.4575248658657074,
-0.21028412878513336,
0.04659200459718704,
0.02843247726559639,
-0.16763651371002197,
0.09926828742027283,
0.011193299666047096,
-0.16036762297153473,
0.29400938749313354,
0.11267365515232086,
0.21916094422340393,
-0.1661699265241623,
0.7333263754844666,
-0.2792850732803345,
-0.14115092158317566,
0.046681713312864304,
0.27891579270362854,
0.13123568892478943,
0.07540018856525421,
-0.22891344130039215,
0.05057375133037567,
-0.04714321345090866,
-0.14915437996387482,
-0.14258135855197906,
-0.08843854814767838,
-0.32257381081581116,
0.00828234851360321,
-0.43583327531814575,
-0.2752995789051056,
0.2527281641960144,
0.31174033880233765,
-0.15241007506847382,
0.4493849575519562,
-0.00010605092393234372,
-0.18030838668346405,
0.10865452885627747,
0.021658943966031075,
-0.26432573795318604,
-0.08899171650409698,
-0.21309196949005127,
-0.5845854878425598,
0.36827272176742554,
-0.20338809490203857,
-0.311847448348999,
0.18948492407798767,
-0.21393316984176636,
0.08900657296180725,
0.6405707597732544,
0.11564406007528305,
0.27154839038848877,
0.6652207374572754,
-0.22064949572086334,
-0.07708001881837845,
0.08976811915636063,
0.5728872418403625,
-0.31076276302337646,
0.19527341425418854,
0.38104477524757385,
-0.0632392168045044,
0.28149667382240295,
0.2650943994522095,
-0.041696932166814804,
-0.15917646884918213,
0.3239551782608032,
-0.16948656737804413,
-0.32585516571998596,
-0.32868728041648865,
0.02083670347929001,
0.3460739254951477,
0.4051413834095001,
-0.1675952970981598,
-0.823576807975769,
-0.4105134606361389,
0.19058001041412354,
-0.4006967544555664,
-0.01103951781988144,
0.029274681583046913,
-0.286540687084198,
0.185653954744339,
-0.25457867980003357,
-0.23422028124332428,
-0.18569785356521606,
0.0021078065037727356,
-0.19267308712005615,
0.24958187341690063,
-0.26297131180763245,
-0.03467489778995514,
0.03074011206626892,
-0.18953432142734528,
-0.22727975249290466,
0.25235670804977417,
0.18731799721717834,
0.021409589797258377,
-0.1168207973241806,
-0.6152149438858032,
0.16340100765228271,
0.01347554475069046,
-0.06700430810451508,
0.04866257309913635,
0.1251809149980545,
0.08456823229789734,
-0.12196572870016098,
0.08031938970088959,
0.3323918581008911,
0.053192947059869766,
0.19024544954299927,
-0.19532708823680878,
0.4168155789375305,
0.16675543785095215,
0.14613619446754456,
-0.1309063732624054,
0.25662586092948914,
0.06670455634593964,
0.09988783299922943,
0.24051663279533386,
0.49188679456710815,
-0.08048487454652786,
-0.052176184952259064,
0.013572516851127148,
0.26175713539123535,
-0.0037649853620678186,
-0.07317015528678894,
0.22694608569145203,
-0.12200694531202316,
0.09586524218320847,
0.002417493611574173,
0.17707449197769165,
-0.012686273083090782,
0.15552246570587158,
-0.12464616447687149,
-0.10893437266349792,
-0.12946954369544983,
0.10295505821704865,
-0.027407418936491013,
-0.3374924957752228,
0.27327629923820496,
0.11585777252912521,
0.21675261855125427,
0.08934727311134338,
-0.09081015735864639,
0.1631733477115631,
0.12491953372955322,
0.24118533730506897,
-0.15094703435897827,
-0.08856149017810822,
0.15362678468227386,
0.08453455567359924,
-0.3424583673477173,
0.08326756954193115,
0.016886427998542786,
-0.23705537617206573,
-0.361389696598053,
0.21104411780834198,
-0.2561996579170227,
-0.020770061761140823,
-0.11488509923219681,
0.1957404762506485,
-0.3053566813468933,
0.02283596619963646,
0.08334388583898544,
-0.093268483877182,
-0.14679914712905884,
-0.3519147038459778,
0.029265420511364937,
0.17040765285491943,
-0.007628533989191055,
-0.014848209917545319,
-0.10312340408563614,
-0.09879250824451447,
-0.01277054101228714,
0.3405275046825409,
-0.12614135444164276,
-0.16816583275794983,
0.06088976562023163,
-0.014662355184555054,
0.28333961963653564,
-0.2885444462299347,
-0.13495761156082153,
0.15182380378246307,
-0.16207262873649597,
0.0041660163551568985,
0.19298720359802246,
0.1395227015018463,
0.17211134731769562,
0.008946284651756287,
-0.2571144998073578,
0.3807552456855774,
-0.07828095555305481,
0.13029398024082184,
-0.0038863979279994965,
-0.3570076525211334,
-0.23558400571346283,
-0.05105371028184891,
-0.2153698354959488,
-0.07197561115026474,
0.16360819339752197,
-0.33641040325164795,
0.22645974159240723,
-0.24012967944145203,
0.0007569389417767525,
0.1504470556974411,
0.6388561725616455,
0.2866246700286865,
-0.11457128077745438,
-0.14384335279464722,
-0.3027339577674866,
0.1036907210946083,
-0.006077529862523079,
0.12481347471475601,
-0.1903369277715683,
-0.531539797782898,
-0.3596855700016022,
0.2435801476240158,
0.02987891435623169,
-0.16620279848575592,
0.1408650279045105,
-0.018405072391033173,
0.00013990700244903564,
0.040535811334848404,
-0.39977067708969116,
-0.20251435041427612,
0.009366532787680626,
0.0974576473236084,
-0.09433375298976898,
0.14389613270759583,
0.07874360680580139,
-0.23654143512248993,
0.19210518896579742,
0.36403313279151917,
0.1242767795920372,
0.17762786149978638,
0.007456318475306034,
-0.14062923192977905,
-0.06668310612440109,
0.2397698014974594,
-0.08266659826040268,
0.2107311189174652,
0.31078389286994934,
0.06891289353370667,
0.13279715180397034,
0.23025016486644745,
0.09079435467720032,
0.1504434049129486,
-0.14350458979606628,
0.5789526700973511,
0.02475428581237793,
-0.11898873001337051,
0.26590216159820557,
-0.0385751947760582,
0.05781565606594086,
-0.14811870455741882,
-0.16783149540424347,
-0.41050422191619873,
-0.14527148008346558,
0.12871308624744415,
-0.16387371718883514,
0.035398200154304504,
-0.26624271273612976,
0.06415876746177673,
0.5383602380752563,
0.08343178033828735,
0.28282031416893005,
0.2102464735507965,
-0.10176367312669754,
-0.055492136627435684,
0.254010409116745,
-0.07610926777124405,
0.05282590538263321,
0.19193489849567413,
0.05959330126643181,
0.23758655786514282,
0.37994328141212463,
-0.051983073353767395,
0.12197992950677872,
0.2196979969739914,
0.07710471749305725,
0.038714297115802765,
-0.024381818249821663,
0.2766454219818115,
-0.12130860239267349,
-0.18724100291728973,
-0.26530638337135315,
0.05723264068365097,
-0.2520288825035095,
-0.18791282176971436,
-0.03626415133476257,
-0.24394899606704712,
-0.08713530749082565,
-0.4670223295688629,
-0.09594720602035522,
-0.20583386719226837,
0.2073742002248764,
0.29629066586494446,
-0.36272093653678894,
0.0545659214258194,
-0.04908715561032295,
0.28298842906951904,
-0.028974546119570732,
0.06376133114099503,
-0.03725143149495125,
-0.0694621354341507,
0.11982842534780502,
0.12234620749950409,
-0.18905587494373322,
0.024805594235658646,
0.6327594518661499,
-0.14525972306728363,
0.22640302777290344,
-0.48390573263168335,
-0.647208034992218,
0.0242476649582386,
-0.0849509909749031,
0.45395907759666443,
0.2489159107208252,
0.25769880414009094,
0.038177765905857086,
-0.4841984212398529,
0.3275105953216553,
-0.060698047280311584,
-0.26765158772468567,
-0.0457988902926445,
0.15328949689865112,
-0.03604884445667267,
0.06092962995171547,
-0.02559371292591095,
-0.09563086181879044,
-0.5339804887771606,
0.5790027976036072,
-0.2404775768518448,
0.06626268476247787,
0.24562494456768036,
0.10675161331892014,
-0.03666359931230545,
-0.24212288856506348,
0.2323952615261078,
0.03454992175102234,
-0.27356410026550293,
0.055867377668619156,
-0.22008469700813293,
-0.2154441922903061,
-0.025181733071804047,
-0.06008678302168846,
0.006941638886928558,
0.05447699502110481,
-0.33116286993026733,
-0.8059024214744568,
-0.21951748430728912,
0.4673907160758972,
0.02527008391916752,
0.3128966987133026,
0.1900869607925415,
0.061296842992305756,
-0.2431534081697464,
-0.014527667313814163,
-0.440924733877182,
-0.4018224775791168,
0.2553841173648834,
-0.07427122443914413,
0.12794819474220276,
0.254609614610672,
0.024150755256414413,
0.5800508260726929,
0.42605122923851013,
0.09211335331201553,
0.41999924182891846,
0.14210236072540283,
0.3558070957660675,
0.11694639921188354,
-0.5293576717376709,
-0.17846103012561798,
-0.08114507794380188,
0.06736982613801956,
0.4069334864616394,
0.28059637546539307,
0.10869811475276947,
-0.2273760288953781,
-0.5500133633613586,
-0.13741570711135864,
-0.33595216274261475,
0.151690274477005,
0.19880425930023193,
0.4129078686237335,
-0.2895134389400482,
0.06701868027448654,
-0.13626544177532196,
0.027121808379888535,
-0.11048296093940735,
0.41318243741989136,
0.07379868626594543,
-0.17278075218200684,
-0.13161180913448334,
-0.4216400384902954,
-0.4310634136199951,
0.35617977380752563,
0.18661993741989136,
0.36163100600242615,
0.006698776036500931,
-0.0905875712633133,
0.06533080339431763,
0.22524608671665192,
0.3542245328426361,
-0.11931278556585312,
-0.24681849777698517,
-0.03117854706943035,
-0.5511956214904785,
-0.2667018473148346,
0.14265625178813934,
-0.0037691891193389893,
0.16983002424240112,
0.13108088076114655,
0.6083887219429016,
-0.1862359493970871,
-0.1307358741760254,
0.1821560561656952,
0.16956910490989685,
-0.08235766738653183,
-0.12937068939208984,
-0.07335273921489716,
-0.4362691044807434,
-0.32214879989624023,
0.12530702352523804,
0.16213662922382355,
-0.30922043323516846,
0.1602872759103775,
-0.19596077501773834,
-0.06162058562040329,
-0.02732810191810131,
0.0847800001502037,
0.25231608748435974,
-0.11833969503641129,
0.2685313820838928,
0.13298121094703674,
-0.09350873529911041,
-0.18207599222660065,
-0.03774217516183853,
0.4846096634864807,
-0.21781349182128906,
-0.5596985220909119,
-0.37009191513061523,
0.07778527587652206,
0.4509289562702179,
0.5073118209838867,
0.1584060937166214,
0.4176838994026184,
0.12292332202196121,
0.12102329730987549,
-0.3077639043331146,
-0.06386123597621918,
0.30498236417770386,
-0.02723405882716179,
-0.21320651471614838,
-0.3490426242351532,
0.2358323037624359,
-0.002154318615794182,
-0.059124644845724106,
-0.1503274291753769,
0.35190850496292114,
-0.023900585249066353,
0.04091857001185417,
0.009975150227546692,
0.8616993427276611,
0.1968161016702652,
0.2606191039085388,
0.1590169370174408,
-0.18160606920719147,
0.413083016872406,
0.5625397562980652,
0.027056295424699783,
-0.3382030129432678,
-0.36873859167099,
0.035221897065639496,
-0.0749911516904831,
0.22756165266036987,
-0.21631397306919098,
-0.36551904678344727,
0.10943730175495148,
0.08215273916721344,
0.0950438529253006,
-0.020282482728362083,
0.3824010491371155,
-0.27542218565940857,
-0.2204360067844391,
-0.5659373998641968,
0.17484214901924133,
0.11105643212795258,
0.29025617241859436,
-0.014721905812621117,
-0.08679389208555222,
0.11424572765827179,
-0.16425392031669617,
-0.28068095445632935,
-0.20429593324661255,
-0.36952725052833557,
-0.07577278465032578,
0.0189356729388237,
-0.4356244206428528,
0.2444334328174591,
-0.05796097591519356,
0.07004282623529434,
0.45749104022979736,
-0.18707214295864105,
-0.09477752447128296,
0.062335848808288574,
-0.10072541236877441,
-0.012705703265964985,
0.03077172487974167,
0.48131000995635986,
-0.3354169428348541,
-0.07545110583305359,
0.1842409372329712,
0.11321079730987549,
-0.08400093019008636,
-0.08011434227228165,
-0.05017100274562836,
-0.22896917164325714,
-0.6461068987846375,
-0.06122368201613426,
-0.17118820548057556,
0.14398428797721863,
-0.2970092296600342,
0.1573898047208786,
0.20271258056163788,
-0.06306219846010208,
0.3283144533634186,
0.2532934546470642,
-0.11620168387889862,
-0.16250216960906982,
0.04490503668785095,
-0.016947921365499496,
-0.24256184697151184,
0.19486816227436066,
-0.02917221002280712,
-0.2884569764137268,
-0.20379993319511414,
0.02092081308364868,
0.032767925411462784,
-0.04346486181020737,
0.28154686093330383,
0.2192387580871582,
-0.037990257143974304,
0.11099585890769958,
0.40513601899147034,
0.31637489795684814,
-0.31228935718536377,
-0.09776665270328522,
-0.13949641585350037,
-0.27987220883369446,
0.21561843156814575,
0.14968977868556976,
0.38644155859947205,
-0.031068772077560425,
-0.012776318937540054,
0.014112384989857674,
-0.051582708954811096,
-0.4353189766407013,
-0.03147563338279724,
-0.16390588879585266,
0.06678977608680725,
0.5059565305709839,
-0.15233933925628662,
0.0005688280798494816,
0.08171631395816803,
0.1218818724155426,
-0.16786561906337738,
-0.18421177566051483,
-0.1802346408367157,
-0.07215894758701324,
0.14713174104690552,
0.06343162059783936,
-0.036469921469688416,
0.22273792326450348,
-0.09642106294631958,
-0.04120252653956413,
-0.16328388452529907,
0.3409009277820587,
0.17699843645095825,
-0.008259013295173645,
0.05305607244372368,
-0.1002846211194992,
0.14926722645759583,
0.04772328585386276,
0.1936614215373993,
0.044101282954216,
0.18167909979820251,
-0.010439328849315643,
0.03324224054813385,
-0.14998915791511536,
-0.03379197418689728,
0.41274428367614746,
0.054195940494537354,
0.26040351390838623,
-0.1122766062617302,
0.11609776318073273,
0.14696475863456726,
0.0333043597638607,
0.34848544001579285,
0.4681551456451416,
-0.013301372528076172,
-0.12166979908943176,
0.39019083976745605,
0.45366171002388,
0.2537115216255188,
-0.32644376158714294,
0.04843619093298912,
0.06589400768280029,
-0.1124773845076561,
0.16170985996723175,
0.3239893913269043,
0.21464243531227112,
0.2080632746219635,
0.34241950511932373,
-0.11935331672430038,
0.06497902423143387,
0.19574961066246033,
0.2032816857099533,
0.14920122921466827,
-0.020169351249933243,
-0.13653989136219025,
0.3753359615802765,
0.4049293100833893,
0.20123079419136047,
-0.2019720822572708,
-0.06784731894731522,
0.3706924021244049,
-0.12108335644006729,
-0.095699742436409,
0.20986399054527283,
-0.2254118174314499,
0.3236323595046997,
-0.23393359780311584,
0.23149387538433075,
0.22183245420455933,
0.2610378861427307,
0.23805463314056396,
-0.32088905572891235,
0.15019182860851288,
-0.2381533831357956,
0.36671632528305054,
-0.1938168704509735,
0.09621842205524445,
0.11710210144519806,
-0.14902129769325256,
0.04490777850151062,
-0.11591005325317383,
-0.10551528632640839,
-0.21738649904727936,
0.1490175873041153,
-0.13038279116153717,
0.12928372621536255,
0.11127887666225433,
-0.036699362099170685,
-0.16237413883209229,
0.38249659538269043,
-0.24046337604522705,
-0.16054372489452362,
0.0931793823838234,
0.22188293933868408,
-0.1474774330854416,
0.5102241635322571,
0.48476651310920715,
-0.009336557239294052,
-0.024036630988121033,
0.04502999037504196,
-0.15286023914813995,
-0.0945780873298645,
-0.16303838789463043,
0.11428999900817871,
-0.015886813402175903,
0.48313993215560913,
-0.025688890367746353,
0.22085578739643097,
-0.17925377190113068,
0.10916203260421753,
-0.2257087379693985,
0.034320391714572906,
-0.5567588210105896,
0.18772804737091064,
0.12698598206043243,
-0.2186916470527649,
-0.12558038532733917,
-0.009668678045272827,
-0.17390859127044678,
0.06446883827447891,
0.30975592136383057,
-0.07669118046760559,
-0.07605667412281036,
-0.26226815581321716,
0.1280033439397812,
0.15236976742744446,
0.11966212838888168,
0.4319703280925751,
0.07701732218265533,
0.028105583041906357,
0.16392268240451813,
-0.36132341623306274,
-0.01621992141008377,
0.34012266993522644,
-0.3613215386867523,
0.2766385078430176,
-0.21327105164527893,
0.0643930584192276,
0.3906041383743286,
0.06458701193332672,
-0.33224955201148987,
-0.0008547063916921616,
-0.15520653128623962,
-0.46742892265319824,
-0.06000639125704765,
0.12279728055000305,
-0.18784745037555695,
0.28938397765159607,
0.003718588501214981,
0.08766214549541473,
-0.18857574462890625,
0.05870780348777771,
-0.3985152244567871,
-0.010469920933246613,
0.13380618393421173,
0.01052214577794075,
0.3417973518371582,
0.19815324246883392,
0.31660231947898865,
-0.07179635763168335,
-0.19242605566978455,
0.02831883728504181,
-0.08664465695619583,
-0.16696785390377045,
0.190188467502594,
0.1047808825969696,
0.27591976523399353,
-0.10273740440607071,
-0.13539457321166992,
-0.09850457310676575,
0.17103120684623718,
-0.1159484013915062,
-0.1324460506439209,
0.22021496295928955,
0.13372987508773804,
-0.03368178755044937,
-0.2686355412006378,
0.20019222795963287,
0.31846883893013,
-0.1427096128463745,
0.0034915730357170105,
-0.29498356580734253,
-0.4339059889316559,
0.49749818444252014,
-0.18862956762313843,
-0.24337829649448395,
-0.11873100697994232,
0.027991145849227905,
-0.17042276263237,
0.10482551902532578,
-0.3880936801433563,
0.11719603091478348,
0.1289634257555008,
0.14205493032932281,
0.0185527540743351,
0.40177586674690247,
-0.07573677599430084,
-0.20162144303321838,
-0.014308223500847816,
0.587539792060852,
-0.1536986231803894,
-0.3729526698589325,
-0.16750632226467133,
-0.15728764235973358
] |
https://github.com/huggingface/datasets/issues/4965 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback() | Hi! This seems like a bug in `soundfile`. Could you please open an issue in their repo? `soundfile` works without any issues on my M1, so I'm not sure we can help. | ## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 32 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback()
## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
Hi! This seems like a bug in `soundfile`. Could you please open an issue in their repo? `soundfile` works without any issues on my M1, so I'm not sure we can help. | [
-0.17689570784568787,
-0.05003181844949722,
0.008499011397361755,
0.3107319474220276,
0.7080484628677368,
-0.03584003821015358,
0.4516226649284363,
0.12757360935211182,
-0.06962400674819946,
0.08208490163087845,
-0.0465291365981102,
0.2427283078432083,
-0.01392484363168478,
0.06805354356765747,
-0.17358547449111938,
-0.11427980661392212,
0.08982693403959274,
-0.08415928483009338,
-0.4289955794811249,
0.10457766056060791,
-0.40101414918899536,
0.03532765060663223,
-0.3242877721786499,
-0.0020565688610076904,
-0.17290803790092468,
-0.042814627289772034,
0.06569500267505646,
0.01189640536904335,
0.09467888623476028,
0.0556531697511673,
-0.06964877247810364,
-0.4517875015735626,
-0.21304099261760712,
0.4082183539867401,
-0.0001259193813893944,
-0.08719537407159805,
0.4725461006164551,
-0.04883526265621185,
0.017359839752316475,
0.23994335532188416,
-0.5597817301750183,
0.18999671936035156,
-0.1298232525587082,
-0.26879793405532837,
-0.03451330587267876,
0.13314706087112427,
-0.28873810172080994,
-0.49378901720046997,
0.05909048765897751,
0.5017418265342712,
0.10039523243904114,
0.2935357093811035,
0.30959373712539673,
0.11477955430746078,
0.18538618087768555,
0.3364694118499756,
-0.03027675673365593,
-0.19203777611255646,
-0.031210914254188538,
0.09930640459060669,
0.3082793951034546,
0.14888320863246918,
-0.2994321584701538,
-0.18843494355678558,
0.12797421216964722,
-0.03732844814658165,
0.21795403957366943,
-0.11675336956977844,
0.24916815757751465,
-0.18422433733940125,
0.8645453453063965,
-0.39628222584724426,
-0.2635146975517273,
0.012899331748485565,
0.05648767203092575,
-0.25868144631385803,
0.2766474485397339,
0.47825300693511963,
-0.22153358161449432,
-0.12976638972759247,
-0.2776588797569275,
0.019759828224778175,
0.2138887643814087,
0.13021396100521088,
-0.011693049222230911,
0.1580522358417511,
0.04960484430193901,
0.1848880648612976,
0.29495447874069214,
-0.29551804065704346,
-0.17558717727661133,
-0.04025101661682129,
0.01610543578863144,
0.12524020671844482,
-0.26320621371269226,
-0.14074546098709106,
-0.03595206141471863,
-0.26112228631973267,
-0.4924013912677765,
-0.16975614428520203,
-0.2658744156360626,
0.05094628036022186,
0.09023601561784744,
0.33405131101608276,
0.12799471616744995,
0.3231334686279297,
-0.36483490467071533,
0.18791413307189941,
0.3833966851234436,
0.05319501459598541,
-0.20442165434360504,
-0.12297049909830093,
-0.0018736140336841345,
0.049426522105932236,
-0.09723889827728271,
0.12633952498435974,
0.06942804157733917,
-0.035846877843141556,
-0.2799515128135681,
-0.017762813717126846,
-0.07867375016212463,
-0.08243711292743683,
0.18601353466510773,
0.47350621223449707,
0.08959085494279861,
0.12982836365699768,
0.1865684986114502,
0.3211597800254822,
-0.10888713598251343,
-0.21034970879554749,
-0.0147550068795681,
0.4439930021762848,
-0.32249000668525696,
-0.14455156028270721,
-0.14223156869411469,
0.41873031854629517,
0.08425408601760864,
0.043241266161203384,
-0.21292562782764435,
-0.2793888449668884,
-0.14285162091255188,
-0.1590198576450348,
-0.10774911195039749,
0.5584313273429871,
0.03455169126391411,
0.0638216957449913,
0.12548203766345978,
0.31803035736083984,
-0.033332958817481995,
0.5309090614318848,
0.07995390146970749,
-0.3306085169315338,
-0.04517258703708649,
0.061219703406095505,
0.06566515564918518,
0.19541727006435394,
-0.2374458909034729,
-0.15480239689350128,
0.6771799921989441,
-0.1964719295501709,
0.32390233874320984,
0.000498209148645401,
-0.3367037773132324,
-0.17486394941806793,
0.22230970859527588,
0.1372254341840744,
-0.30021610856056213,
0.057067371904850006,
-0.27369922399520874,
0.17360636591911316,
0.21207815408706665,
0.36757731437683105,
0.14572972059249878,
0.223606139421463,
-0.26767855882644653,
0.023520678281784058,
0.49229076504707336,
-0.3706646263599396,
-0.2703418433666229,
-0.2180895060300827,
-0.23361535370349884,
-0.0696718767285347,
0.3454565703868866,
0.20597827434539795,
-0.20659704506397247,
0.03134133294224739,
0.09317922592163086,
0.3007144331932068,
-0.05400828272104263,
0.27690163254737854,
-0.1529245227575302,
-0.2661163806915283,
0.09981714934110641,
0.003942759707570076,
0.05965837836265564,
0.011464796960353851,
-0.0726686492562294,
0.11302056908607483,
0.38436681032180786,
-0.3049834072589874,
0.06427845358848572,
0.016691653057932854,
0.3708252012729645,
-0.07323044538497925,
-0.03368787840008736,
-0.39373722672462463,
0.219127357006073,
0.024564258754253387,
0.6270351409912109,
0.04040706902742386,
-0.0873861163854599,
0.06473811715841293,
-0.040133997797966,
0.1407250612974167,
0.023815400898456573,
-0.017231769859790802,
-0.05844292789697647,
0.22054246068000793,
0.19291748106479645,
0.10488834977149963,
-0.12499034404754639,
0.37643590569496155,
-0.19914835691452026,
0.14163020253181458,
-0.6545506715774536,
0.010442396625876427,
-0.05156617611646652,
-0.38589584827423096,
-0.16155171394348145,
0.2239859402179718,
0.17164775729179382,
0.08271642029285431,
-0.08456331491470337,
0.2537316679954529,
0.3479911684989929,
0.24689073860645294,
-0.5649494528770447,
0.4742623567581177,
0.016637584194540977,
-0.20438505709171295,
0.24919457733631134,
0.29986220598220825,
0.33288830518722534,
-0.05684280022978783,
-0.13768047094345093,
0.1405506134033203,
0.3508244752883911,
0.3308106064796448,
0.09347222745418549,
0.023874955251812935,
-0.20483256876468658,
0.23764923214912415,
0.05322364717721939,
-0.16356948018074036,
0.11464336514472961,
-0.0835445374250412,
0.017489030957221985,
0.013695287518203259,
-0.21141433715820312,
0.018918417394161224,
0.6919578909873962,
-0.08672042191028595,
0.2868622839450836,
0.0957966148853302,
-0.2776814103126526,
0.1171659603714943,
0.12921194732189178,
-0.13278938829898834,
0.3675377666950226,
0.016348298639059067,
-0.09438726305961609,
0.14710605144500732,
0.05702462047338486,
-0.146851047873497,
0.3370218575000763,
0.09034918248653412,
-0.08477961272001266,
-0.11361782997846603,
0.35359397530555725,
-0.1100303903222084,
-0.11686170101165771,
0.10291868448257446,
0.22373788058757782,
0.3955214023590088,
-0.38641005754470825,
-0.17372789978981018,
-0.21270516514778137,
-0.11197298765182495,
-0.08516878634691238,
0.043595731258392334,
0.2820891737937927,
-0.1694774329662323,
-0.35380369424819946,
0.6618097424507141,
-0.10389305651187897,
-0.12430732697248459,
-0.17686215043067932,
0.04696561396121979,
0.20115794241428375,
0.10615533590316772,
0.06929422914981842,
0.03277631849050522,
0.09171812236309052,
0.002258583903312683,
0.5172210931777954,
-0.08502233028411865,
-0.048530176281929016,
0.05162540078163147,
-0.21124039590358734,
0.08189830183982849,
-0.18261191248893738,
0.028597677126526833,
-0.008297782391309738,
0.014742953702807426,
0.00539107620716095,
-0.05622844398021698,
0.03602117300033569,
-0.30164915323257446,
0.12718313932418823,
0.12498363852500916,
-0.3057841956615448,
0.24652963876724243,
0.35194045305252075,
-0.014959385618567467,
-0.1572084128856659,
-0.011079452931880951,
0.06189728528261185,
-0.46857601404190063,
0.4761618971824646,
-0.3885158896446228,
0.08565149456262589,
-0.1371166706085205,
0.2193743884563446,
-0.003865356557071209,
0.18206533789634705,
0.16501423716545105,
-0.18470372259616852,
0.1954062581062317,
0.2198208123445511,
-0.07876615226268768,
-0.13177081942558289,
0.07227353751659393,
0.01857348531484604,
0.05055098608136177,
-0.054211221635341644,
-0.4149583578109741,
-0.12870807945728302,
-0.40411463379859924,
-0.04873014613986015,
-0.09084919095039368,
0.22592008113861084,
0.22623957693576813,
-0.025845859199762344,
0.02690882794559002,
-0.028818169608712196,
-0.37931492924690247,
-0.11781700700521469,
0.33154430985450745,
-0.08364643901586533,
0.27752214670181274,
0.6780253648757935,
-0.24596667289733887,
0.028331708163022995,
0.15567909181118011,
0.23870401084423065,
0.28388696908950806,
-0.09636495262384415,
0.0014170259237289429,
-0.22109270095825195,
-0.297716349363327,
0.23013976216316223,
-0.02665799856185913,
-0.5628831386566162,
-0.07956217229366302,
-0.06401176005601883,
-0.24950207769870758,
-0.16867519915103912,
0.07429294288158417,
-0.05261407792568207,
-0.28655916452407837,
0.07728439569473267,
-0.26796379685401917,
-0.16345182061195374,
-0.2215612530708313,
0.25944122672080994,
0.0012584291398525238,
0.16068682074546814,
0.14689379930496216,
-0.17950405180454254,
0.020467326045036316,
-0.36725255846977234,
-0.22569508850574493,
-0.7689896821975708,
-0.4064927101135254,
0.09022241085767746,
-0.06525483727455139,
0.5470420718193054,
-0.36713579297065735,
-0.2204873263835907,
0.22803513705730438,
-0.15570688247680664,
0.9101353287696838,
-0.1868671029806137,
0.0950794517993927,
0.22978810966014862,
0.06529942154884338,
-0.2354770451784134,
0.03510722145438194,
-0.15158478915691376,
-0.24374394118785858,
-0.15875905752182007,
0.3171563744544983,
-0.023406267166137695,
0.2534724473953247,
0.18578538298606873,
0.22244535386562347,
-0.11699171364307404,
-0.0932411327958107,
-0.32030028104782104,
-0.34240996837615967,
-0.332304447889328,
0.13475370407104492,
0.26851293444633484,
0.30600178241729736,
0.21983706951141357,
0.3214840888977051,
0.16097532212734222,
-0.30120790004730225,
0.0564022995531559,
0.019882243126630783,
0.2522156834602356,
-0.14347362518310547,
0.22033515572547913,
-0.270976722240448,
-0.39752084016799927,
-0.06345390528440475,
0.7180447578430176,
0.4996603727340698,
-0.13633690774440765,
0.36828863620758057,
-0.2140519618988037,
0.536080539226532,
0.26610124111175537,
0.12963569164276123,
0.09062933176755905,
-0.30303817987442017,
0.12312036007642746,
-0.29514679312705994,
-0.15481477975845337,
0.5499753952026367,
0.024728186428546906,
0.01668374612927437,
-0.26236119866371155,
0.3411945700645447,
0.1656169593334198,
0.1810092180967331,
0.3193677067756653,
0.11363504827022552,
-0.20173874497413635,
0.11572551727294922,
0.1509726643562317,
1.068152666091919,
-0.11846831440925598,
0.11590255796909332,
0.4886130392551422,
-0.6349439024925232,
0.30955231189727783,
-0.3265332579612732,
0.3454235792160034,
-0.011577378958463669,
0.07737693190574646,
0.11074057221412659,
-0.06026173010468483,
-0.04795239865779877,
-0.25598710775375366,
-0.017399534583091736,
0.029183709993958473,
-0.3612973690032959,
0.1321844458580017,
0.00017534475773572922,
-0.17831361293792725,
-0.0815964862704277,
-0.25777000188827515,
-0.33913740515708923,
0.08856168389320374,
0.2651209831237793,
-0.1864524483680725,
0.19483551383018494,
0.24141186475753784,
0.032690536230802536,
0.005606424063444138,
-0.6992035508155823,
0.12683814764022827,
-0.05486970394849777,
-0.04855682700872421,
-0.3222428262233734,
-0.32168012857437134,
0.08688551187515259,
0.283135324716568,
0.258261501789093,
0.17585380375385284,
0.10958708822727203,
0.05157480388879776,
0.06515079736709595,
0.40755677223205566,
-0.17813019454479218,
0.1696721762418747,
0.30446144938468933,
-0.08915923535823822,
-0.318200945854187,
0.4172740578651428,
-0.15930518507957458,
-0.18006105720996857,
0.006120428442955017,
0.01522398367524147,
0.17457444965839386,
-0.20912791788578033,
-0.37966233491897583,
0.007127322256565094,
0.17776356637477875,
-0.27149802446365356,
0.05845549702644348,
-0.18573100864887238,
-0.46680670976638794,
0.48615530133247375,
-0.4118092954158783,
-0.19232386350631714,
-0.04240184649825096,
0.4681893289089203,
0.1801316738128662,
0.27768048644065857,
0.4618369936943054,
0.41781365871429443,
0.019157525151968002,
-0.10073935985565186,
-0.09177296608686447,
0.35667237639427185,
-0.09329149127006531,
0.13632190227508545,
-0.06926222145557404,
-0.41862255334854126,
-0.055888768285512924,
0.1184900552034378,
-0.25689083337783813,
0.14036861062049866,
-0.2633170187473297,
-0.37421268224716187,
-0.6943236589431763,
0.39438802003860474,
0.3889666497707367,
-0.11684894561767578,
-0.016572294756770134,
0.09805604815483093,
-0.24328461289405823,
-0.3052264451980591,
-0.1485091894865036,
-0.28981319069862366,
-0.18960106372833252,
0.18471626937389374,
0.396152526140213,
-0.04135724902153015,
0.08727793395519257,
0.007512742653489113,
0.05234089493751526,
0.19709336757659912,
-0.11040717363357544,
-0.037095583975315094,
0.060566727072000504,
0.15334197878837585,
0.19019046425819397,
-0.2351902276277542,
-0.12816332280635834,
-0.4764125943183899,
-0.2571786642074585,
-0.20443986356258392,
0.05445319786667824,
0.2989135682582855,
-0.12294375896453857,
-0.024167032912373543,
-0.03664986416697502,
-0.03692345321178436,
-0.09194135665893555,
0.019992655143141747,
-0.16145354509353638,
-0.20030586421489716,
0.23135599493980408,
0.16952267289161682,
0.12843234837055206,
0.16971880197525024,
-0.21462403237819672,
-0.01102861762046814,
-0.11858563125133514,
0.0531022883951664,
0.36954960227012634,
-0.26437824964523315,
-0.03481892868876457,
-0.21543161571025848,
0.2908855080604553,
0.1627579629421234,
-0.04990922287106514,
0.02552897296845913,
-0.025662511587142944,
0.11661870032548904,
-0.14752736687660217,
-0.33160167932510376,
-0.024307377636432648,
-0.12724794447422028,
0.0353347472846508,
0.4053995907306671,
-0.15255485475063324,
0.05847771465778351,
0.049663666635751724,
0.15288254618644714,
0.583808958530426,
-0.16818153858184814,
-0.014274710789322853,
0.4003414213657379,
-0.12916964292526245,
0.015123579651117325,
0.1721336990594864,
0.31715890765190125,
0.1759214699268341,
0.5391281247138977,
-0.12630969285964966,
0.09479853510856628,
0.28367456793785095,
-0.22139164805412292,
-0.14061018824577332,
-0.21150237321853638,
0.20300208032131195,
0.2538769841194153,
-0.013202741742134094,
0.15849348902702332,
-0.15908224880695343,
-0.1451617181301117,
-0.2750612795352936,
-0.1691100001335144,
-0.08976812660694122,
0.2023031860589981,
-0.35643669962882996,
0.18139846622943878,
-0.0037206262350082397,
-0.060190796852111816,
-0.1035114973783493,
0.15033671259880066,
-0.012766961008310318,
0.029338333755731583,
0.6205061674118042,
0.021780148148536682,
-0.09238040447235107,
-0.11034785211086273,
-0.2661232650279999,
0.2221832573413849,
0.33982428908348083,
-0.47083425521850586,
0.37784916162490845,
0.2111889123916626,
-0.08281850814819336,
0.10177880525588989,
0.06214260309934616,
0.6458262205123901,
0.31727129220962524,
-0.08046779036521912,
0.09811699390411377,
-0.08068497478961945,
-0.19313815236091614,
-0.11437396705150604,
0.24399784207344055,
0.23465754091739655,
0.5509623885154724,
-0.11135084927082062,
0.08030106872320175,
-0.05493878573179245,
0.34510329365730286,
0.20744743943214417,
0.2683783173561096,
-0.3912365734577179,
-0.12618893384933472,
-0.3699418306350708,
-0.37606027722358704,
-0.06816481053829193,
-0.10526923090219498,
-0.33892086148262024,
0.003287862055003643,
0.21092353761196136,
-0.24190391600131989,
0.18820488452911377,
0.1850985884666443,
-0.027388570830225945,
-0.16605548560619354,
0.12793084979057312,
0.22307075560092926,
-0.3256862461566925,
-0.24282312393188477,
-0.19927415251731873,
-0.08764047920703888,
0.02025286853313446,
-0.007662639021873474,
-0.3114880621433258,
-0.10330341011285782,
0.086632639169693,
0.11503889411687851,
-0.2541500926017761,
0.20513594150543213,
-0.07828806340694427,
-0.30271896719932556,
0.5084179043769836,
-0.10247418284416199,
-0.22768573462963104,
-0.07782314717769623,
0.017101872712373734,
-0.06761817634105682,
-0.2995525598526001,
0.2650860548019409,
0.009510745294392109,
0.011526532471179962,
-0.030129805207252502,
-0.20923642814159393,
-0.1251731961965561,
-0.10721629858016968,
0.31970077753067017,
0.0011277776211500168,
0.43318310379981995,
-0.11190297454595566,
-0.30657047033309937,
-0.18206886947155,
-0.0032400484196841717,
-0.21386513113975525,
-0.028028912842273712,
-0.16574057936668396,
0.7111661434173584,
-0.2403622269630432,
0.6986082196235657,
-0.42513126134872437,
0.20989997684955597,
-0.047215551137924194,
-0.18244671821594238,
-0.023887403309345245,
0.3285391926765442,
-0.07344292104244232,
0.07578204572200775,
0.19643385708332062,
-0.20284166932106018,
0.15906959772109985,
0.10345630347728729,
-0.4040057063102722,
-0.2700052559375763,
0.43884512782096863,
-0.0417160764336586,
-0.4528888165950775,
-0.030705787241458893,
0.1812049299478531,
-0.25744831562042236,
-0.06852195411920547,
-0.8465390205383301,
-0.012791849672794342,
-0.024515271186828613,
-0.04901846498250961,
-0.021339479833841324,
0.09135948121547699,
0.07397352159023285,
-0.06904314458370209,
-0.014681633561849594,
0.17580793797969818,
-0.15110957622528076,
-0.030566416680812836,
0.23395505547523499,
-0.08581721782684326
] |
https://github.com/huggingface/datasets/issues/4965 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback() | Hi @hoangtnm - I upgraded to python 3.10 and it fixed the problem for me. I was also running 3.8 on an M1 mac. | ## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 24 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback()
## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
Hi @hoangtnm - I upgraded to python 3.10 and it fixed the problem for me. I was also running 3.8 on an M1 mac. | [
-0.17689570784568787,
-0.05003181844949722,
0.008499011397361755,
0.3107319474220276,
0.7080484628677368,
-0.03584003821015358,
0.4516226649284363,
0.12757360935211182,
-0.06962400674819946,
0.08208490163087845,
-0.0465291365981102,
0.2427283078432083,
-0.01392484363168478,
0.06805354356765747,
-0.17358547449111938,
-0.11427980661392212,
0.08982693403959274,
-0.08415928483009338,
-0.4289955794811249,
0.10457766056060791,
-0.40101414918899536,
0.03532765060663223,
-0.3242877721786499,
-0.0020565688610076904,
-0.17290803790092468,
-0.042814627289772034,
0.06569500267505646,
0.01189640536904335,
0.09467888623476028,
0.0556531697511673,
-0.06964877247810364,
-0.4517875015735626,
-0.21304099261760712,
0.4082183539867401,
-0.0001259193813893944,
-0.08719537407159805,
0.4725461006164551,
-0.04883526265621185,
0.017359839752316475,
0.23994335532188416,
-0.5597817301750183,
0.18999671936035156,
-0.1298232525587082,
-0.26879793405532837,
-0.03451330587267876,
0.13314706087112427,
-0.28873810172080994,
-0.49378901720046997,
0.05909048765897751,
0.5017418265342712,
0.10039523243904114,
0.2935357093811035,
0.30959373712539673,
0.11477955430746078,
0.18538618087768555,
0.3364694118499756,
-0.03027675673365593,
-0.19203777611255646,
-0.031210914254188538,
0.09930640459060669,
0.3082793951034546,
0.14888320863246918,
-0.2994321584701538,
-0.18843494355678558,
0.12797421216964722,
-0.03732844814658165,
0.21795403957366943,
-0.11675336956977844,
0.24916815757751465,
-0.18422433733940125,
0.8645453453063965,
-0.39628222584724426,
-0.2635146975517273,
0.012899331748485565,
0.05648767203092575,
-0.25868144631385803,
0.2766474485397339,
0.47825300693511963,
-0.22153358161449432,
-0.12976638972759247,
-0.2776588797569275,
0.019759828224778175,
0.2138887643814087,
0.13021396100521088,
-0.011693049222230911,
0.1580522358417511,
0.04960484430193901,
0.1848880648612976,
0.29495447874069214,
-0.29551804065704346,
-0.17558717727661133,
-0.04025101661682129,
0.01610543578863144,
0.12524020671844482,
-0.26320621371269226,
-0.14074546098709106,
-0.03595206141471863,
-0.26112228631973267,
-0.4924013912677765,
-0.16975614428520203,
-0.2658744156360626,
0.05094628036022186,
0.09023601561784744,
0.33405131101608276,
0.12799471616744995,
0.3231334686279297,
-0.36483490467071533,
0.18791413307189941,
0.3833966851234436,
0.05319501459598541,
-0.20442165434360504,
-0.12297049909830093,
-0.0018736140336841345,
0.049426522105932236,
-0.09723889827728271,
0.12633952498435974,
0.06942804157733917,
-0.035846877843141556,
-0.2799515128135681,
-0.017762813717126846,
-0.07867375016212463,
-0.08243711292743683,
0.18601353466510773,
0.47350621223449707,
0.08959085494279861,
0.12982836365699768,
0.1865684986114502,
0.3211597800254822,
-0.10888713598251343,
-0.21034970879554749,
-0.0147550068795681,
0.4439930021762848,
-0.32249000668525696,
-0.14455156028270721,
-0.14223156869411469,
0.41873031854629517,
0.08425408601760864,
0.043241266161203384,
-0.21292562782764435,
-0.2793888449668884,
-0.14285162091255188,
-0.1590198576450348,
-0.10774911195039749,
0.5584313273429871,
0.03455169126391411,
0.0638216957449913,
0.12548203766345978,
0.31803035736083984,
-0.033332958817481995,
0.5309090614318848,
0.07995390146970749,
-0.3306085169315338,
-0.04517258703708649,
0.061219703406095505,
0.06566515564918518,
0.19541727006435394,
-0.2374458909034729,
-0.15480239689350128,
0.6771799921989441,
-0.1964719295501709,
0.32390233874320984,
0.000498209148645401,
-0.3367037773132324,
-0.17486394941806793,
0.22230970859527588,
0.1372254341840744,
-0.30021610856056213,
0.057067371904850006,
-0.27369922399520874,
0.17360636591911316,
0.21207815408706665,
0.36757731437683105,
0.14572972059249878,
0.223606139421463,
-0.26767855882644653,
0.023520678281784058,
0.49229076504707336,
-0.3706646263599396,
-0.2703418433666229,
-0.2180895060300827,
-0.23361535370349884,
-0.0696718767285347,
0.3454565703868866,
0.20597827434539795,
-0.20659704506397247,
0.03134133294224739,
0.09317922592163086,
0.3007144331932068,
-0.05400828272104263,
0.27690163254737854,
-0.1529245227575302,
-0.2661163806915283,
0.09981714934110641,
0.003942759707570076,
0.05965837836265564,
0.011464796960353851,
-0.0726686492562294,
0.11302056908607483,
0.38436681032180786,
-0.3049834072589874,
0.06427845358848572,
0.016691653057932854,
0.3708252012729645,
-0.07323044538497925,
-0.03368787840008736,
-0.39373722672462463,
0.219127357006073,
0.024564258754253387,
0.6270351409912109,
0.04040706902742386,
-0.0873861163854599,
0.06473811715841293,
-0.040133997797966,
0.1407250612974167,
0.023815400898456573,
-0.017231769859790802,
-0.05844292789697647,
0.22054246068000793,
0.19291748106479645,
0.10488834977149963,
-0.12499034404754639,
0.37643590569496155,
-0.19914835691452026,
0.14163020253181458,
-0.6545506715774536,
0.010442396625876427,
-0.05156617611646652,
-0.38589584827423096,
-0.16155171394348145,
0.2239859402179718,
0.17164775729179382,
0.08271642029285431,
-0.08456331491470337,
0.2537316679954529,
0.3479911684989929,
0.24689073860645294,
-0.5649494528770447,
0.4742623567581177,
0.016637584194540977,
-0.20438505709171295,
0.24919457733631134,
0.29986220598220825,
0.33288830518722534,
-0.05684280022978783,
-0.13768047094345093,
0.1405506134033203,
0.3508244752883911,
0.3308106064796448,
0.09347222745418549,
0.023874955251812935,
-0.20483256876468658,
0.23764923214912415,
0.05322364717721939,
-0.16356948018074036,
0.11464336514472961,
-0.0835445374250412,
0.017489030957221985,
0.013695287518203259,
-0.21141433715820312,
0.018918417394161224,
0.6919578909873962,
-0.08672042191028595,
0.2868622839450836,
0.0957966148853302,
-0.2776814103126526,
0.1171659603714943,
0.12921194732189178,
-0.13278938829898834,
0.3675377666950226,
0.016348298639059067,
-0.09438726305961609,
0.14710605144500732,
0.05702462047338486,
-0.146851047873497,
0.3370218575000763,
0.09034918248653412,
-0.08477961272001266,
-0.11361782997846603,
0.35359397530555725,
-0.1100303903222084,
-0.11686170101165771,
0.10291868448257446,
0.22373788058757782,
0.3955214023590088,
-0.38641005754470825,
-0.17372789978981018,
-0.21270516514778137,
-0.11197298765182495,
-0.08516878634691238,
0.043595731258392334,
0.2820891737937927,
-0.1694774329662323,
-0.35380369424819946,
0.6618097424507141,
-0.10389305651187897,
-0.12430732697248459,
-0.17686215043067932,
0.04696561396121979,
0.20115794241428375,
0.10615533590316772,
0.06929422914981842,
0.03277631849050522,
0.09171812236309052,
0.002258583903312683,
0.5172210931777954,
-0.08502233028411865,
-0.048530176281929016,
0.05162540078163147,
-0.21124039590358734,
0.08189830183982849,
-0.18261191248893738,
0.028597677126526833,
-0.008297782391309738,
0.014742953702807426,
0.00539107620716095,
-0.05622844398021698,
0.03602117300033569,
-0.30164915323257446,
0.12718313932418823,
0.12498363852500916,
-0.3057841956615448,
0.24652963876724243,
0.35194045305252075,
-0.014959385618567467,
-0.1572084128856659,
-0.011079452931880951,
0.06189728528261185,
-0.46857601404190063,
0.4761618971824646,
-0.3885158896446228,
0.08565149456262589,
-0.1371166706085205,
0.2193743884563446,
-0.003865356557071209,
0.18206533789634705,
0.16501423716545105,
-0.18470372259616852,
0.1954062581062317,
0.2198208123445511,
-0.07876615226268768,
-0.13177081942558289,
0.07227353751659393,
0.01857348531484604,
0.05055098608136177,
-0.054211221635341644,
-0.4149583578109741,
-0.12870807945728302,
-0.40411463379859924,
-0.04873014613986015,
-0.09084919095039368,
0.22592008113861084,
0.22623957693576813,
-0.025845859199762344,
0.02690882794559002,
-0.028818169608712196,
-0.37931492924690247,
-0.11781700700521469,
0.33154430985450745,
-0.08364643901586533,
0.27752214670181274,
0.6780253648757935,
-0.24596667289733887,
0.028331708163022995,
0.15567909181118011,
0.23870401084423065,
0.28388696908950806,
-0.09636495262384415,
0.0014170259237289429,
-0.22109270095825195,
-0.297716349363327,
0.23013976216316223,
-0.02665799856185913,
-0.5628831386566162,
-0.07956217229366302,
-0.06401176005601883,
-0.24950207769870758,
-0.16867519915103912,
0.07429294288158417,
-0.05261407792568207,
-0.28655916452407837,
0.07728439569473267,
-0.26796379685401917,
-0.16345182061195374,
-0.2215612530708313,
0.25944122672080994,
0.0012584291398525238,
0.16068682074546814,
0.14689379930496216,
-0.17950405180454254,
0.020467326045036316,
-0.36725255846977234,
-0.22569508850574493,
-0.7689896821975708,
-0.4064927101135254,
0.09022241085767746,
-0.06525483727455139,
0.5470420718193054,
-0.36713579297065735,
-0.2204873263835907,
0.22803513705730438,
-0.15570688247680664,
0.9101353287696838,
-0.1868671029806137,
0.0950794517993927,
0.22978810966014862,
0.06529942154884338,
-0.2354770451784134,
0.03510722145438194,
-0.15158478915691376,
-0.24374394118785858,
-0.15875905752182007,
0.3171563744544983,
-0.023406267166137695,
0.2534724473953247,
0.18578538298606873,
0.22244535386562347,
-0.11699171364307404,
-0.0932411327958107,
-0.32030028104782104,
-0.34240996837615967,
-0.332304447889328,
0.13475370407104492,
0.26851293444633484,
0.30600178241729736,
0.21983706951141357,
0.3214840888977051,
0.16097532212734222,
-0.30120790004730225,
0.0564022995531559,
0.019882243126630783,
0.2522156834602356,
-0.14347362518310547,
0.22033515572547913,
-0.270976722240448,
-0.39752084016799927,
-0.06345390528440475,
0.7180447578430176,
0.4996603727340698,
-0.13633690774440765,
0.36828863620758057,
-0.2140519618988037,
0.536080539226532,
0.26610124111175537,
0.12963569164276123,
0.09062933176755905,
-0.30303817987442017,
0.12312036007642746,
-0.29514679312705994,
-0.15481477975845337,
0.5499753952026367,
0.024728186428546906,
0.01668374612927437,
-0.26236119866371155,
0.3411945700645447,
0.1656169593334198,
0.1810092180967331,
0.3193677067756653,
0.11363504827022552,
-0.20173874497413635,
0.11572551727294922,
0.1509726643562317,
1.068152666091919,
-0.11846831440925598,
0.11590255796909332,
0.4886130392551422,
-0.6349439024925232,
0.30955231189727783,
-0.3265332579612732,
0.3454235792160034,
-0.011577378958463669,
0.07737693190574646,
0.11074057221412659,
-0.06026173010468483,
-0.04795239865779877,
-0.25598710775375366,
-0.017399534583091736,
0.029183709993958473,
-0.3612973690032959,
0.1321844458580017,
0.00017534475773572922,
-0.17831361293792725,
-0.0815964862704277,
-0.25777000188827515,
-0.33913740515708923,
0.08856168389320374,
0.2651209831237793,
-0.1864524483680725,
0.19483551383018494,
0.24141186475753784,
0.032690536230802536,
0.005606424063444138,
-0.6992035508155823,
0.12683814764022827,
-0.05486970394849777,
-0.04855682700872421,
-0.3222428262233734,
-0.32168012857437134,
0.08688551187515259,
0.283135324716568,
0.258261501789093,
0.17585380375385284,
0.10958708822727203,
0.05157480388879776,
0.06515079736709595,
0.40755677223205566,
-0.17813019454479218,
0.1696721762418747,
0.30446144938468933,
-0.08915923535823822,
-0.318200945854187,
0.4172740578651428,
-0.15930518507957458,
-0.18006105720996857,
0.006120428442955017,
0.01522398367524147,
0.17457444965839386,
-0.20912791788578033,
-0.37966233491897583,
0.007127322256565094,
0.17776356637477875,
-0.27149802446365356,
0.05845549702644348,
-0.18573100864887238,
-0.46680670976638794,
0.48615530133247375,
-0.4118092954158783,
-0.19232386350631714,
-0.04240184649825096,
0.4681893289089203,
0.1801316738128662,
0.27768048644065857,
0.4618369936943054,
0.41781365871429443,
0.019157525151968002,
-0.10073935985565186,
-0.09177296608686447,
0.35667237639427185,
-0.09329149127006531,
0.13632190227508545,
-0.06926222145557404,
-0.41862255334854126,
-0.055888768285512924,
0.1184900552034378,
-0.25689083337783813,
0.14036861062049866,
-0.2633170187473297,
-0.37421268224716187,
-0.6943236589431763,
0.39438802003860474,
0.3889666497707367,
-0.11684894561767578,
-0.016572294756770134,
0.09805604815483093,
-0.24328461289405823,
-0.3052264451980591,
-0.1485091894865036,
-0.28981319069862366,
-0.18960106372833252,
0.18471626937389374,
0.396152526140213,
-0.04135724902153015,
0.08727793395519257,
0.007512742653489113,
0.05234089493751526,
0.19709336757659912,
-0.11040717363357544,
-0.037095583975315094,
0.060566727072000504,
0.15334197878837585,
0.19019046425819397,
-0.2351902276277542,
-0.12816332280635834,
-0.4764125943183899,
-0.2571786642074585,
-0.20443986356258392,
0.05445319786667824,
0.2989135682582855,
-0.12294375896453857,
-0.024167032912373543,
-0.03664986416697502,
-0.03692345321178436,
-0.09194135665893555,
0.019992655143141747,
-0.16145354509353638,
-0.20030586421489716,
0.23135599493980408,
0.16952267289161682,
0.12843234837055206,
0.16971880197525024,
-0.21462403237819672,
-0.01102861762046814,
-0.11858563125133514,
0.0531022883951664,
0.36954960227012634,
-0.26437824964523315,
-0.03481892868876457,
-0.21543161571025848,
0.2908855080604553,
0.1627579629421234,
-0.04990922287106514,
0.02552897296845913,
-0.025662511587142944,
0.11661870032548904,
-0.14752736687660217,
-0.33160167932510376,
-0.024307377636432648,
-0.12724794447422028,
0.0353347472846508,
0.4053995907306671,
-0.15255485475063324,
0.05847771465778351,
0.049663666635751724,
0.15288254618644714,
0.583808958530426,
-0.16818153858184814,
-0.014274710789322853,
0.4003414213657379,
-0.12916964292526245,
0.015123579651117325,
0.1721336990594864,
0.31715890765190125,
0.1759214699268341,
0.5391281247138977,
-0.12630969285964966,
0.09479853510856628,
0.28367456793785095,
-0.22139164805412292,
-0.14061018824577332,
-0.21150237321853638,
0.20300208032131195,
0.2538769841194153,
-0.013202741742134094,
0.15849348902702332,
-0.15908224880695343,
-0.1451617181301117,
-0.2750612795352936,
-0.1691100001335144,
-0.08976812660694122,
0.2023031860589981,
-0.35643669962882996,
0.18139846622943878,
-0.0037206262350082397,
-0.060190796852111816,
-0.1035114973783493,
0.15033671259880066,
-0.012766961008310318,
0.029338333755731583,
0.6205061674118042,
0.021780148148536682,
-0.09238040447235107,
-0.11034785211086273,
-0.2661232650279999,
0.2221832573413849,
0.33982428908348083,
-0.47083425521850586,
0.37784916162490845,
0.2111889123916626,
-0.08281850814819336,
0.10177880525588989,
0.06214260309934616,
0.6458262205123901,
0.31727129220962524,
-0.08046779036521912,
0.09811699390411377,
-0.08068497478961945,
-0.19313815236091614,
-0.11437396705150604,
0.24399784207344055,
0.23465754091739655,
0.5509623885154724,
-0.11135084927082062,
0.08030106872320175,
-0.05493878573179245,
0.34510329365730286,
0.20744743943214417,
0.2683783173561096,
-0.3912365734577179,
-0.12618893384933472,
-0.3699418306350708,
-0.37606027722358704,
-0.06816481053829193,
-0.10526923090219498,
-0.33892086148262024,
0.003287862055003643,
0.21092353761196136,
-0.24190391600131989,
0.18820488452911377,
0.1850985884666443,
-0.027388570830225945,
-0.16605548560619354,
0.12793084979057312,
0.22307075560092926,
-0.3256862461566925,
-0.24282312393188477,
-0.19927415251731873,
-0.08764047920703888,
0.02025286853313446,
-0.007662639021873474,
-0.3114880621433258,
-0.10330341011285782,
0.086632639169693,
0.11503889411687851,
-0.2541500926017761,
0.20513594150543213,
-0.07828806340694427,
-0.30271896719932556,
0.5084179043769836,
-0.10247418284416199,
-0.22768573462963104,
-0.07782314717769623,
0.017101872712373734,
-0.06761817634105682,
-0.2995525598526001,
0.2650860548019409,
0.009510745294392109,
0.011526532471179962,
-0.030129805207252502,
-0.20923642814159393,
-0.1251731961965561,
-0.10721629858016968,
0.31970077753067017,
0.0011277776211500168,
0.43318310379981995,
-0.11190297454595566,
-0.30657047033309937,
-0.18206886947155,
-0.0032400484196841717,
-0.21386513113975525,
-0.028028912842273712,
-0.16574057936668396,
0.7111661434173584,
-0.2403622269630432,
0.6986082196235657,
-0.42513126134872437,
0.20989997684955597,
-0.047215551137924194,
-0.18244671821594238,
-0.023887403309345245,
0.3285391926765442,
-0.07344292104244232,
0.07578204572200775,
0.19643385708332062,
-0.20284166932106018,
0.15906959772109985,
0.10345630347728729,
-0.4040057063102722,
-0.2700052559375763,
0.43884512782096863,
-0.0417160764336586,
-0.4528888165950775,
-0.030705787241458893,
0.1812049299478531,
-0.25744831562042236,
-0.06852195411920547,
-0.8465390205383301,
-0.012791849672794342,
-0.024515271186828613,
-0.04901846498250961,
-0.021339479833841324,
0.09135948121547699,
0.07397352159023285,
-0.06904314458370209,
-0.014681633561849594,
0.17580793797969818,
-0.15110957622528076,
-0.030566416680812836,
0.23395505547523499,
-0.08581721782684326
] |
https://github.com/huggingface/datasets/issues/4965 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback() | Same here, upgrade python didn't work for me
MemoryError: Cannot allocate write+execute memory for ffi.callback()
any idea? | ## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 17 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback()
## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
Same here, upgrade python didn't work for me
MemoryError: Cannot allocate write+execute memory for ffi.callback()
any idea? | [
-0.17689570784568787,
-0.05003181844949722,
0.008499011397361755,
0.3107319474220276,
0.7080484628677368,
-0.03584003821015358,
0.4516226649284363,
0.12757360935211182,
-0.06962400674819946,
0.08208490163087845,
-0.0465291365981102,
0.2427283078432083,
-0.01392484363168478,
0.06805354356765747,
-0.17358547449111938,
-0.11427980661392212,
0.08982693403959274,
-0.08415928483009338,
-0.4289955794811249,
0.10457766056060791,
-0.40101414918899536,
0.03532765060663223,
-0.3242877721786499,
-0.0020565688610076904,
-0.17290803790092468,
-0.042814627289772034,
0.06569500267505646,
0.01189640536904335,
0.09467888623476028,
0.0556531697511673,
-0.06964877247810364,
-0.4517875015735626,
-0.21304099261760712,
0.4082183539867401,
-0.0001259193813893944,
-0.08719537407159805,
0.4725461006164551,
-0.04883526265621185,
0.017359839752316475,
0.23994335532188416,
-0.5597817301750183,
0.18999671936035156,
-0.1298232525587082,
-0.26879793405532837,
-0.03451330587267876,
0.13314706087112427,
-0.28873810172080994,
-0.49378901720046997,
0.05909048765897751,
0.5017418265342712,
0.10039523243904114,
0.2935357093811035,
0.30959373712539673,
0.11477955430746078,
0.18538618087768555,
0.3364694118499756,
-0.03027675673365593,
-0.19203777611255646,
-0.031210914254188538,
0.09930640459060669,
0.3082793951034546,
0.14888320863246918,
-0.2994321584701538,
-0.18843494355678558,
0.12797421216964722,
-0.03732844814658165,
0.21795403957366943,
-0.11675336956977844,
0.24916815757751465,
-0.18422433733940125,
0.8645453453063965,
-0.39628222584724426,
-0.2635146975517273,
0.012899331748485565,
0.05648767203092575,
-0.25868144631385803,
0.2766474485397339,
0.47825300693511963,
-0.22153358161449432,
-0.12976638972759247,
-0.2776588797569275,
0.019759828224778175,
0.2138887643814087,
0.13021396100521088,
-0.011693049222230911,
0.1580522358417511,
0.04960484430193901,
0.1848880648612976,
0.29495447874069214,
-0.29551804065704346,
-0.17558717727661133,
-0.04025101661682129,
0.01610543578863144,
0.12524020671844482,
-0.26320621371269226,
-0.14074546098709106,
-0.03595206141471863,
-0.26112228631973267,
-0.4924013912677765,
-0.16975614428520203,
-0.2658744156360626,
0.05094628036022186,
0.09023601561784744,
0.33405131101608276,
0.12799471616744995,
0.3231334686279297,
-0.36483490467071533,
0.18791413307189941,
0.3833966851234436,
0.05319501459598541,
-0.20442165434360504,
-0.12297049909830093,
-0.0018736140336841345,
0.049426522105932236,
-0.09723889827728271,
0.12633952498435974,
0.06942804157733917,
-0.035846877843141556,
-0.2799515128135681,
-0.017762813717126846,
-0.07867375016212463,
-0.08243711292743683,
0.18601353466510773,
0.47350621223449707,
0.08959085494279861,
0.12982836365699768,
0.1865684986114502,
0.3211597800254822,
-0.10888713598251343,
-0.21034970879554749,
-0.0147550068795681,
0.4439930021762848,
-0.32249000668525696,
-0.14455156028270721,
-0.14223156869411469,
0.41873031854629517,
0.08425408601760864,
0.043241266161203384,
-0.21292562782764435,
-0.2793888449668884,
-0.14285162091255188,
-0.1590198576450348,
-0.10774911195039749,
0.5584313273429871,
0.03455169126391411,
0.0638216957449913,
0.12548203766345978,
0.31803035736083984,
-0.033332958817481995,
0.5309090614318848,
0.07995390146970749,
-0.3306085169315338,
-0.04517258703708649,
0.061219703406095505,
0.06566515564918518,
0.19541727006435394,
-0.2374458909034729,
-0.15480239689350128,
0.6771799921989441,
-0.1964719295501709,
0.32390233874320984,
0.000498209148645401,
-0.3367037773132324,
-0.17486394941806793,
0.22230970859527588,
0.1372254341840744,
-0.30021610856056213,
0.057067371904850006,
-0.27369922399520874,
0.17360636591911316,
0.21207815408706665,
0.36757731437683105,
0.14572972059249878,
0.223606139421463,
-0.26767855882644653,
0.023520678281784058,
0.49229076504707336,
-0.3706646263599396,
-0.2703418433666229,
-0.2180895060300827,
-0.23361535370349884,
-0.0696718767285347,
0.3454565703868866,
0.20597827434539795,
-0.20659704506397247,
0.03134133294224739,
0.09317922592163086,
0.3007144331932068,
-0.05400828272104263,
0.27690163254737854,
-0.1529245227575302,
-0.2661163806915283,
0.09981714934110641,
0.003942759707570076,
0.05965837836265564,
0.011464796960353851,
-0.0726686492562294,
0.11302056908607483,
0.38436681032180786,
-0.3049834072589874,
0.06427845358848572,
0.016691653057932854,
0.3708252012729645,
-0.07323044538497925,
-0.03368787840008736,
-0.39373722672462463,
0.219127357006073,
0.024564258754253387,
0.6270351409912109,
0.04040706902742386,
-0.0873861163854599,
0.06473811715841293,
-0.040133997797966,
0.1407250612974167,
0.023815400898456573,
-0.017231769859790802,
-0.05844292789697647,
0.22054246068000793,
0.19291748106479645,
0.10488834977149963,
-0.12499034404754639,
0.37643590569496155,
-0.19914835691452026,
0.14163020253181458,
-0.6545506715774536,
0.010442396625876427,
-0.05156617611646652,
-0.38589584827423096,
-0.16155171394348145,
0.2239859402179718,
0.17164775729179382,
0.08271642029285431,
-0.08456331491470337,
0.2537316679954529,
0.3479911684989929,
0.24689073860645294,
-0.5649494528770447,
0.4742623567581177,
0.016637584194540977,
-0.20438505709171295,
0.24919457733631134,
0.29986220598220825,
0.33288830518722534,
-0.05684280022978783,
-0.13768047094345093,
0.1405506134033203,
0.3508244752883911,
0.3308106064796448,
0.09347222745418549,
0.023874955251812935,
-0.20483256876468658,
0.23764923214912415,
0.05322364717721939,
-0.16356948018074036,
0.11464336514472961,
-0.0835445374250412,
0.017489030957221985,
0.013695287518203259,
-0.21141433715820312,
0.018918417394161224,
0.6919578909873962,
-0.08672042191028595,
0.2868622839450836,
0.0957966148853302,
-0.2776814103126526,
0.1171659603714943,
0.12921194732189178,
-0.13278938829898834,
0.3675377666950226,
0.016348298639059067,
-0.09438726305961609,
0.14710605144500732,
0.05702462047338486,
-0.146851047873497,
0.3370218575000763,
0.09034918248653412,
-0.08477961272001266,
-0.11361782997846603,
0.35359397530555725,
-0.1100303903222084,
-0.11686170101165771,
0.10291868448257446,
0.22373788058757782,
0.3955214023590088,
-0.38641005754470825,
-0.17372789978981018,
-0.21270516514778137,
-0.11197298765182495,
-0.08516878634691238,
0.043595731258392334,
0.2820891737937927,
-0.1694774329662323,
-0.35380369424819946,
0.6618097424507141,
-0.10389305651187897,
-0.12430732697248459,
-0.17686215043067932,
0.04696561396121979,
0.20115794241428375,
0.10615533590316772,
0.06929422914981842,
0.03277631849050522,
0.09171812236309052,
0.002258583903312683,
0.5172210931777954,
-0.08502233028411865,
-0.048530176281929016,
0.05162540078163147,
-0.21124039590358734,
0.08189830183982849,
-0.18261191248893738,
0.028597677126526833,
-0.008297782391309738,
0.014742953702807426,
0.00539107620716095,
-0.05622844398021698,
0.03602117300033569,
-0.30164915323257446,
0.12718313932418823,
0.12498363852500916,
-0.3057841956615448,
0.24652963876724243,
0.35194045305252075,
-0.014959385618567467,
-0.1572084128856659,
-0.011079452931880951,
0.06189728528261185,
-0.46857601404190063,
0.4761618971824646,
-0.3885158896446228,
0.08565149456262589,
-0.1371166706085205,
0.2193743884563446,
-0.003865356557071209,
0.18206533789634705,
0.16501423716545105,
-0.18470372259616852,
0.1954062581062317,
0.2198208123445511,
-0.07876615226268768,
-0.13177081942558289,
0.07227353751659393,
0.01857348531484604,
0.05055098608136177,
-0.054211221635341644,
-0.4149583578109741,
-0.12870807945728302,
-0.40411463379859924,
-0.04873014613986015,
-0.09084919095039368,
0.22592008113861084,
0.22623957693576813,
-0.025845859199762344,
0.02690882794559002,
-0.028818169608712196,
-0.37931492924690247,
-0.11781700700521469,
0.33154430985450745,
-0.08364643901586533,
0.27752214670181274,
0.6780253648757935,
-0.24596667289733887,
0.028331708163022995,
0.15567909181118011,
0.23870401084423065,
0.28388696908950806,
-0.09636495262384415,
0.0014170259237289429,
-0.22109270095825195,
-0.297716349363327,
0.23013976216316223,
-0.02665799856185913,
-0.5628831386566162,
-0.07956217229366302,
-0.06401176005601883,
-0.24950207769870758,
-0.16867519915103912,
0.07429294288158417,
-0.05261407792568207,
-0.28655916452407837,
0.07728439569473267,
-0.26796379685401917,
-0.16345182061195374,
-0.2215612530708313,
0.25944122672080994,
0.0012584291398525238,
0.16068682074546814,
0.14689379930496216,
-0.17950405180454254,
0.020467326045036316,
-0.36725255846977234,
-0.22569508850574493,
-0.7689896821975708,
-0.4064927101135254,
0.09022241085767746,
-0.06525483727455139,
0.5470420718193054,
-0.36713579297065735,
-0.2204873263835907,
0.22803513705730438,
-0.15570688247680664,
0.9101353287696838,
-0.1868671029806137,
0.0950794517993927,
0.22978810966014862,
0.06529942154884338,
-0.2354770451784134,
0.03510722145438194,
-0.15158478915691376,
-0.24374394118785858,
-0.15875905752182007,
0.3171563744544983,
-0.023406267166137695,
0.2534724473953247,
0.18578538298606873,
0.22244535386562347,
-0.11699171364307404,
-0.0932411327958107,
-0.32030028104782104,
-0.34240996837615967,
-0.332304447889328,
0.13475370407104492,
0.26851293444633484,
0.30600178241729736,
0.21983706951141357,
0.3214840888977051,
0.16097532212734222,
-0.30120790004730225,
0.0564022995531559,
0.019882243126630783,
0.2522156834602356,
-0.14347362518310547,
0.22033515572547913,
-0.270976722240448,
-0.39752084016799927,
-0.06345390528440475,
0.7180447578430176,
0.4996603727340698,
-0.13633690774440765,
0.36828863620758057,
-0.2140519618988037,
0.536080539226532,
0.26610124111175537,
0.12963569164276123,
0.09062933176755905,
-0.30303817987442017,
0.12312036007642746,
-0.29514679312705994,
-0.15481477975845337,
0.5499753952026367,
0.024728186428546906,
0.01668374612927437,
-0.26236119866371155,
0.3411945700645447,
0.1656169593334198,
0.1810092180967331,
0.3193677067756653,
0.11363504827022552,
-0.20173874497413635,
0.11572551727294922,
0.1509726643562317,
1.068152666091919,
-0.11846831440925598,
0.11590255796909332,
0.4886130392551422,
-0.6349439024925232,
0.30955231189727783,
-0.3265332579612732,
0.3454235792160034,
-0.011577378958463669,
0.07737693190574646,
0.11074057221412659,
-0.06026173010468483,
-0.04795239865779877,
-0.25598710775375366,
-0.017399534583091736,
0.029183709993958473,
-0.3612973690032959,
0.1321844458580017,
0.00017534475773572922,
-0.17831361293792725,
-0.0815964862704277,
-0.25777000188827515,
-0.33913740515708923,
0.08856168389320374,
0.2651209831237793,
-0.1864524483680725,
0.19483551383018494,
0.24141186475753784,
0.032690536230802536,
0.005606424063444138,
-0.6992035508155823,
0.12683814764022827,
-0.05486970394849777,
-0.04855682700872421,
-0.3222428262233734,
-0.32168012857437134,
0.08688551187515259,
0.283135324716568,
0.258261501789093,
0.17585380375385284,
0.10958708822727203,
0.05157480388879776,
0.06515079736709595,
0.40755677223205566,
-0.17813019454479218,
0.1696721762418747,
0.30446144938468933,
-0.08915923535823822,
-0.318200945854187,
0.4172740578651428,
-0.15930518507957458,
-0.18006105720996857,
0.006120428442955017,
0.01522398367524147,
0.17457444965839386,
-0.20912791788578033,
-0.37966233491897583,
0.007127322256565094,
0.17776356637477875,
-0.27149802446365356,
0.05845549702644348,
-0.18573100864887238,
-0.46680670976638794,
0.48615530133247375,
-0.4118092954158783,
-0.19232386350631714,
-0.04240184649825096,
0.4681893289089203,
0.1801316738128662,
0.27768048644065857,
0.4618369936943054,
0.41781365871429443,
0.019157525151968002,
-0.10073935985565186,
-0.09177296608686447,
0.35667237639427185,
-0.09329149127006531,
0.13632190227508545,
-0.06926222145557404,
-0.41862255334854126,
-0.055888768285512924,
0.1184900552034378,
-0.25689083337783813,
0.14036861062049866,
-0.2633170187473297,
-0.37421268224716187,
-0.6943236589431763,
0.39438802003860474,
0.3889666497707367,
-0.11684894561767578,
-0.016572294756770134,
0.09805604815483093,
-0.24328461289405823,
-0.3052264451980591,
-0.1485091894865036,
-0.28981319069862366,
-0.18960106372833252,
0.18471626937389374,
0.396152526140213,
-0.04135724902153015,
0.08727793395519257,
0.007512742653489113,
0.05234089493751526,
0.19709336757659912,
-0.11040717363357544,
-0.037095583975315094,
0.060566727072000504,
0.15334197878837585,
0.19019046425819397,
-0.2351902276277542,
-0.12816332280635834,
-0.4764125943183899,
-0.2571786642074585,
-0.20443986356258392,
0.05445319786667824,
0.2989135682582855,
-0.12294375896453857,
-0.024167032912373543,
-0.03664986416697502,
-0.03692345321178436,
-0.09194135665893555,
0.019992655143141747,
-0.16145354509353638,
-0.20030586421489716,
0.23135599493980408,
0.16952267289161682,
0.12843234837055206,
0.16971880197525024,
-0.21462403237819672,
-0.01102861762046814,
-0.11858563125133514,
0.0531022883951664,
0.36954960227012634,
-0.26437824964523315,
-0.03481892868876457,
-0.21543161571025848,
0.2908855080604553,
0.1627579629421234,
-0.04990922287106514,
0.02552897296845913,
-0.025662511587142944,
0.11661870032548904,
-0.14752736687660217,
-0.33160167932510376,
-0.024307377636432648,
-0.12724794447422028,
0.0353347472846508,
0.4053995907306671,
-0.15255485475063324,
0.05847771465778351,
0.049663666635751724,
0.15288254618644714,
0.583808958530426,
-0.16818153858184814,
-0.014274710789322853,
0.4003414213657379,
-0.12916964292526245,
0.015123579651117325,
0.1721336990594864,
0.31715890765190125,
0.1759214699268341,
0.5391281247138977,
-0.12630969285964966,
0.09479853510856628,
0.28367456793785095,
-0.22139164805412292,
-0.14061018824577332,
-0.21150237321853638,
0.20300208032131195,
0.2538769841194153,
-0.013202741742134094,
0.15849348902702332,
-0.15908224880695343,
-0.1451617181301117,
-0.2750612795352936,
-0.1691100001335144,
-0.08976812660694122,
0.2023031860589981,
-0.35643669962882996,
0.18139846622943878,
-0.0037206262350082397,
-0.060190796852111816,
-0.1035114973783493,
0.15033671259880066,
-0.012766961008310318,
0.029338333755731583,
0.6205061674118042,
0.021780148148536682,
-0.09238040447235107,
-0.11034785211086273,
-0.2661232650279999,
0.2221832573413849,
0.33982428908348083,
-0.47083425521850586,
0.37784916162490845,
0.2111889123916626,
-0.08281850814819336,
0.10177880525588989,
0.06214260309934616,
0.6458262205123901,
0.31727129220962524,
-0.08046779036521912,
0.09811699390411377,
-0.08068497478961945,
-0.19313815236091614,
-0.11437396705150604,
0.24399784207344055,
0.23465754091739655,
0.5509623885154724,
-0.11135084927082062,
0.08030106872320175,
-0.05493878573179245,
0.34510329365730286,
0.20744743943214417,
0.2683783173561096,
-0.3912365734577179,
-0.12618893384933472,
-0.3699418306350708,
-0.37606027722358704,
-0.06816481053829193,
-0.10526923090219498,
-0.33892086148262024,
0.003287862055003643,
0.21092353761196136,
-0.24190391600131989,
0.18820488452911377,
0.1850985884666443,
-0.027388570830225945,
-0.16605548560619354,
0.12793084979057312,
0.22307075560092926,
-0.3256862461566925,
-0.24282312393188477,
-0.19927415251731873,
-0.08764047920703888,
0.02025286853313446,
-0.007662639021873474,
-0.3114880621433258,
-0.10330341011285782,
0.086632639169693,
0.11503889411687851,
-0.2541500926017761,
0.20513594150543213,
-0.07828806340694427,
-0.30271896719932556,
0.5084179043769836,
-0.10247418284416199,
-0.22768573462963104,
-0.07782314717769623,
0.017101872712373734,
-0.06761817634105682,
-0.2995525598526001,
0.2650860548019409,
0.009510745294392109,
0.011526532471179962,
-0.030129805207252502,
-0.20923642814159393,
-0.1251731961965561,
-0.10721629858016968,
0.31970077753067017,
0.0011277776211500168,
0.43318310379981995,
-0.11190297454595566,
-0.30657047033309937,
-0.18206886947155,
-0.0032400484196841717,
-0.21386513113975525,
-0.028028912842273712,
-0.16574057936668396,
0.7111661434173584,
-0.2403622269630432,
0.6986082196235657,
-0.42513126134872437,
0.20989997684955597,
-0.047215551137924194,
-0.18244671821594238,
-0.023887403309345245,
0.3285391926765442,
-0.07344292104244232,
0.07578204572200775,
0.19643385708332062,
-0.20284166932106018,
0.15906959772109985,
0.10345630347728729,
-0.4040057063102722,
-0.2700052559375763,
0.43884512782096863,
-0.0417160764336586,
-0.4528888165950775,
-0.030705787241458893,
0.1812049299478531,
-0.25744831562042236,
-0.06852195411920547,
-0.8465390205383301,
-0.012791849672794342,
-0.024515271186828613,
-0.04901846498250961,
-0.021339479833841324,
0.09135948121547699,
0.07397352159023285,
-0.06904314458370209,
-0.014681633561849594,
0.17580793797969818,
-0.15110957622528076,
-0.030566416680812836,
0.23395505547523499,
-0.08581721782684326
] |
https://github.com/huggingface/datasets/issues/4965 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback() | This is a `soundfile` issue, so there isn't much we can do about it. Hopefully, it gets fixed soon. | ## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 19 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback()
## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
This is a `soundfile` issue, so there isn't much we can do about it. Hopefully, it gets fixed soon. | [
-0.17689570784568787,
-0.05003181844949722,
0.008499011397361755,
0.3107319474220276,
0.7080484628677368,
-0.03584003821015358,
0.4516226649284363,
0.12757360935211182,
-0.06962400674819946,
0.08208490163087845,
-0.0465291365981102,
0.2427283078432083,
-0.01392484363168478,
0.06805354356765747,
-0.17358547449111938,
-0.11427980661392212,
0.08982693403959274,
-0.08415928483009338,
-0.4289955794811249,
0.10457766056060791,
-0.40101414918899536,
0.03532765060663223,
-0.3242877721786499,
-0.0020565688610076904,
-0.17290803790092468,
-0.042814627289772034,
0.06569500267505646,
0.01189640536904335,
0.09467888623476028,
0.0556531697511673,
-0.06964877247810364,
-0.4517875015735626,
-0.21304099261760712,
0.4082183539867401,
-0.0001259193813893944,
-0.08719537407159805,
0.4725461006164551,
-0.04883526265621185,
0.017359839752316475,
0.23994335532188416,
-0.5597817301750183,
0.18999671936035156,
-0.1298232525587082,
-0.26879793405532837,
-0.03451330587267876,
0.13314706087112427,
-0.28873810172080994,
-0.49378901720046997,
0.05909048765897751,
0.5017418265342712,
0.10039523243904114,
0.2935357093811035,
0.30959373712539673,
0.11477955430746078,
0.18538618087768555,
0.3364694118499756,
-0.03027675673365593,
-0.19203777611255646,
-0.031210914254188538,
0.09930640459060669,
0.3082793951034546,
0.14888320863246918,
-0.2994321584701538,
-0.18843494355678558,
0.12797421216964722,
-0.03732844814658165,
0.21795403957366943,
-0.11675336956977844,
0.24916815757751465,
-0.18422433733940125,
0.8645453453063965,
-0.39628222584724426,
-0.2635146975517273,
0.012899331748485565,
0.05648767203092575,
-0.25868144631385803,
0.2766474485397339,
0.47825300693511963,
-0.22153358161449432,
-0.12976638972759247,
-0.2776588797569275,
0.019759828224778175,
0.2138887643814087,
0.13021396100521088,
-0.011693049222230911,
0.1580522358417511,
0.04960484430193901,
0.1848880648612976,
0.29495447874069214,
-0.29551804065704346,
-0.17558717727661133,
-0.04025101661682129,
0.01610543578863144,
0.12524020671844482,
-0.26320621371269226,
-0.14074546098709106,
-0.03595206141471863,
-0.26112228631973267,
-0.4924013912677765,
-0.16975614428520203,
-0.2658744156360626,
0.05094628036022186,
0.09023601561784744,
0.33405131101608276,
0.12799471616744995,
0.3231334686279297,
-0.36483490467071533,
0.18791413307189941,
0.3833966851234436,
0.05319501459598541,
-0.20442165434360504,
-0.12297049909830093,
-0.0018736140336841345,
0.049426522105932236,
-0.09723889827728271,
0.12633952498435974,
0.06942804157733917,
-0.035846877843141556,
-0.2799515128135681,
-0.017762813717126846,
-0.07867375016212463,
-0.08243711292743683,
0.18601353466510773,
0.47350621223449707,
0.08959085494279861,
0.12982836365699768,
0.1865684986114502,
0.3211597800254822,
-0.10888713598251343,
-0.21034970879554749,
-0.0147550068795681,
0.4439930021762848,
-0.32249000668525696,
-0.14455156028270721,
-0.14223156869411469,
0.41873031854629517,
0.08425408601760864,
0.043241266161203384,
-0.21292562782764435,
-0.2793888449668884,
-0.14285162091255188,
-0.1590198576450348,
-0.10774911195039749,
0.5584313273429871,
0.03455169126391411,
0.0638216957449913,
0.12548203766345978,
0.31803035736083984,
-0.033332958817481995,
0.5309090614318848,
0.07995390146970749,
-0.3306085169315338,
-0.04517258703708649,
0.061219703406095505,
0.06566515564918518,
0.19541727006435394,
-0.2374458909034729,
-0.15480239689350128,
0.6771799921989441,
-0.1964719295501709,
0.32390233874320984,
0.000498209148645401,
-0.3367037773132324,
-0.17486394941806793,
0.22230970859527588,
0.1372254341840744,
-0.30021610856056213,
0.057067371904850006,
-0.27369922399520874,
0.17360636591911316,
0.21207815408706665,
0.36757731437683105,
0.14572972059249878,
0.223606139421463,
-0.26767855882644653,
0.023520678281784058,
0.49229076504707336,
-0.3706646263599396,
-0.2703418433666229,
-0.2180895060300827,
-0.23361535370349884,
-0.0696718767285347,
0.3454565703868866,
0.20597827434539795,
-0.20659704506397247,
0.03134133294224739,
0.09317922592163086,
0.3007144331932068,
-0.05400828272104263,
0.27690163254737854,
-0.1529245227575302,
-0.2661163806915283,
0.09981714934110641,
0.003942759707570076,
0.05965837836265564,
0.011464796960353851,
-0.0726686492562294,
0.11302056908607483,
0.38436681032180786,
-0.3049834072589874,
0.06427845358848572,
0.016691653057932854,
0.3708252012729645,
-0.07323044538497925,
-0.03368787840008736,
-0.39373722672462463,
0.219127357006073,
0.024564258754253387,
0.6270351409912109,
0.04040706902742386,
-0.0873861163854599,
0.06473811715841293,
-0.040133997797966,
0.1407250612974167,
0.023815400898456573,
-0.017231769859790802,
-0.05844292789697647,
0.22054246068000793,
0.19291748106479645,
0.10488834977149963,
-0.12499034404754639,
0.37643590569496155,
-0.19914835691452026,
0.14163020253181458,
-0.6545506715774536,
0.010442396625876427,
-0.05156617611646652,
-0.38589584827423096,
-0.16155171394348145,
0.2239859402179718,
0.17164775729179382,
0.08271642029285431,
-0.08456331491470337,
0.2537316679954529,
0.3479911684989929,
0.24689073860645294,
-0.5649494528770447,
0.4742623567581177,
0.016637584194540977,
-0.20438505709171295,
0.24919457733631134,
0.29986220598220825,
0.33288830518722534,
-0.05684280022978783,
-0.13768047094345093,
0.1405506134033203,
0.3508244752883911,
0.3308106064796448,
0.09347222745418549,
0.023874955251812935,
-0.20483256876468658,
0.23764923214912415,
0.05322364717721939,
-0.16356948018074036,
0.11464336514472961,
-0.0835445374250412,
0.017489030957221985,
0.013695287518203259,
-0.21141433715820312,
0.018918417394161224,
0.6919578909873962,
-0.08672042191028595,
0.2868622839450836,
0.0957966148853302,
-0.2776814103126526,
0.1171659603714943,
0.12921194732189178,
-0.13278938829898834,
0.3675377666950226,
0.016348298639059067,
-0.09438726305961609,
0.14710605144500732,
0.05702462047338486,
-0.146851047873497,
0.3370218575000763,
0.09034918248653412,
-0.08477961272001266,
-0.11361782997846603,
0.35359397530555725,
-0.1100303903222084,
-0.11686170101165771,
0.10291868448257446,
0.22373788058757782,
0.3955214023590088,
-0.38641005754470825,
-0.17372789978981018,
-0.21270516514778137,
-0.11197298765182495,
-0.08516878634691238,
0.043595731258392334,
0.2820891737937927,
-0.1694774329662323,
-0.35380369424819946,
0.6618097424507141,
-0.10389305651187897,
-0.12430732697248459,
-0.17686215043067932,
0.04696561396121979,
0.20115794241428375,
0.10615533590316772,
0.06929422914981842,
0.03277631849050522,
0.09171812236309052,
0.002258583903312683,
0.5172210931777954,
-0.08502233028411865,
-0.048530176281929016,
0.05162540078163147,
-0.21124039590358734,
0.08189830183982849,
-0.18261191248893738,
0.028597677126526833,
-0.008297782391309738,
0.014742953702807426,
0.00539107620716095,
-0.05622844398021698,
0.03602117300033569,
-0.30164915323257446,
0.12718313932418823,
0.12498363852500916,
-0.3057841956615448,
0.24652963876724243,
0.35194045305252075,
-0.014959385618567467,
-0.1572084128856659,
-0.011079452931880951,
0.06189728528261185,
-0.46857601404190063,
0.4761618971824646,
-0.3885158896446228,
0.08565149456262589,
-0.1371166706085205,
0.2193743884563446,
-0.003865356557071209,
0.18206533789634705,
0.16501423716545105,
-0.18470372259616852,
0.1954062581062317,
0.2198208123445511,
-0.07876615226268768,
-0.13177081942558289,
0.07227353751659393,
0.01857348531484604,
0.05055098608136177,
-0.054211221635341644,
-0.4149583578109741,
-0.12870807945728302,
-0.40411463379859924,
-0.04873014613986015,
-0.09084919095039368,
0.22592008113861084,
0.22623957693576813,
-0.025845859199762344,
0.02690882794559002,
-0.028818169608712196,
-0.37931492924690247,
-0.11781700700521469,
0.33154430985450745,
-0.08364643901586533,
0.27752214670181274,
0.6780253648757935,
-0.24596667289733887,
0.028331708163022995,
0.15567909181118011,
0.23870401084423065,
0.28388696908950806,
-0.09636495262384415,
0.0014170259237289429,
-0.22109270095825195,
-0.297716349363327,
0.23013976216316223,
-0.02665799856185913,
-0.5628831386566162,
-0.07956217229366302,
-0.06401176005601883,
-0.24950207769870758,
-0.16867519915103912,
0.07429294288158417,
-0.05261407792568207,
-0.28655916452407837,
0.07728439569473267,
-0.26796379685401917,
-0.16345182061195374,
-0.2215612530708313,
0.25944122672080994,
0.0012584291398525238,
0.16068682074546814,
0.14689379930496216,
-0.17950405180454254,
0.020467326045036316,
-0.36725255846977234,
-0.22569508850574493,
-0.7689896821975708,
-0.4064927101135254,
0.09022241085767746,
-0.06525483727455139,
0.5470420718193054,
-0.36713579297065735,
-0.2204873263835907,
0.22803513705730438,
-0.15570688247680664,
0.9101353287696838,
-0.1868671029806137,
0.0950794517993927,
0.22978810966014862,
0.06529942154884338,
-0.2354770451784134,
0.03510722145438194,
-0.15158478915691376,
-0.24374394118785858,
-0.15875905752182007,
0.3171563744544983,
-0.023406267166137695,
0.2534724473953247,
0.18578538298606873,
0.22244535386562347,
-0.11699171364307404,
-0.0932411327958107,
-0.32030028104782104,
-0.34240996837615967,
-0.332304447889328,
0.13475370407104492,
0.26851293444633484,
0.30600178241729736,
0.21983706951141357,
0.3214840888977051,
0.16097532212734222,
-0.30120790004730225,
0.0564022995531559,
0.019882243126630783,
0.2522156834602356,
-0.14347362518310547,
0.22033515572547913,
-0.270976722240448,
-0.39752084016799927,
-0.06345390528440475,
0.7180447578430176,
0.4996603727340698,
-0.13633690774440765,
0.36828863620758057,
-0.2140519618988037,
0.536080539226532,
0.26610124111175537,
0.12963569164276123,
0.09062933176755905,
-0.30303817987442017,
0.12312036007642746,
-0.29514679312705994,
-0.15481477975845337,
0.5499753952026367,
0.024728186428546906,
0.01668374612927437,
-0.26236119866371155,
0.3411945700645447,
0.1656169593334198,
0.1810092180967331,
0.3193677067756653,
0.11363504827022552,
-0.20173874497413635,
0.11572551727294922,
0.1509726643562317,
1.068152666091919,
-0.11846831440925598,
0.11590255796909332,
0.4886130392551422,
-0.6349439024925232,
0.30955231189727783,
-0.3265332579612732,
0.3454235792160034,
-0.011577378958463669,
0.07737693190574646,
0.11074057221412659,
-0.06026173010468483,
-0.04795239865779877,
-0.25598710775375366,
-0.017399534583091736,
0.029183709993958473,
-0.3612973690032959,
0.1321844458580017,
0.00017534475773572922,
-0.17831361293792725,
-0.0815964862704277,
-0.25777000188827515,
-0.33913740515708923,
0.08856168389320374,
0.2651209831237793,
-0.1864524483680725,
0.19483551383018494,
0.24141186475753784,
0.032690536230802536,
0.005606424063444138,
-0.6992035508155823,
0.12683814764022827,
-0.05486970394849777,
-0.04855682700872421,
-0.3222428262233734,
-0.32168012857437134,
0.08688551187515259,
0.283135324716568,
0.258261501789093,
0.17585380375385284,
0.10958708822727203,
0.05157480388879776,
0.06515079736709595,
0.40755677223205566,
-0.17813019454479218,
0.1696721762418747,
0.30446144938468933,
-0.08915923535823822,
-0.318200945854187,
0.4172740578651428,
-0.15930518507957458,
-0.18006105720996857,
0.006120428442955017,
0.01522398367524147,
0.17457444965839386,
-0.20912791788578033,
-0.37966233491897583,
0.007127322256565094,
0.17776356637477875,
-0.27149802446365356,
0.05845549702644348,
-0.18573100864887238,
-0.46680670976638794,
0.48615530133247375,
-0.4118092954158783,
-0.19232386350631714,
-0.04240184649825096,
0.4681893289089203,
0.1801316738128662,
0.27768048644065857,
0.4618369936943054,
0.41781365871429443,
0.019157525151968002,
-0.10073935985565186,
-0.09177296608686447,
0.35667237639427185,
-0.09329149127006531,
0.13632190227508545,
-0.06926222145557404,
-0.41862255334854126,
-0.055888768285512924,
0.1184900552034378,
-0.25689083337783813,
0.14036861062049866,
-0.2633170187473297,
-0.37421268224716187,
-0.6943236589431763,
0.39438802003860474,
0.3889666497707367,
-0.11684894561767578,
-0.016572294756770134,
0.09805604815483093,
-0.24328461289405823,
-0.3052264451980591,
-0.1485091894865036,
-0.28981319069862366,
-0.18960106372833252,
0.18471626937389374,
0.396152526140213,
-0.04135724902153015,
0.08727793395519257,
0.007512742653489113,
0.05234089493751526,
0.19709336757659912,
-0.11040717363357544,
-0.037095583975315094,
0.060566727072000504,
0.15334197878837585,
0.19019046425819397,
-0.2351902276277542,
-0.12816332280635834,
-0.4764125943183899,
-0.2571786642074585,
-0.20443986356258392,
0.05445319786667824,
0.2989135682582855,
-0.12294375896453857,
-0.024167032912373543,
-0.03664986416697502,
-0.03692345321178436,
-0.09194135665893555,
0.019992655143141747,
-0.16145354509353638,
-0.20030586421489716,
0.23135599493980408,
0.16952267289161682,
0.12843234837055206,
0.16971880197525024,
-0.21462403237819672,
-0.01102861762046814,
-0.11858563125133514,
0.0531022883951664,
0.36954960227012634,
-0.26437824964523315,
-0.03481892868876457,
-0.21543161571025848,
0.2908855080604553,
0.1627579629421234,
-0.04990922287106514,
0.02552897296845913,
-0.025662511587142944,
0.11661870032548904,
-0.14752736687660217,
-0.33160167932510376,
-0.024307377636432648,
-0.12724794447422028,
0.0353347472846508,
0.4053995907306671,
-0.15255485475063324,
0.05847771465778351,
0.049663666635751724,
0.15288254618644714,
0.583808958530426,
-0.16818153858184814,
-0.014274710789322853,
0.4003414213657379,
-0.12916964292526245,
0.015123579651117325,
0.1721336990594864,
0.31715890765190125,
0.1759214699268341,
0.5391281247138977,
-0.12630969285964966,
0.09479853510856628,
0.28367456793785095,
-0.22139164805412292,
-0.14061018824577332,
-0.21150237321853638,
0.20300208032131195,
0.2538769841194153,
-0.013202741742134094,
0.15849348902702332,
-0.15908224880695343,
-0.1451617181301117,
-0.2750612795352936,
-0.1691100001335144,
-0.08976812660694122,
0.2023031860589981,
-0.35643669962882996,
0.18139846622943878,
-0.0037206262350082397,
-0.060190796852111816,
-0.1035114973783493,
0.15033671259880066,
-0.012766961008310318,
0.029338333755731583,
0.6205061674118042,
0.021780148148536682,
-0.09238040447235107,
-0.11034785211086273,
-0.2661232650279999,
0.2221832573413849,
0.33982428908348083,
-0.47083425521850586,
0.37784916162490845,
0.2111889123916626,
-0.08281850814819336,
0.10177880525588989,
0.06214260309934616,
0.6458262205123901,
0.31727129220962524,
-0.08046779036521912,
0.09811699390411377,
-0.08068497478961945,
-0.19313815236091614,
-0.11437396705150604,
0.24399784207344055,
0.23465754091739655,
0.5509623885154724,
-0.11135084927082062,
0.08030106872320175,
-0.05493878573179245,
0.34510329365730286,
0.20744743943214417,
0.2683783173561096,
-0.3912365734577179,
-0.12618893384933472,
-0.3699418306350708,
-0.37606027722358704,
-0.06816481053829193,
-0.10526923090219498,
-0.33892086148262024,
0.003287862055003643,
0.21092353761196136,
-0.24190391600131989,
0.18820488452911377,
0.1850985884666443,
-0.027388570830225945,
-0.16605548560619354,
0.12793084979057312,
0.22307075560092926,
-0.3256862461566925,
-0.24282312393188477,
-0.19927415251731873,
-0.08764047920703888,
0.02025286853313446,
-0.007662639021873474,
-0.3114880621433258,
-0.10330341011285782,
0.086632639169693,
0.11503889411687851,
-0.2541500926017761,
0.20513594150543213,
-0.07828806340694427,
-0.30271896719932556,
0.5084179043769836,
-0.10247418284416199,
-0.22768573462963104,
-0.07782314717769623,
0.017101872712373734,
-0.06761817634105682,
-0.2995525598526001,
0.2650860548019409,
0.009510745294392109,
0.011526532471179962,
-0.030129805207252502,
-0.20923642814159393,
-0.1251731961965561,
-0.10721629858016968,
0.31970077753067017,
0.0011277776211500168,
0.43318310379981995,
-0.11190297454595566,
-0.30657047033309937,
-0.18206886947155,
-0.0032400484196841717,
-0.21386513113975525,
-0.028028912842273712,
-0.16574057936668396,
0.7111661434173584,
-0.2403622269630432,
0.6986082196235657,
-0.42513126134872437,
0.20989997684955597,
-0.047215551137924194,
-0.18244671821594238,
-0.023887403309345245,
0.3285391926765442,
-0.07344292104244232,
0.07578204572200775,
0.19643385708332062,
-0.20284166932106018,
0.15906959772109985,
0.10345630347728729,
-0.4040057063102722,
-0.2700052559375763,
0.43884512782096863,
-0.0417160764336586,
-0.4528888165950775,
-0.030705787241458893,
0.1812049299478531,
-0.25744831562042236,
-0.06852195411920547,
-0.8465390205383301,
-0.012791849672794342,
-0.024515271186828613,
-0.04901846498250961,
-0.021339479833841324,
0.09135948121547699,
0.07397352159023285,
-0.06904314458370209,
-0.014681633561849594,
0.17580793797969818,
-0.15110957622528076,
-0.030566416680812836,
0.23395505547523499,
-0.08581721782684326
] |
https://github.com/huggingface/datasets/issues/4965 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback() | > Hi @hoangtnm - I upgraded to python 3.10 and it fixed the problem for me. I was also running 3.8 on an M1 mac.
it work for me too
| ## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 30 | [Apple M1] MemoryError: Cannot allocate write+execute memory for ffi.callback()
## Describe the bug
I'm trying to run `cast_column("audio", Audio())` on Apple M1 Pro, but it seems that it doesn't work.
## Steps to reproduce the bug
```python
import datasets
dataset = load_dataset("csv", data_files="./train.csv")["train"]
dataset = dataset.map(lambda x: {"audio": str(DATA_DIR / "audio" / x["audio"])})
dataset = dataset.cast_column("audio", Audio())
dataset[0]
```
## Expected results
```
{'audio': {'bytes': None,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav'},
'english_transcription': 'I would like to set up a joint account with my partner',
'intent_class': 11,
'lang_id': 4,
'path': '/root/.cache/huggingface/datasets/downloads/extracted/f14948e0e84be638dd7943ac36518a4cf3324e8b7aa331c5ab11541518e9368c/en-US~JOINT_ACCOUNT/602ba55abb1e6d0fbce92065.wav',
'transcription': 'I would like to set up a joint account with my partner'}
```
## Actual results
````---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 dataset[0]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2165, in Dataset.__getitem__(self, key)
2163 def __getitem__(self, key): # noqa: F811
2164 """Can be used to index columns (by string names) or rows (by integer index or iterable of indices or bools)."""
-> 2165 return self._getitem(
2166 key,
2167 )
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/arrow_dataset.py:2150, in Dataset._getitem(self, key, decoded, **kwargs)
2148 formatter = get_formatter(format_type, features=self.features, decoded=decoded, **format_kwargs)
2149 pa_subtable = query_table(self._data, key, indices=self._indices if self._indices is not None else None)
-> 2150 formatted_output = format_table(
2151 pa_subtable, key, formatter=formatter, format_columns=format_columns, output_all_columns=output_all_columns
2152 )
2153 return formatted_output
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:532, in format_table(table, key, formatter, format_columns, output_all_columns)
530 python_formatter = PythonFormatter(features=None)
531 if format_columns is None:
--> 532 return formatter(pa_table, query_type=query_type)
533 elif query_type == "column":
534 if key in format_columns:
File ~/miniconda3/envs/rodan/lib/python3.8/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 ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:312, in PythonFormatter.format_row(self, pa_table)
310 row = self.python_arrow_extractor().extract_row(pa_table)
311 if self.decoded:
--> 312 row = self.python_features_decoder.decode_row(row)
313 return row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/formatting/formatting.py:221, in PythonFeaturesDecoder.decode_row(self, row)
220 def decode_row(self, row: dict) -> dict:
--> 221 return self.features.decode_example(row) if self.features else row
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1647, in Features.decode_example(self, example, token_per_repo_id)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
-> 1647 return {
1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1648, in <dictcomp>(.0)
1634 def decode_example(self, example: dict, token_per_repo_id: Optional[Dict[str, Union[str, bool, None]]] = None):
1635 """Decode example with custom feature decoding.
1636
1637 Args:
(...)
1644 :obj:`dict[str, Any]`
1645 """
1647 return {
-> 1648 column_name: decode_nested_example(feature, value, token_per_repo_id=token_per_repo_id)
1649 if self._column_requires_decoding[column_name]
1650 else value
1651 for column_name, (feature, value) in zip_dict(
1652 {key: value for key, value in self.items() if key in example}, example
1653 )
1654 }
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/features.py:1260, in decode_nested_example(schema, obj, token_per_repo_id)
1257 # Object with special decoding:
1258 elif isinstance(schema, (Audio, Image)):
1259 # we pass the token to read and decode files from private repositories in streaming mode
-> 1260 return schema.decode_example(obj, token_per_repo_id=token_per_repo_id) if obj is not None else None
1261 return obj
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:156, in Audio.decode_example(self, value, token_per_repo_id)
154 array, sampling_rate = self._decode_non_mp3_file_like(file)
155 else:
--> 156 array, sampling_rate = self._decode_non_mp3_path_like(path, token_per_repo_id=token_per_repo_id)
157 return {"path": path, "array": array, "sampling_rate": sampling_rate}
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/datasets/features/audio.py:257, in Audio._decode_non_mp3_path_like(self, path, format, token_per_repo_id)
254 use_auth_token = None
256 with xopen(path, "rb", use_auth_token=use_auth_token) as f:
--> 257 array, sampling_rate = librosa.load(f, sr=self.sampling_rate, mono=self.mono)
258 return array, sampling_rate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/util/decorators.py:88, in deprecate_positional_args.<locals>._inner_deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
86 extra_args = len(args) - len(all_args)
87 if extra_args <= 0:
---> 88 return f(*args, **kwargs)
90 # extra_args > 0
91 args_msg = [
92 "{}={}".format(name, arg)
93 for name, arg in zip(kwonly_args[:extra_args], args[-extra_args:])
94 ]
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:164, in load(path, sr, mono, offset, duration, dtype, res_type)
161 else:
162 # Otherwise try soundfile first, and then fall back if necessary
163 try:
--> 164 y, sr_native = __soundfile_load(path, offset, duration, dtype)
166 except RuntimeError as exc:
167 # If soundfile failed, try audioread instead
168 if isinstance(path, (str, pathlib.PurePath)):
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/librosa/core/audio.py:195, in __soundfile_load(path, offset, duration, dtype)
192 context = path
193 else:
194 # Otherwise, create the soundfile object
--> 195 context = sf.SoundFile(path)
197 with context as sf_desc:
198 sr_native = sf_desc.samplerate
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:629, in SoundFile.__init__(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
626 self._mode = mode
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)
632 self.seek(0)
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1179, in SoundFile._open(self, file, mode_int, closefd)
1177 file_ptr = _snd.sf_open_fd(file, mode_int, self._info, closefd)
1178 elif _has_virtual_io_attrs(file, mode_int):
-> 1179 file_ptr = _snd.sf_open_virtual(self._init_virtual_io(file),
1180 mode_int, self._info, _ffi.NULL)
1181 else:
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
File ~/miniconda3/envs/rodan/lib/python3.8/site-packages/soundfile.py:1197, in SoundFile._init_virtual_io(self, file)
1194 def _init_virtual_io(self, file):
1195 """Initialize callback functions for sf_open_virtual()."""
1196 @_ffi.callback("sf_vio_get_filelen")
-> 1197 def vio_get_filelen(user_data):
1198 curr = file.tell()
1199 file.seek(0, SEEK_END)
MemoryError: Cannot allocate write+execute memory for ffi.callback(). You might be running on a system that prevents this. For more information, see https://cffi.readthedocs.io/en/latest/using.html#callbacks
```
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
> Hi @hoangtnm - I upgraded to python 3.10 and it fixed the problem for me. I was also running 3.8 on an M1 mac.
it work for me too
| [
-0.17689570784568787,
-0.05003181844949722,
0.008499011397361755,
0.3107319474220276,
0.7080484628677368,
-0.03584003821015358,
0.4516226649284363,
0.12757360935211182,
-0.06962400674819946,
0.08208490163087845,
-0.0465291365981102,
0.2427283078432083,
-0.01392484363168478,
0.06805354356765747,
-0.17358547449111938,
-0.11427980661392212,
0.08982693403959274,
-0.08415928483009338,
-0.4289955794811249,
0.10457766056060791,
-0.40101414918899536,
0.03532765060663223,
-0.3242877721786499,
-0.0020565688610076904,
-0.17290803790092468,
-0.042814627289772034,
0.06569500267505646,
0.01189640536904335,
0.09467888623476028,
0.0556531697511673,
-0.06964877247810364,
-0.4517875015735626,
-0.21304099261760712,
0.4082183539867401,
-0.0001259193813893944,
-0.08719537407159805,
0.4725461006164551,
-0.04883526265621185,
0.017359839752316475,
0.23994335532188416,
-0.5597817301750183,
0.18999671936035156,
-0.1298232525587082,
-0.26879793405532837,
-0.03451330587267876,
0.13314706087112427,
-0.28873810172080994,
-0.49378901720046997,
0.05909048765897751,
0.5017418265342712,
0.10039523243904114,
0.2935357093811035,
0.30959373712539673,
0.11477955430746078,
0.18538618087768555,
0.3364694118499756,
-0.03027675673365593,
-0.19203777611255646,
-0.031210914254188538,
0.09930640459060669,
0.3082793951034546,
0.14888320863246918,
-0.2994321584701538,
-0.18843494355678558,
0.12797421216964722,
-0.03732844814658165,
0.21795403957366943,
-0.11675336956977844,
0.24916815757751465,
-0.18422433733940125,
0.8645453453063965,
-0.39628222584724426,
-0.2635146975517273,
0.012899331748485565,
0.05648767203092575,
-0.25868144631385803,
0.2766474485397339,
0.47825300693511963,
-0.22153358161449432,
-0.12976638972759247,
-0.2776588797569275,
0.019759828224778175,
0.2138887643814087,
0.13021396100521088,
-0.011693049222230911,
0.1580522358417511,
0.04960484430193901,
0.1848880648612976,
0.29495447874069214,
-0.29551804065704346,
-0.17558717727661133,
-0.04025101661682129,
0.01610543578863144,
0.12524020671844482,
-0.26320621371269226,
-0.14074546098709106,
-0.03595206141471863,
-0.26112228631973267,
-0.4924013912677765,
-0.16975614428520203,
-0.2658744156360626,
0.05094628036022186,
0.09023601561784744,
0.33405131101608276,
0.12799471616744995,
0.3231334686279297,
-0.36483490467071533,
0.18791413307189941,
0.3833966851234436,
0.05319501459598541,
-0.20442165434360504,
-0.12297049909830093,
-0.0018736140336841345,
0.049426522105932236,
-0.09723889827728271,
0.12633952498435974,
0.06942804157733917,
-0.035846877843141556,
-0.2799515128135681,
-0.017762813717126846,
-0.07867375016212463,
-0.08243711292743683,
0.18601353466510773,
0.47350621223449707,
0.08959085494279861,
0.12982836365699768,
0.1865684986114502,
0.3211597800254822,
-0.10888713598251343,
-0.21034970879554749,
-0.0147550068795681,
0.4439930021762848,
-0.32249000668525696,
-0.14455156028270721,
-0.14223156869411469,
0.41873031854629517,
0.08425408601760864,
0.043241266161203384,
-0.21292562782764435,
-0.2793888449668884,
-0.14285162091255188,
-0.1590198576450348,
-0.10774911195039749,
0.5584313273429871,
0.03455169126391411,
0.0638216957449913,
0.12548203766345978,
0.31803035736083984,
-0.033332958817481995,
0.5309090614318848,
0.07995390146970749,
-0.3306085169315338,
-0.04517258703708649,
0.061219703406095505,
0.06566515564918518,
0.19541727006435394,
-0.2374458909034729,
-0.15480239689350128,
0.6771799921989441,
-0.1964719295501709,
0.32390233874320984,
0.000498209148645401,
-0.3367037773132324,
-0.17486394941806793,
0.22230970859527588,
0.1372254341840744,
-0.30021610856056213,
0.057067371904850006,
-0.27369922399520874,
0.17360636591911316,
0.21207815408706665,
0.36757731437683105,
0.14572972059249878,
0.223606139421463,
-0.26767855882644653,
0.023520678281784058,
0.49229076504707336,
-0.3706646263599396,
-0.2703418433666229,
-0.2180895060300827,
-0.23361535370349884,
-0.0696718767285347,
0.3454565703868866,
0.20597827434539795,
-0.20659704506397247,
0.03134133294224739,
0.09317922592163086,
0.3007144331932068,
-0.05400828272104263,
0.27690163254737854,
-0.1529245227575302,
-0.2661163806915283,
0.09981714934110641,
0.003942759707570076,
0.05965837836265564,
0.011464796960353851,
-0.0726686492562294,
0.11302056908607483,
0.38436681032180786,
-0.3049834072589874,
0.06427845358848572,
0.016691653057932854,
0.3708252012729645,
-0.07323044538497925,
-0.03368787840008736,
-0.39373722672462463,
0.219127357006073,
0.024564258754253387,
0.6270351409912109,
0.04040706902742386,
-0.0873861163854599,
0.06473811715841293,
-0.040133997797966,
0.1407250612974167,
0.023815400898456573,
-0.017231769859790802,
-0.05844292789697647,
0.22054246068000793,
0.19291748106479645,
0.10488834977149963,
-0.12499034404754639,
0.37643590569496155,
-0.19914835691452026,
0.14163020253181458,
-0.6545506715774536,
0.010442396625876427,
-0.05156617611646652,
-0.38589584827423096,
-0.16155171394348145,
0.2239859402179718,
0.17164775729179382,
0.08271642029285431,
-0.08456331491470337,
0.2537316679954529,
0.3479911684989929,
0.24689073860645294,
-0.5649494528770447,
0.4742623567581177,
0.016637584194540977,
-0.20438505709171295,
0.24919457733631134,
0.29986220598220825,
0.33288830518722534,
-0.05684280022978783,
-0.13768047094345093,
0.1405506134033203,
0.3508244752883911,
0.3308106064796448,
0.09347222745418549,
0.023874955251812935,
-0.20483256876468658,
0.23764923214912415,
0.05322364717721939,
-0.16356948018074036,
0.11464336514472961,
-0.0835445374250412,
0.017489030957221985,
0.013695287518203259,
-0.21141433715820312,
0.018918417394161224,
0.6919578909873962,
-0.08672042191028595,
0.2868622839450836,
0.0957966148853302,
-0.2776814103126526,
0.1171659603714943,
0.12921194732189178,
-0.13278938829898834,
0.3675377666950226,
0.016348298639059067,
-0.09438726305961609,
0.14710605144500732,
0.05702462047338486,
-0.146851047873497,
0.3370218575000763,
0.09034918248653412,
-0.08477961272001266,
-0.11361782997846603,
0.35359397530555725,
-0.1100303903222084,
-0.11686170101165771,
0.10291868448257446,
0.22373788058757782,
0.3955214023590088,
-0.38641005754470825,
-0.17372789978981018,
-0.21270516514778137,
-0.11197298765182495,
-0.08516878634691238,
0.043595731258392334,
0.2820891737937927,
-0.1694774329662323,
-0.35380369424819946,
0.6618097424507141,
-0.10389305651187897,
-0.12430732697248459,
-0.17686215043067932,
0.04696561396121979,
0.20115794241428375,
0.10615533590316772,
0.06929422914981842,
0.03277631849050522,
0.09171812236309052,
0.002258583903312683,
0.5172210931777954,
-0.08502233028411865,
-0.048530176281929016,
0.05162540078163147,
-0.21124039590358734,
0.08189830183982849,
-0.18261191248893738,
0.028597677126526833,
-0.008297782391309738,
0.014742953702807426,
0.00539107620716095,
-0.05622844398021698,
0.03602117300033569,
-0.30164915323257446,
0.12718313932418823,
0.12498363852500916,
-0.3057841956615448,
0.24652963876724243,
0.35194045305252075,
-0.014959385618567467,
-0.1572084128856659,
-0.011079452931880951,
0.06189728528261185,
-0.46857601404190063,
0.4761618971824646,
-0.3885158896446228,
0.08565149456262589,
-0.1371166706085205,
0.2193743884563446,
-0.003865356557071209,
0.18206533789634705,
0.16501423716545105,
-0.18470372259616852,
0.1954062581062317,
0.2198208123445511,
-0.07876615226268768,
-0.13177081942558289,
0.07227353751659393,
0.01857348531484604,
0.05055098608136177,
-0.054211221635341644,
-0.4149583578109741,
-0.12870807945728302,
-0.40411463379859924,
-0.04873014613986015,
-0.09084919095039368,
0.22592008113861084,
0.22623957693576813,
-0.025845859199762344,
0.02690882794559002,
-0.028818169608712196,
-0.37931492924690247,
-0.11781700700521469,
0.33154430985450745,
-0.08364643901586533,
0.27752214670181274,
0.6780253648757935,
-0.24596667289733887,
0.028331708163022995,
0.15567909181118011,
0.23870401084423065,
0.28388696908950806,
-0.09636495262384415,
0.0014170259237289429,
-0.22109270095825195,
-0.297716349363327,
0.23013976216316223,
-0.02665799856185913,
-0.5628831386566162,
-0.07956217229366302,
-0.06401176005601883,
-0.24950207769870758,
-0.16867519915103912,
0.07429294288158417,
-0.05261407792568207,
-0.28655916452407837,
0.07728439569473267,
-0.26796379685401917,
-0.16345182061195374,
-0.2215612530708313,
0.25944122672080994,
0.0012584291398525238,
0.16068682074546814,
0.14689379930496216,
-0.17950405180454254,
0.020467326045036316,
-0.36725255846977234,
-0.22569508850574493,
-0.7689896821975708,
-0.4064927101135254,
0.09022241085767746,
-0.06525483727455139,
0.5470420718193054,
-0.36713579297065735,
-0.2204873263835907,
0.22803513705730438,
-0.15570688247680664,
0.9101353287696838,
-0.1868671029806137,
0.0950794517993927,
0.22978810966014862,
0.06529942154884338,
-0.2354770451784134,
0.03510722145438194,
-0.15158478915691376,
-0.24374394118785858,
-0.15875905752182007,
0.3171563744544983,
-0.023406267166137695,
0.2534724473953247,
0.18578538298606873,
0.22244535386562347,
-0.11699171364307404,
-0.0932411327958107,
-0.32030028104782104,
-0.34240996837615967,
-0.332304447889328,
0.13475370407104492,
0.26851293444633484,
0.30600178241729736,
0.21983706951141357,
0.3214840888977051,
0.16097532212734222,
-0.30120790004730225,
0.0564022995531559,
0.019882243126630783,
0.2522156834602356,
-0.14347362518310547,
0.22033515572547913,
-0.270976722240448,
-0.39752084016799927,
-0.06345390528440475,
0.7180447578430176,
0.4996603727340698,
-0.13633690774440765,
0.36828863620758057,
-0.2140519618988037,
0.536080539226532,
0.26610124111175537,
0.12963569164276123,
0.09062933176755905,
-0.30303817987442017,
0.12312036007642746,
-0.29514679312705994,
-0.15481477975845337,
0.5499753952026367,
0.024728186428546906,
0.01668374612927437,
-0.26236119866371155,
0.3411945700645447,
0.1656169593334198,
0.1810092180967331,
0.3193677067756653,
0.11363504827022552,
-0.20173874497413635,
0.11572551727294922,
0.1509726643562317,
1.068152666091919,
-0.11846831440925598,
0.11590255796909332,
0.4886130392551422,
-0.6349439024925232,
0.30955231189727783,
-0.3265332579612732,
0.3454235792160034,
-0.011577378958463669,
0.07737693190574646,
0.11074057221412659,
-0.06026173010468483,
-0.04795239865779877,
-0.25598710775375366,
-0.017399534583091736,
0.029183709993958473,
-0.3612973690032959,
0.1321844458580017,
0.00017534475773572922,
-0.17831361293792725,
-0.0815964862704277,
-0.25777000188827515,
-0.33913740515708923,
0.08856168389320374,
0.2651209831237793,
-0.1864524483680725,
0.19483551383018494,
0.24141186475753784,
0.032690536230802536,
0.005606424063444138,
-0.6992035508155823,
0.12683814764022827,
-0.05486970394849777,
-0.04855682700872421,
-0.3222428262233734,
-0.32168012857437134,
0.08688551187515259,
0.283135324716568,
0.258261501789093,
0.17585380375385284,
0.10958708822727203,
0.05157480388879776,
0.06515079736709595,
0.40755677223205566,
-0.17813019454479218,
0.1696721762418747,
0.30446144938468933,
-0.08915923535823822,
-0.318200945854187,
0.4172740578651428,
-0.15930518507957458,
-0.18006105720996857,
0.006120428442955017,
0.01522398367524147,
0.17457444965839386,
-0.20912791788578033,
-0.37966233491897583,
0.007127322256565094,
0.17776356637477875,
-0.27149802446365356,
0.05845549702644348,
-0.18573100864887238,
-0.46680670976638794,
0.48615530133247375,
-0.4118092954158783,
-0.19232386350631714,
-0.04240184649825096,
0.4681893289089203,
0.1801316738128662,
0.27768048644065857,
0.4618369936943054,
0.41781365871429443,
0.019157525151968002,
-0.10073935985565186,
-0.09177296608686447,
0.35667237639427185,
-0.09329149127006531,
0.13632190227508545,
-0.06926222145557404,
-0.41862255334854126,
-0.055888768285512924,
0.1184900552034378,
-0.25689083337783813,
0.14036861062049866,
-0.2633170187473297,
-0.37421268224716187,
-0.6943236589431763,
0.39438802003860474,
0.3889666497707367,
-0.11684894561767578,
-0.016572294756770134,
0.09805604815483093,
-0.24328461289405823,
-0.3052264451980591,
-0.1485091894865036,
-0.28981319069862366,
-0.18960106372833252,
0.18471626937389374,
0.396152526140213,
-0.04135724902153015,
0.08727793395519257,
0.007512742653489113,
0.05234089493751526,
0.19709336757659912,
-0.11040717363357544,
-0.037095583975315094,
0.060566727072000504,
0.15334197878837585,
0.19019046425819397,
-0.2351902276277542,
-0.12816332280635834,
-0.4764125943183899,
-0.2571786642074585,
-0.20443986356258392,
0.05445319786667824,
0.2989135682582855,
-0.12294375896453857,
-0.024167032912373543,
-0.03664986416697502,
-0.03692345321178436,
-0.09194135665893555,
0.019992655143141747,
-0.16145354509353638,
-0.20030586421489716,
0.23135599493980408,
0.16952267289161682,
0.12843234837055206,
0.16971880197525024,
-0.21462403237819672,
-0.01102861762046814,
-0.11858563125133514,
0.0531022883951664,
0.36954960227012634,
-0.26437824964523315,
-0.03481892868876457,
-0.21543161571025848,
0.2908855080604553,
0.1627579629421234,
-0.04990922287106514,
0.02552897296845913,
-0.025662511587142944,
0.11661870032548904,
-0.14752736687660217,
-0.33160167932510376,
-0.024307377636432648,
-0.12724794447422028,
0.0353347472846508,
0.4053995907306671,
-0.15255485475063324,
0.05847771465778351,
0.049663666635751724,
0.15288254618644714,
0.583808958530426,
-0.16818153858184814,
-0.014274710789322853,
0.4003414213657379,
-0.12916964292526245,
0.015123579651117325,
0.1721336990594864,
0.31715890765190125,
0.1759214699268341,
0.5391281247138977,
-0.12630969285964966,
0.09479853510856628,
0.28367456793785095,
-0.22139164805412292,
-0.14061018824577332,
-0.21150237321853638,
0.20300208032131195,
0.2538769841194153,
-0.013202741742134094,
0.15849348902702332,
-0.15908224880695343,
-0.1451617181301117,
-0.2750612795352936,
-0.1691100001335144,
-0.08976812660694122,
0.2023031860589981,
-0.35643669962882996,
0.18139846622943878,
-0.0037206262350082397,
-0.060190796852111816,
-0.1035114973783493,
0.15033671259880066,
-0.012766961008310318,
0.029338333755731583,
0.6205061674118042,
0.021780148148536682,
-0.09238040447235107,
-0.11034785211086273,
-0.2661232650279999,
0.2221832573413849,
0.33982428908348083,
-0.47083425521850586,
0.37784916162490845,
0.2111889123916626,
-0.08281850814819336,
0.10177880525588989,
0.06214260309934616,
0.6458262205123901,
0.31727129220962524,
-0.08046779036521912,
0.09811699390411377,
-0.08068497478961945,
-0.19313815236091614,
-0.11437396705150604,
0.24399784207344055,
0.23465754091739655,
0.5509623885154724,
-0.11135084927082062,
0.08030106872320175,
-0.05493878573179245,
0.34510329365730286,
0.20744743943214417,
0.2683783173561096,
-0.3912365734577179,
-0.12618893384933472,
-0.3699418306350708,
-0.37606027722358704,
-0.06816481053829193,
-0.10526923090219498,
-0.33892086148262024,
0.003287862055003643,
0.21092353761196136,
-0.24190391600131989,
0.18820488452911377,
0.1850985884666443,
-0.027388570830225945,
-0.16605548560619354,
0.12793084979057312,
0.22307075560092926,
-0.3256862461566925,
-0.24282312393188477,
-0.19927415251731873,
-0.08764047920703888,
0.02025286853313446,
-0.007662639021873474,
-0.3114880621433258,
-0.10330341011285782,
0.086632639169693,
0.11503889411687851,
-0.2541500926017761,
0.20513594150543213,
-0.07828806340694427,
-0.30271896719932556,
0.5084179043769836,
-0.10247418284416199,
-0.22768573462963104,
-0.07782314717769623,
0.017101872712373734,
-0.06761817634105682,
-0.2995525598526001,
0.2650860548019409,
0.009510745294392109,
0.011526532471179962,
-0.030129805207252502,
-0.20923642814159393,
-0.1251731961965561,
-0.10721629858016968,
0.31970077753067017,
0.0011277776211500168,
0.43318310379981995,
-0.11190297454595566,
-0.30657047033309937,
-0.18206886947155,
-0.0032400484196841717,
-0.21386513113975525,
-0.028028912842273712,
-0.16574057936668396,
0.7111661434173584,
-0.2403622269630432,
0.6986082196235657,
-0.42513126134872437,
0.20989997684955597,
-0.047215551137924194,
-0.18244671821594238,
-0.023887403309345245,
0.3285391926765442,
-0.07344292104244232,
0.07578204572200775,
0.19643385708332062,
-0.20284166932106018,
0.15906959772109985,
0.10345630347728729,
-0.4040057063102722,
-0.2700052559375763,
0.43884512782096863,
-0.0417160764336586,
-0.4528888165950775,
-0.030705787241458893,
0.1812049299478531,
-0.25744831562042236,
-0.06852195411920547,
-0.8465390205383301,
-0.012791849672794342,
-0.024515271186828613,
-0.04901846498250961,
-0.021339479833841324,
0.09135948121547699,
0.07397352159023285,
-0.06904314458370209,
-0.014681633561849594,
0.17580793797969818,
-0.15110957622528076,
-0.030566416680812836,
0.23395505547523499,
-0.08581721782684326
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | note i have tried the same code with `datasets` version 2.4.0, the outcome is the very same as described above. | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 20 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
note i have tried the same code with `datasets` version 2.4.0, the outcome is the very same as described above. | [
0.12206099927425385,
0.014006927609443665,
-0.04854970425367355,
0.5855892896652222,
0.4824303388595581,
0.1741618812084198,
0.3983026146888733,
0.12848874926567078,
0.21941545605659485,
0.02684297412633896,
-0.09757266938686371,
0.4009018540382385,
-0.20765922963619232,
0.0020350944250822067,
-0.04448521137237549,
-0.15421882271766663,
0.2995128333568573,
-0.02069149911403656,
-0.26243892312049866,
0.12202958762645721,
-0.41977936029434204,
-0.15550120174884796,
-0.2593691349029541,
0.0955500528216362,
-0.16305211186408997,
-0.1712866872549057,
0.032875657081604004,
-0.13642087578773499,
-0.07455980777740479,
-0.12754426896572113,
0.2106562852859497,
-0.221186101436615,
0.07535465806722641,
0.19372069835662842,
-0.00011158078268636018,
-0.19119510054588318,
0.18494318425655365,
0.054769061505794525,
-0.057485923171043396,
0.6174872517585754,
0.039649590849876404,
-0.4379686117172241,
-0.07191719114780426,
-0.4403602182865143,
0.24162530899047852,
-0.4253416955471039,
-0.2733994424343109,
-0.5923555493354797,
-0.07191120088100433,
0.08550194650888443,
0.22910943627357483,
0.08506782352924347,
0.1579723358154297,
0.2555093467235565,
0.2648811340332031,
0.08263687044382095,
-0.23038776218891144,
-0.24544405937194824,
-0.014278098940849304,
-0.3172161877155304,
0.19000643491744995,
0.28314661979675293,
-0.2183346152305603,
0.003888973966240883,
0.27378854155540466,
0.1833026260137558,
-0.24881374835968018,
0.06988347321748734,
0.011740118265151978,
-0.006713777780532837,
0.4264397621154785,
-0.5361000299453735,
-0.08002427965402603,
-0.21471834182739258,
-0.10092603415250778,
-0.021730197593569756,
0.11994311213493347,
0.27430662512779236,
-0.08152313530445099,
0.07615615427494049,
-0.3759109675884247,
0.08429526537656784,
-0.13509386777877808,
0.2501137852668762,
-0.0915478765964508,
-0.48453280329704285,
0.05090290307998657,
0.1382085680961609,
0.11557915061712265,
-0.45122653245925903,
0.2565056383609772,
-0.2800505757331848,
0.16383373737335205,
0.08555368334054947,
-0.33355042338371277,
-0.11527815461158752,
0.002388887107372284,
-0.337954580783844,
0.03282588720321655,
-0.3314283490180969,
0.006136978976428509,
-0.025907382369041443,
0.12488177418708801,
0.1334097683429718,
0.04274065047502518,
0.28517091274261475,
-0.44220155477523804,
0.2061661034822464,
0.23345129191875458,
-0.1345471888780594,
0.2435283064842224,
-0.15549200773239136,
0.02100227400660515,
0.33519232273101807,
0.3448498845100403,
-0.4349759519100189,
0.18474797904491425,
0.028854530304670334,
-0.3055993914604187,
0.2239563763141632,
-0.31425023078918457,
0.24016892910003662,
0.0960172787308693,
0.2073272466659546,
-0.000244359252974391,
0.30250880122184753,
-0.01416165754199028,
0.081764355301857,
-0.07201028615236282,
-0.13501964509487152,
-0.25495487451553345,
0.26884540915489197,
-0.15094169974327087,
0.04734599590301514,
0.15142865478992462,
0.7140989899635315,
-0.14414125680923462,
0.22478477656841278,
-0.04529501497745514,
-0.19184307754039764,
0.10337762534618378,
-0.337989866733551,
0.17858903110027313,
0.2273629605770111,
-0.17660696804523468,
0.04189243167638779,
0.0013216547667980194,
0.25508928298950195,
-0.1426410675048828,
0.2539711594581604,
-0.10719796270132065,
-0.2941592037677765,
-0.22743095457553864,
0.11028385907411575,
-0.05031285434961319,
0.13382482528686523,
-0.3369148075580597,
0.043669138103723526,
0.4694627821445465,
0.06807596981525421,
0.05681871622800827,
-0.12464885413646698,
-0.1509295254945755,
-0.41626834869384766,
0.043107032775878906,
0.3180936276912689,
-0.44770413637161255,
0.29039207100868225,
0.06585773825645447,
0.15750057995319366,
0.21887469291687012,
0.2575719654560089,
-0.09899874031543732,
0.023485489189624786,
-0.05899685621261597,
-0.25622105598449707,
0.001925155520439148,
-0.19522933661937714,
-0.3773270845413208,
-0.05510563775897026,
0.3108968734741211,
0.3264997899532318,
0.255432665348053,
0.39080941677093506,
-0.04550205171108246,
0.1546851545572281,
-0.05940532684326172,
0.24768958985805511,
0.09798946231603622,
0.350163996219635,
-0.2073458582162857,
-0.6221071481704712,
0.0992400199174881,
0.07450127601623535,
-0.05282655730843544,
-0.17240425944328308,
0.11973704397678375,
0.15256577730178833,
0.15908117592334747,
-0.383266806602478,
-0.030865566805005074,
0.07157683372497559,
0.2437783032655716,
0.0646476149559021,
-0.017573904246091843,
-0.37187159061431885,
-0.3678821623325348,
0.24161607027053833,
0.32851773500442505,
-0.39335137605667114,
0.057258643209934235,
-0.23249034583568573,
0.04318905249238014,
0.18227066099643707,
0.17098495364189148,
0.08710578083992004,
0.09600774943828583,
-0.07277041673660278,
0.0435493178665638,
-0.04666424170136452,
0.02596559002995491,
0.40393561124801636,
-0.2618665397167206,
-0.059785909950733185,
-0.40210098028182983,
0.29316142201423645,
0.006650971248745918,
-0.08293087780475616,
-0.09159292280673981,
0.2358350157737732,
0.11544251441955566,
0.1417512744665146,
0.1559218466281891,
0.14442846179008484,
0.3827897906303406,
-0.12016706168651581,
-0.3616149425506592,
0.5079610347747803,
0.09784534573554993,
0.12715588510036469,
0.3919103741645813,
-0.1789453625679016,
0.2866072356700897,
-0.048603661358356476,
-0.05041252076625824,
0.1722320318222046,
0.1256631463766098,
0.2046642303466797,
-0.03350704163312912,
0.16211801767349243,
0.04768441617488861,
0.11014524102210999,
0.4171234667301178,
-0.31086239218711853,
-0.09620709717273712,
-0.09690205752849579,
-0.016405513510107994,
0.2502354085445404,
-0.20776133239269257,
0.33902135491371155,
0.32679203152656555,
-0.029161997139453888,
0.17173311114311218,
0.18494707345962524,
0.07319147884845734,
-0.2033030390739441,
-0.06828783452510834,
0.09499326348304749,
0.3969099521636963,
0.1633511632680893,
-0.18024252355098724,
0.0003616027534008026,
0.03464338183403015,
-0.1599903106689453,
0.22160935401916504,
0.20063534379005432,
0.14510995149612427,
-0.28743255138397217,
0.36125531792640686,
-0.18168911337852478,
-0.0875408872961998,
0.05758364126086235,
0.33793941140174866,
0.2861490249633789,
-0.4368188679218292,
0.1373681128025055,
-0.33106735348701477,
-0.14826729893684387,
0.0328889898955822,
0.05210172012448311,
0.11107529699802399,
-0.16630160808563232,
-0.370879590511322,
0.18929146230220795,
0.08521394431591034,
-0.15023764967918396,
-0.15729586780071259,
0.3513645529747009,
0.1152220219373703,
-0.024235250428318977,
0.022867605090141296,
-0.066384457051754,
-0.15241697430610657,
0.034656766802072525,
0.3392520844936371,
-0.17840011417865753,
0.2680361866950989,
0.31166350841522217,
-0.0496799573302269,
0.06494706124067307,
0.007006742060184479,
-0.17660126090049744,
0.053665824234485626,
0.3323386311531067,
0.03698698431253433,
-0.07882009446620941,
-0.21910607814788818,
-0.011272922158241272,
0.02509220875799656,
0.19915644824504852,
-0.15182603895664215,
0.2383246123790741,
0.2131454050540924,
-0.24496929347515106,
0.16182321310043335,
-0.23013174533843994,
-0.22120143473148346,
-0.13238872587680817,
0.07094202190637589,
-0.3294017016887665,
0.34121954441070557,
-0.15548209846019745,
0.002007449045777321,
0.19739463925361633,
0.21572758257389069,
0.07459155470132828,
-0.325168639421463,
0.08681684732437134,
0.2411493957042694,
-0.08586744219064713,
-0.19257238507270813,
-0.20945784449577332,
0.1820288449525833,
-0.1783469319343567,
0.18354307115077972,
-0.5329747796058655,
-0.26849350333213806,
-0.5912885665893555,
-0.13345690071582794,
-0.04767613112926483,
0.010073794052004814,
0.012114651501178741,
0.04726102203130722,
0.004419071599841118,
-0.03981028124690056,
-0.19514699280261993,
0.03218510001897812,
0.16831323504447937,
-0.00019221007823944092,
0.20820051431655884,
0.4983583986759186,
0.20113703608512878,
0.03990961238741875,
0.3578203320503235,
0.1443762183189392,
0.2923697233200073,
0.018684878945350647,
0.25411665439605713,
-0.15017083287239075,
-0.35472843050956726,
0.054123375564813614,
-0.14291119575500488,
-0.23270413279533386,
-0.14612077176570892,
0.09247741103172302,
-0.29062390327453613,
0.07439286261796951,
0.05898456647992134,
0.208501398563385,
-0.043314121663570404,
0.08399898558855057,
-0.03649178147315979,
0.09605144709348679,
0.12193268537521362,
0.14961296319961548,
-0.2800430953502655,
-0.3442119061946869,
-0.05023825541138649,
-0.3284440040588379,
-0.10158012062311172,
-0.020287659019231796,
-0.5372797250747681,
-0.2333257794380188,
-0.2033109962940216,
0.05738159269094467,
0.05060118809342384,
0.5508302450180054,
-0.03069029562175274,
-0.024377983063459396,
0.2920645475387573,
0.08491749316453934,
0.5817294120788574,
0.05683503299951553,
-0.2423599809408188,
0.09754237532615662,
-0.19202789664268494,
-0.4925083816051483,
-0.13150376081466675,
-0.19874346256256104,
-0.2302667647600174,
0.08467262983322144,
0.27712321281433105,
-0.07048352062702179,
-0.08017750829458237,
0.24173203110694885,
0.1406371146440506,
-0.28847718238830566,
-0.2434108555316925,
-0.12023437023162842,
-0.42544296383857727,
0.07062090188264847,
-0.050359807908535004,
0.09812841564416885,
0.3820751905441284,
0.27108123898506165,
-0.14720569550991058,
-0.19052620232105255,
-0.09956177324056625,
0.2818561792373657,
0.01790992170572281,
0.3489503264427185,
-0.0716191902756691,
0.07431025803089142,
-0.023177199065685272,
-0.1847219616174698,
0.2123059779405594,
0.22910284996032715,
0.010905355215072632,
0.27601203322410583,
-0.09748397767543793,
-0.21463771164417267,
0.43040931224823,
0.2431541085243225,
-0.250861793756485,
-0.031142741441726685,
-0.6634836196899414,
0.017107974737882614,
-0.5165292024612427,
-0.2058955281972885,
0.37878862023353577,
-0.09854288399219513,
0.04587067291140556,
-0.5896674394607544,
0.4126870334148407,
0.29179707169532776,
-0.11604287475347519,
0.3301422595977783,
0.08455242216587067,
-0.2243119776248932,
0.41384726762771606,
0.5073230862617493,
0.7938340306282043,
-0.41048526763916016,
0.311636745929718,
0.4991981089115143,
-0.40802133083343506,
0.27469658851623535,
-0.2259298712015152,
0.19974146783351898,
-0.28889936208724976,
-0.11816920340061188,
0.025823267176747322,
-0.16947925090789795,
0.21431022882461548,
-0.09391047060489655,
0.10470862686634064,
0.161465585231781,
-0.30727052688598633,
0.24431829154491425,
0.0095098577439785,
-0.06950218975543976,
0.07378394901752472,
-0.23775771260261536,
-0.16269497573375702,
0.1640060842037201,
-0.06854677200317383,
-0.4635954201221466,
0.029871299862861633,
0.09763062745332718,
-0.10247302055358887,
0.007460068911314011,
-0.4210652709007263,
-0.07471830397844315,
0.1416565477848053,
0.5981435179710388,
-0.0967627465724945,
-0.0348130501806736,
0.06490688025951385,
0.29912054538726807,
-0.028097741305828094,
0.10691128671169281,
0.12987016141414642,
-0.04615739360451698,
0.09492681920528412,
0.16100715100765228,
0.42747557163238525,
-0.04937770962715149,
0.11057847738265991,
0.10954167693853378,
-0.17935988306999207,
0.07909895479679108,
0.14512839913368225,
-0.11013608425855637,
-0.48621657490730286,
0.14410904049873352,
0.26341453194618225,
-0.3098417818546295,
-0.28914323449134827,
-0.25490602850914,
0.08641339838504791,
-0.09075608849525452,
0.12766502797603607,
-0.13063852488994598,
0.011276748031377792,
0.8434520959854126,
-0.23289309442043304,
-0.29269272089004517,
-0.03906242921948433,
0.21816888451576233,
0.28587377071380615,
0.2536972761154175,
0.26272597908973694,
0.17730094492435455,
-0.3905022144317627,
-0.10633032023906708,
0.3319873809814453,
0.21389567852020264,
0.1627214252948761,
0.21428008377552032,
-0.2060452103614807,
-0.05536722391843796,
-0.20382118225097656,
-0.2425900399684906,
-0.12518557906150818,
-0.07602681964635849,
-0.011750884354114532,
-0.3123134970664978,
-0.2170592099428177,
0.16571089625358582,
0.35896942019462585,
0.26682212948799133,
0.04967663437128067,
-0.36874914169311523,
-0.3976607620716095,
0.22185087203979492,
-0.24197165668010712,
0.0624471977353096,
-0.25027287006378174,
0.0011928342282772064,
-0.056433431804180145,
-0.15126478672027588,
0.07301736623048782,
-0.3039775788784027,
0.04345928132534027,
-0.09123161435127258,
-0.02751278132200241,
-0.15822991728782654,
-0.0893269032239914,
0.09676657617092133,
-0.10707772523164749,
-0.4246242940425873,
-0.1451209932565689,
-0.6473928689956665,
-0.2868802547454834,
-0.30873697996139526,
0.06216421350836754,
0.5297362208366394,
0.058962494134902954,
0.03795047849416733,
-0.19778119027614594,
-0.3319666087627411,
0.28671795129776,
0.35860300064086914,
-0.18946689367294312,
-0.07085272669792175,
0.33825448155403137,
0.22823232412338257,
0.21320021152496338,
-0.15119963884353638,
-0.18111668527126312,
0.22993606328964233,
-0.260689914226532,
-0.19764819741249084,
0.3899402916431427,
-0.23173163831233978,
-0.1862931102514267,
0.33433592319488525,
0.057255819439888,
0.25111091136932373,
-0.32278603315353394,
-0.12643949687480927,
0.0675632506608963,
0.13759289681911469,
-0.06679733097553253,
-0.25457143783569336,
0.12303608655929565,
0.16610118746757507,
-0.21964509785175323,
0.586889922618866,
0.19960102438926697,
-0.1751248836517334,
-0.40752917528152466,
-0.0849824845790863,
0.49991756677627563,
-0.03831671178340912,
-0.004555883817374706,
0.2539086639881134,
0.11169758439064026,
-0.2920967936515808,
0.2924758791923523,
0.30355963110923767,
0.3614824116230011,
0.8392932415008545,
0.15126582980155945,
-0.03725734353065491,
0.33969560265541077,
0.1391766518354416,
-0.2958250939846039,
-0.10580091178417206,
0.07106963545084,
0.5231500864028931,
-0.23830726742744446,
0.08642030507326126,
-0.08088956773281097,
-0.010454393923282623,
0.1390182226896286,
-0.2257581651210785,
-0.41640928387641907,
0.13577991724014282,
-0.1938474476337433,
-0.0420394241809845,
0.35171717405319214,
-0.10474760830402374,
0.060318171977996826,
0.14257213473320007,
-0.1308666169643402,
-0.4192943572998047,
0.48307251930236816,
-0.0069580525159835815,
-0.057999297976493835,
-0.21287629008293152,
0.47282105684280396,
0.3272082805633545,
0.3629699647426605,
-0.3312993347644806,
-0.0999455526471138,
0.19948917627334595,
0.06908375024795532,
-0.11966580152511597,
0.0872838944196701,
0.2873489260673523,
0.228257417678833,
0.16246598958969116,
0.08080536127090454,
-0.006265128031373024,
-0.06085842102766037,
-0.02519368939101696,
0.3272235691547394,
-0.12700766324996948,
0.46512553095817566,
0.14204101264476776,
-0.008778081275522709,
-0.009026049636304379,
-0.3582434058189392,
0.28062593936920166,
0.21817126870155334,
-0.40348371863365173,
0.522248387336731,
-0.2443666160106659,
-0.13418495655059814,
0.08653932809829712,
0.028622455894947052,
-0.23862847685813904,
-0.3987097144126892,
0.46034514904022217,
-0.1857747584581375,
0.28753289580345154,
0.0751386284828186,
0.06349711120128632,
-0.160940021276474,
0.45134612917900085,
0.010950084775686264,
-0.15340417623519897,
-0.1452726572751999,
-0.030835501849651337,
-0.2192937433719635,
-0.178683340549469,
-0.47082167863845825,
-0.009112538769841194,
0.2176651805639267,
0.184336856007576,
-0.048769451677799225,
-0.2118874490261078,
-0.2709715962409973,
0.1826537400484085,
-0.3031294345855713,
0.25248074531555176,
-0.37892186641693115,
-0.022352058440446854,
0.09171169996261597,
-0.023805150762200356,
-0.09303650259971619,
-0.2996339201927185,
0.5499609708786011,
-0.005047490354627371,
0.0035064853727817535,
-0.10118868201971054,
0.31161874532699585,
-0.15498818457126617,
0.2182275950908661,
0.23389840126037598,
0.15530595183372498,
0.1525728702545166,
0.2327772080898285,
-0.03770978003740311,
-0.15401773154735565,
-0.033132925629615784,
0.04653197154402733,
0.05044183507561684,
-0.08190220594406128,
0.10706301033496857,
-0.3515130579471588,
0.038620833307504654,
0.10877072066068649,
0.4200526177883148,
-0.01671815849840641,
-0.011238323524594307,
-0.004106558859348297,
0.016980333253741264,
-0.16065837442874908,
0.225015327334404,
0.07187628746032715,
0.002647705376148224,
-0.11135925352573395,
0.38293030858039856,
-0.03517674282193184,
-0.27605965733528137,
0.37154948711395264,
-0.04094947874546051,
-0.3875140845775604,
0.2082301378250122,
0.22330144047737122,
0.14877882599830627,
-0.18033316731452942,
-0.3702966570854187,
-0.15623179078102112,
0.2979033291339874,
-0.18862342834472656,
-0.014967883005738258,
0.38315120339393616,
-0.19221250712871552,
-0.027449456974864006,
-0.11224265396595001,
0.30155253410339355,
-0.3310069143772125,
-0.1094169020652771,
0.2340141236782074,
-0.01704377867281437
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | Seems related to issues #4623 and #4802 so it would appear this issue has been around for a few months. | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 20 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
Seems related to issues #4623 and #4802 so it would appear this issue has been around for a few months. | [
0.10402201116085052,
0.002209477126598358,
-0.018031813204288483,
0.5737425088882446,
0.5291051864624023,
0.14689108729362488,
0.4207685589790344,
0.18014934659004211,
0.16058550775051117,
0.007637776434421539,
-0.08344811201095581,
0.3398456573486328,
-0.1886741667985916,
-0.04891818016767502,
-0.04042263329029083,
-0.15062937140464783,
0.2636609673500061,
-0.036925941705703735,
-0.31461504101753235,
0.13804174959659576,
-0.48571521043777466,
-0.13928121328353882,
-0.2674972414970398,
0.1101117879152298,
-0.19825567305088043,
-0.1586834192276001,
0.027836879715323448,
-0.13064083456993103,
-0.0680384412407875,
-0.1674710214138031,
0.24154387414455414,
-0.21309298276901245,
0.0652746856212616,
0.16698001325130463,
-0.0001123720285249874,
-0.2301095724105835,
0.20279720425605774,
0.0726672112941742,
-0.05527219548821449,
0.6117110848426819,
-0.03592097759246826,
-0.43378642201423645,
-0.063829205930233,
-0.3720332682132721,
0.2812954783439636,
-0.37514522671699524,
-0.2813747525215149,
-0.5569211840629578,
-0.0607462078332901,
0.10516383498907089,
0.22573834657669067,
0.09301657974720001,
0.18650153279304504,
0.20801907777786255,
0.2594166100025177,
0.0779581367969513,
-0.24322375655174255,
-0.24979063868522644,
0.00994177907705307,
-0.3628479838371277,
0.1583201289176941,
0.2579713761806488,
-0.19885826110839844,
0.05364594981074333,
0.24452543258666992,
0.15527749061584473,
-0.14494040608406067,
0.030461221933364868,
0.04081340506672859,
0.029094504192471504,
0.4024255573749542,
-0.4723478853702545,
-0.08214320242404938,
-0.22239598631858826,
-0.12465500086545944,
-0.06138194352388382,
0.15357230603694916,
0.2618928849697113,
-0.07372589409351349,
0.04401621222496033,
-0.3075229823589325,
0.08794435858726501,
-0.12833689153194427,
0.22358298301696777,
-0.16225023567676544,
-0.44626060128211975,
0.07282304018735886,
0.14741814136505127,
0.15531837940216064,
-0.5138666033744812,
0.2949628531932831,
-0.2513681948184967,
0.1168213039636612,
0.1279509961605072,
-0.3370814621448517,
-0.1182253360748291,
0.035245124250650406,
-0.39361628890037537,
0.038831740617752075,
-0.3833133578300476,
0.02528095245361328,
0.0067181941121816635,
0.1175672858953476,
0.14308956265449524,
0.10150283575057983,
0.3526550233364105,
-0.4406178593635559,
0.22624146938323975,
0.2568979263305664,
-0.12419677525758743,
0.2236253321170807,
-0.1094517782330513,
0.0490996390581131,
0.3021527826786041,
0.2714679539203644,
-0.42443907260894775,
0.1573549062013626,
-0.01445634663105011,
-0.32555288076400757,
0.2919413447380066,
-0.32024842500686646,
0.23471127450466156,
0.0771406888961792,
0.1722186952829361,
0.06384477019309998,
0.3339698910713196,
-0.009760808199644089,
0.06211470067501068,
-0.06161098927259445,
-0.1373094916343689,
-0.23341070115566254,
0.2314343899488449,
-0.15995045006275177,
0.0700293481349945,
0.14453355967998505,
0.6733744144439697,
-0.18361355364322662,
0.19938728213310242,
0.010975245386362076,
-0.22328828275203705,
0.06473999470472336,
-0.3616860508918762,
0.19409102201461792,
0.2555217742919922,
-0.19397594034671783,
0.07345785945653915,
0.008185729384422302,
0.2462729662656784,
-0.16528013348579407,
0.2737860083580017,
-0.09466434270143509,
-0.321149617433548,
-0.2311648279428482,
0.11020894348621368,
-0.05172594636678696,
0.11562012135982513,
-0.2970224618911743,
0.024555234238505363,
0.46830764412879944,
0.06995506584644318,
0.07601958513259888,
-0.1672840118408203,
-0.14426323771476746,
-0.41593465209007263,
0.03795082867145538,
0.3704090714454651,
-0.45582443475723267,
0.30037322640419006,
-0.014608409255743027,
0.17201179265975952,
0.16113504767417908,
0.2449558526277542,
-0.09422454982995987,
-0.01158517599105835,
-0.03297247737646103,
-0.27088743448257446,
-0.0465073361992836,
-0.1752292960882187,
-0.3819315731525421,
-0.035116903483867645,
0.3095095157623291,
0.34139227867126465,
0.21090999245643616,
0.358928382396698,
-0.042722661048173904,
0.1125323697924614,
-0.028979361057281494,
0.26257455348968506,
0.08170802891254425,
0.36161869764328003,
-0.21977053582668304,
-0.6436681747436523,
0.019018756225705147,
0.06912343204021454,
0.011302925646305084,
-0.20067843794822693,
0.12158587574958801,
0.11082491278648376,
0.12284331023693085,
-0.3996170461177826,
-0.007611710578203201,
0.059472352266311646,
0.2669616937637329,
0.07652679085731506,
0.011661287397146225,
-0.31335827708244324,
-0.3979759216308594,
0.23653456568717957,
0.24750351905822754,
-0.38170579075813293,
0.08853916823863983,
-0.19708989560604095,
0.06538456678390503,
0.1621154397726059,
0.17341022193431854,
0.04809313267469406,
0.07613544166088104,
-0.10439963638782501,
0.014722183346748352,
-0.017740465700626373,
0.02726035937666893,
0.3821955621242523,
-0.19813282787799835,
-0.04625530540943146,
-0.37549343705177307,
0.28680238127708435,
0.0074577778577804565,
-0.10410775989294052,
-0.06717236340045929,
0.2617828845977783,
0.1422349512577057,
0.16927120089530945,
0.1250184327363968,
0.13799092173576355,
0.35049882531166077,
-0.10847356915473938,
-0.3442187011241913,
0.5326961278915405,
0.11221233010292053,
0.13711810111999512,
0.40063387155532837,
-0.1487729251384735,
0.27353614568710327,
-0.058980751782655716,
-0.013721868395805359,
0.1895098090171814,
0.14785026013851166,
0.21453315019607544,
-0.030571045354008675,
0.18657633662223816,
0.08023364096879959,
0.09814733266830444,
0.4289451241493225,
-0.3118821978569031,
-0.047788169234991074,
-0.07840801775455475,
-0.0191821176558733,
0.26536130905151367,
-0.1949697583913803,
0.33767077326774597,
0.2820408046245575,
-0.01455834973603487,
0.16324862837791443,
0.22353968024253845,
0.07888475060462952,
-0.19729992747306824,
-0.06749431788921356,
0.09341125190258026,
0.4088357090950012,
0.10691693425178528,
-0.2057493031024933,
-0.025550255551934242,
0.00007179658859968185,
-0.1814424693584442,
0.2244420349597931,
0.2092716097831726,
0.11831638962030411,
-0.29212817549705505,
0.3647620677947998,
-0.17943072319030762,
-0.10528327524662018,
0.07736717164516449,
0.37543681263923645,
0.29983025789260864,
-0.4417572617530823,
0.1257466971874237,
-0.3178521990776062,
-0.19583439826965332,
0.003994764760136604,
0.09404736012220383,
0.0913178026676178,
-0.2032623142004013,
-0.38327276706695557,
0.19835245609283447,
0.0322207547724247,
-0.1345398873090744,
-0.11919344961643219,
0.4237534701824188,
0.0970197319984436,
0.10960052162408829,
0.01649627834558487,
-0.12290763854980469,
-0.13578060269355774,
0.02262026071548462,
0.3403376340866089,
-0.2521339952945709,
0.24403536319732666,
0.37763115763664246,
-0.01482490822672844,
0.0542399063706398,
-0.0609845370054245,
-0.1718706339597702,
0.05643251910805702,
0.3071003258228302,
0.009835503995418549,
-0.08063694834709167,
-0.2067943960428238,
-0.02699115127325058,
0.04218051955103874,
0.19854576885700226,
-0.10108032077550888,
0.23014385998249054,
0.22723281383514404,
-0.24572120606899261,
0.1423678994178772,
-0.20844319462776184,
-0.1853787750005722,
-0.14904405176639557,
0.09808763116598129,
-0.3649062514305115,
0.34685707092285156,
-0.16983947157859802,
-0.002293109893798828,
0.19160757958889008,
0.15315403044223785,
-0.019786939024925232,
-0.3345596194267273,
0.10952353477478027,
0.21604883670806885,
-0.12039359658956528,
-0.18585242331027985,
-0.23437848687171936,
0.18599937856197357,
-0.13433243334293365,
0.18474063277244568,
-0.5063289999961853,
-0.20471136271953583,
-0.6490449905395508,
-0.14518828690052032,
-0.06005792319774628,
0.006657209247350693,
0.006187856197357178,
0.0668674036860466,
0.006682949140667915,
-0.059048157185316086,
-0.14581000804901123,
0.027482710778713226,
0.20025372505187988,
0.0012442246079444885,
0.17106449604034424,
0.5174524188041687,
0.20273233950138092,
0.04202529042959213,
0.32935380935668945,
0.19490966200828552,
0.332902193069458,
0.058639369904994965,
0.23532791435718536,
-0.1700296700000763,
-0.3380761742591858,
0.037384033203125,
-0.1453516185283661,
-0.24779567122459412,
-0.14902250468730927,
0.07855354249477386,
-0.2983032166957855,
0.0605924054980278,
0.08452288806438446,
0.22977682948112488,
-0.08518008142709732,
0.13130994141101837,
-0.03943973779678345,
0.14093276858329773,
0.11714859306812286,
0.13156768679618835,
-0.26616302132606506,
-0.3711940050125122,
-0.08107586205005646,
-0.3640850782394409,
-0.06004849821329117,
-0.0464109405875206,
-0.3936696946620941,
-0.25234535336494446,
-0.20342320203781128,
0.09957632422447205,
0.08982374519109726,
0.5924444794654846,
-0.07499312609434128,
-0.04717811197042465,
0.3134448230266571,
0.09058838337659836,
0.5127843022346497,
0.04297211021184921,
-0.20462466776371002,
0.099776491522789,
-0.2133943885564804,
-0.4887845814228058,
-0.12750723958015442,
-0.19566212594509125,
-0.25808602571487427,
0.10336913168430328,
0.2384825497865677,
-0.07376207411289215,
-0.058070436120033264,
0.24438712000846863,
0.07836709171533585,
-0.3228612244129181,
-0.2194606512784958,
-0.12159498035907745,
-0.43716850876808167,
0.07330582290887833,
-0.04958575218915939,
0.1123412474989891,
0.35089316964149475,
0.23458699882030487,
-0.12339340150356293,
-0.16989672183990479,
-0.13763964176177979,
0.2643643617630005,
-0.01681097224354744,
0.33609628677368164,
-0.06317736208438873,
0.11500461399555206,
0.0019404254853725433,
-0.26357945799827576,
0.25741180777549744,
0.23249028623104095,
-0.02038034424185753,
0.2890787422657013,
-0.08449018746614456,
-0.23327696323394775,
0.4236103892326355,
0.3134598135948181,
-0.2145313322544098,
-0.011860489845275879,
-0.6799468994140625,
0.03408424183726311,
-0.5301890969276428,
-0.21142882108688354,
0.43522942066192627,
-0.10914040356874466,
0.017888585105538368,
-0.5890347957611084,
0.4270530045032501,
0.30575287342071533,
-0.107606440782547,
0.3879147469997406,
0.0977703109383583,
-0.19409748911857605,
0.4032406210899353,
0.5294487476348877,
0.8043723702430725,
-0.4039630889892578,
0.3484288156032562,
0.46680381894111633,
-0.4300251007080078,
0.24457265436649323,
-0.12722913920879364,
0.20992924273014069,
-0.3140505254268646,
-0.07833489775657654,
0.038740068674087524,
-0.17297546565532684,
0.2422458529472351,
-0.12235552072525024,
0.09943124651908875,
0.11514492332935333,
-0.28848928213119507,
0.2337983399629593,
0.040701355785131454,
-0.08954060077667236,
-0.03428573161363602,
-0.22934618592262268,
-0.14492936432361603,
0.16288816928863525,
-0.08797056972980499,
-0.4598895311355591,
0.017588118091225624,
0.10743381828069687,
-0.07630685716867447,
-0.02406245470046997,
-0.44715064764022827,
-0.06582453846931458,
0.23037676513195038,
0.6473114490509033,
-0.10478129982948303,
-0.05326585844159126,
0.08350971341133118,
0.19290564954280853,
-0.06514260172843933,
0.0753694400191307,
0.10631881654262543,
0.00842246226966381,
0.09393151849508286,
0.1563546359539032,
0.4424441456794739,
-0.028631988912820816,
0.1606522649526596,
0.13758841156959534,
-0.18392542004585266,
0.07803528010845184,
0.16535012423992157,
-0.08762603998184204,
-0.5773116946220398,
0.14067921042442322,
0.18504293262958527,
-0.32206371426582336,
-0.2529473900794983,
-0.24577665328979492,
0.054186996072530746,
-0.08311787247657776,
0.12953883409500122,
-0.1283714771270752,
0.036535631865262985,
0.8734768629074097,
-0.29629743099212646,
-0.29107236862182617,
-0.04970870539546013,
0.2654588222503662,
0.260367214679718,
0.24213287234306335,
0.2567496597766876,
0.24336104094982147,
-0.3785841464996338,
-0.08520227670669556,
0.3592904508113861,
0.24535247683525085,
0.11718224734067917,
0.2648712396621704,
-0.2448965162038803,
-0.0833391472697258,
-0.18856126070022583,
-0.16152125597000122,
-0.1774425208568573,
-0.07137634605169296,
-0.009470567107200623,
-0.27941304445266724,
-0.20895738899707794,
0.14531870186328888,
0.30289724469184875,
0.27950552105903625,
0.01686621829867363,
-0.3354112505912781,
-0.3839300572872162,
0.22989049553871155,
-0.23116831481456757,
0.10879215598106384,
-0.26074784994125366,
0.01728433184325695,
-0.056896016001701355,
-0.1465311348438263,
0.09893612563610077,
-0.29463592171669006,
0.012908084318041801,
-0.03140946477651596,
0.000655648298561573,
-0.14421427249908447,
-0.09860466420650482,
0.10760720819234848,
-0.08670663088560104,
-0.4878668785095215,
-0.1799415946006775,
-0.6464807987213135,
-0.24270498752593994,
-0.27066829800605774,
0.08167867362499237,
0.5560780763626099,
0.047703295946121216,
0.01679380238056183,
-0.20789502561092377,
-0.323650598526001,
0.3595947027206421,
0.42659109830856323,
-0.18398723006248474,
-0.056206852197647095,
0.3889482617378235,
0.24420830607414246,
0.1870202124118805,
-0.13300302624702454,
-0.1733945906162262,
0.21344530582427979,
-0.286354124546051,
-0.2514331638813019,
0.44769442081451416,
-0.23262937366962433,
-0.20953671634197235,
0.33341819047927856,
0.04831162095069885,
0.2757208049297333,
-0.3150452971458435,
-0.13650380074977875,
0.04249906167387962,
0.119715616106987,
-0.01585669070482254,
-0.26702257990837097,
0.055508021265268326,
0.19166299700737,
-0.2533239424228668,
0.5374152660369873,
0.19109036028385162,
-0.2465209662914276,
-0.3602503538131714,
-0.019576752558350563,
0.5570907592773438,
-0.06911886483430862,
-0.00547466054558754,
0.2759479284286499,
0.137203648686409,
-0.3220023512840271,
0.29390910267829895,
0.24280664324760437,
0.4010663628578186,
0.7728537321090698,
0.10270676761865616,
-0.07956866919994354,
0.2694442570209503,
0.12003607302904129,
-0.21427470445632935,
-0.14901849627494812,
0.048421602696180344,
0.539283037185669,
-0.23916396498680115,
0.11390219628810883,
-0.07992996275424957,
0.035756465047597885,
0.11983420699834824,
-0.17787541449069977,
-0.4379732012748718,
0.1240311861038208,
-0.23024579882621765,
-0.019977083429694176,
0.3672568202018738,
-0.12417002022266388,
0.06748832762241364,
0.18205401301383972,
-0.14156407117843628,
-0.3759215474128723,
0.5255948305130005,
0.035784948617219925,
-0.1036025732755661,
-0.19696976244449615,
0.46933871507644653,
0.32888033986091614,
0.36925360560417175,
-0.3339332342147827,
-0.06438338756561279,
0.24232043325901031,
0.018313370645046234,
-0.09850500524044037,
0.11877082288265228,
0.3061527907848358,
0.24729964137077332,
0.14689257740974426,
0.10960033535957336,
-0.024472247809171677,
-0.04864851385354996,
0.0041439104825258255,
0.33926495909690857,
-0.10051581263542175,
0.5196316838264465,
0.11409056186676025,
-0.0048390645533800125,
-0.011150263249874115,
-0.36936455965042114,
0.26305732131004333,
0.2596087157726288,
-0.3466632068157196,
0.5214419960975647,
-0.2423742711544037,
-0.14091843366622925,
0.10586234927177429,
0.01266554743051529,
-0.26604995131492615,
-0.3866470754146576,
0.44137611985206604,
-0.17309461534023285,
0.26138535141944885,
0.0514664351940155,
0.05039266496896744,
-0.1495896428823471,
0.4757409691810608,
0.0389099158346653,
-0.26458024978637695,
-0.15500704944133759,
-0.06670273840427399,
-0.23358984291553497,
-0.14847123622894287,
-0.4841576814651489,
0.029405107721686363,
0.22955010831356049,
0.17568325996398926,
-0.10431516915559769,
-0.2578033208847046,
-0.2445075958967209,
0.14436854422092438,
-0.2999706268310547,
0.22643724083900452,
-0.38517624139785767,
-0.004156254231929779,
0.14443200826644897,
-0.05067508667707443,
-0.10641881078481674,
-0.25187021493911743,
0.5614992380142212,
0.011814340017735958,
-0.007344342768192291,
-0.13336950540542603,
0.2427777647972107,
-0.2200753092765808,
0.23267808556556702,
0.21585869789123535,
0.19808079302310944,
0.17274895310401917,
0.25785374641418457,
-0.03108687326312065,
-0.1985057294368744,
-0.0904969647526741,
0.1146530956029892,
0.032065726816654205,
-0.1210632175207138,
0.08717457950115204,
-0.3491816222667694,
0.028365042060613632,
0.07388166338205338,
0.3872080147266388,
-0.08265256881713867,
0.032829686999320984,
-0.012290941551327705,
0.0006523467600345612,
-0.14450816810131073,
0.2168615162372589,
0.07013145089149475,
0.037535399198532104,
-0.06404004245996475,
0.3795809745788574,
-0.03428660333156586,
-0.3052506744861603,
0.3573406934738159,
-0.042120542377233505,
-0.39430665969848633,
0.1995321363210678,
0.20530113577842712,
0.12733906507492065,
-0.1645987629890442,
-0.413642942905426,
-0.18636199831962585,
0.25943684577941895,
-0.14277783036231995,
-0.034119654446840286,
0.34120726585388184,
-0.18537643551826477,
-0.06875001639127731,
-0.14472143352031708,
0.23357072472572327,
-0.24989357590675354,
-0.07049936801195145,
0.26214244961738586,
0.031142719089984894
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | Hi ! `Dataset.from_dict` keeps the data in memory. You can write on disk and reload them with
```python
dataset.save_to_disk("path/to/local")
dataset = load_from_disk("path/to/local")
```
this way you'll end up with a dataset loaded from your disk using memory mapping, and it won't fill up your RAM :)
related to https://github.com/huggingface/datasets/issues/4861 | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 49 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
Hi ! `Dataset.from_dict` keeps the data in memory. You can write on disk and reload them with
```python
dataset.save_to_disk("path/to/local")
dataset = load_from_disk("path/to/local")
```
this way you'll end up with a dataset loaded from your disk using memory mapping, and it won't fill up your RAM :)
related to https://github.com/huggingface/datasets/issues/4861 | [
0.045552369207143784,
0.01519949734210968,
-0.09774087369441986,
0.5263460874557495,
0.5173768997192383,
0.15563231706619263,
0.31598901748657227,
0.2081926316022873,
0.2338581681251526,
0.05587401241064072,
-0.09372477978467941,
0.4004634916782379,
-0.183038592338562,
0.04938501864671707,
-0.08550852537155151,
-0.16699759662151337,
0.20839150249958038,
-0.007729515433311462,
-0.2536264657974243,
0.09387297928333282,
-0.4121469259262085,
-0.13356854021549225,
-0.19702288508415222,
0.07736527919769287,
-0.17945131659507751,
-0.19363582134246826,
0.0171604473143816,
-0.05071629583835602,
-0.1136542484164238,
-0.13292765617370605,
0.15915486216545105,
-0.1910681426525116,
0.10658823698759079,
0.16676244139671326,
-0.00010308498167432845,
-0.17789039015769958,
0.15620435774326324,
0.035792455077171326,
-0.09923744201660156,
0.5934188365936279,
0.08630182594060898,
-0.4267548620700836,
-0.11420807987451553,
-0.5177497863769531,
0.18535348773002625,
-0.4132726192474365,
-0.3084687292575836,
-0.5657790303230286,
0.004881873726844788,
0.09823884069919586,
0.30310335755348206,
0.10820844769477844,
0.15724876523017883,
0.21232254803180695,
0.23483633995056152,
0.056675985455513,
-0.16971376538276672,
-0.20973271131515503,
0.006593070924282074,
-0.3115348517894745,
0.14897911250591278,
0.292000412940979,
-0.28859037160873413,
0.016165602952241898,
0.24509865045547485,
0.17432010173797607,
-0.15756535530090332,
0.06838077306747437,
0.009883390739560127,
-0.012884087860584259,
0.3784698247909546,
-0.48699960112571716,
-0.029642561450600624,
-0.17386704683303833,
-0.056021880358457565,
-0.03743715584278107,
0.09740876406431198,
0.2598894238471985,
-0.12410959601402283,
0.03398701548576355,
-0.3961412012577057,
0.06414312869310379,
-0.07465098053216934,
0.20664192736148834,
-0.08174066245555878,
-0.4112694561481476,
0.005966628435999155,
0.1073451042175293,
0.13921596109867096,
-0.3692602515220642,
0.22280646860599518,
-0.2371651828289032,
0.1401347517967224,
0.0751756876707077,
-0.283770889043808,
-0.1301109790802002,
0.0086560919880867,
-0.30613023042678833,
0.008181814104318619,
-0.3211773633956909,
0.08428886532783508,
-0.021963708102703094,
0.14100414514541626,
0.16469110548496246,
0.032148733735084534,
0.24033229053020477,
-0.4700443744659424,
0.1755700409412384,
0.24890361726284027,
-0.07766322791576385,
0.2193615734577179,
-0.1299833357334137,
0.033188991248607635,
0.2722981870174408,
0.32579752802848816,
-0.38480889797210693,
0.17986807227134705,
0.019006263464689255,
-0.3115536570549011,
0.19904427230358124,
-0.22324934601783752,
0.20927605032920837,
0.0677419975399971,
0.26693499088287354,
0.0035257432609796524,
0.33035925030708313,
0.020590517669916153,
-0.022053174674510956,
-0.1005825623869896,
-0.11514979600906372,
-0.28292226791381836,
0.3053668737411499,
-0.15520799160003662,
0.04657658934593201,
0.12136158347129822,
0.6934100389480591,
-0.11499402672052383,
0.2004796266555786,
-0.03464193642139435,
-0.17929203808307648,
0.10648292303085327,
-0.3146071434020996,
0.1579861342906952,
0.26258257031440735,
-0.1605287790298462,
-0.00788126327097416,
0.009280357509851456,
0.1991792768239975,
-0.1685430109500885,
0.25658929347991943,
-0.14443904161453247,
-0.2772258520126343,
-0.2282143384218216,
0.2056908905506134,
0.023261383175849915,
0.12028347700834274,
-0.33305954933166504,
0.008084837347269058,
0.425874799489975,
0.09194855391979218,
0.08015413582324982,
-0.11494417488574982,
-0.11872798204421997,
-0.43321701884269714,
0.12391870468854904,
0.2899738550186157,
-0.45054182410240173,
0.2817152738571167,
0.03492499887943268,
0.14371918141841888,
0.19872193038463593,
0.2859799265861511,
-0.13664978742599487,
0.07441726326942444,
-0.04525987058877945,
-0.2597631812095642,
0.06292368471622467,
-0.1946416199207306,
-0.32343795895576477,
-0.06866416335105896,
0.2614362835884094,
0.23706720769405365,
0.23206552863121033,
0.38835686445236206,
-0.012045443058013916,
0.15050964057445526,
-0.038145944476127625,
0.26466405391693115,
0.08096626400947571,
0.3686855435371399,
-0.2508132755756378,
-0.590969979763031,
0.053207214921712875,
0.11393500864505768,
-0.05121389403939247,
-0.21438395977020264,
0.10623301565647125,
0.1422968953847885,
0.19116485118865967,
-0.4116632044315338,
-0.04084968566894531,
0.10232289135456085,
0.23661811649799347,
0.036024972796440125,
-0.028911350294947624,
-0.37507376074790955,
-0.38564831018447876,
0.22115382552146912,
0.2801385819911957,
-0.3546293377876282,
0.07975515723228455,
-0.22051678597927094,
0.019486848264932632,
0.09377207607030869,
0.18800638616085052,
0.01749381050467491,
0.1927533745765686,
-0.06305424869060516,
0.07024417817592621,
-0.06702932715415955,
-0.016257207840681076,
0.3790668249130249,
-0.2586960792541504,
-0.07482884079217911,
-0.40824094414711,
0.25818464159965515,
-0.04139852523803711,
-0.10631204396486282,
-0.07517200708389282,
0.22662821412086487,
0.12872999906539917,
0.13968239724636078,
0.1496034860610962,
0.18488749861717224,
0.28715065121650696,
-0.07375742495059967,
-0.3350412845611572,
0.4800679087638855,
0.08257441967725754,
0.15219642221927643,
0.3876612186431885,
-0.18248718976974487,
0.30359992384910583,
-0.019423313438892365,
-0.09266427904367447,
0.17502093315124512,
0.09780751168727875,
0.16655129194259644,
-0.03473161160945892,
0.1505589485168457,
0.03500105440616608,
0.09926819801330566,
0.40714457631111145,
-0.2837476134300232,
-0.08050799369812012,
-0.0774884968996048,
-0.02891896665096283,
0.28520238399505615,
-0.17579659819602966,
0.3349383771419525,
0.4081501364707947,
-0.02436969242990017,
0.16566836833953857,
0.17637863755226135,
0.08628559112548828,
-0.21004551649093628,
-0.07931475341320038,
0.12376706302165985,
0.3894193172454834,
0.21446460485458374,
-0.18232379853725433,
-0.0005381815135478973,
-0.025470279157161713,
-0.16833806037902832,
0.24123448133468628,
0.17537502944469452,
0.12731340527534485,
-0.2999160587787628,
0.29680415987968445,
-0.1843782216310501,
-0.12593375146389008,
0.033138517290353775,
0.30529651045799255,
0.3405873775482178,
-0.3954377770423889,
0.08227846026420593,
-0.2542717754840851,
-0.1497962772846222,
0.026719532907009125,
0.058822114020586014,
0.09533272683620453,
-0.1781100481748581,
-0.3229227662086487,
0.19354264438152313,
0.03018737956881523,
-0.12176177650690079,
-0.13809435069561005,
0.39533692598342896,
0.12679380178451538,
0.017262134701013565,
-0.02478526160120964,
-0.08673668652772903,
-0.11149310320615768,
0.12703801691532135,
0.3249967098236084,
-0.11966356635093689,
0.28376442193984985,
0.2786191701889038,
-0.039807263761758804,
0.07854463905096054,
0.014584250748157501,
-0.20142072439193726,
0.0022109150886535645,
0.2984592318534851,
0.045806851238012314,
0.000841781497001648,
-0.23570120334625244,
-0.06380771845579147,
0.014380121603608131,
0.12497152388095856,
-0.15832462906837463,
0.1980241984128952,
0.23269329965114594,
-0.19067661464214325,
0.10532887279987335,
-0.3176158666610718,
-0.17998139560222626,
-0.23111876845359802,
0.012070182710886002,
-0.2983540892601013,
0.32570600509643555,
-0.1679028570652008,
0.05733146890997887,
0.23815341293811798,
0.22469493746757507,
0.13769744336605072,
-0.31672990322113037,
0.003103446215391159,
0.23983998596668243,
-0.04987777769565582,
-0.19489873945713043,
-0.21830055117607117,
0.16411343216896057,
-0.1075703501701355,
0.10924459248781204,
-0.5360182523727417,
-0.312595397233963,
-0.6322781443595886,
-0.15849421918392181,
-0.08798985183238983,
0.07106111943721771,
0.012077346444129944,
0.06154252961277962,
-0.11021248996257782,
0.001691725105047226,
-0.15580710768699646,
0.014929749071598053,
0.19402316212654114,
-0.044200532138347626,
0.10885147005319595,
0.4996948838233948,
0.1959553360939026,
0.026599638164043427,
0.30245429277420044,
0.13389094173908234,
0.29934874176979065,
0.0937080830335617,
0.2637791931629181,
-0.14393630623817444,
-0.3983255922794342,
0.09146395325660706,
-0.13783717155456543,
-0.21050895750522614,
-0.13697406649589539,
0.0886707529425621,
-0.2759794592857361,
0.05213652551174164,
0.06804700195789337,
0.12348469346761703,
-0.08446024358272552,
0.12876716256141663,
0.029229911044239998,
0.08331993222236633,
0.05399773642420769,
0.14195352792739868,
-0.28490325808525085,
-0.2927822768688202,
-0.004287279210984707,
-0.2847023010253906,
-0.09391988068819046,
-0.0325515978038311,
-0.5387763381004333,
-0.15565358102321625,
-0.19211190938949585,
0.0839519202709198,
0.025474047288298607,
0.4328269958496094,
-0.04074881598353386,
-0.060254134237766266,
0.2658118009567261,
0.046763017773628235,
0.5929387211799622,
0.0756920799612999,
-0.29329580068588257,
0.14078333973884583,
-0.15046903491020203,
-0.468781441450119,
-0.06997638195753098,
-0.2228773981332779,
-0.2497035712003708,
0.11925718188285828,
0.31685489416122437,
-0.06577089428901672,
-0.10642946511507034,
0.2605507969856262,
0.12108366936445236,
-0.28484582901000977,
-0.21104547381401062,
-0.1515955924987793,
-0.44172748923301697,
0.0034043360501527786,
-0.003114856779575348,
0.07939314842224121,
0.3921533524990082,
0.2568519115447998,
-0.16690056025981903,
-0.15385746955871582,
-0.14918893575668335,
0.22323040664196014,
0.017052412033081055,
0.3529554009437561,
-0.018632734194397926,
0.0252719447016716,
-0.04529156535863876,
-0.1427898108959198,
0.1681344360113144,
0.2257416546344757,
-0.007905352860689163,
0.3153001368045807,
-0.11169997602701187,
-0.17271582782268524,
0.3953922390937805,
0.2558334171772003,
-0.17918023467063904,
-0.04007338732481003,
-0.6012972593307495,
0.14488360285758972,
-0.5422481894493103,
-0.14751604199409485,
0.2928538918495178,
-0.0816071629524231,
0.042342931032180786,
-0.5779557228088379,
0.386985719203949,
0.25315728783607483,
-0.07666802406311035,
0.29202914237976074,
0.0610039159655571,
-0.22038617730140686,
0.41435128450393677,
0.5724348425865173,
0.8222671151161194,
-0.47482240200042725,
0.3019115626811981,
0.44620978832244873,
-0.3682328462600708,
0.3020424544811249,
-0.2863422632217407,
0.1740659475326538,
-0.2408762127161026,
-0.12239742279052734,
0.0581885427236557,
-0.12274083495140076,
0.22354915738105774,
-0.09568589925765991,
0.056571606546640396,
0.1930600106716156,
-0.2230331301689148,
0.1738511174917221,
-0.018935495987534523,
-0.03571159392595291,
0.030923213809728622,
-0.25248774886131287,
-0.179307758808136,
0.23344865441322327,
-0.10953779518604279,
-0.5028548836708069,
0.04335375875234604,
0.10840702056884766,
-0.02147907391190529,
0.015597347170114517,
-0.34990185499191284,
-0.11999032646417618,
0.08967294543981552,
0.5788142085075378,
-0.16160939633846283,
-0.053353939205408096,
-0.028527971357107162,
0.28569266200065613,
-0.023615390062332153,
0.163663849234581,
0.16133126616477966,
-0.05140090361237526,
0.10349175333976746,
0.1549515426158905,
0.3432565927505493,
-0.05023263394832611,
0.13188208639621735,
0.1021718755364418,
-0.21756340563297272,
0.13434189558029175,
0.16059613227844238,
-0.15894019603729248,
-0.43672624230384827,
0.1536206752061844,
0.2912895381450653,
-0.2995970547199249,
-0.26594340801239014,
-0.22722700238227844,
0.014643792062997818,
-0.10238758474588394,
0.20713713765144348,
-0.08683252334594727,
0.0007496443577110767,
0.8256078362464905,
-0.20295409858226776,
-0.3337666988372803,
-0.10816529393196106,
0.22314167022705078,
0.26803433895111084,
0.21448922157287598,
0.23660150170326233,
0.15859819948673248,
-0.37061136960983276,
-0.18762817978858948,
0.2865406572818756,
0.23275938630104065,
0.19050908088684082,
0.2370290905237198,
-0.15152762830257416,
-0.0663469061255455,
-0.14727568626403809,
-0.21907836198806763,
-0.1003970354795456,
-0.041062675416469574,
-0.042085617780685425,
-0.31388694047927856,
-0.3049423396587372,
0.19078367948532104,
0.3566723167896271,
0.31636011600494385,
0.11245124787092209,
-0.3200746774673462,
-0.3546557128429413,
0.23647993803024292,
-0.34791767597198486,
0.0712895542383194,
-0.3061901330947876,
0.044560834765434265,
-0.04860438406467438,
-0.18294432759284973,
0.04302430525422096,
-0.2473316490650177,
0.13634227216243744,
-0.06633303314447403,
-0.0645345076918602,
-0.2772632837295532,
-0.03953932225704193,
0.0435192734003067,
-0.13792577385902405,
-0.3803664445877075,
-0.1599486768245697,
-0.5989601016044617,
-0.26678702235221863,
-0.31315121054649353,
0.0880177766084671,
0.4403744339942932,
0.04670809209346771,
0.07850022614002228,
-0.21273623406887054,
-0.32168862223625183,
0.2770223617553711,
0.31676527857780457,
-0.22767305374145508,
-0.12786240875720978,
0.31719014048576355,
0.222571462392807,
0.15016919374465942,
-0.1784980595111847,
-0.15857622027397156,
0.23247689008712769,
-0.2690252661705017,
-0.1501232087612152,
0.36576196551322937,
-0.1250954121351242,
-0.2321520745754242,
0.3394470810890198,
0.05917438864707947,
0.1829429268836975,
-0.2935090661048889,
-0.15689393877983093,
0.09188947826623917,
0.25506412982940674,
-0.07063807547092438,
-0.23143187165260315,
0.05645923689007759,
0.1495674103498459,
-0.09115814417600632,
0.5809949040412903,
0.09060110151767731,
-0.16819535195827484,
-0.33448904752731323,
-0.05948811396956444,
0.48597609996795654,
-0.08698835968971252,
-0.007517673075199127,
0.23386824131011963,
0.11424301564693451,
-0.3466278910636902,
0.2532663643360138,
0.2439807653427124,
0.35046619176864624,
0.7464397549629211,
0.16596993803977966,
0.050163865089416504,
0.29502859711647034,
0.14396584033966064,
-0.2970717251300812,
-0.09354668855667114,
0.10731460154056549,
0.4873508810997009,
-0.23970112204551697,
0.09903018176555634,
-0.042517319321632385,
-0.017541229724884033,
0.1488613784313202,
-0.24654193222522736,
-0.37752780318260193,
0.11429049074649811,
-0.20315295457839966,
-0.020405128598213196,
0.3088717758655548,
-0.11039648205041885,
0.03740081936120987,
0.1683674305677414,
-0.0772695541381836,
-0.37513619661331177,
0.43840017914772034,
-0.012380212545394897,
-0.09004166722297668,
-0.15934717655181885,
0.4389740228652954,
0.31788429617881775,
0.3148801922798157,
-0.3384319841861725,
-0.1147577241063118,
0.2611618638038635,
0.046460315585136414,
-0.14271211624145508,
0.1391596794128418,
0.3120100498199463,
0.2719181776046753,
0.13971169292926788,
0.12272441387176514,
0.03199434652924538,
-0.07273704558610916,
-0.09098999202251434,
0.2559298276901245,
-0.11303092539310455,
0.4321395456790924,
0.14067000150680542,
0.10698077082633972,
-0.11669483780860901,
-0.3381378650665283,
0.18027374148368835,
0.18135230243206024,
-0.370196133852005,
0.5019950270652771,
-0.1410270780324936,
-0.15976691246032715,
0.05446617305278778,
0.004689060151576996,
-0.2824955880641937,
-0.3762436807155609,
0.36363255977630615,
-0.22918087244033813,
0.2680155336856842,
0.03874492645263672,
0.11843241751194,
-0.1584686040878296,
0.4958266317844391,
0.022683914750814438,
-0.14730221033096313,
-0.19610582292079926,
-0.03739412873983383,
-0.24202820658683777,
-0.18634441494941711,
-0.41887974739074707,
-0.005161596462130547,
0.14485658705234528,
0.21101413667201996,
-0.01698654145002365,
-0.15524788200855255,
-0.23510004580020905,
0.2205733358860016,
-0.3026154935359955,
0.2198062539100647,
-0.38409438729286194,
0.04033000394701958,
0.09226527065038681,
-0.04919730871915817,
-0.045896194875240326,
-0.337086945772171,
0.5492684841156006,
-0.02506116032600403,
0.09849797934293747,
-0.08976487815380096,
0.2863927483558655,
-0.11477434635162354,
0.2689167559146881,
0.20470044016838074,
0.13301052153110504,
0.06740963459014893,
0.14995267987251282,
-0.0850236788392067,
-0.1581439971923828,
-0.0003655366599559784,
0.023944426327943802,
0.021587755531072617,
-0.015155799686908722,
0.1588428020477295,
-0.3342590034008026,
-0.02024802193045616,
0.05752680078148842,
0.4473861753940582,
-0.022423069924116135,
0.0010685097659006715,
0.021999696269631386,
-0.04720650613307953,
-0.08717759698629379,
0.19706225395202637,
0.03168787807226181,
0.023253628984093666,
-0.036513879895210266,
0.38334009051322937,
-0.09366752952337265,
-0.3300408124923706,
0.3587285876274109,
0.012999878264963627,
-0.36026015877723694,
0.16240277886390686,
0.2704973518848419,
0.14954107999801636,
-0.12672173976898193,
-0.39064496755599976,
-0.1473768949508667,
0.2699660360813141,
-0.18185535073280334,
-0.06868782639503479,
0.42535287141799927,
-0.22650472819805145,
-0.03373754024505615,
-0.09857529401779175,
0.24024350941181183,
-0.3190798759460449,
-0.09675473719835281,
0.19793131947517395,
-0.0414869524538517
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | @lhoestq thnx for getting back to me! i've tested the suggested method, but unfortunately the memory consumption is the very same:
```
from datasets import Dataset, Features, Array2D, Array3D, load_from_disk
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
dataset.save_to_disk("foo")
foo_db = load_from_disk("foo")
colum_value = foo_db[column_name]
```
the very same happens when you create the dataset, but dont specify the feature type.
i've tried running this on different envs (macOS, linux) and it's behaving the very same way. | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 93 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
@lhoestq thnx for getting back to me! i've tested the suggested method, but unfortunately the memory consumption is the very same:
```
from datasets import Dataset, Features, Array2D, Array3D, load_from_disk
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
dataset.save_to_disk("foo")
foo_db = load_from_disk("foo")
colum_value = foo_db[column_name]
```
the very same happens when you create the dataset, but dont specify the feature type.
i've tried running this on different envs (macOS, linux) and it's behaving the very same way. | [
0.11394543945789337,
0.019237250089645386,
-0.051380448043346405,
0.5630336403846741,
0.5003138780593872,
0.14634287357330322,
0.3897077143192291,
0.13979969918727875,
0.2672913670539856,
0.03321892023086548,
-0.0966111496090889,
0.42706498503685,
-0.239849254488945,
0.011586079373955727,
-0.05090709030628204,
-0.1666603535413742,
0.2511955499649048,
-0.019800826907157898,
-0.25164756178855896,
0.13821573555469513,
-0.40525394678115845,
-0.18866728246212006,
-0.23011693358421326,
0.08530402928590775,
-0.14093664288520813,
-0.1634046882390976,
0.03821992874145508,
-0.12734851241111755,
-0.06645817309617996,
-0.0994669497013092,
0.2131323218345642,
-0.17628377676010132,
0.05977741628885269,
0.19621232151985168,
-0.00011073308996856213,
-0.19031858444213867,
0.16002339124679565,
0.027971183881163597,
-0.03790968656539917,
0.6062631011009216,
0.07044240087270737,
-0.4365757405757904,
-0.10329734534025192,
-0.4456459581851959,
0.21665748953819275,
-0.40715375542640686,
-0.295969158411026,
-0.593647837638855,
-0.06990215182304382,
0.04573211446404457,
0.2285401076078415,
0.0717063844203949,
0.15941163897514343,
0.2831566035747528,
0.22917017340660095,
0.09431266784667969,
-0.22283726930618286,
-0.26872718334198,
0.0009829699993133545,
-0.331838995218277,
0.19329893589019775,
0.2701664865016937,
-0.23911429941654205,
0.008768346160650253,
0.2696971595287323,
0.16950947046279907,
-0.21792489290237427,
0.10713350772857666,
-0.018416445702314377,
-0.018845193088054657,
0.3890697658061981,
-0.5263070464134216,
-0.08169355243444443,
-0.2074877917766571,
-0.0846715047955513,
-0.0213383249938488,
0.09270734339952469,
0.29080820083618164,
-0.12188322842121124,
0.07300160825252533,
-0.409620076417923,
0.05621624365448952,
-0.14810197055339813,
0.21686583757400513,
-0.09803362190723419,
-0.4963226616382599,
0.05900116264820099,
0.11219809949398041,
0.1545843482017517,
-0.43878084421157837,
0.21920374035835266,
-0.27173253893852234,
0.186152383685112,
0.08468268811702728,
-0.3063560426235199,
-0.14103545248508453,
-0.019409529864788055,
-0.3652440011501312,
0.03253747522830963,
-0.33753639459609985,
0.03887780383229256,
0.0201253741979599,
0.14711803197860718,
0.11891882121562958,
0.030223067849874496,
0.2810879945755005,
-0.44901418685913086,
0.2005494087934494,
0.2468823343515396,
-0.11531644314527512,
0.2482466697692871,
-0.144270658493042,
0.010720004327595234,
0.36799100041389465,
0.32825973629951477,
-0.39300015568733215,
0.12161754071712494,
0.04611361399292946,
-0.29613804817199707,
0.18823392689228058,
-0.2621791362762451,
0.2213127613067627,
0.0900367945432663,
0.22460338473320007,
0.019601956009864807,
0.34546512365341187,
0.040643393993377686,
0.06297461688518524,
-0.06891422718763351,
-0.13040189445018768,
-0.2429104894399643,
0.2732195258140564,
-0.1458396315574646,
0.06542061269283295,
0.15646369755268097,
0.791732132434845,
-0.18004435300827026,
0.20641694962978363,
-0.06530825793743134,
-0.19185709953308105,
0.12133944034576416,
-0.30177614092826843,
0.19339248538017273,
0.20916353166103363,
-0.1829829216003418,
-0.0047339219599962234,
0.007363677024841309,
0.25048398971557617,
-0.15073856711387634,
0.26686185598373413,
-0.07316184788942337,
-0.30283859372138977,
-0.2200474888086319,
0.11939145624637604,
-0.02904481813311577,
0.13915106654167175,
-0.3659704327583313,
0.04297079145908356,
0.4729549288749695,
0.07841058075428009,
0.018286913633346558,
-0.09919984638690948,
-0.16286645829677582,
-0.42766448855400085,
0.08588847517967224,
0.32066667079925537,
-0.430916428565979,
0.2718455493450165,
0.06830301880836487,
0.15804068744182587,
0.22996273636817932,
0.24287356436252594,
-0.07816345244646072,
0.00980193167924881,
-0.04111235588788986,
-0.2831576466560364,
-0.011138953268527985,
-0.18659770488739014,
-0.3452385663986206,
-0.07672511786222458,
0.2989457845687866,
0.3331260085105896,
0.2810889780521393,
0.4164440929889679,
-0.07463833689689636,
0.14276185631752014,
-0.06349244713783264,
0.27864503860473633,
0.08033790439367294,
0.3791162669658661,
-0.20889826118946075,
-0.666224479675293,
0.06409328430891037,
0.11227279901504517,
-0.05873319134116173,
-0.18405386805534363,
0.09558025002479553,
0.14629167318344116,
0.19911298155784607,
-0.4179317057132721,
-0.032142505049705505,
0.054819606244564056,
0.24419017136096954,
0.06864021718502045,
-0.06776011735200882,
-0.3415498435497284,
-0.37993693351745605,
0.23636853694915771,
0.34636378288269043,
-0.39237675070762634,
0.03190313279628754,
-0.23971496522426605,
0.06546583771705627,
0.13084930181503296,
0.18241716921329498,
0.09836643934249878,
0.11293701827526093,
-0.07323822379112244,
0.034834425896406174,
-0.0679454430937767,
0.033804673701524734,
0.4001748561859131,
-0.2494867444038391,
-0.0663764700293541,
-0.4250606894493103,
0.2877444326877594,
0.02013709768652916,
-0.07789449393749237,
-0.11123278737068176,
0.25956571102142334,
0.11074861884117126,
0.1327037513256073,
0.1837662160396576,
0.12869098782539368,
0.3579690158367157,
-0.09431184828281403,
-0.4062723219394684,
0.5099537968635559,
0.09690075367689133,
0.15062274038791656,
0.38498246669769287,
-0.18692879378795624,
0.2885582149028778,
-0.042002543807029724,
-0.06244157254695892,
0.20236454904079437,
0.12094271183013916,
0.2069479525089264,
-0.003700472414493561,
0.1720467060804367,
0.027143282815814018,
0.10219748318195343,
0.4364289939403534,
-0.30398955941200256,
-0.09678961336612701,
-0.07227161526679993,
-0.0679948627948761,
0.2740750014781952,
-0.1839873045682907,
0.3451867997646332,
0.2909186780452728,
0.006111152470111847,
0.16329748928546906,
0.16031602025032043,
0.08852463960647583,
-0.16224786639213562,
-0.09224362671375275,
0.12245655059814453,
0.37569570541381836,
0.1656278520822525,
-0.2199646234512329,
-0.004070824012160301,
0.07946029305458069,
-0.12849918007850647,
0.23497959971427917,
0.21039530634880066,
0.14674793183803558,
-0.279407262802124,
0.3701232075691223,
-0.2140292227268219,
-0.07155159115791321,
0.07618546485900879,
0.34688320755958557,
0.25530722737312317,
-0.4059305191040039,
0.08020439743995667,
-0.3158978521823883,
-0.15254506468772888,
0.035294391214847565,
0.05986155942082405,
0.1552710235118866,
-0.1377555876970291,
-0.3744381070137024,
0.22221170365810394,
0.062424805015325546,
-0.16106605529785156,
-0.1621648520231247,
0.381991446018219,
0.08974770456552505,
-0.07419301569461823,
0.021296411752700806,
-0.08261238783597946,
-0.10797084122896194,
0.04712248221039772,
0.33424854278564453,
-0.18835873901844025,
0.27655428647994995,
0.30255889892578125,
-0.07981949299573898,
0.08072478324174881,
0.031151555478572845,
-0.1763765513896942,
0.06298492848873138,
0.31655964255332947,
0.036068882793188095,
-0.07531340420246124,
-0.22878414392471313,
-0.03204360976815224,
0.04009714722633362,
0.18275371193885803,
-0.13221384584903717,
0.25610750913619995,
0.26585420966148376,
-0.19534696638584137,
0.15087606012821198,
-0.23128235340118408,
-0.23209314048290253,
-0.15534713864326477,
0.04724135249853134,
-0.3276819884777069,
0.35411500930786133,
-0.1882842630147934,
-0.01778356358408928,
0.15436245501041412,
0.22532789409160614,
0.08146403729915619,
-0.2989669740200043,
0.08545710146427155,
0.2747723460197449,
-0.08660140633583069,
-0.17624682188034058,
-0.2418898195028305,
0.15489986538887024,
-0.18444731831550598,
0.18168677389621735,
-0.508303701877594,
-0.28730863332748413,
-0.5991224050521851,
-0.14115934073925018,
-0.03597365319728851,
0.017251737415790558,
-0.01033751666545868,
0.05144287645816803,
-0.014328333549201488,
-0.020859969779849052,
-0.16280046105384827,
0.0607760064303875,
0.17736750841140747,
0.02338314801454544,
0.24134424328804016,
0.491122305393219,
0.22567719221115112,
0.02860609069466591,
0.3375372886657715,
0.1350642889738083,
0.2929515242576599,
0.03337312117218971,
0.20600463449954987,
-0.11621006578207016,
-0.36245280504226685,
0.05334542319178581,
-0.16290795803070068,
-0.20913316309452057,
-0.16249926388263702,
0.12726937234401703,
-0.2556120753288269,
0.04353544861078262,
0.06682485342025757,
0.25331151485443115,
-0.08100037276744843,
0.08442730456590652,
0.000656764954328537,
0.10643164813518524,
0.11900150775909424,
0.15952908992767334,
-0.3087838590145111,
-0.35199907422065735,
-0.03694663196802139,
-0.318101167678833,
-0.07320088893175125,
-0.03930177539587021,
-0.533124566078186,
-0.2141750305891037,
-0.2396523356437683,
0.06013606861233711,
0.061319634318351746,
0.5425710678100586,
-0.017054911702871323,
-0.02883305214345455,
0.23494167625904083,
0.09488741308450699,
0.5714129209518433,
0.05710378289222717,
-0.24806652963161469,
0.10206404328346252,
-0.20288541913032532,
-0.47787413001060486,
-0.10887983441352844,
-0.1672126054763794,
-0.2829265594482422,
0.08250737190246582,
0.2773861289024353,
-0.09064017981290817,
-0.08506888896226883,
0.21826915442943573,
0.1837151050567627,
-0.3035581111907959,
-0.22850006818771362,
-0.1142052412033081,
-0.4284697473049164,
0.06646936386823654,
-0.05247782915830612,
0.12738651037216187,
0.4068834185600281,
0.27283740043640137,
-0.12760832905769348,
-0.1479622721672058,
-0.1085209771990776,
0.28493165969848633,
-0.012386467307806015,
0.3673122823238373,
-0.04851217567920685,
0.07426002621650696,
-0.017454613000154495,
-0.17618709802627563,
0.1805545538663864,
0.23409634828567505,
0.0034834053367376328,
0.29144445061683655,
-0.12328023463487625,
-0.2471829503774643,
0.438650906085968,
0.24160823225975037,
-0.22001510858535767,
-0.029839076101779938,
-0.673925518989563,
0.022182714194059372,
-0.5368016362190247,
-0.23902247846126556,
0.30342474579811096,
-0.13519522547721863,
0.09608951956033707,
-0.5823007822036743,
0.3768541216850281,
0.3015269935131073,
-0.10866478085517883,
0.33179622888565063,
0.08323093503713608,
-0.22841684520244598,
0.42431366443634033,
0.5279467701911926,
0.7904111742973328,
-0.42560404539108276,
0.31018829345703125,
0.4903976023197174,
-0.3913061022758484,
0.2620566487312317,
-0.2297784984111786,
0.24291245639324188,
-0.2733752131462097,
-0.11916191875934601,
0.03902795910835266,
-0.16505305469036102,
0.19741830229759216,
-0.08000548183917999,
0.09796231985092163,
0.16843396425247192,
-0.30405837297439575,
0.20980305969715118,
-0.0014332383871078491,
-0.06947807222604752,
0.06902537494897842,
-0.24214479327201843,
-0.12478920817375183,
0.15796393156051636,
-0.09014420211315155,
-0.4837922155857086,
0.03681562468409538,
0.09714335948228836,
-0.08763448894023895,
0.003577534109354019,
-0.4109680652618408,
-0.08369004726409912,
0.12246175855398178,
0.6003549098968506,
-0.145005002617836,
-0.03178919479250908,
0.06890399754047394,
0.29595184326171875,
-0.03464687615633011,
0.11464560031890869,
0.16547025740146637,
-0.055776190012693405,
0.11983418464660645,
0.173312708735466,
0.41509270668029785,
-0.053716957569122314,
0.0846506655216217,
0.14014452695846558,
-0.159717857837677,
0.07554306089878082,
0.14563776552677155,
-0.1272108107805252,
-0.4861016273498535,
0.11103066802024841,
0.3191707134246826,
-0.29235905408859253,
-0.26843541860580444,
-0.26938334107398987,
0.05252056196331978,
-0.08932352066040039,
0.13923974335193634,
-0.14691467583179474,
0.004750566557049751,
0.8474756479263306,
-0.19766274094581604,
-0.2644215226173401,
-0.005250748246908188,
0.22881615161895752,
0.2712666094303131,
0.2198837399482727,
0.24997855722904205,
0.19277246296405792,
-0.37755972146987915,
-0.1240953803062439,
0.3334268629550934,
0.23250548541545868,
0.17145681381225586,
0.2054123431444168,
-0.20423546433448792,
-0.08002500236034393,
-0.19355639815330505,
-0.22471854090690613,
-0.1334845870733261,
-0.0718969777226448,
0.01861203834414482,
-0.3175947368144989,
-0.2506617605686188,
0.17352795600891113,
0.370388388633728,
0.29692891240119934,
0.026110529899597168,
-0.35051247477531433,
-0.4559432566165924,
0.23630233108997345,
-0.24911151826381683,
0.08652828633785248,
-0.25438985228538513,
0.0011669285595417023,
-0.05370726436376572,
-0.14444437623023987,
0.020052773877978325,
-0.3264186978340149,
0.0679287314414978,
-0.09080064296722412,
-0.020719580352306366,
-0.1518147885799408,
-0.08561624586582184,
0.09075026959180832,
-0.1332666277885437,
-0.4288656711578369,
-0.14241604506969452,
-0.6609800457954407,
-0.289874404668808,
-0.287447988986969,
0.041675787419080734,
0.5161027908325195,
0.051741085946559906,
0.030331864953041077,
-0.2389226108789444,
-0.32478952407836914,
0.2522950768470764,
0.35152843594551086,
-0.18237414956092834,
-0.06112313270568848,
0.3150918185710907,
0.21550771594047546,
0.21027794480323792,
-0.15174829959869385,
-0.170716792345047,
0.23463577032089233,
-0.24862168729305267,
-0.19473549723625183,
0.3770035207271576,
-0.19074228405952454,
-0.1935737580060959,
0.3327229619026184,
0.05623480677604675,
0.23381951451301575,
-0.33019351959228516,
-0.0924953818321228,
0.06302067637443542,
0.15353979170322418,
-0.08106804639101028,
-0.2460569143295288,
0.1060352623462677,
0.15185211598873138,
-0.1936160922050476,
0.6082433462142944,
0.1756654530763626,
-0.1963166445493698,
-0.4128643870353699,
-0.08448459953069687,
0.5108016133308411,
-0.037046171724796295,
-0.020983301103115082,
0.25028955936431885,
0.11609061062335968,
-0.33240559697151184,
0.25730183720588684,
0.29459092020988464,
0.3438074290752411,
0.7915241122245789,
0.14721006155014038,
-0.04887960106134415,
0.3444705307483673,
0.16455422341823578,
-0.32529833912849426,
-0.08314919471740723,
0.08544598519802094,
0.5230790376663208,
-0.21587219834327698,
0.0738234668970108,
-0.07138119637966156,
-0.028845608234405518,
0.11466870456933975,
-0.2398257553577423,
-0.3787500560283661,
0.1282636523246765,
-0.1780604124069214,
-0.014212214387953281,
0.34832844138145447,
-0.14658519625663757,
0.022439725697040558,
0.14602625370025635,
-0.10671089589595795,
-0.40105903148651123,
0.4654480218887329,
0.0033135488629341125,
-0.0005205273628234863,
-0.2001262605190277,
0.4879145622253418,
0.33737969398498535,
0.41296783089637756,
-0.3609679043292999,
-0.10891760140657425,
0.21094045042991638,
0.07390804588794708,
-0.10500246286392212,
0.05490422993898392,
0.2290704846382141,
0.22835728526115417,
0.1621227115392685,
0.08238053321838379,
-0.022132087498903275,
-0.06319379061460495,
-0.04769100248813629,
0.305494099855423,
-0.10605958104133606,
0.4351619482040405,
0.1600685864686966,
0.0011500995606184006,
-0.011965062469244003,
-0.37838438153266907,
0.277759850025177,
0.1955801099538803,
-0.3902423679828644,
0.5686182379722595,
-0.20078232884407043,
-0.16235223412513733,
0.10652025043964386,
-0.017157092690467834,
-0.21300876140594482,
-0.36602187156677246,
0.39617830514907837,
-0.19576534628868103,
0.30122944712638855,
0.10415593534708023,
0.06913651525974274,
-0.17164897918701172,
0.419458270072937,
-0.04091911390423775,
-0.18311011791229248,
-0.16330257058143616,
-0.05854567885398865,
-0.23546452820301056,
-0.22757145762443542,
-0.42894139885902405,
-0.027518626302480698,
0.19775067269802094,
0.17855006456375122,
-0.00741983950138092,
-0.1826942414045334,
-0.3139491677284241,
0.18454623222351074,
-0.2845423221588135,
0.27541306614875793,
-0.37714317440986633,
-0.018388614058494568,
0.13263708353042603,
0.003019915893673897,
-0.07917352020740509,
-0.33541223406791687,
0.5227239727973938,
0.03857613354921341,
0.01691516488790512,
-0.07838448137044907,
0.30658087134361267,
-0.1494184285402298,
0.22829020023345947,
0.19782671332359314,
0.13848678767681122,
0.13360117375850677,
0.23668652772903442,
-0.06430532783269882,
-0.13715288043022156,
-0.02430558390915394,
0.053954292088747025,
0.003185875713825226,
-0.05330957844853401,
0.11555199325084686,
-0.3293295204639435,
0.05709519982337952,
0.05700454115867615,
0.3801085948944092,
-0.04508437588810921,
0.01663430593907833,
-0.04072881117463112,
0.010922616347670555,
-0.14076262712478638,
0.21840831637382507,
0.02957950532436371,
0.00828981027007103,
-0.11786741018295288,
0.38644859194755554,
-0.04646642506122589,
-0.25547298789024353,
0.38539859652519226,
-0.013342997059226036,
-0.3766452372074127,
0.2132124900817871,
0.24184797704219818,
0.14187416434288025,
-0.1503961831331253,
-0.34510886669158936,
-0.15275394916534424,
0.2692543864250183,
-0.19724950194358826,
-0.0006050989031791687,
0.3740473687648773,
-0.202509805560112,
-0.055943816900253296,
-0.11994948983192444,
0.30245453119277954,
-0.3479161858558655,
-0.07393176108598709,
0.16448254883289337,
0.0008410215377807617
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | When you call `colum_value = foo_db[column_name]`, you load the full column in memory.
If you want to avoid filling up your memory, you can access chunks of data instead
```python
embeddings = dataset[i:i + chunk_size]["embeddings"]
``` | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 36 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
When you call `colum_value = foo_db[column_name]`, you load the full column in memory.
If you want to avoid filling up your memory, you can access chunks of data instead
```python
embeddings = dataset[i:i + chunk_size]["embeddings"]
``` | [
0.08300690352916718,
0.008690312504768372,
-0.07957549393177032,
0.5357914566993713,
0.5002109408378601,
0.18987640738487244,
0.33535102009773254,
0.19083479046821594,
0.2069808691740036,
0.09125422686338425,
-0.07150695472955704,
0.3508971333503723,
-0.17139743268489838,
-0.008651075884699821,
-0.07512333244085312,
-0.14567092061042786,
0.24055340886116028,
-0.01021607220172882,
-0.21707162261009216,
0.1133468896150589,
-0.47321298718452454,
-0.15386413037776947,
-0.25001758337020874,
0.07411351054906845,
-0.15976949036121368,
-0.15654347836971283,
0.023524971678853035,
-0.0976860299706459,
-0.10256629437208176,
-0.09854788333177567,
0.16312801837921143,
-0.2512456476688385,
0.09116274863481522,
0.14830994606018066,
-0.0001048346166498959,
-0.18215471506118774,
0.1703040897846222,
0.038712941110134125,
-0.09901313483715057,
0.5852090120315552,
0.1136675700545311,
-0.4602099359035492,
-0.11509430408477783,
-0.5038455724716187,
0.17218446731567383,
-0.39389878511428833,
-0.32260406017303467,
-0.5521115064620972,
-0.07778838276863098,
0.06903576105833054,
0.27880051732063293,
0.10971483588218689,
0.16072097420692444,
0.2337782382965088,
0.3117499053478241,
-0.03254865109920502,
-0.1804446130990982,
-0.21300503611564636,
0.010100223124027252,
-0.3040139079093933,
0.1400475800037384,
0.3001331090927124,
-0.2753903269767761,
0.0027762576937675476,
0.259196400642395,
0.19300347566604614,
-0.18972086906433105,
0.11204268038272858,
0.00672256201505661,
-0.03986864537000656,
0.30181610584259033,
-0.46647801995277405,
-0.0016699261032044888,
-0.13748817145824432,
-0.07567066699266434,
-0.14448024332523346,
0.1187421903014183,
0.2835468351840973,
-0.08942653238773346,
0.05012809857726097,
-0.3671257793903351,
0.11881209909915924,
-0.07431310415267944,
0.25782281160354614,
-0.14190146327018738,
-0.3786572217941284,
-0.005490530282258987,
0.12649983167648315,
0.16846707463264465,
-0.4100341200828552,
0.2132255584001541,
-0.2187008112668991,
0.16538096964359283,
0.08117194473743439,
-0.3288993239402771,
-0.113297238945961,
0.02574755996465683,
-0.2817832827568054,
0.04367945343255997,
-0.3268672823905945,
0.06546027958393097,
0.005336510017514229,
0.14369526505470276,
0.22304785251617432,
-0.018304839730262756,
0.20303937792778015,
-0.49687647819519043,
0.16873617470264435,
0.28481751680374146,
-0.07061300426721573,
0.2641136646270752,
-0.1306532323360443,
0.02652517706155777,
0.300165057182312,
0.3122124969959259,
-0.40533313155174255,
0.1542951911687851,
0.03167157992720604,
-0.31707388162612915,
0.28002774715423584,
-0.29040974378585815,
0.25224360823631287,
0.08911830931901932,
0.26034441590309143,
0.006209497340023518,
0.29201987385749817,
0.03130403906106949,
0.0035159755498170853,
-0.06939592957496643,
-0.14683693647384644,
-0.29565685987472534,
0.288774311542511,
-0.15893347561359406,
0.0622548907995224,
0.13125495612621307,
0.7188920974731445,
-0.13829468190670013,
0.1972767412662506,
-0.014456100761890411,
-0.1984023004770279,
0.08805906772613525,
-0.3514896035194397,
0.19206833839416504,
0.2752605080604553,
-0.17363791167736053,
0.0068376995623111725,
0.022809794172644615,
0.17253269255161285,
-0.19243940711021423,
0.26087307929992676,
-0.13088124990463257,
-0.29110556840896606,
-0.26461997628211975,
0.17812539637088776,
0.04928465932607651,
0.14380483329296112,
-0.3184957802295685,
0.02073480188846588,
0.4548100531101227,
0.12518815696239471,
0.0682973712682724,
-0.11536850035190582,
-0.18542169034481049,
-0.4408731460571289,
0.1316409558057785,
0.2412024438381195,
-0.4512838125228882,
0.2766205370426178,
0.09935765713453293,
0.1796879917383194,
0.19462373852729797,
0.28242966532707214,
-0.1317133754491806,
-0.010771222412586212,
-0.031068852171301842,
-0.2543945610523224,
0.020153410732746124,
-0.20349012315273285,
-0.32613447308540344,
-0.06737003475427628,
0.2993406057357788,
0.27207210659980774,
0.23835113644599915,
0.37587323784828186,
0.013149159029126167,
0.14906486868858337,
0.03496230021119118,
0.2734069228172302,
0.08150965720415115,
0.3717533349990845,
-0.20365159213542938,
-0.6054412126541138,
0.11505161225795746,
0.08865846693515778,
-0.098391592502594,
-0.22785836458206177,
0.10117004066705704,
0.06781431287527084,
0.1701176017522812,
-0.3943520486354828,
-0.047524504363536835,
0.07018749415874481,
0.2474004030227661,
0.06763506680727005,
-0.02756868675351143,
-0.3713526129722595,
-0.39077264070510864,
0.22870108485221863,
0.36361151933670044,
-0.3576352298259735,
0.05291379243135452,
-0.275304913520813,
0.055960677564144135,
0.12162970751523972,
0.2129596322774887,
0.041502147912979126,
0.17029200494289398,
-0.0676957368850708,
0.051005128771066666,
-0.0849745124578476,
-0.019622329622507095,
0.36533108353614807,
-0.305017352104187,
-0.0510820709168911,
-0.43997126817703247,
0.284758597612381,
-0.01228686235845089,
-0.11943064630031586,
-0.07870263606309891,
0.25414353609085083,
0.1392311155796051,
0.14579908549785614,
0.17442303895950317,
0.18430769443511963,
0.3092632293701172,
-0.129203662276268,
-0.39362281560897827,
0.49610573053359985,
0.05490324646234512,
0.12757928669452667,
0.3815205693244934,
-0.2566598951816559,
0.2669439911842346,
-0.034597255289554596,
0.0121261365711689,
0.19691553711891174,
0.15598991513252258,
0.1818741261959076,
-0.02121465653181076,
0.12770432233810425,
0.05045415461063385,
0.08151106536388397,
0.3798215389251709,
-0.31059086322784424,
-0.13076847791671753,
-0.04037906229496002,
-0.05648026242852211,
0.2996842563152313,
-0.19518771767616272,
0.2775528132915497,
0.36458390951156616,
-0.046621739864349365,
0.14421267807483673,
0.17208892107009888,
0.06203729286789894,
-0.1831689476966858,
-0.08832334727048874,
0.043875958770513535,
0.37643319368362427,
0.19930367171764374,
-0.18750643730163574,
0.010691214352846146,
-0.010401383973658085,
-0.15988658368587494,
0.22202184796333313,
0.20308242738246918,
0.14473287761211395,
-0.3186323642730713,
0.29119476675987244,
-0.15444408357143402,
-0.11431227624416351,
0.06611035764217377,
0.29838964343070984,
0.3015172481536865,
-0.4047538936138153,
0.07994984835386276,
-0.32625311613082886,
-0.11053165793418884,
0.022594470530748367,
0.0023557692766189575,
0.12059064209461212,
-0.16534927487373352,
-0.3502644896507263,
0.18892446160316467,
0.05592608079314232,
-0.12243282049894333,
-0.17725388705730438,
0.4358140826225281,
0.1314457803964615,
0.012807941995561123,
-0.0068431757390499115,
-0.07676704227924347,
-0.13365453481674194,
0.0905490517616272,
0.31845414638519287,
-0.12941254675388336,
0.26526299118995667,
0.308285117149353,
-0.04162117838859558,
0.09532126039266586,
-0.029094994068145752,
-0.15334740281105042,
0.006617572158575058,
0.26601868867874146,
0.01699257642030716,
-0.027303747832775116,
-0.22605761885643005,
-0.09763806313276291,
0.04538038372993469,
0.13449843227863312,
-0.16216467320919037,
0.23580318689346313,
0.2203364223241806,
-0.21116474270820618,
0.1350109726190567,
-0.24165812134742737,
-0.22167885303497314,
-0.19276811182498932,
-0.024006597697734833,
-0.3064241111278534,
0.3232101798057556,
-0.21550296247005463,
0.030778490006923676,
0.21926350891590118,
0.22864247858524323,
0.12452694773674011,
-0.3328416049480438,
0.049580495804548264,
0.24426186084747314,
-0.07066112756729126,
-0.19190284609794617,
-0.1807657778263092,
0.1621348112821579,
-0.14341820776462555,
0.127210795879364,
-0.5269023776054382,
-0.28438109159469604,
-0.6250813007354736,
-0.16398382186889648,
-0.07551518082618713,
0.043259620666503906,
-0.04253283143043518,
0.0424247607588768,
-0.07408882677555084,
0.01876528561115265,
-0.18799935281276703,
-0.02386648952960968,
0.16656339168548584,
-0.02686544507741928,
0.1522761881351471,
0.5379767417907715,
0.23275363445281982,
-0.017067722976207733,
0.36176934838294983,
0.08842625468969345,
0.32148072123527527,
0.0516975112259388,
0.2629353404045105,
-0.13866928219795227,
-0.37246671319007874,
0.06748773902654648,
-0.1779879331588745,
-0.22099356353282928,
-0.11301372945308685,
0.0773763507604599,
-0.3198990821838379,
0.04835107922554016,
0.04116084799170494,
0.16629022359848022,
-0.0980454757809639,
0.12784139811992645,
0.05553819239139557,
0.05503671243786812,
0.04543563351035118,
0.07972586899995804,
-0.24015140533447266,
-0.30986347794532776,
-0.0013643121346831322,
-0.30046939849853516,
-0.15475347638130188,
-0.05073424428701401,
-0.4285348057746887,
-0.18440911173820496,
-0.15889301896095276,
0.08870448172092438,
0.040931567549705505,
0.4422093331813812,
0.02098817750811577,
-0.09601335227489471,
0.272216796875,
0.07854911684989929,
0.5838005542755127,
0.07116951048374176,
-0.27430814504623413,
0.10661812126636505,
-0.15029838681221008,
-0.4098498523235321,
-0.10369398444890976,
-0.2241635024547577,
-0.3034038841724396,
0.1190052181482315,
0.34976938366889954,
-0.08476751297712326,
-0.07713787257671356,
0.3726256787776947,
0.12347617745399475,
-0.2390725463628769,
-0.2233981490135193,
-0.1856759637594223,
-0.4238951802253723,
0.028499925509095192,
-0.010604918003082275,
0.09093312919139862,
0.38644033670425415,
0.2742607295513153,
-0.2323635369539261,
-0.12782350182533264,
-0.15243224799633026,
0.24449482560157776,
0.019533943384885788,
0.3041962683200836,
-0.03866322711110115,
0.023720454424619675,
-0.04900836944580078,
-0.13804316520690918,
0.2339767962694168,
0.26459336280822754,
-0.009850431233644485,
0.30542075634002686,
-0.06049312651157379,
-0.12317212671041489,
0.47590968012809753,
0.2554226815700531,
-0.19519391655921936,
-0.006751649081707001,
-0.6397628784179688,
0.1354750096797943,
-0.5424964427947998,
-0.20602361857891083,
0.34587106108665466,
-0.08273177593946457,
0.05844865366816521,
-0.5172793865203857,
0.3737083673477173,
0.26009100675582886,
-0.055829498916864395,
0.2695465385913849,
0.09500697255134583,
-0.18651826679706573,
0.4251788854598999,
0.539887547492981,
0.84083092212677,
-0.46621084213256836,
0.2816390097141266,
0.44049349427223206,
-0.3512258529663086,
0.24334269762039185,
-0.2935880422592163,
0.16655753552913666,
-0.26788270473480225,
-0.1871425062417984,
0.049669116735458374,
-0.13620798289775848,
0.26336267590522766,
-0.10672956705093384,
0.040354806929826736,
0.15695826709270477,
-0.24588756263256073,
0.3079832196235657,
0.005725287366658449,
-0.10000397264957428,
0.02960737608373165,
-0.25634998083114624,
-0.17828871309757233,
0.2191707193851471,
-0.06220264732837677,
-0.5376234650611877,
0.035183195024728775,
0.15808182954788208,
-0.05042320489883423,
-0.025256305932998657,
-0.33525726199150085,
-0.08775768429040909,
0.10961426049470901,
0.5850803256034851,
-0.11985799670219421,
-0.012027189135551453,
-0.025781985372304916,
0.2631365954875946,
-0.051435574889183044,
0.13957083225250244,
0.19704946875572205,
-0.032978106290102005,
0.137455552816391,
0.16644982993602753,
0.39113712310791016,
-0.05996072292327881,
0.13992077112197876,
0.1100911870598793,
-0.19896787405014038,
0.17347285151481628,
0.19081546366214752,
-0.13039752840995789,
-0.4060678780078888,
0.1592635214328766,
0.27946409583091736,
-0.2965744137763977,
-0.29901888966560364,
-0.22925704717636108,
0.10244466364383698,
-0.08680768311023712,
0.19680975377559662,
-0.14404235780239105,
-0.028525536879897118,
0.7976745963096619,
-0.20685060322284698,
-0.3280477225780487,
-0.0903344601392746,
0.2069815695285797,
0.260489821434021,
0.2213554084300995,
0.19275663793087006,
0.15814334154129028,
-0.4046517014503479,
-0.13510668277740479,
0.3054153323173523,
0.2976472079753876,
0.22901928424835205,
0.1876332014799118,
-0.15949611365795135,
-0.05105632543563843,
-0.1650146245956421,
-0.21702340245246887,
-0.09111680090427399,
-0.0794011577963829,
-0.048750054091215134,
-0.31449103355407715,
-0.24948899447917938,
0.21767818927764893,
0.3560839593410492,
0.30117979645729065,
0.08144278079271317,
-0.30282098054885864,
-0.43946975469589233,
0.26159217953681946,
-0.32586658000946045,
0.05050446838140488,
-0.3093174695968628,
0.04602866619825363,
-0.11693763732910156,
-0.16651740670204163,
0.053312767297029495,
-0.2127954065799713,
0.13321544229984283,
-0.026266179978847504,
-0.037720613181591034,
-0.24394139647483826,
-0.06486701965332031,
0.05376647412776947,
-0.09236151725053787,
-0.3367469310760498,
-0.15771758556365967,
-0.6029282212257385,
-0.2959271967411041,
-0.3281968832015991,
0.12030540406703949,
0.44073158502578735,
0.06726367771625519,
0.03885248303413391,
-0.16881853342056274,
-0.3246081471443176,
0.3372490406036377,
0.31512656807899475,
-0.23109030723571777,
-0.05168239772319794,
0.32350248098373413,
0.19886593520641327,
0.11797166615724564,
-0.14514866471290588,
-0.10595332086086273,
0.26230430603027344,
-0.2560630440711975,
-0.20141881704330444,
0.3753282427787781,
-0.12439188361167908,
-0.2468367964029312,
0.28591033816337585,
0.07237044721841812,
0.2143319696187973,
-0.3251412510871887,
-0.19211667776107788,
0.08043908327817917,
0.21362930536270142,
-0.05800270289182663,
-0.2154977172613144,
0.12501084804534912,
0.11310400813817978,
-0.11123812198638916,
0.6137864589691162,
0.11647607386112213,
-0.13047660887241364,
-0.34858864545822144,
-0.13213008642196655,
0.511021614074707,
-0.07656998932361603,
-0.033567190170288086,
0.21480002999305725,
0.12225405871868134,
-0.33376216888427734,
0.2682056725025177,
0.28032591938972473,
0.40127524733543396,
0.7289242744445801,
0.14939206838607788,
-0.01561780832707882,
0.29774409532546997,
0.14432120323181152,
-0.2979227900505066,
-0.1401701420545578,
0.1355450600385666,
0.5377566814422607,
-0.23658078908920288,
0.07327284663915634,
-0.0621417760848999,
-0.01995731145143509,
0.1758299618959427,
-0.202261283993721,
-0.4183805584907532,
0.1336221843957901,
-0.1832091212272644,
-0.003120940178632736,
0.3196818232536316,
-0.07687448710203171,
-0.03925201669335365,
0.15395404398441315,
-0.09135372936725616,
-0.3969419002532959,
0.40545853972435,
-0.010036841034889221,
-0.0882670134305954,
-0.15513533353805542,
0.43491029739379883,
0.24511578679084778,
0.329193651676178,
-0.33138760924339294,
-0.0812440887093544,
0.212080717086792,
0.08568757027387619,
-0.12063907086849213,
0.050290171056985855,
0.26181384921073914,
0.2984680235385895,
0.18378007411956787,
0.1091480553150177,
0.0340915247797966,
-0.07265742868185043,
-0.0674227625131607,
0.26898953318595886,
-0.11871081590652466,
0.46311187744140625,
0.11886461079120636,
0.07914121448993683,
-0.11518017202615738,
-0.3984977900981903,
0.2270290106534958,
0.2367342710494995,
-0.35334616899490356,
0.4382907748222351,
-0.18438230454921722,
-0.11182275414466858,
0.05463138967752457,
-0.013510003685951233,
-0.3007481098175049,
-0.4128374457359314,
0.36966636776924133,
-0.24578961730003357,
0.2837944030761719,
0.08952933549880981,
0.10835129022598267,
-0.14921705424785614,
0.4489968717098236,
0.0055434852838516235,
-0.1558675467967987,
-0.16056755185127258,
-0.07831069827079773,
-0.2332698106765747,
-0.10799620300531387,
-0.4264284074306488,
-0.012513311579823494,
0.19852229952812195,
0.21182504296302795,
0.004910774528980255,
-0.16738201677799225,
-0.26190823316574097,
0.1618579924106598,
-0.2792803943157196,
0.18718481063842773,
-0.3502345085144043,
0.0058892518281936646,
0.08635206520557404,
-0.05044732242822647,
-0.08842670172452927,
-0.29306644201278687,
0.5253031849861145,
0.0011406652629375458,
0.07402882725000381,
-0.11581495404243469,
0.27566972374916077,
-0.17710037529468536,
0.2267519235610962,
0.23949667811393738,
0.10757043212652206,
0.09853602200746536,
0.15715205669403076,
-0.0426928885281086,
-0.09355653822422028,
0.005168119911104441,
0.022959265857934952,
0.03407702222466469,
-0.06579001247882843,
0.0576215460896492,
-0.30111417174339294,
-0.02738911285996437,
0.08452100306749344,
0.44022616744041443,
-0.030231855809688568,
-0.06483426690101624,
0.023884208872914314,
0.015515115112066269,
-0.09028276801109314,
0.20691946148872375,
0.015932880342006683,
-0.026512764394283295,
-0.065107062458992,
0.43818700313568115,
-0.02265045791864395,
-0.3131832182407379,
0.37474530935287476,
0.023813679814338684,
-0.34804195165634155,
0.19492501020431519,
0.2686975598335266,
0.12140752375125885,
-0.12707816064357758,
-0.38519155979156494,
-0.15974849462509155,
0.26316404342651367,
-0.15241771936416626,
-0.07872771471738815,
0.4371876120567322,
-0.21045510470867157,
-0.04971589148044586,
-0.11338333785533905,
0.200792595744133,
-0.33379048109054565,
-0.08334577083587646,
0.18600770831108093,
-0.04668905958533287
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | @lhoestq yeah that's intentional, i.e. i really want to load the whole column into the memory. but as said above there's an unreasonable amount of overhead for the memory. the np array itself is using about 1G of memory:
```
>>> getsizeof(data)/1024/1024
937.5001525878906
```
that accessing of column above is using 10x memory compared to the original numpy array. | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 59 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
@lhoestq yeah that's intentional, i.e. i really want to load the whole column into the memory. but as said above there's an unreasonable amount of overhead for the memory. the np array itself is using about 1G of memory:
```
>>> getsizeof(data)/1024/1024
937.5001525878906
```
that accessing of column above is using 10x memory compared to the original numpy array. | [
0.11036120355129242,
0.024429887533187866,
-0.06039049103856087,
0.5220662951469421,
0.503948986530304,
0.16475358605384827,
0.32889851927757263,
0.16101008653640747,
0.28585320711135864,
0.05438791215419769,
-0.0773075595498085,
0.40909239649772644,
-0.16685950756072998,
-0.038427118211984634,
-0.02891993150115013,
-0.16344058513641357,
0.2368711531162262,
0.03137864172458649,
-0.1980701982975006,
0.13600902259349823,
-0.4258130192756653,
-0.13779176771640778,
-0.22183823585510254,
0.08963967859745026,
-0.13107283413410187,
-0.22195595502853394,
0.06127755343914032,
-0.09743956476449966,
-0.08542510122060776,
-0.10269716382026672,
0.21948961913585663,
-0.20646359026432037,
0.05160859227180481,
0.13496801257133484,
-0.00010925327660515904,
-0.16000589728355408,
0.19036486744880676,
0.05882543325424194,
-0.11225378513336182,
0.6578004956245422,
0.17198923230171204,
-0.48139968514442444,
-0.1215917244553566,
-0.445110023021698,
0.24658232927322388,
-0.4762630760669708,
-0.21327561140060425,
-0.5797411799430847,
-0.0738600641489029,
0.061458077281713486,
0.24026130139827728,
0.12423808872699738,
0.13839881122112274,
0.2820335626602173,
0.19583342969417572,
0.01986207813024521,
-0.19583870470523834,
-0.26780885457992554,
-0.02342338114976883,
-0.368376225233078,
0.1760101318359375,
0.2746281027793884,
-0.22043389081954956,
0.055431995540857315,
0.27851369976997375,
0.18746806681156158,
-0.15775048732757568,
0.12583515048027039,
-0.05478673428297043,
-0.009356223046779633,
0.36437612771987915,
-0.4591820538043976,
-0.07191114872694016,
-0.23729312419891357,
-0.08709514886140823,
-0.08613365143537521,
0.07367876172065735,
0.2652484178543091,
-0.14733284711837769,
0.09697094559669495,
-0.35710129141807556,
0.14784041047096252,
-0.06396793574094772,
0.25525665283203125,
-0.09404277801513672,
-0.5117002725601196,
0.033856283873319626,
0.12077800929546356,
0.16459013521671295,
-0.41150009632110596,
0.2428162842988968,
-0.23742598295211792,
0.17842024564743042,
0.12089944630861282,
-0.3202899396419525,
-0.11346258968114853,
0.06631682813167572,
-0.3315659165382385,
0.03838310390710831,
-0.32337599992752075,
0.07883807271718979,
0.018938809633255005,
0.11297354847192764,
0.15327361226081848,
0.022601470351219177,
0.30417293310165405,
-0.5248118042945862,
0.14235453307628632,
0.25713032484054565,
-0.12044394761323929,
0.3295406401157379,
-0.11127281934022903,
-0.007528635673224926,
0.3175460398197174,
0.33199113607406616,
-0.42180687189102173,
0.1478884220123291,
0.08012814819812775,
-0.3428953289985657,
0.19813284277915955,
-0.27078118920326233,
0.27939504384994507,
0.05902368575334549,
0.20572295784950256,
0.04614604264497757,
0.3906543254852295,
0.029186680912971497,
0.006272351369261742,
-0.08698770403862,
-0.11730607599020004,
-0.27405399084091187,
0.30859485268592834,
-0.131397545337677,
0.10253162682056427,
0.12571798264980316,
0.7979198694229126,
-0.1466190069913864,
0.14798004925251007,
-0.03213872015476227,
-0.17146480083465576,
0.0859379768371582,
-0.30797868967056274,
0.15135088562965393,
0.263783723115921,
-0.1887347251176834,
0.016076525673270226,
0.009277723729610443,
0.2107287496328354,
-0.16820822656154633,
0.20469504594802856,
-0.07614169269800186,
-0.27653008699417114,
-0.1660161316394806,
0.13601179420948029,
-0.03148092329502106,
0.1788608729839325,
-0.31823763251304626,
0.041541390120983124,
0.4608507454395294,
0.06580765545368195,
0.052818916738033295,
-0.1379619687795639,
-0.17202508449554443,
-0.41468995809555054,
0.09259245544672012,
0.2930143177509308,
-0.41684862971305847,
0.2519793212413788,
0.058018580079078674,
0.1769721657037735,
0.19537094235420227,
0.333713561296463,
-0.08094920217990875,
0.049083516001701355,
-0.043523699045181274,
-0.25909334421157837,
0.028653323650360107,
-0.20301808416843414,
-0.34085506200790405,
-0.0338415652513504,
0.23642967641353607,
0.3620217740535736,
0.2567335069179535,
0.42457857728004456,
-0.12278333306312561,
0.19074252247810364,
-0.013139404356479645,
0.3087543249130249,
0.0684640035033226,
0.33689039945602417,
-0.21453683078289032,
-0.6204268932342529,
0.04586134850978851,
0.10329551994800568,
-0.09618514776229858,
-0.19523662328720093,
0.0449373796582222,
0.15220394730567932,
0.2018468677997589,
-0.3706873953342438,
-0.03711233288049698,
0.08737856149673462,
0.21060380339622498,
0.03441872075200081,
-0.03591841086745262,
-0.3225068747997284,
-0.3536911606788635,
0.2667434513568878,
0.32280266284942627,
-0.38527578115463257,
0.050294023007154465,
-0.2627626061439514,
0.06634801626205444,
0.14815913140773773,
0.1758986860513687,
0.08938232064247131,
0.12087368965148926,
-0.046807654201984406,
0.05799781158566475,
-0.08399097621440887,
0.023298893123865128,
0.438215047121048,
-0.26029425859451294,
-0.07466009259223938,
-0.4803808629512787,
0.2347549945116043,
-0.005633784458041191,
-0.04879432171583176,
-0.10370194166898727,
0.23027968406677246,
0.07290658354759216,
0.14719806611537933,
0.20101869106292725,
0.12978753447532654,
0.34611746668815613,
-0.12354488670825958,
-0.4558311402797699,
0.4613473415374756,
0.05368616431951523,
0.13321086764335632,
0.3583326041698456,
-0.1800384670495987,
0.27173057198524475,
-0.05660650134086609,
-0.10099967569112778,
0.1979462206363678,
0.1134941577911377,
0.17987073957920074,
-0.010332580655813217,
0.1527339369058609,
0.06681545078754425,
0.09055377542972565,
0.40092673897743225,
-0.2899834215641022,
-0.06744512915611267,
-0.05540389195084572,
-0.027864867821335793,
0.251281201839447,
-0.17196446657180786,
0.331294447183609,
0.27411630749702454,
-0.02668275684118271,
0.15101084113121033,
0.14308089017868042,
0.12587063014507294,
-0.23273199796676636,
-0.0781334862112999,
0.038320790976285934,
0.3772464990615845,
0.20493610203266144,
-0.1738927662372589,
-0.034300513565540314,
0.03846438229084015,
-0.16489562392234802,
0.20561839640140533,
0.22774171829223633,
0.19618161022663116,
-0.30870941281318665,
0.32839512825012207,
-0.17678721249103546,
-0.11607277393341064,
0.061754923313856125,
0.32121995091438293,
0.2694464325904846,
-0.40904927253723145,
0.1327424943447113,
-0.289823442697525,
-0.1593325436115265,
0.04970332980155945,
0.10047239065170288,
0.18749505281448364,
-0.15833865106105804,
-0.37594395875930786,
0.16713480651378632,
0.06754396855831146,
-0.17417795956134796,
-0.11264683306217194,
0.4014331102371216,
0.10996034741401672,
-0.039463236927986145,
0.038209810853004456,
-0.0815705955028534,
-0.13147062063217163,
0.06110209599137306,
0.32272869348526,
-0.13945066928863525,
0.2405320554971695,
0.32845503091812134,
-0.09619373083114624,
0.13148969411849976,
0.02130606770515442,
-0.17501476407051086,
0.03959154710173607,
0.3021342158317566,
0.029017716646194458,
-0.03278593719005585,
-0.249365895986557,
0.010270469821989536,
-0.016589390113949776,
0.17305077612400055,
-0.19220057129859924,
0.23899060487747192,
0.21980500221252441,
-0.21068434417247772,
0.126663476228714,
-0.22130253911018372,
-0.25131383538246155,
-0.1798584908246994,
0.1225343644618988,
-0.29808375239372253,
0.33875489234924316,
-0.12624216079711914,
0.008351578377187252,
0.15702545642852783,
0.26241666078567505,
0.10553009808063507,
-0.3074606955051422,
0.11718405783176422,
0.26471513509750366,
-0.06746109575033188,
-0.19021505117416382,
-0.2736506462097168,
0.1598643660545349,
-0.1745629906654358,
0.1545799821615219,
-0.5301364660263062,
-0.30089083313941956,
-0.6025137305259705,
-0.15746468305587769,
-0.03712671250104904,
-0.01458326168358326,
-0.014713481068611145,
0.038566023111343384,
-0.03281029686331749,
0.0039406344294548035,
-0.19033360481262207,
-0.009016409516334534,
0.1694759726524353,
-0.019303448498249054,
0.17303982377052307,
0.5187487602233887,
0.25119882822036743,
-0.011915408074855804,
0.37471696734428406,
0.15255747735500336,
0.27207428216934204,
0.05685480311512947,
0.2746848165988922,
-0.09817730635404587,
-0.33652424812316895,
0.049220990389585495,
-0.14752796292304993,
-0.23262986540794373,
-0.13051138818264008,
0.0979304313659668,
-0.2791648209095001,
0.07459158450365067,
0.08164714276790619,
0.23423340916633606,
-0.038685694336891174,
0.12339071184396744,
-0.009509816765785217,
0.05812134966254234,
0.11060526967048645,
0.1577473282814026,
-0.31440281867980957,
-0.32150915265083313,
-0.056985363364219666,
-0.32590025663375854,
-0.11347007006406784,
-0.03283093497157097,
-0.5895121097564697,
-0.18902146816253662,
-0.16792556643486023,
0.05037311464548111,
0.042097870260477066,
0.5464712381362915,
-0.010859277099370956,
-0.07626993954181671,
0.23826315999031067,
0.03669248893857002,
0.5764471292495728,
0.11357401311397552,
-0.25367605686187744,
0.1134198009967804,
-0.16976876556873322,
-0.5257401466369629,
-0.12111896276473999,
-0.15017306804656982,
-0.2669336497783661,
0.1440972089767456,
0.30166828632354736,
-0.10572844743728638,
-0.07983769476413727,
0.258409321308136,
0.17100031673908234,
-0.31500083208084106,
-0.22430981695652008,
-0.18205980956554413,
-0.482232004404068,
0.08338749408721924,
-0.06067761033773422,
0.11418787389993668,
0.44152939319610596,
0.28616729378700256,
-0.16627152264118195,
-0.14013157784938812,
-0.11907403916120529,
0.2864837348461151,
0.038150444626808167,
0.3206852674484253,
-0.03517468646168709,
0.016878224909305573,
-0.032786980271339417,
-0.17811059951782227,
0.1368548721075058,
0.267522394657135,
-0.013099875301122665,
0.3294963240623474,
-0.10697419196367264,
-0.17200611531734467,
0.4008001387119293,
0.29637789726257324,
-0.20282690227031708,
-0.055908478796482086,
-0.6390583515167236,
0.029345203191041946,
-0.49222332239151,
-0.17231842875480652,
0.28291216492652893,
-0.14382752776145935,
0.07120966911315918,
-0.5527506470680237,
0.44770070910453796,
0.3282250165939331,
-0.08907198905944824,
0.3412312865257263,
0.07514641433954239,
-0.16702231764793396,
0.42736631631851196,
0.4954247772693634,
0.7723358869552612,
-0.44758057594299316,
0.30641940236091614,
0.48064133524894714,
-0.3790266513824463,
0.31351277232170105,
-0.2870098948478699,
0.223501518368721,
-0.24927052855491638,
-0.10324368625879288,
0.036949217319488525,
-0.14911463856697083,
0.17531052231788635,
-0.05691064894199371,
0.11557678878307343,
0.1809621900320053,
-0.23997682332992554,
0.23628751933574677,
0.061310842633247375,
-0.030209198594093323,
0.054620854556560516,
-0.26551511883735657,
-0.16944767534732819,
0.17674139142036438,
-0.08558312058448792,
-0.46767160296440125,
0.041655655950307846,
0.09192062169313431,
-0.08905176818370819,
0.008112780749797821,
-0.33977213501930237,
-0.0620027557015419,
0.10777197033166885,
0.609527051448822,
-0.11564256250858307,
-0.049447089433670044,
-0.009794394485652447,
0.25360891222953796,
-0.038452617824077606,
0.08644567430019379,
0.14650322496891022,
-0.03975825384259224,
0.13190537691116333,
0.13150769472122192,
0.37631237506866455,
-0.05161135271191597,
0.11461241543292999,
0.12146501988172531,
-0.14533574879169464,
0.0956839993596077,
0.11448520421981812,
-0.12191788107156754,
-0.47060874104499817,
0.1202743798494339,
0.2493094503879547,
-0.24439352750778198,
-0.2779967784881592,
-0.2480800747871399,
0.10926143825054169,
-0.10845258831977844,
0.14980024099349976,
-0.10950779914855957,
0.011159442365169525,
0.8136395215988159,
-0.14280378818511963,
-0.28741586208343506,
-0.003339264541864395,
0.2462313175201416,
0.22320738434791565,
0.2009577453136444,
0.26145440340042114,
0.15389102697372437,
-0.38705605268478394,
-0.11964593082666397,
0.2795203626155853,
0.27100419998168945,
0.21452480554580688,
0.22774288058280945,
-0.21734246611595154,
-0.04966031759977341,
-0.1674390286207199,
-0.2653430700302124,
-0.08272093534469604,
-0.0933007225394249,
-0.04611244797706604,
-0.296922504901886,
-0.2701576352119446,
0.21990352869033813,
0.3506617248058319,
0.31878185272216797,
0.08982089906930923,
-0.343007892370224,
-0.43403685092926025,
0.27496445178985596,
-0.270244836807251,
0.014807518571615219,
-0.2960636615753174,
-0.030193474143743515,
-0.04403921216726303,
-0.15008482336997986,
0.04717995226383209,
-0.28672340512275696,
0.07384037226438522,
-0.08678179234266281,
-0.05096729099750519,
-0.18477293848991394,
-0.032121822237968445,
0.09162130951881409,
-0.09407920390367508,
-0.41806530952453613,
-0.12475328147411346,
-0.6294801831245422,
-0.2799970507621765,
-0.3181445300579071,
0.052830975502729416,
0.4515446424484253,
0.07189837098121643,
0.025552112609148026,
-0.20943479239940643,
-0.29665789008140564,
0.2803260087966919,
0.3448154032230377,
-0.22465938329696655,
-0.09044787287712097,
0.342634916305542,
0.2158343642950058,
0.2183264195919037,
-0.15671759843826294,
-0.17678560316562653,
0.2418050765991211,
-0.24627377092838287,
-0.2328096628189087,
0.3489454388618469,
-0.20332331955432892,
-0.22848854959011078,
0.24723850190639496,
0.013915415853261948,
0.29252493381500244,
-0.3281676471233368,
-0.0941198468208313,
0.007720053195953369,
0.16147640347480774,
-0.05985763669013977,
-0.22521892189979553,
0.0898405909538269,
0.1557261347770691,
-0.17853668332099915,
0.6002298593521118,
0.1993464231491089,
-0.22696365416049957,
-0.4174933433532715,
-0.08089916408061981,
0.5300517082214355,
-0.04459035396575928,
-0.11117364466190338,
0.26374778151512146,
0.12650790810585022,
-0.32458823919296265,
0.2904345393180847,
0.26237839460372925,
0.41614416241645813,
0.7858757972717285,
0.1093895435333252,
-0.028947552666068077,
0.3028052747249603,
0.1460205614566803,
-0.35064077377319336,
-0.11196659505367279,
0.05998558551073074,
0.5413044691085815,
-0.21065735816955566,
0.06765640527009964,
-0.011403225362300873,
-0.023790352046489716,
0.15709608793258667,
-0.22097229957580566,
-0.37586796283721924,
0.12774647772312164,
-0.19499441981315613,
-0.04365484416484833,
0.2543574273586273,
-0.097957082092762,
0.024043649435043335,
0.12366998195648193,
-0.09346386790275574,
-0.4370526671409607,
0.43339741230010986,
-0.03490135818719864,
-0.12376268208026886,
-0.1819688379764557,
0.4761100709438324,
0.2886791527271271,
0.36974024772644043,
-0.33951327204704285,
-0.12667958438396454,
0.22099313139915466,
0.06617239862680435,
-0.1292024403810501,
0.05656620115041733,
0.2627505660057068,
0.23251329362392426,
0.14751499891281128,
0.058348044753074646,
0.03467167913913727,
-0.09444987028837204,
-0.09914705902338028,
0.2654491662979126,
-0.17098936438560486,
0.45037686824798584,
0.14117302000522614,
0.02700899727642536,
-0.046644486486911774,
-0.3748915493488312,
0.3025921881198883,
0.17345526814460754,
-0.3881022036075592,
0.5790128707885742,
-0.21664461493492126,
-0.18369340896606445,
0.07099613547325134,
0.05857935547828674,
-0.20672103762626648,
-0.35484063625335693,
0.3972241282463074,
-0.1949358880519867,
0.28790566325187683,
0.09625422209501266,
0.07837262749671936,
-0.17256779968738556,
0.44633206725120544,
0.0011187940835952759,
-0.17954561114311218,
-0.13186827301979065,
-0.04392192140221596,
-0.24915039539337158,
-0.15865203738212585,
-0.510800302028656,
-0.06375465542078018,
0.21446441113948822,
0.22519917786121368,
0.009281009435653687,
-0.1880052387714386,
-0.3473719358444214,
0.22260282933712006,
-0.29804784059524536,
0.23145729303359985,
-0.3637498617172241,
-0.043499935418367386,
0.1129162609577179,
-0.03275744616985321,
-0.08624328672885895,
-0.36074042320251465,
0.500573992729187,
0.007764139212667942,
0.03323046863079071,
-0.1248977780342102,
0.29654237627983093,
-0.1937355101108551,
0.290654718875885,
0.2572231888771057,
0.11944475024938583,
0.08594954013824463,
0.19689181447029114,
-0.060527630150318146,
-0.17253327369689941,
0.033549968153238297,
0.04442519322037697,
0.05429273471236229,
-0.08061203360557556,
0.08548243343830109,
-0.3143939673900604,
0.06490004062652588,
0.10619008541107178,
0.3857358992099762,
-0.04460735619068146,
0.01373771671205759,
0.015954289585351944,
0.014790404587984085,
-0.16669341921806335,
0.24854129552841187,
0.05815247818827629,
-0.031985603272914886,
-0.08483722805976868,
0.3468407392501831,
-0.08478794246912003,
-0.2920839190483093,
0.3645099103450775,
0.006593747995793819,
-0.3574453592300415,
0.23790349066257477,
0.2219598889350891,
0.1453068107366562,
-0.1776183843612671,
-0.33705389499664307,
-0.14353591203689575,
0.2774999141693115,
-0.19291609525680542,
-0.08575861155986786,
0.3670876622200012,
-0.24103495478630066,
-0.0565413162112236,
-0.12209853529930115,
0.25545185804367065,
-0.3218671679496765,
-0.12287827581167221,
0.15247765183448792,
-0.032628387212753296
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | The dataset must be twice as big because we use regular arrow ListArray under the hood and not FixedSizeListArray. Basically we store unnecessary offsets.
And this should affect performance as well. When we developed this, FixedSizeListArray still had some issues but they should be resolved on the PyArrow side now | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 50 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
The dataset must be twice as big because we use regular arrow ListArray under the hood and not FixedSizeListArray. Basically we store unnecessary offsets.
And this should affect performance as well. When we developed this, FixedSizeListArray still had some issues but they should be resolved on the PyArrow side now | [
0.10385605692863464,
0.07983541488647461,
-0.058831118047237396,
0.5339334011077881,
0.49100297689437866,
0.13009634613990784,
0.36716458201408386,
0.10422544181346893,
0.10174518823623657,
-0.016853556036949158,
-0.13531047105789185,
0.4506663382053375,
-0.23931749165058136,
-0.0919153243303299,
-0.019918125122785568,
-0.18857714533805847,
0.260727196931839,
0.03621424734592438,
-0.1786332130432129,
0.12704330682754517,
-0.3794858157634735,
-0.16441883146762848,
-0.30121955275535583,
0.11462116241455078,
-0.09187005460262299,
-0.2151910662651062,
0.04653378576040268,
-0.13686969876289368,
-0.0630565658211708,
-0.22165925800800323,
0.232917919754982,
-0.23255950212478638,
0.10681362450122833,
0.06434890627861023,
-0.00011176439875271171,
-0.15489929914474487,
0.20174337923526764,
0.03283142298460007,
-0.08096563816070557,
0.6650311350822449,
0.1050153449177742,
-0.42154204845428467,
-0.05865047872066498,
-0.4481762647628784,
0.24340182542800903,
-0.5238027572631836,
-0.3057093322277069,
-0.4466259479522705,
-0.06834451854228973,
0.09841851890087128,
0.23047740757465363,
0.0209709070622921,
0.20291723310947418,
0.32628002762794495,
0.3835390508174896,
0.013907559216022491,
-0.2200384885072708,
-0.16583596169948578,
0.08271114528179169,
-0.29711005091667175,
0.11157838255167007,
0.2530897259712219,
-0.27936798334121704,
0.0023569706827402115,
0.2256702184677124,
0.20667453110218048,
-0.2757106423377991,
0.08296573162078857,
-0.010598249733448029,
-0.008514702320098877,
0.3670990765094757,
-0.6097263693809509,
0.001797869917936623,
-0.24169418215751648,
-0.10299194604158401,
-0.11185595393180847,
0.10990474373102188,
0.29266732931137085,
-0.1319587081670761,
0.12680818140506744,
-0.2889561653137207,
0.10010800510644913,
-0.15043070912361145,
0.263232558965683,
-0.08120828121900558,
-0.36835771799087524,
0.10328955203294754,
0.17987459897994995,
0.1257079541683197,
-0.4276423454284668,
0.2984534502029419,
-0.25756844878196716,
0.16726361215114594,
0.14413295686244965,
-0.35895201563835144,
-0.10240490734577179,
-0.051307663321495056,
-0.2931089401245117,
0.054969437420368195,
-0.3029789924621582,
0.008301685564219952,
0.016042564064264297,
0.21896381676197052,
0.13846167922019958,
-0.04587117210030556,
0.33141401410102844,
-0.5166367888450623,
0.1888682097196579,
0.2446558177471161,
-0.16521266102790833,
0.2877737283706665,
-0.13683149218559265,
0.02003069594502449,
0.3196975588798523,
0.40910300612449646,
-0.41593238711357117,
0.10608404874801636,
0.057886477559804916,
-0.29621538519859314,
0.18534302711486816,
-0.40376052260398865,
0.22276751697063446,
0.07408556342124939,
0.23219799995422363,
0.007010988891124725,
0.258740097284317,
-0.07984621077775955,
0.07413729280233383,
-0.030162068083882332,
-0.14811083674430847,
-0.22339536249637604,
0.20824222266674042,
-0.17289625108242035,
0.11081008613109589,
0.1479054093360901,
0.681031346321106,
-0.1330135017633438,
0.2298775166273117,
-0.050004519522190094,
-0.12437910586595535,
0.11344419419765472,
-0.32954952120780945,
0.19934891164302826,
0.25323325395584106,
-0.17796026170253754,
0.06987430900335312,
-0.09117214381694794,
0.23195897042751312,
-0.1533127874135971,
0.31628724932670593,
-0.11459208279848099,
-0.3464733064174652,
-0.1980985552072525,
0.10369516909122467,
-0.05157338082790375,
0.13073387742042542,
-0.3322397768497467,
0.05421261116862297,
0.5112810730934143,
0.07111401855945587,
0.09104137122631073,
-0.16998593509197235,
-0.05139646679162979,
-0.45519763231277466,
0.06914197653532028,
0.1925208419561386,
-0.520291805267334,
0.2977141737937927,
0.05880027636885643,
0.1414240300655365,
0.2181413173675537,
0.3296090066432953,
-0.13956238329410553,
0.040576666593551636,
-0.04222824424505234,
-0.14114798605442047,
0.02695252001285553,
-0.12979894876480103,
-0.5052571892738342,
-0.15176141262054443,
0.32963359355926514,
0.31538835167884827,
0.25392717123031616,
0.4016663432121277,
0.033084794878959656,
0.16650819778442383,
-0.07741564512252808,
0.23117847740650177,
0.10364339500665665,
0.37690380215644836,
-0.25551724433898926,
-0.6490448713302612,
0.01163884811103344,
0.10501207411289215,
-0.10725979506969452,
-0.31491678953170776,
0.12738321721553802,
0.09485770016908646,
0.22284483909606934,
-0.39936649799346924,
0.0013469187542796135,
0.081631138920784,
0.2595718204975128,
0.039460502564907074,
0.02607611194252968,
-0.3496512174606323,
-0.44765180349349976,
0.233127623796463,
0.21715237200260162,
-0.37998661398887634,
-0.010509513318538666,
-0.2571900486946106,
0.03586740791797638,
0.18069301545619965,
0.1423005908727646,
0.04353281483054161,
0.10583041608333588,
-0.0823763757944107,
0.13150052726268768,
-0.06288692355155945,
0.008670058101415634,
0.31793907284736633,
-0.24091798067092896,
-0.032875653356313705,
-0.35006120800971985,
0.34523144364356995,
0.024034153670072556,
-0.20325127243995667,
-0.1103864461183548,
0.22596409916877747,
0.10467998683452606,
0.12552370131015778,
0.18686994910240173,
0.14702165126800537,
0.352774441242218,
-0.12093302607536316,
-0.46052393317222595,
0.530113935470581,
0.11676739156246185,
0.04540480300784111,
0.3626294732093811,
-0.13460375368595123,
0.26622337102890015,
-0.003701206296682358,
-0.02377905696630478,
0.19536466896533966,
0.13182435929775238,
0.19412806630134583,
-0.03020830638706684,
0.12300098687410355,
0.06679762899875641,
0.0962873250246048,
0.3719558119773865,
-0.1973724067211151,
-0.05937105789780617,
-0.08225640654563904,
0.019768938422203064,
0.2806328535079956,
-0.22069914638996124,
0.3286091983318329,
0.40632912516593933,
-0.06131620332598686,
0.20637154579162598,
0.24131643772125244,
-0.017486795783042908,
-0.19248846173286438,
-0.008205251768231392,
-0.014197960495948792,
0.3470572829246521,
0.2154897004365921,
-0.25579833984375,
-0.0068411026149988174,
0.008200086653232574,
-0.1458425670862198,
0.2650725841522217,
0.17494675517082214,
0.24488826096057892,
-0.2349320650100708,
0.39562609791755676,
-0.16822656989097595,
-0.10590031743049622,
0.010727941989898682,
0.33977583050727844,
0.3067067861557007,
-0.4196874499320984,
0.1182241216301918,
-0.26665323972702026,
-0.09854070097208023,
0.030973538756370544,
-0.011805103160440922,
0.12599262595176697,
-0.10850247740745544,
-0.3328038454055786,
0.26133087277412415,
0.07873980700969696,
-0.054648637771606445,
-0.086867555975914,
0.3407420516014099,
0.10300770401954651,
-0.09242694079875946,
-0.03199908882379532,
-0.15660764276981354,
-0.1591813862323761,
0.026019595563411713,
0.32705411314964294,
-0.25226736068725586,
0.21590664982795715,
0.3615402281284332,
-0.06597480177879333,
0.11335286498069763,
-0.06255879998207092,
-0.14406991004943848,
0.07450893521308899,
0.2722105085849762,
-0.0036577582359313965,
-0.08032181859016418,
-0.2295651137828827,
-0.025777524337172508,
0.032571941614151,
0.21354185044765472,
-0.1912815421819687,
0.23513254523277283,
0.14665557444095612,
-0.20104077458381653,
0.17406146228313446,
-0.23747768998146057,
-0.2502537965774536,
-0.11372585594654083,
0.08464497327804565,
-0.36325541138648987,
0.3457599878311157,
-0.22823837399482727,
0.04036472365260124,
0.18351933360099792,
0.12766966223716736,
0.00789785198867321,
-0.2537743151187897,
0.1733817309141159,
0.26373136043548584,
-0.04753784090280533,
-0.20760348439216614,
-0.2758263349533081,
0.07714032381772995,
-0.17203406989574432,
0.1735682338476181,
-0.5209938287734985,
-0.2525831162929535,
-0.5876621603965759,
-0.06915108114480972,
-0.05764008313417435,
-0.04516586661338806,
0.04425058141350746,
0.06878425180912018,
0.016277121379971504,
-0.01722753793001175,
-0.16465193033218384,
0.02646276354789734,
0.1154131293296814,
-0.028787024319171906,
0.20441684126853943,
0.4490167498588562,
0.22693443298339844,
0.15217027068138123,
0.3348037302494049,
0.13443656265735626,
0.27597686648368835,
0.000895744189620018,
0.15968897938728333,
-0.17146903276443481,
-0.34352222084999084,
0.03135240823030472,
-0.17030268907546997,
-0.23959800601005554,
-0.12771905958652496,
0.09737566858530045,
-0.4194281995296478,
0.1404649317264557,
0.06884925067424774,
0.23144561052322388,
-0.06455804407596588,
0.1914108842611313,
0.09311679750680923,
0.0810919851064682,
0.1615634262561798,
0.07642867416143417,
-0.2480495125055313,
-0.40626174211502075,
-0.03751053661108017,
-0.3877716064453125,
-0.161108136177063,
-0.02514665573835373,
-0.46705812215805054,
-0.28184834122657776,
-0.16758590936660767,
0.05302662402391434,
0.11971201002597809,
0.42474326491355896,
0.04681694880127907,
-0.04064815863966942,
0.33745771646499634,
0.02791653759777546,
0.5257859230041504,
0.11012381315231323,
-0.2663184404373169,
0.07858629524707794,
-0.07769164443016052,
-0.4830208420753479,
-0.10691498965024948,
-0.21616163849830627,
-0.2792438268661499,
0.11700806021690369,
0.28656691312789917,
-0.15572376549243927,
-0.054976146668195724,
0.20511719584465027,
0.14231188595294952,
-0.293000191450119,
-0.2305087149143219,
-0.1409478634595871,
-0.42769333720207214,
0.029469182714819908,
-0.0028418749570846558,
0.08656544238328934,
0.3808783292770386,
0.30613771080970764,
-0.1586056351661682,
-0.181840717792511,
-0.13638970255851746,
0.17461258172988892,
0.03665093332529068,
0.37031951546669006,
-0.09030897915363312,
0.03148854896426201,
-0.06604871153831482,
-0.1422627568244934,
0.28449323773384094,
0.22328798472881317,
0.0495123453438282,
0.2973479926586151,
-0.1115141436457634,
-0.18461671471595764,
0.4446781575679779,
0.21939843893051147,
-0.2444019466638565,
-0.012868955731391907,
-0.6850582361221313,
0.09101598709821701,
-0.4756430685520172,
-0.2629680335521698,
0.3396846055984497,
-0.12472067773342133,
0.09314259141683578,
-0.48257365822792053,
0.4022599756717682,
0.2485794872045517,
-0.14321358501911163,
0.36650440096855164,
0.09807396680116653,
-0.1912086009979248,
0.4622277021408081,
0.5405227541923523,
0.8661547899246216,
-0.4193304181098938,
0.3359329104423523,
0.5520748496055603,
-0.4326915144920349,
0.2208591252565384,
-0.20555764436721802,
0.2267318069934845,
-0.3164547085762024,
-0.0016492567956447601,
0.07883135229349136,
-0.18547648191452026,
0.18665064871311188,
-0.05169089138507843,
0.08240720629692078,
0.11597729474306107,
-0.2108602672815323,
0.2797645330429077,
0.052088066935539246,
-0.07041583210229874,
0.11927366256713867,
-0.21955157816410065,
-0.19698183238506317,
0.14347225427627563,
-0.09089010953903198,
-0.530971109867096,
0.04140099138021469,
0.07351856678724289,
-0.15195487439632416,
0.010881971567869186,
-0.37225842475891113,
-0.11614098399877548,
0.014139242470264435,
0.5621452331542969,
-0.10769093036651611,
-0.13812017440795898,
-0.02437473274767399,
0.23951801657676697,
-0.15177226066589355,
-0.02356809750199318,
0.17412720620632172,
-0.03462657704949379,
0.19172203540802002,
0.14186924695968628,
0.46385106444358826,
-0.0887679010629654,
0.09114104509353638,
0.09730114787817001,
-0.22902560234069824,
0.15674006938934326,
0.12105457484722137,
-0.15815263986587524,
-0.45181673765182495,
0.11360228061676025,
0.3656511902809143,
-0.2633450925350189,
-0.1845238208770752,
-0.2425333559513092,
0.09436522424221039,
-0.07868757098913193,
0.11858749389648438,
-0.16304072737693787,
0.05423688516020775,
0.8736754655838013,
-0.23603926599025726,
-0.28464192152023315,
-0.0855821818113327,
0.2087050825357437,
0.3057991862297058,
0.26867303252220154,
0.3055243492126465,
0.1471683233976364,
-0.39767521619796753,
-0.08771423995494843,
0.3454239070415497,
0.25900790095329285,
0.0034783780574798584,
0.1565384715795517,
-0.2314521223306656,
-0.04254943132400513,
-0.20478637516498566,
-0.2083606719970703,
-0.06593412905931473,
-0.03215198963880539,
-0.07387745380401611,
-0.31254059076309204,
-0.268937349319458,
0.18223755061626434,
0.4243749976158142,
0.19625577330589294,
0.042987920343875885,
-0.3260166645050049,
-0.38923001289367676,
0.21310703456401825,
-0.25123363733291626,
0.05976751446723938,
-0.22350451350212097,
0.07550598680973053,
-0.15226471424102783,
-0.15940120816230774,
0.12905019521713257,
-0.25029996037483215,
0.048440106213092804,
-0.07260668277740479,
0.003525249660015106,
-0.18415221571922302,
-0.026548054069280624,
0.09728748351335526,
-0.14566642045974731,
-0.4266988933086395,
-0.2065797746181488,
-0.6421923041343689,
-0.2490847110748291,
-0.26133835315704346,
0.10532324016094208,
0.43865838646888733,
0.08767902851104736,
0.02332387864589691,
-0.12811580300331116,
-0.3772943317890167,
0.20418474078178406,
0.307315856218338,
-0.22953656315803528,
-0.0803007036447525,
0.3193555176258087,
0.2884518504142761,
0.16638590395450592,
-0.1578824818134308,
-0.1166454404592514,
0.23667845129966736,
-0.23380418121814728,
-0.2026401162147522,
0.4124032258987427,
-0.2554725408554077,
-0.2607685327529907,
0.25458985567092896,
0.07458280026912689,
0.2625502347946167,
-0.31464970111846924,
-0.1819945126771927,
0.08586017042398453,
0.14381664991378784,
-0.07693980634212494,
-0.18014994263648987,
0.09257732331752777,
0.16827845573425293,
-0.21221789717674255,
0.599755585193634,
0.1792975813150406,
-0.1907711923122406,
-0.3120020627975464,
-0.10697201639413834,
0.5844907164573669,
0.027551326900720596,
-0.11256277561187744,
0.3178085386753082,
0.14506174623966217,
-0.2938936948776245,
0.34277403354644775,
0.27579137682914734,
0.43176135420799255,
0.784960150718689,
0.053855977952480316,
-0.0133934635668993,
0.2912917733192444,
0.11327330023050308,
-0.24891990423202515,
-0.048577629029750824,
-0.025501597672700882,
0.533469557762146,
-0.16804182529449463,
-0.013797402381896973,
-0.05288618803024292,
0.056883424520492554,
0.38131484389305115,
-0.2741223871707916,
-0.3089986741542816,
0.13278062641620636,
-0.1820550262928009,
-0.030211923643946648,
0.2168424129486084,
-0.09725142270326614,
0.07914777100086212,
0.12603983283042908,
-0.14847062528133392,
-0.4135947823524475,
0.5896680355072021,
0.028352104127407074,
-0.04732102155685425,
-0.28393781185150146,
0.4713818430900574,
0.36878591775894165,
0.3493960499763489,
-0.27036377787590027,
-0.015439899638295174,
0.26428428292274475,
0.031497593969106674,
-0.14345775544643402,
0.0853155329823494,
0.30194517970085144,
0.23473131656646729,
0.10875922441482544,
0.11183146387338638,
-0.04178681969642639,
-0.06339221447706223,
-0.06367187947034836,
0.2561050057411194,
-0.07876844704151154,
0.44094380736351013,
0.11365021765232086,
0.0048147402703762054,
-0.03138715401291847,
-0.3164069652557373,
0.30129843950271606,
0.1486247032880783,
-0.29963022470474243,
0.4405432939529419,
-0.20881007611751556,
-0.17585331201553345,
0.11455808579921722,
0.00036969780921936035,
-0.1863948106765747,
-0.32178017497062683,
0.4111230671405792,
-0.21974089741706848,
0.2716093063354492,
0.06541137397289276,
0.06588595360517502,
-0.17911124229431152,
0.47863414883613586,
0.007975105196237564,
-0.0776035413146019,
-0.15148106217384338,
-0.08114618808031082,
-0.20151041448116302,
-0.13029175996780396,
-0.5228423476219177,
-0.035268522799015045,
0.21111707389354706,
0.25658631324768066,
-0.05696596950292587,
-0.09848272800445557,
-0.23624755442142487,
0.22571556270122528,
-0.3105826675891876,
0.2808639407157898,
-0.39583128690719604,
0.03633707016706467,
0.16613435745239258,
-0.01682412065565586,
-0.10673021525144577,
-0.32192373275756836,
0.5821548700332642,
-0.061182718724012375,
0.016027070581912994,
-0.1342696249485016,
0.24460077285766602,
-0.15579448640346527,
0.3065859079360962,
0.2744366228580475,
0.1271476447582245,
0.10235575586557388,
0.22819235920906067,
-0.021062612533569336,
-0.1141216903924942,
0.009541966021060944,
0.019959814846515656,
0.062229350209236145,
-0.08292734622955322,
0.08130267262458801,
-0.36323636770248413,
-0.03207023814320564,
0.10142050683498383,
0.4178954064846039,
-0.039565954357385635,
-0.009064233861863613,
0.03206241875886917,
0.009831897914409637,
-0.13382676243782043,
0.23896004259586334,
-0.03280745446681976,
-0.060898713767528534,
-0.10176564753055573,
0.4008597731590271,
-0.10250110179185867,
-0.31553974747657776,
0.3757596015930176,
-0.15537719428539276,
-0.30875349044799805,
0.26488035917282104,
0.24293750524520874,
0.14365583658218384,
-0.15912872552871704,
-0.3158407211303711,
-0.12540999054908752,
0.31385308504104614,
-0.15590408444404602,
-0.04669612646102905,
0.2930445671081543,
-0.16537408530712128,
0.01185302808880806,
-0.12182176113128662,
0.30443400144577026,
-0.29576417803764343,
-0.11090581864118576,
0.1619720607995987,
-0.07672571390867233
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | A doubling would be fine. My very basic understanding of PyArrow is that using ListArray is probably related to the issue though. Using a multi-dimensional array in datasets is storing everything as strange nested 1d object arrays, which I imagine is creating the massive overhead.
I think it should be a PyArrow Tensor, no? | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 54 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
A doubling would be fine. My very basic understanding of PyArrow is that using ListArray is probably related to the issue though. Using a multi-dimensional array in datasets is storing everything as strange nested 1d object arrays, which I imagine is creating the massive overhead.
I think it should be a PyArrow Tensor, no? | [
0.07218019664287567,
0.10704396665096283,
-0.05946267396211624,
0.449451744556427,
0.46474939584732056,
0.1429208517074585,
0.4368583858013153,
0.17404727637767792,
0.09247265756130219,
0.0638110414147377,
-0.12260522693395615,
0.4118845760822296,
-0.1880142241716385,
-0.12550655007362366,
0.08392366021871567,
-0.22704803943634033,
0.2979205548763275,
0.07138645648956299,
-0.14267869293689728,
0.10689841210842133,
-0.3495176136493683,
-0.23325873911380768,
-0.2749019265174866,
0.11448545753955841,
-0.171437069773674,
-0.2083861082792282,
0.03885812312364578,
-0.08242014795541763,
-0.055426694452762604,
-0.13796404004096985,
0.25669559836387634,
-0.19904962182044983,
0.07697919756174088,
0.10324007272720337,
-0.00011139906564494595,
-0.0631902888417244,
0.12383808195590973,
0.11029879748821259,
0.013556331396102905,
0.5329005122184753,
0.22927850484848022,
-0.41309046745300293,
-0.027917789295315742,
-0.41371262073516846,
0.35747775435447693,
-0.5094507932662964,
-0.13693758845329285,
-0.274154931306839,
-0.08550694584846497,
0.1434032917022705,
0.20263558626174927,
0.17112062871456146,
0.15364179015159607,
0.3887770473957062,
0.48048076033592224,
-0.05214570462703705,
-0.19094368815422058,
-0.09108853340148926,
0.046850912272930145,
-0.3813721537590027,
-0.027198977768421173,
0.19262948632240295,
-0.2612525522708893,
0.09763999283313751,
0.25165751576423645,
0.25616079568862915,
-0.20662954449653625,
0.05228067561984062,
-0.05116400122642517,
0.023512419313192368,
0.3971068263053894,
-0.5977404117584229,
0.009724821895360947,
-0.16301536560058594,
-0.10885712504386902,
-0.16975674033164978,
0.13634070754051208,
0.3275424540042877,
-0.15300975739955902,
0.10246948897838593,
-0.32998916506767273,
0.1948639303445816,
-0.1599539965391159,
0.31574705243110657,
-0.10010947287082672,
-0.3940385580062866,
0.228599414229393,
0.19354966282844543,
0.1845032274723053,
-0.3534572720527649,
0.35052689909935,
-0.23734894394874573,
0.32407036423683167,
0.08468422293663025,
-0.4000908136367798,
-0.0014855414628982544,
0.034375011920928955,
-0.34505656361579895,
0.05213902145624161,
-0.3690442442893982,
0.04431314021348953,
0.0752527266740799,
0.19762945175170898,
0.26548922061920166,
0.015078512951731682,
0.28440263867378235,
-0.598028838634491,
0.04127930477261543,
0.23223446309566498,
-0.267543762922287,
0.2804270088672638,
-0.01792200282216072,
-0.06098620593547821,
0.268557608127594,
0.4213040769100189,
-0.4842783510684967,
0.14226046204566956,
0.16063855588436127,
-0.28229984641075134,
0.12022994458675385,
-0.5402089953422546,
0.18568076193332672,
0.006472582928836346,
0.16171088814735413,
-0.007542664185166359,
0.15042656660079956,
-0.07118858397006989,
0.007704125717282295,
-0.11572699248790741,
-0.10424864292144775,
-0.23662906885147095,
0.24754150211811066,
-0.22392967343330383,
0.11859340220689774,
0.17193500697612762,
0.6670664548873901,
-0.15986774861812592,
0.221483051776886,
0.07788418233394623,
-0.08314758539199829,
0.10436128824949265,
-0.25560513138771057,
0.11224130541086197,
0.3055402934551239,
-0.10407882928848267,
0.05856592208147049,
-0.12801705300807953,
0.20009152591228485,
-0.15326789021492004,
0.3334392011165619,
-0.1758040189743042,
-0.3807467818260193,
-0.19750015437602997,
0.08170042932033539,
-0.06722214818000793,
0.08334488421678543,
-0.32236844301223755,
0.07740482687950134,
0.45041775703430176,
0.07956983149051666,
0.04933200776576996,
-0.16595497727394104,
-0.11253107339143753,
-0.47299593687057495,
0.011691948398947716,
0.057093821465969086,
-0.5288625359535217,
0.23857322335243225,
0.036888763308525085,
0.14634448289871216,
0.2246565818786621,
0.41205471754074097,
-0.22363297641277313,
0.15616469085216522,
-0.003551783971488476,
0.006255671381950378,
0.032595716416835785,
-0.08520783483982086,
-0.515579879283905,
-0.12083737552165985,
0.24087731540203094,
0.2894493043422699,
0.25382471084594727,
0.374418705701828,
-0.037028614431619644,
0.14644235372543335,
0.03881411626935005,
0.19735291600227356,
0.05421600490808487,
0.3992210924625397,
-0.22424359619617462,
-0.622671365737915,
0.09120490401983261,
0.1714116483926773,
-0.06141005828976631,
-0.34599581360816956,
0.128576397895813,
0.0843471884727478,
0.19353215396404266,
-0.4607270061969757,
-0.04215526580810547,
0.06496967375278473,
0.20476005971431732,
-0.024633564054965973,
0.027319183573126793,
-0.329012393951416,
-0.4622722268104553,
0.28211379051208496,
0.2105000764131546,
-0.23798993229866028,
-0.020534217357635498,
-0.2953854203224182,
0.14029613137245178,
0.16690833866596222,
0.15249499678611755,
0.1342679262161255,
0.09584403038024902,
-0.13383261859416962,
0.032717060297727585,
-0.058561623096466064,
0.008314643055200577,
0.15096502006053925,
-0.18080465495586395,
-0.0811760351061821,
-0.33271485567092896,
0.3388431668281555,
-0.040656931698322296,
-0.21822915971279144,
-0.139963299036026,
0.20871543884277344,
-0.028507597744464874,
0.12060379981994629,
0.24207916855812073,
0.14294487237930298,
0.27450940012931824,
-0.10101746022701263,
-0.5177977681159973,
0.6042109727859497,
0.09732187539339066,
0.05957723781466484,
0.3381979763507843,
-0.2509460747241974,
0.19167940318584442,
-0.06967112421989441,
0.012651089578866959,
0.17393919825553894,
0.15687432885169983,
0.11753170192241669,
-0.019334346055984497,
0.07047067582607269,
0.0013960953801870346,
0.09166741371154785,
0.39469337463378906,
-0.09241066128015518,
-0.0018566548824310303,
-0.04769187793135643,
0.08395662903785706,
0.31157824397087097,
-0.2605699896812439,
0.31880760192871094,
0.4891890585422516,
-0.11766079068183899,
0.18935193121433258,
0.25046974420547485,
0.002872250974178314,
-0.26080596446990967,
0.0019713006913661957,
-0.1571972370147705,
0.36849477887153625,
0.2352629452943802,
-0.15698465704917908,
0.046338003128767014,
-0.07104864716529846,
-0.19061769545078278,
0.17233476042747498,
0.18700501322746277,
0.32543236017227173,
-0.284466028213501,
0.3973468840122223,
-0.130118727684021,
-0.2101721465587616,
0.02829701080918312,
0.36218833923339844,
0.29121914505958557,
-0.4387958347797394,
0.236679807305336,
-0.29665517807006836,
-0.031592756509780884,
0.006004938390105963,
-0.09298065304756165,
0.05378212779760361,
-0.05564165860414505,
-0.25860869884490967,
0.23490087687969208,
0.06489522755146027,
-0.057998619973659515,
0.11215904355049133,
0.22553813457489014,
0.1657029688358307,
-0.14348821341991425,
-0.03154205530881882,
-0.16614001989364624,
-0.201944500207901,
0.029088914394378662,
0.36566105484962463,
-0.2639428377151489,
0.15319053828716278,
0.27228230237960815,
-0.09318101406097412,
0.08294879645109177,
-0.08429769426584244,
-0.08029462397098541,
-0.025533244013786316,
0.26981857419013977,
0.012659266591072083,
-0.07191531360149384,
-0.317588746547699,
-0.08278249949216843,
0.06774425506591797,
0.23301807045936584,
-0.24760578572750092,
0.31907835602760315,
0.10123484581708908,
-0.21669399738311768,
0.1278662234544754,
-0.2527499794960022,
-0.23119503259658813,
-0.08664442598819733,
0.15054002404212952,
-0.374581515789032,
0.40313971042633057,
-0.13468417525291443,
0.16358497738838196,
0.20817328989505768,
0.11343514919281006,
-0.02793929912149906,
-0.21405869722366333,
0.06696116924285889,
0.23996546864509583,
-0.008512483909726143,
-0.28345629572868347,
-0.28439784049987793,
0.09915456175804138,
-0.11085720360279083,
0.3147038221359253,
-0.49745309352874756,
-0.29173457622528076,
-0.4772517681121826,
0.09922824800014496,
0.008144672960042953,
-0.07030841708183289,
0.12042717635631561,
0.0816369578242302,
-0.0015393905341625214,
-0.0247847530990839,
-0.11185029149055481,
-0.023595094680786133,
0.11569851636886597,
-0.0704348161816597,
0.1347392350435257,
0.36394667625427246,
0.27996060252189636,
0.32800742983818054,
0.18993161618709564,
0.0363815575838089,
0.2502419650554657,
-0.040314681828022,
0.10570988059043884,
-0.03572525084018707,
-0.3086242377758026,
0.06268133968114853,
-0.2700278162956238,
-0.29482078552246094,
-0.08585900068283081,
-0.02145044133067131,
-0.523173987865448,
0.17797696590423584,
0.08591622114181519,
0.1742207109928131,
-0.08824604749679565,
0.25285014510154724,
0.11183857917785645,
0.07784449309110641,
0.18549278378486633,
0.02952256053686142,
-0.26276224851608276,
-0.3891361355781555,
0.005467740818858147,
-0.3847944736480713,
-0.21261215209960938,
-0.053849074989557266,
-0.4487079381942749,
-0.41532692313194275,
-0.22353702783584595,
-0.029932215809822083,
0.1774672120809555,
0.3889848589897156,
0.032940905541181564,
-0.035272352397441864,
0.3770914077758789,
0.023883553221821785,
0.6727242469787598,
0.13267536461353302,
-0.2779485583305359,
0.07853139936923981,
-0.07501497119665146,
-0.4519221782684326,
-0.12838441133499146,
-0.24382475018501282,
-0.25381118059158325,
0.12322522699832916,
0.22433118522167206,
-0.1343158781528473,
-0.09268134087324142,
0.25207436084747314,
0.13305099308490753,
-0.22749930620193481,
-0.199891597032547,
-0.2315315157175064,
-0.5283000469207764,
0.07429924607276917,
-0.07591996341943741,
0.09303849190473557,
0.35232827067375183,
0.27623265981674194,
-0.10001209378242493,
-0.13047538697719574,
-0.04290516674518585,
0.2364918440580368,
0.06209569051861763,
0.20659109950065613,
-0.11344176530838013,
-0.0562896654009819,
-0.0057264529168605804,
-0.15558327734470367,
0.34746474027633667,
0.16818726062774658,
0.029185939580202103,
0.14813730120658875,
-0.11121886223554611,
-0.10619786381721497,
0.41531461477279663,
0.16356515884399414,
-0.22717511653900146,
-0.07013054937124252,
-0.6027183532714844,
0.051798395812511444,
-0.42846396565437317,
-0.15577317774295807,
0.447070837020874,
-0.09494070708751678,
0.0848984345793724,
-0.45379912853240967,
0.47595831751823425,
0.2976294457912445,
-0.1271618902683258,
0.3019096851348877,
0.0286775603890419,
-0.15822699666023254,
0.39052218198776245,
0.5137303471565247,
0.7811092734336853,
-0.46985745429992676,
0.3982471525669098,
0.6716969013214111,
-0.3296549320220947,
0.1523832380771637,
-0.3326459527015686,
0.30283069610595703,
-0.23765958845615387,
-0.05666394531726837,
0.0044155362993478775,
-0.17657221853733063,
0.11288920044898987,
0.004584085196256638,
0.09607340395450592,
0.05257934704422951,
-0.0783001109957695,
0.2831525504589081,
0.12648478150367737,
-0.048290595412254333,
0.17734329402446747,
-0.24840950965881348,
-0.174591526389122,
0.12472130358219147,
-0.05161483585834503,
-0.4961494505405426,
-0.0016858214512467384,
0.012851825915277004,
-0.14266550540924072,
0.0026792362332344055,
-0.3085096478462219,
-0.10541791468858719,
0.02998131886124611,
0.5930554270744324,
-0.07361078262329102,
-0.11476234346628189,
0.0012956373393535614,
0.29607242345809937,
-0.20549745857715607,
-0.1170065701007843,
0.10838789492845535,
-0.03504595533013344,
0.15179443359375,
0.13455012440681458,
0.43323779106140137,
-0.21168851852416992,
0.17238183319568634,
0.029045172035694122,
-0.2643100321292877,
0.1297382116317749,
0.13203179836273193,
-0.09946848452091217,
-0.4578673243522644,
0.19374501705169678,
0.27045583724975586,
-0.1987156718969345,
-0.10048981010913849,
-0.22640252113342285,
0.07538805902004242,
-0.08668327331542969,
0.09835702180862427,
-0.21099840104579926,
0.09947645664215088,
0.8557201623916626,
-0.2522953152656555,
-0.2711162567138672,
-0.048216234892606735,
0.29326722025871277,
0.3389913737773895,
0.3030143678188324,
0.3044057786464691,
0.23869197070598602,
-0.34574759006500244,
-0.07146760821342468,
0.2983522117137909,
0.29032593965530396,
-0.052193913608789444,
0.14014779031276703,
-0.26423895359039307,
0.03389228880405426,
-0.17427897453308105,
-0.16332025825977325,
-0.09982478618621826,
-0.07481148093938828,
-0.10109984129667282,
-0.2105257213115692,
-0.1808212399482727,
0.26502496004104614,
0.4587494730949402,
0.17938612401485443,
0.170020192861557,
-0.18304628133773804,
-0.2717278301715851,
0.2034253031015396,
-0.23767966032028198,
0.07851375639438629,
-0.19750206172466278,
0.10747551918029785,
-0.18253648281097412,
-0.16843241453170776,
0.21479572355747223,
-0.2432670146226883,
0.03614339232444763,
-0.060139864683151245,
-0.08512399345636368,
-0.1855432093143463,
-0.014125351794064045,
0.10708016902208328,
-0.16863006353378296,
-0.3860751688480377,
-0.03787921741604805,
-0.4907900094985962,
-0.2317972183227539,
-0.26390933990478516,
0.20790162682533264,
0.3801782429218292,
0.0476173534989357,
0.04978952556848526,
-0.09678784012794495,
-0.2981979250907898,
0.2368919402360916,
0.19834861159324646,
-0.2203117311000824,
0.013680681586265564,
0.31619274616241455,
0.29263535141944885,
0.1539742797613144,
-0.17076534032821655,
-0.06722459197044373,
0.22099530696868896,
-0.18780650198459625,
-0.27096205949783325,
0.35587722063064575,
-0.29188042879104614,
-0.28345397114753723,
0.03777848929166794,
0.12820111215114594,
0.24567563831806183,
-0.3618778586387634,
-0.20130878686904907,
0.06994745135307312,
0.13048669695854187,
-0.08394218236207962,
-0.2600371241569519,
0.13689017295837402,
0.1305048167705536,
-0.15663780272006989,
0.5455138683319092,
0.20339924097061157,
-0.09109056740999222,
-0.39271122217178345,
-0.13353034853935242,
0.5445271134376526,
0.03705267980694771,
-0.2082594633102417,
0.3024570643901825,
0.02950233593583107,
-0.23211084306240082,
0.3644862174987793,
0.2701067626476288,
0.40213117003440857,
0.7655216455459595,
0.04627774655818939,
0.03353159874677658,
0.26645171642303467,
0.09791159629821777,
-0.24275648593902588,
-0.02870146930217743,
0.02190762385725975,
0.5361058712005615,
-0.13553644716739655,
-0.04606011509895325,
-0.057380229234695435,
0.1542927622795105,
0.37607342004776,
-0.17482289671897888,
-0.29605600237846375,
0.15545319020748138,
-0.20254471898078918,
-0.016514606773853302,
0.17285427451133728,
-0.09981975704431534,
0.11044059693813324,
0.15975528955459595,
-0.19420166313648224,
-0.47878700494766235,
0.5721784830093384,
0.004277937114238739,
-0.0696677714586258,
-0.23215550184249878,
0.45257848501205444,
0.31580889225006104,
0.2839812636375427,
-0.24187223613262177,
-0.021110860630869865,
0.2527909278869629,
-0.07397031784057617,
-0.2126094400882721,
0.05127082020044327,
0.3351980745792389,
0.20295831561088562,
0.10046850144863129,
0.06443369388580322,
-0.07464362680912018,
-0.06852317601442337,
-0.07358549535274506,
0.17720508575439453,
-0.07773953676223755,
0.5599709749221802,
0.11042295396327972,
-0.009222631342709064,
-0.032470472157001495,
-0.303760826587677,
0.32584425806999207,
0.14098578691482544,
-0.30356544256210327,
0.32095491886138916,
-0.2514188289642334,
-0.24719437956809998,
0.10727817565202713,
0.027849234640598297,
-0.20565813779830933,
-0.29053011536598206,
0.5032410621643066,
-0.17342449724674225,
0.2547258734703064,
0.07840440422296524,
0.06302262842655182,
-0.16330865025520325,
0.6125809550285339,
0.03175317123532295,
0.06084981933236122,
-0.13283300399780273,
0.03380480408668518,
-0.1777128279209137,
-0.057313404977321625,
-0.621857225894928,
-0.03232588246464729,
0.24890367686748505,
0.3000722825527191,
-0.06515329331159592,
-0.028296105563640594,
-0.2528330683708191,
0.1391894519329071,
-0.32092219591140747,
0.3100377321243286,
-0.41140297055244446,
0.043253131210803986,
0.041429467499256134,
-0.011313153430819511,
-0.16529850661754608,
-0.3250812590122223,
0.615358829498291,
-0.11112938821315765,
-0.0014503039419651031,
-0.28189295530319214,
0.24988868832588196,
-0.10331754386425018,
0.3163079023361206,
0.33939945697784424,
0.10417906939983368,
0.18734972178936005,
0.2043571174144745,
-0.04145316407084465,
-0.14465084671974182,
0.07300485670566559,
-0.048185478895902634,
0.05301959812641144,
-0.12038779258728027,
0.05495626479387283,
-0.34431079030036926,
0.018651973456144333,
0.0985279530286789,
0.506845235824585,
-0.004382781684398651,
-0.10600217431783676,
0.11028182506561279,
0.0485057458281517,
-0.10358262062072754,
0.22537566721439362,
-0.05477025359869003,
-0.034760937094688416,
-0.0824248343706131,
0.26913878321647644,
-0.1345784068107605,
-0.3050704300403595,
0.35777443647384644,
-0.2141709327697754,
-0.30873432755470276,
0.22854861617088318,
0.14531761407852173,
0.08494381606578827,
-0.1423722207546234,
-0.47556036710739136,
-0.1649482250213623,
0.2960743308067322,
-0.13941195607185364,
-0.17175903916358948,
0.313821017742157,
-0.12841977179050446,
0.0049955882132053375,
-0.13249902427196503,
0.2007426768541336,
-0.2941035032272339,
-0.24567191302776337,
0.1358472853899002,
-0.20572538673877716
] |
https://github.com/huggingface/datasets/issues/4964 | Column of arrays (2D+) are using unreasonably high memory | PyArrow tensors are not part of the Arrow format AFAIK:
> There is no direct support in the arrow columnar format to store Tensors as column values.
source: https://github.com/apache/arrow/issues/4802#issuecomment-508494694 | ## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4 | 29 | Column of arrays (2D+) are using unreasonably high memory
## Describe the bug
When trying to store `Array2D, Array3D, etc` as column values in a dataset, accessing that column (or creating depending on how you create it, see code below) will cause more than 10 fold of memory usage.
## Steps to reproduce the bug
```python
from datasets import Dataset, Features, Array2D, Array3D
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data}, features=Features({column_name: Array3D(shape=array_shape, dtype="float64")}))
```
the code above will use about 10Gb of RAM while constructing the `dataset` object.
The code below will use roughly the same amount of memory (and time) when trying to actually access the data itself of that column.
```python
from datasets import Dataset
import numpy as np
column_name = "a"
array_shape = (64, 64, 3)
data = np.random.random((10000,) + array_shape)
dataset = Dataset.from_dict({column_name: data})
dataset[column_name]
```
## Expected results
Some memory overhead, but not like as it is now and certainly not an overhead of such runtime that is currently happening.
## Actual results
Enormous memory- and runtime overhead.
## Environment info
- `datasets` version: 2.3.2
- Platform: macOS-12.5.1-arm64-arm-64bit
- Python version: 3.8.13
- PyArrow version: 9.0.0
- Pandas version: 1.4.4
PyArrow tensors are not part of the Arrow format AFAIK:
> There is no direct support in the arrow columnar format to store Tensors as column values.
source: https://github.com/apache/arrow/issues/4802#issuecomment-508494694 | [
0.10138064622879028,
0.02366507053375244,
-0.058113738894462585,
0.48171645402908325,
0.4805806875228882,
0.10301568359136581,
0.46678870916366577,
0.2531795799732208,
0.16133840382099152,
0.03445249795913696,
-0.042137645184993744,
0.47871625423431396,
-0.22409698367118835,
-0.19256143271923065,
0.004688136279582977,
-0.30705562233924866,
0.22964230179786682,
0.0738455131649971,
-0.1968618929386139,
0.10337375104427338,
-0.349685400724411,
-0.17467890679836273,
-0.2802080512046814,
0.12981030344963074,
-0.16697004437446594,
-0.21108165383338928,
0.14952386915683746,
-0.23984915018081665,
-0.10623844712972641,
-0.1411706507205963,
0.20465685427188873,
-0.3358035981655121,
0.07956457883119583,
0.1317153126001358,
-0.0001129128213506192,
-0.052464403212070465,
0.16775865852832794,
0.08502811193466187,
-0.029234591871500015,
0.5949742197990417,
0.13167759776115417,
-0.355663001537323,
0.014668582007288933,
-0.4569365680217743,
0.28938165307044983,
-0.5215421915054321,
-0.3237980902194977,
-0.5613757967948914,
0.0020974427461624146,
0.20450076460838318,
0.2071456015110016,
0.22877416014671326,
0.18922455608844757,
0.3656952977180481,
0.382520854473114,
-0.02174253761768341,
-0.27072346210479736,
-0.169098898768425,
-0.03699788451194763,
-0.2405155450105667,
0.08788235485553741,
0.3498598635196686,
-0.19478318095207214,
0.023511510342359543,
0.22014284133911133,
0.24015602469444275,
-0.23371145129203796,
0.0374845527112484,
-0.043476663529872894,
0.010991141200065613,
0.4375840127468109,
-0.583121657371521,
0.0077002281323075294,
-0.12926310300827026,
-0.12527215480804443,
-0.12416475266218185,
0.12173059582710266,
0.3384009301662445,
-0.10120905935764313,
0.0863751620054245,
-0.18607079982757568,
0.13995672762393951,
-0.26984143257141113,
0.27936071157455444,
-0.1147758737206459,
-0.41987231373786926,
0.12940844893455505,
0.16254091262817383,
0.14194893836975098,
-0.363957941532135,
0.28348737955093384,
-0.17730960249900818,
0.20055536925792694,
0.12643446028232574,
-0.32900357246398926,
-0.10833202302455902,
-0.13998520374298096,
-0.6091744303703308,
-0.040815528482198715,
-0.2769854664802551,
0.2090962529182434,
0.0995715856552124,
0.1545943170785904,
0.21260270476341248,
-0.06170755997300148,
0.3474266231060028,
-0.4405682682991028,
0.19838814437389374,
0.22807224094867706,
-0.20392544567584991,
0.32890525460243225,
-0.11746647208929062,
-0.030344348400831223,
0.1643734872341156,
0.31837913393974304,
-0.4311105012893677,
0.10776776075363159,
0.1314062774181366,
-0.19860310852527618,
0.23225755989551544,
-0.4148348271846771,
0.20683546364307404,
0.02880486473441124,
0.21092429757118225,
-0.011455103754997253,
0.343325138092041,
0.10063192248344421,
0.04320667311549187,
-0.06766714155673981,
-0.13887399435043335,
-0.19412940740585327,
0.217203751206398,
-0.17303605377674103,
0.05784329026937485,
0.1878448873758316,
0.7104674577713013,
-0.15301728248596191,
0.1237000897526741,
0.023333843797445297,
-0.17700102925300598,
0.1758800894021988,
-0.308491587638855,
0.23114502429962158,
0.27055594325065613,
-0.22613343596458435,
0.06378305703401566,
-0.09697072207927704,
0.30649471282958984,
-0.10303059220314026,
0.323332279920578,
-0.14650321006774902,
-0.32249385118484497,
-0.2527889609336853,
0.09258953481912613,
0.024480417370796204,
0.1056843250989914,
-0.37477707862854004,
-0.06459341943264008,
0.4977436065673828,
0.14003649353981018,
0.20155870914459229,
-0.15406449139118195,
-0.0277029350399971,
-0.46829837560653687,
0.07149918377399445,
0.10985393822193146,
-0.5159072279930115,
0.23249435424804688,
0.05805538222193718,
0.20048214495182037,
0.17513509094715118,
0.32357093691825867,
-0.18042148649692535,
0.025643110275268555,
0.06923288851976395,
-0.07162020355463028,
0.2549538016319275,
-0.17793945968151093,
-0.4311714768409729,
-0.11013683676719666,
0.314090371131897,
0.17762760818004608,
0.1985337734222412,
0.3765292763710022,
-0.040877897292375565,
0.23328064382076263,
-0.07002957165241241,
0.24022969603538513,
0.18442022800445557,
0.3452589809894562,
-0.2308642566204071,
-0.5771345496177673,
-0.03288497030735016,
0.1188528835773468,
-0.031010311096906662,
-0.3954060971736908,
0.08552482724189758,
0.03748944029211998,
0.19429129362106323,
-0.3938528001308441,
0.04343380033969879,
0.1665494590997696,
0.26204928755760193,
-0.043533340096473694,
0.06868478655815125,
-0.28709304332733154,
-0.48622262477874756,
0.21551194787025452,
0.19912371039390564,
-0.3710261583328247,
-0.05127358436584473,
-0.17946508526802063,
0.1184963807463646,
0.1990121752023697,
0.22786875069141388,
0.14446912705898285,
0.07677260786294937,
-0.2280711531639099,
-0.0015306323766708374,
-0.047892794013023376,
-0.03219885006546974,
0.1654336303472519,
-0.2152549773454666,
0.0043930066749453545,
-0.3458167314529419,
0.3680526316165924,
0.0019054766744375229,
-0.18830448389053345,
-0.1668986976146698,
0.20741510391235352,
0.0014075450599193573,
0.11975733190774918,
0.1473996937274933,
0.13337475061416626,
0.27350160479545593,
-0.05139884352684021,
-0.5321765542030334,
0.5194456577301025,
0.16575023531913757,
-0.05402812361717224,
0.36333003640174866,
-0.20051147043704987,
0.23232398927211761,
-0.0017743706703186035,
0.007022332400083542,
0.1948740929365158,
0.12357127666473389,
0.20155833661556244,
-0.05494094267487526,
0.1623939871788025,
0.005277352407574654,
0.11188657581806183,
0.31827282905578613,
-0.21202003955841064,
-0.07521925866603851,
-0.08227342367172241,
0.01693948730826378,
0.2524741291999817,
-0.222497820854187,
0.2628124952316284,
0.4547286033630371,
0.005366746336221695,
0.18637505173683167,
0.2132549285888672,
-0.07469416409730911,
-0.14905588328838348,
0.025302469730377197,
-0.08306398242712021,
0.2956019639968872,
0.18510934710502625,
-0.16472627222537994,
-0.0621073842048645,
-0.027709942311048508,
-0.1722060739994049,
0.2556728422641754,
0.19541263580322266,
0.3181440532207489,
-0.22113755345344543,
0.32983025908470154,
-0.19104231894016266,
-0.13133469223976135,
0.12812048196792603,
0.38824883103370667,
0.23086367547512054,
-0.4425934851169586,
0.20263676345348358,
-0.26162204146385193,
0.0000095367431640625,
-0.0522722452878952,
-0.0686458870768547,
0.1944608986377716,
-0.031036952510476112,
-0.3150516152381897,
0.17534928023815155,
-0.01253071241080761,
-0.08085639029741287,
-0.12414544820785522,
0.2970449924468994,
0.18397636711597443,
-0.1662600040435791,
-0.1019291877746582,
-0.16477636992931366,
-0.14574050903320312,
0.0303310789167881,
0.2978077232837677,
-0.28794464468955994,
0.237165629863739,
0.4053689241409302,
-0.08962731063365936,
0.07848802953958511,
-0.08585116267204285,
-0.13359779119491577,
0.04618442803621292,
0.14872141182422638,
-0.0958264172077179,
-0.06802549958229065,
-0.327439546585083,
-0.0972784087061882,
0.06918702274560928,
0.16210198402404785,
-0.18389694392681122,
0.28895410895347595,
0.1350671648979187,
-0.1523049771785736,
0.07340946793556213,
-0.38741159439086914,
-0.12224292010068893,
-0.1354852020740509,
0.17368799448013306,
-0.3057641386985779,
0.35670793056488037,
-0.16183340549468994,
0.2063508927822113,
0.20581690967082977,
0.17099635303020477,
-0.004152086563408375,
-0.19068361818790436,
0.1883106231689453,
0.2945868670940399,
-0.10715024918317795,
-0.23520885407924652,
-0.20875640213489532,
0.12104971706867218,
-0.0721437931060791,
0.326008141040802,
-0.5198620557785034,
-0.18896575272083282,
-0.5455309152603149,
-0.02904534712433815,
-0.10290522873401642,
-0.1031954437494278,
0.059498272836208344,
0.06709476560354233,
-0.0069635771214962006,
-0.043528538197278976,
-0.05068560689687729,
0.08284977078437805,
0.13751494884490967,
-0.04867241531610489,
0.1814025640487671,
0.47585830092430115,
0.27709704637527466,
0.2904489040374756,
0.2304002046585083,
-0.053700465708971024,
0.2221079170703888,
0.005027858540415764,
0.08999466896057129,
-0.0778307095170021,
-0.24224810302257538,
0.04013469070196152,
-0.20228910446166992,
-0.11789179593324661,
-0.17879696190357208,
0.021976551041007042,
-0.4365721046924591,
0.12303006649017334,
0.21986976265907288,
0.18108278512954712,
-0.10635867714881897,
0.2715933620929718,
-0.06640959531068802,
0.12393555045127869,
0.09290513396263123,
0.10065300017595291,
-0.29874733090400696,
-0.38380736112594604,
0.05053678900003433,
-0.4407089352607727,
-0.1511644423007965,
-0.044507913291454315,
-0.3908954858779907,
-0.25136712193489075,
-0.28286832571029663,
0.07210218906402588,
0.07964173704385757,
0.49629640579223633,
0.06872968375682831,
-0.033033113926649094,
0.35662591457366943,
0.03314541280269623,
0.49203699827194214,
0.08173789083957672,
-0.29092615842819214,
0.05089668557047844,
-0.05671701952815056,
-0.7348312735557556,
-0.08550481498241425,
-0.2523440420627594,
-0.35862934589385986,
0.0417821891605854,
0.2728680968284607,
-0.13780061900615692,
-0.12395058572292328,
0.23144684731960297,
0.04960647225379944,
-0.2851197421550751,
-0.13636702299118042,
-0.1909945160150528,
-0.3898991346359253,
0.05877145379781723,
-0.12340762466192245,
0.15097825229167938,
0.3226240277290344,
0.2978881299495697,
-0.24884766340255737,
-0.20297284424304962,
-0.13712286949157715,
0.14720696210861206,
-0.041972510516643524,
0.37852180004119873,
-0.10575485974550247,
-0.008577818050980568,
0.029596000909805298,
-0.06825053691864014,
0.3529452383518219,
0.16363918781280518,
0.01958732306957245,
0.20805300772190094,
-0.11058572679758072,
-0.11800608038902283,
0.4388403594493866,
0.2596033215522766,
-0.237432599067688,
0.03651023283600807,
-0.6168700456619263,
0.016866765916347504,
-0.4184128940105438,
-0.07628479599952698,
0.41593867540359497,
-0.08298084139823914,
0.16177967190742493,
-0.4715041220188141,
0.5210307836532593,
0.33528175950050354,
-0.09633270651102066,
0.5173652172088623,
0.08288993686437607,
-0.2042524516582489,
0.4659126400947571,
0.6203658580780029,
0.8236252069473267,
-0.40968185663223267,
0.3610801100730896,
0.5937454700469971,
-0.4521598815917969,
0.23604604601860046,
-0.3579728603363037,
0.28449976444244385,
-0.3282950520515442,
0.0338740237057209,
0.02857530303299427,
-0.25002896785736084,
0.13015016913414001,
-0.058001384139060974,
0.12827453017234802,
-0.03295811638236046,
-0.23622554540634155,
0.22605961561203003,
0.051057398319244385,
-0.0895623117685318,
0.10883382707834244,
-0.28729090094566345,
-0.06109936535358429,
0.11802741885185242,
-0.1290559470653534,
-0.5161909461021423,
-0.022324275225400925,
0.015708744525909424,
-0.18589819967746735,
-0.062042780220508575,
-0.3286493420600891,
-0.058128319680690765,
-0.08165345340967178,
0.6134569644927979,
-0.039897192269563675,
-0.16964522004127502,
0.05825555697083473,
0.2966706454753876,
-0.10099722445011139,
-0.09412603080272675,
0.112605020403862,
0.015484146773815155,
0.11609421670436859,
0.054510388523340225,
0.3778077960014343,
-0.09591979533433914,
0.1574694961309433,
0.07811173796653748,
-0.2237776219844818,
0.1689891219139099,
0.12000945210456848,
-0.16162759065628052,
-0.39397233724594116,
0.2180946171283722,
0.2998797595500946,
-0.1710185706615448,
-0.17821043729782104,
-0.19373109936714172,
-0.07749558240175247,
-0.00257270410656929,
0.13018852472305298,
-0.2084413319826126,
0.06060708686709404,
0.8738524317741394,
-0.12211154401302338,
-0.3050975203514099,
0.010288333520293236,
0.2698838710784912,
0.3312935531139374,
0.21538498997688293,
0.36639195680618286,
0.18830016255378723,
-0.41265755891799927,
-0.11056725680828094,
0.23951491713523865,
0.37790942192077637,
-0.09241349995136261,
0.17834779620170593,
-0.283396452665329,
-0.07920661568641663,
-0.1594187170267105,
-0.17606806755065918,
-0.0599265992641449,
-0.005204319953918457,
-0.10975426435470581,
-0.17460623383522034,
-0.23731063306331635,
0.28733891248703003,
0.2993644177913666,
0.22716595232486725,
-0.0061295367777347565,
-0.2911517918109894,
-0.37261971831321716,
0.17855674028396606,
-0.22803612053394318,
0.12329421937465668,
-0.12701396644115448,
0.08675520867109299,
-0.16440068185329437,
-0.13606125116348267,
0.16808579862117767,
-0.27792027592658997,
0.030443398281931877,
-0.013452701270580292,
-0.08539123088121414,
-0.16454991698265076,
-0.06520546972751617,
0.09709453582763672,
-0.1600291132926941,
-0.4052083492279053,
-0.1699192076921463,
-0.629960834980011,
-0.24903720617294312,
-0.24982482194900513,
0.10657177865505219,
0.40133732557296753,
0.03621317073702812,
0.0511750765144825,
-0.1423054188489914,
-0.28950977325439453,
0.20133984088897705,
0.25650709867477417,
-0.22019007802009583,
0.02600337564945221,
0.2763579487800598,
0.2397322952747345,
0.26503729820251465,
-0.18307428061962128,
-0.12102345377206802,
0.17056892812252045,
-0.2324794977903366,
-0.2391723096370697,
0.36781153082847595,
-0.3011317849159241,
-0.26012444496154785,
0.021187879145145416,
0.04678744822740555,
0.24634695053100586,
-0.3460862934589386,
-0.23121635615825653,
0.011883591301739216,
0.13978666067123413,
-0.02882726490497589,
-0.2424582540988922,
-0.04959799721837044,
0.22887076437473297,
-0.1983797252178192,
0.4902050197124481,
0.23742949962615967,
-0.12048828601837158,
-0.42055875062942505,
-0.033290427178144455,
0.3550371825695038,
-0.07480015605688095,
-0.10202834010124207,
0.2941684424877167,
0.08665598928928375,
-0.2986419200897217,
0.3056701421737671,
0.2384774088859558,
0.44608116149902344,
0.5969983339309692,
0.09486868232488632,
0.03784198313951492,
0.42796051502227783,
0.07781669497489929,
-0.3078840672969818,
0.030606571584939957,
-0.15279275178909302,
0.4634239077568054,
-0.14284469187259674,
0.13326990604400635,
0.011012375354766846,
0.16493628919124603,
0.4726034104824066,
-0.2408909648656845,
-0.3321094512939453,
0.0685083270072937,
-0.23854690790176392,
0.014676565304398537,
0.08534545451402664,
-0.06372606754302979,
0.05652858316898346,
0.10841445624828339,
-0.1242317408323288,
-0.3445791006088257,
0.5727836489677429,
0.1375049352645874,
-0.09646457433700562,
-0.09862202405929565,
0.47288578748703003,
0.38597095012664795,
0.3338073492050171,
-0.2721079885959625,
-0.027734937146306038,
0.21867750585079193,
-0.05140817165374756,
-0.24842283129692078,
0.0342162549495697,
0.23365676403045654,
0.217299222946167,
0.10445058345794678,
0.14656418561935425,
0.02791842445731163,
-0.0795302465558052,
-0.01415966171771288,
0.28869879245758057,
0.07161983847618103,
0.32466211915016174,
0.09934920072555542,
0.004418211057782173,
-0.01983952336013317,
-0.3534262478351593,
0.24027064442634583,
0.28023573756217957,
-0.2597602903842926,
0.4416497051715851,
-0.2701677680015564,
-0.27975672483444214,
0.04491715878248215,
-0.022428609430789948,
-0.18084070086479187,
-0.2893650233745575,
0.522110104560852,
-0.23846666514873505,
0.21425926685333252,
0.07033688575029373,
0.04363048076629639,
-0.1441013365983963,
0.560335636138916,
-0.0010891631245613098,
-0.03430616855621338,
-0.11322427541017532,
-0.06118039786815643,
-0.1308266818523407,
-0.048636533319950104,
-0.5108762383460999,
0.08922875672578812,
0.2176084965467453,
0.30198901891708374,
0.008666619658470154,
-0.12960150837898254,
-0.13867585361003876,
0.09449879080057144,
-0.24988818168640137,
0.27180933952331543,
-0.4769664406776428,
0.07622271776199341,
0.1806570589542389,
0.022797303274273872,
-0.07020790874958038,
-0.35833457112312317,
0.5246639251708984,
-0.03377839922904968,
-0.012957870960235596,
-0.18404488265514374,
0.23496684432029724,
-0.10706911981105804,
0.38052836060523987,
0.44937241077423096,
0.042329493910074234,
0.16599714756011963,
0.2250952124595642,
-0.06445299834012985,
-0.13408872485160828,
-0.03699193894863129,
0.05888158455491066,
0.038533203303813934,
-0.08064819872379303,
0.10353721678256989,
-0.3234710693359375,
-0.03492320701479912,
0.0760461613535881,
0.38952746987342834,
-0.06632144004106522,
-0.13156460225582123,
0.032082460820674896,
-0.02229275368154049,
-0.13658958673477173,
0.18565437197685242,
-0.011498984880745411,
0.014955833554267883,
-0.08045987784862518,
0.2939051389694214,
-0.14975202083587646,
-0.32528814673423767,
0.43035775423049927,
-0.09283357113599777,
-0.2772102355957031,
0.2745392322540283,
0.26239389181137085,
0.29217860102653503,
-0.0664418563246727,
-0.49254924058914185,
-0.18334674835205078,
0.2601255774497986,
-0.17777186632156372,
-0.11118265986442566,
0.25009289383888245,
-0.07462641596794128,
0.04542652890086174,
-0.1516437977552414,
0.3489117920398712,
-0.29893726110458374,
-0.10723039507865906,
0.014789756387472153,
-0.15336188673973083
] |
https://github.com/huggingface/datasets/issues/4963 | Dataset without script does not support regular JSON data file | Hi @julien-c,
Out of the box, we only support JSON lines (NDJSON) data files, but your data file is a regular JSON file. The reason is we use `pyarrow.json.read_json` and this only supports line-delimited JSON. | ### Link
https://huggingface.co/datasets/julien-c/label-studio-my-dogs
### Description
<img width="1115" alt="image" src="https://user-images.githubusercontent.com/326577/189422048-7e9c390f-bea7-4521-a232-43f049ccbd1f.png">
### Owner
Yes | 35 | Dataset without script does not support regular JSON data file
### Link
https://huggingface.co/datasets/julien-c/label-studio-my-dogs
### Description
<img width="1115" alt="image" src="https://user-images.githubusercontent.com/326577/189422048-7e9c390f-bea7-4521-a232-43f049ccbd1f.png">
### Owner
Yes
Hi @julien-c,
Out of the box, we only support JSON lines (NDJSON) data files, but your data file is a regular JSON file. The reason is we use `pyarrow.json.read_json` and this only supports line-delimited JSON. | [
-0.18610836565494537,
0.23253092169761658,
-0.17697162926197052,
0.22134143114089966,
0.3106291890144348,
0.09546839445829391,
0.33586859703063965,
0.432341068983078,
-0.10013698041439056,
0.11419596523046494,
0.059093721210956573,
0.3605564534664154,
-0.0065533192828297615,
0.26309695839881897,
0.09760963171720505,
-0.023877158761024475,
-0.16030022501945496,
0.2739335894584656,
0.23993302881717682,
-0.03537199646234512,
-0.17819039523601532,
0.070428267121315,
-0.041653819382190704,
0.1244538426399231,
-0.2815181612968445,
-0.13535885512828827,
-0.10411179810762405,
0.35612812638282776,
-0.32871872186660767,
-0.46586084365844727,
-0.03322015330195427,
0.20910194516181946,
-0.05571744963526726,
0.29300951957702637,
-0.00010130251030204818,
0.17320741713047028,
0.3198578953742981,
-0.10350459069013596,
-0.05003919079899788,
-0.2610705494880676,
-0.24794530868530273,
-0.13208505511283875,
-0.11915707588195801,
-0.4902125895023346,
-0.03900158777832985,
-0.3894355893135071,
0.18144993484020233,
0.06616609543561935,
0.5232661962509155,
0.40571078658103943,
0.3182445466518402,
-0.004646167159080505,
0.1379231959581375,
-0.05469461530447006,
0.36133357882499695,
0.33244413137435913,
0.07256682217121124,
0.1425628513097763,
0.02176472544670105,
0.11221794039011002,
-0.015338025987148285,
0.13702534139156342,
-0.16770224273204803,
-0.03602166473865509,
0.18036499619483948,
0.12064751237630844,
-0.22614747285842896,
-0.21732813119888306,
0.23033007979393005,
0.34460213780403137,
0.5512821674346924,
-0.149418443441391,
-0.1507876217365265,
-0.07773712277412415,
-0.1113225445151329,
-0.1894422471523285,
0.05123063176870346,
0.4034425616264343,
-0.04435136169195175,
0.25430330634117126,
-0.38926953077316284,
-0.03632259741425514,
-0.29285043478012085,
0.1800701916217804,
0.009105764329433441,
0.05282748490571976,
-0.052752166986465454,
0.09229922294616699,
-0.041757892817258835,
-0.09135209023952484,
-0.1542564183473587,
-0.07201514393091202,
-0.09628057479858398,
-0.08521425724029541,
0.06472290307283401,
-0.009904511272907257,
0.03367722034454346,
-0.15180441737174988,
0.49098920822143555,
0.2674488127231598,
0.1730176955461502,
0.028446530923247337,
-0.08542807400226593,
0.19098296761512756,
0.17451773583889008,
-0.042995110154151917,
0.22389942407608032,
0.1212577149271965,
0.3503997325897217,
0.043042805045843124,
-0.02035161852836609,
-0.09044108539819717,
-0.05743540823459625,
-0.11320560425519943,
0.0688306987285614,
-0.23990294337272644,
0.39258116483688354,
0.03588266298174858,
-0.2421552836894989,
-0.018417399376630783,
-0.14656822383403778,
-0.09512414783239365,
-0.3337138295173645,
0.4673413336277008,
0.179338738322258,
-0.18167224526405334,
-0.027467504143714905,
0.24624687433242798,
0.12220155447721481,
-0.1404680460691452,
-0.1734691709280014,
0.10507979989051819,
0.12060526013374329,
-0.1052388921380043,
0.1831543892621994,
0.034211646765470505,
0.3570803999900818,
-0.17895832657814026,
0.06567104905843735,
0.053866930305957794,
0.10354378074407578,
-0.007852950133383274,
-0.036366187036037445,
0.18459613621234894,
0.18763503432273865,
-0.0459459163248539,
0.08992455899715424,
-0.29172325134277344,
-0.16937068104743958,
0.36469390988349915,
-0.37234845757484436,
-0.0342288613319397,
-0.09063667058944702,
0.28359150886535645,
-0.17570900917053223,
-0.19161847233772278,
-0.182594895362854,
-0.011507466435432434,
0.031612150371074677,
-0.15743789076805115,
0.14859338104724884,
0.03715920448303223,
-0.07946246862411499,
-0.27799442410469055,
-0.12751291692256927,
0.2468276470899582,
-0.607430100440979,
-0.013074468821287155,
0.16656076908111572,
-0.22834616899490356,
0.024975165724754333,
0.1554555594921112,
-0.07271494716405869,
0.1353045403957367,
-0.11187265068292618,
0.4643208384513855,
0.23417022824287415,
-0.5177549123764038,
-0.3188876509666443,
0.27473416924476624,
-0.11555130034685135,
-0.15073564648628235,
0.042061179876327515,
0.029926791787147522,
0.2647830843925476,
0.17935176193714142,
0.09643317759037018,
0.17567139863967896,
0.1291768103837967,
0.23084071278572083,
-0.006662264466285706,
-0.21078743040561676,
0.12919208407402039,
0.35937443375587463,
-0.13795843720436096,
-0.1006622239947319,
0.24285957217216492,
-0.14833344519138336,
0.1484733521938324,
-0.12611795961856842,
0.02878757193684578,
0.31831908226013184,
0.3060795068740845,
-0.0991545170545578,
0.0768997073173523,
-0.059956055134534836,
-0.38566234707832336,
0.10143356770277023,
0.10813635587692261,
0.08552001416683197,
-0.3223223090171814,
-0.30575287342071533,
-0.2078465223312378,
-0.026545844972133636,
-0.41245701909065247,
-0.2602190673351288,
0.30050522089004517,
0.08899188041687012,
0.01128777489066124,
0.0779353678226471,
-0.1519479900598526,
0.11644965410232544,
0.12887784838676453,
0.05344293639063835,
-0.26000353693962097,
0.2333521693944931,
-0.1838899850845337,
-0.16141991317272186,
0.3567812442779541,
-0.005140490829944611,
0.027748778462409973,
-0.07781056314706802,
0.08079242706298828,
0.40356209874153137,
0.11634515970945358,
0.04037325084209442,
0.19186708331108093,
-0.15279679000377655,
-0.0016041826456785202,
-0.4063696265220642,
0.006285389885306358,
0.05943616107106209,
0.07483161985874176,
-0.15437519550323486,
-0.40903380513191223,
0.299949049949646,
-0.04542497172951698,
0.02578725665807724,
0.05711890012025833,
-0.04864564910531044,
0.3151170611381531,
-0.21345989406108856,
-0.07234732061624527,
-0.1576174944639206,
-0.015371840447187424,
0.09654803574085236,
0.13446439802646637,
0.0013021714985370636,
-0.37702810764312744,
0.01728418469429016,
0.9351865649223328,
-0.01287168636918068,
0.13804098963737488,
0.16228348016738892,
-0.09890478104352951,
-0.09490159898996353,
0.08841967582702637,
0.073165163397789,
0.26714515686035156,
0.40659141540527344,
-0.19958052039146423,
0.20900952816009521,
0.25524166226387024,
-0.17258629202842712,
-0.0038876906037330627,
-0.09345124661922455,
0.22728583216667175,
0.11747755110263824,
0.4432004690170288,
-0.12729376554489136,
-0.3647131025791168,
-0.32827988266944885,
-0.01517628226429224,
0.2203621119260788,
-0.2602975368499756,
-0.055422812700271606,
-0.3937608003616333,
-0.028269030153751373,
0.12130694836378098,
-0.054896604269742966,
-0.3437919616699219,
-0.09815666824579239,
0.20842666923999786,
-0.00825582817196846,
0.0917297899723053,
-0.015123972669243813,
0.06678394973278046,
0.19153016805648804,
0.28258341550827026,
-0.35153231024742126,
-0.4669886827468872,
-0.27054405212402344,
-0.0814184918999672,
0.23720669746398926,
0.060713671147823334,
0.11382456868886948,
0.3308347463607788,
-0.3224470019340515,
0.08245673030614853,
-0.18525978922843933,
-0.2266131043434143,
0.11176125705242157,
-0.24341149628162384,
0.10361099988222122,
0.2824428379535675,
0.35695964097976685,
-0.062193863093853,
0.271376371383667,
0.32999387383461,
-0.04732730612158775,
-0.5012680292129517,
0.07747071236371994,
-0.0037947245873510838,
-0.19268092513084412,
-0.2712087631225586,
-0.21294516324996948,
-0.19016069173812866,
-0.24353349208831787,
0.4315761923789978,
0.30225157737731934,
0.17974954843521118,
0.08510827273130417,
0.21704718470573425,
0.22735841572284698,
-0.12909956276416779,
-0.00027342699468135834,
-0.02743034064769745,
-0.21742360293865204,
0.3504357635974884,
-0.37545710802078247,
-0.3414073884487152,
0.29498186707496643,
0.1489569991827011,
0.08415979146957397,
-0.19146330654621124,
-0.39440596103668213,
-0.2652614116668701,
-0.11244101822376251,
0.4320894777774811,
0.016689548268914223,
-0.09271391481161118,
0.37462326884269714,
0.1103447824716568,
-0.2298598438501358,
-0.3276805281639099,
-0.1730956882238388,
0.08798868209123611,
-0.0825783833861351,
-0.047363899648189545,
-0.00293031707406044,
0.3863813281059265,
0.11876502633094788,
0.24774479866027832,
0.01755661889910698,
-0.21364350616931915,
0.2895797789096832,
-0.4945935606956482,
0.41373464465141296,
-0.05823148041963577,
-0.039294347167015076,
0.16129139065742493,
0.17258071899414062,
-0.04236369580030441,
0.08306778967380524,
-0.09029033035039902,
0.13390615582466125,
-0.1905849575996399,
-0.08271615207195282,
-0.41478076577186584,
-0.03371218591928482,
-0.10082373023033142,
0.34775814414024353,
-0.16406244039535522,
-0.05951585993170738,
0.004373915493488312,
0.07770536839962006,
-0.0013331579975783825,
-0.20979556441307068,
0.24299241602420807,
0.0517660528421402,
-0.028025351464748383,
-0.56370609998703,
-0.05326400324702263,
-0.27704811096191406,
0.3655911087989807,
-0.03213813155889511,
-0.12082217633724213,
-0.1904241144657135,
0.2530596852302551,
0.20819136500358582,
-0.4666518568992615,
0.7624264359474182,
-0.2652144432067871,
0.17987358570098877,
0.029841721057891846,
0.18316280841827393,
-0.3225858211517334,
0.2542359530925751,
-0.23597782850265503,
0.1079602837562561,
0.12376275658607483,
0.25809112191200256,
-0.37088194489479065,
-0.0515764094889164,
0.20685569941997528,
-0.09521657228469849,
-0.08818476647138596,
-0.2530972361564636,
-0.18747937679290771,
-0.40330368280410767,
-0.5375334024429321,
-0.24849462509155273,
0.15333512425422668,
0.1545439511537552,
-0.0701364055275917,
-0.2291760891675949,
0.01418682374060154,
0.012565333396196365,
-0.09773996472358704,
0.11433376371860504,
0.16422057151794434,
-0.1810694932937622,
-0.15442857146263123,
0.08495425432920456,
0.2607932686805725,
0.47257381677627563,
0.5763895511627197,
0.019860688596963882,
-0.2698739171028137,
-0.09143479913473129,
-0.2272571623325348,
0.15723282098770142,
0.18725129961967468,
-0.0646425262093544,
-0.1713954508304596,
0.10619036108255386,
0.07195431739091873,
0.08363061398267746,
-0.0882752537727356,
0.3489520847797394,
-0.29002466797828674,
-0.1606380045413971,
-0.18459387123584747,
0.2862561345100403,
-0.054873354732990265,
0.19521556794643402,
-0.1915442943572998,
0.06855253130197525,
-0.23792490363121033,
0.13609926402568817,
-0.04633747786283493,
0.7308964133262634,
0.0034154318273067474,
0.15161527693271637,
0.41334131360054016,
-0.36923015117645264,
0.28711846470832825,
0.018979690968990326,
0.04031805321574211,
-0.32463395595550537,
0.08985110372304916,
-0.13505278527736664,
-0.06771683692932129,
0.10765053331851959,
0.5682234764099121,
-0.14602625370025635,
0.042094625532627106,
0.03654775768518448,
0.0462646484375,
-0.02198854275047779,
0.2937373220920563,
-0.06517759710550308,
-0.043502017855644226,
-0.36956438422203064,
0.27611392736434937,
-0.220886692404747,
-0.0926930159330368,
-0.004867346491664648,
-0.34132784605026245,
-0.1983902007341385,
-0.19863510131835938,
-0.09756536781787872,
0.2030487358570099,
-0.06094158813357353,
-0.165684774518013,
0.12050746381282806,
-0.19284798204898834,
-0.025413112714886665,
0.22568179666996002,
-0.09474518895149231,
0.07066109776496887,
-0.3561568260192871,
0.32548969984054565,
-0.17615479230880737,
-0.023496100679039955,
-0.06251319497823715,
-0.042563483119010925,
0.16508574783802032,
-0.17865368723869324,
-0.2851334810256958,
-0.014021918177604675,
-0.08203338831663132,
-0.29318034648895264,
-0.0536700114607811,
0.08522370457649231,
-0.27983617782592773,
-0.19874610006809235,
-0.3592711091041565,
-0.17464783787727356,
-0.1724114865064621,
-0.2001408338546753,
0.23974815011024475,
-0.1288519948720932,
0.12440439313650131,
-0.09098411351442337,
0.13968583941459656,
-0.13599377870559692,
-0.05446973070502281,
0.31894487142562866,
-0.09374215453863144,
0.12393355369567871,
0.4030255377292633,
0.14512741565704346,
-0.15554970502853394,
-0.29492709040641785,
0.2910568416118622,
0.42755720019340515,
-0.3340526223182678,
0.10529563575983047,
0.1506269872188568,
0.3195219039916992,
-0.07039215415716171,
0.11548005044460297,
-0.21083395183086395,
-0.0339423269033432,
0.19434474408626556,
-0.5088623762130737,
-0.17200608551502228,
0.19667288661003113,
0.014427058398723602,
0.09834686666727066,
0.2623489201068878,
0.13208796083927155,
0.08753268420696259,
-0.1569608449935913,
-0.4437883198261261,
0.25041699409484863,
-0.08540172874927521,
-0.12243783473968506,
0.1714499592781067,
0.05730088800191879,
0.25644275546073914,
-0.14911562204360962,
0.22039104998111725,
0.2870755195617676,
-0.15278460085391998,
-0.33138930797576904,
0.021339163184165955,
0.04686085879802704,
0.19444018602371216,
0.020254269242286682,
-0.006014556623995304,
-0.2034280151128769,
-0.4371131360530853,
0.0469764769077301,
0.2485707402229309,
0.049097657203674316,
-0.08919233083724976,
0.13891270756721497,
-0.146039217710495,
0.09446995705366135,
-0.04140863195061684,
-0.23840132355690002,
-0.09044425189495087,
0.3921043276786804,
-0.08926031738519669,
0.07888612896203995,
-0.16712719202041626,
0.0483614057302475,
-0.029622064903378487,
0.10776852071285248,
0.14685533940792084,
0.29254424571990967,
0.36960166692733765,
-0.5415223240852356,
0.03486708179116249,
-0.0036494170781224966,
0.5074267387390137,
0.10534004122018814,
-0.5142847895622253,
0.17739537358283997,
0.1467544436454773,
0.29785001277923584,
-0.33172091841697693,
0.13302655518054962,
0.31645509600639343,
-0.14952100813388824,
0.14828236401081085,
0.08549961447715759,
-0.12470002472400665,
0.08965420722961426,
-0.15137435495853424,
0.13765892386436462,
0.6078740358352661,
-0.12104925513267517,
-0.2378312349319458,
0.2918400168418884,
-0.28037014603614807,
0.05758482217788696,
0.41691210865974426,
0.3774793744087219,
0.2695370614528656,
0.6206244230270386,
0.10151059925556183,
0.30763891339302063,
0.24871504306793213,
0.04461263120174408,
0.0914272740483284,
-0.14279600977897644,
0.009202208369970322,
0.23826542496681213,
0.21785154938697815,
0.07065756618976593,
0.14013893902301788,
0.23583382368087769,
0.1167520061135292,
0.13766607642173767,
-0.10013711452484131,
0.250092476606369,
0.10289964079856873,
0.17230278253555298,
-0.4854171872138977,
-0.1334131807088852,
-0.08931459486484528,
0.029694806784391403,
-0.20575693249702454,
-0.2148411124944687,
-0.025851011276245117,
0.012613184750080109,
-0.18726785480976105,
-0.43225976824760437,
0.27889564633369446,
-0.26598307490348816,
-0.005430549383163452,
-0.16277074813842773,
0.24568206071853638,
0.14545713365077972,
-0.03900165110826492,
0.23715628683567047,
0.28333166241645813,
0.47187259793281555,
0.16565166413784027,
0.11407862603664398,
-0.08200438320636749,
-0.37851569056510925,
-0.3263513743877411,
-0.05953603237867355,
0.15980802476406097,
0.34328413009643555,
-0.1733895093202591,
0.2439149171113968,
0.30765461921691895,
-0.2465745210647583,
0.1589992344379425,
0.29646751284599304,
0.16525617241859436,
-0.08487209677696228,
-0.11794921010732651,
-0.22899514436721802,
-0.32525306940078735,
-0.17668065428733826,
-0.3133723735809326,
-0.3672167956829071,
-0.21598012745380402,
0.08413921296596527,
0.08836991339921951,
0.13170352578163147,
-0.267954558134079,
0.15612584352493286,
-0.2406923770904541,
0.29354822635650635,
0.2836223542690277,
0.0658004879951477,
0.21022827923297882,
-0.010136798024177551,
-0.4908163249492645,
0.054634179919958115,
-0.23506921529769897,
-0.294386088848114,
0.009456364437937737,
0.13058693706989288,
0.07154393941164017,
0.09517279267311096,
0.16445964574813843,
-0.0015230596764013171,
-0.06381875276565552,
0.20451787114143372,
-0.19983917474746704,
-0.09865055978298187,
0.10923360288143158,
0.1577380746603012,
-0.05621006339788437,
-0.20508265495300293,
0.18134771287441254,
-0.1532949060201645,
0.15558990836143494,
-0.1833825707435608,
0.1745423674583435,
-0.17561131715774536,
-0.19407200813293457,
0.38551467657089233,
0.08504297584295273,
0.3657408058643341,
-0.20518675446510315,
-0.022490864619612694,
-0.06043297424912453,
-0.1043456494808197,
-0.2883043587207794,
0.43805745244026184,
0.1688530296087265,
0.3438650667667389,
0.11716761440038681,
-0.09046299755573273,
-0.03921618312597275,
0.17255684733390808,
-0.24526192247867584,
-0.0948311984539032,
-0.019282449036836624,
0.19446425139904022,
0.02179444581270218,
-0.14656022191047668,
-0.12057650834321976,
-0.08435861021280289,
-0.06878581643104553,
-0.13662903010845184,
-0.32991981506347656,
-0.3305865526199341,
0.3859008550643921,
-0.2601242959499359,
-0.4112647473812103,
0.27494940161705017,
0.01462845504283905,
-0.06322970241308212,
-0.15808624029159546,
-0.22455042600631714,
0.24092215299606323,
0.3175453245639801,
0.07484011352062225,
-0.19735336303710938,
0.17209675908088684,
-0.10320702195167542,
0.058852288872003555,
-0.04449819400906563,
0.1601894199848175,
0.11860817670822144,
-0.16141864657402039,
-0.16816924512386322,
-0.26270365715026855
] |
https://github.com/huggingface/datasets/issues/4961 | fsspec 2022.8.2 breaks xopen in streaming mode | loading `fsspec==2022.7.1` fixes this issue, setup.py would need to be changed to prevent users from using the latest version of fsspec. | ## Describe the bug
When fsspec 2022.8.2 is installed in your environment, xopen will prematurely close files, making streaming mode inoperable.
## Steps to reproduce the bug
```python
import datasets
data = datasets.load_dataset('MLCommons/ml_spoken_words', 'id_wav', split='train', streaming=True)
```
## Expected results
Dataset should load as iterator.
## Actual results
```
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) 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)
1737 # Return iterable dataset in case of streaming
1738 if streaming:
-> 1739 return builder_instance.as_streaming_dataset(split=split)
1740
1741 # Some datasets are already processed on the HF google storage
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1023 )
1024 self._check_manual_download(dl_manager)
-> 1025 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1026 # By default, return all splits
1027 if split is None:
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _split_generators(self, dl_manager)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in <listcomp>(.0)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives(dl_manager, lang, format, split)
267 # for streaming case
268 def _download_audio_archives(dl_manager, lang, format, split):
--> 269 archives_paths = _download_audio_archives_paths(dl_manager, lang, format, split)
270 return [dl_manager.iter_archive(archive_path) for archive_path in archives_paths]
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives_paths(dl_manager, lang, format, split)
251 n_files_path = dl_manager.download(n_files_url)
252
--> 253 with open(n_files_path, "r", encoding="utf-8") as file:
254 n_files = int(file.read().strip()) # the file contains a number of archives
255
ValueError: I/O operation on closed file.
```
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
| 21 | fsspec 2022.8.2 breaks xopen in streaming mode
## Describe the bug
When fsspec 2022.8.2 is installed in your environment, xopen will prematurely close files, making streaming mode inoperable.
## Steps to reproduce the bug
```python
import datasets
data = datasets.load_dataset('MLCommons/ml_spoken_words', 'id_wav', split='train', streaming=True)
```
## Expected results
Dataset should load as iterator.
## Actual results
```
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) 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)
1737 # Return iterable dataset in case of streaming
1738 if streaming:
-> 1739 return builder_instance.as_streaming_dataset(split=split)
1740
1741 # Some datasets are already processed on the HF google storage
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1023 )
1024 self._check_manual_download(dl_manager)
-> 1025 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1026 # By default, return all splits
1027 if split is None:
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _split_generators(self, dl_manager)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in <listcomp>(.0)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives(dl_manager, lang, format, split)
267 # for streaming case
268 def _download_audio_archives(dl_manager, lang, format, split):
--> 269 archives_paths = _download_audio_archives_paths(dl_manager, lang, format, split)
270 return [dl_manager.iter_archive(archive_path) for archive_path in archives_paths]
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives_paths(dl_manager, lang, format, split)
251 n_files_path = dl_manager.download(n_files_url)
252
--> 253 with open(n_files_path, "r", encoding="utf-8") as file:
254 n_files = int(file.read().strip()) # the file contains a number of archives
255
ValueError: I/O operation on closed file.
```
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
loading `fsspec==2022.7.1` fixes this issue, setup.py would need to be changed to prevent users from using the latest version of fsspec. | [
-0.5926543474197388,
0.019043713808059692,
0.005749773234128952,
-0.031902894377708435,
0.0957615077495575,
-0.3419184982776642,
0.28033727407455444,
0.30580541491508484,
0.16552390158176422,
0.14295904338359833,
-0.2108203023672104,
0.14903897047042847,
0.052455540746450424,
0.540768563747406,
0.015612475574016571,
-0.08199179172515869,
0.19910813868045807,
0.21382606029510498,
-0.10920751094818115,
0.0169975683093071,
-0.32402533292770386,
0.29253602027893066,
-0.3137550950050354,
-0.20421455800533295,
-0.09267345815896988,
-0.01565566100180149,
0.26272040605545044,
0.22448256611824036,
-0.15283572673797607,
-0.474051833152771,
-0.15177367627620697,
0.14693094789981842,
0.024274230003356934,
0.2933063805103302,
-0.00010633678175508976,
-0.06530395895242691,
0.3072553277015686,
0.013651715591549873,
-0.1984100341796875,
0.05250433087348938,
-0.0736175999045372,
-0.0068557062186300755,
0.006546065676957369,
0.13065987825393677,
-0.046163588762283325,
-0.41656526923179626,
0.00017604045569896698,
-0.7772538065910339,
0.5465697646141052,
0.34679514169692993,
0.19420480728149414,
0.22660426795482635,
0.3668452799320221,
-0.048993345350027084,
0.38668012619018555,
-0.38845038414001465,
-0.025141507387161255,
-0.07176618278026581,
0.24535104632377625,
0.015529125928878784,
-0.2164827585220337,
0.382819265127182,
-0.181137815117836,
-0.17236924171447754,
-0.1695437729358673,
-0.11455052345991135,
0.2218412458896637,
-0.2818082571029663,
0.201494961977005,
0.14027756452560425,
0.1724141240119934,
-0.24276190996170044,
-0.2663467526435852,
-0.3283848166465759,
-0.26933300495147705,
-0.5548340082168579,
0.26611611247062683,
0.12463114410638809,
-0.015606850385665894,
0.0831550806760788,
0.21302713453769684,
-0.06793451309204102,
-0.06199220195412636,
0.07707341015338898,
0.0013019479811191559,
0.3506295382976532,
-0.14871753752231598,
-0.07210167497396469,
0.2149352878332138,
-0.16626529395580292,
0.21113979816436768,
0.03327818214893341,
-0.1586330384016037,
-0.07996100187301636,
-0.43766242265701294,
0.10188739001750946,
0.24732065200805664,
-0.06622029095888138,
0.13435903191566467,
0.2968323826789856,
-0.3027757406234741,
0.15143102407455444,
0.07427936792373657,
0.05075644329190254,
0.07193293422460556,
0.2220744788646698,
-0.0036176517605781555,
-0.14706392586231232,
0.09205478429794312,
0.09399762004613876,
-0.18025103211402893,
-0.1439242959022522,
0.17616836726665497,
-0.4227355420589447,
-0.13785414397716522,
-0.0030626393854618073,
0.3790627121925354,
-0.15773658454418182,
-0.3667213022708893,
0.05039634555578232,
-0.2222132682800293,
0.09306536614894867,
-0.08661168813705444,
0.37430137395858765,
0.07180308550596237,
0.48929548263549805,
0.1847163587808609,
0.2333335131406784,
-0.42288994789123535,
-0.23514842987060547,
-0.13106617331504822,
-0.018211498856544495,
-0.1250254213809967,
0.12980009615421295,
0.08255954086780548,
-0.35699111223220825,
0.22330354154109955,
0.07587626576423645,
0.05804337561130524,
-0.24745847284793854,
-0.1735212206840515,
-0.07800517976284027,
0.059974201023578644,
0.2486756592988968,
0.16598740220069885,
0.048644959926605225,
-0.059096384793519974,
-0.20282554626464844,
0.12945938110351562,
-0.00043061375617980957,
0.01950678601861,
-0.0975385382771492,
-0.25927963852882385,
0.29998978972435,
0.09469082951545715,
-0.10459469258785248,
-0.03362720459699631,
0.14639168977737427,
-0.14542824029922485,
-0.3235664665699005,
0.06499063223600388,
-0.07017213851213455,
-0.3229714035987854,
-0.06692056357860565,
0.21097244322299957,
0.4957362413406372,
-0.11241310834884644,
-0.0473456084728241,
-0.25537270307540894,
0.1435219645500183,
0.29288366436958313,
0.276577889919281,
0.033838167786598206,
-0.08581922203302383,
-0.1800919771194458,
0.42260628938674927,
0.13667669892311096,
-0.40199214220046997,
-0.36765551567077637,
0.435926228761673,
-0.1568375527858734,
0.039715878665447235,
0.4189263880252838,
-0.264610230922699,
0.4472126364707947,
-0.004752906039357185,
0.16819103062152863,
0.1439957618713379,
0.08642664551734924,
0.027535488829016685,
-0.37366533279418945,
-0.1623842567205429,
0.05177893862128258,
0.13498453795909882,
-0.005486961454153061,
-0.09152991324663162,
0.1472964584827423,
0.061019785702228546,
0.4188120365142822,
-0.027539778500795364,
0.03260880708694458,
-0.06755607575178146,
0.4958624243736267,
0.04737529903650284,
-0.10196258872747421,
-0.3490943908691406,
-0.10837701708078384,
0.006493654102087021,
-0.12493998557329178,
-0.22846347093582153,
0.22066354751586914,
-0.14334018528461456,
-0.2534293830394745,
0.04000121355056763,
-0.19998912513256073,
-0.4062645435333252,
0.23476478457450867,
0.1450541764497757,
-0.13744427263736725,
0.10350574553012848,
-0.16111014783382416,
0.098103828728199,
-0.14527764916419983,
0.08929028362035751,
-0.007837925106287003,
0.1557326316833496,
0.07667145133018494,
-0.35471436381340027,
0.06448101252317429,
0.13004323840141296,
0.3615472614765167,
0.06768202036619186,
-0.17112091183662415,
0.6955145597457886,
0.41011765599250793,
0.5680566430091858,
-0.41157254576683044,
0.19366435706615448,
0.2033444344997406,
-0.24713511765003204,
-0.10422063618898392,
0.511687159538269,
0.036115411669015884,
0.04749631881713867,
0.10946158319711685,
0.19063593447208405,
0.29193755984306335,
-0.07454805821180344,
0.2729586958885193,
0.030673297122120857,
0.08578597009181976,
-0.18309259414672852,
-0.08108671754598618,
0.10602086782455444,
0.2747623026371002,
-0.022220779210329056,
0.4111233651638031,
-0.029419323429465294,
-0.3270523250102997,
0.1541902869939804,
0.6422069072723389,
-0.041082464158535004,
0.1189475804567337,
0.09902001172304153,
-0.4068709909915924,
-0.12889599800109863,
0.2509569525718689,
0.15445344150066376,
0.3563428521156311,
0.26900380849838257,
0.07654419541358948,
0.3278385102748871,
0.12219729274511337,
-0.32018163800239563,
0.49193042516708374,
0.009035490453243256,
0.08828327059745789,
0.3379763066768646,
0.23522043228149414,
0.03162887319922447,
-0.5383797883987427,
-0.0673375278711319,
-0.1451306939125061,
-0.13524173200130463,
-0.3419952094554901,
-0.037657566368579865,
-0.269120454788208,
-0.2796405851840973,
-0.21014755964279175,
0.2723609507083893,
0.28938424587249756,
-0.15231533348560333,
-0.011662829667329788,
0.6310804486274719,
-0.1782691776752472,
0.27854326367378235,
-0.01858643814921379,
0.07788446545600891,
0.1755121946334839,
-0.004926703870296478,
-0.01960963010787964,
0.30197951197624207,
-0.31451523303985596,
0.08514831960201263,
0.2754119038581848,
-0.22263838350772858,
-0.06913642585277557,
0.2904497981071472,
-0.06964747607707977,
-0.3827069401741028,
-0.22663748264312744,
0.09962238371372223,
0.16501256823539734,
-0.015056824311614037,
-0.088618203997612,
0.0007366463541984558,
0.16978414356708527,
-0.32948440313339233,
-0.012092120945453644,
-0.3385324478149414,
0.05499338358640671,
-0.14055800437927246,
-0.08927746117115021,
-0.026760809123516083,
-0.37435051798820496,
-0.4944626986980438,
-0.06385840475559235,
-0.654755175113678,
0.4141033887863159,
-0.21348871290683746,
0.0619661770761013,
0.35911720991134644,
-0.10858064144849777,
-0.01686260476708412,
0.04226454347372055,
-0.06804706156253815,
-0.22750374674797058,
-0.36182108521461487,
0.1419750303030014,
-0.20790550112724304,
-0.28993287682533264,
0.08889436721801758,
0.020594023168087006,
0.05354560911655426,
0.034505538642406464,
-0.19548004865646362,
0.24745966494083405,
-0.17022550106048584,
-0.06860219687223434,
-0.07297137379646301,
-0.060807570815086365,
0.39030027389526367,
0.10238513350486755,
-0.17642207443714142,
-0.21136614680290222,
0.013005822896957397,
0.1592792421579361,
0.1349354386329651,
-0.03442566841840744,
-0.25612661242485046,
0.16615557670593262,
0.0310114286839962,
0.3542686700820923,
0.2577064037322998,
0.2703414559364319,
0.3331400156021118,
-0.12335082143545151,
0.16515350341796875,
-0.255369633436203,
0.011798204854130745,
0.2701667249202728,
-0.1433219015598297,
-0.3159756064414978,
0.3590611219406128,
-0.001888735219836235,
-0.16902479529380798,
-0.17114153504371643,
0.095155730843544,
-0.29011818766593933,
-0.3241516649723053,
-0.12283077836036682,
-0.026857860386371613,
0.3082495629787445,
-0.0793585330247879,
0.344910204410553,
0.2110121250152588,
0.07168097794055939,
0.18671539425849915,
0.019138343632221222,
0.24503090977668762,
-0.13974429666996002,
-0.15407609939575195,
0.05590158328413963,
-0.1722358763217926,
0.22638148069381714,
-0.029899107292294502,
0.48776617646217346,
-0.2301415354013443,
-0.1275854855775833,
0.020709209144115448,
0.05738946050405502,
0.3610811233520508,
0.04708430916070938,
0.0697818398475647,
0.30049943923950195,
0.13212808966636658,
-0.2644556164741516,
-0.15545058250427246,
-0.20507276058197021,
-0.2766053080558777,
-0.014271058142185211,
0.22516101598739624,
-0.33017849922180176,
-0.09190313518047333,
-0.021395627409219742,
-0.3022743761539459,
0.16099664568901062,
0.03622768446803093,
-0.08651672303676605,
-0.11915577948093414,
-0.12678010761737823,
-0.05539756268262863,
0.18451565504074097,
0.19158168137073517,
-0.3850838243961334,
-0.07321681082248688,
0.13847066462039948,
-0.26217785477638245,
0.12495899200439453,
-0.11502982676029205,
0.29257118701934814,
0.08239100873470306,
0.10853712260723114,
0.25537213683128357,
0.18516585230827332,
-0.06773971766233444,
0.1782202571630478,
0.2688826322555542,
-0.28835660219192505,
0.1703181266784668,
0.22472591698169708,
0.03522557020187378,
0.4577275514602661,
-0.31276029348373413,
0.36826109886169434,
0.2052004337310791,
0.2935326099395752,
-0.32009124755859375,
0.292958527803421,
0.4498271644115448,
0.09094558656215668,
0.036101099103689194,
-0.4724174737930298,
0.44336360692977905,
-0.11591410636901855,
-0.03590299189090729,
0.42359378933906555,
-0.057516008615493774,
-0.23408308625221252,
0.3007785677909851,
-0.3845699429512024,
0.726851224899292,
0.23502196371555328,
0.015785876661539078,
0.5337765216827393,
-0.13105922937393188,
0.0769721269607544,
-0.33343279361724854,
0.1649688333272934,
0.05697685852646828,
-0.19269271194934845,
-0.011761954054236412,
-0.003579195588827133,
0.2865953743457794,
-0.2687181830406189,
-0.20337234437465668,
0.1601852923631668,
0.07009744644165039,
-0.039529573172330856,
0.15955393016338348,
0.3090146780014038,
-0.40825292468070984,
-0.3281659781932831,
-0.5725817084312439,
0.17031072080135345,
0.10316552221775055,
0.1082543432712555,
0.02952168509364128,
-0.35886263847351074,
0.4132886826992035,
0.004945393651723862,
-0.2781308889389038,
0.40420299768447876,
-0.5247951745986938,
0.05067768692970276,
-0.1707291305065155,
-0.19594192504882812,
0.16323289275169373,
0.03309544548392296,
-0.09399871528148651,
0.04857513681054115,
-0.2505696415901184,
0.2856980860233307,
0.10229397565126419,
0.13163162767887115,
0.11683874577283859,
-0.023090548813343048,
0.19534705579280853,
-0.13276530802249908,
-0.16243433952331543,
0.2866065502166748,
-0.09594093263149261,
-0.14594608545303345,
-0.03619673103094101,
-0.23344822227954865,
0.38289785385131836,
-0.08863173425197601,
-0.020461594685912132,
-0.014639049768447876,
-0.21812981367111206,
-0.2815883159637451,
0.17151720821857452,
-0.12185616791248322,
-0.1779034584760666,
0.056645676493644714,
-0.11861090362071991,
-0.08866626769304276,
-0.20001515746116638,
0.4088115692138672,
-0.1566975712776184,
0.4308060109615326,
0.43466129899024963,
0.134299635887146,
-0.14897584915161133,
-0.1958533525466919,
-0.07649878412485123,
-0.1902666538953781,
0.07843583077192307,
0.06838146597146988,
0.014070737175643444,
-0.05914291739463806,
-0.03584037721157074,
0.3625463843345642,
0.03925975039601326,
0.008793972432613373,
0.044624682515859604,
-0.21005934476852417,
-0.13838839530944824,
0.08075007796287537,
-0.254331111907959,
0.003344345837831497,
0.08964934200048447,
0.7028698325157166,
-0.15923653542995453,
-0.3442899286746979,
-0.3706335425376892,
0.011295781470835209,
-0.010006356984376907,
-0.06172005832195282,
0.033159129321575165,
-0.05257745832204819,
0.31550273299217224,
-0.12097196280956268,
0.18583379685878754,
0.3441866636276245,
-0.16329745948314667,
-0.2134290337562561,
-0.21543900668621063,
0.10982527583837509,
0.17348408699035645,
-0.19634544849395752,
0.04165255278348923,
-0.09074769914150238,
-0.23254555463790894,
-0.015239991247653961,
0.2668788731098175,
0.08620395511388779,
-0.14158497750759125,
0.05790690705180168,
-0.20513398945331573,
-0.001469738781452179,
-0.06940023601055145,
0.022634895518422127,
-0.2117452621459961,
0.11080434918403625,
-0.04750380292534828,
0.12249007076025009,
-0.015428426675498486,
-0.11181161552667618,
-0.16493813693523407,
-0.11874424666166306,
0.3248061239719391,
0.12316494435071945,
0.35543549060821533,
-0.2754896879196167,
-0.36187371611595154,
-0.06584399938583374,
0.49471041560173035,
0.28320831060409546,
-0.12936654686927795,
-0.0483737513422966,
0.1985304355621338,
0.29811805486679077,
-0.20539548993110657,
0.14656995236873627,
-0.07139572501182556,
-0.05398676544427872,
0.3264869749546051,
-0.08252619951963425,
0.23476508259773254,
-0.1293463110923767,
-0.007291808724403381,
0.29869377613067627,
-0.09722137451171875,
0.09910532087087631,
0.36715516448020935,
0.17334185540676117,
0.07494419813156128,
0.16289733350276947,
0.02543685771524906,
0.11762115359306335,
0.0827760174870491,
0.4386851191520691,
0.027978453785181046,
0.5101338624954224,
0.1413254737854004,
0.16531716287136078,
-0.03491632640361786,
-0.4484764635562897,
-0.20453448593616486,
0.09619517624378204,
-0.3571690618991852,
0.22576233744621277,
-0.1134631484746933,
0.2857740521430969,
-0.2703045606613159,
-0.1613147109746933,
-0.02306639403104782,
0.21503430604934692,
-0.12285659462213516,
-0.25644174218177795,
0.2559720575809479,
-0.030499625951051712,
-0.004664339125156403,
0.0922439694404602,
0.21610216796398163,
0.11342653632164001,
0.16413921117782593,
0.061900701373815536,
-0.04404301941394806,
0.0031427862122654915,
-0.4957311153411865,
0.15720543265342712,
0.3475567698478699,
-0.3112608790397644,
0.30359625816345215,
0.027416430413722992,
-0.10503876209259033,
0.041278060525655746,
0.39794614911079407,
0.37466371059417725,
0.12822702527046204,
-0.2912987768650055,
-0.03111080452799797,
0.21670274436473846,
-0.021397067233920097,
0.05066825449466705,
-0.06545593589544296,
0.2206517904996872,
0.263007253408432,
0.2910534739494324,
0.22866559028625488,
-0.2743123471736908,
0.015873555094003677,
0.03781659156084061,
0.025931788608431816,
-0.4801686108112335,
-0.12009752541780472,
-0.16129516065120697,
0.06200817972421646,
-0.27986013889312744,
-0.200851172208786,
-0.40335792303085327,
-0.08308017998933792,
0.4086359739303589,
0.04015439376235008,
0.2707984745502472,
-0.1103491559624672,
0.11000604927539825,
0.18233278393745422,
0.22946900129318237,
-0.046930987387895584,
0.2234123945236206,
-0.14189845323562622,
-0.5028219819068909,
-0.3702118992805481,
0.16482879221439362,
0.08264582604169846,
-0.014522723853588104,
-0.11279702931642532,
0.11381314694881439,
0.029995765537023544,
0.00495135597884655,
-0.11360608041286469,
-0.13775990903377533,
-0.08974511921405792,
0.12100417912006378,
-0.22621555626392365,
0.12726108729839325,
0.03442137688398361,
-0.022855961695313454,
-0.10400629788637161,
-0.33422237634658813,
0.34141218662261963,
-0.17912745475769043,
0.18667751550674438,
0.1356804519891739,
0.10986477136611938,
-0.1593131124973297,
-0.249172180891037,
0.2734248638153076,
0.12872980535030365,
0.21579551696777344,
-0.39439868927001953,
-0.06363104283809662,
-0.19761019945144653,
-0.2352842539548874,
-0.16302640736103058,
-0.3682595491409302,
-0.14322717487812042,
0.540499210357666,
0.10249336063861847,
0.01182403601706028,
-0.31287357211112976,
0.4667679965496063,
0.11185593903064728,
-0.25138911604881287,
-0.5198057889938354,
0.28993502259254456,
-0.20169034600257874,
0.1633775681257248,
-0.01695331744849682,
0.2634963095188141,
-0.20820236206054688,
-0.039967745542526245,
-0.3209547996520996,
-0.5708547234535217,
0.4837009012699127,
-0.6862039566040039,
-0.19860561192035675,
-0.07681310176849365,
0.4825993478298187,
0.19336754083633423,
0.0708252340555191,
-0.20785659551620483,
0.06729870289564133,
0.07989861071109772,
-0.03201151266694069,
-0.1610855758190155,
0.1481366604566574,
-0.24355626106262207,
-0.1257975846529007,
0.034853894263505936,
0.1687701791524887,
0.3276449739933014,
-0.18606944382190704,
0.20187914371490479,
-0.326840877532959
] |
https://github.com/huggingface/datasets/issues/4961 | fsspec 2022.8.2 breaks xopen in streaming mode | Hi @DCNemesis, thanks for reporting.
That was a temporary issue in `fsspec` releases 2022.8.0 and 2022.8.1. But they fixed it in their patch release 2022.8.2 (and yanked both previous versions). See:
- https://github.com/huggingface/transformers/pull/18846
Are you sure you have version 2022.8.2 installed?
```shell
pip install -U fsspec
```
| ## Describe the bug
When fsspec 2022.8.2 is installed in your environment, xopen will prematurely close files, making streaming mode inoperable.
## Steps to reproduce the bug
```python
import datasets
data = datasets.load_dataset('MLCommons/ml_spoken_words', 'id_wav', split='train', streaming=True)
```
## Expected results
Dataset should load as iterator.
## Actual results
```
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) 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)
1737 # Return iterable dataset in case of streaming
1738 if streaming:
-> 1739 return builder_instance.as_streaming_dataset(split=split)
1740
1741 # Some datasets are already processed on the HF google storage
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1023 )
1024 self._check_manual_download(dl_manager)
-> 1025 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1026 # By default, return all splits
1027 if split is None:
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _split_generators(self, dl_manager)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in <listcomp>(.0)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives(dl_manager, lang, format, split)
267 # for streaming case
268 def _download_audio_archives(dl_manager, lang, format, split):
--> 269 archives_paths = _download_audio_archives_paths(dl_manager, lang, format, split)
270 return [dl_manager.iter_archive(archive_path) for archive_path in archives_paths]
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives_paths(dl_manager, lang, format, split)
251 n_files_path = dl_manager.download(n_files_url)
252
--> 253 with open(n_files_path, "r", encoding="utf-8") as file:
254 n_files = int(file.read().strip()) # the file contains a number of archives
255
ValueError: I/O operation on closed file.
```
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
| 47 | fsspec 2022.8.2 breaks xopen in streaming mode
## Describe the bug
When fsspec 2022.8.2 is installed in your environment, xopen will prematurely close files, making streaming mode inoperable.
## Steps to reproduce the bug
```python
import datasets
data = datasets.load_dataset('MLCommons/ml_spoken_words', 'id_wav', split='train', streaming=True)
```
## Expected results
Dataset should load as iterator.
## Actual results
```
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) 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)
1737 # Return iterable dataset in case of streaming
1738 if streaming:
-> 1739 return builder_instance.as_streaming_dataset(split=split)
1740
1741 # Some datasets are already processed on the HF google storage
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1023 )
1024 self._check_manual_download(dl_manager)
-> 1025 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1026 # By default, return all splits
1027 if split is None:
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _split_generators(self, dl_manager)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in <listcomp>(.0)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives(dl_manager, lang, format, split)
267 # for streaming case
268 def _download_audio_archives(dl_manager, lang, format, split):
--> 269 archives_paths = _download_audio_archives_paths(dl_manager, lang, format, split)
270 return [dl_manager.iter_archive(archive_path) for archive_path in archives_paths]
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives_paths(dl_manager, lang, format, split)
251 n_files_path = dl_manager.download(n_files_url)
252
--> 253 with open(n_files_path, "r", encoding="utf-8") as file:
254 n_files = int(file.read().strip()) # the file contains a number of archives
255
ValueError: I/O operation on closed file.
```
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
Hi @DCNemesis, thanks for reporting.
That was a temporary issue in `fsspec` releases 2022.8.0 and 2022.8.1. But they fixed it in their patch release 2022.8.2 (and yanked both previous versions). See:
- https://github.com/huggingface/transformers/pull/18846
Are you sure you have version 2022.8.2 installed?
```shell
pip install -U fsspec
```
| [
-0.5926543474197388,
0.019043713808059692,
0.005749773234128952,
-0.031902894377708435,
0.0957615077495575,
-0.3419184982776642,
0.28033727407455444,
0.30580541491508484,
0.16552390158176422,
0.14295904338359833,
-0.2108203023672104,
0.14903897047042847,
0.052455540746450424,
0.540768563747406,
0.015612475574016571,
-0.08199179172515869,
0.19910813868045807,
0.21382606029510498,
-0.10920751094818115,
0.0169975683093071,
-0.32402533292770386,
0.29253602027893066,
-0.3137550950050354,
-0.20421455800533295,
-0.09267345815896988,
-0.01565566100180149,
0.26272040605545044,
0.22448256611824036,
-0.15283572673797607,
-0.474051833152771,
-0.15177367627620697,
0.14693094789981842,
0.024274230003356934,
0.2933063805103302,
-0.00010633678175508976,
-0.06530395895242691,
0.3072553277015686,
0.013651715591549873,
-0.1984100341796875,
0.05250433087348938,
-0.0736175999045372,
-0.0068557062186300755,
0.006546065676957369,
0.13065987825393677,
-0.046163588762283325,
-0.41656526923179626,
0.00017604045569896698,
-0.7772538065910339,
0.5465697646141052,
0.34679514169692993,
0.19420480728149414,
0.22660426795482635,
0.3668452799320221,
-0.048993345350027084,
0.38668012619018555,
-0.38845038414001465,
-0.025141507387161255,
-0.07176618278026581,
0.24535104632377625,
0.015529125928878784,
-0.2164827585220337,
0.382819265127182,
-0.181137815117836,
-0.17236924171447754,
-0.1695437729358673,
-0.11455052345991135,
0.2218412458896637,
-0.2818082571029663,
0.201494961977005,
0.14027756452560425,
0.1724141240119934,
-0.24276190996170044,
-0.2663467526435852,
-0.3283848166465759,
-0.26933300495147705,
-0.5548340082168579,
0.26611611247062683,
0.12463114410638809,
-0.015606850385665894,
0.0831550806760788,
0.21302713453769684,
-0.06793451309204102,
-0.06199220195412636,
0.07707341015338898,
0.0013019479811191559,
0.3506295382976532,
-0.14871753752231598,
-0.07210167497396469,
0.2149352878332138,
-0.16626529395580292,
0.21113979816436768,
0.03327818214893341,
-0.1586330384016037,
-0.07996100187301636,
-0.43766242265701294,
0.10188739001750946,
0.24732065200805664,
-0.06622029095888138,
0.13435903191566467,
0.2968323826789856,
-0.3027757406234741,
0.15143102407455444,
0.07427936792373657,
0.05075644329190254,
0.07193293422460556,
0.2220744788646698,
-0.0036176517605781555,
-0.14706392586231232,
0.09205478429794312,
0.09399762004613876,
-0.18025103211402893,
-0.1439242959022522,
0.17616836726665497,
-0.4227355420589447,
-0.13785414397716522,
-0.0030626393854618073,
0.3790627121925354,
-0.15773658454418182,
-0.3667213022708893,
0.05039634555578232,
-0.2222132682800293,
0.09306536614894867,
-0.08661168813705444,
0.37430137395858765,
0.07180308550596237,
0.48929548263549805,
0.1847163587808609,
0.2333335131406784,
-0.42288994789123535,
-0.23514842987060547,
-0.13106617331504822,
-0.018211498856544495,
-0.1250254213809967,
0.12980009615421295,
0.08255954086780548,
-0.35699111223220825,
0.22330354154109955,
0.07587626576423645,
0.05804337561130524,
-0.24745847284793854,
-0.1735212206840515,
-0.07800517976284027,
0.059974201023578644,
0.2486756592988968,
0.16598740220069885,
0.048644959926605225,
-0.059096384793519974,
-0.20282554626464844,
0.12945938110351562,
-0.00043061375617980957,
0.01950678601861,
-0.0975385382771492,
-0.25927963852882385,
0.29998978972435,
0.09469082951545715,
-0.10459469258785248,
-0.03362720459699631,
0.14639168977737427,
-0.14542824029922485,
-0.3235664665699005,
0.06499063223600388,
-0.07017213851213455,
-0.3229714035987854,
-0.06692056357860565,
0.21097244322299957,
0.4957362413406372,
-0.11241310834884644,
-0.0473456084728241,
-0.25537270307540894,
0.1435219645500183,
0.29288366436958313,
0.276577889919281,
0.033838167786598206,
-0.08581922203302383,
-0.1800919771194458,
0.42260628938674927,
0.13667669892311096,
-0.40199214220046997,
-0.36765551567077637,
0.435926228761673,
-0.1568375527858734,
0.039715878665447235,
0.4189263880252838,
-0.264610230922699,
0.4472126364707947,
-0.004752906039357185,
0.16819103062152863,
0.1439957618713379,
0.08642664551734924,
0.027535488829016685,
-0.37366533279418945,
-0.1623842567205429,
0.05177893862128258,
0.13498453795909882,
-0.005486961454153061,
-0.09152991324663162,
0.1472964584827423,
0.061019785702228546,
0.4188120365142822,
-0.027539778500795364,
0.03260880708694458,
-0.06755607575178146,
0.4958624243736267,
0.04737529903650284,
-0.10196258872747421,
-0.3490943908691406,
-0.10837701708078384,
0.006493654102087021,
-0.12493998557329178,
-0.22846347093582153,
0.22066354751586914,
-0.14334018528461456,
-0.2534293830394745,
0.04000121355056763,
-0.19998912513256073,
-0.4062645435333252,
0.23476478457450867,
0.1450541764497757,
-0.13744427263736725,
0.10350574553012848,
-0.16111014783382416,
0.098103828728199,
-0.14527764916419983,
0.08929028362035751,
-0.007837925106287003,
0.1557326316833496,
0.07667145133018494,
-0.35471436381340027,
0.06448101252317429,
0.13004323840141296,
0.3615472614765167,
0.06768202036619186,
-0.17112091183662415,
0.6955145597457886,
0.41011765599250793,
0.5680566430091858,
-0.41157254576683044,
0.19366435706615448,
0.2033444344997406,
-0.24713511765003204,
-0.10422063618898392,
0.511687159538269,
0.036115411669015884,
0.04749631881713867,
0.10946158319711685,
0.19063593447208405,
0.29193755984306335,
-0.07454805821180344,
0.2729586958885193,
0.030673297122120857,
0.08578597009181976,
-0.18309259414672852,
-0.08108671754598618,
0.10602086782455444,
0.2747623026371002,
-0.022220779210329056,
0.4111233651638031,
-0.029419323429465294,
-0.3270523250102997,
0.1541902869939804,
0.6422069072723389,
-0.041082464158535004,
0.1189475804567337,
0.09902001172304153,
-0.4068709909915924,
-0.12889599800109863,
0.2509569525718689,
0.15445344150066376,
0.3563428521156311,
0.26900380849838257,
0.07654419541358948,
0.3278385102748871,
0.12219729274511337,
-0.32018163800239563,
0.49193042516708374,
0.009035490453243256,
0.08828327059745789,
0.3379763066768646,
0.23522043228149414,
0.03162887319922447,
-0.5383797883987427,
-0.0673375278711319,
-0.1451306939125061,
-0.13524173200130463,
-0.3419952094554901,
-0.037657566368579865,
-0.269120454788208,
-0.2796405851840973,
-0.21014755964279175,
0.2723609507083893,
0.28938424587249756,
-0.15231533348560333,
-0.011662829667329788,
0.6310804486274719,
-0.1782691776752472,
0.27854326367378235,
-0.01858643814921379,
0.07788446545600891,
0.1755121946334839,
-0.004926703870296478,
-0.01960963010787964,
0.30197951197624207,
-0.31451523303985596,
0.08514831960201263,
0.2754119038581848,
-0.22263838350772858,
-0.06913642585277557,
0.2904497981071472,
-0.06964747607707977,
-0.3827069401741028,
-0.22663748264312744,
0.09962238371372223,
0.16501256823539734,
-0.015056824311614037,
-0.088618203997612,
0.0007366463541984558,
0.16978414356708527,
-0.32948440313339233,
-0.012092120945453644,
-0.3385324478149414,
0.05499338358640671,
-0.14055800437927246,
-0.08927746117115021,
-0.026760809123516083,
-0.37435051798820496,
-0.4944626986980438,
-0.06385840475559235,
-0.654755175113678,
0.4141033887863159,
-0.21348871290683746,
0.0619661770761013,
0.35911720991134644,
-0.10858064144849777,
-0.01686260476708412,
0.04226454347372055,
-0.06804706156253815,
-0.22750374674797058,
-0.36182108521461487,
0.1419750303030014,
-0.20790550112724304,
-0.28993287682533264,
0.08889436721801758,
0.020594023168087006,
0.05354560911655426,
0.034505538642406464,
-0.19548004865646362,
0.24745966494083405,
-0.17022550106048584,
-0.06860219687223434,
-0.07297137379646301,
-0.060807570815086365,
0.39030027389526367,
0.10238513350486755,
-0.17642207443714142,
-0.21136614680290222,
0.013005822896957397,
0.1592792421579361,
0.1349354386329651,
-0.03442566841840744,
-0.25612661242485046,
0.16615557670593262,
0.0310114286839962,
0.3542686700820923,
0.2577064037322998,
0.2703414559364319,
0.3331400156021118,
-0.12335082143545151,
0.16515350341796875,
-0.255369633436203,
0.011798204854130745,
0.2701667249202728,
-0.1433219015598297,
-0.3159756064414978,
0.3590611219406128,
-0.001888735219836235,
-0.16902479529380798,
-0.17114153504371643,
0.095155730843544,
-0.29011818766593933,
-0.3241516649723053,
-0.12283077836036682,
-0.026857860386371613,
0.3082495629787445,
-0.0793585330247879,
0.344910204410553,
0.2110121250152588,
0.07168097794055939,
0.18671539425849915,
0.019138343632221222,
0.24503090977668762,
-0.13974429666996002,
-0.15407609939575195,
0.05590158328413963,
-0.1722358763217926,
0.22638148069381714,
-0.029899107292294502,
0.48776617646217346,
-0.2301415354013443,
-0.1275854855775833,
0.020709209144115448,
0.05738946050405502,
0.3610811233520508,
0.04708430916070938,
0.0697818398475647,
0.30049943923950195,
0.13212808966636658,
-0.2644556164741516,
-0.15545058250427246,
-0.20507276058197021,
-0.2766053080558777,
-0.014271058142185211,
0.22516101598739624,
-0.33017849922180176,
-0.09190313518047333,
-0.021395627409219742,
-0.3022743761539459,
0.16099664568901062,
0.03622768446803093,
-0.08651672303676605,
-0.11915577948093414,
-0.12678010761737823,
-0.05539756268262863,
0.18451565504074097,
0.19158168137073517,
-0.3850838243961334,
-0.07321681082248688,
0.13847066462039948,
-0.26217785477638245,
0.12495899200439453,
-0.11502982676029205,
0.29257118701934814,
0.08239100873470306,
0.10853712260723114,
0.25537213683128357,
0.18516585230827332,
-0.06773971766233444,
0.1782202571630478,
0.2688826322555542,
-0.28835660219192505,
0.1703181266784668,
0.22472591698169708,
0.03522557020187378,
0.4577275514602661,
-0.31276029348373413,
0.36826109886169434,
0.2052004337310791,
0.2935326099395752,
-0.32009124755859375,
0.292958527803421,
0.4498271644115448,
0.09094558656215668,
0.036101099103689194,
-0.4724174737930298,
0.44336360692977905,
-0.11591410636901855,
-0.03590299189090729,
0.42359378933906555,
-0.057516008615493774,
-0.23408308625221252,
0.3007785677909851,
-0.3845699429512024,
0.726851224899292,
0.23502196371555328,
0.015785876661539078,
0.5337765216827393,
-0.13105922937393188,
0.0769721269607544,
-0.33343279361724854,
0.1649688333272934,
0.05697685852646828,
-0.19269271194934845,
-0.011761954054236412,
-0.003579195588827133,
0.2865953743457794,
-0.2687181830406189,
-0.20337234437465668,
0.1601852923631668,
0.07009744644165039,
-0.039529573172330856,
0.15955393016338348,
0.3090146780014038,
-0.40825292468070984,
-0.3281659781932831,
-0.5725817084312439,
0.17031072080135345,
0.10316552221775055,
0.1082543432712555,
0.02952168509364128,
-0.35886263847351074,
0.4132886826992035,
0.004945393651723862,
-0.2781308889389038,
0.40420299768447876,
-0.5247951745986938,
0.05067768692970276,
-0.1707291305065155,
-0.19594192504882812,
0.16323289275169373,
0.03309544548392296,
-0.09399871528148651,
0.04857513681054115,
-0.2505696415901184,
0.2856980860233307,
0.10229397565126419,
0.13163162767887115,
0.11683874577283859,
-0.023090548813343048,
0.19534705579280853,
-0.13276530802249908,
-0.16243433952331543,
0.2866065502166748,
-0.09594093263149261,
-0.14594608545303345,
-0.03619673103094101,
-0.23344822227954865,
0.38289785385131836,
-0.08863173425197601,
-0.020461594685912132,
-0.014639049768447876,
-0.21812981367111206,
-0.2815883159637451,
0.17151720821857452,
-0.12185616791248322,
-0.1779034584760666,
0.056645676493644714,
-0.11861090362071991,
-0.08866626769304276,
-0.20001515746116638,
0.4088115692138672,
-0.1566975712776184,
0.4308060109615326,
0.43466129899024963,
0.134299635887146,
-0.14897584915161133,
-0.1958533525466919,
-0.07649878412485123,
-0.1902666538953781,
0.07843583077192307,
0.06838146597146988,
0.014070737175643444,
-0.05914291739463806,
-0.03584037721157074,
0.3625463843345642,
0.03925975039601326,
0.008793972432613373,
0.044624682515859604,
-0.21005934476852417,
-0.13838839530944824,
0.08075007796287537,
-0.254331111907959,
0.003344345837831497,
0.08964934200048447,
0.7028698325157166,
-0.15923653542995453,
-0.3442899286746979,
-0.3706335425376892,
0.011295781470835209,
-0.010006356984376907,
-0.06172005832195282,
0.033159129321575165,
-0.05257745832204819,
0.31550273299217224,
-0.12097196280956268,
0.18583379685878754,
0.3441866636276245,
-0.16329745948314667,
-0.2134290337562561,
-0.21543900668621063,
0.10982527583837509,
0.17348408699035645,
-0.19634544849395752,
0.04165255278348923,
-0.09074769914150238,
-0.23254555463790894,
-0.015239991247653961,
0.2668788731098175,
0.08620395511388779,
-0.14158497750759125,
0.05790690705180168,
-0.20513398945331573,
-0.001469738781452179,
-0.06940023601055145,
0.022634895518422127,
-0.2117452621459961,
0.11080434918403625,
-0.04750380292534828,
0.12249007076025009,
-0.015428426675498486,
-0.11181161552667618,
-0.16493813693523407,
-0.11874424666166306,
0.3248061239719391,
0.12316494435071945,
0.35543549060821533,
-0.2754896879196167,
-0.36187371611595154,
-0.06584399938583374,
0.49471041560173035,
0.28320831060409546,
-0.12936654686927795,
-0.0483737513422966,
0.1985304355621338,
0.29811805486679077,
-0.20539548993110657,
0.14656995236873627,
-0.07139572501182556,
-0.05398676544427872,
0.3264869749546051,
-0.08252619951963425,
0.23476508259773254,
-0.1293463110923767,
-0.007291808724403381,
0.29869377613067627,
-0.09722137451171875,
0.09910532087087631,
0.36715516448020935,
0.17334185540676117,
0.07494419813156128,
0.16289733350276947,
0.02543685771524906,
0.11762115359306335,
0.0827760174870491,
0.4386851191520691,
0.027978453785181046,
0.5101338624954224,
0.1413254737854004,
0.16531716287136078,
-0.03491632640361786,
-0.4484764635562897,
-0.20453448593616486,
0.09619517624378204,
-0.3571690618991852,
0.22576233744621277,
-0.1134631484746933,
0.2857740521430969,
-0.2703045606613159,
-0.1613147109746933,
-0.02306639403104782,
0.21503430604934692,
-0.12285659462213516,
-0.25644174218177795,
0.2559720575809479,
-0.030499625951051712,
-0.004664339125156403,
0.0922439694404602,
0.21610216796398163,
0.11342653632164001,
0.16413921117782593,
0.061900701373815536,
-0.04404301941394806,
0.0031427862122654915,
-0.4957311153411865,
0.15720543265342712,
0.3475567698478699,
-0.3112608790397644,
0.30359625816345215,
0.027416430413722992,
-0.10503876209259033,
0.041278060525655746,
0.39794614911079407,
0.37466371059417725,
0.12822702527046204,
-0.2912987768650055,
-0.03111080452799797,
0.21670274436473846,
-0.021397067233920097,
0.05066825449466705,
-0.06545593589544296,
0.2206517904996872,
0.263007253408432,
0.2910534739494324,
0.22866559028625488,
-0.2743123471736908,
0.015873555094003677,
0.03781659156084061,
0.025931788608431816,
-0.4801686108112335,
-0.12009752541780472,
-0.16129516065120697,
0.06200817972421646,
-0.27986013889312744,
-0.200851172208786,
-0.40335792303085327,
-0.08308017998933792,
0.4086359739303589,
0.04015439376235008,
0.2707984745502472,
-0.1103491559624672,
0.11000604927539825,
0.18233278393745422,
0.22946900129318237,
-0.046930987387895584,
0.2234123945236206,
-0.14189845323562622,
-0.5028219819068909,
-0.3702118992805481,
0.16482879221439362,
0.08264582604169846,
-0.014522723853588104,
-0.11279702931642532,
0.11381314694881439,
0.029995765537023544,
0.00495135597884655,
-0.11360608041286469,
-0.13775990903377533,
-0.08974511921405792,
0.12100417912006378,
-0.22621555626392365,
0.12726108729839325,
0.03442137688398361,
-0.022855961695313454,
-0.10400629788637161,
-0.33422237634658813,
0.34141218662261963,
-0.17912745475769043,
0.18667751550674438,
0.1356804519891739,
0.10986477136611938,
-0.1593131124973297,
-0.249172180891037,
0.2734248638153076,
0.12872980535030365,
0.21579551696777344,
-0.39439868927001953,
-0.06363104283809662,
-0.19761019945144653,
-0.2352842539548874,
-0.16302640736103058,
-0.3682595491409302,
-0.14322717487812042,
0.540499210357666,
0.10249336063861847,
0.01182403601706028,
-0.31287357211112976,
0.4667679965496063,
0.11185593903064728,
-0.25138911604881287,
-0.5198057889938354,
0.28993502259254456,
-0.20169034600257874,
0.1633775681257248,
-0.01695331744849682,
0.2634963095188141,
-0.20820236206054688,
-0.039967745542526245,
-0.3209547996520996,
-0.5708547234535217,
0.4837009012699127,
-0.6862039566040039,
-0.19860561192035675,
-0.07681310176849365,
0.4825993478298187,
0.19336754083633423,
0.0708252340555191,
-0.20785659551620483,
0.06729870289564133,
0.07989861071109772,
-0.03201151266694069,
-0.1610855758190155,
0.1481366604566574,
-0.24355626106262207,
-0.1257975846529007,
0.034853894263505936,
0.1687701791524887,
0.3276449739933014,
-0.18606944382190704,
0.20187914371490479,
-0.326840877532959
] |
https://github.com/huggingface/datasets/issues/4961 | fsspec 2022.8.2 breaks xopen in streaming mode | @albertvillanova I was using a temporary Google Colab instance, but checking it again today it seems it was loading 2022.8.1 rather than 2022.8.2. It's surprising that colab is using the version that was replaced the same day it was released. Testing with 2022.8.2 did work. It appears Colab [will be fixing it](https://github.com/googlecolab/colabtools/issues/3055) on their end too. | ## Describe the bug
When fsspec 2022.8.2 is installed in your environment, xopen will prematurely close files, making streaming mode inoperable.
## Steps to reproduce the bug
```python
import datasets
data = datasets.load_dataset('MLCommons/ml_spoken_words', 'id_wav', split='train', streaming=True)
```
## Expected results
Dataset should load as iterator.
## Actual results
```
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) 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)
1737 # Return iterable dataset in case of streaming
1738 if streaming:
-> 1739 return builder_instance.as_streaming_dataset(split=split)
1740
1741 # Some datasets are already processed on the HF google storage
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1023 )
1024 self._check_manual_download(dl_manager)
-> 1025 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1026 # By default, return all splits
1027 if split is None:
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _split_generators(self, dl_manager)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in <listcomp>(.0)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives(dl_manager, lang, format, split)
267 # for streaming case
268 def _download_audio_archives(dl_manager, lang, format, split):
--> 269 archives_paths = _download_audio_archives_paths(dl_manager, lang, format, split)
270 return [dl_manager.iter_archive(archive_path) for archive_path in archives_paths]
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives_paths(dl_manager, lang, format, split)
251 n_files_path = dl_manager.download(n_files_url)
252
--> 253 with open(n_files_path, "r", encoding="utf-8") as file:
254 n_files = int(file.read().strip()) # the file contains a number of archives
255
ValueError: I/O operation on closed file.
```
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
| 56 | fsspec 2022.8.2 breaks xopen in streaming mode
## Describe the bug
When fsspec 2022.8.2 is installed in your environment, xopen will prematurely close files, making streaming mode inoperable.
## Steps to reproduce the bug
```python
import datasets
data = datasets.load_dataset('MLCommons/ml_spoken_words', 'id_wav', split='train', streaming=True)
```
## Expected results
Dataset should load as iterator.
## Actual results
```
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) 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)
1737 # Return iterable dataset in case of streaming
1738 if streaming:
-> 1739 return builder_instance.as_streaming_dataset(split=split)
1740
1741 # Some datasets are already processed on the HF google storage
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1023 )
1024 self._check_manual_download(dl_manager)
-> 1025 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1026 # By default, return all splits
1027 if split is None:
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _split_generators(self, dl_manager)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in <listcomp>(.0)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives(dl_manager, lang, format, split)
267 # for streaming case
268 def _download_audio_archives(dl_manager, lang, format, split):
--> 269 archives_paths = _download_audio_archives_paths(dl_manager, lang, format, split)
270 return [dl_manager.iter_archive(archive_path) for archive_path in archives_paths]
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives_paths(dl_manager, lang, format, split)
251 n_files_path = dl_manager.download(n_files_url)
252
--> 253 with open(n_files_path, "r", encoding="utf-8") as file:
254 n_files = int(file.read().strip()) # the file contains a number of archives
255
ValueError: I/O operation on closed file.
```
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
@albertvillanova I was using a temporary Google Colab instance, but checking it again today it seems it was loading 2022.8.1 rather than 2022.8.2. It's surprising that colab is using the version that was replaced the same day it was released. Testing with 2022.8.2 did work. It appears Colab [will be fixing it](https://github.com/googlecolab/colabtools/issues/3055) on their end too. | [
-0.5926543474197388,
0.019043713808059692,
0.005749773234128952,
-0.031902894377708435,
0.0957615077495575,
-0.3419184982776642,
0.28033727407455444,
0.30580541491508484,
0.16552390158176422,
0.14295904338359833,
-0.2108203023672104,
0.14903897047042847,
0.052455540746450424,
0.540768563747406,
0.015612475574016571,
-0.08199179172515869,
0.19910813868045807,
0.21382606029510498,
-0.10920751094818115,
0.0169975683093071,
-0.32402533292770386,
0.29253602027893066,
-0.3137550950050354,
-0.20421455800533295,
-0.09267345815896988,
-0.01565566100180149,
0.26272040605545044,
0.22448256611824036,
-0.15283572673797607,
-0.474051833152771,
-0.15177367627620697,
0.14693094789981842,
0.024274230003356934,
0.2933063805103302,
-0.00010633678175508976,
-0.06530395895242691,
0.3072553277015686,
0.013651715591549873,
-0.1984100341796875,
0.05250433087348938,
-0.0736175999045372,
-0.0068557062186300755,
0.006546065676957369,
0.13065987825393677,
-0.046163588762283325,
-0.41656526923179626,
0.00017604045569896698,
-0.7772538065910339,
0.5465697646141052,
0.34679514169692993,
0.19420480728149414,
0.22660426795482635,
0.3668452799320221,
-0.048993345350027084,
0.38668012619018555,
-0.38845038414001465,
-0.025141507387161255,
-0.07176618278026581,
0.24535104632377625,
0.015529125928878784,
-0.2164827585220337,
0.382819265127182,
-0.181137815117836,
-0.17236924171447754,
-0.1695437729358673,
-0.11455052345991135,
0.2218412458896637,
-0.2818082571029663,
0.201494961977005,
0.14027756452560425,
0.1724141240119934,
-0.24276190996170044,
-0.2663467526435852,
-0.3283848166465759,
-0.26933300495147705,
-0.5548340082168579,
0.26611611247062683,
0.12463114410638809,
-0.015606850385665894,
0.0831550806760788,
0.21302713453769684,
-0.06793451309204102,
-0.06199220195412636,
0.07707341015338898,
0.0013019479811191559,
0.3506295382976532,
-0.14871753752231598,
-0.07210167497396469,
0.2149352878332138,
-0.16626529395580292,
0.21113979816436768,
0.03327818214893341,
-0.1586330384016037,
-0.07996100187301636,
-0.43766242265701294,
0.10188739001750946,
0.24732065200805664,
-0.06622029095888138,
0.13435903191566467,
0.2968323826789856,
-0.3027757406234741,
0.15143102407455444,
0.07427936792373657,
0.05075644329190254,
0.07193293422460556,
0.2220744788646698,
-0.0036176517605781555,
-0.14706392586231232,
0.09205478429794312,
0.09399762004613876,
-0.18025103211402893,
-0.1439242959022522,
0.17616836726665497,
-0.4227355420589447,
-0.13785414397716522,
-0.0030626393854618073,
0.3790627121925354,
-0.15773658454418182,
-0.3667213022708893,
0.05039634555578232,
-0.2222132682800293,
0.09306536614894867,
-0.08661168813705444,
0.37430137395858765,
0.07180308550596237,
0.48929548263549805,
0.1847163587808609,
0.2333335131406784,
-0.42288994789123535,
-0.23514842987060547,
-0.13106617331504822,
-0.018211498856544495,
-0.1250254213809967,
0.12980009615421295,
0.08255954086780548,
-0.35699111223220825,
0.22330354154109955,
0.07587626576423645,
0.05804337561130524,
-0.24745847284793854,
-0.1735212206840515,
-0.07800517976284027,
0.059974201023578644,
0.2486756592988968,
0.16598740220069885,
0.048644959926605225,
-0.059096384793519974,
-0.20282554626464844,
0.12945938110351562,
-0.00043061375617980957,
0.01950678601861,
-0.0975385382771492,
-0.25927963852882385,
0.29998978972435,
0.09469082951545715,
-0.10459469258785248,
-0.03362720459699631,
0.14639168977737427,
-0.14542824029922485,
-0.3235664665699005,
0.06499063223600388,
-0.07017213851213455,
-0.3229714035987854,
-0.06692056357860565,
0.21097244322299957,
0.4957362413406372,
-0.11241310834884644,
-0.0473456084728241,
-0.25537270307540894,
0.1435219645500183,
0.29288366436958313,
0.276577889919281,
0.033838167786598206,
-0.08581922203302383,
-0.1800919771194458,
0.42260628938674927,
0.13667669892311096,
-0.40199214220046997,
-0.36765551567077637,
0.435926228761673,
-0.1568375527858734,
0.039715878665447235,
0.4189263880252838,
-0.264610230922699,
0.4472126364707947,
-0.004752906039357185,
0.16819103062152863,
0.1439957618713379,
0.08642664551734924,
0.027535488829016685,
-0.37366533279418945,
-0.1623842567205429,
0.05177893862128258,
0.13498453795909882,
-0.005486961454153061,
-0.09152991324663162,
0.1472964584827423,
0.061019785702228546,
0.4188120365142822,
-0.027539778500795364,
0.03260880708694458,
-0.06755607575178146,
0.4958624243736267,
0.04737529903650284,
-0.10196258872747421,
-0.3490943908691406,
-0.10837701708078384,
0.006493654102087021,
-0.12493998557329178,
-0.22846347093582153,
0.22066354751586914,
-0.14334018528461456,
-0.2534293830394745,
0.04000121355056763,
-0.19998912513256073,
-0.4062645435333252,
0.23476478457450867,
0.1450541764497757,
-0.13744427263736725,
0.10350574553012848,
-0.16111014783382416,
0.098103828728199,
-0.14527764916419983,
0.08929028362035751,
-0.007837925106287003,
0.1557326316833496,
0.07667145133018494,
-0.35471436381340027,
0.06448101252317429,
0.13004323840141296,
0.3615472614765167,
0.06768202036619186,
-0.17112091183662415,
0.6955145597457886,
0.41011765599250793,
0.5680566430091858,
-0.41157254576683044,
0.19366435706615448,
0.2033444344997406,
-0.24713511765003204,
-0.10422063618898392,
0.511687159538269,
0.036115411669015884,
0.04749631881713867,
0.10946158319711685,
0.19063593447208405,
0.29193755984306335,
-0.07454805821180344,
0.2729586958885193,
0.030673297122120857,
0.08578597009181976,
-0.18309259414672852,
-0.08108671754598618,
0.10602086782455444,
0.2747623026371002,
-0.022220779210329056,
0.4111233651638031,
-0.029419323429465294,
-0.3270523250102997,
0.1541902869939804,
0.6422069072723389,
-0.041082464158535004,
0.1189475804567337,
0.09902001172304153,
-0.4068709909915924,
-0.12889599800109863,
0.2509569525718689,
0.15445344150066376,
0.3563428521156311,
0.26900380849838257,
0.07654419541358948,
0.3278385102748871,
0.12219729274511337,
-0.32018163800239563,
0.49193042516708374,
0.009035490453243256,
0.08828327059745789,
0.3379763066768646,
0.23522043228149414,
0.03162887319922447,
-0.5383797883987427,
-0.0673375278711319,
-0.1451306939125061,
-0.13524173200130463,
-0.3419952094554901,
-0.037657566368579865,
-0.269120454788208,
-0.2796405851840973,
-0.21014755964279175,
0.2723609507083893,
0.28938424587249756,
-0.15231533348560333,
-0.011662829667329788,
0.6310804486274719,
-0.1782691776752472,
0.27854326367378235,
-0.01858643814921379,
0.07788446545600891,
0.1755121946334839,
-0.004926703870296478,
-0.01960963010787964,
0.30197951197624207,
-0.31451523303985596,
0.08514831960201263,
0.2754119038581848,
-0.22263838350772858,
-0.06913642585277557,
0.2904497981071472,
-0.06964747607707977,
-0.3827069401741028,
-0.22663748264312744,
0.09962238371372223,
0.16501256823539734,
-0.015056824311614037,
-0.088618203997612,
0.0007366463541984558,
0.16978414356708527,
-0.32948440313339233,
-0.012092120945453644,
-0.3385324478149414,
0.05499338358640671,
-0.14055800437927246,
-0.08927746117115021,
-0.026760809123516083,
-0.37435051798820496,
-0.4944626986980438,
-0.06385840475559235,
-0.654755175113678,
0.4141033887863159,
-0.21348871290683746,
0.0619661770761013,
0.35911720991134644,
-0.10858064144849777,
-0.01686260476708412,
0.04226454347372055,
-0.06804706156253815,
-0.22750374674797058,
-0.36182108521461487,
0.1419750303030014,
-0.20790550112724304,
-0.28993287682533264,
0.08889436721801758,
0.020594023168087006,
0.05354560911655426,
0.034505538642406464,
-0.19548004865646362,
0.24745966494083405,
-0.17022550106048584,
-0.06860219687223434,
-0.07297137379646301,
-0.060807570815086365,
0.39030027389526367,
0.10238513350486755,
-0.17642207443714142,
-0.21136614680290222,
0.013005822896957397,
0.1592792421579361,
0.1349354386329651,
-0.03442566841840744,
-0.25612661242485046,
0.16615557670593262,
0.0310114286839962,
0.3542686700820923,
0.2577064037322998,
0.2703414559364319,
0.3331400156021118,
-0.12335082143545151,
0.16515350341796875,
-0.255369633436203,
0.011798204854130745,
0.2701667249202728,
-0.1433219015598297,
-0.3159756064414978,
0.3590611219406128,
-0.001888735219836235,
-0.16902479529380798,
-0.17114153504371643,
0.095155730843544,
-0.29011818766593933,
-0.3241516649723053,
-0.12283077836036682,
-0.026857860386371613,
0.3082495629787445,
-0.0793585330247879,
0.344910204410553,
0.2110121250152588,
0.07168097794055939,
0.18671539425849915,
0.019138343632221222,
0.24503090977668762,
-0.13974429666996002,
-0.15407609939575195,
0.05590158328413963,
-0.1722358763217926,
0.22638148069381714,
-0.029899107292294502,
0.48776617646217346,
-0.2301415354013443,
-0.1275854855775833,
0.020709209144115448,
0.05738946050405502,
0.3610811233520508,
0.04708430916070938,
0.0697818398475647,
0.30049943923950195,
0.13212808966636658,
-0.2644556164741516,
-0.15545058250427246,
-0.20507276058197021,
-0.2766053080558777,
-0.014271058142185211,
0.22516101598739624,
-0.33017849922180176,
-0.09190313518047333,
-0.021395627409219742,
-0.3022743761539459,
0.16099664568901062,
0.03622768446803093,
-0.08651672303676605,
-0.11915577948093414,
-0.12678010761737823,
-0.05539756268262863,
0.18451565504074097,
0.19158168137073517,
-0.3850838243961334,
-0.07321681082248688,
0.13847066462039948,
-0.26217785477638245,
0.12495899200439453,
-0.11502982676029205,
0.29257118701934814,
0.08239100873470306,
0.10853712260723114,
0.25537213683128357,
0.18516585230827332,
-0.06773971766233444,
0.1782202571630478,
0.2688826322555542,
-0.28835660219192505,
0.1703181266784668,
0.22472591698169708,
0.03522557020187378,
0.4577275514602661,
-0.31276029348373413,
0.36826109886169434,
0.2052004337310791,
0.2935326099395752,
-0.32009124755859375,
0.292958527803421,
0.4498271644115448,
0.09094558656215668,
0.036101099103689194,
-0.4724174737930298,
0.44336360692977905,
-0.11591410636901855,
-0.03590299189090729,
0.42359378933906555,
-0.057516008615493774,
-0.23408308625221252,
0.3007785677909851,
-0.3845699429512024,
0.726851224899292,
0.23502196371555328,
0.015785876661539078,
0.5337765216827393,
-0.13105922937393188,
0.0769721269607544,
-0.33343279361724854,
0.1649688333272934,
0.05697685852646828,
-0.19269271194934845,
-0.011761954054236412,
-0.003579195588827133,
0.2865953743457794,
-0.2687181830406189,
-0.20337234437465668,
0.1601852923631668,
0.07009744644165039,
-0.039529573172330856,
0.15955393016338348,
0.3090146780014038,
-0.40825292468070984,
-0.3281659781932831,
-0.5725817084312439,
0.17031072080135345,
0.10316552221775055,
0.1082543432712555,
0.02952168509364128,
-0.35886263847351074,
0.4132886826992035,
0.004945393651723862,
-0.2781308889389038,
0.40420299768447876,
-0.5247951745986938,
0.05067768692970276,
-0.1707291305065155,
-0.19594192504882812,
0.16323289275169373,
0.03309544548392296,
-0.09399871528148651,
0.04857513681054115,
-0.2505696415901184,
0.2856980860233307,
0.10229397565126419,
0.13163162767887115,
0.11683874577283859,
-0.023090548813343048,
0.19534705579280853,
-0.13276530802249908,
-0.16243433952331543,
0.2866065502166748,
-0.09594093263149261,
-0.14594608545303345,
-0.03619673103094101,
-0.23344822227954865,
0.38289785385131836,
-0.08863173425197601,
-0.020461594685912132,
-0.014639049768447876,
-0.21812981367111206,
-0.2815883159637451,
0.17151720821857452,
-0.12185616791248322,
-0.1779034584760666,
0.056645676493644714,
-0.11861090362071991,
-0.08866626769304276,
-0.20001515746116638,
0.4088115692138672,
-0.1566975712776184,
0.4308060109615326,
0.43466129899024963,
0.134299635887146,
-0.14897584915161133,
-0.1958533525466919,
-0.07649878412485123,
-0.1902666538953781,
0.07843583077192307,
0.06838146597146988,
0.014070737175643444,
-0.05914291739463806,
-0.03584037721157074,
0.3625463843345642,
0.03925975039601326,
0.008793972432613373,
0.044624682515859604,
-0.21005934476852417,
-0.13838839530944824,
0.08075007796287537,
-0.254331111907959,
0.003344345837831497,
0.08964934200048447,
0.7028698325157166,
-0.15923653542995453,
-0.3442899286746979,
-0.3706335425376892,
0.011295781470835209,
-0.010006356984376907,
-0.06172005832195282,
0.033159129321575165,
-0.05257745832204819,
0.31550273299217224,
-0.12097196280956268,
0.18583379685878754,
0.3441866636276245,
-0.16329745948314667,
-0.2134290337562561,
-0.21543900668621063,
0.10982527583837509,
0.17348408699035645,
-0.19634544849395752,
0.04165255278348923,
-0.09074769914150238,
-0.23254555463790894,
-0.015239991247653961,
0.2668788731098175,
0.08620395511388779,
-0.14158497750759125,
0.05790690705180168,
-0.20513398945331573,
-0.001469738781452179,
-0.06940023601055145,
0.022634895518422127,
-0.2117452621459961,
0.11080434918403625,
-0.04750380292534828,
0.12249007076025009,
-0.015428426675498486,
-0.11181161552667618,
-0.16493813693523407,
-0.11874424666166306,
0.3248061239719391,
0.12316494435071945,
0.35543549060821533,
-0.2754896879196167,
-0.36187371611595154,
-0.06584399938583374,
0.49471041560173035,
0.28320831060409546,
-0.12936654686927795,
-0.0483737513422966,
0.1985304355621338,
0.29811805486679077,
-0.20539548993110657,
0.14656995236873627,
-0.07139572501182556,
-0.05398676544427872,
0.3264869749546051,
-0.08252619951963425,
0.23476508259773254,
-0.1293463110923767,
-0.007291808724403381,
0.29869377613067627,
-0.09722137451171875,
0.09910532087087631,
0.36715516448020935,
0.17334185540676117,
0.07494419813156128,
0.16289733350276947,
0.02543685771524906,
0.11762115359306335,
0.0827760174870491,
0.4386851191520691,
0.027978453785181046,
0.5101338624954224,
0.1413254737854004,
0.16531716287136078,
-0.03491632640361786,
-0.4484764635562897,
-0.20453448593616486,
0.09619517624378204,
-0.3571690618991852,
0.22576233744621277,
-0.1134631484746933,
0.2857740521430969,
-0.2703045606613159,
-0.1613147109746933,
-0.02306639403104782,
0.21503430604934692,
-0.12285659462213516,
-0.25644174218177795,
0.2559720575809479,
-0.030499625951051712,
-0.004664339125156403,
0.0922439694404602,
0.21610216796398163,
0.11342653632164001,
0.16413921117782593,
0.061900701373815536,
-0.04404301941394806,
0.0031427862122654915,
-0.4957311153411865,
0.15720543265342712,
0.3475567698478699,
-0.3112608790397644,
0.30359625816345215,
0.027416430413722992,
-0.10503876209259033,
0.041278060525655746,
0.39794614911079407,
0.37466371059417725,
0.12822702527046204,
-0.2912987768650055,
-0.03111080452799797,
0.21670274436473846,
-0.021397067233920097,
0.05066825449466705,
-0.06545593589544296,
0.2206517904996872,
0.263007253408432,
0.2910534739494324,
0.22866559028625488,
-0.2743123471736908,
0.015873555094003677,
0.03781659156084061,
0.025931788608431816,
-0.4801686108112335,
-0.12009752541780472,
-0.16129516065120697,
0.06200817972421646,
-0.27986013889312744,
-0.200851172208786,
-0.40335792303085327,
-0.08308017998933792,
0.4086359739303589,
0.04015439376235008,
0.2707984745502472,
-0.1103491559624672,
0.11000604927539825,
0.18233278393745422,
0.22946900129318237,
-0.046930987387895584,
0.2234123945236206,
-0.14189845323562622,
-0.5028219819068909,
-0.3702118992805481,
0.16482879221439362,
0.08264582604169846,
-0.014522723853588104,
-0.11279702931642532,
0.11381314694881439,
0.029995765537023544,
0.00495135597884655,
-0.11360608041286469,
-0.13775990903377533,
-0.08974511921405792,
0.12100417912006378,
-0.22621555626392365,
0.12726108729839325,
0.03442137688398361,
-0.022855961695313454,
-0.10400629788637161,
-0.33422237634658813,
0.34141218662261963,
-0.17912745475769043,
0.18667751550674438,
0.1356804519891739,
0.10986477136611938,
-0.1593131124973297,
-0.249172180891037,
0.2734248638153076,
0.12872980535030365,
0.21579551696777344,
-0.39439868927001953,
-0.06363104283809662,
-0.19761019945144653,
-0.2352842539548874,
-0.16302640736103058,
-0.3682595491409302,
-0.14322717487812042,
0.540499210357666,
0.10249336063861847,
0.01182403601706028,
-0.31287357211112976,
0.4667679965496063,
0.11185593903064728,
-0.25138911604881287,
-0.5198057889938354,
0.28993502259254456,
-0.20169034600257874,
0.1633775681257248,
-0.01695331744849682,
0.2634963095188141,
-0.20820236206054688,
-0.039967745542526245,
-0.3209547996520996,
-0.5708547234535217,
0.4837009012699127,
-0.6862039566040039,
-0.19860561192035675,
-0.07681310176849365,
0.4825993478298187,
0.19336754083633423,
0.0708252340555191,
-0.20785659551620483,
0.06729870289564133,
0.07989861071109772,
-0.03201151266694069,
-0.1610855758190155,
0.1481366604566574,
-0.24355626106262207,
-0.1257975846529007,
0.034853894263505936,
0.1687701791524887,
0.3276449739933014,
-0.18606944382190704,
0.20187914371490479,
-0.326840877532959
] |
https://github.com/huggingface/datasets/issues/4961 | fsspec 2022.8.2 breaks xopen in streaming mode | Thanks for the additional information.
Once we know 2022.8.2 works, I'm closing this issue. Feel free to reopen it if necessary. | ## Describe the bug
When fsspec 2022.8.2 is installed in your environment, xopen will prematurely close files, making streaming mode inoperable.
## Steps to reproduce the bug
```python
import datasets
data = datasets.load_dataset('MLCommons/ml_spoken_words', 'id_wav', split='train', streaming=True)
```
## Expected results
Dataset should load as iterator.
## Actual results
```
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) 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)
1737 # Return iterable dataset in case of streaming
1738 if streaming:
-> 1739 return builder_instance.as_streaming_dataset(split=split)
1740
1741 # Some datasets are already processed on the HF google storage
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1023 )
1024 self._check_manual_download(dl_manager)
-> 1025 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1026 # By default, return all splits
1027 if split is None:
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _split_generators(self, dl_manager)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in <listcomp>(.0)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives(dl_manager, lang, format, split)
267 # for streaming case
268 def _download_audio_archives(dl_manager, lang, format, split):
--> 269 archives_paths = _download_audio_archives_paths(dl_manager, lang, format, split)
270 return [dl_manager.iter_archive(archive_path) for archive_path in archives_paths]
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives_paths(dl_manager, lang, format, split)
251 n_files_path = dl_manager.download(n_files_url)
252
--> 253 with open(n_files_path, "r", encoding="utf-8") as file:
254 n_files = int(file.read().strip()) # the file contains a number of archives
255
ValueError: I/O operation on closed file.
```
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
| 21 | fsspec 2022.8.2 breaks xopen in streaming mode
## Describe the bug
When fsspec 2022.8.2 is installed in your environment, xopen will prematurely close files, making streaming mode inoperable.
## Steps to reproduce the bug
```python
import datasets
data = datasets.load_dataset('MLCommons/ml_spoken_words', 'id_wav', split='train', streaming=True)
```
## Expected results
Dataset should load as iterator.
## Actual results
```
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) 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)
1737 # Return iterable dataset in case of streaming
1738 if streaming:
-> 1739 return builder_instance.as_streaming_dataset(split=split)
1740
1741 # Some datasets are already processed on the HF google storage
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1023 )
1024 self._check_manual_download(dl_manager)
-> 1025 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1026 # By default, return all splits
1027 if split is None:
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _split_generators(self, dl_manager)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in <listcomp>(.0)
182 name=datasets.Split.TRAIN,
183 gen_kwargs={
--> 184 "audio_archives": [download_audio(split="train", lang=lang) for lang in self.config.languages],
185 "local_audio_archives_paths": [download_extract_audio(split="train", lang=lang) for lang in
186 self.config.languages] if not dl_manager.is_streaming else None,
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives(dl_manager, lang, format, split)
267 # for streaming case
268 def _download_audio_archives(dl_manager, lang, format, split):
--> 269 archives_paths = _download_audio_archives_paths(dl_manager, lang, format, split)
270 return [dl_manager.iter_archive(archive_path) for archive_path in archives_paths]
[~/.cache/huggingface/modules/datasets_modules/datasets/MLCommons--ml_spoken_words/321ea853cf0a05abb7a2d7efea900692a3d8622af65a2f3ce98adb7800a5d57b/ml_spoken_words.py](https://localhost:8080/#) in _download_audio_archives_paths(dl_manager, lang, format, split)
251 n_files_path = dl_manager.download(n_files_url)
252
--> 253 with open(n_files_path, "r", encoding="utf-8") as file:
254 n_files = int(file.read().strip()) # the file contains a number of archives
255
ValueError: I/O operation on closed file.
```
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
Thanks for the additional information.
Once we know 2022.8.2 works, I'm closing this issue. Feel free to reopen it if necessary. | [
-0.5926543474197388,
0.019043713808059692,
0.005749773234128952,
-0.031902894377708435,
0.0957615077495575,
-0.3419184982776642,
0.28033727407455444,
0.30580541491508484,
0.16552390158176422,
0.14295904338359833,
-0.2108203023672104,
0.14903897047042847,
0.052455540746450424,
0.540768563747406,
0.015612475574016571,
-0.08199179172515869,
0.19910813868045807,
0.21382606029510498,
-0.10920751094818115,
0.0169975683093071,
-0.32402533292770386,
0.29253602027893066,
-0.3137550950050354,
-0.20421455800533295,
-0.09267345815896988,
-0.01565566100180149,
0.26272040605545044,
0.22448256611824036,
-0.15283572673797607,
-0.474051833152771,
-0.15177367627620697,
0.14693094789981842,
0.024274230003356934,
0.2933063805103302,
-0.00010633678175508976,
-0.06530395895242691,
0.3072553277015686,
0.013651715591549873,
-0.1984100341796875,
0.05250433087348938,
-0.0736175999045372,
-0.0068557062186300755,
0.006546065676957369,
0.13065987825393677,
-0.046163588762283325,
-0.41656526923179626,
0.00017604045569896698,
-0.7772538065910339,
0.5465697646141052,
0.34679514169692993,
0.19420480728149414,
0.22660426795482635,
0.3668452799320221,
-0.048993345350027084,
0.38668012619018555,
-0.38845038414001465,
-0.025141507387161255,
-0.07176618278026581,
0.24535104632377625,
0.015529125928878784,
-0.2164827585220337,
0.382819265127182,
-0.181137815117836,
-0.17236924171447754,
-0.1695437729358673,
-0.11455052345991135,
0.2218412458896637,
-0.2818082571029663,
0.201494961977005,
0.14027756452560425,
0.1724141240119934,
-0.24276190996170044,
-0.2663467526435852,
-0.3283848166465759,
-0.26933300495147705,
-0.5548340082168579,
0.26611611247062683,
0.12463114410638809,
-0.015606850385665894,
0.0831550806760788,
0.21302713453769684,
-0.06793451309204102,
-0.06199220195412636,
0.07707341015338898,
0.0013019479811191559,
0.3506295382976532,
-0.14871753752231598,
-0.07210167497396469,
0.2149352878332138,
-0.16626529395580292,
0.21113979816436768,
0.03327818214893341,
-0.1586330384016037,
-0.07996100187301636,
-0.43766242265701294,
0.10188739001750946,
0.24732065200805664,
-0.06622029095888138,
0.13435903191566467,
0.2968323826789856,
-0.3027757406234741,
0.15143102407455444,
0.07427936792373657,
0.05075644329190254,
0.07193293422460556,
0.2220744788646698,
-0.0036176517605781555,
-0.14706392586231232,
0.09205478429794312,
0.09399762004613876,
-0.18025103211402893,
-0.1439242959022522,
0.17616836726665497,
-0.4227355420589447,
-0.13785414397716522,
-0.0030626393854618073,
0.3790627121925354,
-0.15773658454418182,
-0.3667213022708893,
0.05039634555578232,
-0.2222132682800293,
0.09306536614894867,
-0.08661168813705444,
0.37430137395858765,
0.07180308550596237,
0.48929548263549805,
0.1847163587808609,
0.2333335131406784,
-0.42288994789123535,
-0.23514842987060547,
-0.13106617331504822,
-0.018211498856544495,
-0.1250254213809967,
0.12980009615421295,
0.08255954086780548,
-0.35699111223220825,
0.22330354154109955,
0.07587626576423645,
0.05804337561130524,
-0.24745847284793854,
-0.1735212206840515,
-0.07800517976284027,
0.059974201023578644,
0.2486756592988968,
0.16598740220069885,
0.048644959926605225,
-0.059096384793519974,
-0.20282554626464844,
0.12945938110351562,
-0.00043061375617980957,
0.01950678601861,
-0.0975385382771492,
-0.25927963852882385,
0.29998978972435,
0.09469082951545715,
-0.10459469258785248,
-0.03362720459699631,
0.14639168977737427,
-0.14542824029922485,
-0.3235664665699005,
0.06499063223600388,
-0.07017213851213455,
-0.3229714035987854,
-0.06692056357860565,
0.21097244322299957,
0.4957362413406372,
-0.11241310834884644,
-0.0473456084728241,
-0.25537270307540894,
0.1435219645500183,
0.29288366436958313,
0.276577889919281,
0.033838167786598206,
-0.08581922203302383,
-0.1800919771194458,
0.42260628938674927,
0.13667669892311096,
-0.40199214220046997,
-0.36765551567077637,
0.435926228761673,
-0.1568375527858734,
0.039715878665447235,
0.4189263880252838,
-0.264610230922699,
0.4472126364707947,
-0.004752906039357185,
0.16819103062152863,
0.1439957618713379,
0.08642664551734924,
0.027535488829016685,
-0.37366533279418945,
-0.1623842567205429,
0.05177893862128258,
0.13498453795909882,
-0.005486961454153061,
-0.09152991324663162,
0.1472964584827423,
0.061019785702228546,
0.4188120365142822,
-0.027539778500795364,
0.03260880708694458,
-0.06755607575178146,
0.4958624243736267,
0.04737529903650284,
-0.10196258872747421,
-0.3490943908691406,
-0.10837701708078384,
0.006493654102087021,
-0.12493998557329178,
-0.22846347093582153,
0.22066354751586914,
-0.14334018528461456,
-0.2534293830394745,
0.04000121355056763,
-0.19998912513256073,
-0.4062645435333252,
0.23476478457450867,
0.1450541764497757,
-0.13744427263736725,
0.10350574553012848,
-0.16111014783382416,
0.098103828728199,
-0.14527764916419983,
0.08929028362035751,
-0.007837925106287003,
0.1557326316833496,
0.07667145133018494,
-0.35471436381340027,
0.06448101252317429,
0.13004323840141296,
0.3615472614765167,
0.06768202036619186,
-0.17112091183662415,
0.6955145597457886,
0.41011765599250793,
0.5680566430091858,
-0.41157254576683044,
0.19366435706615448,
0.2033444344997406,
-0.24713511765003204,
-0.10422063618898392,
0.511687159538269,
0.036115411669015884,
0.04749631881713867,
0.10946158319711685,
0.19063593447208405,
0.29193755984306335,
-0.07454805821180344,
0.2729586958885193,
0.030673297122120857,
0.08578597009181976,
-0.18309259414672852,
-0.08108671754598618,
0.10602086782455444,
0.2747623026371002,
-0.022220779210329056,
0.4111233651638031,
-0.029419323429465294,
-0.3270523250102997,
0.1541902869939804,
0.6422069072723389,
-0.041082464158535004,
0.1189475804567337,
0.09902001172304153,
-0.4068709909915924,
-0.12889599800109863,
0.2509569525718689,
0.15445344150066376,
0.3563428521156311,
0.26900380849838257,
0.07654419541358948,
0.3278385102748871,
0.12219729274511337,
-0.32018163800239563,
0.49193042516708374,
0.009035490453243256,
0.08828327059745789,
0.3379763066768646,
0.23522043228149414,
0.03162887319922447,
-0.5383797883987427,
-0.0673375278711319,
-0.1451306939125061,
-0.13524173200130463,
-0.3419952094554901,
-0.037657566368579865,
-0.269120454788208,
-0.2796405851840973,
-0.21014755964279175,
0.2723609507083893,
0.28938424587249756,
-0.15231533348560333,
-0.011662829667329788,
0.6310804486274719,
-0.1782691776752472,
0.27854326367378235,
-0.01858643814921379,
0.07788446545600891,
0.1755121946334839,
-0.004926703870296478,
-0.01960963010787964,
0.30197951197624207,
-0.31451523303985596,
0.08514831960201263,
0.2754119038581848,
-0.22263838350772858,
-0.06913642585277557,
0.2904497981071472,
-0.06964747607707977,
-0.3827069401741028,
-0.22663748264312744,
0.09962238371372223,
0.16501256823539734,
-0.015056824311614037,
-0.088618203997612,
0.0007366463541984558,
0.16978414356708527,
-0.32948440313339233,
-0.012092120945453644,
-0.3385324478149414,
0.05499338358640671,
-0.14055800437927246,
-0.08927746117115021,
-0.026760809123516083,
-0.37435051798820496,
-0.4944626986980438,
-0.06385840475559235,
-0.654755175113678,
0.4141033887863159,
-0.21348871290683746,
0.0619661770761013,
0.35911720991134644,
-0.10858064144849777,
-0.01686260476708412,
0.04226454347372055,
-0.06804706156253815,
-0.22750374674797058,
-0.36182108521461487,
0.1419750303030014,
-0.20790550112724304,
-0.28993287682533264,
0.08889436721801758,
0.020594023168087006,
0.05354560911655426,
0.034505538642406464,
-0.19548004865646362,
0.24745966494083405,
-0.17022550106048584,
-0.06860219687223434,
-0.07297137379646301,
-0.060807570815086365,
0.39030027389526367,
0.10238513350486755,
-0.17642207443714142,
-0.21136614680290222,
0.013005822896957397,
0.1592792421579361,
0.1349354386329651,
-0.03442566841840744,
-0.25612661242485046,
0.16615557670593262,
0.0310114286839962,
0.3542686700820923,
0.2577064037322998,
0.2703414559364319,
0.3331400156021118,
-0.12335082143545151,
0.16515350341796875,
-0.255369633436203,
0.011798204854130745,
0.2701667249202728,
-0.1433219015598297,
-0.3159756064414978,
0.3590611219406128,
-0.001888735219836235,
-0.16902479529380798,
-0.17114153504371643,
0.095155730843544,
-0.29011818766593933,
-0.3241516649723053,
-0.12283077836036682,
-0.026857860386371613,
0.3082495629787445,
-0.0793585330247879,
0.344910204410553,
0.2110121250152588,
0.07168097794055939,
0.18671539425849915,
0.019138343632221222,
0.24503090977668762,
-0.13974429666996002,
-0.15407609939575195,
0.05590158328413963,
-0.1722358763217926,
0.22638148069381714,
-0.029899107292294502,
0.48776617646217346,
-0.2301415354013443,
-0.1275854855775833,
0.020709209144115448,
0.05738946050405502,
0.3610811233520508,
0.04708430916070938,
0.0697818398475647,
0.30049943923950195,
0.13212808966636658,
-0.2644556164741516,
-0.15545058250427246,
-0.20507276058197021,
-0.2766053080558777,
-0.014271058142185211,
0.22516101598739624,
-0.33017849922180176,
-0.09190313518047333,
-0.021395627409219742,
-0.3022743761539459,
0.16099664568901062,
0.03622768446803093,
-0.08651672303676605,
-0.11915577948093414,
-0.12678010761737823,
-0.05539756268262863,
0.18451565504074097,
0.19158168137073517,
-0.3850838243961334,
-0.07321681082248688,
0.13847066462039948,
-0.26217785477638245,
0.12495899200439453,
-0.11502982676029205,
0.29257118701934814,
0.08239100873470306,
0.10853712260723114,
0.25537213683128357,
0.18516585230827332,
-0.06773971766233444,
0.1782202571630478,
0.2688826322555542,
-0.28835660219192505,
0.1703181266784668,
0.22472591698169708,
0.03522557020187378,
0.4577275514602661,
-0.31276029348373413,
0.36826109886169434,
0.2052004337310791,
0.2935326099395752,
-0.32009124755859375,
0.292958527803421,
0.4498271644115448,
0.09094558656215668,
0.036101099103689194,
-0.4724174737930298,
0.44336360692977905,
-0.11591410636901855,
-0.03590299189090729,
0.42359378933906555,
-0.057516008615493774,
-0.23408308625221252,
0.3007785677909851,
-0.3845699429512024,
0.726851224899292,
0.23502196371555328,
0.015785876661539078,
0.5337765216827393,
-0.13105922937393188,
0.0769721269607544,
-0.33343279361724854,
0.1649688333272934,
0.05697685852646828,
-0.19269271194934845,
-0.011761954054236412,
-0.003579195588827133,
0.2865953743457794,
-0.2687181830406189,
-0.20337234437465668,
0.1601852923631668,
0.07009744644165039,
-0.039529573172330856,
0.15955393016338348,
0.3090146780014038,
-0.40825292468070984,
-0.3281659781932831,
-0.5725817084312439,
0.17031072080135345,
0.10316552221775055,
0.1082543432712555,
0.02952168509364128,
-0.35886263847351074,
0.4132886826992035,
0.004945393651723862,
-0.2781308889389038,
0.40420299768447876,
-0.5247951745986938,
0.05067768692970276,
-0.1707291305065155,
-0.19594192504882812,
0.16323289275169373,
0.03309544548392296,
-0.09399871528148651,
0.04857513681054115,
-0.2505696415901184,
0.2856980860233307,
0.10229397565126419,
0.13163162767887115,
0.11683874577283859,
-0.023090548813343048,
0.19534705579280853,
-0.13276530802249908,
-0.16243433952331543,
0.2866065502166748,
-0.09594093263149261,
-0.14594608545303345,
-0.03619673103094101,
-0.23344822227954865,
0.38289785385131836,
-0.08863173425197601,
-0.020461594685912132,
-0.014639049768447876,
-0.21812981367111206,
-0.2815883159637451,
0.17151720821857452,
-0.12185616791248322,
-0.1779034584760666,
0.056645676493644714,
-0.11861090362071991,
-0.08866626769304276,
-0.20001515746116638,
0.4088115692138672,
-0.1566975712776184,
0.4308060109615326,
0.43466129899024963,
0.134299635887146,
-0.14897584915161133,
-0.1958533525466919,
-0.07649878412485123,
-0.1902666538953781,
0.07843583077192307,
0.06838146597146988,
0.014070737175643444,
-0.05914291739463806,
-0.03584037721157074,
0.3625463843345642,
0.03925975039601326,
0.008793972432613373,
0.044624682515859604,
-0.21005934476852417,
-0.13838839530944824,
0.08075007796287537,
-0.254331111907959,
0.003344345837831497,
0.08964934200048447,
0.7028698325157166,
-0.15923653542995453,
-0.3442899286746979,
-0.3706335425376892,
0.011295781470835209,
-0.010006356984376907,
-0.06172005832195282,
0.033159129321575165,
-0.05257745832204819,
0.31550273299217224,
-0.12097196280956268,
0.18583379685878754,
0.3441866636276245,
-0.16329745948314667,
-0.2134290337562561,
-0.21543900668621063,
0.10982527583837509,
0.17348408699035645,
-0.19634544849395752,
0.04165255278348923,
-0.09074769914150238,
-0.23254555463790894,
-0.015239991247653961,
0.2668788731098175,
0.08620395511388779,
-0.14158497750759125,
0.05790690705180168,
-0.20513398945331573,
-0.001469738781452179,
-0.06940023601055145,
0.022634895518422127,
-0.2117452621459961,
0.11080434918403625,
-0.04750380292534828,
0.12249007076025009,
-0.015428426675498486,
-0.11181161552667618,
-0.16493813693523407,
-0.11874424666166306,
0.3248061239719391,
0.12316494435071945,
0.35543549060821533,
-0.2754896879196167,
-0.36187371611595154,
-0.06584399938583374,
0.49471041560173035,
0.28320831060409546,
-0.12936654686927795,
-0.0483737513422966,
0.1985304355621338,
0.29811805486679077,
-0.20539548993110657,
0.14656995236873627,
-0.07139572501182556,
-0.05398676544427872,
0.3264869749546051,
-0.08252619951963425,
0.23476508259773254,
-0.1293463110923767,
-0.007291808724403381,
0.29869377613067627,
-0.09722137451171875,
0.09910532087087631,
0.36715516448020935,
0.17334185540676117,
0.07494419813156128,
0.16289733350276947,
0.02543685771524906,
0.11762115359306335,
0.0827760174870491,
0.4386851191520691,
0.027978453785181046,
0.5101338624954224,
0.1413254737854004,
0.16531716287136078,
-0.03491632640361786,
-0.4484764635562897,
-0.20453448593616486,
0.09619517624378204,
-0.3571690618991852,
0.22576233744621277,
-0.1134631484746933,
0.2857740521430969,
-0.2703045606613159,
-0.1613147109746933,
-0.02306639403104782,
0.21503430604934692,
-0.12285659462213516,
-0.25644174218177795,
0.2559720575809479,
-0.030499625951051712,
-0.004664339125156403,
0.0922439694404602,
0.21610216796398163,
0.11342653632164001,
0.16413921117782593,
0.061900701373815536,
-0.04404301941394806,
0.0031427862122654915,
-0.4957311153411865,
0.15720543265342712,
0.3475567698478699,
-0.3112608790397644,
0.30359625816345215,
0.027416430413722992,
-0.10503876209259033,
0.041278060525655746,
0.39794614911079407,
0.37466371059417725,
0.12822702527046204,
-0.2912987768650055,
-0.03111080452799797,
0.21670274436473846,
-0.021397067233920097,
0.05066825449466705,
-0.06545593589544296,
0.2206517904996872,
0.263007253408432,
0.2910534739494324,
0.22866559028625488,
-0.2743123471736908,
0.015873555094003677,
0.03781659156084061,
0.025931788608431816,
-0.4801686108112335,
-0.12009752541780472,
-0.16129516065120697,
0.06200817972421646,
-0.27986013889312744,
-0.200851172208786,
-0.40335792303085327,
-0.08308017998933792,
0.4086359739303589,
0.04015439376235008,
0.2707984745502472,
-0.1103491559624672,
0.11000604927539825,
0.18233278393745422,
0.22946900129318237,
-0.046930987387895584,
0.2234123945236206,
-0.14189845323562622,
-0.5028219819068909,
-0.3702118992805481,
0.16482879221439362,
0.08264582604169846,
-0.014522723853588104,
-0.11279702931642532,
0.11381314694881439,
0.029995765537023544,
0.00495135597884655,
-0.11360608041286469,
-0.13775990903377533,
-0.08974511921405792,
0.12100417912006378,
-0.22621555626392365,
0.12726108729839325,
0.03442137688398361,
-0.022855961695313454,
-0.10400629788637161,
-0.33422237634658813,
0.34141218662261963,
-0.17912745475769043,
0.18667751550674438,
0.1356804519891739,
0.10986477136611938,
-0.1593131124973297,
-0.249172180891037,
0.2734248638153076,
0.12872980535030365,
0.21579551696777344,
-0.39439868927001953,
-0.06363104283809662,
-0.19761019945144653,
-0.2352842539548874,
-0.16302640736103058,
-0.3682595491409302,
-0.14322717487812042,
0.540499210357666,
0.10249336063861847,
0.01182403601706028,
-0.31287357211112976,
0.4667679965496063,
0.11185593903064728,
-0.25138911604881287,
-0.5198057889938354,
0.28993502259254456,
-0.20169034600257874,
0.1633775681257248,
-0.01695331744849682,
0.2634963095188141,
-0.20820236206054688,
-0.039967745542526245,
-0.3209547996520996,
-0.5708547234535217,
0.4837009012699127,
-0.6862039566040039,
-0.19860561192035675,
-0.07681310176849365,
0.4825993478298187,
0.19336754083633423,
0.0708252340555191,
-0.20785659551620483,
0.06729870289564133,
0.07989861071109772,
-0.03201151266694069,
-0.1610855758190155,
0.1481366604566574,
-0.24355626106262207,
-0.1257975846529007,
0.034853894263505936,
0.1687701791524887,
0.3276449739933014,
-0.18606944382190704,
0.20187914371490479,
-0.326840877532959
] |
https://github.com/huggingface/datasets/issues/4960 | BioASQ AttributeError: 'BuilderConfig' object has no attribute 'schema' | Following worked:
```
data_dir = "/Users/dlituiev/repos/datasets/bioasq/"
bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir, name="bioasq_9b_source")
```
Would maintainers be open to one of the following:
- automating this with a latest default config (e.g. `bioasq_9b_source`); how can this be generalized to other datasets?
- providing an actionable error message that lists available `name` values? I only got available `name` values once I've provided something there (`name="aps/bioasq_task_b"`), before it would not even mention that it requires `name` argument | ## Describe the bug
I am trying to load a dataset from drive and running into an error.
## Steps to reproduce the bug
```python
data_dir = "/Users/dlituiev/repos/datasets/bioasq/BioASQ-training9b"
bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir)
```
## Actual results
`AttributeError: 'BuilderConfig' object has no attribute 'schema'`
<details>
```
Using custom data configuration default-a1ca3e05be5abf2f
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [8], in <cell line: 2>()
1 data_dir = "/Users/dlituiev/repos/datasets/bioasq/BioASQ-training9b"
----> 2 bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir)
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/load.py:1723, 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)
1720 ignore_verifications = ignore_verifications or save_infos
1722 # Create a dataset builder
-> 1723 builder_instance = load_dataset_builder(
1724 path=path,
1725 name=name,
1726 data_dir=data_dir,
1727 data_files=data_files,
1728 cache_dir=cache_dir,
1729 features=features,
1730 download_config=download_config,
1731 download_mode=download_mode,
1732 revision=revision,
1733 use_auth_token=use_auth_token,
1734 **config_kwargs,
1735 )
1737 # Return iterable dataset in case of streaming
1738 if streaming:
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/load.py:1526, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs)
1523 raise ValueError(error_msg)
1525 # Instantiate the dataset builder
-> 1526 builder_instance: DatasetBuilder = builder_cls(
1527 cache_dir=cache_dir,
1528 config_name=config_name,
1529 data_dir=data_dir,
1530 data_files=data_files,
1531 hash=hash,
1532 features=features,
1533 use_auth_token=use_auth_token,
1534 **builder_kwargs,
1535 **config_kwargs,
1536 )
1538 return builder_instance
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/builder.py:1154, in GeneratorBasedBuilder.__init__(self, writer_batch_size, *args, **kwargs)
1153 def __init__(self, *args, writer_batch_size=None, **kwargs):
-> 1154 super().__init__(*args, **kwargs)
1155 # Batch size used by the ArrowWriter
1156 # It defines the number of samples that are kept in memory before writing them
1157 # and also the length of the arrow chunks
1158 # None means that the ArrowWriter will use its default value
1159 self._writer_batch_size = writer_batch_size or self.DEFAULT_WRITER_BATCH_SIZE
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/builder.py:307, in DatasetBuilder.__init__(self, cache_dir, config_name, hash, base_path, info, features, use_auth_token, repo_id, data_files, data_dir, name, **config_kwargs)
305 if info is None:
306 info = self.get_exported_dataset_info()
--> 307 info.update(self._info())
308 info.builder_name = self.name
309 info.config_name = self.config.name
File ~/.cache/huggingface/modules/datasets_modules/datasets/aps--bioasq_task_b/3d54b1213f7e8001eef755af92877f9efa44161ee83c2a70d5d649defa95759e/bioasq_task_b.py:477, in BioasqTaskBDataset._info(self)
474 def _info(self):
475
476 # BioASQ Task B source schema
--> 477 if self.config.schema == "source":
478 features = datasets.Features(
479 {
480 "id": datasets.Value("string"),
(...)
504 }
505 )
506 # simplified schema for QA tasks
AttributeError: 'BuilderConfig' object has no attribute 'schema'
```
</details>
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.10.4
- PyArrow version: 9.0.0
- Pandas version: 1.4.3 | 73 | BioASQ AttributeError: 'BuilderConfig' object has no attribute 'schema'
## Describe the bug
I am trying to load a dataset from drive and running into an error.
## Steps to reproduce the bug
```python
data_dir = "/Users/dlituiev/repos/datasets/bioasq/BioASQ-training9b"
bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir)
```
## Actual results
`AttributeError: 'BuilderConfig' object has no attribute 'schema'`
<details>
```
Using custom data configuration default-a1ca3e05be5abf2f
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [8], in <cell line: 2>()
1 data_dir = "/Users/dlituiev/repos/datasets/bioasq/BioASQ-training9b"
----> 2 bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir)
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/load.py:1723, 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)
1720 ignore_verifications = ignore_verifications or save_infos
1722 # Create a dataset builder
-> 1723 builder_instance = load_dataset_builder(
1724 path=path,
1725 name=name,
1726 data_dir=data_dir,
1727 data_files=data_files,
1728 cache_dir=cache_dir,
1729 features=features,
1730 download_config=download_config,
1731 download_mode=download_mode,
1732 revision=revision,
1733 use_auth_token=use_auth_token,
1734 **config_kwargs,
1735 )
1737 # Return iterable dataset in case of streaming
1738 if streaming:
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/load.py:1526, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs)
1523 raise ValueError(error_msg)
1525 # Instantiate the dataset builder
-> 1526 builder_instance: DatasetBuilder = builder_cls(
1527 cache_dir=cache_dir,
1528 config_name=config_name,
1529 data_dir=data_dir,
1530 data_files=data_files,
1531 hash=hash,
1532 features=features,
1533 use_auth_token=use_auth_token,
1534 **builder_kwargs,
1535 **config_kwargs,
1536 )
1538 return builder_instance
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/builder.py:1154, in GeneratorBasedBuilder.__init__(self, writer_batch_size, *args, **kwargs)
1153 def __init__(self, *args, writer_batch_size=None, **kwargs):
-> 1154 super().__init__(*args, **kwargs)
1155 # Batch size used by the ArrowWriter
1156 # It defines the number of samples that are kept in memory before writing them
1157 # and also the length of the arrow chunks
1158 # None means that the ArrowWriter will use its default value
1159 self._writer_batch_size = writer_batch_size or self.DEFAULT_WRITER_BATCH_SIZE
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/builder.py:307, in DatasetBuilder.__init__(self, cache_dir, config_name, hash, base_path, info, features, use_auth_token, repo_id, data_files, data_dir, name, **config_kwargs)
305 if info is None:
306 info = self.get_exported_dataset_info()
--> 307 info.update(self._info())
308 info.builder_name = self.name
309 info.config_name = self.config.name
File ~/.cache/huggingface/modules/datasets_modules/datasets/aps--bioasq_task_b/3d54b1213f7e8001eef755af92877f9efa44161ee83c2a70d5d649defa95759e/bioasq_task_b.py:477, in BioasqTaskBDataset._info(self)
474 def _info(self):
475
476 # BioASQ Task B source schema
--> 477 if self.config.schema == "source":
478 features = datasets.Features(
479 {
480 "id": datasets.Value("string"),
(...)
504 }
505 )
506 # simplified schema for QA tasks
AttributeError: 'BuilderConfig' object has no attribute 'schema'
```
</details>
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.10.4
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
Following worked:
```
data_dir = "/Users/dlituiev/repos/datasets/bioasq/"
bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir, name="bioasq_9b_source")
```
Would maintainers be open to one of the following:
- automating this with a latest default config (e.g. `bioasq_9b_source`); how can this be generalized to other datasets?
- providing an actionable error message that lists available `name` values? I only got available `name` values once I've provided something there (`name="aps/bioasq_task_b"`), before it would not even mention that it requires `name` argument | [
-0.4792846739292145,
0.29812687635421753,
0.03767957165837288,
0.41576021909713745,
0.2735465168952942,
0.09569958597421646,
0.42750638723373413,
0.2045259028673172,
0.19170443713665009,
0.27458441257476807,
0.12277468293905258,
0.028028402477502823,
-0.13475382328033447,
0.46782875061035156,
-0.009264607913792133,
0.028097424656152725,
-0.09354660660028458,
0.21026216447353363,
0.34739598631858826,
0.18525293469429016,
-0.3105803430080414,
0.2917930781841278,
-0.054823338985443115,
0.13385017216205597,
-0.3070477247238159,
0.09647595137357712,
0.18390600383281708,
0.22019603848457336,
-0.03350287675857544,
-0.40982457995414734,
0.34620654582977295,
-0.1762595772743225,
0.26979395747184753,
0.4577350914478302,
-0.00011713835556292906,
0.20884983241558075,
0.3490462899208069,
-0.005173465237021446,
-0.42117756605148315,
-0.17695079743862152,
-0.36021244525909424,
0.0865069031715393,
0.027714112773537636,
-0.0944250077009201,
-0.16377747058868408,
0.16657845675945282,
-0.24498961865901947,
-0.1726996898651123,
-0.06650431454181671,
0.351936399936676,
0.16578619182109833,
0.011709481477737427,
0.11096541583538055,
-0.17072118818759918,
0.07829783111810684,
-0.026767447590827942,
-0.11027848720550537,
0.01817396841943264,
0.0945810005068779,
0.2728241980075836,
0.2074115127325058,
0.09615670144557953,
-0.13109752535820007,
0.05334911122918129,
0.45764896273612976,
-0.03464166820049286,
0.5773550868034363,
-0.11034534871578217,
0.1777241826057434,
0.15811476111412048,
0.6706226468086243,
-0.23885700106620789,
-0.38123175501823425,
-0.05713699012994766,
0.20661990344524384,
-0.1893356889486313,
0.2880469262599945,
0.29300108551979065,
-0.25661346316337585,
-0.022067058831453323,
-0.20340049266815186,
-0.1740655153989792,
-0.13584895431995392,
-0.16233596205711365,
-0.41257357597351074,
0.1965131163597107,
-0.11788129806518555,
0.06477359682321548,
-0.054993774741888046,
-0.07130169868469238,
0.5903589129447937,
-0.20226629078388214,
-0.2876753807067871,
0.1683627814054489,
-0.3840889632701874,
-0.11823411285877228,
-0.0725473091006279,
0.23029965162277222,
0.05900130420923233,
0.2601984143257141,
0.25774481892585754,
-0.2767757177352905,
0.15318605303764343,
0.26059630513191223,
0.14469236135482788,
0.17706476151943207,
0.04839104413986206,
0.1426447480916977,
-0.027037866413593292,
0.2952952980995178,
-0.25618499517440796,
-0.08694222569465637,
-0.17976298928260803,
-0.1785968393087387,
0.24993552267551422,
0.1357572227716446,
0.3362632393836975,
-0.25338512659072876,
-0.4940422773361206,
0.08793356269598007,
-0.12321849912405014,
-0.06504569947719574,
0.27194857597351074,
0.37794217467308044,
0.0192277655005455,
-0.23604944348335266,
0.17285165190696716,
0.22157898545265198,
-0.15953364968299866,
-0.18651972711086273,
-0.2881269156932831,
-0.021033529192209244,
-0.021535193547606468,
-0.08446922898292542,
-0.008678801357746124,
0.004477204754948616,
0.1402542144060135,
-0.014105530455708504,
0.10653534531593323,
-0.1507066786289215,
-0.018225647509098053,
-0.14754562079906464,
-0.31119900941848755,
0.4946397840976715,
0.016937684267759323,
0.07148586958646774,
0.21256861090660095,
-0.46048885583877563,
-0.22914990782737732,
0.23994702100753784,
-0.48692190647125244,
-0.36974188685417175,
-0.3324934244155884,
0.1730063110589981,
-0.1053861454129219,
-0.07954037934541702,
-0.15123340487480164,
-0.1287783682346344,
0.22274214029312134,
-0.4221930503845215,
-0.18047818541526794,
-0.07151876389980316,
-0.25045424699783325,
-0.1416967213153839,
0.3306313455104828,
0.43388450145721436,
-0.22682158648967743,
-0.24279756844043732,
0.01093943789601326,
0.04430637136101723,
0.03749215602874756,
-0.07382738590240479,
-0.17140349745750427,
0.7064882516860962,
-0.30118370056152344,
-0.18323497474193573,
0.30234405398368835,
-0.3526289463043213,
-0.4948631823062897,
0.1578720062971115,
0.08564326167106628,
-0.034381501376628876,
0.17923879623413086,
-0.1110198050737381,
0.14349642395973206,
-0.09241894632577896,
0.16976574063301086,
0.4096081256866455,
-0.041424043476581573,
0.033616989850997925,
0.12200674414634705,
-0.33047229051589966,
-0.055407263338565826,
0.2459607571363449,
0.17468640208244324,
0.2992364466190338,
0.18062597513198853,
-0.003595296759158373,
0.036102741956710815,
-0.14616777002811432,
-0.14661633968353271,
0.31491076946258545,
0.08751548826694489,
-0.20585782825946808,
-0.04520854726433754,
-0.2776604890823364,
-0.6183904409408569,
0.2852519154548645,
-0.07412201911211014,
-0.050995178520679474,
-0.2513194680213928,
0.13595208525657654,
-0.23383808135986328,
0.18102681636810303,
-0.3782988488674164,
-0.25235533714294434,
0.11925813555717468,
0.18403995037078857,
-0.1093212366104126,
-0.058931171894073486,
-0.13196362555027008,
0.30399033427238464,
0.13987481594085693,
0.06717352569103241,
-0.19832205772399902,
0.4087318181991577,
-0.0927513837814331,
-0.23715560138225555,
-0.047124650329351425,
0.17615503072738647,
0.08314239978790283,
0.0777062475681305,
-0.1772039532661438,
0.20204630494117737,
-0.00323776388540864,
0.09758181869983673,
-0.1614559292793274,
0.19367462396621704,
0.14284297823905945,
0.3253418505191803,
0.028815027326345444,
0.05159161984920502,
0.3247807025909424,
-0.03872478008270264,
-0.11595659703016281,
0.10559135675430298,
-0.23146896064281464,
0.329005628824234,
0.06883331388235092,
0.181724414229393,
0.2816978096961975,
0.021011848002672195,
0.014209795743227005,
-0.006709534674882889,
0.06715630739927292,
0.05436909198760986,
0.11064380407333374,
0.13368529081344604,
-0.12572041153907776,
0.04322664812207222,
0.2323804348707199,
0.03727273270487785,
-0.1646016538143158,
-0.0535920113325119,
-0.26970040798187256,
0.1306474804878235,
0.1633751392364502,
0.6025587320327759,
0.4859344959259033,
0.07544349879026413,
-0.34595584869384766,
0.009393958374857903,
0.029698029160499573,
0.1039079800248146,
0.2509322166442871,
-0.06677252054214478,
0.29452821612358093,
0.28916501998901367,
-0.0995829701423645,
0.19823545217514038,
-0.08562758564949036,
-0.3825703263282776,
0.13848452270030975,
0.24798473715782166,
-0.6694715023040771,
0.1828160136938095,
0.07941809296607971,
0.27759724855422974,
0.005674285814166069,
-0.31183546781539917,
-0.19089370965957642,
-0.25831863284111023,
-0.2675609588623047,
0.2352406531572342,
0.0515936054289341,
0.0463782474398613,
-0.4034345746040344,
0.22754044830799103,
0.2789698541164398,
-0.40740156173706055,
-0.05686002969741821,
0.1590079963207245,
-0.04577181488275528,
-0.03985493257641792,
0.15788498520851135,
0.09657660871744156,
-0.0632370114326477,
-0.4089086353778839,
0.25598108768463135,
-0.27665990591049194,
0.041291505098342896,
0.23250624537467957,
0.09425315260887146,
0.761049211025238,
0.30128154158592224,
0.028565414249897003,
0.11986574530601501,
-0.42932960391044617,
0.38895243406295776,
0.12983927130699158,
-0.09718439728021622,
0.2831633985042572,
0.12088161706924438,
-0.09475822746753693,
0.07882651686668396,
-0.02131325751543045,
-0.10610941052436829,
-0.3073485791683197,
-0.3223807215690613,
0.23030619323253632,
0.3085697889328003,
0.33974209427833557,
0.12074373662471771,
0.020057089626789093,
-0.034024160355329514,
0.15609437227249146,
-0.08862010389566422,
-0.6590745449066162,
0.23634091019630432,
-0.11457820236682892,
-0.19556838274002075,
-0.012609671801328659,
-0.017901189625263214,
0.4923113286495209,
0.024337947368621826,
-0.40926259756088257,
-0.008417045697569847,
-0.11885601282119751,
0.16775014996528625,
-0.23221156001091003,
0.009749872609972954,
0.40293511748313904,
0.27396735548973083,
0.0771026760339737,
-0.05004759505391121,
-0.2822575271129608,
0.033058397471904755,
-0.014505885541439056,
0.25607022643089294,
-0.09310770779848099,
0.2600150406360626,
-0.2968628406524658,
0.27233952283859253,
-0.142673060297966,
0.009806234389543533,
0.23664405941963196,
-0.14964808523654938,
0.19915485382080078,
-0.20416411757469177,
-0.47707775235176086,
0.1308198720216751,
0.10326298326253891,
-0.3996623754501343,
0.25287091732025146,
-0.06511703133583069,
0.19337113201618195,
-0.09861400723457336,
0.03859156742691994,
-0.11775051057338715,
-0.21631547808647156,
-0.16313129663467407,
-0.46669626235961914,
0.239178866147995,
-0.1860070526599884,
0.13485634326934814,
-0.24702686071395874,
0.1707206666469574,
0.03914818912744522,
0.27666130661964417,
0.15537387132644653,
0.02680647186934948,
-0.31796199083328247,
-0.08468559384346008,
-0.14329391717910767,
0.1585371345281601,
-0.1389962136745453,
0.161636084318161,
-0.03458942472934723,
0.1494591236114502,
0.0025149211287498474,
-0.045956626534461975,
0.5494945645332336,
-0.17949077486991882,
0.2559739947319031,
0.34473708271980286,
-0.012210367247462273,
-0.2725389301776886,
-0.22086338698863983,
-0.003887571394443512,
0.42350247502326965,
-0.1352129578590393,
0.2753763198852539,
-0.1265915334224701,
-0.1927882432937622,
0.29930251836776733,
0.04559682682156563,
-0.32650285959243774,
-0.24667559564113617,
-0.2454456090927124,
-0.24908572435379028,
-0.2863304316997528,
-0.0669751986861229,
-0.07452643662691116,
0.5044328570365906,
0.28481167554855347,
0.054328035563230515,
-0.5549870729446411,
-0.1036178320646286,
0.002789407968521118,
0.05692826583981514,
0.3353649973869324,
-0.19171102344989777,
0.3542916476726532,
0.04346572235226631,
0.02798398584127426,
0.21468842029571533,
0.5496143102645874,
-0.00034411996603012085,
-0.5232563018798828,
0.00231035053730011,
-0.08873704820871353,
0.20523932576179504,
0.06006811559200287,
-0.203075110912323,
-0.1689126193523407,
-0.1377299278974533,
0.12119638919830322,
-0.19301599264144897,
-0.24733129143714905,
0.13515622913837433,
0.1741493195295334,
-0.09447252750396729,
-0.47714102268218994,
0.5548673272132874,
-0.0340818390250206,
-0.0625108927488327,
-0.19606967270374298,
0.40948474407196045,
-0.4372502565383911,
0.37554603815078735,
0.11689923703670502,
0.7569496035575867,
0.00034282729029655457,
0.04716324061155319,
0.4415701627731323,
0.1369636207818985,
0.05774643272161484,
-0.16725000739097595,
0.07044246047735214,
-0.407742977142334,
-0.2629164755344391,
-0.06110216677188873,
-0.14347177743911743,
0.33910655975341797,
0.12308167666196823,
-0.17979326844215393,
0.3148742914199829,
-0.30312368273735046,
0.009654391556978226,
0.1962936967611313,
-0.1384119689464569,
-0.33464789390563965,
-0.23900598287582397,
-0.18633906543254852,
0.10758423805236816,
-0.1453211009502411,
0.1605207324028015,
-0.027086351066827774,
0.042957548052072525,
0.032380927354097366,
-0.12553155422210693,
-0.21669456362724304,
0.04859074205160141,
-0.36130663752555847,
-0.05162357538938522,
0.2819073498249054,
-0.3177589774131775,
0.15468360483646393,
0.3445832133293152,
0.12255284190177917,
0.2978380620479584,
-0.17635822296142578,
0.32240766286849976,
-0.09542111307382584,
0.14808015525341034,
0.020047388970851898,
-0.19423921406269073,
0.4760426878929138,
-0.06895208358764648,
-0.3166027069091797,
0.10617956519126892,
-0.18733681738376617,
-0.29538053274154663,
0.3283708989620209,
0.04186118766665459,
0.10956639051437378,
-0.46626704931259155,
-0.41153663396835327,
-0.1891929805278778,
0.32794925570487976,
-0.08505488932132721,
0.10909970104694366,
0.17458030581474304,
-0.41104137897491455,
0.1750379353761673,
0.06231033056974411,
-0.34706762433052063,
0.04735766723752022,
0.16446581482887268,
0.09560362994670868,
0.22576993703842163,
0.7519470453262329,
-0.19692052900791168,
0.08274795860052109,
-0.18727973103523254,
0.1010250374674797,
0.2861892879009247,
-0.3966428339481354,
0.1969011127948761,
-0.08432187885046005,
-0.09146519005298615,
-0.04465250298380852,
0.4259527623653412,
0.06475595384836197,
-0.028385110199451447,
0.14743472635746002,
-0.613028883934021,
-0.09096354991197586,
0.2009037435054779,
-0.2261800915002823,
0.11153663694858551,
0.10778849571943283,
-0.09389173984527588,
-0.2107669562101364,
-0.05005054175853729,
-0.2539229393005371,
0.17827929556369781,
-0.4897691309452057,
0.07166282832622528,
0.09496492892503738,
0.04736475646495819,
-0.05048874393105507,
-0.147416353225708,
0.13840605318546295,
-0.31505483388900757,
0.025954119861125946,
-0.15271566808223724,
-0.12167832255363464,
0.14159749448299408,
0.09629832953214645,
0.17086927592754364,
0.09109753370285034,
-0.07624498009681702,
-0.309542715549469,
-0.11310503631830215,
0.2059907764196396,
0.035164862871170044,
-0.07948136329650879,
0.038344692438840866,
0.1561933308839798,
0.056854911148548126,
-0.47678011655807495,
0.33799028396606445,
-0.19549638032913208,
0.23012520372867584,
-0.15887649357318878,
0.3230350613594055,
-0.22027474641799927,
0.11976373195648193,
0.04666191712021828,
0.18180665373802185,
-0.35710668563842773,
0.24559515714645386,
0.6576127409934998,
-0.5023056268692017,
0.3244938254356384,
0.11084806174039841,
0.12642356753349304,
0.11976227164268494,
-0.3592379093170166,
-0.03532606363296509,
0.08001991361379623,
0.20107212662696838,
-0.3014860153198242,
-0.10557842254638672,
-0.22755202651023865,
-0.34523794054985046,
-0.039818696677684784,
0.2915774881839752,
0.1228795051574707,
-0.21709959208965302,
-0.1850266307592392,
0.17984116077423096,
0.41781505942344666,
0.13481295108795166,
0.1493702381849289,
0.5190057754516602,
-0.2888915240764618,
0.129751518368721,
0.486686646938324,
0.13895367085933685,
-0.22800910472869873,
0.6943538188934326,
-0.09180178493261337,
0.13359671831130981,
0.3026512563228607,
-0.040255989879369736,
-0.0439818874001503,
-0.3837103843688965,
0.4689420759677887,
-0.12099039554595947,
0.04381776601076126,
-0.25501322746276855,
-0.12890201807022095,
-0.17164814472198486,
-0.34342652559280396,
-0.0032264739274978638,
-0.33622467517852783,
0.02093331329524517,
-0.13557660579681396,
-0.14067557454109192,
0.025804519653320312,
-0.22702330350875854,
0.1323813647031784,
-0.06287334859371185,
-0.12554137408733368,
-0.13907137513160706,
-0.11441972851753235,
-0.0711493194103241,
-0.1997278481721878,
-0.12728621065616608,
0.14132913947105408,
0.34052228927612305,
-0.21087977290153503,
-0.4159260392189026,
0.37057968974113464,
-0.0616765022277832,
0.0953458920121193,
0.2160237580537796,
0.4376792907714844,
0.6744701862335205,
0.3406795263290405,
-0.09528718888759613,
-0.05908362939953804,
-0.17447952926158905,
-0.11121438443660736,
-0.030658915638923645,
0.009219027124345303,
-0.05086708068847656,
0.18555110692977905,
0.3546368181705475,
0.14640052616596222,
-0.07216235995292664,
0.06004679203033447,
0.08656040579080582,
0.33732128143310547,
-0.39760297536849976,
0.5656059384346008,
-0.12853969633579254,
-0.12974652647972107,
-0.21182572841644287,
0.29650765657424927,
-0.19170600175857544,
-0.10116580128669739,
0.16877323389053345,
-0.029355445876717567,
0.20294100046157837,
0.008808963932096958,
0.0419841893017292,
0.05326273292303085,
0.479646235704422,
0.266885906457901,
0.008674927055835724,
-0.28264153003692627,
0.16293965280056,
-0.4658963978290558,
-0.006056986749172211,
0.032375089824199677,
-0.07309704273939133,
0.14450670778751373,
0.17489486932754517,
-0.2486811876296997,
-0.04339480400085449,
0.15311163663864136,
0.2683933973312378,
0.05559995025396347,
0.058425020426511765,
-0.29095005989074707,
-0.3465755581855774,
0.1775260716676712,
0.16739068925380707,
-0.21817468106746674,
-0.4440687298774719,
0.14695464074611664,
-0.054494552314281464,
0.06790272891521454,
0.1458621323108673,
0.03533376753330231,
0.19121818244457245,
-0.2551785707473755,
0.35568615794181824,
0.052331604063510895,
0.44057750701904297,
0.02448403090238571,
-0.1333577185869217,
-0.29518309235572815,
-0.23603111505508423,
-0.3728005886077881,
0.1870766282081604,
0.08341445028781891,
0.3614385724067688,
-0.1218029111623764,
-0.028435271233320236,
-0.3953322172164917,
0.19564588367938995,
-0.14134570956230164,
-0.04205929860472679,
-0.38418230414390564,
0.2556178569793701,
-0.2118600308895111,
0.26184114813804626,
0.201564759016037,
-0.06193330138921738,
-0.11439704895019531,
0.39904576539993286,
-0.2590106725692749,
-0.2352011799812317,
0.3666348457336426,
0.07438530027866364,
-0.3818327784538269,
-0.09158109873533249,
0.2076113224029541,
-0.2440042793750763,
0.036632392555475235,
-0.4468696117401123,
0.16647258400917053,
0.3568952679634094,
-0.1742916703224182,
-0.0918053686618805,
0.22194664180278778,
0.2074182778596878,
0.06584092974662781,
-0.053753457963466644,
0.24552035331726074,
-0.025260914117097855,
-0.057251736521720886,
-0.03693097457289696,
-0.08477187901735306
] |
https://github.com/huggingface/datasets/issues/4960 | BioASQ AttributeError: 'BuilderConfig' object has no attribute 'schema' | Hi ! In general the list of available configurations is prompted. I think this is an issue with this specific dataset.
Feel free to open a new discussions at https://huggingface.co/datasets/aps/bioasq_task_b/discussions
cc @apsdehal
In particular it sounds like the `BUILDER_CONFIG_CLASS= BigBioConfig ` class attribute is missing and the _info should account for schema being None and raise an error | ## Describe the bug
I am trying to load a dataset from drive and running into an error.
## Steps to reproduce the bug
```python
data_dir = "/Users/dlituiev/repos/datasets/bioasq/BioASQ-training9b"
bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir)
```
## Actual results
`AttributeError: 'BuilderConfig' object has no attribute 'schema'`
<details>
```
Using custom data configuration default-a1ca3e05be5abf2f
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [8], in <cell line: 2>()
1 data_dir = "/Users/dlituiev/repos/datasets/bioasq/BioASQ-training9b"
----> 2 bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir)
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/load.py:1723, 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)
1720 ignore_verifications = ignore_verifications or save_infos
1722 # Create a dataset builder
-> 1723 builder_instance = load_dataset_builder(
1724 path=path,
1725 name=name,
1726 data_dir=data_dir,
1727 data_files=data_files,
1728 cache_dir=cache_dir,
1729 features=features,
1730 download_config=download_config,
1731 download_mode=download_mode,
1732 revision=revision,
1733 use_auth_token=use_auth_token,
1734 **config_kwargs,
1735 )
1737 # Return iterable dataset in case of streaming
1738 if streaming:
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/load.py:1526, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs)
1523 raise ValueError(error_msg)
1525 # Instantiate the dataset builder
-> 1526 builder_instance: DatasetBuilder = builder_cls(
1527 cache_dir=cache_dir,
1528 config_name=config_name,
1529 data_dir=data_dir,
1530 data_files=data_files,
1531 hash=hash,
1532 features=features,
1533 use_auth_token=use_auth_token,
1534 **builder_kwargs,
1535 **config_kwargs,
1536 )
1538 return builder_instance
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/builder.py:1154, in GeneratorBasedBuilder.__init__(self, writer_batch_size, *args, **kwargs)
1153 def __init__(self, *args, writer_batch_size=None, **kwargs):
-> 1154 super().__init__(*args, **kwargs)
1155 # Batch size used by the ArrowWriter
1156 # It defines the number of samples that are kept in memory before writing them
1157 # and also the length of the arrow chunks
1158 # None means that the ArrowWriter will use its default value
1159 self._writer_batch_size = writer_batch_size or self.DEFAULT_WRITER_BATCH_SIZE
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/builder.py:307, in DatasetBuilder.__init__(self, cache_dir, config_name, hash, base_path, info, features, use_auth_token, repo_id, data_files, data_dir, name, **config_kwargs)
305 if info is None:
306 info = self.get_exported_dataset_info()
--> 307 info.update(self._info())
308 info.builder_name = self.name
309 info.config_name = self.config.name
File ~/.cache/huggingface/modules/datasets_modules/datasets/aps--bioasq_task_b/3d54b1213f7e8001eef755af92877f9efa44161ee83c2a70d5d649defa95759e/bioasq_task_b.py:477, in BioasqTaskBDataset._info(self)
474 def _info(self):
475
476 # BioASQ Task B source schema
--> 477 if self.config.schema == "source":
478 features = datasets.Features(
479 {
480 "id": datasets.Value("string"),
(...)
504 }
505 )
506 # simplified schema for QA tasks
AttributeError: 'BuilderConfig' object has no attribute 'schema'
```
</details>
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.10.4
- PyArrow version: 9.0.0
- Pandas version: 1.4.3 | 58 | BioASQ AttributeError: 'BuilderConfig' object has no attribute 'schema'
## Describe the bug
I am trying to load a dataset from drive and running into an error.
## Steps to reproduce the bug
```python
data_dir = "/Users/dlituiev/repos/datasets/bioasq/BioASQ-training9b"
bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir)
```
## Actual results
`AttributeError: 'BuilderConfig' object has no attribute 'schema'`
<details>
```
Using custom data configuration default-a1ca3e05be5abf2f
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [8], in <cell line: 2>()
1 data_dir = "/Users/dlituiev/repos/datasets/bioasq/BioASQ-training9b"
----> 2 bioasq_task_b = load_dataset("aps/bioasq_task_b", data_dir=data_dir)
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/load.py:1723, 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)
1720 ignore_verifications = ignore_verifications or save_infos
1722 # Create a dataset builder
-> 1723 builder_instance = load_dataset_builder(
1724 path=path,
1725 name=name,
1726 data_dir=data_dir,
1727 data_files=data_files,
1728 cache_dir=cache_dir,
1729 features=features,
1730 download_config=download_config,
1731 download_mode=download_mode,
1732 revision=revision,
1733 use_auth_token=use_auth_token,
1734 **config_kwargs,
1735 )
1737 # Return iterable dataset in case of streaming
1738 if streaming:
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/load.py:1526, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs)
1523 raise ValueError(error_msg)
1525 # Instantiate the dataset builder
-> 1526 builder_instance: DatasetBuilder = builder_cls(
1527 cache_dir=cache_dir,
1528 config_name=config_name,
1529 data_dir=data_dir,
1530 data_files=data_files,
1531 hash=hash,
1532 features=features,
1533 use_auth_token=use_auth_token,
1534 **builder_kwargs,
1535 **config_kwargs,
1536 )
1538 return builder_instance
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/builder.py:1154, in GeneratorBasedBuilder.__init__(self, writer_batch_size, *args, **kwargs)
1153 def __init__(self, *args, writer_batch_size=None, **kwargs):
-> 1154 super().__init__(*args, **kwargs)
1155 # Batch size used by the ArrowWriter
1156 # It defines the number of samples that are kept in memory before writing them
1157 # and also the length of the arrow chunks
1158 # None means that the ArrowWriter will use its default value
1159 self._writer_batch_size = writer_batch_size or self.DEFAULT_WRITER_BATCH_SIZE
File ~/opt/anaconda3/envs/spacy3/lib/python3.10/site-packages/datasets/builder.py:307, in DatasetBuilder.__init__(self, cache_dir, config_name, hash, base_path, info, features, use_auth_token, repo_id, data_files, data_dir, name, **config_kwargs)
305 if info is None:
306 info = self.get_exported_dataset_info()
--> 307 info.update(self._info())
308 info.builder_name = self.name
309 info.config_name = self.config.name
File ~/.cache/huggingface/modules/datasets_modules/datasets/aps--bioasq_task_b/3d54b1213f7e8001eef755af92877f9efa44161ee83c2a70d5d649defa95759e/bioasq_task_b.py:477, in BioasqTaskBDataset._info(self)
474 def _info(self):
475
476 # BioASQ Task B source schema
--> 477 if self.config.schema == "source":
478 features = datasets.Features(
479 {
480 "id": datasets.Value("string"),
(...)
504 }
505 )
506 # simplified schema for QA tasks
AttributeError: 'BuilderConfig' object has no attribute 'schema'
```
</details>
## Environment info
- `datasets` version: 2.4.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.10.4
- PyArrow version: 9.0.0
- Pandas version: 1.4.3
Hi ! In general the list of available configurations is prompted. I think this is an issue with this specific dataset.
Feel free to open a new discussions at https://huggingface.co/datasets/aps/bioasq_task_b/discussions
cc @apsdehal
In particular it sounds like the `BUILDER_CONFIG_CLASS= BigBioConfig ` class attribute is missing and the _info should account for schema being None and raise an error | [
-0.4792846739292145,
0.29812687635421753,
0.03767957165837288,
0.41576021909713745,
0.2735465168952942,
0.09569958597421646,
0.42750638723373413,
0.2045259028673172,
0.19170443713665009,
0.27458441257476807,
0.12277468293905258,
0.028028402477502823,
-0.13475382328033447,
0.46782875061035156,
-0.009264607913792133,
0.028097424656152725,
-0.09354660660028458,
0.21026216447353363,
0.34739598631858826,
0.18525293469429016,
-0.3105803430080414,
0.2917930781841278,
-0.054823338985443115,
0.13385017216205597,
-0.3070477247238159,
0.09647595137357712,
0.18390600383281708,
0.22019603848457336,
-0.03350287675857544,
-0.40982457995414734,
0.34620654582977295,
-0.1762595772743225,
0.26979395747184753,
0.4577350914478302,
-0.00011713835556292906,
0.20884983241558075,
0.3490462899208069,
-0.005173465237021446,
-0.42117756605148315,
-0.17695079743862152,
-0.36021244525909424,
0.0865069031715393,
0.027714112773537636,
-0.0944250077009201,
-0.16377747058868408,
0.16657845675945282,
-0.24498961865901947,
-0.1726996898651123,
-0.06650431454181671,
0.351936399936676,
0.16578619182109833,
0.011709481477737427,
0.11096541583538055,
-0.17072118818759918,
0.07829783111810684,
-0.026767447590827942,
-0.11027848720550537,
0.01817396841943264,
0.0945810005068779,
0.2728241980075836,
0.2074115127325058,
0.09615670144557953,
-0.13109752535820007,
0.05334911122918129,
0.45764896273612976,
-0.03464166820049286,
0.5773550868034363,
-0.11034534871578217,
0.1777241826057434,
0.15811476111412048,
0.6706226468086243,
-0.23885700106620789,
-0.38123175501823425,
-0.05713699012994766,
0.20661990344524384,
-0.1893356889486313,
0.2880469262599945,
0.29300108551979065,
-0.25661346316337585,
-0.022067058831453323,
-0.20340049266815186,
-0.1740655153989792,
-0.13584895431995392,
-0.16233596205711365,
-0.41257357597351074,
0.1965131163597107,
-0.11788129806518555,
0.06477359682321548,
-0.054993774741888046,
-0.07130169868469238,
0.5903589129447937,
-0.20226629078388214,
-0.2876753807067871,
0.1683627814054489,
-0.3840889632701874,
-0.11823411285877228,
-0.0725473091006279,
0.23029965162277222,
0.05900130420923233,
0.2601984143257141,
0.25774481892585754,
-0.2767757177352905,
0.15318605303764343,
0.26059630513191223,
0.14469236135482788,
0.17706476151943207,
0.04839104413986206,
0.1426447480916977,
-0.027037866413593292,
0.2952952980995178,
-0.25618499517440796,
-0.08694222569465637,
-0.17976298928260803,
-0.1785968393087387,
0.24993552267551422,
0.1357572227716446,
0.3362632393836975,
-0.25338512659072876,
-0.4940422773361206,
0.08793356269598007,
-0.12321849912405014,
-0.06504569947719574,
0.27194857597351074,
0.37794217467308044,
0.0192277655005455,
-0.23604944348335266,
0.17285165190696716,
0.22157898545265198,
-0.15953364968299866,
-0.18651972711086273,
-0.2881269156932831,
-0.021033529192209244,
-0.021535193547606468,
-0.08446922898292542,
-0.008678801357746124,
0.004477204754948616,
0.1402542144060135,
-0.014105530455708504,
0.10653534531593323,
-0.1507066786289215,
-0.018225647509098053,
-0.14754562079906464,
-0.31119900941848755,
0.4946397840976715,
0.016937684267759323,
0.07148586958646774,
0.21256861090660095,
-0.46048885583877563,
-0.22914990782737732,
0.23994702100753784,
-0.48692190647125244,
-0.36974188685417175,
-0.3324934244155884,
0.1730063110589981,
-0.1053861454129219,
-0.07954037934541702,
-0.15123340487480164,
-0.1287783682346344,
0.22274214029312134,
-0.4221930503845215,
-0.18047818541526794,
-0.07151876389980316,
-0.25045424699783325,
-0.1416967213153839,
0.3306313455104828,
0.43388450145721436,
-0.22682158648967743,
-0.24279756844043732,
0.01093943789601326,
0.04430637136101723,
0.03749215602874756,
-0.07382738590240479,
-0.17140349745750427,
0.7064882516860962,
-0.30118370056152344,
-0.18323497474193573,
0.30234405398368835,
-0.3526289463043213,
-0.4948631823062897,
0.1578720062971115,
0.08564326167106628,
-0.034381501376628876,
0.17923879623413086,
-0.1110198050737381,
0.14349642395973206,
-0.09241894632577896,
0.16976574063301086,
0.4096081256866455,
-0.041424043476581573,
0.033616989850997925,
0.12200674414634705,
-0.33047229051589966,
-0.055407263338565826,
0.2459607571363449,
0.17468640208244324,
0.2992364466190338,
0.18062597513198853,
-0.003595296759158373,
0.036102741956710815,
-0.14616777002811432,
-0.14661633968353271,
0.31491076946258545,
0.08751548826694489,
-0.20585782825946808,
-0.04520854726433754,
-0.2776604890823364,
-0.6183904409408569,
0.2852519154548645,
-0.07412201911211014,
-0.050995178520679474,
-0.2513194680213928,
0.13595208525657654,
-0.23383808135986328,
0.18102681636810303,
-0.3782988488674164,
-0.25235533714294434,
0.11925813555717468,
0.18403995037078857,
-0.1093212366104126,
-0.058931171894073486,
-0.13196362555027008,
0.30399033427238464,
0.13987481594085693,
0.06717352569103241,
-0.19832205772399902,
0.4087318181991577,
-0.0927513837814331,
-0.23715560138225555,
-0.047124650329351425,
0.17615503072738647,
0.08314239978790283,
0.0777062475681305,
-0.1772039532661438,
0.20204630494117737,
-0.00323776388540864,
0.09758181869983673,
-0.1614559292793274,
0.19367462396621704,
0.14284297823905945,
0.3253418505191803,
0.028815027326345444,
0.05159161984920502,
0.3247807025909424,
-0.03872478008270264,
-0.11595659703016281,
0.10559135675430298,
-0.23146896064281464,
0.329005628824234,
0.06883331388235092,
0.181724414229393,
0.2816978096961975,
0.021011848002672195,
0.014209795743227005,
-0.006709534674882889,
0.06715630739927292,
0.05436909198760986,
0.11064380407333374,
0.13368529081344604,
-0.12572041153907776,
0.04322664812207222,
0.2323804348707199,
0.03727273270487785,
-0.1646016538143158,
-0.0535920113325119,
-0.26970040798187256,
0.1306474804878235,
0.1633751392364502,
0.6025587320327759,
0.4859344959259033,
0.07544349879026413,
-0.34595584869384766,
0.009393958374857903,
0.029698029160499573,
0.1039079800248146,
0.2509322166442871,
-0.06677252054214478,
0.29452821612358093,
0.28916501998901367,
-0.0995829701423645,
0.19823545217514038,
-0.08562758564949036,
-0.3825703263282776,
0.13848452270030975,
0.24798473715782166,
-0.6694715023040771,
0.1828160136938095,
0.07941809296607971,
0.27759724855422974,
0.005674285814166069,
-0.31183546781539917,
-0.19089370965957642,
-0.25831863284111023,
-0.2675609588623047,
0.2352406531572342,
0.0515936054289341,
0.0463782474398613,
-0.4034345746040344,
0.22754044830799103,
0.2789698541164398,
-0.40740156173706055,
-0.05686002969741821,
0.1590079963207245,
-0.04577181488275528,
-0.03985493257641792,
0.15788498520851135,
0.09657660871744156,
-0.0632370114326477,
-0.4089086353778839,
0.25598108768463135,
-0.27665990591049194,
0.041291505098342896,
0.23250624537467957,
0.09425315260887146,
0.761049211025238,
0.30128154158592224,
0.028565414249897003,
0.11986574530601501,
-0.42932960391044617,
0.38895243406295776,
0.12983927130699158,
-0.09718439728021622,
0.2831633985042572,
0.12088161706924438,
-0.09475822746753693,
0.07882651686668396,
-0.02131325751543045,
-0.10610941052436829,
-0.3073485791683197,
-0.3223807215690613,
0.23030619323253632,
0.3085697889328003,
0.33974209427833557,
0.12074373662471771,
0.020057089626789093,
-0.034024160355329514,
0.15609437227249146,
-0.08862010389566422,
-0.6590745449066162,
0.23634091019630432,
-0.11457820236682892,
-0.19556838274002075,
-0.012609671801328659,
-0.017901189625263214,
0.4923113286495209,
0.024337947368621826,
-0.40926259756088257,
-0.008417045697569847,
-0.11885601282119751,
0.16775014996528625,
-0.23221156001091003,
0.009749872609972954,
0.40293511748313904,
0.27396735548973083,
0.0771026760339737,
-0.05004759505391121,
-0.2822575271129608,
0.033058397471904755,
-0.014505885541439056,
0.25607022643089294,
-0.09310770779848099,
0.2600150406360626,
-0.2968628406524658,
0.27233952283859253,
-0.142673060297966,
0.009806234389543533,
0.23664405941963196,
-0.14964808523654938,
0.19915485382080078,
-0.20416411757469177,
-0.47707775235176086,
0.1308198720216751,
0.10326298326253891,
-0.3996623754501343,
0.25287091732025146,
-0.06511703133583069,
0.19337113201618195,
-0.09861400723457336,
0.03859156742691994,
-0.11775051057338715,
-0.21631547808647156,
-0.16313129663467407,
-0.46669626235961914,
0.239178866147995,
-0.1860070526599884,
0.13485634326934814,
-0.24702686071395874,
0.1707206666469574,
0.03914818912744522,
0.27666130661964417,
0.15537387132644653,
0.02680647186934948,
-0.31796199083328247,
-0.08468559384346008,
-0.14329391717910767,
0.1585371345281601,
-0.1389962136745453,
0.161636084318161,
-0.03458942472934723,
0.1494591236114502,
0.0025149211287498474,
-0.045956626534461975,
0.5494945645332336,
-0.17949077486991882,
0.2559739947319031,
0.34473708271980286,
-0.012210367247462273,
-0.2725389301776886,
-0.22086338698863983,
-0.003887571394443512,
0.42350247502326965,
-0.1352129578590393,
0.2753763198852539,
-0.1265915334224701,
-0.1927882432937622,
0.29930251836776733,
0.04559682682156563,
-0.32650285959243774,
-0.24667559564113617,
-0.2454456090927124,
-0.24908572435379028,
-0.2863304316997528,
-0.0669751986861229,
-0.07452643662691116,
0.5044328570365906,
0.28481167554855347,
0.054328035563230515,
-0.5549870729446411,
-0.1036178320646286,
0.002789407968521118,
0.05692826583981514,
0.3353649973869324,
-0.19171102344989777,
0.3542916476726532,
0.04346572235226631,
0.02798398584127426,
0.21468842029571533,
0.5496143102645874,
-0.00034411996603012085,
-0.5232563018798828,
0.00231035053730011,
-0.08873704820871353,
0.20523932576179504,
0.06006811559200287,
-0.203075110912323,
-0.1689126193523407,
-0.1377299278974533,
0.12119638919830322,
-0.19301599264144897,
-0.24733129143714905,
0.13515622913837433,
0.1741493195295334,
-0.09447252750396729,
-0.47714102268218994,
0.5548673272132874,
-0.0340818390250206,
-0.0625108927488327,
-0.19606967270374298,
0.40948474407196045,
-0.4372502565383911,
0.37554603815078735,
0.11689923703670502,
0.7569496035575867,
0.00034282729029655457,
0.04716324061155319,
0.4415701627731323,
0.1369636207818985,
0.05774643272161484,
-0.16725000739097595,
0.07044246047735214,
-0.407742977142334,
-0.2629164755344391,
-0.06110216677188873,
-0.14347177743911743,
0.33910655975341797,
0.12308167666196823,
-0.17979326844215393,
0.3148742914199829,
-0.30312368273735046,
0.009654391556978226,
0.1962936967611313,
-0.1384119689464569,
-0.33464789390563965,
-0.23900598287582397,
-0.18633906543254852,
0.10758423805236816,
-0.1453211009502411,
0.1605207324028015,
-0.027086351066827774,
0.042957548052072525,
0.032380927354097366,
-0.12553155422210693,
-0.21669456362724304,
0.04859074205160141,
-0.36130663752555847,
-0.05162357538938522,
0.2819073498249054,
-0.3177589774131775,
0.15468360483646393,
0.3445832133293152,
0.12255284190177917,
0.2978380620479584,
-0.17635822296142578,
0.32240766286849976,
-0.09542111307382584,
0.14808015525341034,
0.020047388970851898,
-0.19423921406269073,
0.4760426878929138,
-0.06895208358764648,
-0.3166027069091797,
0.10617956519126892,
-0.18733681738376617,
-0.29538053274154663,
0.3283708989620209,
0.04186118766665459,
0.10956639051437378,
-0.46626704931259155,
-0.41153663396835327,
-0.1891929805278778,
0.32794925570487976,
-0.08505488932132721,
0.10909970104694366,
0.17458030581474304,
-0.41104137897491455,
0.1750379353761673,
0.06231033056974411,
-0.34706762433052063,
0.04735766723752022,
0.16446581482887268,
0.09560362994670868,
0.22576993703842163,
0.7519470453262329,
-0.19692052900791168,
0.08274795860052109,
-0.18727973103523254,
0.1010250374674797,
0.2861892879009247,
-0.3966428339481354,
0.1969011127948761,
-0.08432187885046005,
-0.09146519005298615,
-0.04465250298380852,
0.4259527623653412,
0.06475595384836197,
-0.028385110199451447,
0.14743472635746002,
-0.613028883934021,
-0.09096354991197586,
0.2009037435054779,
-0.2261800915002823,
0.11153663694858551,
0.10778849571943283,
-0.09389173984527588,
-0.2107669562101364,
-0.05005054175853729,
-0.2539229393005371,
0.17827929556369781,
-0.4897691309452057,
0.07166282832622528,
0.09496492892503738,
0.04736475646495819,
-0.05048874393105507,
-0.147416353225708,
0.13840605318546295,
-0.31505483388900757,
0.025954119861125946,
-0.15271566808223724,
-0.12167832255363464,
0.14159749448299408,
0.09629832953214645,
0.17086927592754364,
0.09109753370285034,
-0.07624498009681702,
-0.309542715549469,
-0.11310503631830215,
0.2059907764196396,
0.035164862871170044,
-0.07948136329650879,
0.038344692438840866,
0.1561933308839798,
0.056854911148548126,
-0.47678011655807495,
0.33799028396606445,
-0.19549638032913208,
0.23012520372867584,
-0.15887649357318878,
0.3230350613594055,
-0.22027474641799927,
0.11976373195648193,
0.04666191712021828,
0.18180665373802185,
-0.35710668563842773,
0.24559515714645386,
0.6576127409934998,
-0.5023056268692017,
0.3244938254356384,
0.11084806174039841,
0.12642356753349304,
0.11976227164268494,
-0.3592379093170166,
-0.03532606363296509,
0.08001991361379623,
0.20107212662696838,
-0.3014860153198242,
-0.10557842254638672,
-0.22755202651023865,
-0.34523794054985046,
-0.039818696677684784,
0.2915774881839752,
0.1228795051574707,
-0.21709959208965302,
-0.1850266307592392,
0.17984116077423096,
0.41781505942344666,
0.13481295108795166,
0.1493702381849289,
0.5190057754516602,
-0.2888915240764618,
0.129751518368721,
0.486686646938324,
0.13895367085933685,
-0.22800910472869873,
0.6943538188934326,
-0.09180178493261337,
0.13359671831130981,
0.3026512563228607,
-0.040255989879369736,
-0.0439818874001503,
-0.3837103843688965,
0.4689420759677887,
-0.12099039554595947,
0.04381776601076126,
-0.25501322746276855,
-0.12890201807022095,
-0.17164814472198486,
-0.34342652559280396,
-0.0032264739274978638,
-0.33622467517852783,
0.02093331329524517,
-0.13557660579681396,
-0.14067557454109192,
0.025804519653320312,
-0.22702330350875854,
0.1323813647031784,
-0.06287334859371185,
-0.12554137408733368,
-0.13907137513160706,
-0.11441972851753235,
-0.0711493194103241,
-0.1997278481721878,
-0.12728621065616608,
0.14132913947105408,
0.34052228927612305,
-0.21087977290153503,
-0.4159260392189026,
0.37057968974113464,
-0.0616765022277832,
0.0953458920121193,
0.2160237580537796,
0.4376792907714844,
0.6744701862335205,
0.3406795263290405,
-0.09528718888759613,
-0.05908362939953804,
-0.17447952926158905,
-0.11121438443660736,
-0.030658915638923645,
0.009219027124345303,
-0.05086708068847656,
0.18555110692977905,
0.3546368181705475,
0.14640052616596222,
-0.07216235995292664,
0.06004679203033447,
0.08656040579080582,
0.33732128143310547,
-0.39760297536849976,
0.5656059384346008,
-0.12853969633579254,
-0.12974652647972107,
-0.21182572841644287,
0.29650765657424927,
-0.19170600175857544,
-0.10116580128669739,
0.16877323389053345,
-0.029355445876717567,
0.20294100046157837,
0.008808963932096958,
0.0419841893017292,
0.05326273292303085,
0.479646235704422,
0.266885906457901,
0.008674927055835724,
-0.28264153003692627,
0.16293965280056,
-0.4658963978290558,
-0.006056986749172211,
0.032375089824199677,
-0.07309704273939133,
0.14450670778751373,
0.17489486932754517,
-0.2486811876296997,
-0.04339480400085449,
0.15311163663864136,
0.2683933973312378,
0.05559995025396347,
0.058425020426511765,
-0.29095005989074707,
-0.3465755581855774,
0.1775260716676712,
0.16739068925380707,
-0.21817468106746674,
-0.4440687298774719,
0.14695464074611664,
-0.054494552314281464,
0.06790272891521454,
0.1458621323108673,
0.03533376753330231,
0.19121818244457245,
-0.2551785707473755,
0.35568615794181824,
0.052331604063510895,
0.44057750701904297,
0.02448403090238571,
-0.1333577185869217,
-0.29518309235572815,
-0.23603111505508423,
-0.3728005886077881,
0.1870766282081604,
0.08341445028781891,
0.3614385724067688,
-0.1218029111623764,
-0.028435271233320236,
-0.3953322172164917,
0.19564588367938995,
-0.14134570956230164,
-0.04205929860472679,
-0.38418230414390564,
0.2556178569793701,
-0.2118600308895111,
0.26184114813804626,
0.201564759016037,
-0.06193330138921738,
-0.11439704895019531,
0.39904576539993286,
-0.2590106725692749,
-0.2352011799812317,
0.3666348457336426,
0.07438530027866364,
-0.3818327784538269,
-0.09158109873533249,
0.2076113224029541,
-0.2440042793750763,
0.036632392555475235,
-0.4468696117401123,
0.16647258400917053,
0.3568952679634094,
-0.1742916703224182,
-0.0918053686618805,
0.22194664180278778,
0.2074182778596878,
0.06584092974662781,
-0.053753457963466644,
0.24552035331726074,
-0.025260914117097855,
-0.057251736521720886,
-0.03693097457289696,
-0.08477187901735306
] |
https://github.com/huggingface/datasets/issues/4942 | Trec Dataset has incorrect labels | Thanks for reporting, @wmpauli.
Indeed we recently fixed this issue:
- #4801
The fix will be accessible after our next library release. In the meantime, you can have it by passing `revision="main"` to `load_dataset`. | ## Describe the bug
Both coarse and fine labels seem to be out of line.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = "trec"
raw_datasets = load_dataset(dataset)
df = pd.DataFrame(raw_datasets["test"])
df.head()
```
## Expected results
text (string) | coarse_label (class label) | fine_label (class label)
-- | -- | --
How far is it from Denver to Aspen ? | 5 (NUM) | 40 (NUM:dist)
What county is Modesto , California in ? | 4 (LOC) | 32 (LOC:city)
Who was Galileo ? | 3 (HUM) | 31 (HUM:desc)
What is an atom ? | 2 (DESC) | 24 (DESC:def)
When did Hawaii become a state ? | 5 (NUM) | 39 (NUM:date)
## Actual results
index | label-coarse |label-fine | text
-- |-- | -- | --
0 | 4 | 40 | How far is it from Denver to Aspen ?
1 | 5 | 21 | What county is Modesto , California in ?
2 | 3 | 12 | Who was Galileo ?
3 | 0 | 7 | What is an atom ?
4 | 4 | 8 | When did Hawaii become a state ?
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-1086-azure-x86_64-with-glibc2.27
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 34 | Trec Dataset has incorrect labels
## Describe the bug
Both coarse and fine labels seem to be out of line.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = "trec"
raw_datasets = load_dataset(dataset)
df = pd.DataFrame(raw_datasets["test"])
df.head()
```
## Expected results
text (string) | coarse_label (class label) | fine_label (class label)
-- | -- | --
How far is it from Denver to Aspen ? | 5 (NUM) | 40 (NUM:dist)
What county is Modesto , California in ? | 4 (LOC) | 32 (LOC:city)
Who was Galileo ? | 3 (HUM) | 31 (HUM:desc)
What is an atom ? | 2 (DESC) | 24 (DESC:def)
When did Hawaii become a state ? | 5 (NUM) | 39 (NUM:date)
## Actual results
index | label-coarse |label-fine | text
-- |-- | -- | --
0 | 4 | 40 | How far is it from Denver to Aspen ?
1 | 5 | 21 | What county is Modesto , California in ?
2 | 3 | 12 | Who was Galileo ?
3 | 0 | 7 | What is an atom ?
4 | 4 | 8 | When did Hawaii become a state ?
## Environment info
- `datasets` version: 2.4.0
- Platform: Linux-5.4.0-1086-azure-x86_64-with-glibc2.27
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Thanks for reporting, @wmpauli.
Indeed we recently fixed this issue:
- #4801
The fix will be accessible after our next library release. In the meantime, you can have it by passing `revision="main"` to `load_dataset`. | [
0.08693256974220276,
-0.10107605159282684,
0.0030672587454319,
0.5229552984237671,
0.2834128141403198,
0.07323778420686722,
0.3199666738510132,
0.05552397668361664,
-0.29809725284576416,
0.10409139096736908,
-0.20085760951042175,
0.49746957421302795,
0.24275170266628265,
0.07898593693971634,
-0.17296607792377472,
-0.12485061585903168,
-0.005589142441749573,
-0.1828533113002777,
0.04423482343554497,
-0.16073855757713318,
-0.20377366244792938,
0.1035754382610321,
-0.23016688227653503,
0.0732559859752655,
-0.34560897946357727,
-0.21764342486858368,
0.06838227808475494,
0.15777313709259033,
0.20887771248817444,
-0.4064179062843323,
0.3807419538497925,
-0.136345773935318,
0.13671015202999115,
0.43844881653785706,
-0.00011061685654567555,
-0.21566542983055115,
-0.018341921269893646,
-0.13153328001499176,
0.1243722140789032,
0.2058502435684204,
-0.04459227994084358,
-0.11131911724805832,
-0.02450535260140896,
-0.13065339624881744,
-0.2101399302482605,
0.0977582335472107,
-0.45160728693008423,
-0.20148968696594238,
-0.16820462048053741,
0.3894478976726532,
0.23988555371761322,
-0.2489636391401291,
-0.06866871565580368,
-0.11692932993173599,
0.3068424165248871,
-0.07739001512527466,
-0.18098129332065582,
0.05090692639350891,
0.0036370083689689636,
-0.033059217035770416,
0.12574076652526855,
0.3433876931667328,
-0.17554552853107452,
-0.05135318264365196,
0.2590237855911255,
0.11211652308702469,
0.16650453209877014,
-0.3682415783405304,
0.11995239555835724,
0.3790288269519806,
0.5527565479278564,
-0.29974329471588135,
-0.3505377769470215,
-0.05483302101492882,
-0.12430525571107864,
-0.5666480660438538,
0.047989509999752045,
-0.11652879416942596,
0.24559921026229858,
0.22582995891571045,
-0.03582373633980751,
0.16924208402633667,
-0.11496888101100922,
0.06640227884054184,
-0.21607866883277893,
0.19189247488975525,
-0.10162327438592911,
-0.09463807195425034,
-0.17466215789318085,
-0.08453038334846497,
0.3603804111480713,
0.1464340090751648,
-0.15706919133663177,
0.0629914402961731,
-0.2558094263076782,
-0.12722665071487427,
-0.17784574627876282,
-0.1467539370059967,
-0.04297381639480591,
0.3258468508720398,
0.12957677245140076,
-0.20648017525672913,
-0.2129984050989151,
0.002338673919439316,
-0.11636607348918915,
0.38515517115592957,
0.23428261280059814,
0.46812570095062256,
0.12213806807994843,
-0.23765379190444946,
0.14735589921474457,
-0.018634576350450516,
0.0523744598031044,
-0.047354746609926224,
0.39993277192115784,
0.17353606224060059,
-0.12072121351957321,
-0.43101999163627625,
-0.35671839118003845,
0.3380594551563263,
-0.43635597825050354,
0.20204554498195648,
-0.11750323325395584,
0.19984471797943115,
-0.018777314573526382,
0.2706466317176819,
-0.22550050914287567,
0.12076187133789062,
0.09138911217451096,
0.09355132281780243,
-0.20407922565937042,
-0.01701444387435913,
0.016725752502679825,
0.020670469850301743,
0.21428953111171722,
-0.2835375666618347,
0.3020626902580261,
0.1896851360797882,
-0.046652667224407196,
-0.31384867429733276,
-0.41023480892181396,
-0.2696640193462372,
0.0983414575457573,
0.22094744443893433,
-0.31895947456359863,
0.28840988874435425,
0.14455446600914001,
-0.4029614329338074,
-0.09421546012163162,
0.08618451654911041,
-0.5715774297714233,
0.05861225351691246,
0.001536879688501358,
0.20132718980312347,
0.3353648781776428,
-0.32719695568084717,
0.20010748505592346,
0.018773119896650314,
0.3508179187774658,
0.010881483554840088,
0.25560081005096436,
-0.3617015480995178,
-0.22623541951179504,
-0.16901247203350067,
0.1354331076145172,
0.08688651770353317,
-0.7663571238517761,
0.040054090321063995,
-0.11980071663856506,
0.5039553642272949,
0.2759874761104584,
0.37770187854766846,
0.3597184419631958,
0.07266964018344879,
0.0676204189658165,
0.016610756516456604,
-0.20615684986114502,
-0.5791128873825073,
-0.09280246496200562,
-0.04403115436434746,
0.2945359945297241,
-0.08685965836048126,
-0.1723107099533081,
-0.08585505932569504,
0.41233929991722107,
0.03728746995329857,
0.5959240198135376,
0.015425379388034344,
-0.004028039053082466,
-0.04977572709321976,
-0.4196401834487915,
0.04817940294742584,
-0.03283843398094177,
0.1561325043439865,
0.1329062581062317,
0.11161404848098755,
0.06183720380067825,
-0.3978278636932373,
0.32380902767181396,
0.1515343338251114,
-0.1600881665945053,
0.39971446990966797,
0.20502828061580658,
0.06127126142382622,
0.10013145953416824,
-0.12455398589372635,
-0.23724785447120667,
0.05249638110399246,
0.33481889963150024,
0.27096226811408997,
0.353893518447876,
-0.09181694686412811,
-0.42355334758758545,
-0.12604697048664093,
0.046416621655225754,
-0.0541984923183918,
0.11529916524887085,
-0.16157914698123932,
-0.04211039841175079,
0.05848928913474083,
0.07315082848072052,
-0.014947988092899323,
0.021328585222363472,
0.2629797160625458,
0.3551555871963501,
0.13888177275657654,
-0.059553392231464386,
0.026737123727798462,
-0.1487121433019638,
0.1114337146282196,
0.4566039443016052,
0.111030213534832,
-0.14217612147331238,
0.4176858961582184,
0.4273070693016052,
-0.3563239574432373,
-0.24194294214248657,
0.2659442722797394,
0.23673737049102783,
-0.14462357759475708,
-0.10170849412679672,
0.08544051647186279,
-0.01599901169538498,
0.04985899478197098,
0.02013496309518814,
0.4388805627822876,
-0.309605211019516,
0.12110189348459244,
-0.16043265163898468,
-0.04440838471055031,
0.27555325627326965,
-0.14808672666549683,
0.2686071991920471,
-0.23178032040596008,
0.39329323172569275,
-0.038499616086483,
0.12263031303882599,
0.05471713840961456,
-0.3402741253376007,
0.26835334300994873,
0.13935460150241852,
-0.02364763244986534,
-0.007046118378639221,
0.004643276333808899,
-0.22852924466133118,
0.27518364787101746,
0.19871361553668976,
0.2849297523498535,
0.0640556663274765,
0.32738611102104187,
-0.33434396982192993,
0.005143085494637489,
-0.24060162901878357,
-0.13222339749336243,
0.09588084369897842,
0.23731066286563873,
0.49524956941604614,
0.1723950207233429,
0.20005564391613007,
0.10932225733995438,
-0.08377058804035187,
-0.12774558365345,
-0.06214270740747452,
0.28474161028862,
-0.4199192523956299,
0.32010382413864136,
-0.1287028193473816,
-0.13121670484542847,
-0.07693672180175781,
-0.6682890057563782,
-0.31841781735420227,
-0.3593108057975769,
0.11029291898012161,
-0.06782273948192596,
-0.0637354776263237,
0.1527436077594757,
-0.2051592469215393,
0.028623566031455994,
0.02959962747991085,
-0.15820768475532532,
-0.1382218301296234,
-0.18458342552185059,
-0.3047628700733185,
0.0629846602678299,
-0.1867869645357132,
-0.021158304065465927,
0.02523219771683216,
-0.05314061790704727,
-0.0021635405719280243,
0.15203757584095,
-0.4399126172065735,
0.2047046273946762,
-0.011284496635198593,
0.21284188330173492,
-0.20030906796455383,
-0.25560927391052246,
-0.07153090834617615,
0.086850106716156,
-0.0062708985060453415,
-0.03237327188253403,
0.2099670022726059,
-0.12208282947540283,
-0.04032016545534134,
-0.08381345868110657,
-0.042280908674001694,
-0.6165705323219299,
-0.3627505600452423,
-0.10992495715618134,
-0.10623805224895477,
0.0956631749868393,
0.37295687198638916,
0.2838079333305359,
-0.3694387972354889,
-0.22097939252853394,
-0.12288442254066467,
0.0698329284787178,
-0.3279723823070526,
-0.06538379192352295,
0.022182647138834,
-0.16553065180778503,
-0.08928295969963074,
-0.17910686135292053,
0.030762463808059692,
-0.008866623044013977,
-0.1886550784111023,
-0.21519488096237183,
-0.03013136237859726,
-0.19800227880477905,
0.2587796151638031,
-0.0378834530711174,
-0.2077019065618515,
0.10673419386148453,
0.07264669984579086,
-0.09626695513725281,
-0.12493923306465149,
-0.2598671019077301,
0.27191638946533203,
0.16753774881362915,
0.031671665608882904,
-0.2894343435764313,
0.2316582202911377,
-0.2544337511062622,
0.1092861145734787,
0.059463780373334885,
-0.0569600947201252,
0.03437625244259834,
-0.1498071551322937,
0.22407853603363037,
0.08797883242368698,
-0.10844258964061737,
0.026808982715010643,
0.08301926404237747,
-0.26844358444213867,
0.32184189558029175,
0.22086256742477417,
-0.05962865799665451,
-0.01705087535083294,
0.37629783153533936,
-0.13852465152740479,
-0.1563483029603958,
-0.24562139809131622,
0.22951461374759674,
0.02009744569659233,
0.14023549854755402,
0.4242234230041504,
-0.029909539967775345,
-0.37888410687446594,
0.09535372257232666,
-0.08135461807250977,
-0.18205109238624573,
-0.03999372944235802,
-0.08505459129810333,
0.10339754819869995,
-0.25008711218833923,
0.046551309525966644,
0.32235822081565857,
0.27854493260383606,
-0.18451818823814392,
0.0913069024682045,
-0.18399964272975922,
0.34600988030433655,
0.3806968927383423,
-0.4481096565723419,
0.028161142021417618,
0.27018821239471436,
0.29022306203842163,
-0.14118489623069763,
-0.2214273363351822,
-0.23350739479064941,
-0.2571808099746704,
0.780316174030304,
0.28674596548080444,
0.05257517844438553,
0.08213812112808228,
0.09560982882976532,
0.06940505653619766,
-0.2111731618642807,
-0.08049659430980682,
-0.0651545524597168,
0.0019928328692913055,
0.08585857599973679,
-0.026148170232772827,
0.13223332166671753,
0.2229461520910263,
-0.20595718920230865,
-0.006020933389663696,
0.06289110332727432,
-0.016403090208768845,
0.19530875980854034,
0.11437098681926727,
0.29199761152267456,
-0.12332858145236969,
0.08256031572818756,
-0.09945827722549438,
0.2702796459197998,
0.4314867854118347,
0.4805485010147095,
-0.3954891264438629,
-0.16877657175064087,
-0.1085001602768898,
-0.34785932302474976,
0.4016910493373871,
-0.04088941216468811,
0.1362391710281372,
0.04072093963623047,
-0.4058310091495514,
0.14045822620391846,
-0.16182081401348114,
0.06280551105737686,
-0.0655781552195549,
0.2233327180147171,
-0.5437337756156921,
-0.3540302813053131,
0.5199688076972961,
-0.007992318831384182,
-0.09399721026420593,
0.05331319943070412,
0.15103916823863983,
-0.3924207389354706,
0.47991418838500977,
0.004977516829967499,
0.7379341721534729,
-0.1034102588891983,
-0.09938323497772217,
-0.04123237729072571,
-0.0730355829000473,
0.5455004572868347,
-0.13596461713314056,
0.08361723273992538,
-0.5471171736717224,
-0.5870274305343628,
-0.11433571577072144,
0.12878639996051788,
-0.3098387122154236,
0.11317284405231476,
-0.14945875108242035,
0.47426390647888184,
-0.2071785181760788,
-0.0823790431022644,
0.02695448137819767,
-0.3853556215763092,
0.5328437089920044,
-0.141923725605011,
-0.09878315776586533,
0.12077398598194122,
-0.10788209736347198,
0.1413067877292633,
-0.06529403477907181,
0.1510857492685318,
-0.1901804655790329,
0.06478824466466904,
-0.2835175096988678,
0.11948012560606003,
-0.14339976012706757,
-0.1088864803314209,
0.062484025955200195,
-0.24542680382728577,
-0.048532191663980484,
-0.09595295786857605,
0.34779828786849976,
0.13138404488563538,
-0.10048821568489075,
0.03897054120898247,
0.3814462125301361,
0.19989678263664246,
0.4147818088531494,
0.0535622164607048,
0.4394706189632416,
0.08695337921380997,
-0.0026653409004211426,
0.10983776301145554,
0.11613740026950836,
-0.08785028755664825,
-0.18118491768836975,
-0.24262849986553192,
0.036235511302948,
-0.2166854441165924,
0.21905575692653656,
-0.1486140638589859,
0.22557762265205383,
-0.38236749172210693,
0.140927255153656,
0.017523054033517838,
0.13670867681503296,
0.19081614911556244,
0.17780083417892456,
-0.48004838824272156,
-0.20926280319690704,
0.26112082600593567,
-0.110911063849926,
-0.00009169802069664001,
0.04690421372652054,
0.4800366759300232,
-0.2481345683336258,
-0.19176316261291504,
0.19834110140800476,
-0.028746526688337326,
-0.5246684551239014,
-0.0033780336380004883,
-0.05978092923760414,
-0.012499496340751648,
0.17238213121891022,
0.366868793964386,
0.26871800422668457,
0.07033892720937729,
-0.15140613913536072,
-0.389168381690979,
-0.14364349842071533,
-0.031266309320926666,
0.28005123138427734,
0.018654830753803253,
0.057408154010772705,
0.06415241211652756,
-0.1895236223936081,
-0.004058860242366791,
-0.3200024366378784,
-0.11543169617652893,
-0.002103833481669426,
0.00561177171766758,
-0.285401314496994,
0.18741118907928467,
0.1526312232017517,
-0.04881979152560234,
0.15003037452697754,
-0.09969539940357208,
0.170516699552536,
-0.1263038069009781,
-0.2772716283798218,
0.09306580573320389,
0.17976224422454834,
-0.11347867548465729,
-0.12532435357570648,
0.0366293340921402,
-0.19781170785427094,
-0.24116617441177368,
0.10286489129066467,
0.30101147294044495,
0.12412600219249725,
0.2764975428581238,
-0.42208558320999146,
0.08527358621358871,
-0.047868818044662476,
0.11247886717319489,
0.15094393491744995,
0.006407923996448517,
0.08357026427984238,
0.292024165391922,
-0.16103193163871765,
-0.04851977527141571,
-0.15245474874973297,
0.07678870856761932,
-0.3264594078063965,
-0.2614295184612274,
0.23425966501235962,
-0.4364013075828552,
0.028285037726163864,
0.5590919256210327,
0.3816886246204376,
-0.20764502882957458,
-0.025092748925089836,
-0.13257773220539093,
0.10965453088283539,
0.3009518086910248,
-0.27947816252708435,
-0.17276529967784882,
-0.36758098006248474,
0.1309947371482849,
0.03536650165915489,
0.35502225160598755,
-0.07124461233615875,
-0.20467442274093628,
-0.426385760307312,
0.08756960928440094,
0.4046667218208313,
-0.14328467845916748,
0.22637319564819336,
0.4886178970336914,
0.07606153190135956,
0.13840579986572266,
0.5810800194740295,
-0.1760151982307434,
-0.018479935824871063,
0.5500831007957458,
0.3777426779270172,
0.22253483533859253,
0.23974543809890747,
-0.047508370131254196,
0.1107284426689148,
-0.15194271504878998,
0.1917697936296463,
0.20916056632995605,
-0.1536659300327301,
0.17198814451694489,
0.13286112248897552,
0.031003549695014954,
-0.09090807288885117,
-0.18215502798557281,
-0.4887303113937378,
-0.10747024416923523,
-0.22467991709709167,
-0.08865265548229218,
0.28136008977890015,
-0.27624690532684326,
0.3474659323692322,
-0.02414746768772602,
-0.2051282525062561,
-0.14082090556621552,
0.3371347188949585,
-0.02765601873397827,
-0.30179405212402344,
-0.4428035616874695,
-0.32840290665626526,
0.09948894381523132,
0.2957105338573456,
-0.14848653972148895,
0.06137681007385254,
0.12944549322128296,
-0.3177213668823242,
-0.04709145799279213,
0.052567772567272186,
0.37458109855651855,
0.20088188350200653,
0.27529147267341614,
-0.3467644453048706,
-0.07226324081420898,
0.03494122624397278,
0.32653987407684326,
0.19145344197750092,
0.12782591581344604,
0.03675365447998047,
0.2478872686624527,
0.13260158896446228,
-0.16764713823795319,
0.12665799260139465,
0.16034525632858276,
0.36590251326560974,
0.02610647678375244,
0.5957996249198914,
0.041546307504177094,
-0.22248291969299316,
-0.08405640721321106,
0.13174888491630554,
0.08911461383104324,
0.16261020302772522,
0.3648175597190857,
0.03473259136080742,
0.1986018717288971,
0.12227489799261093,
0.1186932772397995,
-0.03467101603746414,
0.17014722526073456,
0.3124960660934448,
-0.053011275827884674,
-0.252788245677948,
0.18403305113315582,
-0.06919866800308228,
0.10724273324012756,
-0.08210428059101105,
0.04033011198043823,
0.15625260770320892,
-0.13939659297466278,
0.11906242370605469,
0.009886277839541435,
0.09716349840164185,
0.07665249705314636,
0.20880842208862305,
0.13087868690490723,
-0.4294984042644501,
0.11817094683647156,
-0.17763055860996246,
-0.024709736928343773,
0.09497452527284622,
-0.3298839032649994,
-0.0005423203110694885,
-0.35842567682266235,
0.03707926720380783,
-0.17747676372528076,
0.2779313325881958,
0.11867550015449524,
0.1273309886455536,
0.13164788484573364,
0.03410300612449646,
0.5603227615356445,
-0.00694744847714901,
0.09230364859104156,
-0.06554719805717468,
-0.4661986827850342,
-0.3842763900756836,
0.18585455417633057,
-0.0917225182056427,
0.07787885516881943,
0.24069663882255554,
-0.44008007645606995,
-0.05724499747157097,
0.21932682394981384,
0.21475176513195038,
0.15908366441726685,
-0.28040969371795654,
0.11766517907381058,
0.005459479987621307,
-0.24650150537490845,
0.2039053738117218,
-0.05501594394445419,
0.24225038290023804,
0.353302001953125,
0.08287082612514496,
-0.7252622246742249,
0.46077629923820496,
-0.021066874265670776,
0.13334769010543823,
-0.2721945345401764,
0.43864506483078003,
0.5035674571990967,
-0.3056427538394928,
-0.3921234607696533,
-0.05342058464884758,
0.4108886420726776,
-0.029425185173749924,
-0.4579264521598816,
0.08997805416584015,
-0.3788101077079773,
-0.022713538259267807,
0.05375521257519722,
0.3156191110610962,
0.1549297273159027,
-0.44307786226272583,
-0.05628884956240654,
-0.04539435729384422
] |
https://github.com/huggingface/datasets/issues/4936 | vivos (Vietnamese speech corpus) dataset not accessible | If you need an example of a small audio datasets, I just created few hours ago a speech dataset with only 300MB of compressed audio files https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia. It works also with streaming (@albertvillanova helped me adding this functionality) :-) | ## Describe the bug
VIVOS data is not accessible anymore, neither of these links work (at least from France):
* https://ailab.hcmus.edu.vn/assets/vivos.tar.gz (data)
* https://ailab.hcmus.edu.vn/vivos (dataset page)
Therefore `load_dataset` doesn't work.
## Steps to reproduce the bug
```python
ds = load_dataset("vivos")
```
## Expected results
dataset loaded
## Actual results
```
ConnectionError: Couldn't reach https://ailab.hcmus.edu.vn/assets/vivos.tar.gz (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='ailab.hcmus.edu.vn', port=443): Max retries exceeded with url: /assets/vivos.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9d8a27d190>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))")))
```
Will try to contact the authors, as we wanted to use Vivos as an example in documentation on how to create scripts for audio datasets (https://github.com/huggingface/datasets/pull/4872), because it's small and straightforward and uses tar archives. | 39 | vivos (Vietnamese speech corpus) dataset not accessible
## Describe the bug
VIVOS data is not accessible anymore, neither of these links work (at least from France):
* https://ailab.hcmus.edu.vn/assets/vivos.tar.gz (data)
* https://ailab.hcmus.edu.vn/vivos (dataset page)
Therefore `load_dataset` doesn't work.
## Steps to reproduce the bug
```python
ds = load_dataset("vivos")
```
## Expected results
dataset loaded
## Actual results
```
ConnectionError: Couldn't reach https://ailab.hcmus.edu.vn/assets/vivos.tar.gz (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='ailab.hcmus.edu.vn', port=443): Max retries exceeded with url: /assets/vivos.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9d8a27d190>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))")))
```
Will try to contact the authors, as we wanted to use Vivos as an example in documentation on how to create scripts for audio datasets (https://github.com/huggingface/datasets/pull/4872), because it's small and straightforward and uses tar archives.
If you need an example of a small audio datasets, I just created few hours ago a speech dataset with only 300MB of compressed audio files https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia. It works also with streaming (@albertvillanova helped me adding this functionality) :-) | [
-0.12232273817062378,
0.14369362592697144,
-0.0691683292388916,
0.15893080830574036,
0.2553069591522217,
-0.26797589659690857,
0.19797638058662415,
0.3506035804748535,
-0.1846996694803238,
0.22698798775672913,
-0.5419899821281433,
-0.1145104393362999,
0.05729388818144798,
-0.14273783564567566,
0.15122807025909424,
-0.27857330441474915,
0.012529067695140839,
-0.054154589772224426,
0.009760282933712006,
-0.1412281095981598,
-0.15872418880462646,
0.1094319224357605,
-0.18415740132331848,
0.14369115233421326,
0.3135446310043335,
-0.014460189267992973,
-0.1317014843225479,
-0.0926540419459343,
-0.11771424859762192,
-0.6107019186019897,
0.010592212900519371,
-0.045543599873781204,
0.35998818278312683,
0.5276345014572144,
-0.00011025659478036687,
-0.02718145027756691,
0.45969337224960327,
-0.12760546803474426,
-0.37232524156570435,
-0.2543933391571045,
-0.0887678861618042,
-0.06759456545114517,
-0.36438167095184326,
-0.07932228595018387,
-0.17109337449073792,
-0.3681342899799347,
0.1344161331653595,
-0.5946080684661865,
0.048205677419900894,
0.5694127082824707,
0.17399801313877106,
0.3635675013065338,
0.1430981457233429,
-0.19611036777496338,
0.3674984872341156,
-0.2511330246925354,
-0.07310928404331207,
0.16071653366088867,
0.5019450187683105,
0.05803494155406952,
0.009813718497753143,
0.2978006899356842,
-0.3163353502750397,
-0.0652933269739151,
-0.08508782833814621,
-0.16931067407131195,
-0.05889808386564255,
-0.3660919666290283,
0.20870324969291687,
0.34394797682762146,
0.7938064932823181,
-0.13088396191596985,
-0.6145313382148743,
0.15837335586547852,
0.16270339488983154,
-0.36387899518013,
0.14907076954841614,
0.2526529133319855,
-0.047730013728141785,
0.2814565598964691,
-0.10959203541278839,
-0.04966813698410988,
-0.234660804271698,
0.6008469462394714,
0.08418013155460358,
-0.23778510093688965,
-0.19557563960552216,
0.01978364586830139,
-0.18822573125362396,
-0.3688129186630249,
-0.06137361750006676,
-0.1963740885257721,
-0.12603871524333954,
0.39739978313446045,
-0.26410627365112305,
0.12648743391036987,
0.16848453879356384,
0.12251725792884827,
0.2342287302017212,
0.13098883628845215,
0.17351457476615906,
0.026234032586216927,
-0.2955147624015808,
0.035113029181957245,
0.15196886658668518,
0.0508415512740612,
-0.25468069314956665,
-0.08459325134754181,
0.45920801162719727,
0.27974042296409607,
0.19472965598106384,
-0.13275796175003052,
-0.264117956161499,
-0.21692457795143127,
-0.17906847596168518,
0.06436719000339508,
0.19290348887443542,
-0.2861593961715698,
-0.1771744042634964,
0.1683402955532074,
-0.04201045632362366,
0.06290993839502335,
-0.15475279092788696,
0.37207284569740295,
-0.3148013949394226,
0.21593621373176575,
0.23880209028720856,
0.47918111085891724,
-0.08199577033519745,
-0.2247457206249237,
-0.06705538928508759,
0.017875825986266136,
-0.22533029317855835,
0.01277119293808937,
0.29015493392944336,
-0.4053425192832947,
0.052601926028728485,
-0.026799868792295456,
0.05951029434800148,
-0.2241373509168625,
0.03564409911632538,
-0.24799777567386627,
0.20188464224338531,
0.29265716671943665,
0.24167963862419128,
0.19583134353160858,
0.1112954169511795,
-0.06797751784324646,
-0.09415044635534286,
-0.006898514926433563,
-0.26658910512924194,
-0.29220500588417053,
-0.20706641674041748,
0.16084514558315277,
-0.13304713368415833,
0.24827951192855835,
-0.20039144158363342,
0.16594401001930237,
-0.00943349301815033,
-0.3205659091472626,
-0.08843130618333817,
0.10988616943359375,
-0.2502460181713104,
-0.23953095078468323,
0.31130096316337585,
0.16963165998458862,
-0.12411196529865265,
0.1022159606218338,
-0.3078337609767914,
0.02505994215607643,
0.11911182105541229,
0.5372307896614075,
-0.05400633439421654,
0.22614005208015442,
-0.32509127259254456,
0.07949092984199524,
0.450234055519104,
-0.44165727496147156,
-0.6647380590438843,
0.21979543566703796,
0.02032618224620819,
-0.003238968551158905,
0.06473176181316376,
-0.06674740463495255,
0.5205726623535156,
-0.10471394658088684,
0.41138526797294617,
0.4701724648475647,
0.2901722490787506,
-0.011064484715461731,
-0.10123218595981598,
-0.2672508955001831,
0.046785466372966766,
0.024124521762132645,
0.14977557957172394,
0.2220216691493988,
0.263848215341568,
-0.06685031205415726,
0.40869081020355225,
0.036094631999731064,
0.19373852014541626,
0.21748942136764526,
0.03661392256617546,
0.1364661157131195,
0.14566290378570557,
-0.1948733627796173,
0.26878878474235535,
0.16103214025497437,
0.12600946426391602,
0.12854361534118652,
-0.12726134061813354,
-0.044291675090789795,
-0.3066599667072296,
-0.05500157177448273,
0.1358714997768402,
0.015266166999936104,
0.14453694224357605,
0.34551188349723816,
0.1908896565437317,
0.3364815413951874,
-0.17207472026348114,
-0.0904860869050026,
0.042733125388622284,
-0.09522303193807602,
-0.40169060230255127,
0.40747833251953125,
-0.022577019408345222,
-0.07274817675352097,
0.09405733644962311,
0.18450912833213806,
0.21961340308189392,
-0.06134979799389839,
-0.07646814733743668,
0.3316570222377777,
0.21606135368347168,
0.1969500482082367,
-0.2195642590522766,
0.13532550632953644,
0.06507455557584763,
-0.4098097085952759,
0.367511510848999,
0.3735981285572052,
0.29026058316230774,
0.1332283318042755,
-0.16889312863349915,
0.09976745396852493,
0.30642688274383545,
0.16697606444358826,
0.26023900508880615,
0.07088290899991989,
0.3407619595527649,
0.008517514914274216,
-0.3078504800796509,
0.004855737090110779,
0.31517961621284485,
-0.1432296484708786,
-0.13459749519824982,
-0.055072009563446045,
-0.31117716431617737,
-0.08019166439771652,
-0.007838208228349686,
-0.27348262071609497,
0.16750392317771912,
0.08965253084897995,
-0.2252412736415863,
-0.14358940720558167,
0.07981707155704498,
0.03788047656416893,
0.27479374408721924,
0.1797168254852295,
0.18275125324726105,
-0.17299699783325195,
0.06976345926523209,
-0.28022876381874084,
0.10822177678346634,
0.19320297241210938,
-0.18604427576065063,
0.37402603030204773,
0.23502859473228455,
0.14643289148807526,
-0.36122798919677734,
-0.13294453918933868,
-0.0695287212729454,
0.04728901386260986,
-0.13062043488025665,
0.047853611409664154,
-0.19906383752822876,
-0.38637301325798035,
0.20036016404628754,
-0.044080257415771484,
0.000653659924864769,
-0.09591054916381836,
-0.07791853696107864,
0.16624832153320312,
0.0006458424031734467,
0.24995042383670807,
-0.08700081706047058,
0.2342759221792221,
-0.03223055601119995,
0.08223804086446762,
0.1370328962802887,
-0.026663988828659058,
-0.07359873503446579,
0.09132902324199677,
0.035254284739494324,
-0.15386059880256653,
0.08666208386421204,
-0.045621324330568314,
-0.1721687763929367,
-0.5123758912086487,
-0.07368462532758713,
0.05945781618356705,
0.21708109974861145,
0.20800212025642395,
-0.11162522435188293,
0.2996678054332733,
0.2968156933784485,
-0.15879103541374207,
0.127719908952713,
0.000035842880606651306,
-0.010468177497386932,
0.26151418685913086,
-0.004497764632105827,
-0.051139190793037415,
0.08724351227283478,
-0.3137475252151489,
-0.2873147130012512,
-0.49306318163871765,
0.040968455374240875,
-0.004743462428450584,
0.09275080263614655,
0.179609015583992,
0.04481511563062668,
0.06430114805698395,
0.35691437125205994,
0.19163380563259125,
-0.42812052369117737,
-0.30824095010757446,
0.4604731798171997,
-0.3704591989517212,
-0.5648407340049744,
-0.17194585502147675,
-0.14552992582321167,
0.4561314284801483,
0.32658612728118896,
-0.6274271607398987,
0.471019446849823,
-0.12188185751438141,
0.02026987448334694,
0.09245389699935913,
0.06554186344146729,
-0.03181357681751251,
-0.1623217761516571,
-0.08740084618330002,
-0.15100114047527313,
0.008167251944541931,
-0.53277587890625,
0.18027478456497192,
0.302483469247818,
0.08050540089607239,
0.536453366279602,
0.13401392102241516,
0.1717565357685089,
0.14973299205303192,
0.07493022084236145,
0.5374609231948853,
-0.010798243805766106,
0.5249279737472534,
0.022852212190628052,
-0.22290343046188354,
0.4619927406311035,
-0.09367452561855316,
-0.18404285609722137,
0.26105064153671265,
0.15205645561218262,
-0.43550822138786316,
-0.28792208433151245,
-0.15376722812652588,
-0.42421039938926697,
-0.23354297876358032,
0.12346051633358002,
-0.24652686715126038,
0.3259570300579071,
0.22939875721931458,
0.12168698757886887,
-0.22624267637729645,
-0.19021418690681458,
0.07351967692375183,
0.23217225074768066,
0.34972161054611206,
0.13397404551506042,
-0.3294970691204071,
-0.03306570649147034,
-0.4176570773124695,
0.336955189704895,
-0.03693527728319168,
0.6484694480895996,
-0.19732791185379028,
-0.05281197279691696,
0.07230809330940247,
0.13703885674476624,
0.28265058994293213,
-0.4827724099159241,
0.20620359480381012,
0.1863149106502533,
0.3078245222568512,
-0.4376737177371979,
0.012773718684911728,
0.09688952565193176,
-0.08295443654060364,
0.04423792287707329,
0.5489763021469116,
-0.08721509575843811,
0.11950097233057022,
-0.009295392781496048,
0.33327075839042664,
-0.05544230714440346,
0.013759470544755459,
-0.16434922814369202,
-0.3893473446369171,
-0.24046501517295837,
-0.13756659626960754,
0.07782118022441864,
0.1949264258146286,
-0.052379854023456573,
-0.159401535987854,
-0.08842075616121292,
0.26573872566223145,
0.26132476329803467,
0.17172087728977203,
0.042111530900001526,
0.2972816228866577,
0.14836202561855316,
0.09382607042789459,
-0.11663341522216797,
0.11173941195011139,
0.4269696772098541,
-0.15855278074741364,
-0.3563956916332245,
0.17120912671089172,
-0.07488422095775604,
0.14853529632091522,
0.36248067021369934,
-0.056290555745363235,
0.10693305730819702,
0.19689829647541046,
0.1042279377579689,
-0.42551490664482117,
0.08277914673089981,
0.3193797171115875,
-0.06292272359132767,
-0.6125922203063965,
-0.6133826375007629,
0.19557985663414001,
-0.06790764629840851,
-0.2892759442329407,
0.1193913072347641,
0.04167834296822548,
-0.08313147723674774,
0.5216734409332275,
-0.2458174228668213,
1.0205883979797363,
-0.0918441116809845,
0.12899795174598694,
0.14611804485321045,
0.21234144270420074,
0.42019402980804443,
-0.3988463282585144,
0.20511169731616974,
0.024427611380815506,
-0.24337010085582733,
-0.116927370429039,
-0.07439129799604416,
0.06431882828474045,
0.12802933156490326,
-0.05410994216799736,
0.2782254219055176,
-0.10715101659297943,
0.052293919026851654,
0.011368608102202415,
0.19295603036880493,
0.015709515661001205,
-0.19921152293682098,
-0.47551411390304565,
0.24631083011627197,
-0.06770113855600357,
0.455562561750412,
0.1815667450428009,
0.009563232772052288,
-0.15272320806980133,
-0.1278793066740036,
-0.4190826416015625,
0.32254037261009216,
-0.09070198237895966,
0.21836914122104645,
-0.24992400407791138,
-0.20268192887306213,
0.062298987060785294,
0.37412944436073303,
0.2086775153875351,
0.4603947103023529,
-0.15959109365940094,
0.16428354382514954,
0.02764774113893509,
-0.1318134367465973,
0.06695911288261414,
-0.06612226366996765,
0.11040950566530228,
0.03321835398674011,
-0.45509421825408936,
0.4611712694168091,
0.11084052175283432,
0.21164582669734955,
0.23740798234939575,
-0.06542287766933441,
0.36650002002716064,
-0.08066914230585098,
-0.03318357467651367,
-0.07571205496788025,
0.013260170817375183,
-0.12500661611557007,
0.13143347203731537,
0.13517551124095917,
-0.2002265304327011,
-0.10364527255296707,
-0.18116775155067444,
-0.07315404713153839,
-0.005700152367353439,
0.692572832107544,
0.09637808799743652,
-0.1119489073753357,
0.18674109876155853,
0.36372819542884827,
-0.21629983186721802,
-0.16464939713478088,
-0.03164180740714073,
-0.10569678246974945,
-0.20219042897224426,
-0.06763529032468796,
-0.019621320068836212,
0.1082489937543869,
-0.331134557723999,
-0.08113445341587067,
0.0762435793876648,
-0.177634596824646,
-0.026540547609329224,
-0.5317115187644958,
-0.25360116362571716,
0.34791862964630127,
0.03115292452275753,
-0.00007034838199615479,
-0.012391045689582825,
-0.3015315532684326,
0.11978393793106079,
-0.03933641314506531,
-0.3045193552970886,
0.09187730401754379,
-0.26050499081611633,
0.20566220581531525,
0.2708538770675659,
-0.002396557480096817,
0.10585193336009979,
-0.29855847358703613,
0.11895425617694855,
-0.3252745270729065,
-0.05389266461133957,
-0.17335233092308044,
-0.41394221782684326,
0.12350241094827652,
0.27120935916900635,
-0.33172523975372314,
-0.01983049511909485,
-0.5696759819984436,
-0.02871902659535408,
-0.23453669250011444,
0.18916547298431396,
0.37132227420806885,
0.04526557773351669,
-0.1646271049976349,
-0.03199939802289009,
-0.1744813621044159,
0.04077712446451187,
0.3103775680065155,
-0.09137015044689178,
0.12633369863033295,
0.1958346962928772,
0.07545442879199982,
0.1976507157087326,
-0.08809937536716461,
-0.34936845302581787,
0.07693150639533997,
0.012321628630161285,
-0.03645743429660797,
0.6336919069290161,
-0.10506197810173035,
0.046177517622709274,
-0.023663053289055824,
0.20661821961402893,
0.10511600226163864,
-0.15934516489505768,
0.029684016481041908,
0.23327535390853882,
0.15103769302368164,
-0.33288511633872986,
-0.2723393142223358,
-0.35695475339889526,
0.059733256697654724,
-0.06324425339698792,
-0.004279769957065582,
-0.061598192900419235,
-0.14736348390579224,
0.05407126992940903,
-0.15342524647712708,
0.35124170780181885,
-0.2727466821670532,
0.12689438462257385,
0.27208659052848816,
0.22827966511249542,
0.05039849504828453,
-0.2004188895225525,
-0.06605963408946991,
-0.04289225488901138,
0.23893386125564575,
-0.05081503838300705,
0.04211786389350891,
0.2701127529144287,
0.07755603641271591,
-0.15736064314842224,
-0.456951379776001,
-0.26055455207824707,
0.22831548750400543,
-0.1992410123348236,
0.1089942455291748,
0.06533882766962051,
-0.06912598758935928,
-0.051484327763319016,
0.13448253273963928,
-0.09324362874031067,
-0.024353008717298508,
0.18482238054275513,
-0.20693658292293549,
-0.22056208550930023,
-0.11354590952396393,
-0.14343257248401642,
-0.1556151658296585,
-0.02495221421122551,
-0.017542056739330292,
0.055223312228918076,
0.2694603204727173,
0.02468443661928177,
-0.3465496003627777,
-0.32270103693008423,
0.26140516996383667,
0.06615348905324936,
-0.2796097695827484,
0.2944486141204834,
0.23690064251422882,
0.19353991746902466,
0.13218294084072113,
0.3988184332847595,
0.6126291155815125,
0.07420656085014343,
0.053021401166915894,
0.19183655083179474,
-0.03561822324991226,
-0.19975611567497253,
-0.09626896679401398,
0.3546816110610962,
0.1621708869934082,
0.07625804096460342,
0.23190025985240936,
0.1711634397506714,
-0.03695424646139145,
0.22475892305374146,
0.031081778928637505,
-0.015468087047338486,
-0.16901057958602905,
0.32017308473587036,
-0.4280474781990051,
-0.13297227025032043,
-0.34050890803337097,
-0.009030751883983612,
-0.5518302321434021,
0.29203176498413086,
0.4427323043346405,
-0.0742773488163948,
0.25387853384017944,
-0.1550230234861374,
0.07222440838813782,
-0.04180488362908363,
0.21944797039031982,
0.5682759881019592,
0.35304269194602966,
-0.21599850058555603,
-0.28928762674331665,
-0.49199622869491577,
0.19470125436782837,
-0.337812602519989,
-0.07779548317193985,
-0.0475345179438591,
0.01622285507619381,
0.159257709980011,
0.22217407822608948,
-0.2555466890335083,
0.0556618869304657,
-0.3855668902397156,
0.3343672454357147,
-0.29181885719299316,
-0.2518533766269684,
0.0004866495728492737,
0.442240834236145,
-0.273242712020874,
-0.34984278678894043,
0.14327459037303925,
-0.06102834641933441,
0.07364985346794128,
-0.03469928726553917,
-0.010140322148799896,
-0.14585299789905548,
0.1503768265247345,
0.39000043272972107,
0.07420830428600311,
0.2083238810300827,
-0.30522793531417847,
-0.12123599648475647,
-0.61185222864151,
-0.28304046392440796,
0.21349512040615082,
0.18701976537704468,
0.10474707186222076,
0.2551095187664032,
-0.1389671117067337,
0.10254736244678497,
-0.11455383896827698,
0.15292513370513916,
-0.07613442093133926,
0.030915116891264915,
0.010176841169595718,
0.14568226039409637,
-0.2449760138988495,
0.15262556076049805,
0.017014030367136,
-0.022711195051670074,
-0.1407998502254486,
-0.006771276704967022,
-0.03749607130885124,
-0.282574862241745,
0.600147008895874,
-0.4499293267726898,
-0.3295406401157379,
-0.1330387145280838,
0.42266133427619934,
0.06212500482797623,
0.13230198621749878,
-0.2294759452342987,
0.28936827182769775,
0.28202271461486816,
0.06031106412410736,
-0.38397225737571716,
-0.05325636640191078,
-0.15172894299030304,
0.005573820322751999,
-0.1605040729045868,
0.29092761874198914,
-0.04025308042764664,
-0.3623248040676117,
-0.008754972368478775,
-0.31340062618255615
] |
https://github.com/huggingface/datasets/issues/4935 | Dataset Viewer issue for ubuntu_dialogs_corpus | The dataset maintainers (https://huggingface.co/datasets/ubuntu_dialogs_corpus) decided to forbid the dataset from being downloaded automatically (https://huggingface.co/docs/datasets/v2.4.0/en/loading#manual-download), and the dataset viewer respects this.
We will try to improve the error display though. Thanks for reporting. | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 32 | Dataset Viewer issue for ubuntu_dialogs_corpus
### Link
_No response_
### Description
_No response_
### Owner
_No response_
The dataset maintainers (https://huggingface.co/datasets/ubuntu_dialogs_corpus) decided to forbid the dataset from being downloaded automatically (https://huggingface.co/docs/datasets/v2.4.0/en/loading#manual-download), and the dataset viewer respects this.
We will try to improve the error display though. Thanks for reporting. | [
-0.31872305274009705,
-0.07901444286108017,
-0.0069214291870594025,
0.24896056950092316,
0.20231448113918304,
0.296213299036026,
0.22899384796619415,
0.23128916323184967,
0.028678596019744873,
0.19641342759132385,
-0.3881252110004425,
0.2583983242511749,
-0.06549358367919922,
0.08649004250764847,
-0.3076934516429901,
-0.22309187054634094,
-0.134850412607193,
-0.005403198301792145,
-0.21672067046165466,
-0.1406496912240982,
-0.19301737844944,
0.16717563569545746,
-0.3430469036102295,
0.18078827857971191,
0.06862381845712662,
-0.2450529932975769,
0.05658722668886185,
0.013669408857822418,
-0.3866037130355835,
-0.5760814547538757,
0.18205055594444275,
0.08279214799404144,
-0.08706652373075485,
0.35821008682250977,
-0.00009887807391351089,
0.013025104999542236,
0.489088773727417,
0.08080565929412842,
-0.5029224753379822,
-0.11477155983448029,
0.017901301383972168,
-0.13314691185951233,
0.28220781683921814,
-0.09117457270622253,
-0.13274675607681274,
-0.24135227501392365,
0.18456660211086273,
0.08921147882938385,
0.07171767950057983,
0.09599598497152328,
0.3522992432117462,
0.4247681796550751,
0.23323480784893036,
-0.385346382856369,
-0.259046345949173,
0.017842162400484085,
-0.23625163733959198,
0.3141503632068634,
0.20252001285552979,
0.386762410402298,
-0.16233962774276733,
0.3936116397380829,
-0.12329751998186111,
0.15447503328323364,
-0.008070304989814758,
-0.20132704079151154,
0.02323256805539131,
-0.36597976088523865,
0.1094314306974411,
0.20280548930168152,
0.9071753025054932,
-0.1641911268234253,
-0.1134817898273468,
-0.11527210474014282,
0.24585863947868347,
0.08699075132608414,
0.12023350596427917,
0.18746443092823029,
-0.10164335370063782,
0.27023646235466003,
-0.2216951996088028,
-0.15080378949642181,
-0.31576651334762573,
0.07129384577274323,
-0.19180108606815338,
-0.19128289818763733,
-0.19394053518772125,
0.03218782693147659,
0.14339669048786163,
-0.12787295877933502,
0.21187925338745117,
-0.03905148059129715,
-0.09531646966934204,
0.029269393533468246,
-0.1946561485528946,
0.02152346819639206,
0.15352970361709595,
0.3162963092327118,
0.2717074155807495,
0.021916119381785393,
0.03140200302004814,
0.08055993169546127,
-0.1288713663816452,
0.18634885549545288,
0.27660059928894043,
-0.12659300863742828,
0.19588345289230347,
0.198104590177536,
0.4142377972602844,
0.23954090476036072,
0.22924360632896423,
0.027968592941761017,
-0.13375359773635864,
-0.39975857734680176,
-0.027254704385995865,
-0.10360469669103622,
0.4123322367668152,
-0.14380015432834625,
-0.13605889678001404,
0.16537202894687653,
-0.02324601821601391,
0.13269133865833282,
0.11329551041126251,
0.3183487057685852,
-0.24614693224430084,
-0.13098129630088806,
0.0785817876458168,
0.05144179239869118,
-0.13292501866817474,
-0.3468083143234253,
-0.22199812531471252,
-0.1046951562166214,
-0.1869802623987198,
-0.13040584325790405,
0.2716166079044342,
-0.3931051790714264,
0.18160827457904816,
0.06443709880113602,
0.2239636480808258,
-0.10135623067617416,
-0.06934300065040588,
-0.08312906324863434,
-0.2642098069190979,
0.38949137926101685,
0.22491124272346497,
0.22628538310527802,
0.26233989000320435,
-0.019541434943675995,
0.03725747764110565,
0.06560208648443222,
-0.14176934957504272,
-0.2863079011440277,
-0.1710393726825714,
0.2963208854198456,
-0.015336516313254833,
-0.05038405954837799,
-0.3342514634132385,
0.055636558681726456,
-0.16869574785232544,
-0.08065581321716309,
-0.07915735989809036,
-0.021253839135169983,
-0.20528841018676758,
-0.2114831656217575,
0.054594121873378754,
0.5288990139961243,
-0.21442636847496033,
-0.03816920891404152,
-0.3080214858055115,
-0.4844615161418915,
-0.12628084421157837,
0.20695261657238007,
-0.14024131000041962,
0.07189138233661652,
-0.5178385972976685,
0.2637229561805725,
0.16540846228599548,
-0.38838478922843933,
-0.5601251125335693,
0.3220488727092743,
-0.05495652183890343,
-0.06943652778863907,
-0.14107397198677063,
-0.0670439675450325,
0.16131791472434998,
-0.21847154200077057,
-0.012405209243297577,
-0.03973633795976639,
0.26678308844566345,
0.09256836026906967,
-0.13083304464817047,
-0.19271810352802277,
-0.23314712941646576,
0.02882978320121765,
0.22218471765518188,
0.24261221289634705,
0.17728778719902039,
-0.17776833474636078,
0.3534092307090759,
0.01913599669933319,
0.042799726128578186,
0.21778199076652527,
0.3783903121948242,
0.11606243252754211,
0.10168740153312683,
-0.12829625606536865,
-0.35362935066223145,
0.1849547028541565,
-0.19531680643558502,
0.24358707666397095,
-0.09694327414035797,
-0.19288915395736694,
-0.4771617650985718,
0.10035619884729385,
-0.19104517996311188,
-0.002411056309938431,
0.2651958167552948,
0.08947739750146866,
-0.253984659910202,
0.21600288152694702,
0.0636623352766037,
0.10589699447154999,
-0.1437215954065323,
0.23883262276649475,
-0.1415686011314392,
0.15695667266845703,
-0.1544211506843567,
0.07263406366109848,
0.1432066410779953,
-0.21234792470932007,
0.12662020325660706,
0.06952115893363953,
-0.0998089388012886,
0.37117862701416016,
-0.027613697573542595,
0.34110331535339355,
-0.10287218540906906,
-0.1188572496175766,
0.23832930624485016,
-0.4255887567996979,
0.11203818768262863,
-0.03879605978727341,
0.031038504093885422,
0.016051389276981354,
-0.15876418352127075,
-0.08703355491161346,
-0.06943373382091522,
-0.029539667069911957,
-0.05470111966133118,
0.32924750447273254,
0.29836907982826233,
-0.05786624178290367,
-0.029129143804311752,
-0.29014644026756287,
0.07735880464315414,
0.21639996767044067,
0.2159418910741806,
0.042163461446762085,
-0.611100971698761,
0.008872278034687042,
0.25283941626548767,
-0.019181732088327408,
0.09580615162849426,
0.28457343578338623,
-0.3371766209602356,
0.15998968482017517,
0.14187629520893097,
-0.073493592441082,
0.10079286992549896,
0.2751478850841522,
0.06483415514230728,
0.3206954002380371,
0.03697756305336952,
-0.30753299593925476,
0.06872628629207611,
0.0829259529709816,
0.10214829444885254,
0.3384557366371155,
0.059938203543424606,
0.02017839252948761,
-0.46913424134254456,
0.15904748439788818,
-0.026356572285294533,
0.27232298254966736,
-0.3316701352596283,
-0.31506115198135376,
-0.22499072551727295,
-0.39030012488365173,
0.015485092997550964,
-0.14325670897960663,
-0.06605255603790283,
-0.28623664379119873,
0.04600010812282562,
0.32320675253868103,
-0.14696422219276428,
0.37896600365638733,
-0.041628628969192505,
0.29271942377090454,
0.11377184092998505,
0.12970444560050964,
-0.10473880171775818,
0.027894645929336548,
-0.14413350820541382,
0.1762373298406601,
0.12975753843784332,
0.08509763330221176,
0.40449023246765137,
-0.19329649209976196,
0.3084242343902588,
-0.5184593796730042,
-0.22058036923408508,
0.3749140202999115,
0.1204361617565155,
0.26600462198257446,
0.3058922290802002,
0.09970183670520782,
-0.08424609899520874,
-0.014167530462145805,
0.20687879621982574,
0.04506250470876694,
-0.2498217523097992,
0.07698258012533188,
-0.0025479611940681934,
-0.08167126774787903,
-0.012510102242231369,
-0.15548470616340637,
-0.15123295783996582,
-0.5573262572288513,
0.09340647608041763,
-0.15497566759586334,
0.0885104238986969,
0.3667937219142914,
0.09736022353172302,
0.18338413536548615,
0.18499258160591125,
0.19374360144138336,
-0.23711304366588593,
-0.12204287946224213,
0.29920336604118347,
-0.41893404722213745,
-0.5492472648620605,
0.12315976619720459,
0.13098008930683136,
0.11278098821640015,
-0.03776268661022186,
-0.5286386609077454,
-0.19223937392234802,
-0.1414315551519394,
-0.051504820585250854,
0.17685681581497192,
-0.11860162019729614,
0.20463624596595764,
0.09474866092205048,
-0.15501567721366882,
-0.15664458274841309,
-0.21626782417297363,
0.015096776187419891,
-0.104656882584095,
-0.02050529420375824,
-0.18129801750183105,
0.3160027265548706,
0.1166948527097702,
0.20946697890758514,
0.42812439799308777,
0.13038606941699982,
0.1362122893333435,
-0.05831659585237503,
0.5424150228500366,
-0.059173233807086945,
-0.3506848216056824,
0.180956169962883,
0.07050636410713196,
-0.0802188366651535,
0.38710880279541016,
0.030228018760681152,
-0.03358553349971771,
-0.17613276839256287,
-0.259995698928833,
-0.24010947346687317,
-0.41464605927467346,
-0.1971912682056427,
0.07170777022838593,
0.13814043998718262,
0.05931467190384865,
0.106637142598629,
0.04630333557724953,
-0.11652180552482605,
0.16260375082492828,
0.38687974214553833,
0.05634059011936188,
-0.020424406975507736,
0.176451176404953,
0.33184555172920227,
-0.4677717089653015,
0.21147742867469788,
-0.22466103732585907,
0.014758490025997162,
-0.2523864507675171,
0.056084901094436646,
0.22762145102024078,
0.23796367645263672,
0.492370069026947,
-0.18985962867736816,
0.1908923089504242,
0.03660391643643379,
0.02250731736421585,
-0.2793506681919098,
0.019514013081789017,
-0.11242462694644928,
0.19737385213375092,
0.11105966567993164,
0.31962597370147705,
-0.19839535653591156,
-0.037710223346948624,
0.21934498846530914,
-0.07463624328374863,
-0.11132282763719559,
-0.4264213740825653,
-0.07251273095607758,
-0.1072809249162674,
-0.2149859070777893,
0.020874686539173126,
0.034666918218135834,
-0.0073534585535526276,
0.05705788731575012,
-0.16058747470378876,
-0.19593234360218048,
0.017070025205612183,
0.08926514536142349,
0.08001163601875305,
0.2011268436908722,
0.09433253109455109,
0.23343229293823242,
0.4141170382499695,
0.25767552852630615,
0.45279163122177124,
0.4751804769039154,
-0.1357385516166687,
-0.3925325572490692,
0.11127059906721115,
-0.22147484123706818,
-0.17472058534622192,
0.14892475306987762,
-0.07818660140037537,
-0.18377968668937683,
0.17441292107105255,
0.2602887749671936,
-0.16421547532081604,
-0.023677030578255653,
0.3046865165233612,
-0.11553341150283813,
-0.5475820899009705,
-0.24176712334156036,
0.37029173970222473,
-0.018339332193136215,
-0.13732090592384338,
0.2598574757575989,
0.3727406859397888,
-0.10966072976589203,
0.04773198068141937,
0.020274288952350616,
0.7303595542907715,
-0.12066447734832764,
-0.23698189854621887,
0.36657819151878357,
-0.08188434690237045,
0.4713509976863861,
0.01634543016552925,
0.07757572829723358,
-0.3072742223739624,
-0.07380038499832153,
-0.029922207817435265,
-0.03894168511033058,
0.1544530689716339,
0.099183589220047,
-0.3359505236148834,
0.018481753766536713,
-0.1830807328224182,
0.03170016407966614,
-0.08767840266227722,
0.20547246932983398,
-0.221754789352417,
-0.19404076039791107,
-0.20092670619487762,
0.27468517422676086,
-0.0584380179643631,
0.3566443920135498,
-0.1261041760444641,
-0.14242391288280487,
0.16507336497306824,
-0.07535852491855621,
-0.4576191306114197,
0.10175333172082901,
-0.015521150082349777,
0.028425969183444977,
0.2004491686820984,
-0.1255018264055252,
0.3584764003753662,
0.3743743300437927,
0.2720191478729248,
0.22172217071056366,
-0.3854254186153412,
0.16218623518943787,
-0.024221226572990417,
-0.291196346282959,
-0.05787957087159157,
0.008528965525329113,
0.4371485114097595,
-0.15707746148109436,
-0.17361290752887726,
0.09153082966804504,
-0.03740348666906357,
0.03419320285320282,
-0.09855634719133377,
0.023991208523511887,
-0.16735081374645233,
-0.3822789192199707,
-0.008076833561062813,
-0.32211989164352417,
0.05703671649098396,
-0.13129699230194092,
0.21420054137706757,
0.13405074179172516,
0.12800362706184387,
0.16883885860443115,
0.24975432455539703,
-0.22928893566131592,
0.0016198400408029556,
0.40267491340637207,
-0.0580427348613739,
-0.25457054376602173,
0.42225977778434753,
0.3349197208881378,
-0.33121734857559204,
-0.2940271198749542,
-0.22819536924362183,
-0.01467504445463419,
-0.3696960508823395,
0.1820240318775177,
0.15358783304691315,
0.21454231441020966,
0.16980791091918945,
0.14476530253887177,
0.10274164378643036,
-0.10003989189863205,
-0.13535986840724945,
-0.2735432982444763,
-0.24858954548835754,
-0.02190253883600235,
-0.24625976383686066,
0.10605154931545258,
0.08012162148952484,
0.12378156185150146,
0.3240310847759247,
-0.14838071167469025,
-0.43127548694610596,
0.07545579224824905,
-0.345839262008667,
-0.1648823320865631,
-0.002610202878713608,
0.13618837296962738,
-0.02271745726466179,
-0.16495713591575623,
0.19499285519123077,
0.05120060220360756,
-0.37670502066612244,
-0.26849761605262756,
-0.18493378162384033,
0.06345141679048538,
0.04025127738714218,
-0.0782187357544899,
0.12612491846084595,
-0.1202700287103653,
-0.16631557047367096,
-0.03837744519114494,
0.06679117679595947,
0.4437362849712372,
0.04746689647436142,
-0.12351316958665848,
-0.0976591408252716,
0.015057221055030823,
0.16313029825687408,
0.27003902196884155,
0.14748647809028625,
0.14308682084083557,
-0.13969795405864716,
-0.07946385443210602,
-0.09123943001031876,
-0.001951552927494049,
0.19579996168613434,
0.1580587923526764,
0.13731548190116882,
-0.12488938122987747,
0.3304362893104553,
-0.18538229167461395,
0.2563397288322449,
0.10883186012506485,
0.500733494758606,
0.003742612898349762,
-0.14929811656475067,
-0.1855466663837433,
0.08759592473506927,
0.33794188499450684,
-0.39991825819015503,
-0.08519113063812256,
0.1044996827840805,
-0.0522804856300354,
0.06885227560997009,
-0.1850356161594391,
0.016932647675275803,
0.10252420604228973,
0.13961802423000336,
0.1835990846157074,
0.4243221879005432,
-0.16862383484840393,
0.08670230209827423,
0.3818396031856537,
-0.08955754339694977,
0.030850514769554138,
0.3274793326854706,
0.1568187177181244,
0.263997882604599,
0.2124660760164261,
-0.08383900672197342,
-0.12534821033477783,
-0.21105703711509705,
0.17544259130954742,
0.24464863538742065,
-0.4750065505504608,
0.22598232328891754,
0.3663569390773773,
-0.19711104035377502,
-0.11076319962739944,
-0.1030755490064621,
0.31516095995903015,
-0.09579401463270187,
0.049314338713884354,
-0.2984258830547333,
0.14356137812137604,
-0.17516270279884338,
0.08015160262584686,
-0.2854703664779663,
-0.19975680112838745,
-0.07548590749502182,
0.11460545659065247,
-0.15581777691841125,
-0.26684117317199707,
-0.18380752205848694,
-0.10848100483417511,
-0.11416096985340118,
-0.5695741772651672,
-0.06900696456432343,
0.1364230513572693,
-0.016116715967655182,
-0.21894823014736176,
0.0037025362253189087,
0.04961378499865532,
-0.04311586171388626,
0.202912837266922,
0.6450813412666321,
0.36127400398254395,
0.1535102128982544,
0.31300997734069824,
-0.05833983048796654,
-0.1639629751443863,
0.01841900683939457,
-0.14156047999858856,
0.09133858978748322,
0.2899142801761627,
0.036644935607910156,
0.3383769094944,
0.24418699741363525,
-0.2675052881240845,
0.23888938128948212,
-0.1999085694551468,
0.05032017081975937,
-0.16195571422576904,
0.0016519352793693542,
-0.2522953450679779,
-0.06102766469120979,
-0.131183460354805,
-0.2148151397705078,
-0.40859293937683105,
0.07384797185659409,
0.6283365488052368,
-0.08717643469572067,
0.027928516268730164,
-0.2973214387893677,
0.14293096959590912,
0.10865059494972229,
0.37113156914711,
0.6710726618766785,
0.21989011764526367,
0.0856158584356308,
-0.15534383058547974,
-0.6001446843147278,
0.38715267181396484,
0.09103748947381973,
0.08647267520427704,
0.19517482817173004,
-0.05038522183895111,
0.07131632417440414,
0.09689566493034363,
0.14524409174919128,
0.15484172105789185,
-0.16708922386169434,
0.04252951592206955,
-0.17291398346424103,
-0.14577752351760864,
-0.02498810738325119,
-0.11424672603607178,
-0.026827916502952576,
-0.07427951693534851,
0.18030297756195068,
-0.07177972793579102,
0.14381256699562073,
-0.1802370697259903,
0.3063732981681824,
-0.09939512610435486,
-0.2696758806705475,
0.390537291765213,
0.21989554166793823,
0.30810123682022095,
-0.04195757210254669,
-0.06759388744831085,
-0.1643095761537552,
-0.2746012508869171,
-0.2413073182106018,
0.19603773951530457,
0.1354871541261673,
0.0993252843618393,
0.014294842258095741,
-0.2167360633611679,
-0.06091044470667839,
0.21449793875217438,
0.059219323098659515,
-0.032083868980407715,
-0.28298696875572205,
0.13781720399856567,
-0.18398302793502808,
-0.055059488862752914,
0.08726604282855988,
0.055627115070819855,
0.07489030808210373,
0.023218190297484398,
-0.23798085749149323,
-0.5114153623580933,
0.5453509092330933,
-0.4438830018043518,
-0.08502563834190369,
0.005817772820591927,
0.15755437314510345,
0.1182728111743927,
-0.35079848766326904,
-0.4818021059036255,
0.19984987378120422,
0.28261610865592957,
-0.023749738931655884,
-0.0678940862417221,
0.08488933742046356,
-0.1582966148853302,
0.15525782108306885,
-0.06983309984207153,
0.5822910070419312,
0.20360559225082397,
-0.21318860352039337,
0.071626216173172,
-0.1301760971546173
] |
https://github.com/huggingface/datasets/issues/4934 | Dataset Viewer issue for indonesian-nlp/librivox-indonesia | Thanks @albertvillanova for checking the issue. Actually, I can use the dataset like following:
```
>>> from datasets import load_dataset
>>> ds=load_dataset("indonesian-nlp/librivox-indonesia")
No config specified, defaulting to: librivox-indonesia/all
Reusing dataset librivox-indonesia (/root/.cache/huggingface/datasets/indonesian-nlp___librivox-indonesia/all/1.0.0/9a934a42bfb53dc103003d191618443b8a786bea2bd7bb0bc2d9454b8494521e)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 500.87it/s]
>>> ds
DatasetDict({
train: Dataset({
features: ['path', 'language', 'reader', 'sentence', 'audio'],
num_rows: 7815
})
})
>>> ds["train"][0]
{'path': '/root/.cache/huggingface/datasets/downloads/extracted/c8ead52370fa28feb64643ea9d05cd7d820192dc8a1700d665ec45ec7624f5a3/librivox-indonesia/sundanese/universal-declaration-of-human-rights/human_rights_un_sun_brc_0000.mp3', 'language': 'sun', 'reader': '3174', 'sentence': 'pernyataan umum ngeunaan hak hak asasi manusa sakabeh manusa', 'audio': {'path': '/root/.cache/huggingface/datasets/downloads/extracted/c8ead52370fa28feb64643ea9d05cd7d820192dc8a1700d665ec45ec7624f5a3/librivox-indonesia/sundanese/universal-declaration-of-human-rights/human_rights_un_sun_brc_0000.mp3', 'array': array([ 0. , 0. , 0. , ..., -0.02419001,
-0.01957154, -0.01502833], dtype=float32), 'sampling_rate': 44100}}
```
It would be just nice if I also can see it using dataset viewer. | ### Link
https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia
### Description
I created a new speech dataset https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia, but the dataset preview doesn't work with following error message:
```
Server error
Status code: 400
Exception: TypeError
Message: unsupported operand type(s) for +: 'NoneType' and 'str'
```
Please help, I am not sure what the problem here is. Thanks a lot.
### Owner
Yes | 102 | Dataset Viewer issue for indonesian-nlp/librivox-indonesia
### Link
https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia
### Description
I created a new speech dataset https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia, but the dataset preview doesn't work with following error message:
```
Server error
Status code: 400
Exception: TypeError
Message: unsupported operand type(s) for +: 'NoneType' and 'str'
```
Please help, I am not sure what the problem here is. Thanks a lot.
### Owner
Yes
Thanks @albertvillanova for checking the issue. Actually, I can use the dataset like following:
```
>>> from datasets import load_dataset
>>> ds=load_dataset("indonesian-nlp/librivox-indonesia")
No config specified, defaulting to: librivox-indonesia/all
Reusing dataset librivox-indonesia (/root/.cache/huggingface/datasets/indonesian-nlp___librivox-indonesia/all/1.0.0/9a934a42bfb53dc103003d191618443b8a786bea2bd7bb0bc2d9454b8494521e)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 500.87it/s]
>>> ds
DatasetDict({
train: Dataset({
features: ['path', 'language', 'reader', 'sentence', 'audio'],
num_rows: 7815
})
})
>>> ds["train"][0]
{'path': '/root/.cache/huggingface/datasets/downloads/extracted/c8ead52370fa28feb64643ea9d05cd7d820192dc8a1700d665ec45ec7624f5a3/librivox-indonesia/sundanese/universal-declaration-of-human-rights/human_rights_un_sun_brc_0000.mp3', 'language': 'sun', 'reader': '3174', 'sentence': 'pernyataan umum ngeunaan hak hak asasi manusa sakabeh manusa', 'audio': {'path': '/root/.cache/huggingface/datasets/downloads/extracted/c8ead52370fa28feb64643ea9d05cd7d820192dc8a1700d665ec45ec7624f5a3/librivox-indonesia/sundanese/universal-declaration-of-human-rights/human_rights_un_sun_brc_0000.mp3', 'array': array([ 0. , 0. , 0. , ..., -0.02419001,
-0.01957154, -0.01502833], dtype=float32), 'sampling_rate': 44100}}
```
It would be just nice if I also can see it using dataset viewer. | [
-0.3000684082508087,
-0.28596270084381104,
0.06741733849048615,
0.5013383626937866,
0.2529182732105255,
-0.10567692667245865,
0.05864055082201958,
0.3209860920906067,
0.07752662897109985,
0.09025982767343521,
-0.3962743878364563,
-0.01853739656507969,
-0.2425432950258255,
0.14931362867355347,
-0.2620822787284851,
-0.4400997757911682,
0.0870608240365982,
0.19989120960235596,
-0.03098297119140625,
0.11463569104671478,
-0.45261943340301514,
0.06257601827383041,
-0.45282596349716187,
0.03592853248119354,
0.1359226405620575,
-0.0040117669850587845,
-0.1682976484298706,
-0.1560058891773224,
-0.2560126781463623,
-0.4889170229434967,
0.17991070449352264,
0.04703022167086601,
0.5051476955413818,
0.5168672800064087,
-0.00013562927779275924,
0.16254861652851105,
0.4041961431503296,
-0.08256611973047256,
-0.2432037591934204,
-0.3654055595397949,
0.1382330060005188,
0.07578752934932709,
0.08303526043891907,
-0.27910295128822327,
-0.3902932405471802,
-0.3316304087638855,
0.07159631699323654,
-0.6252724528312683,
0.35499390959739685,
0.4966042935848236,
0.06384331732988358,
0.11840175092220306,
-0.16798855364322662,
-0.06211833283305168,
-0.06841690093278885,
0.3330931067466736,
-0.3122393488883972,
-0.19914878904819489,
0.18088382482528687,
0.45363128185272217,
-0.18253299593925476,
0.14251723885536194,
-0.20942902565002441,
-0.059192072600126266,
0.09062890708446503,
-0.34099164605140686,
-0.2722126245498657,
-0.49578699469566345,
0.27057844400405884,
0.4395614266395569,
0.9406812787055969,
-0.04516640305519104,
-0.38316601514816284,
0.05750975012779236,
0.10154271125793457,
-0.09458554536104202,
0.09982229769229889,
0.15974590182304382,
-0.1401088684797287,
0.23060551285743713,
-0.09399910271167755,
-0.2862764596939087,
-0.23665452003479004,
0.25566285848617554,
0.11227957904338837,
0.3310818672180176,
-0.20013336837291718,
0.23931562900543213,
0.18177635967731476,
-0.3318402171134949,
-0.008570929057896137,
-0.25931406021118164,
-0.09417632222175598,
0.23364335298538208,
-0.33325204253196716,
0.07301239669322968,
-0.00046978890895843506,
0.010937899351119995,
0.02496425062417984,
0.09993298351764679,
0.10387536883354187,
0.27880463004112244,
-0.166494220495224,
0.04795405641198158,
-0.011075101792812347,
0.05694255605340004,
0.3797972798347473,
0.34742826223373413,
0.287111759185791,
0.10977175086736679,
0.24658909440040588,
-0.0614793598651886,
-0.3638380169868469,
-0.1955714225769043,
-0.27240055799484253,
-0.04631081968545914,
0.32163482904434204,
-0.22025224566459656,
-0.14478708803653717,
0.14635835587978363,
-0.2816627621650696,
-0.14680303633213043,
0.23970173299312592,
0.30593934655189514,
-0.20548191666603088,
0.07913272082805634,
0.0027982108294963837,
0.6232787370681763,
-0.1417740136384964,
-0.2953207492828369,
0.08104787766933441,
-0.1581767350435257,
-0.2036525160074234,
0.02182634174823761,
0.14025969803333282,
-0.15944349765777588,
-0.040617018938064575,
0.03684162721037865,
-0.006653577089309692,
-0.05564770847558975,
-0.0558997243642807,
-0.21304652094841003,
0.06801130622625351,
0.04603566229343414,
0.1565958559513092,
0.03970682621002197,
0.1843569427728653,
-0.13986530900001526,
-0.07416070997714996,
0.41924864053726196,
0.07084309309720993,
-0.3259420692920685,
-0.4069012403488159,
-0.06662255525588989,
-0.41540294885635376,
0.03218807280063629,
-0.11648482829332352,
0.2891770899295807,
-0.02007877081632614,
-0.18997474014759064,
-0.04543573409318924,
-0.031130746006965637,
-0.4925878643989563,
-0.14006833732128143,
0.12955354154109955,
0.5343719124794006,
-0.25565004348754883,
-0.2426668405532837,
-0.24872145056724548,
-0.21647511422634125,
0.3287830054759979,
0.2890992760658264,
-0.03833373263478279,
0.03745691105723381,
-0.4177197217941284,
0.09635236859321594,
0.7293952703475952,
-0.2932065725326538,
-0.3601309359073639,
0.30359721183776855,
0.10569635033607483,
0.25302639603614807,
0.3993896543979645,
0.08168359845876694,
0.22209346294403076,
0.04588472098112106,
-0.3149605393409729,
-0.03155515342950821,
0.20519490540027618,
-0.03245466947555542,
-0.19288526475429535,
-0.08123167604207993,
0.3916199207305908,
0.10709202289581299,
0.21904747188091278,
0.2578132748603821,
0.12118186056613922,
0.04302694648504257,
0.45545700192451477,
-0.2114538848400116,
0.2315068393945694,
-0.024218712002038956,
0.14890725910663605,
0.19505009055137634,
-0.023046541959047318,
-0.05884520709514618,
-0.2725658416748047,
0.03073783963918686,
-0.040192391723394394,
0.3306366503238678,
-0.0589212030172348,
-0.12208668887615204,
-0.33744147419929504,
-0.10966601967811584,
-0.33278629183769226,
-0.02566995844244957,
-0.028245504945516586,
0.3605782687664032,
0.18407785892486572,
0.26755109429359436,
0.14444352686405182,
0.143238827586174,
0.04103431850671768,
0.03005678579211235,
-0.3038319945335388,
0.2716899514198303,
-0.08744502067565918,
-0.027923423796892166,
0.1849270761013031,
0.342368483543396,
0.3774420917034149,
-0.09986349940299988,
-0.2958000898361206,
0.37040430307388306,
-0.051128171384334564,
0.17253828048706055,
0.022709989920258522,
0.04571458697319031,
0.24673283100128174,
-0.5334863662719727,
0.22421029210090637,
0.19879458844661713,
0.16723132133483887,
-0.03220751881599426,
-0.0397568941116333,
0.342088907957077,
0.24210123717784882,
0.20854061841964722,
0.026376575231552124,
0.1710876226425171,
0.21672199666500092,
0.13463035225868225,
-0.2944362163543701,
-0.2161329686641693,
0.30788737535476685,
-0.23001109063625336,
0.31976890563964844,
0.0785895586013794,
-0.5096200704574585,
-0.30269038677215576,
-0.0009310804307460785,
-0.010079633444547653,
0.22436171770095825,
0.19986140727996826,
-0.06141924113035202,
0.04543275386095047,
-0.02205904759466648,
-0.28489044308662415,
0.2472858726978302,
0.0823260024189949,
0.033703312277793884,
0.0517386831343174,
0.07319949567317963,
-0.27796974778175354,
0.08873783051967621,
0.06805996596813202,
0.2212122529745102,
0.20902150869369507,
-0.03481212630867958,
0.014863145537674427,
-0.29130157828330994,
-0.19277560710906982,
0.11521605402231216,
0.4379537105560303,
-0.27097946405410767,
-0.197548508644104,
-0.30782192945480347,
-0.7812482714653015,
-0.22716183960437775,
-0.1278134435415268,
-0.13635894656181335,
-0.22736752033233643,
-0.173637256026268,
0.11888225376605988,
0.03806191310286522,
0.21620947122573853,
-0.4186108410358429,
0.1894029676914215,
0.1416349709033966,
0.12960270047187805,
-0.06542719900608063,
0.08230983465909958,
-0.20700010657310486,
-0.06180117279291153,
0.41788551211357117,
-0.16584831476211548,
0.21181952953338623,
-0.1410968005657196,
0.24853669106960297,
-0.4272269308567047,
-0.27993184328079224,
0.1849224865436554,
0.11640021950006485,
0.16830363869667053,
0.0400058887898922,
0.042998697608709335,
0.0513082891702652,
-0.03903326764702797,
0.32597044110298157,
-0.022448772564530373,
-0.0319996178150177,
0.28635793924331665,
-0.039371099323034286,
-0.0022499996703118086,
0.05733553692698479,
-0.39644601941108704,
-0.19863688945770264,
-0.6123377084732056,
-0.05739617347717285,
-0.257989764213562,
0.19756093621253967,
0.20501001179218292,
-0.008841294795274734,
0.18028034269809723,
0.06804889440536499,
0.05116543173789978,
-0.18275047838687897,
-0.2008625715970993,
0.3365463614463806,
-0.29842326045036316,
-0.4430994391441345,
0.021999049931764603,
-0.00283113494515419,
0.24217812716960907,
0.07736732810735703,
-0.5219324231147766,
0.35045814514160156,
-0.13789094984531403,
0.17497096955776215,
0.07576873153448105,
-0.3473617732524872,
0.048947226256132126,
-0.06376124173402786,
0.17210635542869568,
-0.1606835424900055,
-0.04226098582148552,
-0.030730344355106354,
-0.4583972096443176,
0.2316911220550537,
0.266407310962677,
0.3871413469314575,
0.09076519310474396,
0.2230764925479889,
0.4175037145614624,
0.1541852205991745,
0.6537152528762817,
-0.05869118869304657,
0.3526158630847931,
0.08002524822950363,
-0.46023687720298767,
0.22709715366363525,
0.05273464322090149,
0.2082839161157608,
0.32913604378700256,
-0.1035035103559494,
-0.39181387424468994,
-0.37965163588523865,
-0.14850574731826782,
-0.3101399540901184,
-0.1762595772743225,
0.17434854805469513,
-0.4250575602054596,
0.2807484567165375,
-0.08082323521375656,
0.043847888708114624,
-0.046742554754018784,
-0.22790321707725525,
-0.11593341827392578,
0.3307197093963623,
0.19184070825576782,
0.05434242635965347,
-0.3645349442958832,
-0.23074904084205627,
-0.3989832401275635,
0.5149160623550415,
0.08427124470472336,
0.6264158487319946,
-0.14707307517528534,
0.11456014961004257,
0.09363517165184021,
0.20462782680988312,
0.6783125996589661,
-0.34163033962249756,
-0.06992306560277939,
0.15080443024635315,
0.10460008680820465,
-0.47218382358551025,
0.15847419202327728,
-0.09836778044700623,
0.30339744687080383,
0.2471514493227005,
0.4475427269935608,
-0.07851075381040573,
-0.1787639558315277,
0.15760809183120728,
0.08552958816289902,
-0.22071778774261475,
-0.30324336886405945,
-0.18278630077838898,
-0.17777079343795776,
-0.2249036431312561,
-0.003970399498939514,
-0.17974944412708282,
0.4144337475299835,
-0.2242717444896698,
0.013970281928777695,
-0.06940454989671707,
-0.05713777244091034,
0.0041392892599105835,
0.034917354583740234,
0.17038413882255554,
0.25552549958229065,
0.044315312057733536,
0.21895287930965424,
0.19115695357322693,
0.2388860285282135,
0.57976233959198,
0.27861765027046204,
-0.1573617309331894,
0.29666587710380554,
-0.19532933831214905,
0.10763412714004517,
0.1370094269514084,
0.023657172918319702,
0.09244656562805176,
0.18247126042842865,
0.09019793570041656,
-0.13038679957389832,
-0.042694177478551865,
0.5199246406555176,
-0.09800663590431213,
-0.7167911529541016,
-0.49194225668907166,
0.38431498408317566,
0.2213977873325348,
-0.09818417578935623,
0.04329875856637955,
0.3512333631515503,
-0.09738276153802872,
0.16163434088230133,
-0.025253713130950928,
0.9990314841270447,
0.07931067049503326,
-0.06409376859664917,
0.3935578763484955,
-0.33534371852874756,
0.12135643512010574,
0.25560492277145386,
0.07061535865068436,
-0.3082670569419861,
-0.07649082690477371,
-0.15221497416496277,
0.07061278820037842,
0.609150230884552,
-0.04829264432191849,
-0.452104389667511,
-0.11820472031831741,
0.09661512076854706,
-0.17430922389030457,
0.09712809324264526,
0.20810511708259583,
-0.3758183717727661,
-0.06834301352500916,
-0.05960073322057724,
-0.05005943775177002,
-0.24037973582744598,
0.3722103536128998,
0.022549595683813095,
-0.08463328331708908,
-0.15125329792499542,
-0.1458016335964203,
-0.6243771910667419,
0.1355379819869995,
0.0022623115219175816,
-0.0671946257352829,
-0.18771925568580627,
-0.29054686427116394,
0.5078991651535034,
0.5387382507324219,
0.2014269381761551,
0.12018625438213348,
-0.18429933488368988,
-0.10218599438667297,
0.044751353561878204,
-0.13633993268013,
-0.0501895509660244,
-0.014425363391637802,
0.3514275848865509,
-0.10048659145832062,
-0.4801875650882721,
0.3149738609790802,
0.19315461814403534,
0.05872541666030884,
-0.16356906294822693,
-0.3352739214897156,
0.10487306118011475,
-0.4410282075405121,
-0.2532957196235657,
-0.25134918093681335,
-0.16218474507331848,
-0.11710727214813232,
-0.052639711648225784,
0.13290193676948547,
-0.287221759557724,
-0.003817237913608551,
0.07678506523370743,
-0.2574601173400879,
-0.02012781798839569,
0.3761973977088928,
0.24081766605377197,
0.07642369717359543,
0.5185840725898743,
0.4683133363723755,
-0.10700664669275284,
-0.08207567036151886,
0.07917631417512894,
0.06058364734053612,
-0.41545093059539795,
-0.06704901158809662,
0.0375216118991375,
0.1271294802427292,
-0.06838977336883545,
0.06382787227630615,
-0.17574593424797058,
-0.014660820364952087,
-0.0278897937387228,
-0.29622116684913635,
-0.1780727058649063,
-0.0026333853602409363,
-0.0026037096977233887,
0.3288320302963257,
-0.06844989955425262,
0.08510738611221313,
0.33942994475364685,
-0.012656116858124733,
-0.08958229422569275,
-0.15036723017692566,
-0.09213166683912277,
0.1485758125782013,
0.25181299448013306,
0.20346996188163757,
-0.07060953229665756,
-0.17192186415195465,
-0.09826519340276718,
0.09207719564437866,
-0.1302693635225296,
0.06995364278554916,
-0.16909760236740112,
0.25164568424224854,
0.26026901602745056,
-0.35441282391548157,
-0.06310790032148361,
-0.2721738815307617,
-0.06393581628799438,
0.06469257175922394,
-0.21886517107486725,
0.2889760136604309,
-0.08600305020809174,
0.4461733400821686,
-0.005770128220319748,
-0.03916393220424652,
0.056014060974121094,
0.20221251249313354,
0.07096847146749496,
0.3228719234466553,
0.048298705369234085,
0.2622533440589905,
0.13464216887950897,
-0.22750939428806305,
-0.1959962248802185,
-0.09727746993303299,
0.11056617647409439,
0.07933647930622101,
0.2827324867248535,
-0.396911084651947,
0.3735320568084717,
0.3407536745071411,
0.4175455570220947,
0.10383515059947968,
-0.01647854968905449,
-0.0755867213010788,
0.20885375142097473,
-0.1118636354804039,
-0.41586363315582275,
-0.012684976682066917,
0.26349517703056335,
0.06814739853143692,
0.05818958953022957,
0.32933300733566284,
-0.1601155400276184,
0.190862238407135,
0.2059301733970642,
-0.15410321950912476,
0.06927667558193207,
0.13531720638275146,
0.4384825527667999,
0.6933752298355103,
-0.10162778943777084,
0.08289998769760132,
0.11356113851070404,
0.05628853291273117,
0.039164379239082336,
0.31983858346939087,
-0.1914682686328888,
0.2860713303089142,
-0.065179742872715,
0.19805963337421417,
0.17225052416324615,
-0.4882430136203766,
0.12612339854240417,
0.102199986577034,
-0.19166523218154907,
0.24132531881332397,
-0.10637341439723969,
0.36358505487442017,
-0.04595951735973358,
-0.10553250461816788,
-0.11190859228372574,
0.28499314188957214,
-0.17332443594932556,
-0.0520765520632267,
-0.46564531326293945,
-0.2618287205696106,
-0.42139509320259094,
-0.0016157962381839752,
-0.06609655916690826,
0.10515827685594559,
-0.17799222469329834,
0.13540233671665192,
-0.1693679839372635,
-0.39632463455200195,
0.05914235860109329,
0.15248793363571167,
-0.004594564437866211,
-0.1940973401069641,
0.31028521060943604,
0.3531416654586792,
0.018336765468120575,
0.2763560712337494,
0.5463963747024536,
0.4758540093898773,
0.3328862190246582,
-0.03618483990430832,
0.026339944452047348,
-0.08038447797298431,
-0.01939968578517437,
0.038511719554662704,
0.1733809858560562,
0.3747802674770355,
0.27001282572746277,
0.2714008688926697,
-0.12116038799285889,
0.049940258264541626,
0.45537707209587097,
0.09269528836011887,
0.29468685388565063,
-0.3273071348667145,
0.38087791204452515,
-0.31177517771720886,
-0.12063062936067581,
-0.10846467316150665,
-0.2518708109855652,
-0.48664793372154236,
0.2865133583545685,
0.19031892716884613,
-0.19263136386871338,
0.1017775908112526,
-0.4097788631916046,
-0.08047932386398315,
0.15930142998695374,
0.4439818561077118,
0.37409698963165283,
0.16245543956756592,
-0.05559352785348892,
-0.15230514109134674,
-0.7430500388145447,
0.14196380972862244,
0.11200618743896484,
0.04016178101301193,
0.10414719581604004,
-0.05184037983417511,
-0.10412738472223282,
0.21626612544059753,
0.17849266529083252,
-0.07999791949987411,
0.038129501044750214,
0.3359907269477844,
-0.10919082164764404,
-0.1348417103290558,
-0.006340399384498596,
0.29136744141578674,
-0.2852768003940582,
-0.23948383331298828,
0.21386262774467468,
0.09155309200286865,
-0.1124778762459755,
-0.03592296689748764,
-0.19593657553195953,
-0.15515995025634766,
-0.32123804092407227,
0.22506192326545715,
0.23322951793670654,
0.5645577311515808,
-0.020146477967500687,
0.07788217067718506,
-0.20245185494422913,
0.05914141237735748,
-0.16612710058689117,
0.21705788373947144,
0.3583047091960907,
0.6550818681716919,
-0.41825228929519653,
-0.0768178254365921,
-0.21541661024093628,
0.023287532851099968,
0.018823429942131042,
0.047693248838186264,
-0.30257269740104675,
0.14875034987926483,
-0.24835559725761414,
-0.14543919265270233,
0.022099267691373825,
0.23570677638053894,
0.08805803954601288,
0.11736801266670227,
-0.3065255284309387,
-0.25542980432510376,
0.4324321746826172,
-0.2863101065158844,
-0.13674131035804749,
-0.11046942323446274,
-0.007242150604724884,
0.2726406157016754,
-0.2089434564113617,
-0.612865686416626,
0.06038881093263626,
0.3348608613014221,
0.0237735565751791,
0.4865032434463501,
0.022423256188631058,
-0.0765816867351532,
-0.10389074683189392,
-0.1419076770544052,
0.5179328322410583,
0.1855943202972412,
-0.20611843466758728,
0.2591736316680908,
-0.27071109414100647
] |
https://github.com/huggingface/datasets/issues/4934 | Dataset Viewer issue for indonesian-nlp/librivox-indonesia | Yes, the issue arises when streaming (that is used by the viewer): your script does not support streaming and to support it in this case there are some subtleties that we are explaining better in our docs in a work-in progress pull request:
- #4872
Just note that when streaming, `local_extracted_archive` is None, and this code line generates the error:
```python
filepath = local_extracted_archive + "/librivox-indonesia/audio_transcription.csv"
```
For a proper implementation, you could have a look at: https://huggingface.co/datasets/common_voice/blob/main/common_voice.py
You can test your script locally by passing `streaming=True` to `load_dataset`:
```python
ds = load_dataset("indonesian-nlp/librivox-indonesia", split="train", streaming=True); item = next(iter(ds)); item
``` | ### Link
https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia
### Description
I created a new speech dataset https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia, but the dataset preview doesn't work with following error message:
```
Server error
Status code: 400
Exception: TypeError
Message: unsupported operand type(s) for +: 'NoneType' and 'str'
```
Please help, I am not sure what the problem here is. Thanks a lot.
### Owner
Yes | 100 | Dataset Viewer issue for indonesian-nlp/librivox-indonesia
### Link
https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia
### Description
I created a new speech dataset https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia, but the dataset preview doesn't work with following error message:
```
Server error
Status code: 400
Exception: TypeError
Message: unsupported operand type(s) for +: 'NoneType' and 'str'
```
Please help, I am not sure what the problem here is. Thanks a lot.
### Owner
Yes
Yes, the issue arises when streaming (that is used by the viewer): your script does not support streaming and to support it in this case there are some subtleties that we are explaining better in our docs in a work-in progress pull request:
- #4872
Just note that when streaming, `local_extracted_archive` is None, and this code line generates the error:
```python
filepath = local_extracted_archive + "/librivox-indonesia/audio_transcription.csv"
```
For a proper implementation, you could have a look at: https://huggingface.co/datasets/common_voice/blob/main/common_voice.py
You can test your script locally by passing `streaming=True` to `load_dataset`:
```python
ds = load_dataset("indonesian-nlp/librivox-indonesia", split="train", streaming=True); item = next(iter(ds)); item
``` | [
-0.42100292444229126,
-0.17707562446594238,
0.08086822926998138,
0.26916253566741943,
0.14048972725868225,
-0.09134476631879807,
0.0739453062415123,
0.3503948450088501,
0.09880751371383667,
0.19274136424064636,
-0.2864548861980438,
0.03298391401767731,
-0.2647589445114136,
0.1247672513127327,
-0.2013673633337021,
-0.41810280084609985,
0.08883444964885712,
0.22408518195152283,
0.012691862881183624,
0.10288992524147034,
-0.4164664149284363,
0.044990748167037964,
-0.45706260204315186,
0.08096098154783249,
0.2382311075925827,
0.018007125705480576,
-0.026334071531891823,
-0.09714359790086746,
-0.23142094910144806,
-0.4672362804412842,
0.11892211437225342,
0.06560781598091125,
0.49253568053245544,
0.5858197212219238,
-0.00013067948748357594,
0.056231141090393066,
0.47465717792510986,
-0.11530328541994095,
-0.2532951533794403,
-0.4811081290245056,
0.14534074068069458,
0.09162810444831848,
0.06544496864080429,
-0.1971552073955536,
-0.2584216892719269,
-0.3089679777622223,
0.13508784770965576,
-0.5785846710205078,
0.29116982221603394,
0.4413653612136841,
0.0935986191034317,
0.12907160818576813,
-0.23906493186950684,
-0.06455522030591965,
0.05934898555278778,
0.2907108664512634,
-0.23371900618076324,
-0.12706169486045837,
0.24315956234931946,
0.30874040722846985,
-0.16966655850410461,
0.16766734421253204,
-0.27485302090644836,
-0.07486933469772339,
0.18179012835025787,
-0.20087788999080658,
-0.3967408239841461,
-0.5893735885620117,
0.17972537875175476,
0.4307538568973541,
0.8525891900062561,
-0.11041981726884842,
-0.40969428420066833,
0.08494699746370316,
0.16637936234474182,
-0.25054770708084106,
0.042005252093076706,
0.19461345672607422,
-0.3075215518474579,
0.17280878126621246,
-0.10052602738142014,
-0.21875254809856415,
-0.31642064452171326,
0.2815265953540802,
0.13708631694316864,
0.23912106454372406,
-0.08814381062984467,
0.1698896288871765,
0.1551734358072281,
-0.2145421802997589,
0.05302071198821068,
-0.267017662525177,
-0.000968053936958313,
0.24520432949066162,
-0.26966553926467896,
0.02368912845849991,
0.030600979924201965,
0.11801180243492126,
-0.03484617918729782,
0.14126724004745483,
0.2619543671607971,
0.29848548769950867,
-0.15890876948833466,
0.19098418951034546,
0.04243936762213707,
0.107760950922966,
0.2648302912712097,
0.2743174731731415,
0.42643243074417114,
0.16941417753696442,
0.30633801221847534,
-0.06900035589933395,
-0.32723942399024963,
-0.1889278143644333,
-0.18953095376491547,
0.0049624014645814896,
0.3656840920448303,
-0.17088596522808075,
-0.17069971561431885,
0.1576605886220932,
-0.21145117282867432,
-0.16232694685459137,
0.1959015429019928,
0.3209710419178009,
-0.15594907104969025,
0.23360934853553772,
0.03793572634458542,
0.6676363945007324,
-0.1467118263244629,
-0.3159250319004059,
0.0987706184387207,
-0.057982999831438065,
-0.056857407093048096,
-0.02514721266925335,
0.22003565728664398,
-0.2986927330493927,
-0.09112748503684998,
-0.003509305417537689,
0.15595373511314392,
0.09915593266487122,
-0.08516912162303925,
-0.2070063054561615,
0.1109030693769455,
0.08958099037408829,
0.22989767789840698,
0.060542792081832886,
0.2294708490371704,
-0.1340724229812622,
-0.06788869202136993,
0.4884178936481476,
0.12259948253631592,
-0.24620576202869415,
-0.2408081740140915,
0.0021125860512256622,
-0.31857216358184814,
-0.01406840980052948,
-0.15980389714241028,
0.24502572417259216,
-0.008467763662338257,
-0.4134724736213684,
-0.12140174955129623,
-0.1057375818490982,
-0.5350368022918701,
-0.15500207245349884,
0.22736747562885284,
0.5342229604721069,
-0.37685731053352356,
-0.12026064097881317,
-0.3554694354534149,
-0.21093648672103882,
0.2691674828529358,
0.25068002939224243,
-0.014767530374228954,
-0.04073423892259598,
-0.343019962310791,
0.2566818594932556,
0.7120137810707092,
-0.2964969277381897,
-0.38323381543159485,
0.3614492118358612,
-0.01913675293326378,
0.27932754158973694,
0.3583744466304779,
0.08145760744810104,
0.42075473070144653,
-0.15163594484329224,
-0.20208227634429932,
0.1479652225971222,
0.07436134666204453,
0.02647494710981846,
-0.17844125628471375,
-0.03750541806221008,
0.3943803906440735,
0.1246543675661087,
0.13481685519218445,
0.3196054995059967,
0.1250169426202774,
-0.08149060606956482,
0.4478214383125305,
-0.20969438552856445,
0.2750551998615265,
-0.09568147361278534,
0.2033533751964569,
0.1299106925725937,
0.015141662210226059,
-0.1251468062400818,
-0.12508413195610046,
-0.05270453914999962,
0.014763865619897842,
0.21996529400348663,
-0.11119948327541351,
-0.19960051774978638,
-0.27340632677078247,
-0.05713687837123871,
-0.3326170742511749,
0.034695785492658615,
0.00679992139339447,
0.2552655041217804,
0.11067706346511841,
0.1925077736377716,
-0.06133277341723442,
0.11488079279661179,
0.1509784311056137,
0.005228446796536446,
-0.36860424280166626,
0.2744690179824829,
-0.11469841748476028,
-0.08190054446458817,
0.20852649211883545,
0.26378926634788513,
0.32665514945983887,
-0.07042179256677628,
-0.28796637058258057,
0.42787355184555054,
-0.13636209070682526,
0.349386990070343,
-0.023802101612091064,
0.021703019738197327,
0.2841061055660248,
-0.5162258148193359,
0.28952062129974365,
0.33086955547332764,
0.2294374257326126,
-0.1009102314710617,
-0.09061834961175919,
0.2821929454803467,
0.22674334049224854,
0.2342570424079895,
0.07834888994693756,
0.12096533924341202,
0.14201168715953827,
0.15819647908210754,
-0.40245941281318665,
-0.15248918533325195,
0.33338993787765503,
-0.25738242268562317,
0.2839668095111847,
-0.11736570298671722,
-0.4928346276283264,
-0.1737295389175415,
0.05346531420946121,
-0.10278859734535217,
0.1835024058818817,
0.23863276839256287,
-0.13613149523735046,
0.0036985669285058975,
-0.03724067658185959,
-0.19777165353298187,
0.3213407099246979,
0.11064363270998001,
-0.02458759769797325,
0.06056059151887894,
0.12923581898212433,
-0.3268197476863861,
0.10237665474414825,
0.07560316473245621,
0.058343108743429184,
0.30271703004837036,
-0.03855057805776596,
0.02586781047284603,
-0.28642264008522034,
-0.2735660672187805,
-0.0068815224803984165,
0.3469257354736328,
-0.208094984292984,
-0.1768503487110138,
-0.3221220076084137,
-0.719689130783081,
-0.2292078286409378,
-0.1487129032611847,
-0.08732308447360992,
-0.27813562750816345,
-0.11422267556190491,
0.30173859000205994,
-0.11003169417381287,
0.18393725156784058,
-0.3809075653553009,
0.1602523773908615,
0.11013087630271912,
0.11488640308380127,
-0.08375059068202972,
0.03996402025222778,
-0.19050151109695435,
-0.031033741310238838,
0.441261351108551,
-0.15479004383087158,
0.21359769999980927,
-0.10804998129606247,
0.18275988101959229,
-0.37538647651672363,
-0.096788190305233,
0.20365583896636963,
0.06394519656896591,
0.033337242901325226,
-0.01699383556842804,
0.1445474773645401,
0.17760016024112701,
-0.19644217193126678,
0.2600906491279602,
-0.19470934569835663,
-0.10057120770215988,
0.3310246765613556,
0.12997452914714813,
-0.03950566425919533,
-0.024543102830648422,
-0.44983699917793274,
-0.29488879442214966,
-0.6760256290435791,
-0.038845278322696686,
-0.20781488716602325,
0.20791666209697723,
0.08888865262269974,
0.10317149758338928,
0.022748850286006927,
0.15237826108932495,
-0.07067768275737762,
-0.1304847002029419,
-0.09393072873353958,
0.4565165936946869,
-0.35883596539497375,
-0.49166080355644226,
0.09766030311584473,
-0.00006056390702724457,
0.20793360471725464,
0.12041967362165451,
-0.2941865921020508,
0.40135127305984497,
-0.060262396931648254,
0.12137442827224731,
0.11896572262048721,
-0.27170711755752563,
0.09808766841888428,
-0.04667746648192406,
0.1291102021932602,
-0.13625776767730713,
0.00430380180478096,
-0.1467529833316803,
-0.38835421204566956,
0.1549542099237442,
0.35278499126434326,
0.5348069667816162,
-0.028027048334479332,
0.3376506567001343,
0.36810752749443054,
0.25722378492355347,
0.5625056028366089,
0.011656418442726135,
0.37711843848228455,
0.05353529006242752,
-0.4307611286640167,
0.21477633714675903,
-0.03880147635936737,
-0.013035695068538189,
0.3898070454597473,
-0.14290598034858704,
-0.4679076373577118,
-0.4165685474872589,
-0.09930096566677094,
-0.32757389545440674,
-0.21631278097629547,
0.2318703532218933,
-0.45013242959976196,
0.20699745416641235,
-0.11425234377384186,
0.08084269613027573,
0.012804627418518066,
-0.20724084973335266,
-0.15262378752231598,
0.2892371416091919,
0.26541978120803833,
0.011692647822201252,
-0.25318750739097595,
-0.29762014746665955,
-0.4955149292945862,
0.5067944526672363,
0.046061769127845764,
0.6216047406196594,
-0.16878046095371246,
0.014055732637643814,
0.10430090874433517,
0.20016230642795563,
0.5369060039520264,
-0.3687344193458557,
-0.04695682227611542,
0.14513011276721954,
0.2011442631483078,
-0.4515519142150879,
0.11307451128959656,
-0.11907610297203064,
0.28826290369033813,
0.09410302340984344,
0.2537462115287781,
-0.09772643446922302,
-0.05870606377720833,
0.14552979171276093,
0.2096235305070877,
-0.1118498146533966,
-0.3238535523414612,
-0.1956993043422699,
-0.1753159463405609,
-0.2697765827178955,
-0.03590313345193863,
-0.1681302785873413,
0.28641965985298157,
-0.3507641553878784,
0.09290355443954468,
0.12553299963474274,
-0.020149610936641693,
0.13465559482574463,
0.054194021970033646,
0.2240835726261139,
0.13503669202327728,
0.010768093168735504,
0.2819240987300873,
0.1685357391834259,
0.23479631543159485,
0.5268849730491638,
0.3851965069770813,
-0.30154949426651,
0.2789318859577179,
-0.17940008640289307,
0.20353272557258606,
0.1899653673171997,
0.0022901957854628563,
0.06357346475124359,
0.29363805055618286,
0.15330848097801208,
-0.13724219799041748,
-0.11648217588663101,
0.5331606268882751,
-0.17673243582248688,
-0.6855970025062561,
-0.5303876399993896,
0.42587652802467346,
0.1715833693742752,
-0.09326614439487457,
0.08881602436304092,
0.04381391406059265,
-0.08244673907756805,
0.27443617582321167,
-0.1594196856021881,
1.0479168891906738,
0.18977566063404083,
0.019600654020905495,
0.3846835494041443,
-0.29024118185043335,
-0.05332256853580475,
0.08075308799743652,
0.09040863811969757,
-0.34146466851234436,
-0.1680145114660263,
-0.1806153506040573,
0.08644482493400574,
0.48924919962882996,
0.03084995411336422,
-0.5301406383514404,
-0.0032093266490846872,
-0.008938416838645935,
-0.1233857125043869,
0.03638876974582672,
0.2532185912132263,
-0.46051838994026184,
-0.18847592175006866,
-0.022391900420188904,
-0.0031646378338336945,
-0.14782273769378662,
0.3842707574367523,
0.07754245400428772,
-0.11576327681541443,
-0.13675576448440552,
-0.1626654416322708,
-0.6275655031204224,
0.2532406449317932,
-0.016080327332019806,
-0.13044483959674835,
-0.32236212491989136,
-0.411224901676178,
0.4510806202888489,
0.5358884334564209,
0.06602369248867035,
0.138490691781044,
-0.17326074838638306,
-0.1544751077890396,
0.11809761077165604,
-0.014852261170744896,
0.014373213052749634,
-0.05623750761151314,
0.3431381583213806,
-0.12693262100219727,
-0.464518666267395,
0.3603542745113373,
0.17488926649093628,
0.02062094956636429,
-0.08465266972780228,
-0.24607150256633759,
0.18032456934452057,
-0.31146395206451416,
-0.35930490493774414,
-0.2176400125026703,
-0.23825424909591675,
-0.11984457075595856,
-0.027662955224514008,
0.1231284961104393,
-0.32067328691482544,
0.026523128151893616,
-0.058838460594415665,
-0.1054571121931076,
0.02276301383972168,
0.4312073588371277,
0.1988508403301239,
0.014788132160902023,
0.5652408599853516,
0.42207255959510803,
-0.10901609063148499,
-0.09707016497850418,
0.020039238035678864,
0.12169071286916733,
-0.3632780909538269,
-0.15508326888084412,
0.05830194801092148,
0.11540265381336212,
-0.11942357569932938,
0.09613096714019775,
-0.2689732313156128,
0.018947359174489975,
-0.22662431001663208,
-0.39459097385406494,
-0.21488094329833984,
0.08426180481910706,
0.10662579536437988,
0.25292545557022095,
-0.06663474440574646,
0.016630878672003746,
0.3981589674949646,
-0.09386877715587616,
-0.13786232471466064,
-0.23990224301815033,
0.07698382437229156,
0.0487283319234848,
0.25630927085876465,
0.2579752504825592,
0.012106744572520256,
-0.20614023506641388,
-0.059692203998565674,
0.09645022451877594,
-0.15678627789020538,
0.05013345927000046,
-0.03265748918056488,
0.24393190443515778,
0.260712593793869,
-0.34704479575157166,
-0.16209107637405396,
-0.23035752773284912,
-0.06959736347198486,
-0.00258041825145483,
-0.18078170716762543,
0.36481431126594543,
-0.10104392468929291,
0.23016634583473206,
0.02622278407216072,
0.010959841310977936,
0.09263432025909424,
0.18185989558696747,
-0.03046277165412903,
0.27107182145118713,
-0.03399486467242241,
0.20062436163425446,
0.15414412319660187,
-0.22111710906028748,
-0.17237107455730438,
-0.055146224796772,
0.05558650940656662,
0.1135154440999031,
0.39989280700683594,
-0.3946072459220886,
0.4059690535068512,
0.35828647017478943,
0.5005757808685303,
0.20270654559135437,
-0.02837383933365345,
-0.10133884102106094,
0.1681930124759674,
-0.03158627450466156,
-0.3785113990306854,
0.013895435258746147,
0.1937825232744217,
0.0438566617667675,
0.06640596687793732,
0.23538097739219666,
-0.23115918040275574,
0.11656159162521362,
0.15350526571273804,
-0.10937368869781494,
0.14942115545272827,
0.043548133224248886,
0.4743017256259918,
0.6027226448059082,
-0.0528096966445446,
0.13444264233112335,
-0.05092699080705643,
0.009715145453810692,
0.014043629169464111,
0.2826484441757202,
-0.23732510209083557,
0.23389478027820587,
-0.005982622504234314,
0.03163376823067665,
0.1333492398262024,
-0.5553473830223083,
0.02787593938410282,
0.10611972957849503,
-0.17159578204154968,
0.23389646410942078,
0.05953773111104965,
0.43889501690864563,
-0.17057709395885468,
-0.05239623785018921,
-0.14429031312465668,
0.2552867531776428,
-0.015396121889352798,
0.05652777478098869,
-0.48410478234291077,
-0.19314271211624146,
-0.39276617765426636,
-0.07685502618551254,
0.00404815748333931,
0.21432174742221832,
-0.218071848154068,
0.22083096206188202,
-0.1675809770822525,
-0.22354617714881897,
0.09316328912973404,
0.02162363938987255,
0.0918937623500824,
-0.1810891479253769,
0.23401089012622833,
0.40994030237197876,
0.13449077308177948,
0.3872469961643219,
0.4627596437931061,
0.5124799609184265,
0.38993749022483826,
-0.03090175986289978,
0.08900686353445053,
-0.15918590128421783,
-0.13834412395954132,
0.11942677199840546,
0.11069265007972717,
0.34439361095428467,
0.34492772817611694,
0.29463905096054077,
-0.05396295338869095,
0.03603307157754898,
0.4482569396495819,
0.1378292441368103,
0.28658825159072876,
-0.2322598248720169,
0.294379323720932,
-0.25018274784088135,
-0.13695287704467773,
-0.19625648856163025,
-0.33103707432746887,
-0.5546830892562866,
0.29295265674591064,
0.1232697069644928,
-0.1384172886610031,
0.0644763633608818,
-0.43012428283691406,
-0.05932038277387619,
0.1927010416984558,
0.36222803592681885,
0.4935462772846222,
0.010018520057201385,
-0.04887137562036514,
-0.2295483499765396,
-0.7951694130897522,
0.09773166477680206,
0.13334523141384125,
0.0257630106061697,
0.0532953105866909,
-0.02882365882396698,
0.03486960008740425,
0.28122448921203613,
0.12841030955314636,
-0.10475298017263412,
-0.14895795285701752,
0.4537605345249176,
-0.06347045302391052,
-0.08448565006256104,
0.010583773255348206,
0.3214209973812103,
-0.3026830554008484,
-0.2612749934196472,
0.20081984996795654,
-0.010487020015716553,
-0.04913441091775894,
-0.04067148268222809,
-0.16028860211372375,
-0.2659476697444916,
-0.40236696600914,
0.23082807660102844,
0.19630640745162964,
0.5404234528541565,
-0.1263551115989685,
0.06909248232841492,
-0.2003723680973053,
0.16268181800842285,
-0.3155001997947693,
0.16949263215065002,
0.2922670543193817,
0.7359201908111572,
-0.27230963110923767,
-0.0960559993982315,
-0.25052449107170105,
0.14374229311943054,
-0.09774092584848404,
-0.08951663225889206,
-0.3007185161113739,
0.08231966197490692,
-0.2265828251838684,
-0.08743252605199814,
0.043694812804460526,
0.1277354657649994,
-0.024422064423561096,
0.1138216108083725,
-0.35425865650177,
-0.32436248660087585,
0.4241366386413574,
-0.2797048091888428,
-0.16762493550777435,
-0.17330479621887207,
0.11110400408506393,
0.1321849226951599,
-0.09011714905500412,
-0.44985732436180115,
0.11394999176263809,
0.19199395179748535,
-0.013968009501695633,
0.502316951751709,
-0.0000220639631152153,
-0.207024946808815,
-0.05369037017226219,
-0.11710898578166962,
0.5552496314048767,
0.18773436546325684,
-0.21167053282260895,
0.1941850483417511,
-0.32323819398880005
] |
https://github.com/huggingface/datasets/issues/4934 | Dataset Viewer issue for indonesian-nlp/librivox-indonesia | Hi @albertvillanova , I just add the streaming functionality and it works in the first try :-) Thanks a lot! | ### Link
https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia
### Description
I created a new speech dataset https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia, but the dataset preview doesn't work with following error message:
```
Server error
Status code: 400
Exception: TypeError
Message: unsupported operand type(s) for +: 'NoneType' and 'str'
```
Please help, I am not sure what the problem here is. Thanks a lot.
### Owner
Yes | 20 | Dataset Viewer issue for indonesian-nlp/librivox-indonesia
### Link
https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia
### Description
I created a new speech dataset https://huggingface.co/datasets/indonesian-nlp/librivox-indonesia, but the dataset preview doesn't work with following error message:
```
Server error
Status code: 400
Exception: TypeError
Message: unsupported operand type(s) for +: 'NoneType' and 'str'
```
Please help, I am not sure what the problem here is. Thanks a lot.
### Owner
Yes
Hi @albertvillanova , I just add the streaming functionality and it works in the first try :-) Thanks a lot! | [
-0.34486499428749084,
-0.2571355700492859,
0.06895390152931213,
0.37012165784835815,
0.08971190452575684,
-0.11604533344507217,
0.0346599817276001,
0.31046828627586365,
0.04626113548874855,
0.07675070315599442,
-0.355891615152359,
-0.06869317591190338,
-0.15445725619792938,
0.09789792448282242,
-0.1836918294429779,
-0.45463743805885315,
0.14179596304893494,
0.2835756540298462,
0.07201088219881058,
0.044562213122844696,
-0.3295346200466156,
-0.0346398800611496,
-0.5344351530075073,
0.07642892748117447,
0.21638669073581696,
-0.10749515146017075,
-0.14103075861930847,
-0.20010963082313538,
-0.28298935294151306,
-0.39515379071235657,
0.06575636565685272,
0.05607345327734947,
0.40244731307029724,
0.3634570837020874,
-0.00013353032409213483,
0.08300453424453735,
0.5075832009315491,
-0.04002319276332855,
-0.17181260883808136,
-0.2472989410161972,
0.03863257169723511,
0.07766096293926239,
0.061502598226070404,
-0.21819156408309937,
-0.2670639753341675,
-0.37274548411369324,
0.11752214282751083,
-0.5343712568283081,
0.31928154826164246,
0.4410181939601898,
0.07311705499887466,
0.05038410425186157,
-0.21462322771549225,
-0.03520645946264267,
0.030649982392787933,
0.3661375045776367,
-0.3211316764354706,
-0.3425205647945404,
0.25656256079673767,
0.39389568567276,
-0.2283947467803955,
0.11006152629852295,
-0.21470476686954498,
-0.01657732203602791,
0.057369016110897064,
-0.30726608633995056,
-0.3557833731174469,
-0.507232666015625,
0.25444263219833374,
0.45324328541755676,
0.9924792647361755,
-0.00745449960231781,
-0.3112944960594177,
0.10013870149850845,
0.1514274924993515,
-0.12825074791908264,
0.09345545619726181,
0.19077590107917786,
-0.22657503187656403,
0.14979980885982513,
-0.07770289480686188,
-0.3560003638267517,
-0.2909321188926697,
0.3207598924636841,
0.1641463190317154,
0.3509180545806885,
-0.13279205560684204,
0.19769150018692017,
0.10339883714914322,
-0.32826483249664307,
0.1069135069847107,
-0.2889377772808075,
-0.14167442917823792,
0.15025733411312103,
-0.2896086573600769,
0.022412046790122986,
0.08663538843393326,
0.12370935082435608,
0.0038609690964221954,
0.035910073667764664,
0.08509217947721481,
0.31685754656791687,
-0.1037493422627449,
0.08286528289318085,
0.030951760709285736,
-0.02307058870792389,
0.2820012867450714,
0.2972453534603119,
0.42126286029815674,
0.09051733464002609,
0.21770930290222168,
-0.02321600914001465,
-0.2857632637023926,
-0.0795973613858223,
-0.26868826150894165,
-0.08980003744363785,
0.31672072410583496,
-0.21176601946353912,
-0.11284530907869339,
0.16429263353347778,
-0.20560121536254883,
-0.16816572844982147,
0.24225018918514252,
0.2878250181674957,
-0.1840326488018036,
0.0856013372540474,
-0.10323947668075562,
0.5947620868682861,
-0.16403333842754364,
-0.34724700450897217,
0.08477485179901123,
-0.18840113282203674,
-0.17225319147109985,
-0.08192550390958786,
0.144494891166687,
-0.1396445482969284,
-0.11412379890680313,
0.0241997130215168,
0.0381777323782444,
0.10318073630332947,
-0.05133984982967377,
-0.2449498027563095,
0.07518492639064789,
0.027681497856974602,
0.1829448640346527,
0.010347159579396248,
0.09541450440883636,
-0.09055127203464508,
0.013821743428707123,
0.4661773145198822,
0.10829325020313263,
-0.2717277705669403,
-0.4655926525592804,
-0.038340725004673004,
-0.2893053889274597,
0.004055678844451904,
-0.11464130133390427,
0.43285343050956726,
-0.05800104886293411,
-0.396241694688797,
-0.17532339692115784,
0.05055442452430725,
-0.47381097078323364,
-0.09794381260871887,
0.07463286072015762,
0.4026782512664795,
-0.3376675546169281,
-0.15504364669322968,
-0.39950594305992126,
-0.19233234226703644,
0.26444369554519653,
0.3152637183666229,
-0.0847729966044426,
-0.00044968724250793457,
-0.40375885367393494,
0.21256034076213837,
0.8283161520957947,
-0.20497438311576843,
-0.4163361191749573,
0.3252656161785126,
0.024928726255893707,
0.11932449787855148,
0.37184473872184753,
0.13319826126098633,
0.42877721786499023,
-0.01697290875017643,
-0.294272780418396,
0.011948141269385815,
0.10308273136615753,
0.012931117787957191,
-0.184377059340477,
-0.019463732838630676,
0.4005570411682129,
0.06768380105495453,
0.19832435250282288,
0.23178482055664062,
0.17822250723838806,
0.047670040279626846,
0.41820552945137024,
-0.14166593551635742,
0.2978173792362213,
-0.09373354911804199,
0.13035523891448975,
0.07160750776529312,
-0.012612175196409225,
-0.10848627984523773,
-0.25545579195022583,
-0.09368368983268738,
-0.020716287195682526,
0.22028985619544983,
-0.030846133828163147,
-0.08711260557174683,
-0.2799540162086487,
-0.0788603276014328,
-0.24256302416324615,
0.05566423386335373,
-0.006162572652101517,
0.27813202142715454,
0.1165735274553299,
0.25887009501457214,
0.030224334448575974,
0.15728142857551575,
0.10861027240753174,
-0.04645760357379913,
-0.19049736857414246,
0.31164976954460144,
-0.08606507629156113,
-0.0368027426302433,
0.15112394094467163,
0.2810230851173401,
0.38134652376174927,
-0.02262888289988041,
-0.33164581656455994,
0.3586813807487488,
-0.1290356069803238,
0.2290962189435959,
0.1715441793203354,
-0.03343978524208069,
0.33668598532676697,
-0.588096559047699,
0.2595656216144562,
0.25366920232772827,
0.14308835566043854,
-0.09096866846084595,
-0.18037647008895874,
0.12786827981472015,
0.3389780819416046,
0.14453238248825073,
0.053374335169792175,
0.12457706779241562,
0.20886477828025818,
0.13644783198833466,
-0.2638973295688629,
-0.15808627009391785,
0.3521960377693176,
-0.15707775950431824,
0.27889490127563477,
-0.016998572275042534,
-0.5946342349052429,
-0.13493245840072632,
0.014419648796319962,
-0.007583649829030037,
0.2332008183002472,
0.21285530924797058,
-0.12473302334547043,
-0.09132406115531921,
0.025308383628726006,
-0.2658016085624695,
0.2273498922586441,
0.1447361260652542,
0.012799963355064392,
0.07146032154560089,
0.03680983558297157,
-0.31742843985557556,
0.08154786378145218,
0.06757602840662003,
0.09378252178430557,
0.24620592594146729,
0.061143141239881516,
-0.08262667804956436,
-0.3017938435077667,
-0.15291482210159302,
0.19706915318965912,
0.37263283133506775,
-0.2218913435935974,
-0.31396976113319397,
-0.2699131965637207,
-0.8643280267715454,
-0.15058407187461853,
-0.10799427330493927,
-0.13895383477210999,
-0.31551119685173035,
-0.05259901285171509,
0.21763981878757477,
-0.07024775445461273,
0.15373294055461884,
-0.3941083252429962,
0.3170912265777588,
0.1327362209558487,
0.31429651379585266,
-0.11526874452829361,
0.046072375029325485,
-0.21642327308654785,
-0.025306077674031258,
0.3928091526031494,
0.0007901364006102085,
0.23849329352378845,
-0.06641942262649536,
0.28507500886917114,
-0.44490551948547363,
-0.24846023321151733,
0.1814376711845398,
0.14201155304908752,
0.11868160963058472,
-0.0434689074754715,
0.09036662429571152,
0.041927650570869446,
-0.051136575639247894,
0.2697005867958069,
-0.07645754516124725,
-0.05846104025840759,
0.2886713743209839,
0.05041184648871422,
-0.014428343623876572,
0.1310022622346878,
-0.4210534989833832,
-0.20107847452163696,
-0.6247520446777344,
-0.09938451647758484,
-0.2732396423816681,
0.20111162960529327,
0.03408340737223625,
-0.08841507136821747,
0.07641369849443436,
0.11935830116271973,
-0.030713526532053947,
-0.20910270512104034,
-0.17901352047920227,
0.4017829895019531,
-0.3381592631340027,
-0.49208685755729675,
0.14595291018486023,
0.06764157861471176,
0.16174013912677765,
0.04394391179084778,
-0.4400056004524231,
0.4509405493736267,
-0.06635722517967224,
0.10232909023761749,
0.11588951200246811,
-0.3462257981300354,
0.043983809649944305,
-0.08219807595014572,
0.13041475415229797,
-0.16369786858558655,
-0.0701320469379425,
-0.06457158178091049,
-0.39408165216445923,
0.2926120162010193,
0.2775123417377472,
0.3879902958869934,
0.005411569029092789,
0.2652689218521118,
0.3726098835468292,
0.2218121439218521,
0.6652193069458008,
0.010285088792443275,
0.30351707339286804,
0.09823314845561981,
-0.48118218779563904,
0.27923256158828735,
0.11850084364414215,
0.09150838851928711,
0.36615753173828125,
-0.07672574371099472,
-0.5189570188522339,
-0.4160129129886627,
-0.07381752878427505,
-0.19480085372924805,
-0.08145429939031601,
0.17531731724739075,
-0.4748527407646179,
0.19533054530620575,
0.010947808623313904,
0.027903728187084198,
-0.07092223316431046,
-0.31966355443000793,
-0.2135489284992218,
0.1834535300731659,
0.223495215177536,
-0.006538663059473038,
-0.2710159718990326,
-0.20765332877635956,
-0.3848826289176941,
0.4818546772003174,
0.08973868936300278,
0.7000153064727783,
-0.256852924823761,
0.08173114061355591,
0.16204515099525452,
0.2696163058280945,
0.6116504669189453,
-0.48400241136550903,
-0.10441426932811737,
0.15329432487487793,
0.2907363474369049,
-0.4065926671028137,
0.13447576761245728,
-0.07777460664510727,
0.3950788378715515,
0.20529267191886902,
0.33153438568115234,
-0.0882212445139885,
-0.061560485512018204,
0.1454772651195526,
0.09613212198019028,
-0.1680092215538025,
-0.3516567349433899,
-0.20191062986850739,
-0.03410864621400833,
-0.19508640468120575,
-0.01798667013645172,
-0.2475697100162506,
0.31058910489082336,
-0.178403839468956,
-0.06661084294319153,
0.01968822441995144,
-0.04438202083110809,
-0.02344314008951187,
0.07670342922210693,
0.18120956420898438,
0.24611473083496094,
0.04990313574671745,
0.2158757597208023,
0.3094237446784973,
0.17012929916381836,
0.4608566164970398,
0.38155218958854675,
-0.1904248297214508,
0.33905255794525146,
-0.23786932229995728,
0.173252671957016,
0.14145924150943756,
0.06324826925992966,
0.11602156609296799,
0.2383413463830948,
0.1250210702419281,
-0.07185829430818558,
-0.09106152504682541,
0.546589732170105,
-0.12917624413967133,
-0.8008818626403809,
-0.4187999367713928,
0.35373547673225403,
0.19585247337818146,
-0.09013380110263824,
0.16170191764831543,
0.18639017641544342,
-0.08733721822500229,
0.1283341497182846,
-0.035928405821323395,
1.0291506052017212,
0.16401013731956482,
-0.08929568529129028,
0.297336608171463,
-0.40000808238983154,
0.08687657862901688,
0.0892593264579773,
0.14893019199371338,
-0.2955169379711151,
-0.11253370344638824,
-0.1914549022912979,
0.07738056778907776,
0.525471031665802,
-0.03249793499708176,
-0.4585314989089966,
-0.09380445629358292,
0.10542431473731995,
0.00860774889588356,
0.07387257367372513,
0.20285381376743317,
-0.3491634726524353,
-0.11836627125740051,
-0.0051909759640693665,
-0.02954901196062565,
-0.2887890934944153,
0.28168341517448425,
0.0019459212198853493,
-0.10288403183221817,
-0.11495199799537659,
-0.12797996401786804,
-0.6201756596565247,
0.19078785181045532,
0.08763948827981949,
-0.038399837911129,
-0.2913172245025635,
-0.30569934844970703,
0.46005338430404663,
0.47132036089897156,
0.09751801192760468,
0.0907554179430008,
-0.2289404571056366,
-0.08834666013717651,
0.057089075446128845,
-0.05811872333288193,
-0.042880188673734665,
-0.06350194662809372,
0.3213556110858917,
-0.1238405629992485,
-0.4928159713745117,
0.4537334442138672,
0.1659696251153946,
0.007812049239873886,
-0.24414801597595215,
-0.254372239112854,
0.1534700244665146,
-0.35625696182250977,
-0.2865031063556671,
-0.2118316888809204,
-0.20881135761737823,
-0.09778283536434174,
-0.05100248381495476,
0.12956276535987854,
-0.3296148478984833,
0.032180894166231155,
0.08785906434059143,
-0.15870743989944458,
-0.008232813328504562,
0.3904804289340973,
0.22753694653511047,
0.06970103085041046,
0.4499713182449341,
0.4487074613571167,
-0.11524416506290436,
-0.08086849749088287,
0.07977256923913956,
0.012736973352730274,
-0.3259068429470062,
-0.14232364296913147,
-0.030221881344914436,
0.11488328874111176,
-0.12716896831989288,
0.04650785028934479,
-0.29074662923812866,
0.12120789289474487,
-0.08494860678911209,
-0.3172827363014221,
-0.2519683241844177,
0.04695739597082138,
-0.02650640532374382,
0.2384808361530304,
-0.028533147647976875,
-0.013384655117988586,
0.44949057698249817,
-0.022159570828080177,
-0.10891751199960709,
-0.19986701011657715,
-0.013680798932909966,
0.07518239319324493,
0.12958475947380066,
0.23260724544525146,
-0.16506461799144745,
-0.19591444730758667,
-0.12017785012722015,
0.06681564450263977,
-0.14433811604976654,
0.057648561894893646,
0.004188753664493561,
0.25667792558670044,
0.3326568007469177,
-0.3588198125362396,
-0.17327699065208435,
-0.3305132985115051,
-0.10175026953220367,
0.18051128089427948,
-0.27226582169532776,
0.1494438350200653,
-0.10623526573181152,
0.23970262706279755,
0.07835780829191208,
-0.16832539439201355,
0.08049916476011276,
0.24935707449913025,
0.09490382671356201,
0.3013995587825775,
-0.07524891942739487,
0.22590386867523193,
0.2235870361328125,
-0.218036949634552,
-0.18197157979011536,
-0.070697121322155,
0.04739951342344284,
0.07903119176626205,
0.30923008918762207,
-0.39507007598876953,
0.4432104825973511,
0.4227304458618164,
0.4629339873790741,
0.14824414253234863,
0.02283492125570774,
-0.11652938276529312,
0.21107888221740723,
-0.08012377470731735,
-0.4306897521018982,
0.005004440434277058,
0.35556548833847046,
0.05589256063103676,
0.02842722460627556,
0.167327880859375,
-0.14663977921009064,
0.18255984783172607,
0.15311363339424133,
-0.08772873133420944,
0.06270463019609451,
0.006569601595401764,
0.46060317754745483,
0.7021299004554749,
-0.11722788214683533,
0.14073120057582855,
0.017044225707650185,
0.01749001443386078,
-0.06454398483037949,
0.3858874440193176,
-0.1086716428399086,
0.26498109102249146,
0.059623196721076965,
0.1628762036561966,
0.21994605660438538,
-0.45646601915359497,
0.11177721619606018,
0.12640216946601868,
-0.13269619643688202,
0.19448432326316833,
0.016722112894058228,
0.321847528219223,
-0.00499484408646822,
-0.1942741721868515,
-0.18430964648723602,
0.3184584081172943,
-0.15742287039756775,
0.07719448208808899,
-0.47921615839004517,
-0.22781676054000854,
-0.3281491696834564,
0.05850791558623314,
-0.022103849798440933,
0.2509518265724182,
-0.21104109287261963,
0.17539623379707336,
-0.18082405626773834,
-0.39285147190093994,
0.13547658920288086,
0.12620335817337036,
0.09344758838415146,
-0.20288553833961487,
0.2891029119491577,
0.3217465281486511,
0.05798754841089249,
0.3004154860973358,
0.55948406457901,
0.4223061800003052,
0.37659063935279846,
-0.07098683714866638,
0.08132661879062653,
-0.034783653914928436,
-0.10460693389177322,
0.07285334169864655,
0.1858202964067459,
0.5135682821273804,
0.2484222948551178,
0.25915268063545227,
-0.11294077336788177,
0.0710260421037674,
0.5815972685813904,
0.13768020272254944,
0.2260202169418335,
-0.20984669029712677,
0.23651301860809326,
-0.2854907512664795,
-0.1050201952457428,
-0.16718150675296783,
-0.3909492790699005,
-0.4861014187335968,
0.34823983907699585,
0.19537730515003204,
-0.2644253969192505,
0.07786229252815247,
-0.4792996048927307,
-0.08183062076568604,
0.15609000623226166,
0.4637146294116974,
0.4645425081253052,
0.09111659228801727,
-0.04068506881594658,
-0.2686648368835449,
-0.7194165587425232,
0.10948748141527176,
0.09507333487272263,
0.01175733469426632,
0.04954257607460022,
-0.027496494352817535,
-0.07582653313875198,
0.18488870561122894,
0.20286114513874054,
-0.01702076569199562,
-0.06041565537452698,
0.4339609146118164,
-0.14303380250930786,
-0.052422430366277695,
0.0743509829044342,
0.34105750918388367,
-0.35191085934638977,
-0.17793458700180054,
0.35344552993774414,
0.2183307558298111,
-0.07811754196882248,
-0.011407334357500076,
-0.1482924371957779,
-0.22175508737564087,
-0.3423372209072113,
0.12927399575710297,
0.19250455498695374,
0.5838516354560852,
-0.04334557428956032,
0.1566879004240036,
-0.18458640575408936,
0.04941602423787117,
-0.22568075358867645,
0.23761871457099915,
0.3711662292480469,
0.6277568340301514,
-0.3181166648864746,
-0.01089499145746231,
-0.13356615602970123,
-0.03826243802905083,
-0.08229243010282516,
0.15543431043624878,
-0.30758365988731384,
0.039582908153533936,
-0.20511361956596375,
-0.11380259692668915,
0.052496690303087234,
0.09600380063056946,
0.037043921649456024,
0.055452458560466766,
-0.2739947438240051,
-0.28132593631744385,
0.3638008236885071,
-0.23232786357402802,
-0.1927465796470642,
-0.15055502951145172,
0.03150412440299988,
0.2868216037750244,
-0.15188032388687134,
-0.5066277384757996,
-0.039253342896699905,
0.2938009798526764,
-0.05270509421825409,
0.5748438835144043,
0.07268042862415314,
-0.030127011239528656,
-0.03439971059560776,
-0.14194992184638977,
0.5074676275253296,
0.2599624991416931,
-0.22101017832756042,
0.232427179813385,
-0.28955477476119995
] |
https://github.com/huggingface/datasets/issues/4933 | Dataset/DatasetDict.filter() cannot have `batched=True` due to `mask` (numpy array?) being non-iterable. | Hi ! When `batched=True`, you filter function must take a batch as input, and return a list of booleans.
In your case, something like
```python
from datasets import load_dataset
ds_mc4_ja = load_dataset("mc4", "ja") # This will take 6+ hours... perhaps test it with a toy dataset instead?
ds_mc4_ja_2020 = ds_mc4_ja.filter(
lambda batch: [timestamp[:4] == "2020" for timestamp in batch["timestamp"]],
batched=True,
)
```
Let me know if it helps ! | ## Describe the bug
`Dataset/DatasetDict.filter()` cannot have `batched=True` due to `mask` (numpy array?) being non-iterable.
## Steps to reproduce the bug
(In a python 3.7.12 env, I've tried 2.4.0 and 2.3.2 with both `pyarraw==9.0.0` and `pyarrow==8.0.0`.)
```python
from datasets import load_dataset
ds_mc4_ja = load_dataset("mc4", "ja") # This will take 6+ hours... perhaps test it with a toy dataset instead?
ds_mc4_ja_2020 = ds_mc4_ja.filter(
lambda example: example["timestamp"][:4] == "2020",
batched=True,
)
```
## Expected results
No error
## Actual results
```python
---------------------------------------------------------------------------
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 524, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py", line 480, in wrapper
out = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2779, in _map_single
offset=offset,
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2655, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2347, in decorated
result = f(decorated_item, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 4946, in get_indices_from_mask_function
indices_array = [i for i, to_keep in zip(indices, mask) if to_keep]
TypeError: zip argument #2 must support iteration
"""
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
/tmp/ipykernel_51348/2345782281.py in <module>
7 batched=True,
8 # batch_size=10_000,
----> 9 num_proc=111,
10 )
11 # ds_mc4_ja_clean_2020 = ds_mc4_ja.filter(
/opt/conda/lib/python3.7/site-packages/datasets/dataset_dict.py in filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, fn_kwargs, num_proc, desc)
878 desc=desc,
879 )
--> 880 for k, dataset in self.items()
881 }
882 )
/opt/conda/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
878 desc=desc,
879 )
--> 880 for k, dataset in self.items()
881 }
882 )
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
522 }
523 # apply actual function
--> 524 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
525 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
526 # re-apply format to the output
/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
478 # Call actual function
479
--> 480 out = func(self, *args, **kwargs)
481
482 # Update fingerprint of in-place transforms + update in-place history of transforms
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2920 new_fingerprint=new_fingerprint,
2921 input_columns=input_columns,
-> 2922 desc=desc,
2923 )
2924 new_dataset = copy.deepcopy(self)
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2498
2499 for index, async_result in results.items():
-> 2500 transformed_shards[index] = async_result.get()
2501
2502 assert (
/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in get(self, timeout)
655 return self._value
656 else:
--> 657 raise self._value
658
659 def _set(self, i, obj):
TypeError: zip argument #2 must support iteration
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-debian-10.12
- Python version: 3.7.12
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
(I've tried 2.4.0 and 2.3.2 with both `pyarraw==9.0.0` and `pyarrow==8.0.0`.) | 69 | Dataset/DatasetDict.filter() cannot have `batched=True` due to `mask` (numpy array?) being non-iterable.
## Describe the bug
`Dataset/DatasetDict.filter()` cannot have `batched=True` due to `mask` (numpy array?) being non-iterable.
## Steps to reproduce the bug
(In a python 3.7.12 env, I've tried 2.4.0 and 2.3.2 with both `pyarraw==9.0.0` and `pyarrow==8.0.0`.)
```python
from datasets import load_dataset
ds_mc4_ja = load_dataset("mc4", "ja") # This will take 6+ hours... perhaps test it with a toy dataset instead?
ds_mc4_ja_2020 = ds_mc4_ja.filter(
lambda example: example["timestamp"][:4] == "2020",
batched=True,
)
```
## Expected results
No error
## Actual results
```python
---------------------------------------------------------------------------
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 524, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py", line 480, in wrapper
out = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2779, in _map_single
offset=offset,
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2655, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2347, in decorated
result = f(decorated_item, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 4946, in get_indices_from_mask_function
indices_array = [i for i, to_keep in zip(indices, mask) if to_keep]
TypeError: zip argument #2 must support iteration
"""
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
/tmp/ipykernel_51348/2345782281.py in <module>
7 batched=True,
8 # batch_size=10_000,
----> 9 num_proc=111,
10 )
11 # ds_mc4_ja_clean_2020 = ds_mc4_ja.filter(
/opt/conda/lib/python3.7/site-packages/datasets/dataset_dict.py in filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, fn_kwargs, num_proc, desc)
878 desc=desc,
879 )
--> 880 for k, dataset in self.items()
881 }
882 )
/opt/conda/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
878 desc=desc,
879 )
--> 880 for k, dataset in self.items()
881 }
882 )
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
522 }
523 # apply actual function
--> 524 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
525 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
526 # re-apply format to the output
/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
478 # Call actual function
479
--> 480 out = func(self, *args, **kwargs)
481
482 # Update fingerprint of in-place transforms + update in-place history of transforms
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2920 new_fingerprint=new_fingerprint,
2921 input_columns=input_columns,
-> 2922 desc=desc,
2923 )
2924 new_dataset = copy.deepcopy(self)
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2498
2499 for index, async_result in results.items():
-> 2500 transformed_shards[index] = async_result.get()
2501
2502 assert (
/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in get(self, timeout)
655 return self._value
656 else:
--> 657 raise self._value
658
659 def _set(self, i, obj):
TypeError: zip argument #2 must support iteration
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-debian-10.12
- Python version: 3.7.12
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
(I've tried 2.4.0 and 2.3.2 with both `pyarraw==9.0.0` and `pyarrow==8.0.0`.)
Hi ! When `batched=True`, you filter function must take a batch as input, and return a list of booleans.
In your case, something like
```python
from datasets import load_dataset
ds_mc4_ja = load_dataset("mc4", "ja") # This will take 6+ hours... perhaps test it with a toy dataset instead?
ds_mc4_ja_2020 = ds_mc4_ja.filter(
lambda batch: [timestamp[:4] == "2020" for timestamp in batch["timestamp"]],
batched=True,
)
```
Let me know if it helps ! | [
-0.25658684968948364,
-0.16881710290908813,
-0.09791384637355804,
-0.025695033371448517,
-0.15428903698921204,
0.011435210704803467,
0.562778651714325,
0.23456715047359467,
-0.04838250204920769,
0.07928235828876495,
0.019656455144286156,
0.1604590266942978,
-0.07456586509943008,
-0.02951924130320549,
-0.14152851700782776,
-0.07092024385929108,
-0.0015552341938018799,
0.040369756519794464,
-0.11934873461723328,
-0.023834306746721268,
-0.4159606993198395,
0.08696336299180984,
-0.46009355783462524,
-0.16388265788555145,
0.23473003506660461,
-0.3747185170650482,
-0.04573562368750572,
-0.05764935165643692,
0.03266524523496628,
-0.4665445387363434,
0.3821568489074707,
-0.062110964208841324,
0.019866663962602615,
0.5243544578552246,
-0.00011359495692886412,
-0.005177229642868042,
0.3062017560005188,
0.0032705385237932205,
-0.3907000720500946,
0.08098238706588745,
-0.0994449332356453,
-0.2445552945137024,
0.033360205590724945,
-0.28785082697868347,
-0.06933014839887619,
0.03515080735087395,
-0.16459685564041138,
-0.4901096522808075,
0.6029750108718872,
0.39175930619239807,
0.18175816535949707,
0.421832412481308,
-0.17634178698062897,
0.1347436010837555,
-0.14802446961402893,
0.21227408945560455,
-0.14625389873981476,
0.26123154163360596,
0.3280653953552246,
-0.20705264806747437,
0.03488638997077942,
0.3678063750267029,
-0.44322314858436584,
0.12288990616798401,
0.03868475183844566,
-0.009324566461145878,
0.2758815288543701,
-0.36968791484832764,
-0.0926532968878746,
-0.024627067148685455,
0.16372141242027283,
-0.25647956132888794,
-0.32131636142730713,
-0.38587161898612976,
-0.28259578347206116,
-0.21870975196361542,
0.16830700635910034,
0.11447673290967941,
-0.21786785125732422,
0.13520891964435577,
-0.35850152373313904,
0.3858749568462372,
-0.053482793271541595,
0.1477339267730713,
-0.03137960284948349,
0.32648107409477234,
0.14071807265281677,
0.2480257749557495,
-0.20288564264774323,
-0.22076503932476044,
0.5265979170799255,
-0.27533915638923645,
0.09287324547767639,
0.29906415939331055,
-0.1364055722951889,
-0.09915513545274734,
0.16315728425979614,
-0.214022696018219,
0.05984523147344589,
-0.019908498972654343,
-0.015056637115776539,
-0.08327506482601166,
0.18996599316596985,
0.15739521384239197,
0.21437223255634308,
0.053772371262311935,
0.22155719995498657,
0.21307015419006348,
0.15439769625663757,
-0.06946597248315811,
0.23016217350959778,
0.2161979377269745,
0.21512684226036072,
-0.21403518319129944,
0.10829126834869385,
0.10326991230249405,
0.27191615104675293,
0.10245448350906372,
-0.4207848012447357,
-0.18475225567817688,
-0.2922086715698242,
-0.10481803119182587,
0.10949649661779404,
0.10030218958854675,
0.08172398060560226,
-0.24733096361160278,
-0.0468161404132843,
0.06320349127054214,
-0.04215105250477791,
-0.24817562103271484,
-0.11115118116140366,
-0.17974865436553955,
-0.13449081778526306,
-0.09235439449548721,
0.2323954552412033,
-0.2145906686782837,
-0.07238027453422546,
0.13730640709400177,
-0.20162059366703033,
0.2701350450515747,
0.07014424353837967,
-0.1282224953174591,
0.41389769315719604,
0.4063706398010254,
0.008718855679035187,
0.24388451874256134,
0.40111249685287476,
-0.12381439656019211,
-0.04724922776222229,
0.18127837777137756,
-0.14655518531799316,
-0.00045783817768096924,
0.09418033808469772,
0.1660044640302658,
0.04757922142744064,
-0.00723685696721077,
-0.29664111137390137,
0.08917489647865295,
0.4758429527282715,
-0.24388650059700012,
0.25506022572517395,
-0.38100552558898926,
-0.21915790438652039,
-0.3779543936252594,
0.24819132685661316,
0.4201778769493103,
-0.5878582000732422,
0.14520008862018585,
-0.03983668237924576,
-0.13251027464866638,
0.4112146496772766,
0.2090093046426773,
0.024101383984088898,
0.05993889272212982,
-0.3028465211391449,
0.05875715613365173,
0.04263830929994583,
-0.276234894990921,
-0.35026833415031433,
0.13165748119354248,
-0.05806265398859978,
0.3784874975681305,
0.12900768220424652,
-0.05444356054067612,
0.016975823789834976,
-0.184645414352417,
0.23793907463550568,
0.47532862424850464,
-0.26680198311805725,
0.0018421988934278488,
-0.14289960265159607,
-0.08798031508922577,
0.3310611844062805,
-0.0053879451006650925,
0.12945663928985596,
0.18746957182884216,
0.1142522394657135,
-0.47121042013168335,
0.3756233751773834,
-0.03320831432938576,
0.14082081615924835,
-0.0890566036105156,
0.38708871603012085,
-0.06334429979324341,
0.22139784693717957,
-0.2292868196964264,
-0.22355422377586365,
0.139031320810318,
-0.07429011911153793,
-0.1590343862771988,
-0.29903215169906616,
-0.25124242901802063,
0.0052352175116539,
0.16252508759498596,
-0.3475087881088257,
-0.23954981565475464,
0.12929829955101013,
0.16460588574409485,
0.17328327894210815,
-0.1740952432155609,
-0.10137039422988892,
0.3776317238807678,
-0.07987083494663239,
-0.09215722233057022,
-0.48363766074180603,
0.1369631588459015,
-0.03551594913005829,
-0.24514496326446533,
-0.09483196586370468,
0.19180063903331757,
0.40698155760765076,
-0.07186158746480942,
-0.040925804525613785,
0.20667141675949097,
-0.08951407670974731,
-0.3339049220085144,
-0.29091617465019226,
-0.22682951390743256,
0.08105961978435516,
-0.1280345618724823,
-0.07543040812015533,
0.5048749446868896,
-0.004494960885494947,
-0.0784187912940979,
-0.10838938504457474,
0.42841076850891113,
-0.03936531022191048,
0.48124513030052185,
0.01947776973247528,
0.20213089883327484,
0.37869569659233093,
0.08623358607292175,
-0.22175586223602295,
-0.25119858980178833,
0.21822933852672577,
-0.08642420172691345,
0.17039790749549866,
-0.1539032906293869,
-0.1484907865524292,
0.42041313648223877,
0.1693885326385498,
0.24548572301864624,
0.11542972922325134,
0.006137993186712265,
0.01779131591320038,
-0.040150608867406845,
0.17734986543655396,
0.06902801990509033,
0.22981001436710358,
0.1277742087841034,
-0.12771645188331604,
-0.059505999088287354,
-0.05648423731327057,
-0.11419039219617844,
0.09075622260570526,
0.25687333941459656,
0.18754249811172485,
0.05249001830816269,
0.2437344789505005,
0.017194714397192,
-0.12358501553535461,
-0.5327531099319458,
-0.13188450038433075,
0.020087778568267822,
-0.29633522033691406,
0.23400191962718964,
-0.25279080867767334,
-0.33419913053512573,
-0.12297971546649933,
-0.006371813826262951,
0.030283410102128983,
-0.27259302139282227,
-0.038886599242687225,
0.40919750928878784,
-0.18902936577796936,
0.17611850798130035,
0.10270006954669952,
0.2956925630569458,
0.2057398557662964,
-0.09970369189977646,
-0.3595629036426544,
-0.13375376164913177,
-0.10272163897752762,
0.06839178502559662,
0.012972093187272549,
-0.12489727139472961,
0.43841224908828735,
-0.040131665766239166,
-0.19638283550739288,
-0.2545768618583679,
-0.1269856095314026,
-0.09059576690196991,
-0.05857820063829422,
0.43390825390815735,
0.08346244692802429,
0.18276967108249664,
-0.1619628369808197,
-0.1993875652551651,
0.1499447226524353,
-0.03546919673681259,
-0.19433410465717316,
0.10195763409137726,
-0.07589743286371231,
0.06155114248394966,
-0.06705938279628754,
-0.2045811116695404,
-0.6066888570785522,
-0.30046769976615906,
0.0371512845158577,
-0.07995422184467316,
0.23843376338481903,
0.3459842801094055,
0.03269265964627266,
0.0626133605837822,
-0.23011068999767303,
-0.12940508127212524,
-0.10811436176300049,
0.09442499279975891,
0.05139122158288956,
-0.20261941850185394,
-0.2812916338443756,
-0.15411002933979034,
-0.20022067427635193,
-0.1647731363773346,
0.26918089389801025,
-0.1523510366678238,
0.07322769612073898,
-0.20218521356582642,
0.2635840177536011,
0.029459213837981224,
-0.07268500328063965,
0.23583672940731049,
0.05781068652868271,
-0.06345055997371674,
-0.2707400918006897,
-0.16227465867996216,
-0.1521848440170288,
-0.005567844957113266,
0.14743444323539734,
0.2674174904823303,
0.657268226146698,
0.02747325971722603,
0.7759680151939392,
0.595315158367157,
0.10201218724250793,
0.2640613317489624,
0.029955346137285233,
0.1774100810289383,
-0.06760802119970322,
-0.6194905042648315,
-0.12047615647315979,
-0.07773441076278687,
-0.10568557679653168,
-0.026427537202835083,
-0.1551033854484558,
-0.1222149059176445,
-0.0698910728096962,
-0.24759601056575775,
-0.24259942770004272,
-0.14028477668762207,
0.0448446124792099,
0.06788264214992523,
0.2350192666053772,
0.1531636267900467,
0.1316375732421875,
-0.23546570539474487,
-0.1124543845653534,
-0.2932846248149872,
0.061970412731170654,
0.19448140263557434,
0.05977042019367218,
-0.28985077142715454,
-0.3417588174343109,
-0.31037384271621704,
0.18687811493873596,
0.21634231507778168,
0.7874584197998047,
-0.13567988574504852,
0.03673166781663895,
0.01835303008556366,
0.061571698635816574,
1.1265649795532227,
-0.41895967721939087,
0.2741405963897705,
0.43947097659111023,
0.06785595417022705,
-0.6117101311683655,
-0.14087340235710144,
-0.2387198954820633,
0.09592241793870926,
0.39956405758857727,
0.14397737383842468,
0.06609197705984116,
0.05650998279452324,
0.14283820986747742,
0.2587849199771881,
-0.1357191503047943,
-0.16062016785144806,
-0.16475442051887512,
-0.30692654848098755,
-0.2077644318342209,
0.1415535807609558,
0.31755706667900085,
0.22132104635238647,
0.08951486647129059,
-0.12317970395088196,
-0.1531212478876114,
-0.0996832326054573,
-0.05449409782886505,
0.13101407885551453,
0.04910637065768242,
0.18895910680294037,
0.38758084177970886,
0.16805104911327362,
0.1626746654510498,
0.42799097299575806,
0.21108463406562805,
-0.135620579123497,
0.09434603899717331,
0.008627639152109623,
0.03433050587773323,
0.2920992970466614,
0.3956577479839325,
-0.21985109150409698,
0.09385838359594345,
0.19310691952705383,
0.14798611402511597,
0.1847180724143982,
-0.3431074023246765,
-0.018220556899905205,
0.06668941676616669,
-0.48481935262680054,
-0.4805314838886261,
0.2521387040615082,
0.112450510263443,
-0.003954388201236725,
0.676853597164154,
-0.13649140298366547,
-0.1542784720659256,
0.530267059803009,
-0.027117371559143066,
0.681983470916748,
0.2261614352464676,
0.0810341089963913,
0.4060116708278656,
0.20856337249279022,
0.22078868746757507,
0.3007892966270447,
0.329654335975647,
-0.18330784142017365,
-0.023531537503004074,
-0.03784194588661194,
-0.28178656101226807,
0.15007556974887848,
0.02436184324324131,
-0.23806513845920563,
0.26737305521965027,
-0.2563190162181854,
0.13022439181804657,
0.08755258470773697,
-0.19967356324195862,
0.03241681307554245,
-0.1728249192237854,
-0.08260896056890488,
0.06053369492292404,
0.19934499263763428,
0.11041654646396637,
-0.08312491327524185,
-0.2004382610321045,
0.05622590705752373,
-0.23860770463943481,
-0.18055292963981628,
0.09618911147117615,
-0.1595868170261383,
0.298780620098114,
0.1414295732975006,
-0.5253463983535767,
-0.0661274790763855,
-0.12304072082042694,
0.24165119230747223,
-0.09700305759906769,
-0.1380683034658432,
-0.04440280422568321,
0.3444823920726776,
0.04645843058824539,
-0.09593063592910767,
-0.019387181848287582,
0.5227540731430054,
-0.029602229595184326,
-0.07971377670764923,
-0.08487125486135483,
-0.10074089467525482,
-0.2890591025352478,
-0.02758556604385376,
0.35009968280792236,
0.18152518570423126,
-0.18050728738307953,
-0.16194188594818115,
-0.15716542303562164,
-0.06067076325416565,
-0.5347188711166382,
0.11500927805900574,
-0.05730220675468445,
0.08887860178947449,
0.46975600719451904,
-0.32365095615386963,
-0.05760965496301651,
-0.03497916832566261,
0.4762890338897705,
0.14578065276145935,
-0.17737184464931488,
0.4277115762233734,
0.3278477191925049,
-0.33056217432022095,
-0.11107413470745087,
0.08268176764249802,
0.17760251462459564,
-0.3124619424343109,
0.41533133387565613,
-0.23207779228687286,
0.18701951205730438,
0.09073536098003387,
0.3222897946834564,
-0.029619552195072174,
-0.014094829559326172,
-0.3619299829006195,
-0.49304747581481934,
-0.0608309805393219,
-0.007964439690113068,
-0.029206689447164536,
-0.1427435725927353,
0.31741368770599365,
0.1428411304950714,
0.19659921526908875,
-0.0014924462884664536,
-0.2919873595237732,
-0.32740074396133423,
-0.10550612211227417,
0.20133385062217712,
0.00006726384162902832,
0.2772637903690338,
0.04019733890891075,
0.046905823051929474,
0.03870949149131775,
0.2579896152019501,
-0.15371043980121613,
-0.261699378490448,
-0.007203569635748863,
0.09412698447704315,
0.03174325078725815,
-0.4801119565963745,
0.21411225199699402,
-0.227046400308609,
-0.30678364634513855,
-0.1583624929189682,
-0.07582667469978333,
0.04306153208017349,
0.1127595454454422,
-0.27092301845550537,
-0.07037818431854248,
0.062049370259046555,
0.08352585881948471,
-0.0241197869181633,
-0.20674437284469604,
-0.387550413608551,
-0.1253119558095932,
0.2329779416322708,
-0.21097955107688904,
-0.0032061785459518433,
-0.12201913446187973,
-0.2520895302295685,
-0.08895976841449738,
0.15141403675079346,
0.14006900787353516,
-0.440921425819397,
-0.17867562174797058,
0.06026071310043335,
0.45723089575767517,
0.15298941731452942,
-0.34754040837287903,
0.016830390319228172,
0.18386420607566833,
0.15054112672805786,
-0.46368497610092163,
0.02285563014447689,
0.23691444098949432,
0.23486970365047455,
0.2914498746395111,
0.18794995546340942,
-0.053351882845163345,
-0.11765775084495544,
0.16665394604206085,
0.1558610498905182,
0.6122555136680603,
-0.3802263140678406,
0.0683470219373703,
0.434713751077652,
0.20243309438228607,
-0.03976917639374733,
0.4204791188240051,
0.1787642389535904,
0.22595670819282532,
0.6881416440010071,
-0.024935051798820496,
0.22956828773021698,
0.3172476887702942,
-0.10101208090782166,
-0.11172222346067429,
-0.19059661030769348,
0.04079192131757736,
-0.0197085440158844,
-0.014276988804340363,
0.1770370602607727,
0.19982202351093292,
-0.15542390942573547,
-0.3188646733760834,
-0.1113337054848671,
0.13790246844291687,
0.10521066188812256,
-0.013510845601558685,
0.17278817296028137,
-0.39246857166290283,
-0.021176863461732864,
0.2545073628425598,
-0.19733008742332458,
0.003759242594242096,
-0.21585606038570404,
0.28822392225265503,
-0.058880120515823364,
-0.08476036787033081,
-0.44961419701576233,
0.012772368267178535,
0.0037890486419200897,
0.15783846378326416,
-0.2314155548810959,
0.05741555988788605,
0.09685517847537994,
0.1054978221654892,
-0.12934203445911407,
0.3121667206287384,
0.5707759261131287,
0.4213985800743103,
0.12205033004283905,
0.18070656061172485,
-0.2922269403934479,
-0.2690204977989197,
-0.21300075948238373,
0.37510380148887634,
-0.08653602004051208,
0.03969072923064232,
0.20065683126449585,
0.14690274000167847,
-0.10990236699581146,
0.07127327471971512,
0.48153308033943176,
0.17629112303256989,
-0.1814052015542984,
0.18792152404785156,
-0.23065468668937683,
-0.2641999423503876,
0.08642067015171051,
-0.20306703448295593,
-0.27545350790023804,
0.2919660806655884,
0.6132595539093018,
-0.0005785550456494093,
0.20855820178985596,
0.031667180359363556,
0.08673939108848572,
-0.18803374469280243,
0.059891968965530396,
0.1921319216489792,
0.30359596014022827,
-0.17780551314353943,
0.03304189443588257,
-0.596181333065033,
-0.16591987013816833,
-0.37814533710479736,
-0.18362268805503845,
0.20904485881328583,
0.1476961076259613,
-0.05855915695428848,
0.14595338702201843,
0.22080481052398682,
0.13965639472007751,
0.029010213911533356,
0.2237565815448761,
-0.2090892344713211,
-0.20745661854743958,
0.09230784326791763,
0.22978849709033966,
0.14078910648822784,
-0.47594842314720154,
0.3288716673851013,
-0.416780024766922,
0.14149397611618042,
-0.14923624694347382,
-0.3188704252243042,
0.4634488821029663,
0.1341562271118164,
0.26781919598579407,
0.18641845881938934,
0.3489176034927368,
-0.06878873705863953,
0.21788230538368225,
-0.33071109652519226,
-0.09657588601112366,
-0.15844236314296722,
0.27052775025367737,
0.14364224672317505,
0.42827069759368896,
-0.25976449251174927,
-0.26903432607650757,
-0.04065079614520073,
0.35427045822143555,
-0.06320686638355255,
0.1263427883386612,
-0.06878267973661423,
0.331825852394104,
0.03258863091468811,
0.16907000541687012,
-0.1942863166332245,
-0.08719452470541,
-0.01639946550130844,
0.2755363881587982,
-0.3725351095199585,
-0.656473696231842,
0.45835402607917786,
-0.8688044548034668,
-0.5046730637550354,
-0.1742274910211563,
0.18645033240318298,
0.042181018739938736,
-0.03271998465061188,
-0.07589441537857056,
-0.141046404838562,
0.3845008611679077,
-0.09091179817914963,
-0.06370796263217926,
0.06304068863391876,
-0.10508061945438385,
0.19016045331954956,
-0.06118007376790047,
0.0645451694726944,
0.330381840467453,
-0.3831178545951843,
0.1688443422317505,
-0.2105116844177246
] |
https://github.com/huggingface/datasets/issues/4933 | Dataset/DatasetDict.filter() cannot have `batched=True` due to `mask` (numpy array?) being non-iterable. | > Hi ! When `batched=True`, you filter function must take a batch as input, and return a list of booleans.
> [...]
> Let me know if it helps !
Hi @lhoestq,
Ah, my bad, I totally forgot that part...
Sorry for the trouble and thank you for the kind help! | ## Describe the bug
`Dataset/DatasetDict.filter()` cannot have `batched=True` due to `mask` (numpy array?) being non-iterable.
## Steps to reproduce the bug
(In a python 3.7.12 env, I've tried 2.4.0 and 2.3.2 with both `pyarraw==9.0.0` and `pyarrow==8.0.0`.)
```python
from datasets import load_dataset
ds_mc4_ja = load_dataset("mc4", "ja") # This will take 6+ hours... perhaps test it with a toy dataset instead?
ds_mc4_ja_2020 = ds_mc4_ja.filter(
lambda example: example["timestamp"][:4] == "2020",
batched=True,
)
```
## Expected results
No error
## Actual results
```python
---------------------------------------------------------------------------
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 524, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py", line 480, in wrapper
out = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2779, in _map_single
offset=offset,
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2655, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2347, in decorated
result = f(decorated_item, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 4946, in get_indices_from_mask_function
indices_array = [i for i, to_keep in zip(indices, mask) if to_keep]
TypeError: zip argument #2 must support iteration
"""
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
/tmp/ipykernel_51348/2345782281.py in <module>
7 batched=True,
8 # batch_size=10_000,
----> 9 num_proc=111,
10 )
11 # ds_mc4_ja_clean_2020 = ds_mc4_ja.filter(
/opt/conda/lib/python3.7/site-packages/datasets/dataset_dict.py in filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, fn_kwargs, num_proc, desc)
878 desc=desc,
879 )
--> 880 for k, dataset in self.items()
881 }
882 )
/opt/conda/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
878 desc=desc,
879 )
--> 880 for k, dataset in self.items()
881 }
882 )
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
522 }
523 # apply actual function
--> 524 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
525 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
526 # re-apply format to the output
/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
478 # Call actual function
479
--> 480 out = func(self, *args, **kwargs)
481
482 # Update fingerprint of in-place transforms + update in-place history of transforms
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2920 new_fingerprint=new_fingerprint,
2921 input_columns=input_columns,
-> 2922 desc=desc,
2923 )
2924 new_dataset = copy.deepcopy(self)
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2498
2499 for index, async_result in results.items():
-> 2500 transformed_shards[index] = async_result.get()
2501
2502 assert (
/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in get(self, timeout)
655 return self._value
656 else:
--> 657 raise self._value
658
659 def _set(self, i, obj):
TypeError: zip argument #2 must support iteration
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-debian-10.12
- Python version: 3.7.12
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
(I've tried 2.4.0 and 2.3.2 with both `pyarraw==9.0.0` and `pyarrow==8.0.0`.) | 51 | Dataset/DatasetDict.filter() cannot have `batched=True` due to `mask` (numpy array?) being non-iterable.
## Describe the bug
`Dataset/DatasetDict.filter()` cannot have `batched=True` due to `mask` (numpy array?) being non-iterable.
## Steps to reproduce the bug
(In a python 3.7.12 env, I've tried 2.4.0 and 2.3.2 with both `pyarraw==9.0.0` and `pyarrow==8.0.0`.)
```python
from datasets import load_dataset
ds_mc4_ja = load_dataset("mc4", "ja") # This will take 6+ hours... perhaps test it with a toy dataset instead?
ds_mc4_ja_2020 = ds_mc4_ja.filter(
lambda example: example["timestamp"][:4] == "2020",
batched=True,
)
```
## Expected results
No error
## Actual results
```python
---------------------------------------------------------------------------
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 524, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py", line 480, in wrapper
out = func(self, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2779, in _map_single
offset=offset,
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2655, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 2347, in decorated
result = f(decorated_item, *args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 4946, in get_indices_from_mask_function
indices_array = [i for i, to_keep in zip(indices, mask) if to_keep]
TypeError: zip argument #2 must support iteration
"""
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
/tmp/ipykernel_51348/2345782281.py in <module>
7 batched=True,
8 # batch_size=10_000,
----> 9 num_proc=111,
10 )
11 # ds_mc4_ja_clean_2020 = ds_mc4_ja.filter(
/opt/conda/lib/python3.7/site-packages/datasets/dataset_dict.py in filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, fn_kwargs, num_proc, desc)
878 desc=desc,
879 )
--> 880 for k, dataset in self.items()
881 }
882 )
/opt/conda/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
878 desc=desc,
879 )
--> 880 for k, dataset in self.items()
881 }
882 )
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
522 }
523 # apply actual function
--> 524 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
525 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
526 # re-apply format to the output
/opt/conda/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
478 # Call actual function
479
--> 480 out = func(self, *args, **kwargs)
481
482 # Update fingerprint of in-place transforms + update in-place history of transforms
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in filter(self, function, with_indices, input_columns, batched, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2920 new_fingerprint=new_fingerprint,
2921 input_columns=input_columns,
-> 2922 desc=desc,
2923 )
2924 new_dataset = copy.deepcopy(self)
/opt/conda/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, with_rank, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint, desc)
2498
2499 for index, async_result in results.items():
-> 2500 transformed_shards[index] = async_result.get()
2501
2502 assert (
/opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in get(self, timeout)
655 return self._value
656 else:
--> 657 raise self._value
658
659 def _set(self, i, obj):
TypeError: zip argument #2 must support iteration
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-debian-10.12
- Python version: 3.7.12
- PyArrow version: 9.0.0
- Pandas version: 1.3.5
(I've tried 2.4.0 and 2.3.2 with both `pyarraw==9.0.0` and `pyarrow==8.0.0`.)
> Hi ! When `batched=True`, you filter function must take a batch as input, and return a list of booleans.
> [...]
> Let me know if it helps !
Hi @lhoestq,
Ah, my bad, I totally forgot that part...
Sorry for the trouble and thank you for the kind help! | [
-0.25658684968948364,
-0.16881710290908813,
-0.09791384637355804,
-0.025695033371448517,
-0.15428903698921204,
0.011435210704803467,
0.562778651714325,
0.23456715047359467,
-0.04838250204920769,
0.07928235828876495,
0.019656455144286156,
0.1604590266942978,
-0.07456586509943008,
-0.02951924130320549,
-0.14152851700782776,
-0.07092024385929108,
-0.0015552341938018799,
0.040369756519794464,
-0.11934873461723328,
-0.023834306746721268,
-0.4159606993198395,
0.08696336299180984,
-0.46009355783462524,
-0.16388265788555145,
0.23473003506660461,
-0.3747185170650482,
-0.04573562368750572,
-0.05764935165643692,
0.03266524523496628,
-0.4665445387363434,
0.3821568489074707,
-0.062110964208841324,
0.019866663962602615,
0.5243544578552246,
-0.00011359495692886412,
-0.005177229642868042,
0.3062017560005188,
0.0032705385237932205,
-0.3907000720500946,
0.08098238706588745,
-0.0994449332356453,
-0.2445552945137024,
0.033360205590724945,
-0.28785082697868347,
-0.06933014839887619,
0.03515080735087395,
-0.16459685564041138,
-0.4901096522808075,
0.6029750108718872,
0.39175930619239807,
0.18175816535949707,
0.421832412481308,
-0.17634178698062897,
0.1347436010837555,
-0.14802446961402893,
0.21227408945560455,
-0.14625389873981476,
0.26123154163360596,
0.3280653953552246,
-0.20705264806747437,
0.03488638997077942,
0.3678063750267029,
-0.44322314858436584,
0.12288990616798401,
0.03868475183844566,
-0.009324566461145878,
0.2758815288543701,
-0.36968791484832764,
-0.0926532968878746,
-0.024627067148685455,
0.16372141242027283,
-0.25647956132888794,
-0.32131636142730713,
-0.38587161898612976,
-0.28259578347206116,
-0.21870975196361542,
0.16830700635910034,
0.11447673290967941,
-0.21786785125732422,
0.13520891964435577,
-0.35850152373313904,
0.3858749568462372,
-0.053482793271541595,
0.1477339267730713,
-0.03137960284948349,
0.32648107409477234,
0.14071807265281677,
0.2480257749557495,
-0.20288564264774323,
-0.22076503932476044,
0.5265979170799255,
-0.27533915638923645,
0.09287324547767639,
0.29906415939331055,
-0.1364055722951889,
-0.09915513545274734,
0.16315728425979614,
-0.214022696018219,
0.05984523147344589,
-0.019908498972654343,
-0.015056637115776539,
-0.08327506482601166,
0.18996599316596985,
0.15739521384239197,
0.21437223255634308,
0.053772371262311935,
0.22155719995498657,
0.21307015419006348,
0.15439769625663757,
-0.06946597248315811,
0.23016217350959778,
0.2161979377269745,
0.21512684226036072,
-0.21403518319129944,
0.10829126834869385,
0.10326991230249405,
0.27191615104675293,
0.10245448350906372,
-0.4207848012447357,
-0.18475225567817688,
-0.2922086715698242,
-0.10481803119182587,
0.10949649661779404,
0.10030218958854675,
0.08172398060560226,
-0.24733096361160278,
-0.0468161404132843,
0.06320349127054214,
-0.04215105250477791,
-0.24817562103271484,
-0.11115118116140366,
-0.17974865436553955,
-0.13449081778526306,
-0.09235439449548721,
0.2323954552412033,
-0.2145906686782837,
-0.07238027453422546,
0.13730640709400177,
-0.20162059366703033,
0.2701350450515747,
0.07014424353837967,
-0.1282224953174591,
0.41389769315719604,
0.4063706398010254,
0.008718855679035187,
0.24388451874256134,
0.40111249685287476,
-0.12381439656019211,
-0.04724922776222229,
0.18127837777137756,
-0.14655518531799316,
-0.00045783817768096924,
0.09418033808469772,
0.1660044640302658,
0.04757922142744064,
-0.00723685696721077,
-0.29664111137390137,
0.08917489647865295,
0.4758429527282715,
-0.24388650059700012,
0.25506022572517395,
-0.38100552558898926,
-0.21915790438652039,
-0.3779543936252594,
0.24819132685661316,
0.4201778769493103,
-0.5878582000732422,
0.14520008862018585,
-0.03983668237924576,
-0.13251027464866638,
0.4112146496772766,
0.2090093046426773,
0.024101383984088898,
0.05993889272212982,
-0.3028465211391449,
0.05875715613365173,
0.04263830929994583,
-0.276234894990921,
-0.35026833415031433,
0.13165748119354248,
-0.05806265398859978,
0.3784874975681305,
0.12900768220424652,
-0.05444356054067612,
0.016975823789834976,
-0.184645414352417,
0.23793907463550568,
0.47532862424850464,
-0.26680198311805725,
0.0018421988934278488,
-0.14289960265159607,
-0.08798031508922577,
0.3310611844062805,
-0.0053879451006650925,
0.12945663928985596,
0.18746957182884216,
0.1142522394657135,
-0.47121042013168335,
0.3756233751773834,
-0.03320831432938576,
0.14082081615924835,
-0.0890566036105156,
0.38708871603012085,
-0.06334429979324341,
0.22139784693717957,
-0.2292868196964264,
-0.22355422377586365,
0.139031320810318,
-0.07429011911153793,
-0.1590343862771988,
-0.29903215169906616,
-0.25124242901802063,
0.0052352175116539,
0.16252508759498596,
-0.3475087881088257,
-0.23954981565475464,
0.12929829955101013,
0.16460588574409485,
0.17328327894210815,
-0.1740952432155609,
-0.10137039422988892,
0.3776317238807678,
-0.07987083494663239,
-0.09215722233057022,
-0.48363766074180603,
0.1369631588459015,
-0.03551594913005829,
-0.24514496326446533,
-0.09483196586370468,
0.19180063903331757,
0.40698155760765076,
-0.07186158746480942,
-0.040925804525613785,
0.20667141675949097,
-0.08951407670974731,
-0.3339049220085144,
-0.29091617465019226,
-0.22682951390743256,
0.08105961978435516,
-0.1280345618724823,
-0.07543040812015533,
0.5048749446868896,
-0.004494960885494947,
-0.0784187912940979,
-0.10838938504457474,
0.42841076850891113,
-0.03936531022191048,
0.48124513030052185,
0.01947776973247528,
0.20213089883327484,
0.37869569659233093,
0.08623358607292175,
-0.22175586223602295,
-0.25119858980178833,
0.21822933852672577,
-0.08642420172691345,
0.17039790749549866,
-0.1539032906293869,
-0.1484907865524292,
0.42041313648223877,
0.1693885326385498,
0.24548572301864624,
0.11542972922325134,
0.006137993186712265,
0.01779131591320038,
-0.040150608867406845,
0.17734986543655396,
0.06902801990509033,
0.22981001436710358,
0.1277742087841034,
-0.12771645188331604,
-0.059505999088287354,
-0.05648423731327057,
-0.11419039219617844,
0.09075622260570526,
0.25687333941459656,
0.18754249811172485,
0.05249001830816269,
0.2437344789505005,
0.017194714397192,
-0.12358501553535461,
-0.5327531099319458,
-0.13188450038433075,
0.020087778568267822,
-0.29633522033691406,
0.23400191962718964,
-0.25279080867767334,
-0.33419913053512573,
-0.12297971546649933,
-0.006371813826262951,
0.030283410102128983,
-0.27259302139282227,
-0.038886599242687225,
0.40919750928878784,
-0.18902936577796936,
0.17611850798130035,
0.10270006954669952,
0.2956925630569458,
0.2057398557662964,
-0.09970369189977646,
-0.3595629036426544,
-0.13375376164913177,
-0.10272163897752762,
0.06839178502559662,
0.012972093187272549,
-0.12489727139472961,
0.43841224908828735,
-0.040131665766239166,
-0.19638283550739288,
-0.2545768618583679,
-0.1269856095314026,
-0.09059576690196991,
-0.05857820063829422,
0.43390825390815735,
0.08346244692802429,
0.18276967108249664,
-0.1619628369808197,
-0.1993875652551651,
0.1499447226524353,
-0.03546919673681259,
-0.19433410465717316,
0.10195763409137726,
-0.07589743286371231,
0.06155114248394966,
-0.06705938279628754,
-0.2045811116695404,
-0.6066888570785522,
-0.30046769976615906,
0.0371512845158577,
-0.07995422184467316,
0.23843376338481903,
0.3459842801094055,
0.03269265964627266,
0.0626133605837822,
-0.23011068999767303,
-0.12940508127212524,
-0.10811436176300049,
0.09442499279975891,
0.05139122158288956,
-0.20261941850185394,
-0.2812916338443756,
-0.15411002933979034,
-0.20022067427635193,
-0.1647731363773346,
0.26918089389801025,
-0.1523510366678238,
0.07322769612073898,
-0.20218521356582642,
0.2635840177536011,
0.029459213837981224,
-0.07268500328063965,
0.23583672940731049,
0.05781068652868271,
-0.06345055997371674,
-0.2707400918006897,
-0.16227465867996216,
-0.1521848440170288,
-0.005567844957113266,
0.14743444323539734,
0.2674174904823303,
0.657268226146698,
0.02747325971722603,
0.7759680151939392,
0.595315158367157,
0.10201218724250793,
0.2640613317489624,
0.029955346137285233,
0.1774100810289383,
-0.06760802119970322,
-0.6194905042648315,
-0.12047615647315979,
-0.07773441076278687,
-0.10568557679653168,
-0.026427537202835083,
-0.1551033854484558,
-0.1222149059176445,
-0.0698910728096962,
-0.24759601056575775,
-0.24259942770004272,
-0.14028477668762207,
0.0448446124792099,
0.06788264214992523,
0.2350192666053772,
0.1531636267900467,
0.1316375732421875,
-0.23546570539474487,
-0.1124543845653534,
-0.2932846248149872,
0.061970412731170654,
0.19448140263557434,
0.05977042019367218,
-0.28985077142715454,
-0.3417588174343109,
-0.31037384271621704,
0.18687811493873596,
0.21634231507778168,
0.7874584197998047,
-0.13567988574504852,
0.03673166781663895,
0.01835303008556366,
0.061571698635816574,
1.1265649795532227,
-0.41895967721939087,
0.2741405963897705,
0.43947097659111023,
0.06785595417022705,
-0.6117101311683655,
-0.14087340235710144,
-0.2387198954820633,
0.09592241793870926,
0.39956405758857727,
0.14397737383842468,
0.06609197705984116,
0.05650998279452324,
0.14283820986747742,
0.2587849199771881,
-0.1357191503047943,
-0.16062016785144806,
-0.16475442051887512,
-0.30692654848098755,
-0.2077644318342209,
0.1415535807609558,
0.31755706667900085,
0.22132104635238647,
0.08951486647129059,
-0.12317970395088196,
-0.1531212478876114,
-0.0996832326054573,
-0.05449409782886505,
0.13101407885551453,
0.04910637065768242,
0.18895910680294037,
0.38758084177970886,
0.16805104911327362,
0.1626746654510498,
0.42799097299575806,
0.21108463406562805,
-0.135620579123497,
0.09434603899717331,
0.008627639152109623,
0.03433050587773323,
0.2920992970466614,
0.3956577479839325,
-0.21985109150409698,
0.09385838359594345,
0.19310691952705383,
0.14798611402511597,
0.1847180724143982,
-0.3431074023246765,
-0.018220556899905205,
0.06668941676616669,
-0.48481935262680054,
-0.4805314838886261,
0.2521387040615082,
0.112450510263443,
-0.003954388201236725,
0.676853597164154,
-0.13649140298366547,
-0.1542784720659256,
0.530267059803009,
-0.027117371559143066,
0.681983470916748,
0.2261614352464676,
0.0810341089963913,
0.4060116708278656,
0.20856337249279022,
0.22078868746757507,
0.3007892966270447,
0.329654335975647,
-0.18330784142017365,
-0.023531537503004074,
-0.03784194588661194,
-0.28178656101226807,
0.15007556974887848,
0.02436184324324131,
-0.23806513845920563,
0.26737305521965027,
-0.2563190162181854,
0.13022439181804657,
0.08755258470773697,
-0.19967356324195862,
0.03241681307554245,
-0.1728249192237854,
-0.08260896056890488,
0.06053369492292404,
0.19934499263763428,
0.11041654646396637,
-0.08312491327524185,
-0.2004382610321045,
0.05622590705752373,
-0.23860770463943481,
-0.18055292963981628,
0.09618911147117615,
-0.1595868170261383,
0.298780620098114,
0.1414295732975006,
-0.5253463983535767,
-0.0661274790763855,
-0.12304072082042694,
0.24165119230747223,
-0.09700305759906769,
-0.1380683034658432,
-0.04440280422568321,
0.3444823920726776,
0.04645843058824539,
-0.09593063592910767,
-0.019387181848287582,
0.5227540731430054,
-0.029602229595184326,
-0.07971377670764923,
-0.08487125486135483,
-0.10074089467525482,
-0.2890591025352478,
-0.02758556604385376,
0.35009968280792236,
0.18152518570423126,
-0.18050728738307953,
-0.16194188594818115,
-0.15716542303562164,
-0.06067076325416565,
-0.5347188711166382,
0.11500927805900574,
-0.05730220675468445,
0.08887860178947449,
0.46975600719451904,
-0.32365095615386963,
-0.05760965496301651,
-0.03497916832566261,
0.4762890338897705,
0.14578065276145935,
-0.17737184464931488,
0.4277115762233734,
0.3278477191925049,
-0.33056217432022095,
-0.11107413470745087,
0.08268176764249802,
0.17760251462459564,
-0.3124619424343109,
0.41533133387565613,
-0.23207779228687286,
0.18701951205730438,
0.09073536098003387,
0.3222897946834564,
-0.029619552195072174,
-0.014094829559326172,
-0.3619299829006195,
-0.49304747581481934,
-0.0608309805393219,
-0.007964439690113068,
-0.029206689447164536,
-0.1427435725927353,
0.31741368770599365,
0.1428411304950714,
0.19659921526908875,
-0.0014924462884664536,
-0.2919873595237732,
-0.32740074396133423,
-0.10550612211227417,
0.20133385062217712,
0.00006726384162902832,
0.2772637903690338,
0.04019733890891075,
0.046905823051929474,
0.03870949149131775,
0.2579896152019501,
-0.15371043980121613,
-0.261699378490448,
-0.007203569635748863,
0.09412698447704315,
0.03174325078725815,
-0.4801119565963745,
0.21411225199699402,
-0.227046400308609,
-0.30678364634513855,
-0.1583624929189682,
-0.07582667469978333,
0.04306153208017349,
0.1127595454454422,
-0.27092301845550537,
-0.07037818431854248,
0.062049370259046555,
0.08352585881948471,
-0.0241197869181633,
-0.20674437284469604,
-0.387550413608551,
-0.1253119558095932,
0.2329779416322708,
-0.21097955107688904,
-0.0032061785459518433,
-0.12201913446187973,
-0.2520895302295685,
-0.08895976841449738,
0.15141403675079346,
0.14006900787353516,
-0.440921425819397,
-0.17867562174797058,
0.06026071310043335,
0.45723089575767517,
0.15298941731452942,
-0.34754040837287903,
0.016830390319228172,
0.18386420607566833,
0.15054112672805786,
-0.46368497610092163,
0.02285563014447689,
0.23691444098949432,
0.23486970365047455,
0.2914498746395111,
0.18794995546340942,
-0.053351882845163345,
-0.11765775084495544,
0.16665394604206085,
0.1558610498905182,
0.6122555136680603,
-0.3802263140678406,
0.0683470219373703,
0.434713751077652,
0.20243309438228607,
-0.03976917639374733,
0.4204791188240051,
0.1787642389535904,
0.22595670819282532,
0.6881416440010071,
-0.024935051798820496,
0.22956828773021698,
0.3172476887702942,
-0.10101208090782166,
-0.11172222346067429,
-0.19059661030769348,
0.04079192131757736,
-0.0197085440158844,
-0.014276988804340363,
0.1770370602607727,
0.19982202351093292,
-0.15542390942573547,
-0.3188646733760834,
-0.1113337054848671,
0.13790246844291687,
0.10521066188812256,
-0.013510845601558685,
0.17278817296028137,
-0.39246857166290283,
-0.021176863461732864,
0.2545073628425598,
-0.19733008742332458,
0.003759242594242096,
-0.21585606038570404,
0.28822392225265503,
-0.058880120515823364,
-0.08476036787033081,
-0.44961419701576233,
0.012772368267178535,
0.0037890486419200897,
0.15783846378326416,
-0.2314155548810959,
0.05741555988788605,
0.09685517847537994,
0.1054978221654892,
-0.12934203445911407,
0.3121667206287384,
0.5707759261131287,
0.4213985800743103,
0.12205033004283905,
0.18070656061172485,
-0.2922269403934479,
-0.2690204977989197,
-0.21300075948238373,
0.37510380148887634,
-0.08653602004051208,
0.03969072923064232,
0.20065683126449585,
0.14690274000167847,
-0.10990236699581146,
0.07127327471971512,
0.48153308033943176,
0.17629112303256989,
-0.1814052015542984,
0.18792152404785156,
-0.23065468668937683,
-0.2641999423503876,
0.08642067015171051,
-0.20306703448295593,
-0.27545350790023804,
0.2919660806655884,
0.6132595539093018,
-0.0005785550456494093,
0.20855820178985596,
0.031667180359363556,
0.08673939108848572,
-0.18803374469280243,
0.059891968965530396,
0.1921319216489792,
0.30359596014022827,
-0.17780551314353943,
0.03304189443588257,
-0.596181333065033,
-0.16591987013816833,
-0.37814533710479736,
-0.18362268805503845,
0.20904485881328583,
0.1476961076259613,
-0.05855915695428848,
0.14595338702201843,
0.22080481052398682,
0.13965639472007751,
0.029010213911533356,
0.2237565815448761,
-0.2090892344713211,
-0.20745661854743958,
0.09230784326791763,
0.22978849709033966,
0.14078910648822784,
-0.47594842314720154,
0.3288716673851013,
-0.416780024766922,
0.14149397611618042,
-0.14923624694347382,
-0.3188704252243042,
0.4634488821029663,
0.1341562271118164,
0.26781919598579407,
0.18641845881938934,
0.3489176034927368,
-0.06878873705863953,
0.21788230538368225,
-0.33071109652519226,
-0.09657588601112366,
-0.15844236314296722,
0.27052775025367737,
0.14364224672317505,
0.42827069759368896,
-0.25976449251174927,
-0.26903432607650757,
-0.04065079614520073,
0.35427045822143555,
-0.06320686638355255,
0.1263427883386612,
-0.06878267973661423,
0.331825852394104,
0.03258863091468811,
0.16907000541687012,
-0.1942863166332245,
-0.08719452470541,
-0.01639946550130844,
0.2755363881587982,
-0.3725351095199585,
-0.656473696231842,
0.45835402607917786,
-0.8688044548034668,
-0.5046730637550354,
-0.1742274910211563,
0.18645033240318298,
0.042181018739938736,
-0.03271998465061188,
-0.07589441537857056,
-0.141046404838562,
0.3845008611679077,
-0.09091179817914963,
-0.06370796263217926,
0.06304068863391876,
-0.10508061945438385,
0.19016045331954956,
-0.06118007376790047,
0.0645451694726944,
0.330381840467453,
-0.3831178545951843,
0.1688443422317505,
-0.2105116844177246
] |
https://github.com/huggingface/datasets/issues/4932 | Dataset Viewer issue for bigscience-biomedical/biosses | Possibly not related to the dataset viewer in itself. cc @huggingface/datasets.
In particular, I think that the import of bigbiohub is not working here: https://huggingface.co/datasets/bigscience-biomedical/biosses/blob/main/biosses.py#L29 (requires a relative path?)
```python
>>> from datasets import get_dataset_config_names
>>> get_dataset_config_names('bigscience-biomedical/biosses')
Downloading builder script: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8.00k/8.00k [00:00<00:00, 7.47MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 289, in get_dataset_config_names
dataset_module = dataset_module_factory(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1247, in dataset_module_factory
raise e1 from None
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1220, in dataset_module_factory
return HubDatasetModuleFactoryWithScript(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 931, in get_module
local_imports = _download_additional_modules(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 215, in _download_additional_modules
raise ImportError(
ImportError: To be able to use bigscience-biomedical/biosses, you need to install the following dependency: bigbiohub.
Please install it using 'pip install bigbiohub' for instance'
``` | ### Link
https://huggingface.co/datasets/bigscience-biomedical/biosses
### Description
I've just been working on adding the dataset loader script to this dataset and working with the relative imports. I'm not sure how to interpret the error below (show where the dataset preview used to be) .
```
Status code: 400
Exception: ModuleNotFoundError
Message: No module named 'datasets_modules.datasets.bigscience-biomedical--biosses.ddbd5893bf6c2f4db06f407665eaeac619520ba41f69d94ead28f7cc5b674056.bigbiohub'
```
### Owner
Yes | 124 | Dataset Viewer issue for bigscience-biomedical/biosses
### Link
https://huggingface.co/datasets/bigscience-biomedical/biosses
### Description
I've just been working on adding the dataset loader script to this dataset and working with the relative imports. I'm not sure how to interpret the error below (show where the dataset preview used to be) .
```
Status code: 400
Exception: ModuleNotFoundError
Message: No module named 'datasets_modules.datasets.bigscience-biomedical--biosses.ddbd5893bf6c2f4db06f407665eaeac619520ba41f69d94ead28f7cc5b674056.bigbiohub'
```
### Owner
Yes
Possibly not related to the dataset viewer in itself. cc @huggingface/datasets.
In particular, I think that the import of bigbiohub is not working here: https://huggingface.co/datasets/bigscience-biomedical/biosses/blob/main/biosses.py#L29 (requires a relative path?)
```python
>>> from datasets import get_dataset_config_names
>>> get_dataset_config_names('bigscience-biomedical/biosses')
Downloading builder script: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8.00k/8.00k [00:00<00:00, 7.47MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 289, in get_dataset_config_names
dataset_module = dataset_module_factory(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1247, in dataset_module_factory
raise e1 from None
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1220, in dataset_module_factory
return HubDatasetModuleFactoryWithScript(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 931, in get_module
local_imports = _download_additional_modules(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 215, in _download_additional_modules
raise ImportError(
ImportError: To be able to use bigscience-biomedical/biosses, you need to install the following dependency: bigbiohub.
Please install it using 'pip install bigbiohub' for instance'
``` | [
-0.3742017149925232,
-0.02581452578306198,
-0.007215837016701698,
0.1082422286272049,
0.2420702576637268,
0.060761772096157074,
0.2832285463809967,
0.3317495882511139,
0.16744938492774963,
0.05709925666451454,
-0.19567283987998962,
-0.10373886674642563,
-0.22351089119911194,
0.1710205227136612,
0.22105689346790314,
0.10111081600189209,
0.13835245370864868,
0.12536586821079254,
-0.22397997975349426,
-0.09476348757743835,
-0.3906576335430145,
0.16402524709701538,
-0.2770458459854126,
0.10204829275608063,
-0.22151078283786774,
0.2834347188472748,
-0.1027669757604599,
0.3788088858127594,
-0.12891893088817596,
-0.49685266613960266,
0.08299068361520767,
0.055443257093429565,
0.4094501733779907,
0.6608614325523376,
-0.00011870875459862873,
0.2456769198179245,
0.5049551129341125,
-0.02033868432044983,
-0.3118072748184204,
-0.2932732105255127,
-0.16416031122207642,
-0.45811203122138977,
0.11688241362571716,
-0.075475312769413,
0.19386595487594604,
-0.29252123832702637,
0.16575494408607483,
-0.1712581366300583,
-0.08162114024162292,
0.1803128570318222,
0.16565538942813873,
0.11129795014858246,
0.15058279037475586,
-0.08816925436258316,
0.10694238543510437,
0.3005889654159546,
-0.07764653116464615,
0.259339302778244,
0.11435070633888245,
0.15277977287769318,
-0.05468498915433884,
0.11662791669368744,
-0.1745065301656723,
0.09950664639472961,
0.5745449066162109,
-0.08338121324777603,
0.2819548547267914,
-0.35502761602401733,
0.11742233484983444,
0.41830942034721375,
0.6486509442329407,
-0.19006240367889404,
-0.377858966588974,
-0.3276263177394867,
-0.05242852866649628,
0.029848283156752586,
0.15746475756168365,
0.1331503689289093,
0.031142961233854294,
0.08559638261795044,
0.08824729919433594,
-0.2248746007680893,
-0.262406587600708,
0.1834740936756134,
-0.4279632568359375,
0.10244232416152954,
-0.18137377500534058,
0.061204735189676285,
0.023664280772209167,
-0.07229402661323547,
0.5087411403656006,
-0.24641552567481995,
0.17358773946762085,
0.21258863806724548,
-0.34216901659965515,
0.2544356882572174,
0.4375882148742676,
0.6032681465148926,
-0.0441601499915123,
0.08884498476982117,
-0.15306410193443298,
0.06664925068616867,
-0.2244826704263687,
0.2932569682598114,
0.1825474351644516,
-0.019218701869249344,
-0.13343611359596252,
0.19598491489887238,
0.4070950150489807,
0.3854985535144806,
0.14962619543075562,
0.18713590502738953,
-0.26513436436653137,
-0.5541684031486511,
-0.4099743068218231,
-0.027863964438438416,
0.39406293630599976,
-0.14731250703334808,
-0.2739598751068115,
0.22840334475040436,
0.006610654294490814,
0.04237469285726547,
0.15584342181682587,
0.44885459542274475,
-0.15306776762008667,
0.22394344210624695,
0.2063605636358261,
0.03458598256111145,
-0.14544981718063354,
-0.1064322292804718,
-0.10684346407651901,
0.21856585144996643,
-0.2052268236875534,
-0.20397987961769104,
0.03266968950629234,
-0.11487783491611481,
0.22317083179950714,
-0.24823223054409027,
0.2695072889328003,
0.07041145861148834,
-0.333493173122406,
-0.1947183907032013,
0.04002714902162552,
0.5299543142318726,
0.0553203709423542,
0.16344839334487915,
0.13564106822013855,
-0.20276562869548798,
-0.13096565008163452,
0.07887451350688934,
-0.10465047508478165,
-0.25505977869033813,
-0.21039128303527832,
0.08140327781438828,
-0.5613458156585693,
-0.0606631264090538,
-0.20962151885032654,
-0.09614928066730499,
-0.312469482421875,
-0.20599594712257385,
-0.23801785707473755,
-0.18150056898593903,
-0.11552481353282928,
-0.1239713728427887,
0.25092145800590515,
0.7985782027244568,
-0.6382791996002197,
-0.24111156165599823,
-0.07675424218177795,
-0.0778605043888092,
-0.1437513530254364,
0.06196573004126549,
-0.1724787801504135,
0.32438650727272034,
-0.33698028326034546,
-0.07007406651973724,
0.3455255925655365,
-0.2858125567436218,
-0.3685017228126526,
0.3480319380760193,
-0.28408318758010864,
0.1687992364168167,
0.27121490240097046,
0.12725885212421417,
-0.14588037133216858,
-0.21653515100479126,
-0.012733452022075653,
0.17324654757976532,
0.07802265137434006,
-0.10088133811950684,
-0.0698196217417717,
-0.26991185545921326,
0.0025375261902809143,
0.23927055299282074,
0.47159579396247864,
-0.09920582920312881,
0.14164763689041138,
-0.02501428686082363,
0.41429272294044495,
-0.010308291763067245,
-0.025541294366121292,
0.3677746653556824,
0.26448962092399597,
0.18888075649738312,
0.09147091209888458,
-0.15826991200447083,
-0.22361412644386292,
0.26359155774116516,
-0.21391819417476654,
0.00283065065741539,
-0.1699037104845047,
0.023459114134311676,
-0.2941018342971802,
0.11412573605775833,
-0.5634629726409912,
0.0016456134617328644,
0.05294086039066315,
0.3038697838783264,
-0.10832703113555908,
0.19836117327213287,
-0.3167632222175598,
0.23656107485294342,
0.10832789540290833,
0.17752432823181152,
-0.3767814338207245,
0.34040141105651855,
-0.10540898889303207,
0.14251530170440674,
0.06906431168317795,
0.2613246440887451,
0.26500415802001953,
-0.2779010534286499,
0.028478454798460007,
0.24803248047828674,
0.009428822435438633,
0.17811574041843414,
0.020575139671564102,
0.02822662889957428,
0.2377937287092209,
-0.13268229365348816,
0.4099377691745758,
-0.09695166349411011,
0.20999076962471008,
0.08966808766126633,
0.026473719626665115,
-0.037975773215293884,
-0.24596409499645233,
0.4382070302963257,
0.14691410958766937,
0.09088680893182755,
0.13312633335590363,
0.05749554559588432,
0.11412880569696426,
-0.17034095525741577,
0.3988657593727112,
0.4166892468929291,
-0.0015342868864536285,
0.005643442273139954,
-0.05784859508275986,
0.12032295018434525,
0.15080203115940094,
-0.19562441110610962,
-0.041632235050201416,
0.027965126559138298,
-0.3567918539047241,
0.08547810465097427,
0.017679590731859207,
0.4690827429294586,
0.36913150548934937,
0.13830621540546417,
-0.03432900086045265,
0.32736846804618835,
0.25023823976516724,
-0.10976759344339371,
0.06998167932033539,
0.3366994857788086,
0.13445529341697693,
0.24015295505523682,
-0.333904892206192,
-0.044202856719493866,
-0.061047665774822235,
-0.2983320355415344,
0.20007598400115967,
0.2439398318529129,
-0.5648980736732483,
0.14337848126888275,
-0.20672321319580078,
-0.28683382272720337,
-0.3417555093765259,
-0.20689648389816284,
-0.13477195799350739,
-0.44319993257522583,
-0.2926415801048279,
0.11738364398479462,
-0.08739617466926575,
0.11929719150066376,
-0.21843236684799194,
-0.10571573674678802,
-0.16304315626621246,
-0.3083634674549103,
0.08206410706043243,
-0.21455170214176178,
-0.2714011073112488,
-0.0018559116870164871,
0.5239326357841492,
0.07087477296590805,
-0.0212214644998312,
-0.4473899006843567,
0.06485603749752045,
-0.4646328091621399,
-0.23690342903137207,
0.055729061365127563,
-0.12164507806301117,
0.3734630346298218,
0.29109102487564087,
0.1355290710926056,
0.37112897634506226,
0.04033270850777626,
0.1608935445547104,
-0.060764096677303314,
0.1614881306886673,
0.13493511080741882,
-0.05250489339232445,
-0.20025670528411865,
0.23494744300842285,
-0.18398061394691467,
-0.4366963803768158,
-0.42974260449409485,
-0.09114842116832733,
0.07598602771759033,
0.08905991166830063,
0.16038934886455536,
0.12402364611625671,
0.1219976544380188,
0.1465086042881012,
-0.028467899188399315,
0.04643312469124794,
-0.41423431038856506,
0.3883620500564575,
-0.25835055112838745,
-0.36958596110343933,
0.2247086763381958,
0.06417024880647659,
0.12294475734233856,
-0.19940096139907837,
-0.5100274682044983,
0.11741144210100174,
0.04506756365299225,
-0.038416117429733276,
0.25545772910118103,
0.3426630198955536,
-0.004408068954944611,
-0.0366564504802227,
0.049813732504844666,
-0.14095285534858704,
-0.17529067397117615,
-0.20420607924461365,
-0.29278650879859924,
0.3237738609313965,
0.004130888730287552,
0.4236550033092499,
-0.09470580518245697,
0.29643601179122925,
0.13393791019916534,
0.053553689271211624,
0.26221442222595215,
0.055128246545791626,
0.6235271096229553,
-0.02183079719543457,
-0.35881826281547546,
0.23048913478851318,
-0.1186542809009552,
-0.10175582766532898,
0.2588527798652649,
-0.09637871384620667,
0.038037240505218506,
-0.29178518056869507,
-0.2653137445449829,
-0.3200431168079376,
-0.29091256856918335,
0.015500273555517197,
-0.19650420546531677,
-0.0758025124669075,
-0.03337972238659859,
-0.18657690286636353,
-0.20671749114990234,
0.0752442479133606,
0.13137446343898773,
0.3447505831718445,
0.04488597437739372,
0.03363584354519844,
-0.17768268287181854,
-0.1543351709842682,
-0.13523778319358826,
0.4165242314338684,
-0.10622116178274155,
0.15491735935211182,
0.09327609837055206,
-0.056205976754426956,
0.03847101330757141,
-0.05588510259985924,
0.6048983931541443,
-0.005046805366873741,
0.05227139592170715,
0.23974034190177917,
-0.13342659175395966,
-0.5500243902206421,
-0.169691264629364,
0.23138731718063354,
0.34984463453292847,
-0.06716321408748627,
-0.3972139358520508,
-0.21341392397880554,
-0.13067981600761414,
0.5150384902954102,
0.27570661902427673,
-0.1537339687347412,
-0.35279956459999084,
-0.32764047384262085,
-0.11285373568534851,
-0.22631846368312836,
-0.41557806730270386,
-0.04734082147479057,
-0.00038735102862119675,
-0.006856459192931652,
0.11651214957237244,
-0.08100666850805283,
-0.2016759216785431,
0.21034489572048187,
0.1511688530445099,
0.10033395141363144,
0.10459358245134354,
0.20396658778190613,
0.5852525234222412,
0.25072914361953735,
0.5907633304595947,
0.7620872259140015,
-0.31070154905319214,
-0.5225781202316284,
0.15975674986839294,
0.08664041757583618,
0.17406398057937622,
0.13956454396247864,
-0.10433298349380493,
-0.15044796466827393,
0.3177148103713989,
-0.02162637561559677,
-0.18196876347064972,
0.15465997159481049,
0.3584388494491577,
0.18124620616436005,
-0.2936767339706421,
-0.542598307132721,
0.7699183821678162,
0.00403994508087635,
0.013335153460502625,
-0.03725782781839371,
0.3594476580619812,
-0.08954397588968277,
-0.1076064258813858,
-0.27219846844673157,
0.5320488810539246,
0.11721301823854446,
0.018822941929101944,
0.2161981165409088,
-0.00543096661567688,
0.28822439908981323,
-0.3021973967552185,
-0.005817936733365059,
-0.470537394285202,
-0.07169061154127121,
-0.14170150458812714,
-0.21805644035339355,
0.38163283467292786,
-0.26420754194259644,
-0.03018294647336006,
0.2781994044780731,
-0.30525410175323486,
0.228735089302063,
0.06771664321422577,
0.03786434233188629,
-0.03935776650905609,
-0.014110244810581207,
-0.18247954547405243,
0.08324067294597626,
-0.05689594894647598,
0.30132898688316345,
-0.12834542989730835,
-0.05896153301000595,
-0.31657570600509644,
0.06524263322353363,
-0.1874852180480957,
0.05971245467662811,
-0.2701353430747986,
0.07833457738161087,
-0.10649596154689789,
-0.16325955092906952,
0.37016960978507996,
0.2891736924648285,
0.22712409496307373,
-0.00487513467669487,
-0.28191494941711426,
0.19402579963207245,
-0.11681840568780899,
-0.0959310457110405,
0.09145697206258774,
-0.07862957566976547,
0.4006742835044861,
0.00803983211517334,
-0.21132859587669373,
0.22856175899505615,
-0.10916296392679214,
0.1818675547838211,
0.027984872460365295,
0.15602920949459076,
0.3417750597000122,
-0.2796511948108673,
-0.22307150065898895,
-0.013786651194095612,
0.322548508644104,
-0.05235839635133743,
0.061986293643713,
0.16661682724952698,
-0.28259095549583435,
0.14694547653198242,
-0.20295605063438416,
-0.15775442123413086,
-0.06220145896077156,
0.35972240567207336,
-0.0483679324388504,
-0.06484988331794739,
0.39614802598953247,
0.0524151585996151,
-0.25170719623565674,
0.0145774707198143,
0.20947664976119995,
0.22590796649456024,
-0.25325968861579895,
0.0854773297905922,
0.2384784072637558,
0.0029108375310897827,
0.15559668838977814,
-0.08948080241680145,
0.042117536067962646,
-0.2873375713825226,
-0.320101797580719,
-0.27849966287612915,
-0.23506169021129608,
0.18928267061710358,
-0.35302701592445374,
0.1471657156944275,
0.05869731307029724,
0.20915484428405762,
0.14563263952732086,
-0.2081310898065567,
-0.18595652282238007,
0.11817122995853424,
-0.17966032028198242,
-0.13128523528575897,
-0.1349797397851944,
0.06582189351320267,
-0.016301989555358887,
-0.11078000068664551,
-0.025079792365431786,
-0.037422314286231995,
-0.24408450722694397,
-0.10320284962654114,
-0.17358984053134918,
0.1890672743320465,
0.18298295140266418,
0.0633276030421257,
0.1664210706949234,
-0.24603493511676788,
-0.04849762097001076,
-0.015429109334945679,
0.14615324139595032,
0.16951701045036316,
-0.04755377769470215,
-0.03433331847190857,
0.29040536284446716,
-0.4383282959461212,
-0.218003511428833,
0.40435126423835754,
-0.020165570080280304,
0.25693896412849426,
0.2310294210910797,
0.11778249591588974,
-0.16016443073749542,
0.11136439442634583,
-0.0032417085021734238,
0.13368067145347595,
-0.03453643620014191,
0.009961351752281189,
0.582125186920166,
-0.43920254707336426,
0.3136565089225769,
0.06902005523443222,
0.3255702555179596,
0.5858772397041321,
-0.17925386130809784,
-0.14210546016693115,
0.1544516384601593,
0.05699976533651352,
-0.5686272382736206,
-0.12699328362941742,
0.23519489169120789,
-0.1081901341676712,
0.1611996740102768,
0.23600296676158905,
0.2508120834827423,
-0.07727213203907013,
0.23136571049690247,
0.196708083152771,
0.38246724009513855,
0.29404640197753906,
0.4120675027370453,
0.49495846033096313,
-0.12925846874713898,
0.2781134843826294,
0.19618986546993256,
0.3706353008747101,
0.15756994485855103,
0.8303646445274353,
-0.3246423602104187,
0.14284472167491913,
-0.3627690076828003,
-0.03328834846615791,
-0.020899005234241486,
-0.59906405210495,
0.38809525966644287,
0.15030835568904877,
-0.016824230551719666,
-0.2501230537891388,
-0.20835694670677185,
0.15058207511901855,
-0.21162378787994385,
0.2220577448606491,
-0.08480735868215561,
0.3143710196018219,
0.015093795955181122,
0.07413600385189056,
0.026169396936893463,
-0.20464009046554565,
-0.0994129329919815,
-0.12814146280288696,
-0.03455616906285286,
-0.38950830698013306,
-0.2585284411907196,
0.15973594784736633,
-0.16220246255397797,
-0.18773692846298218,
-0.062378495931625366,
0.05153686925768852,
0.03765682503581047,
-0.2196347862482071,
-0.13666996359825134,
0.35998034477233887,
0.013570193201303482,
0.21426428854465485,
0.23932242393493652,
0.5325685143470764,
0.3838854134082794,
-0.16210375726222992,
-0.25918254256248474,
0.04341237619519234,
-0.0054140761494636536,
-0.06153681501746178,
-0.2754199802875519,
-0.2973311245441437,
0.24757611751556396,
0.3914051353931427,
0.06769362092018127,
-0.07294381409883499,
0.12704876065254211,
0.09865625202655792,
0.30993518233299255,
-0.2336890697479248,
0.15260052680969238,
-0.2695714235305786,
0.05263465642929077,
-0.3779132068157196,
-0.04967949539422989,
-0.5297088027000427,
0.0581534169614315,
0.5237482190132141,
-0.15618906915187836,
0.004168964922428131,
-0.05200408026576042,
0.01971740648150444,
0.11753372848033905,
0.5587485432624817,
0.37200260162353516,
0.36736875772476196,
-0.33237123489379883,
-0.025669299066066742,
-0.6348643898963928,
0.06591577082872391,
-0.006748232990503311,
-0.10567831993103027,
0.19297605752944946,
-0.14020325243473053,
-0.05116265267133713,
-0.06078425049781799,
0.11637509614229202,
0.24710403382778168,
-0.06744913756847382,
0.004883799701929092,
-0.23580636084079742,
-0.41488882899284363,
-0.12610045075416565,
0.1257672905921936,
-0.07830904424190521,
-0.3141383230686188,
-0.08244478702545166,
-0.3260943591594696,
-0.037875946611166,
-0.15458570420742035,
0.06457923352718353,
-0.14949961006641388,
-0.203659325838089,
0.348697692155838,
-0.09014071524143219,
0.4224233627319336,
0.18876314163208008,
-0.15111567080020905,
-0.4808298945426941,
-0.27348342537879944,
-0.35286882519721985,
0.2812528610229492,
0.2501499354839325,
0.2670228183269501,
-0.24975775182247162,
-0.30116531252861023,
-0.2549317181110382,
-0.0033454480580985546,
0.12128244340419769,
0.3232903778553009,
-0.25798991322517395,
-0.030494127422571182,
-0.1696685552597046,
0.3102300763130188,
0.2821428179740906,
0.032549675554037094,
-0.12123827636241913,
0.3868626356124878,
-0.41234296560287476,
-0.21161150932312012,
0.6186168193817139,
-0.051734648644924164,
-0.10657690465450287,
-0.20084413886070251,
0.2548527121543884,
-0.24142634868621826,
-0.17071959376335144,
-0.4352267384529114,
0.18292757868766785,
0.3624415695667267,
0.1006275936961174,
-0.05732574313879013,
0.184502512216568,
-0.11056901514530182,
0.03421051427721977,
-0.08677199482917786,
-0.061243221163749695,
-0.03007478266954422,
-0.14717400074005127,
0.035539623349905014,
-0.032267916947603226
] |
https://github.com/huggingface/datasets/issues/4932 | Dataset Viewer issue for bigscience-biomedical/biosses | thanks for taking a look @severo . agree this isn't related to dataset viewer (sorry just clicked on the auto issue creator). also thanks @lhoestq , I see the format to use for relative imports. was a bit confused b/c it seems to be working here
https://huggingface.co/datasets/bigscience-biomedical/scitail/blob/main/scitail.py#L31
I'll try this PR a see what happens. | ### Link
https://huggingface.co/datasets/bigscience-biomedical/biosses
### Description
I've just been working on adding the dataset loader script to this dataset and working with the relative imports. I'm not sure how to interpret the error below (show where the dataset preview used to be) .
```
Status code: 400
Exception: ModuleNotFoundError
Message: No module named 'datasets_modules.datasets.bigscience-biomedical--biosses.ddbd5893bf6c2f4db06f407665eaeac619520ba41f69d94ead28f7cc5b674056.bigbiohub'
```
### Owner
Yes | 55 | Dataset Viewer issue for bigscience-biomedical/biosses
### Link
https://huggingface.co/datasets/bigscience-biomedical/biosses
### Description
I've just been working on adding the dataset loader script to this dataset and working with the relative imports. I'm not sure how to interpret the error below (show where the dataset preview used to be) .
```
Status code: 400
Exception: ModuleNotFoundError
Message: No module named 'datasets_modules.datasets.bigscience-biomedical--biosses.ddbd5893bf6c2f4db06f407665eaeac619520ba41f69d94ead28f7cc5b674056.bigbiohub'
```
### Owner
Yes
thanks for taking a look @severo . agree this isn't related to dataset viewer (sorry just clicked on the auto issue creator). also thanks @lhoestq , I see the format to use for relative imports. was a bit confused b/c it seems to be working here
https://huggingface.co/datasets/bigscience-biomedical/scitail/blob/main/scitail.py#L31
I'll try this PR a see what happens. | [
-0.3713708817958832,
-0.17211885750293732,
-0.0018686819821596146,
0.14716246724128723,
0.27972766757011414,
0.12249790877103806,
0.20924825966358185,
0.3744974434375763,
0.17099764943122864,
0.032907791435718536,
-0.19054153561592102,
-0.09430452436208725,
-0.180513396859169,
0.23583759367465973,
0.1779787540435791,
0.08852601796388626,
0.20982873439788818,
0.139763742685318,
-0.20857039093971252,
-0.08747263252735138,
-0.3117425739765167,
0.11127650737762451,
-0.25395774841308594,
0.1533757448196411,
-0.28490403294563293,
0.24358132481575012,
-0.10307148098945618,
0.2983456254005432,
-0.20587269961833954,
-0.5014068484306335,
0.09502771496772766,
0.10547614097595215,
0.5033611059188843,
0.5630688667297363,
-0.00011767176329158247,
0.2736796736717224,
0.5842965245246887,
-0.08334830403327942,
-0.21089325845241547,
-0.11027194559574127,
-0.16883216798305511,
-0.4004400074481964,
0.1750093251466751,
-0.09398998320102692,
0.15527543425559998,
-0.2672065198421478,
0.03892044350504875,
-0.3288533687591553,
-0.008325643837451935,
0.20638656616210938,
0.18976043164730072,
0.06543561071157455,
0.15452460944652557,
-0.17385168373584747,
0.1785380244255066,
0.27701738476753235,
-0.08947107940912247,
0.22174400091171265,
0.17334815859794617,
0.09887482970952988,
-0.07776466757059097,
0.16137757897377014,
-0.19635158777236938,
0.018862154334783554,
0.5627172589302063,
-0.089541956782341,
0.30185365676879883,
-0.46452227234840393,
0.09165086597204208,
0.42771828174591064,
0.8296058177947998,
-0.11876658350229263,
-0.3180026710033417,
-0.18190684914588928,
-0.04371105134487152,
-0.0034287627786397934,
0.03601769730448723,
0.12066397070884705,
0.11676745116710663,
0.10151762515306473,
0.19599290192127228,
-0.21994227170944214,
-0.4088803827762604,
0.13744567334651947,
-0.5048989057540894,
0.0540771521627903,
-0.23207366466522217,
0.15522819757461548,
0.053949568420648575,
-0.1682983785867691,
0.4626522958278656,
-0.028819318860769272,
0.047759875655174255,
0.1970537304878235,
-0.4978334307670593,
0.1369999349117279,
0.3455013334751129,
0.540342390537262,
-0.011600930243730545,
0.062044769525527954,
-0.17089179158210754,
0.08050129562616348,
-0.2107355147600174,
0.21367931365966797,
0.1841782182455063,
-0.015595614910125732,
-0.038208477199077606,
0.1972762644290924,
0.44439929723739624,
0.19491566717624664,
0.23358580470085144,
0.18838313221931458,
-0.24785712361335754,
-0.46727076172828674,
-0.34552016854286194,
-0.038785357028245926,
0.370586097240448,
-0.20609159767627716,
-0.2808806896209717,
0.35727930068969727,
-0.04633868858218193,
0.04681013152003288,
0.015780650079250336,
0.4226211607456207,
-0.09735709428787231,
0.24346396327018738,
0.3295901417732239,
0.12582506239414215,
-0.19403176009655,
-0.24458688497543335,
-0.09022752940654755,
0.28662487864494324,
-0.17394766211509705,
-0.26067328453063965,
0.02233104035258293,
-0.0655909925699234,
0.0587037056684494,
-0.22452642023563385,
0.2843647003173828,
-0.04689736291766167,
-0.3637475371360779,
-0.16101454198360443,
-0.032746322453022,
0.5874322056770325,
0.03000885620713234,
0.13466288149356842,
0.19045451283454895,
-0.17034099996089935,
-0.030207227915525436,
0.1805838942527771,
-0.2091248631477356,
-0.2039545625448227,
-0.3397071957588196,
0.11614491045475006,
-0.5408740639686584,
-0.15298904478549957,
-0.18026265501976013,
0.012708339840173721,
-0.2897527813911438,
-0.16044236719608307,
-0.18413767218589783,
-0.12864713370800018,
-0.0718098059296608,
-0.11238234490156174,
0.07004883885383606,
0.8822508454322815,
-0.7811804413795471,
-0.16135765612125397,
-0.15222807228565216,
-0.08397732675075531,
-0.09746388345956802,
0.029739072546362877,
-0.050149738788604736,
0.26672106981277466,
-0.3484012484550476,
-0.005812808871269226,
0.3582800328731537,
-0.3254639208316803,
-0.33815136551856995,
0.3097943663597107,
-0.3037792146205902,
0.11786205321550369,
0.26302358508110046,
0.17503751814365387,
-0.07296580076217651,
-0.1988842934370041,
-0.0749731957912445,
-0.012454744428396225,
0.09284047782421112,
-0.18991392850875854,
-0.06647536158561707,
-0.22908715903759003,
-0.007165081799030304,
0.2518717646598816,
0.4569043219089508,
-0.003627955913543701,
0.22833698987960815,
-0.09919912368059158,
0.3599567115306854,
-0.030841220170259476,
-0.005563623271882534,
0.34155988693237305,
0.2939092218875885,
0.12735307216644287,
0.1612592339515686,
-0.16808924078941345,
-0.2845664322376251,
0.27089574933052063,
-0.2323680818080902,
0.02927010878920555,
-0.12297441065311432,
0.02868662029504776,
-0.34020212292671204,
0.09751033037900925,
-0.5341368317604065,
0.055116914212703705,
0.0519760325551033,
0.08257120102643967,
-0.18346340954303741,
0.21509124338626862,
-0.2552315294742584,
0.24612204730510712,
0.0754319503903389,
0.14481419324874878,
-0.3492411673069,
0.29157066345214844,
-0.08332940191030502,
0.1315164864063263,
0.15852275490760803,
0.16130009293556213,
0.3212801218032837,
-0.27182409167289734,
-0.05858291685581207,
0.26987650990486145,
0.04244943708181381,
0.13457290828227997,
-0.02794891595840454,
0.14090456068515778,
0.2621321380138397,
-0.3176407814025879,
0.4044618606567383,
-0.14804333448410034,
0.24499168992042542,
0.07746080309152603,
-0.09205874055624008,
-0.03867638111114502,
-0.2351960390806198,
0.3404468297958374,
0.005229566246271133,
0.13575559854507446,
0.16396945714950562,
0.06107744947075844,
0.05886576324701309,
-0.1962054818868637,
0.3465842008590698,
0.38974228501319885,
-0.12542606890201569,
-0.007905153557658195,
-0.09214814007282257,
0.020752929151058197,
0.09996437281370163,
-0.23919452726840973,
-0.04980097711086273,
0.09615851938724518,
-0.33806294202804565,
0.10445865243673325,
-0.064870186150074,
0.4415426552295685,
0.36529794335365295,
0.12574614584445953,
-0.17316758632659912,
0.2653917968273163,
0.37544727325439453,
-0.13857348263263702,
0.048745349049568176,
0.29217293858528137,
0.13070867955684662,
0.239094078540802,
-0.2582651376724243,
0.009521009400486946,
-0.04073087126016617,
-0.19975905120372772,
0.1887211799621582,
0.2722674310207367,
-0.6000096201896667,
0.09141907095909119,
-0.13492968678474426,
-0.35692280530929565,
-0.3108518421649933,
-0.09605250507593155,
-0.1586642563343048,
-0.3657112121582031,
-0.23034514486789703,
0.018007738515734673,
-0.11862903833389282,
0.07359063625335693,
-0.23182466626167297,
-0.006181046366691589,
-0.03965803235769272,
-0.09945732355117798,
0.06970490515232086,
-0.21326100826263428,
-0.23636969923973083,
0.025863535702228546,
0.37283962965011597,
0.03449856862425804,
0.09296438843011856,
-0.42892879247665405,
0.17371423542499542,
-0.498166561126709,
-0.2840934693813324,
0.10214681923389435,
-0.18043258786201477,
0.32930052280426025,
0.2639138996601105,
0.20450755953788757,
0.4122171998023987,
0.15726518630981445,
0.11254406720399857,
-0.08137698471546173,
0.15214329957962036,
0.26700055599212646,
-0.06578318029642105,
-0.1302306056022644,
0.247114360332489,
-0.2295038104057312,
-0.46308985352516174,
-0.496704638004303,
-0.13005158305168152,
0.06216570362448692,
0.07202284038066864,
0.19459083676338196,
0.06860322505235672,
0.04976651445031166,
0.32313987612724304,
-0.04724573343992233,
0.01847444660961628,
-0.2882665693759918,
0.3986731469631195,
-0.1967494785785675,
-0.37950727343559265,
0.2689269483089447,
0.16145502030849457,
0.05520033836364746,
-0.20266340672969818,
-0.4811462163925171,
0.08653265982866287,
0.04583706706762314,
-0.16404353082180023,
0.18225975334644318,
0.30991366505622864,
0.0968172699213028,
-0.09303739666938782,
0.05921834707260132,
-0.217891126871109,
-0.09473636746406555,
-0.16722875833511353,
-0.22907841205596924,
0.21719811856746674,
-0.0018774587661027908,
0.4843861758708954,
-0.21183323860168457,
0.30299365520477295,
0.1465144008398056,
0.04631765931844711,
0.28056496381759644,
0.06464225053787231,
0.5436042547225952,
-0.044265083968639374,
-0.24770401418209076,
0.11518895626068115,
-0.15862220525741577,
-0.03272123634815216,
0.2617878317832947,
-0.17672309279441833,
-0.023364419117569923,
-0.23418614268302917,
-0.19047534465789795,
-0.24832767248153687,
-0.12043648958206177,
0.03625617176294327,
-0.3672944903373718,
-0.08144762367010117,
-0.11270985007286072,
-0.1799863576889038,
-0.0755484327673912,
0.027611438184976578,
0.1313256025314331,
0.3174462914466858,
0.07576316595077515,
0.00539578590542078,
-0.22046072781085968,
-0.15185408294200897,
-0.06633149832487106,
0.5376027822494507,
-0.14901483058929443,
0.2380024641752243,
0.07959359884262085,
-0.14919614791870117,
0.13962562382221222,
-0.0401323139667511,
0.5050021409988403,
-0.0425991490483284,
0.005022190511226654,
0.3099868595600128,
-0.12785516679286957,
-0.45770055055618286,
-0.2563113868236542,
0.1583559662103653,
0.32313477993011475,
-0.056710828095674515,
-0.4880232810974121,
-0.17843052744865417,
-0.16545845568180084,
0.43335866928100586,
0.16675351560115814,
-0.1548190712928772,
-0.3779204487800598,
-0.3465820848941803,
0.06936229020357132,
-0.17890743911266327,
-0.3753213882446289,
0.04872070997953415,
-0.09707046300172806,
-0.15897227823734283,
0.08392246067523956,
-0.10452931374311447,
-0.24122211337089539,
0.2262255698442459,
0.14006094634532928,
0.14485576748847961,
0.06000940129160881,
0.22503456473350525,
0.6458712816238403,
0.29131370782852173,
0.5919591784477234,
0.7571237683296204,
-0.31402361392974854,
-0.5534255504608154,
0.25823280215263367,
-0.019204996526241302,
0.18190735578536987,
0.03917232155799866,
-0.009251518175005913,
-0.13249218463897705,
0.2818729281425476,
-0.055946364998817444,
-0.267477810382843,
0.05567411705851555,
0.3483802378177643,
0.058718517422676086,
-0.451178640127182,
-0.48800554871559143,
0.8522732257843018,
0.07872872054576874,
0.006264597177505493,
-0.0794559121131897,
0.4022732377052307,
-0.021655621007084846,
-0.10203494876623154,
-0.25300082564353943,
0.5653964877128601,
0.0767030194401741,
-0.006627894937992096,
0.040217094123363495,
-0.05791831016540527,
0.35129207372665405,
-0.40786993503570557,
0.006183050572872162,
-0.6429784297943115,
-0.07272472232580185,
-0.16693346202373505,
-0.18047508597373962,
0.35182544589042664,
-0.3290448784828186,
-0.1524086892604828,
0.13146930932998657,
-0.4323210120201111,
0.13398699462413788,
0.040940478444099426,
0.06833410263061523,
0.05240562558174133,
0.02675507217645645,
-0.03882857412099838,
0.09389331936836243,
-0.152599036693573,
0.30446675419807434,
-0.11143931746482849,
-0.04811795800924301,
-0.3636855185031891,
0.04846026748418808,
-0.26638340950012207,
0.019218072295188904,
-0.11960987001657486,
0.0806937962770462,
-0.05987871065735817,
-0.2692824602127075,
0.4827292859554291,
0.3177565336227417,
0.18284064531326294,
-0.01930391788482666,
-0.3476175367832184,
0.18556654453277588,
-0.015505991876125336,
-0.04927094653248787,
0.160591721534729,
-0.09787120670080185,
0.4093219041824341,
0.04295183718204498,
-0.18670496344566345,
0.2808433473110199,
-0.11498836427927017,
0.20597635209560394,
-0.02984306961297989,
0.1713372766971588,
0.3776245713233948,
-0.35968977212905884,
-0.1896907389163971,
-0.11188888549804688,
0.3321239650249481,
0.030568640679121017,
0.07688762247562408,
0.24400600790977478,
-0.2529926896095276,
0.13044165074825287,
-0.14348140358924866,
-0.13852745294570923,
-0.05612744763493538,
0.35973286628723145,
0.04437816143035889,
-0.06080099940299988,
0.3188079297542572,
0.14515118300914764,
-0.20351405441761017,
-0.0036239437758922577,
0.16533726453781128,
0.1862870454788208,
-0.35178136825561523,
0.11437075585126877,
0.2648986279964447,
-0.015072494745254517,
0.26636427640914917,
0.00976146012544632,
-0.04692722111940384,
-0.29478779435157776,
-0.2943609654903412,
-0.27149462699890137,
-0.26403558254241943,
0.07059195637702942,
-0.38382065296173096,
0.1940094232559204,
0.04578104615211487,
0.0999840497970581,
0.12183821201324463,
-0.13858573138713837,
-0.21374669671058655,
0.07241065055131912,
-0.16614724695682526,
-0.11150003969669342,
0.05695439875125885,
0.1176072210073471,
-0.14459285140037537,
-0.08532801270484924,
-0.052641019225120544,
0.02875719964504242,
-0.27314144372940063,
-0.09707034379243851,
-0.15164317190647125,
0.1811182200908661,
0.14250116050243378,
0.028155488893389702,
0.21404346823692322,
-0.270938903093338,
-0.08828718960285187,
0.10943782329559326,
0.1401275098323822,
0.12833666801452637,
-0.10782168805599213,
-0.024343112483620644,
0.25272712111473083,
-0.43939146399497986,
-0.2523875832557678,
0.4846782684326172,
0.06765258312225342,
0.24538971483707428,
0.055365100502967834,
0.055198587477207184,
-0.1598280966281891,
0.08939914405345917,
0.0371222123503685,
0.21419578790664673,
0.01414652168750763,
0.0017042085528373718,
0.5750330090522766,
-0.4365307688713074,
0.36663082242012024,
0.151512011885643,
0.3545505404472351,
0.6332255601882935,
-0.21993383765220642,
-0.22993063926696777,
0.04368354007601738,
0.11748963594436646,
-0.5436515808105469,
-0.19052426517009735,
0.19006066024303436,
-0.03830542415380478,
0.056583818048238754,
0.244890496134758,
0.3096863627433777,
-0.06937570124864578,
0.36467790603637695,
0.2217724323272705,
0.41178640723228455,
0.30902165174484253,
0.4611456096172333,
0.351079523563385,
-0.15021155774593353,
0.26812130212783813,
0.2282559722661972,
0.2074706107378006,
0.13594916462898254,
0.8034086227416992,
-0.2715596556663513,
0.04541163146495819,
-0.24182215332984924,
0.004485640674829483,
-0.04669370502233505,
-0.568282425403595,
0.4162157475948334,
0.11904405057430267,
-0.11776639521121979,
-0.21083730459213257,
-0.12040328979492188,
0.16612467169761658,
-0.06147325411438942,
0.13768087327480316,
-0.12843626737594604,
0.17419208586215973,
-0.03289176523685455,
0.17647524178028107,
0.11642405390739441,
-0.22649332880973816,
-0.02548878639936447,
-0.15617546439170837,
-0.09326046705245972,
-0.20022226870059967,
-0.2565496861934662,
0.16300159692764282,
-0.1767350286245346,
-0.1742047816514969,
-0.10328938812017441,
0.06755020469427109,
0.1643182933330536,
-0.22174663841724396,
-0.14978615939617157,
0.4005550742149353,
-0.015983298420906067,
0.3328746259212494,
0.2898256778717041,
0.5115810036659241,
0.37929731607437134,
-0.11587326228618622,
-0.14712798595428467,
0.09261609613895416,
-0.0014723967760801315,
0.06500387191772461,
-0.16591599583625793,
-0.20105493068695068,
0.22181682288646698,
0.3151227533817291,
0.05515298992395401,
-0.08281954377889633,
0.1734396368265152,
0.027199525386095047,
0.32927951216697693,
-0.29531124234199524,
-0.012894399464130402,
-0.2365436851978302,
-0.02848614752292633,
-0.42622318863868713,
-0.09964191168546677,
-0.5386183261871338,
0.10115134716033936,
0.5062565207481384,
-0.14076299965381622,
-0.06941437721252441,
-0.1285092532634735,
0.01192883774638176,
0.06616350263357162,
0.5839574337005615,
0.3878015875816345,
0.3071594834327698,
-0.3099996745586395,
0.00735890120267868,
-0.5614060163497925,
0.09802794456481934,
0.0009674765169620514,
-0.04258992522954941,
0.18871383368968964,
-0.22908860445022583,
0.01676425337791443,
-0.09985317289829254,
0.15314190089702606,
0.24976272881031036,
-0.1713065654039383,
0.10122669488191605,
-0.2755521833896637,
-0.34939831495285034,
-0.19319067895412445,
0.1021130308508873,
-0.1587773710489273,
-0.2563866376876831,
-0.0003955140709877014,
-0.18685753643512726,
-0.05380300432443619,
-0.23398934304714203,
-0.004616573452949524,
-0.1091206967830658,
-0.19441470503807068,
0.432940274477005,
-0.032880619168281555,
0.5883317589759827,
0.20192837715148926,
-0.13172651827335358,
-0.38336488604545593,
-0.24397046864032745,
-0.3183334767818451,
0.26411721110343933,
0.38827046751976013,
0.3614644706249237,
-0.17156754434108734,
-0.2993999421596527,
-0.1698303371667862,
-0.027175040915608406,
0.04581645876169205,
0.28898969292640686,
-0.39538437128067017,
-0.05643485486507416,
-0.17292428016662598,
0.1790347844362259,
0.36325591802597046,
0.09962920844554901,
0.03468605875968933,
0.2779974043369293,
-0.4226280450820923,
-0.18841513991355896,
0.48960620164871216,
-0.06944194436073303,
-0.13438649475574493,
-0.18876954913139343,
0.23247995972633362,
-0.23047032952308655,
-0.06444624811410904,
-0.41515395045280457,
0.13045936822891235,
0.35541123151779175,
0.06909915059804916,
0.0033348537981510162,
0.26816925406455994,
0.020403001457452774,
-0.01866503804922104,
-0.05742805451154709,
0.023074038326740265,
0.07999762147665024,
-0.03238480165600777,
0.06834010779857635,
-0.10186553001403809
] |
https://github.com/huggingface/datasets/issues/4932 | Dataset Viewer issue for bigscience-biomedical/biosses | closing as I think the issue is relative imports and attempting to read json files directly in the repo (thanks again @lhoestq ) | ### Link
https://huggingface.co/datasets/bigscience-biomedical/biosses
### Description
I've just been working on adding the dataset loader script to this dataset and working with the relative imports. I'm not sure how to interpret the error below (show where the dataset preview used to be) .
```
Status code: 400
Exception: ModuleNotFoundError
Message: No module named 'datasets_modules.datasets.bigscience-biomedical--biosses.ddbd5893bf6c2f4db06f407665eaeac619520ba41f69d94ead28f7cc5b674056.bigbiohub'
```
### Owner
Yes | 23 | Dataset Viewer issue for bigscience-biomedical/biosses
### Link
https://huggingface.co/datasets/bigscience-biomedical/biosses
### Description
I've just been working on adding the dataset loader script to this dataset and working with the relative imports. I'm not sure how to interpret the error below (show where the dataset preview used to be) .
```
Status code: 400
Exception: ModuleNotFoundError
Message: No module named 'datasets_modules.datasets.bigscience-biomedical--biosses.ddbd5893bf6c2f4db06f407665eaeac619520ba41f69d94ead28f7cc5b674056.bigbiohub'
```
### Owner
Yes
closing as I think the issue is relative imports and attempting to read json files directly in the repo (thanks again @lhoestq ) | [
-0.3758320212364197,
0.0773666650056839,
-0.03822566941380501,
0.16882605850696564,
0.2825668454170227,
0.089407779276371,
0.12374646961688995,
0.4748040437698364,
0.09804359078407288,
0.06140431389212608,
-0.22690460085868835,
-0.059327829629182816,
-0.08528667688369751,
0.20439234375953674,
0.17590533196926117,
0.13863371312618256,
0.21135976910591125,
0.20592613518238068,
-0.20920976996421814,
-0.12074711918830872,
-0.35555899143218994,
0.0950898677110672,
-0.25428149104118347,
0.18154656887054443,
-0.0483885258436203,
0.09725328534841537,
0.038713112473487854,
0.26321154832839966,
-0.3177033066749573,
-0.4654867947101593,
0.11832281947135925,
0.11522930860519409,
0.36495232582092285,
0.6473473906517029,
-0.00011629133950918913,
0.3563356399536133,
0.5827062726020813,
-0.07283902913331985,
-0.21394877135753632,
-0.11292977631092072,
-0.16483712196350098,
-0.3959304094314575,
0.18437783420085907,
-0.12750989198684692,
0.21077322959899902,
-0.37581807374954224,
0.08951060473918915,
-0.40142756700515747,
0.09993535280227661,
0.17431224882602692,
0.18126195669174194,
-0.001918269321322441,
0.11662322282791138,
-0.038386303931474686,
0.2759336233139038,
0.37574994564056396,
-0.11182928085327148,
0.19404813647270203,
0.24744844436645508,
0.21462157368659973,
-0.09116382151842117,
0.20721445977687836,
-0.22593654692173004,
0.12240386009216309,
0.36216527223587036,
-0.11843355745077133,
0.38442113995552063,
-0.35384899377822876,
0.10168929398059845,
0.4419451653957367,
0.8475625514984131,
-0.10388053208589554,
-0.35666754841804504,
-0.1821543276309967,
-0.04574589431285858,
0.07644344121217728,
0.13042420148849487,
0.18595203757286072,
0.08876420557498932,
0.11842450499534607,
-0.07252157479524612,
-0.2527981102466583,
-0.449747234582901,
0.22768636047840118,
-0.4441226124763489,
0.043302156031131744,
-0.2002502828836441,
0.1253202259540558,
0.06831450760364532,
-0.20055747032165527,
0.45604392886161804,
-0.06815176457166672,
-0.11132393777370453,
0.18640007078647614,
-0.3893547058105469,
0.07406353950500488,
0.36341679096221924,
0.34655997157096863,
0.13467815518379211,
0.14970636367797852,
-0.1581169217824936,
0.17714014649391174,
-0.2456459403038025,
0.2370595633983612,
0.29904603958129883,
-0.07841305434703827,
-0.1522045135498047,
0.23161602020263672,
0.558055579662323,
0.16071593761444092,
0.2561798095703125,
0.18014934659004211,
-0.20804108679294586,
-0.38197246193885803,
-0.5329228639602661,
-0.040193285793066025,
0.43907856941223145,
-0.2730342149734497,
-0.1377965658903122,
0.3937968313694,
-0.23172488808631897,
-0.014607375487685204,
0.024626195430755615,
0.3624180853366852,
-0.12801215052604675,
0.29907217621803284,
0.285789430141449,
0.11441683024168015,
-0.19800938665866852,
-0.1884857714176178,
-0.09476938098669052,
0.19248057901859283,
-0.14312095940113068,
-0.29078489542007446,
0.08203768730163574,
0.07836650311946869,
0.15167558193206787,
-0.2859805226325989,
0.34582072496414185,
-0.1409025341272354,
-0.25747600197792053,
-0.14994372427463531,
-0.10114455968141556,
0.585232138633728,
0.05436286702752113,
0.08297140151262283,
0.09583564102649689,
-0.20295828580856323,
-0.09161098301410675,
0.15387864410877228,
-0.19330629706382751,
-0.17943595349788666,
-0.2614211142063141,
0.11644299328327179,
-0.5686265230178833,
-0.04449599236249924,
-0.5089206695556641,
0.003109581768512726,
-0.41420796513557434,
-0.20978595316410065,
-0.237481951713562,
-0.039202071726322174,
0.0226975716650486,
-0.06681591272354126,
0.0025768615305423737,
0.7321453094482422,
-0.7240363955497742,
-0.10735374689102173,
-0.08157132565975189,
-0.1540978103876114,
-0.08948332816362381,
0.060999877750873566,
-0.19370582699775696,
0.2836114764213562,
-0.2440718114376068,
-0.005686379969120026,
0.4188382923603058,
-0.352003812789917,
-0.46366557478904724,
0.46746331453323364,
-0.2147533893585205,
0.047056399285793304,
0.2622327208518982,
0.13384859263896942,
0.054141223430633545,
-0.10379460453987122,
-0.09538225829601288,
0.04296620190143585,
0.08904466778039932,
-0.039444804191589355,
0.03711738809943199,
-0.3008638918399811,
-0.08869653940200806,
0.2952162027359009,
0.417207270860672,
-0.06286726146936417,
0.21509197354316711,
-0.029391564428806305,
0.4200662672519684,
-0.026497144252061844,
0.01520400308072567,
0.32063353061676025,
0.28394314646720886,
0.07423246651887894,
0.11152219772338867,
-0.1508912444114685,
-0.30819883942604065,
0.17022022604942322,
-0.14797064661979675,
-0.028991207480430603,
-0.16703028976917267,
0.003195483237504959,
-0.3455367982387543,
0.12210886925458908,
-0.43385717272758484,
0.0977553129196167,
0.08471229672431946,
0.2012103796005249,
-0.2355075180530548,
0.29514777660369873,
-0.27965492010116577,
0.28221169114112854,
0.1283254772424698,
0.14624768495559692,
-0.39101549983024597,
0.342626690864563,
-0.0964646115899086,
0.11558111757040024,
0.20394642651081085,
0.13715890049934387,
0.24689438939094543,
-0.36805465817451477,
-0.08206037431955338,
0.21730947494506836,
0.006321395747363567,
0.15340395271778107,
0.13176365196704865,
0.19140015542507172,
0.33030807971954346,
-0.23177224397659302,
0.29149165749549866,
-0.07927420735359192,
0.21761727333068848,
0.09267237037420273,
-0.19367694854736328,
0.035487353801727295,
-0.1615271419286728,
0.3751384913921356,
-0.04216206073760986,
0.05425620079040527,
0.3150624930858612,
0.030434008687734604,
0.08446961641311646,
-0.1424991488456726,
0.3299727737903595,
0.5946654081344604,
-0.171614870429039,
-0.04671279340982437,
-0.09444211423397064,
0.0588679313659668,
0.24916867911815643,
-0.32040348649024963,
-0.13127002120018005,
0.01911625638604164,
-0.27820050716400146,
0.00596030056476593,
-0.04390205442905426,
0.4847778379917145,
0.2773737609386444,
0.11633211374282837,
-0.17451785504817963,
0.2775033116340637,
0.3795982897281647,
-0.1258269101381302,
-0.04285850375890732,
0.36169588565826416,
0.20282113552093506,
0.19457033276557922,
-0.18412066996097565,
-0.10524705797433853,
-0.07280842214822769,
-0.23522363603115082,
0.2734540104866028,
0.3382597863674164,
-0.47197583317756653,
0.13496457040309906,
-0.24297741055488586,
-0.23382949829101562,
-0.18936169147491455,
-0.14938822388648987,
-0.12598244845867157,
-0.3988700807094574,
-0.19411732256412506,
0.13492445647716522,
-0.17599844932556152,
0.05825655162334442,
-0.16345945000648499,
0.07040815055370331,
-0.010080346837639809,
-0.0654551088809967,
-0.005073022097349167,
-0.31165793538093567,
-0.2377464771270752,
0.03077046200633049,
0.46595999598503113,
0.04105750098824501,
0.042013414204120636,
-0.4584791660308838,
0.1401187926530838,
-0.4649898111820221,
-0.23530933260917664,
0.1637999415397644,
-0.13480034470558167,
0.3136806786060333,
0.1324964463710785,
0.1419551968574524,
0.372463583946228,
0.22972145676612854,
0.06795764714479446,
-0.02421189844608307,
0.008336305618286133,
0.24633750319480896,
-0.03133908286690712,
-0.11635784059762955,
0.18526066839694977,
-0.33229416608810425,
-0.3522126078605652,
-0.4211175739765167,
-0.0575341060757637,
0.05175169184803963,
0.10266976058483124,
-0.07563095539808273,
0.09459973871707916,
0.059349384158849716,
0.30784210562705994,
-0.03960190713405609,
-0.06618071347475052,
-0.4644831717014313,
0.3238986134529114,
-0.20667041838169098,
-0.3477460443973541,
0.40320801734924316,
0.20120015740394592,
0.03215815871953964,
-0.1322353482246399,
-0.6426029205322266,
0.10099313408136368,
0.08269449323415756,
-0.19769443571567535,
0.10159516334533691,
0.15282262861728668,
0.12120404839515686,
-0.12273944169282913,
0.037190526723861694,
-0.2578399181365967,
-0.20994694530963898,
-0.13412007689476013,
-0.2391817569732666,
0.22798722982406616,
-0.06356017291545868,
0.5886310935020447,
-0.1889919489622116,
0.24919144809246063,
0.06882260739803314,
0.02719092182815075,
0.14796830713748932,
0.09694339334964752,
0.4846518933773041,
0.08219168335199356,
-0.14654326438903809,
0.15085075795650482,
-0.1678965985774994,
-0.08675847947597504,
0.2651013433933258,
-0.055446796119213104,
-0.12512069940567017,
-0.24955110251903534,
-0.11985655128955841,
-0.45125287771224976,
-0.2058805525302887,
-0.04432320594787598,
-0.25103306770324707,
-0.17876282334327698,
-0.02734164148569107,
-0.10100799798965454,
-0.10005499422550201,
0.060535624623298645,
0.047604285180568695,
0.2809811532497406,
0.059984613209962845,
0.002113544847816229,
-0.2792338728904724,
-0.1497184783220291,
-0.0017670169472694397,
0.5259567499160767,
-0.173994243144989,
0.2611895501613617,
0.11434789001941681,
-0.005532998591661453,
0.16235384345054626,
-0.17396977543830872,
0.520797610282898,
-0.03385254740715027,
0.12285131961107254,
0.32172247767448425,
-0.18187904357910156,
-0.39566224813461304,
-0.23017512261867523,
0.04273904487490654,
0.36569687724113464,
0.05474797636270523,
-0.33663442730903625,
-0.2733583152294159,
-0.21337348222732544,
0.4126243591308594,
0.06019682064652443,
-0.14190587401390076,
-0.3256627023220062,
-0.24496537446975708,
-0.02538381516933441,
-0.2577965259552002,
-0.3061501979827881,
0.004883239045739174,
-0.08163443207740784,
-0.16660833358764648,
0.03263727203011513,
-0.07383260130882263,
-0.16555240750312805,
0.14634591341018677,
0.18340030312538147,
0.06824439764022827,
0.11392875015735626,
0.21633580327033997,
0.5795897245407104,
0.35923656821250916,
0.7267507910728455,
0.7946506142616272,
-0.05391727760434151,
-0.4755971431732178,
0.28023213148117065,
-0.06394068151712418,
0.116099514067173,
0.03614751249551773,
-0.013745083473622799,
-0.1740362048149109,
0.26391488313674927,
-0.054418012499809265,
-0.21619772911071777,
0.16853325068950653,
0.367326557636261,
0.08165358752012253,
-0.46944189071655273,
-0.4951114058494568,
0.8899040222167969,
0.06786541640758514,
-0.07137187570333481,
-0.16448605060577393,
0.40587884187698364,
0.027255093678832054,
-0.09786941856145859,
-0.23987743258476257,
0.5541432499885559,
0.04767397791147232,
-0.0665513426065445,
0.16900092363357544,
-0.12464935332536697,
0.3235608637332916,
-0.6754478812217712,
0.07893297076225281,
-0.5363982319831848,
0.20094266533851624,
-0.18243521451950073,
-0.20615193247795105,
0.3134741485118866,
-0.23366372287273407,
-0.08215257525444031,
-0.012322083115577698,
-0.2578718066215515,
0.18426315486431122,
0.0185978002846241,
-0.01645761728286743,
0.09365853667259216,
0.0877508819103241,
-0.10777492821216583,
0.1178787499666214,
-0.27308011054992676,
0.19517114758491516,
-0.12866342067718506,
-0.14661549031734467,
-0.4406857490539551,
0.08478333055973053,
-0.30489489436149597,
0.08121398091316223,
0.030441779643297195,
0.07365265488624573,
-0.06759048998355865,
-0.2809820771217346,
0.4470616281032562,
0.19343270361423492,
0.24489182233810425,
0.09449804574251175,
-0.3925979733467102,
0.14120668172836304,
-0.1557472050189972,
-0.11497204005718231,
0.1116861030459404,
-0.015087133273482323,
0.29715901613235474,
-0.012440003454685211,
-0.3086928427219391,
0.23961660265922546,
-0.13700293004512787,
0.11448730528354645,
0.03451855480670929,
0.23949511349201202,
0.30484727025032043,
-0.36501291394233704,
-0.059713177382946014,
0.025774795562028885,
0.2487882673740387,
0.00174664705991745,
0.07127454876899719,
0.2331426739692688,
-0.28764986991882324,
0.1136758029460907,
-0.07489880919456482,
-0.18075290322303772,
-0.06215447559952736,
0.2409825623035431,
0.11995319277048111,
-0.12208498269319534,
0.27491697669029236,
0.08924458920955658,
-0.24250420928001404,
-0.06555372476577759,
0.15127989649772644,
0.2263389527797699,
-0.22475877404212952,
0.10637598484754562,
0.1533001810312271,
-0.07177454978227615,
0.3071241080760956,
-0.06651678681373596,
-0.04949679970741272,
-0.33707311749458313,
-0.14531350135803223,
-0.3695898950099945,
-0.29341813921928406,
0.21790996193885803,
-0.46519359946250916,
0.15466423332691193,
0.12180572003126144,
0.0943332314491272,
-0.09725674986839294,
-0.17469187080860138,
-0.2070198357105255,
0.20561212301254272,
-0.30012133717536926,
-0.08283793926239014,
-0.022470638155937195,
0.08256866037845612,
-0.1836518794298172,
-0.06492365896701813,
-0.053891874849796295,
0.013682501390576363,
-0.3754890561103821,
-0.08345237374305725,
-0.12284980714321136,
0.19348184764385223,
0.13879337906837463,
0.0007782764732837677,
0.18746063113212585,
-0.29881441593170166,
-0.11020874977111816,
0.15746715664863586,
0.15642088651657104,
0.09432976692914963,
-0.0018647462129592896,
-0.02364065870642662,
0.33146053552627563,
-0.4058898687362671,
-0.1629466414451599,
0.45058226585388184,
0.04841317608952522,
0.31443464756011963,
0.028988473117351532,
0.12629635632038116,
-0.17393480241298676,
0.04786956310272217,
-0.0851786658167839,
0.16836391389369965,
0.026139922440052032,
0.19162100553512573,
0.6646406054496765,
-0.46784061193466187,
0.44500434398651123,
0.17636071145534515,
0.33204150199890137,
0.5882340669631958,
-0.19077150523662567,
-0.17895378172397614,
0.04200272634625435,
0.10543607920408249,
-0.4858459234237671,
-0.24571193754673004,
0.3635672628879547,
-0.08136510848999023,
0.07349294424057007,
0.1989452987909317,
0.2580493092536926,
0.015789508819580078,
0.3499225974082947,
0.20374077558517456,
0.46086427569389343,
0.39755547046661377,
0.4576604664325714,
0.34854641556739807,
-0.2842771112918854,
0.15541315078735352,
0.17978766560554504,
0.31560561060905457,
0.17979209125041962,
0.7735896110534668,
-0.2473972737789154,
0.08150487393140793,
-0.09081821888685226,
0.07562994211912155,
-0.0809483751654625,
-0.5216594934463501,
0.35066211223602295,
0.22243118286132812,
-0.0453931987285614,
-0.17332282662391663,
-0.10530251264572144,
-0.014704495668411255,
0.03924846649169922,
0.2374715656042099,
-0.28862741589546204,
0.223387211561203,
0.03764079883694649,
0.1711319088935852,
0.03781011700630188,
-0.2718358039855957,
-0.003367319703102112,
-0.039063479751348495,
-0.1690732091665268,
-0.24546362459659576,
-0.27334877848625183,
0.18075692653656006,
-0.22738809883594513,
-0.18140409886837006,
0.009255874902009964,
-0.08498828858137131,
0.05179064720869064,
-0.2513120174407959,
-0.1593591868877411,
0.3198120892047882,
-0.022175535559654236,
0.28063616156578064,
0.2616642713546753,
0.4347149431705475,
0.34209349751472473,
-0.1379089504480362,
-0.18619848787784576,
0.08655697107315063,
-0.012135342694818974,
0.016744334250688553,
-0.07980197668075562,
-0.15327633917331696,
0.14880958199501038,
0.2946438193321228,
0.06203808635473251,
-0.06435107439756393,
0.24817274510860443,
0.053123459219932556,
0.3098070025444031,
-0.18819659948349,
0.011503838002681732,
-0.2772653102874756,
0.022205688059329987,
-0.4265406131744385,
-0.21873509883880615,
-0.43457895517349243,
-0.040950555354356766,
0.43348297476768494,
-0.16788551211357117,
-0.023796547204256058,
-0.12658679485321045,
0.02700868621468544,
-0.024853307753801346,
0.5970834493637085,
0.3885338008403778,
0.3180488348007202,
-0.21615992486476898,
-0.06192214414477348,
-0.4384332597255707,
0.1785491704940796,
-0.11183743178844452,
-0.07138632237911224,
0.1951916515827179,
-0.07419344782829285,
0.031228207051753998,
-0.017789281904697418,
0.1238013207912445,
0.2224576771259308,
-0.21629460155963898,
0.1130795031785965,
-0.3427596390247345,
-0.36716246604919434,
-0.03879285603761673,
0.06543710082769394,
-0.14362379908561707,
-0.2697271704673767,
0.07012458145618439,
-0.07611950486898422,
-0.019626352936029434,
-0.1690249890089035,
0.12237012386322021,
-0.17792434990406036,
-0.23029059171676636,
0.38741546869277954,
0.050200819969177246,
0.46549150347709656,
0.26491618156433105,
-0.1604568064212799,
-0.4093826115131378,
-0.3520578444004059,
-0.2768232226371765,
0.23396852612495422,
0.2579565644264221,
0.3992048501968384,
-0.25435060262680054,
-0.061354223638772964,
-0.09082789719104767,
-0.17812936007976532,
-0.03117961250245571,
0.23951737582683563,
-0.3840470314025879,
-0.05426400154829025,
-0.18293097615242004,
0.12484695762395859,
0.22988112270832062,
-0.016288965940475464,
0.0423649325966835,
0.2874341309070587,
-0.41439902782440186,
-0.07566134631633759,
0.5434085130691528,
-0.0741051733493805,
-0.1519618183374405,
-0.07510759681463242,
0.12471545487642288,
-0.23422890901565552,
-0.10982755571603775,
-0.4260190427303314,
0.24249136447906494,
0.36826616525650024,
0.01274515688419342,
-0.04272623360157013,
0.20139029622077942,
-0.031674329191446304,
-0.13747276365756989,
-0.0913476049900055,
0.02618495374917984,
0.06513960659503937,
-0.11777617782354355,
0.026920180767774582,
-0.09502451121807098
] |
https://github.com/huggingface/datasets/issues/4920 | Unable to load local tsv files through load_dataset method | Hi @DataNoob0723,
Under the hood, we use `pandas` to load CSV/TSV files. Therefore, you should use "csv" and pass `sep="\t"`, as explained in our docs: https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/loading_methods#from-files
```python
ds = load_dataset('csv', sep="\t", data_files=data_files)
``` | ## Describe the bug
Unable to load local tsv files through load_dataset method.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
data_files = {
'train': 'train.tsv',
'test': 'test.tsv'
}
raw_datasets = load_dataset('tsv', data_files=data_files)
## Expected results
I am pretty sure the data files exist in the current directory. The above code should load them as Datasets, but threw exceptions.
## Actual results
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
[<ipython-input-9-24207899c1af>](https://localhost:8080/#) in <module>
----> 1 raw_datasets = load_dataset('tsv', data_files='train.tsv')
2 frames
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, **download_kwargs)
1244 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. "
1245 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}"
-> 1246 ) from None
1247 raise e1 from None
1248 else:
FileNotFoundError: Couldn't find a dataset script at /content/tsv/tsv.py or any data file in the same directory. Couldn't find 'tsv' on the Hugging Face Hub either: FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/main/datasets/tsv/tsv.py
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
| 33 | Unable to load local tsv files through load_dataset method
## Describe the bug
Unable to load local tsv files through load_dataset method.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
data_files = {
'train': 'train.tsv',
'test': 'test.tsv'
}
raw_datasets = load_dataset('tsv', data_files=data_files)
## Expected results
I am pretty sure the data files exist in the current directory. The above code should load them as Datasets, but threw exceptions.
## Actual results
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
[<ipython-input-9-24207899c1af>](https://localhost:8080/#) in <module>
----> 1 raw_datasets = load_dataset('tsv', data_files='train.tsv')
2 frames
[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, **download_kwargs)
1244 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. "
1245 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}"
-> 1246 ) from None
1247 raise e1 from None
1248 else:
FileNotFoundError: Couldn't find a dataset script at /content/tsv/tsv.py or any data file in the same directory. Couldn't find 'tsv' on the Hugging Face Hub either: FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/main/datasets/tsv/tsv.py
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
Hi @DataNoob0723,
Under the hood, we use `pandas` to load CSV/TSV files. Therefore, you should use "csv" and pass `sep="\t"`, as explained in our docs: https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/loading_methods#from-files
```python
ds = load_dataset('csv', sep="\t", data_files=data_files)
``` | [
-0.1784229576587677,
-0.28648197650909424,
-0.012520809657871723,
0.27422094345092773,
0.36084723472595215,
0.10372867435216904,
0.5434625744819641,
0.42598918080329895,
0.5098843574523926,
0.10509300231933594,
-0.10473917424678802,
0.42484867572784424,
-0.1907421052455902,
0.1635621339082718,
0.2749043107032776,
-0.08378800749778748,
-0.048390500247478485,
0.1476343721151352,
-0.2513507306575775,
-0.14906862378120422,
-0.13444221019744873,
0.10119640082120895,
0.07302166521549225,
0.01658037304878235,
-0.2146633267402649,
0.2918262779712677,
0.040202341973781586,
0.4373857378959656,
0.1623980849981308,
-0.31859731674194336,
0.22560669481754303,
-0.12684762477874756,
0.4159001410007477,
0.7152726054191589,
-0.0001084151299437508,
0.4268643856048584,
0.23638439178466797,
-0.10471002757549286,
-0.18949294090270996,
-0.3686085343360901,
-0.19897663593292236,
-0.20187559723854065,
0.1701727956533432,
-0.23938238620758057,
-0.17412900924682617,
-0.06856583803892136,
-0.06248127669095993,
-0.4562332332134247,
0.5021074414253235,
0.4845070540904999,
0.22559842467308044,
0.49001845717430115,
-0.0851185992360115,
-0.03689952194690704,
0.4424048364162445,
0.253280371427536,
-0.19211390614509583,
0.42930808663368225,
0.13744959235191345,
-0.25353294610977173,
0.04039495438337326,
0.11887869238853455,
0.08284218609333038,
-0.006468212231993675,
0.30020639300346375,
0.25064510107040405,
-0.01791108399629593,
-0.1513238549232483,
-0.003755267709493637,
0.08764471858739853,
0.5319077372550964,
-0.28813138604164124,
-0.3817582428455353,
-0.08897117525339127,
-0.187795951962471,
-0.07849109917879105,
0.1755707710981369,
0.09447705000638962,
-0.2400902360677719,
0.19533365964889526,
-0.4252275228500366,
0.03334521874785423,
-0.19678670167922974,
0.24314892292022705,
0.06829468905925751,
-0.2947332262992859,
0.03432955592870712,
0.043200600892305374,
-0.009611006826162338,
0.07298809289932251,
0.2193913459777832,
-0.015281528234481812,
0.28243955969810486,
0.30400320887565613,
-0.35030990839004517,
0.1188226044178009,
0.5107637047767639,
-0.19575923681259155,
-0.035079844295978546,
-0.06016821414232254,
0.09415741264820099,
-0.2034696340560913,
-0.17818312346935272,
0.20841094851493835,
0.0779300183057785,
0.110285684466362,
-0.023480094969272614,
0.18050839006900787,
0.15321891009807587,
0.2249877154827118,
-0.2342144399881363,
-0.04506666958332062,
-0.24279530346393585,
-0.41274383664131165,
0.008091825991868973,
0.004439789801836014,
0.40743333101272583,
-0.06661935895681381,
-0.23087581992149353,
0.14094537496566772,
-0.18346145749092102,
0.18089553713798523,
0.19756443798542023,
0.20185154676437378,
0.05128146708011627,
0.17053130269050598,
0.3059764504432678,
-0.0793231725692749,
-0.2259514182806015,
0.11912975460290909,
-0.31848958134651184,
0.21842919290065765,
-0.1524997055530548,
-0.07025768607854843,
0.2549084722995758,
-0.1654004156589508,
0.16600841283798218,
0.013079441152513027,
0.07866431772708893,
-0.032685186713933945,
0.048740290105342865,
-0.13932985067367554,
0.05482351779937744,
0.40979912877082825,
-0.0893305242061615,
0.05356507748365402,
0.11377418041229248,
-0.11626501381397247,
-0.1320495456457138,
0.20356044173240662,
-0.3630980849266052,
-0.48875972628593445,
0.03965087980031967,
0.21119600534439087,
-0.2344503104686737,
0.02016269415616989,
-0.16872793436050415,
-0.1841336488723755,
0.04593187943100929,
-0.04088163748383522,
-0.001531444489955902,
-0.3083081841468811,
-0.28826940059661865,
-0.13125194609165192,
0.5580411553382874,
0.8421809077262878,
-0.5582286715507507,
0.06562235951423645,
0.06823325157165527,
-0.1678810864686966,
0.17460240423679352,
0.35494399070739746,
-0.34198427200317383,
0.4623569846153259,
-0.3617246150970459,
-0.09438741952180862,
0.19046631455421448,
-0.5939013957977295,
-0.16448140144348145,
0.39367473125457764,
-0.17012649774551392,
0.18200713396072388,
0.058701228350400925,
-0.09371068328619003,
-0.19065600633621216,
0.10885899513959885,
0.24089041352272034,
0.25090283155441284,
-0.10801553726196289,
0.011514568701386452,
-0.3070434033870697,
-0.07383014261722565,
0.14808467030525208,
0.4209347367286682,
0.05060134083032608,
0.0022600069642066956,
0.194492906332016,
-0.0234348364174366,
0.21793150901794434,
-0.09250776469707489,
-0.06612684577703476,
0.27801191806793213,
0.23120905458927155,
0.1721704751253128,
-0.03204378858208656,
-0.2044820785522461,
-0.4874555468559265,
0.368055522441864,
-0.05348719656467438,
-0.16347600519657135,
-0.03305904567241669,
-0.041283175349235535,
-0.42658308148384094,
0.004274336621165276,
-0.16463451087474823,
0.009081386029720306,
0.11797700822353363,
0.22075395286083221,
-0.05750427395105362,
0.08282677829265594,
-0.270496666431427,
0.14808796346187592,
-0.33801549673080444,
-0.14471593499183655,
-0.310083270072937,
0.5554094910621643,
-0.03858742117881775,
-0.1620723456144333,
-0.06747709214687347,
0.09314626455307007,
0.08173049986362457,
-0.34290316700935364,
-0.24501964449882507,
0.4650996923446655,
0.262961208820343,
0.21902094781398773,
-0.0018678009510040283,
-0.08416531980037689,
0.1621221899986267,
-0.10022936761379242,
-0.17789402604103088,
0.150273397564888,
0.308715283870697,
0.18222254514694214,
-0.34190815687179565,
0.1321118175983429,
-0.4344530999660492,
-0.019084341824054718,
0.1337939351797104,
-0.022730493918061256,
0.2461332380771637,
-0.14099520444869995,
-0.1251373440027237,
-0.07085119932889938,
0.33854392170906067,
0.25504007935523987,
0.1827455312013626,
0.16476844251155853,
-0.3644452691078186,
-0.06482861191034317,
0.3280949890613556,
0.014231149107217789,
-0.13638654351234436,
0.06779205799102783,
0.03662833943963051,
0.17316216230392456,
0.12516772747039795,
0.1554276943206787,
0.494367778301239,
0.1054956316947937,
-0.14016272127628326,
0.042614154517650604,
0.060411352664232254,
-0.1917281150817871,
0.06426365673542023,
0.04653441533446312,
0.13274264335632324,
0.531084418296814,
0.014226900413632393,
0.1765703409910202,
-0.39458268880844116,
-0.2944912612438202,
0.03137243539094925,
0.1825476884841919,
-0.5019534230232239,
0.04764395207166672,
-0.3592914044857025,
-0.10855302959680557,
-0.3826242983341217,
-0.09967026859521866,
0.03821200504899025,
0.05280893296003342,
-0.09302572906017303,
0.012482617050409317,
-0.2776761054992676,
0.06429228186607361,
-0.13925813138484955,
0.1558396816253662,
0.13715316355228424,
-0.25979647040367126,
-0.08266302943229675,
-0.11084997653961182,
-0.22178027033805847,
-0.0162837952375412,
0.3679305911064148,
-0.10530420392751694,
0.20447447896003723,
-0.34984156489372253,
-0.15738926827907562,
-0.140375018119812,
-0.07446840405464172,
0.005475223064422607,
-0.07356774061918259,
0.4485839903354645,
0.12054222077131271,
0.37897735834121704,
-0.048819925636053085,
-0.17926901578903198,
0.36519724130630493,
-0.153545543551445,
-0.12969376146793365,
0.01891600340604782,
0.09330300241708755,
-0.21904444694519043,
-0.33041590452194214,
-0.7292242646217346,
-0.3998151421546936,
-0.4532335102558136,
0.1618502140045166,
0.07144230604171753,
0.09037207067012787,
0.41745707392692566,
0.2230195701122284,
0.26311448216438293,
-0.004559216555207968,
-0.05740799009799957,
0.07802792638540268,
-0.45121222734451294,
0.34597331285476685,
-0.3182615041732788,
-0.39938491582870483,
0.026012223213911057,
0.036266062408685684,
-0.028320912271738052,
0.10503087937831879,
-0.3114188015460968,
-0.10541075468063354,
-0.1977865844964981,
0.2030923068523407,
-0.21612820029258728,
0.04367717355489731,
0.19550821185112,
-0.0747717097401619,
-0.04367941617965698,
-0.20650440454483032,
-0.12369425594806671,
0.08820290863513947,
0.23595654964447021,
-0.04258514195680618,
0.1432112604379654,
0.5095598101615906,
-0.1684776395559311,
0.641059160232544,
0.06874451041221619,
-0.05382562056183815,
0.3807240128517151,
-0.33740487694740295,
0.24187134206295013,
-0.2964329421520233,
-0.4762096703052521,
0.04318717494606972,
-0.027247637510299683,
-0.3196758031845093,
0.1571318805217743,
0.015993446111679077,
0.14600051939487457,
-0.29726994037628174,
0.014344856142997742,
-0.22355690598487854,
-0.2281278818845749,
0.17689408361911774,
-0.1883079707622528,
0.2915884256362915,
-0.08842840790748596,
-0.07412835955619812,
-0.02437634766101837,
0.03775221109390259,
0.06675370037555695,
0.43536150455474854,
0.38126805424690247,
0.20112204551696777,
-0.3533989191055298,
0.14256852865219116,
-0.022885948419570923,
-0.019356712698936462,
0.2584206163883209,
0.49001652002334595,
-0.17946957051753998,
-0.1642010509967804,
0.012522749602794647,
0.007175504229962826,
0.46446388959884644,
0.013648070394992828,
0.3678232431411743,
0.16692057251930237,
-0.32537513971328735,
-0.5024374127388,
-0.2633094787597656,
-0.05268826335668564,
-0.01075243204832077,
-0.06215168908238411,
0.5051447749137878,
0.13850194215774536,
-0.26160022616386414,
0.06338006258010864,
0.24366743862628937,
-0.1402370184659958,
-0.1756095439195633,
-0.24295412003993988,
-0.07845566421747208,
-0.20125748217105865,
-0.1688331663608551,
0.13935105502605438,
0.1654631644487381,
-0.09277762472629547,
-0.22465965151786804,
0.09105553478002548,
-0.11126269400119781,
0.033062078058719635,
0.11077877879142761,
0.2495202124118805,
0.03937288001179695,
0.4087199866771698,
0.23278628289699554,
0.18144430220127106,
0.31817516684532166,
0.6684863567352295,
-0.2043519914150238,
-0.5946832299232483,
-0.015468906611204147,
-0.07773614674806595,
0.17144355177879333,
0.3277953267097473,
-0.38030728697776794,
-0.24293148517608643,
-0.07432118058204651,
-0.04600859433412552,
-0.06234311684966087,
0.36772316694259644,
0.20525480806827545,
-0.09355342388153076,
0.20632542669773102,
-0.37796008586883545,
0.29088741540908813,
-0.05592750757932663,
0.09539061784744263,
0.19205310940742493,
-0.12997056543827057,
-0.2471495419740677,
0.21529538929462433,
-0.18881714344024658,
0.6013756990432739,
-0.012680299580097198,
0.19341668486595154,
0.314444899559021,
-0.0165468230843544,
0.10271644592285156,
-0.08750420063734055,
0.06145903095602989,
-0.2768903374671936,
-0.2444932907819748,
-0.05006386339664459,
-0.17210884392261505,
0.19299238920211792,
-0.012324266135692596,
0.10763914883136749,
0.08409231156110764,
-0.09771572798490524,
0.531193733215332,
0.009289315901696682,
0.027357377111911774,
0.32708635926246643,
-0.14107820391654968,
-0.3000338077545166,
0.1515377014875412,
0.0037350133061408997,
0.34464630484580994,
0.006659278646111488,
-0.24852879345417023,
-0.23523540794849396,
-0.026070743799209595,
-0.019903376698493958,
0.18707704544067383,
-0.19026102125644684,
0.22020308673381805,
0.14318828284740448,
-0.37706178426742554,
-0.01530344970524311,
0.39006927609443665,
-0.11591093242168427,
0.08604612946510315,
-0.34306037425994873,
-0.005748245865106583,
-0.00005386769771575928,
0.035278622061014175,
-0.254923015832901,
-0.03609027341008186,
0.29541149735450745,
-0.04840735346078873,
-0.2583858370780945,
0.005045630037784576,
-0.1829570084810257,
-0.20265446603298187,
0.09478040039539337,
0.0958293080329895,
0.29735267162323,
-0.2046324908733368,
-0.27380087971687317,
-0.19436436891555786,
0.05084790661931038,
-0.016922665759921074,
0.19850151240825653,
-0.06882055103778839,
0.010623457841575146,
-0.0695275291800499,
-0.11560818552970886,
-0.23951520025730133,
0.0430278480052948,
0.5282487869262695,
-0.24986663460731506,
0.11356580257415771,
0.3988252878189087,
0.11801254749298096,
-0.06075623631477356,
-0.2093331217765808,
0.3135370910167694,
0.2894430458545685,
-0.41505149006843567,
0.21447747945785522,
-0.02966293878853321,
0.29783761501312256,
-0.12448114156723022,
0.18891778588294983,
0.32751208543777466,
-0.4717603921890259,
0.030770715326070786,
-0.4529575705528259,
-0.3469766080379486,
0.11823362112045288,
0.06212364882230759,
0.30933624505996704,
0.0399213507771492,
0.20982572436332703,
0.045322664082050323,
-0.18992510437965393,
-0.34468933939933777,
0.03606324642896652,
-0.1527855396270752,
0.028166137635707855,
0.35945549607276917,
-0.051358021795749664,
0.012061300687491894,
-0.23079410195350647,
0.1960943341255188,
-0.128838449716568,
-0.11197108775377274,
-0.2838174104690552,
-0.11095935106277466,
0.07939247786998749,
0.027325138449668884,
-0.11150513589382172,
-0.12199156731367111,
-0.20123039186000824,
-0.12156936526298523,
-0.08984732627868652,
0.08854511380195618,
0.24523156881332397,
-0.21709097921848297,
0.36631324887275696,
0.006122376769781113,
0.04629562422633171,
-0.17654646933078766,
0.16325947642326355,
-0.04804672300815582,
0.14266875386238098,
-0.001719948835670948,
0.11348699033260345,
-0.0025046670343726873,
-0.0669475719332695,
-0.2824927866458893,
0.02554294466972351,
0.06138014420866966,
0.35088565945625305,
0.12866824865341187,
-0.22184304893016815,
0.10980139672756195,
0.06379116326570511,
0.22879871726036072,
0.3743532598018646,
-0.3862714469432831,
0.10407999157905579,
0.23311558365821838,
0.2281319797039032,
-0.26590436697006226,
-0.0938558578491211,
0.22816349565982819,
0.10813964158296585,
0.08058798313140869,
0.08573736250400543,
0.24127554893493652,
-0.1344681978225708,
-0.19560958445072174,
0.17155760526657104,
0.2247537523508072,
0.042823463678359985,
0.05425102263689041,
0.5126667618751526,
-0.061957210302352905,
0.08174187690019608,
-0.28790169954299927,
-0.01389027014374733,
0.13168367743492126,
0.6487282514572144,
-0.12262033671140671,
0.0009847190231084824,
-0.2739824056625366,
0.16314013302326202,
-0.07740025967359543,
-0.49379071593284607,
-0.12448592483997345,
-0.2867087125778198,
-0.29466044902801514,
-0.08043400198221207,
-0.14579030871391296,
0.3272472321987152,
-0.03139442205429077,
-0.16607068479061127,
-0.11984934657812119,
0.15209074318408966,
-0.15767279267311096,
0.005887215957045555,
-0.20547235012054443,
-0.15363165736198425,
-0.271218478679657,
0.08447377383708954,
0.043414726853370667,
0.1556520164012909,
0.20869556069374084,
0.23548075556755066,
-0.12226422131061554,
0.047849394381046295,
0.06633813679218292,
0.23393496870994568,
0.056117720901966095,
-0.12096656858921051,
0.26297298073768616,
0.12478397786617279,
-0.06207479536533356,
-0.05390333756804466,
0.07665160298347473,
0.20009836554527283,
0.4637712836265564,
0.08196136355400085,
0.07065422832965851,
0.03856946900486946,
0.010532299056649208,
0.0033747516572475433,
0.2919479310512543,
-0.4472847878932953,
0.09516648948192596,
0.3003844618797302,
0.19844430685043335,
-0.20526905357837677,
0.23169627785682678,
-0.24913419783115387,
0.06454719603061676,
-0.482046902179718,
0.4485633075237274,
-0.1094074547290802,
-0.06789153814315796,
-0.10429598391056061,
0.06994077563285828,
-0.2165156900882721,
-0.19677650928497314,
0.5224171876907349,
0.3532277047634125,
0.31938469409942627,
-0.053954243659973145,
0.10164056718349457,
-0.1604677140712738,
0.452736496925354,
0.15192188322544098,
0.21523407101631165,
-0.30796197056770325,
0.010866984724998474,
-0.645691990852356,
0.03236837685108185,
0.05603581666946411,
-0.13791893422603607,
0.1251184344291687,
-0.06432937830686569,
-0.1158384308218956,
0.03583633899688721,
0.1276118904352188,
-0.08595887571573257,
-0.007170615717768669,
0.18173745274543762,
-0.1282530277967453,
-0.23245863616466522,
-0.2795044779777527,
-0.03352462500333786,
0.032570961862802505,
-0.47711315751075745,
0.20453688502311707,
-0.34754782915115356,
0.10289052873849869,
-0.026742059737443924,
-0.20360234379768372,
0.2041625678539276,
0.0347287654876709,
0.3803432881832123,
-0.130569189786911,
0.34750789403915405,
-0.14966708421707153,
0.053517840802669525,
-0.3020632266998291,
-0.43906036019325256,
-0.031287554651498795,
0.2757348120212555,
-0.11259929835796356,
0.21685165166854858,
-0.29213789105415344,
-0.2207884043455124,
-0.4045487344264984,
-0.0037810704670846462,
0.020110681653022766,
0.04183156043291092,
-0.00735956197604537,
-0.16578006744384766,
-0.29789647459983826,
0.06404449045658112,
0.2963034510612488,
0.27726104855537415,
-0.2693346440792084,
0.10261113941669464,
-0.2413579672574997,
-0.4136384129524231,
0.5950104594230652,
-0.3114587068557739,
-0.18585775792598724,
-0.0857691690325737,
0.14144106209278107,
-0.04923359304666519,
0.1478443592786789,
-0.17932236194610596,
0.04083136469125748,
0.41818705201148987,
-0.0680164098739624,
-0.15981008112430573,
0.2785927653312683,
0.040426284074783325,
0.09457804262638092,
0.02815033122897148,
0.30974024534225464,
0.09786910563707352,
0.10504540801048279,
0.20527277886867523,
-0.17702554166316986
] |
https://github.com/huggingface/datasets/issues/4918 | Dataset Viewer issue for pysentimiento/spanish-targeted-sentiment-headlines | Thanks for reporting, it's fixed now (I refreshed it manually). It's a known issue; we hope it will be fixed permanently in a few days.
<img width="1508" alt="Capture d’écran 2022-09-05 à 18 31 22" src="https://user-images.githubusercontent.com/1676121/188489762-0ed86a7e-dfb3-46e8-a125-43b815a2c6f4.png">
| ### Link
https://huggingface.co/datasets/pysentimiento/spanish-targeted-sentiment-headlines
### Description
After moving the dataset from my user (`finiteautomata`) to the `pysentimiento` organization, the dataset viewer says that it doesn't exist.
### Owner
_No response_ | 35 | Dataset Viewer issue for pysentimiento/spanish-targeted-sentiment-headlines
### Link
https://huggingface.co/datasets/pysentimiento/spanish-targeted-sentiment-headlines
### Description
After moving the dataset from my user (`finiteautomata`) to the `pysentimiento` organization, the dataset viewer says that it doesn't exist.
### Owner
_No response_
Thanks for reporting, it's fixed now (I refreshed it manually). It's a known issue; we hope it will be fixed permanently in a few days.
<img width="1508" alt="Capture d’écran 2022-09-05 à 18 31 22" src="https://user-images.githubusercontent.com/1676121/188489762-0ed86a7e-dfb3-46e8-a125-43b815a2c6f4.png">
| [
-0.3359379470348358,
0.4401548504829407,
0.004127278923988342,
0.269311785697937,
0.3724842071533203,
-0.06750047951936722,
0.30433645844459534,
0.22219888865947723,
-0.2502279281616211,
0.11511656641960144,
-0.23486873507499695,
0.2856968641281128,
-0.0004571685567498207,
-0.21308180689811707,
-0.17307816445827484,
-0.258881539106369,
0.09020683169364929,
0.13322605192661285,
0.3222728967666626,
-0.022070620208978653,
-0.0702037364244461,
-0.004058815538883209,
-0.09996463358402252,
-0.018835410475730896,
-0.31102362275123596,
0.10110057890415192,
-0.15348108112812042,
-0.11195283383131027,
-0.09855596721172333,
-0.6794623136520386,
0.2647741734981537,
0.13963934779167175,
0.08545307070016861,
0.4315236508846283,
-0.00011220496526220813,
0.1620960533618927,
0.3044358491897583,
0.16314643621444702,
0.07494452595710754,
-0.2918660044670105,
0.1280037760734558,
-0.6084617972373962,
-0.07435820251703262,
-0.12599581480026245,
-0.16994816064834595,
-0.02427428960800171,
0.1623574048280716,
-0.2467462718486786,
0.15192249417304993,
0.20670068264007568,
0.25951629877090454,
-0.14369282126426697,
-0.11059623956680298,
-0.22078725695610046,
-0.16175830364227295,
0.49316370487213135,
-0.25449037551879883,
-0.43536627292633057,
0.05914650857448578,
0.17005451023578644,
-0.06837964802980423,
0.3292178511619568,
-0.14652442932128906,
-0.059193965047597885,
-0.16666778922080994,
-0.17864888906478882,
-0.3277139663696289,
-0.31332069635391235,
0.3238813281059265,
0.2342195212841034,
0.5890386700630188,
-0.09873754531145096,
-0.14733006060123444,
-0.3106878697872162,
0.1260373592376709,
0.041094355285167694,
0.23520100116729736,
0.32697930932044983,
0.048288408666849136,
0.2269020676612854,
0.2303997278213501,
0.023030385375022888,
-0.21236364543437958,
0.03713409602642059,
-0.7168667316436768,
0.046082958579063416,
-0.14911141991615295,
0.08771254867315292,
0.16936169564723969,
-0.1264835000038147,
0.32409486174583435,
0.07550245523452759,
0.045956842601299286,
0.16440480947494507,
-0.19676853716373444,
0.17232193052768707,
0.03856821730732918,
0.06363651156425476,
-0.022338736802339554,
-0.2891789674758911,
-0.3708908259868622,
-0.04273310303688049,
-0.06271108239889145,
0.04733981937170029,
0.3487870693206787,
-0.2076479196548462,
0.00638764351606369,
0.4737268388271332,
0.25631678104400635,
-0.055282849818468094,
0.07410207390785217,
0.18273746967315674,
-0.26442328095436096,
-0.5105133056640625,
-0.09442993253469467,
-0.06931199878454208,
0.33248400688171387,
-0.12375721335411072,
-0.26923394203186035,
-0.018658511340618134,
-0.2027997076511383,
0.021317852661013603,
-0.12047072499990463,
0.2910657227039337,
0.042133163660764694,
0.3580132722854614,
-0.2399163842201233,
0.0786343514919281,
-0.2010405957698822,
-0.4222595691680908,
-0.1952517181634903,
-0.011521376669406891,
-0.3463199734687805,
-0.1853867620229721,
0.18046392500400543,
-0.3020670711994171,
0.0861823558807373,
-0.09925144165754318,
-0.11645650863647461,
-0.17082643508911133,
-0.24498622119426727,
-0.36715230345726013,
-0.13955390453338623,
0.15703751146793365,
0.144895538687706,
0.10200688242912292,
0.04119804501533508,
0.04119415581226349,
0.17814388871192932,
0.4755539894104004,
-0.03921577334403992,
0.003688450902700424,
-0.2463511973619461,
0.1797119677066803,
-0.3750520348548889,
-0.061445243656635284,
0.015258923172950745,
0.3559570014476776,
-0.057851530611515045,
-0.3467753529548645,
-0.13035577535629272,
-0.13706324994564056,
-0.18926694989204407,
-0.14222286641597748,
0.027292409911751747,
0.6384565234184265,
-0.4816146492958069,
-0.2012690156698227,
-0.5991361737251282,
-0.0521262027323246,
0.15928462147712708,
0.09259578585624695,
-0.09146374464035034,
-0.00024750828742980957,
-0.44627755880355835,
0.2639040946960449,
0.16546310484409332,
-0.19248349964618683,
-0.47539493441581726,
0.16664095222949982,
-0.16909873485565186,
0.04385390132665634,
0.1915648728609085,
0.08928629010915756,
0.2593819797039032,
-0.09009632468223572,
-0.37085312604904175,
-0.005273284390568733,
0.15101495385169983,
-0.08316445350646973,
-0.08447331190109253,
-0.026940232142806053,
0.12028076499700546,
0.16340400278568268,
0.4786665737628937,
-0.08439759165048599,
0.2752405107021332,
-0.04043431207537651,
0.13155734539031982,
0.21923750638961792,
0.12473543733358383,
0.13447923958301544,
0.41760656237602234,
0.06075004115700722,
0.03394944965839386,
-0.06889426708221436,
-0.01068037748336792,
0.07901456952095032,
0.08739836513996124,
0.03571799769997597,
-0.18909530341625214,
-0.18261182308197021,
-0.5098694562911987,
0.08945641666650772,
-0.4312421679496765,
-0.3183648884296417,
0.17298845946788788,
0.3567045032978058,
-0.347807377576828,
0.34569796919822693,
-0.07498529553413391,
0.25789299607276917,
0.10176579654216766,
0.018127083778381348,
-0.06935402750968933,
0.2702360451221466,
-0.20906418561935425,
0.08571301400661469,
-0.1635286659002304,
0.2300581932067871,
0.3066380023956299,
0.07631666958332062,
0.10537619143724442,
0.08247403800487518,
0.1484663337469101,
0.2949363589286804,
0.29421982169151306,
0.03437821567058563,
0.33174729347229004,
-0.815122663974762,
0.23985518515110016,
0.07879822701215744,
-0.12503264844417572,
-0.02182365208864212,
-0.2290569245815277,
0.2423669397830963,
0.14361359179019928,
0.005366571247577667,
-0.08676618337631226,
0.1968260407447815,
0.4258342385292053,
0.02763042226433754,
0.012543393298983574,
-0.2886134386062622,
0.14698225259780884,
0.4417835772037506,
0.2048981934785843,
0.15843741595745087,
-0.2742977738380432,
0.18554449081420898,
0.3132282495498657,
0.07795840501785278,
0.19243934750556946,
0.23659193515777588,
-0.360562264919281,
-0.1555498242378235,
0.20819075405597687,
0.11218757927417755,
0.24349279701709747,
0.20467959344387054,
0.0040738992393016815,
0.2748327851295471,
0.0810621976852417,
-0.25035756826400757,
0.07014237344264984,
-0.03179144114255905,
-0.11343652009963989,
0.1844959259033203,
0.3685750663280487,
0.049730632454156876,
-0.3813391923904419,
0.01063905656337738,
0.08958422392606735,
0.1631399542093277,
-0.2667294442653656,
-0.15009842813014984,
-0.16875791549682617,
-0.39663106203079224,
-0.0685873031616211,
-0.12274006754159927,
-0.2221880853176117,
-0.3317299783229828,
0.09739775955677032,
-0.0655650943517685,
-0.002742381766438484,
0.25374001264572144,
-0.23765136301517487,
0.2356102466583252,
-0.18244771659374237,
0.16949935257434845,
-0.12675368785858154,
-0.24434924125671387,
-0.08774755150079727,
0.0897480696439743,
0.019619297236204147,
-0.11518871784210205,
0.16094517707824707,
-0.23497216403484344,
0.27447211742401123,
-0.3293890655040741,
-0.4845985770225525,
0.2403867393732071,
0.042604804039001465,
0.2232850044965744,
0.0226733461022377,
-0.0372718870639801,
-0.023960240185260773,
0.48466750979423523,
0.22182992100715637,
-0.031172797083854675,
-0.10224641859531403,
0.1256241798400879,
-0.29781994223594666,
0.12048312276601791,
0.3770519196987152,
-0.29258158802986145,
-0.5889882445335388,
-0.23622234165668488,
-0.1855107992887497,
-0.058349885046482086,
-0.06458102911710739,
0.02083183452486992,
0.23702777922153473,
-0.018314242362976074,
-0.09274610877037048,
-0.2112792581319809,
-0.33162111043930054,
0.022328775376081467,
0.21842844784259796,
-0.34487512707710266,
-0.27498799562454224,
0.3264192044734955,
0.2148592323064804,
0.16302719712257385,
-0.18433229625225067,
-0.6763105988502502,
0.18881778419017792,
0.012360409833490849,
0.34247225522994995,
0.049636952579021454,
-0.11105793714523315,
0.2610989212989807,
0.20975829660892487,
-0.0967787355184555,
-0.14367231726646423,
-0.20667311549186707,
-0.13203978538513184,
-0.1914117932319641,
0.15556928515434265,
-0.30984920263290405,
0.01692064292728901,
0.15848305821418762,
0.44903576374053955,
0.1946926862001419,
-0.08592341840267181,
0.2802152931690216,
-0.20688149333000183,
0.5215699672698975,
-0.01626703143119812,
-0.52672278881073,
0.36997097730636597,
0.23552924394607544,
-0.03969031944870949,
0.2734571099281311,
0.14961391687393188,
-0.12009943276643753,
-0.0793430507183075,
-0.09052484482526779,
-0.1943991482257843,
0.03500490263104439,
0.020430656149983406,
0.037092942744493484,
0.2749687433242798,
0.07593744993209839,
0.07873327285051346,
-0.25505706667900085,
-0.3945813775062561,
-0.14375123381614685,
0.11847545206546783,
0.27622827887535095,
0.019578348845243454,
0.08436283469200134,
0.3215031921863556,
-0.14693769812583923,
0.1533299833536148,
-0.16181151568889618,
0.18845993280410767,
-0.2690930962562561,
0.13266843557357788,
0.13989675045013428,
0.08546963334083557,
0.4759419560432434,
-0.0974586084485054,
-0.06998369097709656,
0.12043839693069458,
-0.07240767776966095,
-0.2284688651561737,
0.06121930107474327,
-0.021073786541819572,
-0.051578667014837265,
-0.10317681729793549,
-0.028317891061306,
-0.1527218520641327,
-0.04048232361674309,
0.38787251710891724,
-0.020524684339761734,
-0.16127009689807892,
-0.26247888803482056,
-0.12273481488227844,
-0.21649864315986633,
-0.18081337213516235,
-0.1366252601146698,
-0.0014821551740169525,
0.06511172652244568,
-0.08891677856445312,
-0.19544285535812378,
-0.14028489589691162,
-0.24615788459777832,
-0.059659481048583984,
0.09364902973175049,
0.1978151500225067,
-0.005799046251922846,
0.15701064467430115,
0.41391804814338684,
0.20494066178798676,
0.4646659195423126,
0.689977765083313,
-0.04767085984349251,
-0.5971324443817139,
0.14236164093017578,
-0.122300885617733,
0.14309702813625336,
0.23368030786514282,
-0.1370818018913269,
0.029665805399417877,
0.0440228134393692,
-0.14389915764331818,
-0.13699129223823547,
-0.1148521825671196,
0.363915354013443,
-0.013251058757305145,
-0.3245341181755066,
-0.3220011293888092,
0.26901334524154663,
0.1611481010913849,
0.007779128849506378,
0.028373027220368385,
0.08701948076486588,
-0.0239934790879488,
-0.051462322473526,
0.06512978672981262,
0.8603063225746155,
0.20559161901474,
-0.11073766648769379,
0.3443461060523987,
0.00999365746974945,
0.3782312572002411,
0.09667538106441498,
0.08956287056207657,
-0.39815613627433777,
0.18844935297966003,
-0.012919032946228981,
-0.01160094141960144,
0.43208032846450806,
-0.02277868241071701,
-0.04418609291315079,
-0.049678731709718704,
-0.12957611680030823,
0.24683307111263275,
0.20085443556308746,
-0.1214485839009285,
0.10491138696670532,
0.061849359422922134,
-0.22059281170368195,
0.20278458297252655,
-0.44178080558776855,
0.2444707602262497,
-0.05655627325177193,
0.09259481728076935,
0.05900738760828972,
0.12901319563388824,
-0.4579176902770996,
0.046553127467632294,
-0.32483768463134766,
-0.16117830574512482,
-0.06843286752700806,
-0.26448050141334534,
0.5141693949699402,
0.4568222463130951,
0.17483463883399963,
-0.1313648223876953,
-0.1600894331932068,
0.5695915818214417,
0.183724045753479,
-0.1266212910413742,
0.2481454461812973,
0.10901150107383728,
0.09051269292831421,
-0.024881932884454727,
-0.2707856297492981,
0.20920762419700623,
0.05828411132097244,
0.012768391519784927,
-0.3870452642440796,
-0.04273182153701782,
0.17553772032260895,
-0.24587382376194,
-0.11095821857452393,
-0.2336329221725464,
0.2725214958190918,
-0.40440505743026733,
0.18193581700325012,
0.12308180332183838,
0.030904032289981842,
-0.12437620013952255,
0.029461286962032318,
-0.2141481190919876,
-0.0061935074627399445,
0.2510994076728821,
-0.00175471231341362,
-0.47647997736930847,
0.2819211483001709,
0.3540705740451813,
-0.24393054842948914,
-0.25127822160720825,
0.2441345453262329,
0.02138800173997879,
-0.6068860292434692,
-0.027489937841892242,
-0.022178849205374718,
-0.08384877443313599,
0.17053145170211792,
0.10044487565755844,
-0.13510657846927643,
-0.31564927101135254,
-0.21430295705795288,
-0.42070096731185913,
0.049489907920360565,
-0.1597239077091217,
-0.11617116630077362,
-0.052043233066797256,
0.13767528533935547,
-0.14079001545906067,
0.04173659533262253,
0.055717866867780685,
-0.3198327422142029,
-0.01293255016207695,
-0.06730429083108902,
-0.059308312833309174,
-0.24073559045791626,
0.11167438328266144,
-0.2419145554304123,
-0.21835942566394806,
0.10019358992576599,
0.2775336503982544,
-0.03179803863167763,
-0.17525655031204224,
-0.05784669145941734,
0.13457904756069183,
0.14946424961090088,
0.07560379803180695,
-0.07695455849170685,
-0.055268533527851105,
-0.26215100288391113,
-0.06462837010622025,
-0.050770364701747894,
0.2276650369167328,
-0.12248125672340393,
0.06742291897535324,
-0.11905863881111145,
-0.20573899149894714,
0.18012650310993195,
0.06582516431808472,
0.10746361315250397,
0.31157970428466797,
0.1517181098461151,
0.2213316410779953,
0.023740042001008987,
0.040747664868831635,
-0.03868300840258598,
0.12207119911909103,
0.3324242830276489,
0.4459242522716522,
0.14771315455436707,
-0.46877241134643555,
0.43318140506744385,
0.1093011423945427,
0.23910954594612122,
0.03471558541059494,
-0.3175692558288574,
0.025626765564084053,
0.3029211163520813,
0.21626727283000946,
-0.616346001625061,
0.12226453423500061,
0.30567848682403564,
-0.04759562015533447,
0.1562853306531906,
0.07604661583900452,
0.3504272699356079,
0.41055992245674133,
0.11825577914714813,
0.22358667850494385,
0.5759091377258301,
-0.3033328056335449,
0.21571126580238342,
0.5735114812850952,
-0.08645894378423691,
0.2882774770259857,
0.33050212264060974,
0.206381693482399,
0.00030647218227386475,
0.7123849391937256,
-0.13689181208610535,
0.4432329535484314,
0.46892935037612915,
0.2244621068239212,
0.25702497363090515,
-0.374043345451355,
0.2546542286872864,
0.15353354811668396,
-0.0760868638753891,
-0.0737784281373024,
-0.17235463857650757,
0.11099578440189362,
-0.301323264837265,
-0.05981529876589775,
-0.053027473390102386,
0.22579027712345123,
-0.11767459660768509,
0.151988685131073,
-0.39961183071136475,
-0.24954158067703247,
-0.11154749244451523,
0.012848161160945892,
-0.11428278684616089,
-0.1476088911294937,
-0.17825737595558167,
-0.03219563513994217,
-0.4821069836616516,
-0.5420284271240234,
0.2221963107585907,
-0.17898958921432495,
0.20347662270069122,
-0.06691299378871918,
0.38001880049705505,
0.005317613482475281,
-0.08314670622348785,
0.20049640536308289,
0.6319035291671753,
0.3475993275642395,
0.10045935213565826,
0.10049229860305786,
-0.1632855087518692,
-0.15483106672763824,
-0.03662123903632164,
-0.05594353750348091,
0.14749209582805634,
0.06854016333818436,
0.11556890606880188,
0.10713501274585724,
0.13802067935466766,
-0.1762838363647461,
0.1942649930715561,
0.341366708278656,
0.30911150574684143,
-0.0192885622382164,
0.3792235255241394,
-0.5195893049240112,
-0.12508955597877502,
-0.15398044884204865,
-0.2817694842815399,
-0.27596133947372437,
0.07044240832328796,
0.7217733263969421,
-0.07211563736200333,
-0.027266010642051697,
-0.3688436448574066,
0.09812664240598679,
0.22467629611492157,
0.05216095596551895,
0.35335487127304077,
0.18740874528884888,
-0.1769302487373352,
-0.04061964899301529,
-0.7290064096450806,
0.4860798418521881,
-0.11512281000614166,
-0.11951514333486557,
0.13758288323879242,
-0.10849777609109879,
-0.1526273488998413,
0.09398941695690155,
0.2828788757324219,
0.15197110176086426,
0.4319145679473877,
0.1326502561569214,
-0.3480927348136902,
-0.12906493246555328,
0.3875753879547119,
0.16396605968475342,
-0.16669152677059174,
-0.08065135031938553,
0.16102175414562225,
0.07020178437232971,
0.06827285140752792,
-0.029453616589307785,
-0.041209232062101364,
-0.056260846555233,
-0.3997288942337036,
0.3183794617652893,
-0.014024922624230385,
0.32008588314056396,
0.12649601697921753,
0.19109727442264557,
-0.30748870968818665,
-0.17719727754592896,
-0.15220710635185242,
0.24235716462135315,
0.24464048445224762,
0.27407950162887573,
-0.05859354883432388,
-0.1157311201095581,
-0.2211841493844986,
-0.32409441471099854,
0.10280032455921173,
0.03980237618088722,
-0.46451449394226074,
0.047614648938179016,
0.038543641567230225,
0.016852930188179016,
-0.012136382982134819,
0.14755602180957794,
0.05473944544792175,
0.10314231365919113,
-0.30011606216430664,
-0.38329318165779114,
0.29524001479148865,
-0.31818467378616333,
-0.2202569991350174,
0.11855518817901611,
0.038540318608284,
0.1774461567401886,
-0.08681686967611313,
-0.2993340492248535,
0.1534607708454132,
0.3450137674808502,
0.08763580024242401,
0.17345313727855682,
-0.21854209899902344,
-0.18909604847431183,
0.10270437598228455,
0.08700992166996002,
0.23966166377067566,
0.21216228604316711,
0.06917086988687515,
0.1510174572467804,
0.15835215151309967
] |
https://github.com/huggingface/datasets/issues/4917 | Keys mismatch: make error message more informative | Good idea ! I think this can be improved in `Features.reorder_fields_as()` indeed at
https://github.com/huggingface/datasets/blob/7feeb5648a63b6135a8259dedc3b1e19185ee4c7/src/datasets/features/features.py#L1739-L1740
Is it something you would be interested in contributing ? | **Is your feature request related to a problem? Please describe.**
When loading a dataset from disk with a defect in its `dataset_info.json` describing its features (I don’t know when/why/how this happens but it deserves its own issue), you will get an error message like:
`ValueError: Keys mismatch: between {'bar': Value(dtype='int64', id=None)} and {'foo': Value(dtype='int64', id=None)}`
Which is fine when you have only a few features like in the example but it gets very hard to read when you have a lot of features in your dataset.
**Describe the solution you'd like**
The error message should give the difference between the features (what keys are in A but missing in B and vice-versa). It should also tell which keys are inferred from `dataset.arrow` and which come from `dataset_info.json`.
Willing to help :)
| 24 | Keys mismatch: make error message more informative
**Is your feature request related to a problem? Please describe.**
When loading a dataset from disk with a defect in its `dataset_info.json` describing its features (I don’t know when/why/how this happens but it deserves its own issue), you will get an error message like:
`ValueError: Keys mismatch: between {'bar': Value(dtype='int64', id=None)} and {'foo': Value(dtype='int64', id=None)}`
Which is fine when you have only a few features like in the example but it gets very hard to read when you have a lot of features in your dataset.
**Describe the solution you'd like**
The error message should give the difference between the features (what keys are in A but missing in B and vice-versa). It should also tell which keys are inferred from `dataset.arrow` and which come from `dataset_info.json`.
Willing to help :)
Good idea ! I think this can be improved in `Features.reorder_fields_as()` indeed at
https://github.com/huggingface/datasets/blob/7feeb5648a63b6135a8259dedc3b1e19185ee4c7/src/datasets/features/features.py#L1739-L1740
Is it something you would be interested in contributing ? | [
0.05593624338507652,
-0.45110347867012024,
-0.0870409831404686,
0.32584720849990845,
0.12832194566726685,
0.05777042359113693,
-0.05212981626391411,
0.1493237167596817,
0.1287987232208252,
0.03420214354991913,
0.4235963225364685,
0.33195722103118896,
0.1214398667216301,
0.3156548738479614,
-0.24822527170181274,
-0.3456829786300659,
-0.11297500878572464,
0.14945590496063232,
0.24653133749961853,
0.10805578529834747,
-0.15128585696220398,
0.1291213482618332,
-0.14225918054580688,
0.2167140543460846,
-0.08063022047281265,
-0.04304265230894089,
0.12439653277397156,
0.17108607292175293,
0.0038105761632323265,
-0.7047518491744995,
0.19324274361133575,
0.07487235963344574,
-0.15221576392650604,
0.03246009349822998,
-0.00011379367060726508,
-0.18744969367980957,
0.2909869849681854,
-0.05744282156229019,
-0.433370977640152,
-0.15751270949840546,
-0.2842382490634918,
-0.5491707921028137,
0.14181193709373474,
-0.2257383167743683,
-0.03134119510650635,
-0.32973480224609375,
-0.12752225995063782,
-0.10162629187107086,
0.3272828459739685,
0.06240468844771385,
0.1886063665151596,
0.12820115685462952,
0.4117756187915802,
0.18764369189739227,
0.15328377485275269,
0.16203516721725464,
-0.08918224275112152,
0.011514285579323769,
0.2042597234249115,
0.20786786079406738,
0.0488564632833004,
0.4449121654033661,
-0.01782573200762272,
-0.23769371211528778,
0.5496920943260193,
0.04271925613284111,
0.14019861817359924,
-0.22648707032203674,
-0.14680466055870056,
0.24837228655815125,
0.5011075139045715,
-0.1484529972076416,
-0.5085459351539612,
-0.730610728263855,
0.16348415613174438,
-0.08493852615356445,
0.2965952754020691,
-0.15469540655612946,
-0.03368314355611801,
0.000634901225566864,
-0.08616214990615845,
-0.08525530248880386,
-0.07766613364219666,
-0.11797440052032471,
0.09491457045078278,
-0.09364521503448486,
0.025819599628448486,
0.03649815917015076,
-0.02960105612874031,
-0.3456578850746155,
-0.14955098927021027,
-0.07153132557868958,
-0.154425248503685,
0.11345542222261429,
-0.3580058217048645,
-0.3508343994617462,
0.1795034408569336,
-0.4162966310977936,
0.17217093706130981,
-0.07924506068229675,
0.10459216684103012,
0.11367194354534149,
-0.44510480761528015,
0.025131501257419586,
0.2586495280265808,
0.4070080518722534,
0.43603187799453735,
0.09982319176197052,
-0.0022131912410259247,
0.2103748917579651,
0.021008651703596115,
-0.20292755961418152,
0.22280068695545197,
-0.5044712424278259,
0.3724445104598999,
0.6187143325805664,
0.3259623050689697,
-0.22923032939434052,
-0.5188912749290466,
0.30153602361679077,
-0.06401942670345306,
-0.20792123675346375,
0.1718762218952179,
0.02797110751271248,
-0.06686904281377792,
0.2486121952533722,
0.09882526099681854,
0.13252198696136475,
-0.0027498239651322365,
-0.28702807426452637,
-0.02349597029387951,
-0.2725095748901367,
-0.0853167176246643,
0.2495252788066864,
-0.17222115397453308,
0.23858274519443512,
0.11258965730667114,
0.1176915243268013,
0.11927102506160736,
0.04838622361421585,
-0.1631477326154709,
0.06899699568748474,
-0.13240239024162292,
0.22043249011039734,
-0.3722911775112152,
0.18320269882678986,
0.19560858607292175,
-0.10392297059297562,
-0.3150062561035156,
0.19619789719581604,
-0.3440512716770172,
-0.33624428510665894,
-0.08069831132888794,
0.21360978484153748,
-0.07292656600475311,
0.011686261743307114,
-0.33134132623672485,
0.1792334020137787,
-0.22880810499191284,
-0.26741912961006165,
0.1650257259607315,
-0.012002117931842804,
-0.00890231505036354,
-0.3664212226867676,
-0.017321867868304253,
0.2310144305229187,
-0.22272393107414246,
-0.1743030846118927,
-0.0797441229224205,
0.02189752086997032,
-0.010633237659931183,
0.11336468160152435,
-0.14880967140197754,
0.14176799356937408,
-0.1490187644958496,
0.38742291927337646,
0.365221232175827,
-0.15196576714515686,
-0.35252299904823303,
0.5016322135925293,
-0.22730253636837006,
0.32746604084968567,
0.0786176472902298,
0.29926958680152893,
0.02376963570713997,
0.06281165778636932,
0.3515811562538147,
0.2558023929595947,
0.06968855112791061,
-0.05747447907924652,
-0.2256835699081421,
-0.45898938179016113,
0.09374617040157318,
0.004294838756322861,
-0.23823721706867218,
-0.01988574117422104,
0.10734700411558151,
-0.18635594844818115,
0.31008055806159973,
0.0006851814687252045,
-0.3946608006954193,
0.27480238676071167,
0.48535674810409546,
0.1477794647216797,
-0.01399378664791584,
-0.15214431285858154,
-0.5081825852394104,
0.3593325614929199,
-0.004236999899148941,
-0.1377042829990387,
-0.5338301062583923,
-0.25642603635787964,
-0.2964978516101837,
-0.02778453938663006,
-0.14336030185222626,
-0.006614767014980316,
0.13174143433570862,
-0.08370177447795868,
-0.06318610906600952,
-0.01903589628636837,
-0.09522099792957306,
0.06079839915037155,
0.04859786480665207,
0.12096084654331207,
-0.2039368897676468,
0.16420967876911163,
-0.14943453669548035,
0.17502960562705994,
0.010611165314912796,
0.17166420817375183,
0.3686193525791168,
0.08598137646913528,
-0.20911356806755066,
0.4828251302242279,
-0.16050557792186737,
0.26696521043777466,
-0.1778101623058319,
0.23391349613666534,
0.24130409955978394,
0.012078221887350082,
-0.04247383028268814,
0.16611433029174805,
-0.03297588974237442,
0.13793280720710754,
-0.2622936964035034,
0.5930306911468506,
-0.15408208966255188,
0.29850783944129944,
0.06635115295648575,
-0.10330741852521896,
0.07582861185073853,
-0.02160670980811119,
0.03523806482553482,
-0.2473939210176468,
0.3090425431728363,
-0.35222145915031433,
-0.386732816696167,
0.08226287364959717,
-0.26470938324928284,
0.38189586997032166,
0.5572502017021179,
-0.07606315612792969,
0.2721172571182251,
0.25912824273109436,
-0.08385870605707169,
0.08111727237701416,
0.05867824703454971,
0.157812237739563,
0.1957305371761322,
0.29050809144973755,
-0.4028730094432831,
-0.09646555781364441,
-0.07815270870923996,
0.07827254384756088,
0.13997748494148254,
-0.23842217028141022,
0.0572795607149601,
0.5130459070205688,
0.1810336410999298,
0.11654069274663925,
-0.006907906383275986,
-0.2550351917743683,
-0.09161871671676636,
0.1870010644197464,
-0.3339535593986511,
-0.04491051658987999,
-0.2814673185348511,
-0.059038735926151276,
-0.20187465846538544,
-0.04036898538470268,
-0.2714885473251343,
-0.2808418571949005,
0.33247947692871094,
0.1191021203994751,
-0.2422465980052948,
0.11461790651082993,
0.008182425051927567,
-0.04152904450893402,
0.10614877939224243,
0.16067460179328918,
-0.0709560438990593,
-0.168981671333313,
-0.001554492861032486,
0.03112471103668213,
0.020650241523981094,
0.014179276302456856,
0.1688154935836792,
-0.353019118309021,
-0.04169834777712822,
-0.4368566572666168,
-0.5218520760536194,
-0.09977525472640991,
0.20981445908546448,
0.1080796867609024,
0.39291077852249146,
0.40135329961776733,
0.10689948499202728,
-0.6132782697677612,
0.3886236548423767,
0.01988850347697735,
-0.5041625499725342,
0.1936982274055481,
0.0846436396241188,
0.06988207250833511,
0.07054752111434937,
-0.4476487338542938,
0.05278586596250534,
-0.38074517250061035,
0.20250089466571808,
-0.19654856622219086,
0.11048711836338043,
0.2275189608335495,
0.17593027651309967,
-0.27492567896842957,
-0.01624169386923313,
0.30953311920166016,
-0.16060875356197357,
-0.07629668712615967,
0.06810737401247025,
0.110794298350811,
-0.013301640748977661,
-0.21074578166007996,
-0.04011734202504158,
-0.47281181812286377,
-0.053840458393096924,
-0.458290696144104,
-0.4171491265296936,
-0.2633912265300751,
0.3297642171382904,
-0.2564397156238556,
-0.035806842148303986,
0.26287922263145447,
0.29871273040771484,
-0.08377446234226227,
-0.024277158081531525,
-0.5803516507148743,
-0.22171077132225037,
0.3513356149196625,
0.5608919262886047,
-0.17999830842018127,
0.6724705100059509,
-0.0708000659942627,
0.4465441107749939,
-0.22576473653316498,
-0.03564927354454994,
-0.08215269446372986,
0.004488715901970863,
0.08727347105741501,
-0.0047605037689208984,
-0.18359123170375824,
-0.13579204678535461,
0.004619583487510681,
-0.006788661703467369,
0.08586663752794266,
-0.010750100016593933,
0.14595761895179749,
0.1329541802406311,
-0.11356906592845917,
-0.4434383809566498,
-0.4186711013317108,
0.14569313824176788,
-0.1744711995124817,
-0.019001632928848267,
-0.042637333273887634,
-0.018124926835298538,
-0.30106121301651,
0.24107027053833008,
0.20781050622463226,
0.24360261857509613,
0.24738222360610962,
-0.06659393757581711,
-0.43435004353523254,
-0.416043758392334,
-0.01807144284248352,
0.08031901717185974,
0.12844359874725342,
0.09128888696432114,
-0.084162138402462,
-0.13573706150054932,
-0.11948612332344055,
-0.01222778670489788,
0.40049463510513306,
-0.13626344501972198,
0.07506345212459564,
-0.023213250562548637,
0.010614540427923203,
-0.026459435001015663,
-0.24712835252285004,
0.1739945262670517,
0.246369406580925,
-0.13907840847969055,
0.7752670049667358,
-0.5251796245574951,
0.033642951399087906,
0.05100659281015396,
0.4659138321876526,
-0.34885457158088684,
-0.19683577120304108,
-0.21365372836589813,
0.1240357980132103,
-0.5250295400619507,
0.09446898102760315,
-0.1169557124376297,
0.12861000001430511,
-0.028110429644584656,
0.16830867528915405,
-0.11159384250640869,
0.25222253799438477,
-0.09363557398319244,
0.32213452458381653,
0.4410456717014313,
-0.1382901966571808,
0.025451838970184326,
0.3162558078765869,
0.2883247137069702,
0.1546095311641693,
0.460810124874115,
0.16924849152565002,
-0.3517327904701233,
-0.3181385397911072,
-0.07408387959003448,
0.004030309617519379,
0.18880662322044373,
0.08380284905433655,
0.3817155063152313,
0.21603462100028992,
0.22035199403762817,
-0.38581329584121704,
-0.0036980505101382732,
0.33010363578796387,
0.05166935175657272,
-0.23850670456886292,
-0.28038591146469116,
0.43308454751968384,
-0.1593005359172821,
-0.26230672001838684,
-0.06711482256650925,
0.5265803337097168,
-0.21749113500118256,
0.5191227197647095,
0.09361004829406738,
0.9740090370178223,
-0.009593673050403595,
0.012145403772592545,
0.013881731778383255,
-0.058397077023983,
0.6611935496330261,
-0.19788463413715363,
0.17623083293437958,
-0.4170825183391571,
-0.16630783677101135,
-0.014447846449911594,
-0.09109852463006973,
-0.10633978992700577,
0.17143426835536957,
-0.17672505974769592,
0.20825350284576416,
-0.1290205419063568,
-0.02296442911028862,
-0.20510371029376984,
0.06775514036417007,
0.11419417709112167,
0.11043782532215118,
-0.3580215573310852,
0.05036398023366928,
0.0641053169965744,
0.17418022453784943,
-0.1013704165816307,
-0.13389211893081665,
0.0949041098356247,
-0.40503257513046265,
-0.482949435710907,
-0.16735327243804932,
-0.18214046955108643,
0.17132343351840973,
0.13450320065021515,
-0.20267780125141144,
0.14270572364330292,
0.04859418794512749,
0.3299635052680969,
0.1214098185300827,
0.13202007114887238,
-0.025621291249990463,
0.1803293079137802,
0.08818352967500687,
-0.10372719168663025,
-0.06358776241540909,
0.05948629230260849,
-0.05531986057758331,
-0.3933700621128082,
-0.013573132455348969,
-0.01368741225451231,
-0.4179908037185669,
-0.10721112042665482,
-0.1478116512298584,
-0.14102871716022491,
-0.042696159332990646,
-0.2925756871700287,
-0.014843709766864777,
0.0047605037689208984,
-0.3343368470668793,
0.08015519380569458,
0.2593150734901428,
-0.12017547339200974,
0.024602439254522324,
0.18812376260757446,
-0.1926155388355255,
-0.004367191344499588,
0.05457856506109238,
0.10738290846347809,
-0.129625141620636,
0.42616093158721924,
-0.15453486144542694,
-0.12062957137823105,
-0.1789674162864685,
-0.006839260458946228,
0.22418725490570068,
-0.3794471025466919,
0.019124064594507217,
-0.04794913902878761,
-0.1575823575258255,
-0.0369434729218483,
0.28886884450912476,
0.5308796167373657,
0.1578153371810913,
-0.030395757406949997,
-0.382881760597229,
-0.1523388922214508,
0.4654414653778076,
-0.0508255772292614,
0.3143630623817444,
-0.17786937952041626,
-0.19301451742649078,
-0.30511340498924255,
0.09932498633861542,
-0.3258027732372284,
-0.07751665264368057,
-0.1694236695766449,
0.06381279975175858,
0.0929885283112526,
0.30222463607788086,
0.04330779239535332,
-0.11378349363803864,
0.10372146964073181,
-0.2344413548707962,
0.10683683305978775,
-0.09957623481750488,
-0.06897356361150742,
0.1398015320301056,
-0.05943448096513748,
0.16558977961540222,
-0.10185737907886505,
-0.17273271083831787,
0.4706861078739166,
-0.056351788341999054,
0.05956408753991127,
0.3611055314540863,
0.1468886435031891,
0.42952054738998413,
-0.09726943075656891,
0.21101784706115723,
-0.4939512014389038,
0.1731662154197693,
0.054384052753448486,
0.13927000761032104,
0.046649813652038574,
0.1798490732908249,
-0.3161386251449585,
0.21466287970542908,
-0.008976254612207413,
0.08025509119033813,
-0.057232826948165894,
0.25120729207992554,
0.13507845997810364,
0.01259569451212883,
0.04207835718989372,
0.4704751670360565,
0.20052079856395721,
0.16318729519844055,
-0.044630587100982666,
-0.015393447130918503,
-0.09149531275033951,
0.24041636288166046,
-0.3530304729938507,
-0.4162170886993408,
0.0901910662651062,
-0.29335954785346985,
0.007575899362564087,
-0.04229427129030228,
0.09673219919204712,
0.24088957905769348,
0.0232539139688015,
0.085429847240448,
0.01802355796098709,
-0.08034934848546982,
0.18842265009880066,
0.7190031409263611,
-0.06295407563447952,
-0.2293800562620163,
0.3543424904346466,
-0.070230633020401,
0.44815918803215027,
0.18022248148918152,
-0.025886185467243195,
-0.018892819061875343,
0.35352379083633423,
-0.12215317785739899,
0.00369957834482193,
-0.01164468377828598,
0.3333110511302948,
0.28393736481666565,
0.07623821496963501,
-0.15155532956123352,
0.3476751446723938,
-0.18898701667785645,
-0.08116818219423294,
-0.06954815983772278,
-0.010228930041193962,
-0.16024987399578094,
-0.13777443766593933,
-0.15123318135738373,
0.12053602933883667,
-0.3267899453639984,
-0.31857120990753174,
-0.22589848935604095,
-0.19605588912963867,
0.05504489690065384,
0.217217355966568,
-0.3780158758163452,
-0.014137022197246552,
-0.2658286392688751,
0.06523428857326508,
0.2966111898422241,
0.5684288740158081,
-0.20000146329402924,
-0.16960789263248444,
0.43757563829421997,
-0.17419113218784332,
0.462542325258255,
0.2451101392507553,
0.3402594327926636,
0.4010199308395386,
-0.0844784677028656,
0.07422096282243729,
0.007068225182592869,
0.08517003059387207,
0.09089364856481552,
-0.13924820721149445,
-0.152505561709404,
-0.3331083357334137,
0.20861700177192688,
0.19234658777713776,
-0.18270549178123474,
0.5063642263412476,
-0.04312491789460182,
0.0735144317150116,
-0.04318332299590111,
0.12080036848783493,
-0.14993435144424438,
-0.01037544384598732,
0.10553914308547974,
0.18272092938423157,
0.05036243796348572,
-0.5500969290733337,
0.12878260016441345,
0.3216978907585144,
0.11988227814435959,
-0.15258678793907166,
0.10593825578689575,
-0.06637057662010193,
0.3089044690132141,
0.6776618361473083,
-0.18971559405326843,
-0.0981135293841362,
0.35990703105926514,
-0.7974962592124939,
0.09605562686920166,
0.18855927884578705,
-0.12213137000799179,
0.4545089304447174,
0.3637666404247284,
0.13410799205303192,
0.18910396099090576,
0.2964412569999695,
-0.11339100450277328,
-0.14706647396087646,
0.015166137367486954,
-0.3252786695957184,
-0.170082688331604,
0.44897574186325073,
-0.23829710483551025,
-0.11846060305833817,
-0.02258112281560898,
0.21156485378742218,
0.21643894910812378,
0.10056940466165543,
-0.18471850454807281,
0.23081448674201965,
0.07874543964862823,
0.10854022204875946,
0.1848437786102295,
0.22092871367931366,
0.32222598791122437,
-0.09041531383991241,
-0.39515748620033264,
0.22202245891094208,
-0.42577067017555237,
-0.21769437193870544,
0.3089044690132141,
0.11175169050693512,
0.5018175840377808,
0.09252893179655075,
0.08626075088977814,
-0.3113906979560852,
0.09927713125944138,
-0.0029019303619861603,
-0.43408074975013733,
-0.5618588924407959,
0.20998390018939972,
0.17255738377571106,
-0.22949984669685364,
-0.08039170503616333,
0.17367950081825256,
0.11101887375116348,
0.016636518761515617,
0.09679655730724335,
-0.31548064947128296,
0.29975542426109314,
0.2792002260684967,
-0.05496349185705185,
0.13717927038669586,
0.1118241399526596,
0.23158884048461914,
0.1783251017332077,
-0.5469386577606201,
-0.02744465321302414,
0.344487726688385,
0.10791564732789993,
-0.01892240159213543,
0.04845630005002022,
-0.13664254546165466,
-0.13335779309272766,
0.03821999207139015,
0.35666340589523315,
-0.06602257490158081,
-0.12457355856895447,
0.10913428664207458,
-0.11010601371526718
] |
https://github.com/huggingface/datasets/issues/4917 | Keys mismatch: make error message more informative | Is this open to work on? I'd love to take on this as my first issue. | **Is your feature request related to a problem? Please describe.**
When loading a dataset from disk with a defect in its `dataset_info.json` describing its features (I don’t know when/why/how this happens but it deserves its own issue), you will get an error message like:
`ValueError: Keys mismatch: between {'bar': Value(dtype='int64', id=None)} and {'foo': Value(dtype='int64', id=None)}`
Which is fine when you have only a few features like in the example but it gets very hard to read when you have a lot of features in your dataset.
**Describe the solution you'd like**
The error message should give the difference between the features (what keys are in A but missing in B and vice-versa). It should also tell which keys are inferred from `dataset.arrow` and which come from `dataset_info.json`.
Willing to help :)
| 16 | Keys mismatch: make error message more informative
**Is your feature request related to a problem? Please describe.**
When loading a dataset from disk with a defect in its `dataset_info.json` describing its features (I don’t know when/why/how this happens but it deserves its own issue), you will get an error message like:
`ValueError: Keys mismatch: between {'bar': Value(dtype='int64', id=None)} and {'foo': Value(dtype='int64', id=None)}`
Which is fine when you have only a few features like in the example but it gets very hard to read when you have a lot of features in your dataset.
**Describe the solution you'd like**
The error message should give the difference between the features (what keys are in A but missing in B and vice-versa). It should also tell which keys are inferred from `dataset.arrow` and which come from `dataset_info.json`.
Willing to help :)
Is this open to work on? I'd love to take on this as my first issue. | [
-0.0036083199083805084,
-0.42993906140327454,
-0.12849532067775726,
0.32273584604263306,
-0.01575388014316559,
0.048986032605171204,
-0.023086201399564743,
0.1496501863002777,
0.031474970281124115,
0.11615725606679916,
0.5251999497413635,
0.4055686593055725,
0.07721658051013947,
0.22863133251667023,
-0.2938021123409271,
-0.32034948468208313,
-0.04975373297929764,
0.10553812980651855,
0.27324599027633667,
0.08885447680950165,
-0.15897780656814575,
0.07677236944437027,
-0.10813944041728973,
0.2103746086359024,
-0.17948003113269806,
-0.10791081935167313,
0.09244010597467422,
0.152849480509758,
0.027839848771691322,
-0.6904386878013611,
0.16621164977550507,
0.06318750977516174,
-0.15966065227985382,
0.042787306010723114,
-0.00011040575191145763,
-0.2346097230911255,
0.42215496301651,
-0.08873514086008072,
-0.400038480758667,
-0.06775480508804321,
-0.34158095717430115,
-0.4898587465286255,
0.19551648199558258,
-0.32962507009506226,
0.04097726196050644,
-0.3843580484390259,
-0.17147572338581085,
-0.23616982996463776,
0.34494948387145996,
0.11991172283887863,
0.20872972905635834,
0.024481885135173798,
0.37215229868888855,
0.10353890806436539,
0.1909182220697403,
0.23202693462371826,
-0.04607247933745384,
0.06682804226875305,
0.35749179124832153,
0.1120845377445221,
-0.0031685233116149902,
0.46057525277137756,
0.052007049322128296,
-0.06645865738391876,
0.6578734517097473,
-0.03546442836523056,
0.2958349585533142,
-0.19729867577552795,
-0.019727937877178192,
0.283795028924942,
0.7534507513046265,
-0.07562091201543808,
-0.310965359210968,
-0.49160462617874146,
0.04720190167427063,
0.026579475030303,
0.31492647528648376,
-0.1771552711725235,
-0.15995611250400543,
-0.029488343745470047,
-0.1773727536201477,
-0.23492662608623505,
-0.08425772935152054,
-0.08800049126148224,
0.08833229541778564,
-0.05726607143878937,
0.10354636609554291,
0.07639571279287338,
0.07426909357309341,
-0.4285256862640381,
-0.07595448195934296,
-0.07460521906614304,
-0.2782320976257324,
0.08156785368919373,
-0.27322104573249817,
-0.29313114285469055,
0.12089326977729797,
-0.5053293704986572,
0.1826452612876892,
-0.0869247317314148,
0.21405015885829926,
0.07610765844583511,
-0.3775845766067505,
0.13351327180862427,
0.421672523021698,
0.24513445794582367,
0.3830665349960327,
0.07127084583044052,
-0.0026038624346256256,
-0.02051849290728569,
0.008766449987888336,
-0.08875486999750137,
0.19369551539421082,
-0.44201403856277466,
0.4609883427619934,
0.5240854620933533,
0.3429063558578491,
-0.25825759768486023,
-0.40626147389411926,
0.3020659387111664,
-0.18577957153320312,
-0.20144961774349213,
0.06030639261007309,
0.0036856532096862793,
-0.030852489173412323,
0.17887774109840393,
0.09390099346637726,
0.07737202942371368,
0.008932152763009071,
-0.3216480314731598,
-0.004565700422972441,
-0.12140505015850067,
-0.1059199646115303,
0.10113899409770966,
-0.04309869557619095,
0.36600151658058167,
0.07273675501346588,
0.09579720348119736,
0.05847088247537613,
-0.030602900311350822,
-0.014814427122473717,
0.008960932493209839,
-0.0785161480307579,
0.029527300968766212,
-0.3549780547618866,
0.18653307855129242,
0.11340650916099548,
-0.1566353440284729,
-0.2980782091617584,
0.29439038038253784,
-0.3111509680747986,
-0.2942165732383728,
-0.15610672533512115,
0.249723419547081,
-0.18763916194438934,
0.07857050001621246,
-0.22139191627502441,
0.19249658286571503,
-0.37878862023353577,
-0.35801979899406433,
0.032436564564704895,
0.040355607867240906,
0.045678380876779556,
-0.3793362081050873,
0.031099403277039528,
0.25436946749687195,
-0.38685342669487,
-0.18253973126411438,
-0.13474902510643005,
0.009234428405761719,
0.02107948064804077,
0.06686791777610779,
-0.2038750797510147,
0.15595990419387817,
-0.054426953196525574,
0.330466628074646,
0.3030700385570526,
-0.13674475252628326,
-0.37262311577796936,
0.5707768201828003,
-0.1470409631729126,
0.20999319851398468,
0.10293494910001755,
0.29494020342826843,
-0.027949325740337372,
0.09291130304336548,
0.4271126687526703,
0.1898564249277115,
-0.019190015271306038,
-0.03476846218109131,
-0.32897722721099854,
-0.36463022232055664,
0.11460351198911667,
-0.02530812658369541,
-0.17399083077907562,
-0.1921042799949646,
0.06113284081220627,
-0.14617252349853516,
0.34152737259864807,
0.05849843844771385,
-0.20173127949237823,
0.21655716001987457,
0.5510323643684387,
-0.05293542146682739,
-0.0021482245065271854,
-0.0669323056936264,
-0.3983024060726166,
0.23781034350395203,
0.08462342619895935,
-0.11408670246601105,
-0.36757588386535645,
-0.23043273389339447,
-0.35453686118125916,
0.0524841845035553,
-0.07697609066963196,
0.025052733719348907,
0.17476394772529602,
-0.12165455520153046,
-0.16088134050369263,
0.03483204171061516,
-0.07174379378557205,
-0.015673311427235603,
0.12690451741218567,
-0.009801503270864487,
-0.12309020757675171,
0.16420206427574158,
-0.1413135975599289,
0.015210585668683052,
0.11088114976882935,
0.08037341386079788,
0.32176893949508667,
0.06785373389720917,
-0.28132668137550354,
0.38819223642349243,
-0.20691493153572083,
0.27637791633605957,
-0.16340753436088562,
0.2158999741077423,
0.2545805871486664,
-0.10702694952487946,
0.04076865315437317,
0.17096900939941406,
0.06377352029085159,
0.09770413488149643,
-0.21991318464279175,
0.45596086978912354,
-0.16726577281951904,
0.21259278059005737,
-0.10289279371500015,
-0.06535559892654419,
0.12053753435611725,
-0.11443845927715302,
-0.005202924832701683,
-0.2979317605495453,
0.2803751230239868,
-0.33608314394950867,
-0.35080865025520325,
0.040795281529426575,
-0.1501673460006714,
0.31109997630119324,
0.37437692284584045,
-0.03171921521425247,
0.30609822273254395,
0.13905003666877747,
-0.16672411561012268,
-0.040079887956380844,
0.12035610526800156,
0.17888498306274414,
0.32293784618377686,
0.23952066898345947,
-0.36811232566833496,
-0.15477748215198517,
-0.016103491187095642,
0.09471046179533005,
0.12780553102493286,
-0.264096736907959,
0.15237797796726227,
0.374175101518631,
0.1311165690422058,
0.002834910526871681,
0.18808791041374207,
-0.3177087903022766,
-0.07099908590316772,
0.26677969098091125,
-0.2804223299026489,
-0.06661279499530792,
-0.344277560710907,
-0.09609389305114746,
-0.06631409376859665,
-0.04238182306289673,
-0.08512881398200989,
-0.33425766229629517,
0.32821786403656006,
0.11071915924549103,
-0.2912580966949463,
0.07894957810640335,
-0.10503610968589783,
0.08592520654201508,
0.01053343154489994,
0.20976005494594574,
-0.07260145992040634,
-0.3801775872707367,
-0.08364933729171753,
0.079591304063797,
0.04120328277349472,
0.09001721441745758,
0.11790891736745834,
-0.37237271666526794,
0.17917191982269287,
-0.42913299798965454,
-0.40150630474090576,
-0.011832065880298615,
0.34507042169570923,
0.1812940090894699,
0.3027045726776123,
0.2845000624656677,
0.13818058371543884,
-0.6274952292442322,
0.32874199748039246,
0.03063124604523182,
-0.3789438009262085,
0.08651995658874512,
0.07832902669906616,
-0.02315063774585724,
0.09391796588897705,
-0.39905619621276855,
0.011205343529582024,
-0.440397173166275,
0.10130199790000916,
-0.3008929193019867,
0.15033766627311707,
0.039997976273298264,
0.21434271335601807,
-0.15273793041706085,
0.03360898792743683,
0.2728600800037384,
-0.11649870127439499,
-0.004134949296712875,
0.08500662446022034,
0.06707406044006348,
-0.028862345963716507,
-0.010593630373477936,
-0.06120327115058899,
-0.3435263931751251,
0.01818118989467621,
-0.5022855997085571,
-0.24102599918842316,
-0.20307999849319458,
0.3788793683052063,
-0.3080253303050995,
-0.18234826624393463,
0.12338094413280487,
0.3384926915168762,
-0.13474665582180023,
-0.10308647155761719,
-0.5854285359382629,
-0.21384397149085999,
0.3155006468296051,
0.6229904890060425,
-0.07817665487527847,
0.48330944776535034,
-0.21207870543003082,
0.3097462058067322,
-0.2817709445953369,
-0.17775008082389832,
-0.09070949256420135,
0.03163730725646019,
0.11652862280607224,
0.0816563218832016,
-0.17063724994659424,
-0.14888735115528107,
0.01371823251247406,
-0.13331644237041473,
0.1313268393278122,
-0.06133917719125748,
-0.18495109677314758,
-0.009926989674568176,
-0.2887169122695923,
-0.4517904222011566,
-0.4329046905040741,
0.2900405824184418,
-0.284515917301178,
-0.015990450978279114,
-0.07979688793420792,
0.02381313592195511,
-0.34224551916122437,
0.2793140113353729,
0.1551891565322876,
0.2489902824163437,
0.295404314994812,
-0.1122206449508667,
-0.5092962384223938,
-0.38241028785705566,
0.09951586276292801,
0.12961134314537048,
0.01576514169573784,
0.16658753156661987,
-0.28267747163772583,
-0.15886014699935913,
-0.2256288379430771,
-0.020082445815205574,
0.27220088243484497,
-0.22516028583049774,
0.08402882516384125,
-0.0021743252873420715,
0.11232984066009521,
0.009613683447241783,
-0.20082610845565796,
0.13672621548175812,
0.39122259616851807,
-0.06568339467048645,
0.6014693975448608,
-0.3846381902694702,
0.028606712818145752,
0.011912086978554726,
0.48778796195983887,
-0.4048768877983093,
-0.17030198872089386,
-0.023229999467730522,
0.1583181619644165,
-0.46773549914360046,
-0.010889492928981781,
0.030309272930026054,
0.1275712102651596,
0.12156207114458084,
0.10707198083400726,
-0.19999343156814575,
0.23123592138290405,
-0.0142793208360672,
0.34207645058631897,
0.4517645239830017,
-0.20312204957008362,
0.056425925344228745,
0.12145990133285522,
0.3922603130340576,
0.21813000738620758,
0.2897152900695801,
0.30580589175224304,
-0.34109756350517273,
-0.15395352244377136,
-0.22877568006515503,
0.04964867979288101,
0.21042928099632263,
0.19224056601524353,
0.27764344215393066,
0.04631900042295456,
0.16410236060619354,
-0.28219789266586304,
-0.06879424303770065,
0.20546472072601318,
0.062012799084186554,
-0.23166996240615845,
-0.17407283186912537,
0.30642980337142944,
-0.08072348684072495,
-0.31720006465911865,
-0.10893788933753967,
0.331508994102478,
-0.21457988023757935,
0.5329066514968872,
0.13480713963508606,
1.0230796337127686,
0.21477586030960083,
-0.11727184057235718,
-0.13624918460845947,
-0.034670501947402954,
0.5484947562217712,
-0.11827217042446136,
0.13827377557754517,
-0.24149328470230103,
-0.14221225678920746,
0.01937791146337986,
-0.010777853429317474,
-0.11014080792665482,
0.18396928906440735,
-0.2526526153087616,
0.15850576758384705,
-0.14716695249080658,
-0.056968074291944504,
-0.15384018421173096,
0.0818895697593689,
0.14356586337089539,
0.15886898338794708,
-0.26317474246025085,
0.08634023368358612,
0.02406897395849228,
0.1279931515455246,
-0.0984305739402771,
-0.2370990365743637,
-0.04458397626876831,
-0.3849690556526184,
-0.5361307263374329,
-0.2341897189617157,
-0.1313670426607132,
0.21782396733760834,
0.09405940771102905,
-0.22288522124290466,
0.1651955246925354,
0.046762093901634216,
0.2926136255264282,
0.1682170033454895,
0.0009250752627849579,
0.03111196681857109,
0.1644454151391983,
-0.006770152132958174,
-0.1864311695098877,
-0.09648120403289795,
0.10867689549922943,
-0.16227197647094727,
-0.4816597104072571,
0.1704329550266266,
-0.13860046863555908,
-0.2838606834411621,
-0.1425972878932953,
-0.11365184187889099,
-0.19796819984912872,
-0.012595966458320618,
-0.2790398895740509,
-0.059261783957481384,
-0.07659484446048737,
-0.2283882200717926,
0.1148400604724884,
0.287666916847229,
-0.054640233516693115,
0.13672493398189545,
0.27180612087249756,
-0.15203556418418884,
0.05252023786306381,
-0.06043922156095505,
0.17126226425170898,
-0.17377912998199463,
0.43758249282836914,
-0.22649629414081573,
-0.02957959473133087,
-0.20321500301361084,
0.20823976397514343,
0.2828505039215088,
-0.3248964250087738,
-0.07628897577524185,
-0.09779267013072968,
-0.18840081989765167,
-0.021740524098277092,
0.2529563903808594,
0.5800116658210754,
0.36271360516548157,
0.040834661573171616,
-0.36905571818351746,
-0.14485225081443787,
0.5891693234443665,
-0.08123858273029327,
0.3111921548843384,
-0.3118700683116913,
-0.30131396651268005,
-0.22368371486663818,
0.1834174394607544,
-0.35118433833122253,
-0.0016461904160678387,
-0.15865884721279144,
0.04451277107000351,
0.10262086987495422,
0.29488182067871094,
-0.16373509168624878,
-0.22278828918933868,
0.11269785463809967,
-0.22123457491397858,
0.08478876948356628,
-0.1160852462053299,
0.04095909371972084,
0.1326407939195633,
-0.07883831858634949,
0.1869366466999054,
-0.18705521523952484,
-0.12252041697502136,
0.5570640563964844,
0.0486685186624527,
0.04745874181389809,
0.24792614579200745,
0.11404170095920563,
0.3603132367134094,
-0.18455277383327484,
0.27789124846458435,
-0.4903464913368225,
0.2045157104730606,
0.13854128122329712,
0.334349125623703,
-0.06500531733036041,
0.0934281051158905,
-0.13497628271579742,
0.09394559264183044,
0.02249275892972946,
0.07692950963973999,
-0.2779397964477539,
0.30915072560310364,
0.015861760824918747,
0.15534433722496033,
0.1267164796590805,
0.4318324625492096,
-0.03334944695234299,
0.18137744069099426,
-0.1488824039697647,
0.011552048847079277,
-0.045502640306949615,
0.29840677976608276,
-0.26911234855651855,
-0.38729140162467957,
0.016160547733306885,
-0.3008130192756653,
0.006703544408082962,
-0.08812008053064346,
0.08869332075119019,
0.14496038854122162,
-0.05001983046531677,
0.10094532370567322,
0.09616003185510635,
-0.15014509856700897,
0.08668875694274902,
0.7373921871185303,
-0.1855187863111496,
-0.2273767739534378,
0.24540984630584717,
-0.039517346769571304,
0.42886266112327576,
0.15976226329803467,
-0.155267596244812,
-0.006041757762432098,
0.6076080799102783,
-0.07261057198047638,
0.17314273118972778,
0.1180383712053299,
0.23390193283557892,
0.2358730435371399,
0.041784193366765976,
-0.08827822655439377,
0.3655393421649933,
-0.10969122499227524,
-0.054923322051763535,
-0.04006289690732956,
-0.10289266705513,
-0.30702483654022217,
-0.09527704864740372,
-0.09322503209114075,
-0.12405547499656677,
-0.42308273911476135,
-0.3977469205856323,
-0.20460821688175201,
-0.23891347646713257,
0.10981123149394989,
0.2548629641532898,
-0.3040480613708496,
0.033133991062641144,
-0.07986101508140564,
0.2130129337310791,
0.2797684371471405,
0.4353661835193634,
-0.23119378089904785,
-0.25920310616493225,
0.3832756280899048,
-0.17935410141944885,
0.5037876963615417,
0.21500517427921295,
0.4439089894294739,
0.5061885118484497,
-0.18712066113948822,
0.10861844569444656,
-0.027453627437353134,
-0.07316003739833832,
0.06099522113800049,
-0.038231246173381805,
0.055990539491176605,
-0.4627535045146942,
0.19013594090938568,
0.2197578102350235,
-0.15787428617477417,
0.6939120292663574,
-0.10273417830467224,
0.10960850119590759,
-0.02980196662247181,
-0.015151411294937134,
-0.1272141933441162,
-0.026157304644584656,
0.14628936350345612,
0.08655466139316559,
0.036273613572120667,
-0.6953738927841187,
0.15344516932964325,
0.29809990525245667,
0.14090269804000854,
-0.07607071846723557,
0.10559391975402832,
-0.24273544549942017,
0.3864297568798065,
0.48029711842536926,
-0.191025048494339,
-0.08085113763809204,
0.3442862033843994,
-0.7099270820617676,
0.1522573083639145,
0.05572601780295372,
-0.22184734046459198,
0.3581148386001587,
0.38115909695625305,
0.2785773277282715,
0.3125837445259094,
0.27764391899108887,
-0.026696816086769104,
-0.10080672800540924,
0.1382364183664322,
-0.5948144793510437,
-0.15315227210521698,
0.6606718301773071,
-0.11215198040008545,
0.004210673272609711,
-0.027905644848942757,
0.2406863421201706,
0.17327052354812622,
0.14517953991889954,
-0.2020992487668991,
-0.013734575361013412,
0.22236159443855286,
0.3821154832839966,
0.2794487476348877,
0.228879913687706,
0.44953280687332153,
-0.10792408138513565,
-0.34880125522613525,
0.1806837022304535,
-0.3750086724758148,
-0.04051890969276428,
0.36595597863197327,
0.2899584472179413,
0.3800974488258362,
0.08426940441131592,
0.3303201496601105,
-0.2092040479183197,
0.07995586097240448,
-0.1380864381790161,
-0.2635442316532135,
-0.4387781023979187,
0.12408565729856491,
0.17133265733718872,
-0.27237799763679504,
-0.11331140249967575,
0.09523054957389832,
0.012467645108699799,
-0.05124710500240326,
0.06922087073326111,
-0.18324795365333557,
0.3503786027431488,
0.3682672679424286,
-0.022639505565166473,
0.14289836585521698,
0.047984786331653595,
0.25651463866233826,
0.2447729855775833,
-0.4045427441596985,
-0.06980276107788086,
0.33084338903427124,
0.08541034162044525,
-0.04129046946763992,
-0.032385438680648804,
-0.08087551593780518,
-0.1134670227766037,
0.06756706535816193,
0.4395884573459625,
-0.0643896833062172,
-0.08934473991394043,
-0.04601113125681877,
-0.07324948906898499
] |
https://github.com/huggingface/datasets/issues/4915 | FileNotFoundError while downloading wikipedia dataset for any language | Hi @Shilpac20,
As explained in the Wikipedia dataset card: https://huggingface.co/datasets/wikipedia
> You can find the full list of languages and dates [here](https://dumps.wikimedia.org/backup-index.html).
This means that, before passing a specific date, you should first make sure it is available online, as Wikimedia only keeps last X months (depending on the size of the corresponding language dump)): e.g. to see which dates "aa" Wikipedia is available online, see https://dumps.wikimedia.org/aawiki/ (as of today 2022-08-31, the available dates are from [20220401](https://dumps.wikimedia.org/aawiki/20220401/) to [20220820](https://dumps.wikimedia.org/aawiki/20220820/)). | ## Describe the bug
Hi, I am currently trying to download wikipedia dataset using
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner'). However, I end up in getting filenotfound error. I get this error for any language I try to download.
Environment:
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner')
```
## Expected results
to load the dataset
## Actual results
I am pasting the error trace here:
Downloading builder script: 35.9kB [00:00, ?B/s]
Downloading metadata: 30.4kB [00:00, 1.94MB/s]
Using custom data configuration 20220401.aa-date=20220401,language=aa
Downloading and preparing dataset wikipedia/20220401.aa to C:\Users\Shilpa\.cache\huggingface\datasets\wikipedia\20220401.aa-date=20220401,language=aa\2.0.0\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...
Downloading data: 100%|████████████████████████████████████████████████████████████| 11.1k/11.1k [00:00<00:00, 712kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.82s/it]
Extracting data files: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
Downloading data: 100%|███████████████████████████████████████████████████████████| 35.6k/35.6k [00:00<00:00, 84.3kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.93s/it]
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/abc/temp.py", line 32, in <module>
beam_runner='DirectRunner')
File "G:\Python3.7\lib\site-packages\datasets\load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 1394, in _download_and_prepare
pipeline_results = pipeline.run()
File "G:\Python3.7\lib\site-packages\apache_beam\pipeline.py", line 574, in run
return self.runner.run_pipeline(self, self._options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 131, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 201, in run_pipeline
options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 212, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 443, in run_stages
runner_execution_context, bundle_context_manager, bundle_input)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 776, in _execute_bundle
bundle_manager))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1000, in _run_bundle
data_input, data_output, input_timers, expected_timer_output)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1309, in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\worker_handlers.py", line 380, in push
response = self.worker.do_instruction(request)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 598, in do_instruction
getattr(request, request_type), request.instruction_id)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 1004, in process_bundle
element.data)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam\runners\worker\operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 324, in apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 905, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
RuntimeError: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
## Environment info
Python: 3.7.6
Windows 10 Pro
datasets :2.4.0
apache_beam: 2.41.0
mwparserfromhell: 0.6.4
| 79 | FileNotFoundError while downloading wikipedia dataset for any language
## Describe the bug
Hi, I am currently trying to download wikipedia dataset using
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner'). However, I end up in getting filenotfound error. I get this error for any language I try to download.
Environment:
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner')
```
## Expected results
to load the dataset
## Actual results
I am pasting the error trace here:
Downloading builder script: 35.9kB [00:00, ?B/s]
Downloading metadata: 30.4kB [00:00, 1.94MB/s]
Using custom data configuration 20220401.aa-date=20220401,language=aa
Downloading and preparing dataset wikipedia/20220401.aa to C:\Users\Shilpa\.cache\huggingface\datasets\wikipedia\20220401.aa-date=20220401,language=aa\2.0.0\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...
Downloading data: 100%|████████████████████████████████████████████████████████████| 11.1k/11.1k [00:00<00:00, 712kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.82s/it]
Extracting data files: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
Downloading data: 100%|███████████████████████████████████████████████████████████| 35.6k/35.6k [00:00<00:00, 84.3kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.93s/it]
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/abc/temp.py", line 32, in <module>
beam_runner='DirectRunner')
File "G:\Python3.7\lib\site-packages\datasets\load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 1394, in _download_and_prepare
pipeline_results = pipeline.run()
File "G:\Python3.7\lib\site-packages\apache_beam\pipeline.py", line 574, in run
return self.runner.run_pipeline(self, self._options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 131, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 201, in run_pipeline
options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 212, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 443, in run_stages
runner_execution_context, bundle_context_manager, bundle_input)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 776, in _execute_bundle
bundle_manager))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1000, in _run_bundle
data_input, data_output, input_timers, expected_timer_output)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1309, in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\worker_handlers.py", line 380, in push
response = self.worker.do_instruction(request)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 598, in do_instruction
getattr(request, request_type), request.instruction_id)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 1004, in process_bundle
element.data)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam\runners\worker\operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 324, in apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 905, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
RuntimeError: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
## Environment info
Python: 3.7.6
Windows 10 Pro
datasets :2.4.0
apache_beam: 2.41.0
mwparserfromhell: 0.6.4
Hi @Shilpac20,
As explained in the Wikipedia dataset card: https://huggingface.co/datasets/wikipedia
> You can find the full list of languages and dates [here](https://dumps.wikimedia.org/backup-index.html).
This means that, before passing a specific date, you should first make sure it is available online, as Wikimedia only keeps last X months (depending on the size of the corresponding language dump)): e.g. to see which dates "aa" Wikipedia is available online, see https://dumps.wikimedia.org/aawiki/ (as of today 2022-08-31, the available dates are from [20220401](https://dumps.wikimedia.org/aawiki/20220401/) to [20220820](https://dumps.wikimedia.org/aawiki/20220820/)). | [
-0.22171072661876678,
0.12476305663585663,
0.02336561307311058,
0.48378026485443115,
0.13305407762527466,
0.10554274171590805,
0.20086951553821564,
0.45038512349128723,
0.2548263669013977,
0.011655345559120178,
0.13270814716815948,
-0.09619120508432388,
0.08483631908893585,
-0.17022106051445007,
0.011670746840536594,
-0.19725127518177032,
0.06492558121681213,
-0.03742077946662903,
-0.011086598038673401,
-0.038156915456056595,
-0.34822356700897217,
0.1775761842727661,
-0.4111486077308655,
-0.1026601642370224,
-0.19150716066360474,
0.2309858202934265,
-0.10011617094278336,
0.09472022205591202,
-0.05143412947654724,
-0.11741678416728973,
0.4395785927772522,
-0.07478615641593933,
0.15988770127296448,
0.5133364200592041,
-0.00011308470129733905,
0.18318946659564972,
0.5690590739250183,
-0.20095062255859375,
-0.2633975148200989,
-0.40959423780441284,
-0.15942013263702393,
-0.21729452908039093,
-0.15482325851917267,
-0.30679717659950256,
-0.04988474026322365,
-0.027535632252693176,
0.29515722393989563,
-0.18309836089611053,
0.16675366461277008,
0.15276823937892914,
0.16118718683719635,
-0.15061362087726593,
0.33606022596359253,
-0.013974593952298164,
0.34716570377349854,
0.12006166577339172,
-0.023212648928165436,
0.17357560992240906,
-0.2269643247127533,
-0.10142948478460312,
-0.023755840957164764,
0.28021103143692017,
-0.26159876585006714,
0.03637336567044258,
0.2406981885433197,
-0.05447060614824295,
-0.1648940145969391,
-0.44164010882377625,
0.19789651036262512,
0.609778106212616,
0.8613625764846802,
-0.1297958791255951,
-0.32368960976600647,
-0.0708402767777443,
-0.06058453768491745,
0.02708602137863636,
0.3061339259147644,
0.291085422039032,
-0.1668315827846527,
-0.006340425461530685,
0.24467740952968597,
-0.1327696591615677,
-0.18863652646541595,
0.4577963352203369,
-0.21116618812084198,
0.39715251326560974,
-0.02255900576710701,
0.12399867922067642,
0.023670122027397156,
-0.23234276473522186,
-0.36747464537620544,
-0.36149656772613525,
-0.09949536621570587,
0.31997087597846985,
-0.2158997803926468,
0.03621073067188263,
0.09379129856824875,
0.07101254165172577,
0.30202949047088623,
-0.1365843266248703,
-0.17420430481433868,
-0.03386496752500534,
-0.16302013397216797,
0.08848437666893005,
0.2397523671388626,
-0.04819348454475403,
0.005659736692905426,
0.054201893508434296,
0.35276174545288086,
0.2269487828016281,
-0.1664007157087326,
-0.008084934204816818,
0.15602055191993713,
-0.23194731771945953,
-0.26011040806770325,
-0.008652938529849052,
0.4535675644874573,
-0.2311086505651474,
-0.25067946314811707,
0.15954738855361938,
-0.4669244885444641,
-0.18300800025463104,
-0.19664636254310608,
0.26687169075012207,
-0.22714537382125854,
0.21381023526191711,
0.21608446538448334,
0.31718599796295166,
-0.18571941554546356,
-0.20768781006336212,
-0.08275619149208069,
0.13227568566799164,
-0.13607096672058105,
0.06563200801610947,
0.37410685420036316,
-0.041268277913331985,
0.1544419378042221,
0.12337353080511093,
-0.12656334042549133,
0.0365179181098938,
-0.01045915950089693,
-0.30886930227279663,
-0.14472582936286926,
0.1546580195426941,
0.0586872361600399,
0.2878184914588928,
0.178974449634552,
-0.20398683845996857,
-0.03191808983683586,
0.12011071294546127,
-0.2136951982975006,
0.15481361746788025,
-0.20472076535224915,
0.15492509305477142,
-0.3297719955444336,
-0.0521545484662056,
-0.06672560423612595,
0.2685335874557495,
-0.19272568821907043,
-0.29498550295829773,
0.09827052056789398,
-0.009325377643108368,
-0.1986023336648941,
-0.1903703212738037,
0.30784139037132263,
0.8935926556587219,
-0.3268110752105713,
0.05501291900873184,
-0.07983162999153137,
-0.17165781557559967,
0.23141583800315857,
0.041644345968961716,
-0.0389750711619854,
0.32771554589271545,
-0.33727556467056274,
0.3739275336265564,
0.5122525095939636,
-0.37038522958755493,
-0.40343257784843445,
0.21477177739143372,
0.0026316121220588684,
0.3005979061126709,
0.09817059338092804,
0.03143656253814697,
0.07972748577594757,
0.029476555064320564,
0.04734398424625397,
0.2251911461353302,
0.046780288219451904,
0.038330622017383575,
-0.38288116455078125,
-0.21801595389842987,
0.40861743688583374,
0.3061091899871826,
0.1814163774251938,
0.01970873773097992,
0.291897177696228,
0.5705388784408569,
0.32744139432907104,
-0.09885428845882416,
0.07288805395364761,
0.28501200675964355,
-0.00265706330537796,
0.12118980288505554,
0.026708263903856277,
0.00941786915063858,
-0.6081057190895081,
0.25405386090278625,
0.0940745547413826,
0.03629598394036293,
-0.07090795040130615,
-0.033254850655794144,
-0.19663211703300476,
-0.28451162576675415,
-0.3861035704612732,
-0.18630650639533997,
0.1625181883573532,
0.1477409154176712,
-0.030680257827043533,
0.4093533754348755,
0.0197143517434597,
0.29104170203208923,
-0.17768892645835876,
0.04610640928149223,
-0.23103350400924683,
0.30396804213523865,
0.01166931726038456,
-0.0676044374704361,
-0.030566683039069176,
-0.01054268330335617,
0.22472211718559265,
-0.05167469009757042,
-0.0978923887014389,
0.12835143506526947,
0.23184120655059814,
0.018071867525577545,
0.10003431141376495,
-0.25669264793395996,
0.22530752420425415,
-0.22306232154369354,
0.04840165376663208,
0.3784569799900055,
0.23317693173885345,
-0.12640254199504852,
-0.17320480942726135,
0.13654837012290955,
-0.01552906259894371,
0.12641912698745728,
-0.059593722224235535,
-0.0752299502491951,
0.22724014520645142,
-0.11344616115093231,
-0.02610757201910019,
-0.016864247620105743,
0.3546002209186554,
0.2586793601512909,
0.09871162474155426,
-0.019677801057696342,
-0.3421553373336792,
-0.28212329745292664,
0.49639129638671875,
0.06860487163066864,
0.04725400730967522,
0.08523812890052795,
-0.2379162609577179,
0.04527612030506134,
0.06784706562757492,
0.11155852675437927,
0.2883845567703247,
0.09120650589466095,
-0.0705844908952713,
0.09831847250461578,
0.12734371423721313,
-0.012005938217043877,
0.14765474200248718,
0.06085718795657158,
0.3641892075538635,
0.36770206689834595,
-0.19778695702552795,
0.23690584301948547,
-0.1757003664970398,
-0.31807708740234375,
-0.2121324986219406,
0.19570833444595337,
-0.25921496748924255,
0.0025529563426971436,
-0.19497127830982208,
-0.4630076587200165,
-0.1903553456068039,
-0.022469446063041687,
-0.3731136918067932,
-0.30708587169647217,
-0.28688859939575195,
0.21443256735801697,
-0.12454934418201447,
0.02590414136648178,
-0.36862823367118835,
-0.2379274219274521,
0.07455248385667801,
-0.575444221496582,
-0.239584282040596,
-0.2474687546491623,
-0.30401626229286194,
0.04506472125649452,
0.5138823986053467,
0.028052909299731255,
0.10156313329935074,
-0.24942564964294434,
-0.09859367460012436,
-0.2565158009529114,
-0.23071101307868958,
0.09981079399585724,
-0.13496904075145721,
0.08676353842020035,
-0.056143537163734436,
0.539704442024231,
-0.2296752780675888,
-0.11914054304361343,
0.10419343411922455,
0.10818947851657867,
-0.1636137217283249,
0.27373266220092773,
-0.022284571081399918,
0.16379040479660034,
-0.07679371535778046,
-0.43569597601890564,
-0.22623498737812042,
-0.3360927999019623,
-0.04107706993818283,
0.06284631788730621,
-0.11908254027366638,
0.32308098673820496,
0.10165993124246597,
0.17081966996192932,
-0.04257465526461601,
0.059082046151161194,
-0.097420334815979,
-0.03681594505906105,
0.5346088409423828,
-0.06348986178636551,
-0.32163992524147034,
0.39529281854629517,
-0.16300515830516815,
-0.023099709302186966,
0.23557645082473755,
-0.4582493305206299,
0.11028213798999786,
0.11516988277435303,
0.21444275975227356,
-0.03238043934106827,
0.003922933712601662,
0.18457576632499695,
-0.32589033246040344,
0.12293130159378052,
-0.0643097385764122,
0.12454353272914886,
-0.10335236042737961,
-0.2534092962741852,
0.3826821744441986,
-0.013660799711942673,
0.1762695610523224,
0.03588228300213814,
0.7409828305244446,
0.24801957607269287,
0.13859358429908752,
0.4848823845386505,
0.022473935037851334,
0.2724514901638031,
-0.1959397792816162,
-0.15923158824443817,
0.005109096877276897,
0.1287681758403778,
0.04060196876525879,
0.14442913234233856,
-0.21482768654823303,
-0.2568712532520294,
-0.4483228921890259,
-0.12181961536407471,
-0.43516403436660767,
-0.38460594415664673,
-0.0028314832597970963,
0.05227705091238022,
0.038049064576625824,
0.05070200935006142,
0.20404917001724243,
0.25836482644081116,
-0.28639721870422363,
0.11647632718086243,
0.5629981756210327,
0.05412668362259865,
0.08031768351793289,
0.14821313321590424,
-0.06699475646018982,
-0.24681654572486877,
0.2685866951942444,
0.21703864634037018,
0.1613803654909134,
-0.10032211244106293,
-0.1382523477077484,
-0.12060758471488953,
-0.008679507300257683,
0.4951835870742798,
-0.20087090134620667,
0.03371637314558029,
0.2326715588569641,
0.1023746132850647,
-0.3569141626358032,
-0.1368982493877411,
-0.1268162578344345,
0.26286643743515015,
0.27049511671066284,
0.10836157202720642,
-0.4682171046733856,
-0.10303028672933578,
0.25016993284225464,
0.4589453637599945,
0.03530994430184364,
-0.14459307491779327,
-0.28996819257736206,
-0.18044182658195496,
-0.2432848960161209,
-0.1136963739991188,
-0.06357300281524658,
0.45438897609710693,
0.008367958478629589,
0.2700497508049011,
-0.22754009068012238,
0.1905943751335144,
-0.025074541568756104,
0.05076611414551735,
0.3920290172100067,
0.0958477333188057,
0.07574233412742615,
0.12285532802343369,
0.02842429094016552,
-0.002360191196203232,
0.3538907468318939,
0.3265068829059601,
-0.5151554346084595,
-0.07385101914405823,
-0.22678114473819733,
-0.3625333309173584,
0.07047893851995468,
0.0011671488173305988,
-0.09548894315958023,
-0.016665883362293243,
-0.14039131999015808,
0.008191595785319805,
-0.064426951110363,
0.22526678442955017,
-0.14972372353076935,
-0.45098116993904114,
-0.29682043194770813,
0.5810693502426147,
0.022138342261314392,
0.13674810528755188,
0.4095936119556427,
0.07326466590166092,
-0.29480239748954773,
0.16376319527626038,
-0.11217742413282394,
0.7027193903923035,
0.10972356796264648,
0.20207175612449646,
0.21881482005119324,
0.24162335693836212,
0.5957309603691101,
-0.27523159980773926,
0.0874643325805664,
-0.3753160238265991,
-0.03234172239899635,
-0.1554975062608719,
0.06607580184936523,
0.18941745162010193,
-0.025800831615924835,
-0.29185232520103455,
0.4276096522808075,
0.1369432657957077,
0.1958428919315338,
-0.06851650029420853,
0.21588236093521118,
-0.10563763231039047,
-0.042672038078308105,
-0.21969345211982727,
0.08496544510126114,
-0.1836397647857666,
0.5982843637466431,
-0.21740809082984924,
-0.135406956076622,
-0.2979982793331146,
-0.09154488146305084,
-0.42623019218444824,
0.28831130266189575,
-0.36813727021217346,
0.15228962898254395,
-0.18379198014736176,
-0.24381513893604279,
0.09102261066436768,
0.46624669432640076,
0.05019838362932205,
0.10240897536277771,
-0.40888988971710205,
0.12928691506385803,
-0.3434286415576935,
-0.15308290719985962,
0.009635292924940586,
-0.05725954845547676,
0.35280323028564453,
-0.07402481138706207,
-0.34969139099121094,
-0.018067777156829834,
-0.16212879121303558,
-0.1092412993311882,
0.06898187100887299,
-0.024689234793186188,
-0.05692022293806076,
0.021454213187098503,
-0.33657145500183105,
0.1678178906440735,
-0.01070217415690422,
0.039639707654714584,
0.14484815299510956,
0.012743577361106873,
0.04019545391201973,
-0.03584253787994385,
0.06264521926641464,
-0.33776038885116577,
0.0674138069152832,
0.4822019934654236,
-0.11890523880720139,
0.02100418135523796,
0.4799343943595886,
0.1906910389661789,
-0.2559366822242737,
-0.2120315432548523,
0.2095663845539093,
-0.39132755994796753,
-0.3344636559486389,
-0.1470957249403,
0.060144856572151184,
0.6185194849967957,
-0.1738620549440384,
0.06607972830533981,
0.08619008958339691,
-0.27221110463142395,
0.2807510793209076,
-0.4820563793182373,
0.04044675827026367,
0.2654450237751007,
-0.1824265569448471,
-0.01638754829764366,
0.18681380152702332,
-0.23151008784770966,
0.4170709252357483,
-0.461565762758255,
-0.22987794876098633,
0.019035648554563522,
-0.11426591873168945,
0.04232417792081833,
0.3851112127304077,
0.2444741427898407,
0.10767529904842377,
-0.07070449739694595,
0.1327887624502182,
-0.05794883519411087,
-0.08322114497423172,
-0.22339552640914917,
-0.08968771994113922,
0.16574938595294952,
0.20555680990219116,
-0.04214107245206833,
0.05585164949297905,
-0.3673812747001648,
0.05415809527039528,
-0.04526686668395996,
-0.01628231257200241,
0.033830419182777405,
-0.13952530920505524,
0.34012940526008606,
0.0480574294924736,
0.3712290823459625,
-0.46952706575393677,
0.30328476428985596,
-0.023521997034549713,
0.43515098094940186,
0.013286847621202469,
0.228879913687706,
0.3088289499282837,
0.07982045412063599,
-0.4147563874721527,
-0.02587004005908966,
-0.34353238344192505,
0.05905463546514511,
0.12613829970359802,
-0.30803924798965454,
0.2850106656551361,
0.1268036663532257,
0.0008838959038257599,
0.40937289595603943,
-0.28311169147491455,
0.01046675257384777,
0.2350481152534485,
0.2123337984085083,
-0.2183549553155899,
0.23433350026607513,
0.7044737339019775,
0.03946312516927719,
-0.06359389424324036,
0.024102889001369476,
-0.07527802884578705,
-0.02549716830253601,
0.10504235327243805,
0.14828819036483765,
0.09824047982692719,
-0.08216772973537445,
0.38690781593322754,
0.4368690848350525,
0.06846827268600464,
0.31430014967918396,
0.004325494170188904,
0.11657984554767609,
-0.009466215968132019,
0.5320107340812683,
-0.0987352803349495,
0.11978624016046524,
-0.26756832003593445,
-0.08632765710353851,
-0.29432159662246704,
-0.43641865253448486,
0.2064095139503479,
0.33982497453689575,
-0.22468742728233337,
0.1606285721063614,
-0.040925100445747375,
0.04252225160598755,
0.08332934975624084,
0.052679166197776794,
-0.22351011633872986,
-0.06681033968925476,
-0.15147143602371216,
0.09301556646823883,
-0.2981915771961212,
-0.3095695376396179,
-0.06662433594465256,
0.16697926819324493,
0.007441982626914978,
-0.16483187675476074,
-0.030354663729667664,
0.417306125164032,
-0.27568501234054565,
-0.2563863694667816,
0.5147449970245361,
0.029435403645038605,
0.13583087921142578,
-0.2365862876176834,
-0.12322082370519638,
0.0945410504937172,
0.04226689040660858,
0.04341963678598404,
0.3437650203704834,
0.3731147348880768,
0.34390461444854736,
-0.4302558898925781,
-0.14595454931259155,
0.1627374142408371,
-0.037211257964372635,
-0.0025414731353521347,
0.09125087410211563,
-0.020830363035202026,
-0.062411244958639145,
0.3992863595485687,
0.15917712450027466,
-0.12675131857395172,
0.16631969809532166,
0.21965794265270233,
0.10909472405910492,
-0.3026357889175415,
-0.10869766026735306,
-0.30538761615753174,
0.26248523592948914,
-0.2851128876209259,
-0.049518220126628876,
-0.30523771047592163,
0.19323107600212097,
0.17760726809501648,
0.33776071667671204,
0.12174547463655472,
-0.09881381690502167,
0.033058471977710724,
-0.004167189821600914,
0.12083964049816132,
0.35445207357406616,
0.10216408967971802,
-0.3270568251609802,
-0.0004438832402229309,
-0.7650599479675293,
0.13783514499664307,
-0.16814664006233215,
-0.016868408769369125,
-0.1098429411649704,
0.328339159488678,
-0.2197895646095276,
0.27246561646461487,
0.09657267481088638,
-0.06403931975364685,
0.1835152953863144,
0.4634952247142792,
-0.1583319753408432,
-0.36348819732666016,
-0.17234256863594055,
-0.054561734199523926,
-0.26700830459594727,
-0.49851521849632263,
0.055147118866443634,
-0.32884109020233154,
0.03434132784605026,
-0.13427254557609558,
-0.265987366437912,
0.11085344851016998,
0.0066412389278411865,
0.35442885756492615,
-0.03945837914943695,
0.4598005414009094,
-0.09165333211421967,
-0.1288861781358719,
-0.28551849722862244,
-0.0585394985973835,
-0.08255884796380997,
0.20577818155288696,
-0.13068756461143494,
0.40400779247283936,
-0.03608329966664314,
0.020725540816783905,
-0.26718735694885254,
0.43974390625953674,
-0.08580873161554337,
0.2284308671951294,
-0.29260316491127014,
-0.0842902809381485,
0.056740038096904755,
0.0434817411005497,
-0.16588711738586426,
0.11521842330694199,
-0.2549753487110138,
0.09350203722715378,
-0.4043484330177307,
-0.2058277130126953,
0.1685027927160263,
-0.5642949342727661,
-0.20389918982982635,
-0.0926964208483696,
0.032639697194099426,
0.0032537803053855896,
0.005150794051587582,
-0.2986008822917938,
0.344370037317276,
0.3983898460865021,
-0.031239308416843414,
-0.17281615734100342,
-0.04685515537858009,
-0.02395515888929367,
-0.001215565949678421,
-0.03556507080793381,
-0.12497833371162415,
0.11707896739244461,
-0.23570407927036285,
0.16476722061634064,
-0.2442268282175064
] |
https://github.com/huggingface/datasets/issues/4915 | FileNotFoundError while downloading wikipedia dataset for any language | Hi, the date that I have specified "20220401" is available for the language "aa". The error persists for any other available dates as present in https://dumps.wikimedia.org/aawiki/. The error is mainly due to apache beam not able to write the downloaded files. Any help on this? | ## Describe the bug
Hi, I am currently trying to download wikipedia dataset using
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner'). However, I end up in getting filenotfound error. I get this error for any language I try to download.
Environment:
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner')
```
## Expected results
to load the dataset
## Actual results
I am pasting the error trace here:
Downloading builder script: 35.9kB [00:00, ?B/s]
Downloading metadata: 30.4kB [00:00, 1.94MB/s]
Using custom data configuration 20220401.aa-date=20220401,language=aa
Downloading and preparing dataset wikipedia/20220401.aa to C:\Users\Shilpa\.cache\huggingface\datasets\wikipedia\20220401.aa-date=20220401,language=aa\2.0.0\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...
Downloading data: 100%|████████████████████████████████████████████████████████████| 11.1k/11.1k [00:00<00:00, 712kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.82s/it]
Extracting data files: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
Downloading data: 100%|███████████████████████████████████████████████████████████| 35.6k/35.6k [00:00<00:00, 84.3kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.93s/it]
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/abc/temp.py", line 32, in <module>
beam_runner='DirectRunner')
File "G:\Python3.7\lib\site-packages\datasets\load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 1394, in _download_and_prepare
pipeline_results = pipeline.run()
File "G:\Python3.7\lib\site-packages\apache_beam\pipeline.py", line 574, in run
return self.runner.run_pipeline(self, self._options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 131, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 201, in run_pipeline
options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 212, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 443, in run_stages
runner_execution_context, bundle_context_manager, bundle_input)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 776, in _execute_bundle
bundle_manager))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1000, in _run_bundle
data_input, data_output, input_timers, expected_timer_output)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1309, in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\worker_handlers.py", line 380, in push
response = self.worker.do_instruction(request)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 598, in do_instruction
getattr(request, request_type), request.instruction_id)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 1004, in process_bundle
element.data)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam\runners\worker\operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 324, in apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 905, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
RuntimeError: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
## Environment info
Python: 3.7.6
Windows 10 Pro
datasets :2.4.0
apache_beam: 2.41.0
mwparserfromhell: 0.6.4
| 45 | FileNotFoundError while downloading wikipedia dataset for any language
## Describe the bug
Hi, I am currently trying to download wikipedia dataset using
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner'). However, I end up in getting filenotfound error. I get this error for any language I try to download.
Environment:
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner')
```
## Expected results
to load the dataset
## Actual results
I am pasting the error trace here:
Downloading builder script: 35.9kB [00:00, ?B/s]
Downloading metadata: 30.4kB [00:00, 1.94MB/s]
Using custom data configuration 20220401.aa-date=20220401,language=aa
Downloading and preparing dataset wikipedia/20220401.aa to C:\Users\Shilpa\.cache\huggingface\datasets\wikipedia\20220401.aa-date=20220401,language=aa\2.0.0\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...
Downloading data: 100%|████████████████████████████████████████████████████████████| 11.1k/11.1k [00:00<00:00, 712kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.82s/it]
Extracting data files: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
Downloading data: 100%|███████████████████████████████████████████████████████████| 35.6k/35.6k [00:00<00:00, 84.3kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.93s/it]
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/abc/temp.py", line 32, in <module>
beam_runner='DirectRunner')
File "G:\Python3.7\lib\site-packages\datasets\load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 1394, in _download_and_prepare
pipeline_results = pipeline.run()
File "G:\Python3.7\lib\site-packages\apache_beam\pipeline.py", line 574, in run
return self.runner.run_pipeline(self, self._options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 131, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 201, in run_pipeline
options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 212, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 443, in run_stages
runner_execution_context, bundle_context_manager, bundle_input)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 776, in _execute_bundle
bundle_manager))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1000, in _run_bundle
data_input, data_output, input_timers, expected_timer_output)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1309, in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\worker_handlers.py", line 380, in push
response = self.worker.do_instruction(request)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 598, in do_instruction
getattr(request, request_type), request.instruction_id)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 1004, in process_bundle
element.data)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam\runners\worker\operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 324, in apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 905, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
RuntimeError: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
## Environment info
Python: 3.7.6
Windows 10 Pro
datasets :2.4.0
apache_beam: 2.41.0
mwparserfromhell: 0.6.4
Hi, the date that I have specified "20220401" is available for the language "aa". The error persists for any other available dates as present in https://dumps.wikimedia.org/aawiki/. The error is mainly due to apache beam not able to write the downloaded files. Any help on this? | [
-0.22171072661876678,
0.12476305663585663,
0.02336561307311058,
0.48378026485443115,
0.13305407762527466,
0.10554274171590805,
0.20086951553821564,
0.45038512349128723,
0.2548263669013977,
0.011655345559120178,
0.13270814716815948,
-0.09619120508432388,
0.08483631908893585,
-0.17022106051445007,
0.011670746840536594,
-0.19725127518177032,
0.06492558121681213,
-0.03742077946662903,
-0.011086598038673401,
-0.038156915456056595,
-0.34822356700897217,
0.1775761842727661,
-0.4111486077308655,
-0.1026601642370224,
-0.19150716066360474,
0.2309858202934265,
-0.10011617094278336,
0.09472022205591202,
-0.05143412947654724,
-0.11741678416728973,
0.4395785927772522,
-0.07478615641593933,
0.15988770127296448,
0.5133364200592041,
-0.00011308470129733905,
0.18318946659564972,
0.5690590739250183,
-0.20095062255859375,
-0.2633975148200989,
-0.40959423780441284,
-0.15942013263702393,
-0.21729452908039093,
-0.15482325851917267,
-0.30679717659950256,
-0.04988474026322365,
-0.027535632252693176,
0.29515722393989563,
-0.18309836089611053,
0.16675366461277008,
0.15276823937892914,
0.16118718683719635,
-0.15061362087726593,
0.33606022596359253,
-0.013974593952298164,
0.34716570377349854,
0.12006166577339172,
-0.023212648928165436,
0.17357560992240906,
-0.2269643247127533,
-0.10142948478460312,
-0.023755840957164764,
0.28021103143692017,
-0.26159876585006714,
0.03637336567044258,
0.2406981885433197,
-0.05447060614824295,
-0.1648940145969391,
-0.44164010882377625,
0.19789651036262512,
0.609778106212616,
0.8613625764846802,
-0.1297958791255951,
-0.32368960976600647,
-0.0708402767777443,
-0.06058453768491745,
0.02708602137863636,
0.3061339259147644,
0.291085422039032,
-0.1668315827846527,
-0.006340425461530685,
0.24467740952968597,
-0.1327696591615677,
-0.18863652646541595,
0.4577963352203369,
-0.21116618812084198,
0.39715251326560974,
-0.02255900576710701,
0.12399867922067642,
0.023670122027397156,
-0.23234276473522186,
-0.36747464537620544,
-0.36149656772613525,
-0.09949536621570587,
0.31997087597846985,
-0.2158997803926468,
0.03621073067188263,
0.09379129856824875,
0.07101254165172577,
0.30202949047088623,
-0.1365843266248703,
-0.17420430481433868,
-0.03386496752500534,
-0.16302013397216797,
0.08848437666893005,
0.2397523671388626,
-0.04819348454475403,
0.005659736692905426,
0.054201893508434296,
0.35276174545288086,
0.2269487828016281,
-0.1664007157087326,
-0.008084934204816818,
0.15602055191993713,
-0.23194731771945953,
-0.26011040806770325,
-0.008652938529849052,
0.4535675644874573,
-0.2311086505651474,
-0.25067946314811707,
0.15954738855361938,
-0.4669244885444641,
-0.18300800025463104,
-0.19664636254310608,
0.26687169075012207,
-0.22714537382125854,
0.21381023526191711,
0.21608446538448334,
0.31718599796295166,
-0.18571941554546356,
-0.20768781006336212,
-0.08275619149208069,
0.13227568566799164,
-0.13607096672058105,
0.06563200801610947,
0.37410685420036316,
-0.041268277913331985,
0.1544419378042221,
0.12337353080511093,
-0.12656334042549133,
0.0365179181098938,
-0.01045915950089693,
-0.30886930227279663,
-0.14472582936286926,
0.1546580195426941,
0.0586872361600399,
0.2878184914588928,
0.178974449634552,
-0.20398683845996857,
-0.03191808983683586,
0.12011071294546127,
-0.2136951982975006,
0.15481361746788025,
-0.20472076535224915,
0.15492509305477142,
-0.3297719955444336,
-0.0521545484662056,
-0.06672560423612595,
0.2685335874557495,
-0.19272568821907043,
-0.29498550295829773,
0.09827052056789398,
-0.009325377643108368,
-0.1986023336648941,
-0.1903703212738037,
0.30784139037132263,
0.8935926556587219,
-0.3268110752105713,
0.05501291900873184,
-0.07983162999153137,
-0.17165781557559967,
0.23141583800315857,
0.041644345968961716,
-0.0389750711619854,
0.32771554589271545,
-0.33727556467056274,
0.3739275336265564,
0.5122525095939636,
-0.37038522958755493,
-0.40343257784843445,
0.21477177739143372,
0.0026316121220588684,
0.3005979061126709,
0.09817059338092804,
0.03143656253814697,
0.07972748577594757,
0.029476555064320564,
0.04734398424625397,
0.2251911461353302,
0.046780288219451904,
0.038330622017383575,
-0.38288116455078125,
-0.21801595389842987,
0.40861743688583374,
0.3061091899871826,
0.1814163774251938,
0.01970873773097992,
0.291897177696228,
0.5705388784408569,
0.32744139432907104,
-0.09885428845882416,
0.07288805395364761,
0.28501200675964355,
-0.00265706330537796,
0.12118980288505554,
0.026708263903856277,
0.00941786915063858,
-0.6081057190895081,
0.25405386090278625,
0.0940745547413826,
0.03629598394036293,
-0.07090795040130615,
-0.033254850655794144,
-0.19663211703300476,
-0.28451162576675415,
-0.3861035704612732,
-0.18630650639533997,
0.1625181883573532,
0.1477409154176712,
-0.030680257827043533,
0.4093533754348755,
0.0197143517434597,
0.29104170203208923,
-0.17768892645835876,
0.04610640928149223,
-0.23103350400924683,
0.30396804213523865,
0.01166931726038456,
-0.0676044374704361,
-0.030566683039069176,
-0.01054268330335617,
0.22472211718559265,
-0.05167469009757042,
-0.0978923887014389,
0.12835143506526947,
0.23184120655059814,
0.018071867525577545,
0.10003431141376495,
-0.25669264793395996,
0.22530752420425415,
-0.22306232154369354,
0.04840165376663208,
0.3784569799900055,
0.23317693173885345,
-0.12640254199504852,
-0.17320480942726135,
0.13654837012290955,
-0.01552906259894371,
0.12641912698745728,
-0.059593722224235535,
-0.0752299502491951,
0.22724014520645142,
-0.11344616115093231,
-0.02610757201910019,
-0.016864247620105743,
0.3546002209186554,
0.2586793601512909,
0.09871162474155426,
-0.019677801057696342,
-0.3421553373336792,
-0.28212329745292664,
0.49639129638671875,
0.06860487163066864,
0.04725400730967522,
0.08523812890052795,
-0.2379162609577179,
0.04527612030506134,
0.06784706562757492,
0.11155852675437927,
0.2883845567703247,
0.09120650589466095,
-0.0705844908952713,
0.09831847250461578,
0.12734371423721313,
-0.012005938217043877,
0.14765474200248718,
0.06085718795657158,
0.3641892075538635,
0.36770206689834595,
-0.19778695702552795,
0.23690584301948547,
-0.1757003664970398,
-0.31807708740234375,
-0.2121324986219406,
0.19570833444595337,
-0.25921496748924255,
0.0025529563426971436,
-0.19497127830982208,
-0.4630076587200165,
-0.1903553456068039,
-0.022469446063041687,
-0.3731136918067932,
-0.30708587169647217,
-0.28688859939575195,
0.21443256735801697,
-0.12454934418201447,
0.02590414136648178,
-0.36862823367118835,
-0.2379274219274521,
0.07455248385667801,
-0.575444221496582,
-0.239584282040596,
-0.2474687546491623,
-0.30401626229286194,
0.04506472125649452,
0.5138823986053467,
0.028052909299731255,
0.10156313329935074,
-0.24942564964294434,
-0.09859367460012436,
-0.2565158009529114,
-0.23071101307868958,
0.09981079399585724,
-0.13496904075145721,
0.08676353842020035,
-0.056143537163734436,
0.539704442024231,
-0.2296752780675888,
-0.11914054304361343,
0.10419343411922455,
0.10818947851657867,
-0.1636137217283249,
0.27373266220092773,
-0.022284571081399918,
0.16379040479660034,
-0.07679371535778046,
-0.43569597601890564,
-0.22623498737812042,
-0.3360927999019623,
-0.04107706993818283,
0.06284631788730621,
-0.11908254027366638,
0.32308098673820496,
0.10165993124246597,
0.17081966996192932,
-0.04257465526461601,
0.059082046151161194,
-0.097420334815979,
-0.03681594505906105,
0.5346088409423828,
-0.06348986178636551,
-0.32163992524147034,
0.39529281854629517,
-0.16300515830516815,
-0.023099709302186966,
0.23557645082473755,
-0.4582493305206299,
0.11028213798999786,
0.11516988277435303,
0.21444275975227356,
-0.03238043934106827,
0.003922933712601662,
0.18457576632499695,
-0.32589033246040344,
0.12293130159378052,
-0.0643097385764122,
0.12454353272914886,
-0.10335236042737961,
-0.2534092962741852,
0.3826821744441986,
-0.013660799711942673,
0.1762695610523224,
0.03588228300213814,
0.7409828305244446,
0.24801957607269287,
0.13859358429908752,
0.4848823845386505,
0.022473935037851334,
0.2724514901638031,
-0.1959397792816162,
-0.15923158824443817,
0.005109096877276897,
0.1287681758403778,
0.04060196876525879,
0.14442913234233856,
-0.21482768654823303,
-0.2568712532520294,
-0.4483228921890259,
-0.12181961536407471,
-0.43516403436660767,
-0.38460594415664673,
-0.0028314832597970963,
0.05227705091238022,
0.038049064576625824,
0.05070200935006142,
0.20404917001724243,
0.25836482644081116,
-0.28639721870422363,
0.11647632718086243,
0.5629981756210327,
0.05412668362259865,
0.08031768351793289,
0.14821313321590424,
-0.06699475646018982,
-0.24681654572486877,
0.2685866951942444,
0.21703864634037018,
0.1613803654909134,
-0.10032211244106293,
-0.1382523477077484,
-0.12060758471488953,
-0.008679507300257683,
0.4951835870742798,
-0.20087090134620667,
0.03371637314558029,
0.2326715588569641,
0.1023746132850647,
-0.3569141626358032,
-0.1368982493877411,
-0.1268162578344345,
0.26286643743515015,
0.27049511671066284,
0.10836157202720642,
-0.4682171046733856,
-0.10303028672933578,
0.25016993284225464,
0.4589453637599945,
0.03530994430184364,
-0.14459307491779327,
-0.28996819257736206,
-0.18044182658195496,
-0.2432848960161209,
-0.1136963739991188,
-0.06357300281524658,
0.45438897609710693,
0.008367958478629589,
0.2700497508049011,
-0.22754009068012238,
0.1905943751335144,
-0.025074541568756104,
0.05076611414551735,
0.3920290172100067,
0.0958477333188057,
0.07574233412742615,
0.12285532802343369,
0.02842429094016552,
-0.002360191196203232,
0.3538907468318939,
0.3265068829059601,
-0.5151554346084595,
-0.07385101914405823,
-0.22678114473819733,
-0.3625333309173584,
0.07047893851995468,
0.0011671488173305988,
-0.09548894315958023,
-0.016665883362293243,
-0.14039131999015808,
0.008191595785319805,
-0.064426951110363,
0.22526678442955017,
-0.14972372353076935,
-0.45098116993904114,
-0.29682043194770813,
0.5810693502426147,
0.022138342261314392,
0.13674810528755188,
0.4095936119556427,
0.07326466590166092,
-0.29480239748954773,
0.16376319527626038,
-0.11217742413282394,
0.7027193903923035,
0.10972356796264648,
0.20207175612449646,
0.21881482005119324,
0.24162335693836212,
0.5957309603691101,
-0.27523159980773926,
0.0874643325805664,
-0.3753160238265991,
-0.03234172239899635,
-0.1554975062608719,
0.06607580184936523,
0.18941745162010193,
-0.025800831615924835,
-0.29185232520103455,
0.4276096522808075,
0.1369432657957077,
0.1958428919315338,
-0.06851650029420853,
0.21588236093521118,
-0.10563763231039047,
-0.042672038078308105,
-0.21969345211982727,
0.08496544510126114,
-0.1836397647857666,
0.5982843637466431,
-0.21740809082984924,
-0.135406956076622,
-0.2979982793331146,
-0.09154488146305084,
-0.42623019218444824,
0.28831130266189575,
-0.36813727021217346,
0.15228962898254395,
-0.18379198014736176,
-0.24381513893604279,
0.09102261066436768,
0.46624669432640076,
0.05019838362932205,
0.10240897536277771,
-0.40888988971710205,
0.12928691506385803,
-0.3434286415576935,
-0.15308290719985962,
0.009635292924940586,
-0.05725954845547676,
0.35280323028564453,
-0.07402481138706207,
-0.34969139099121094,
-0.018067777156829834,
-0.16212879121303558,
-0.1092412993311882,
0.06898187100887299,
-0.024689234793186188,
-0.05692022293806076,
0.021454213187098503,
-0.33657145500183105,
0.1678178906440735,
-0.01070217415690422,
0.039639707654714584,
0.14484815299510956,
0.012743577361106873,
0.04019545391201973,
-0.03584253787994385,
0.06264521926641464,
-0.33776038885116577,
0.0674138069152832,
0.4822019934654236,
-0.11890523880720139,
0.02100418135523796,
0.4799343943595886,
0.1906910389661789,
-0.2559366822242737,
-0.2120315432548523,
0.2095663845539093,
-0.39132755994796753,
-0.3344636559486389,
-0.1470957249403,
0.060144856572151184,
0.6185194849967957,
-0.1738620549440384,
0.06607972830533981,
0.08619008958339691,
-0.27221110463142395,
0.2807510793209076,
-0.4820563793182373,
0.04044675827026367,
0.2654450237751007,
-0.1824265569448471,
-0.01638754829764366,
0.18681380152702332,
-0.23151008784770966,
0.4170709252357483,
-0.461565762758255,
-0.22987794876098633,
0.019035648554563522,
-0.11426591873168945,
0.04232417792081833,
0.3851112127304077,
0.2444741427898407,
0.10767529904842377,
-0.07070449739694595,
0.1327887624502182,
-0.05794883519411087,
-0.08322114497423172,
-0.22339552640914917,
-0.08968771994113922,
0.16574938595294952,
0.20555680990219116,
-0.04214107245206833,
0.05585164949297905,
-0.3673812747001648,
0.05415809527039528,
-0.04526686668395996,
-0.01628231257200241,
0.033830419182777405,
-0.13952530920505524,
0.34012940526008606,
0.0480574294924736,
0.3712290823459625,
-0.46952706575393677,
0.30328476428985596,
-0.023521997034549713,
0.43515098094940186,
0.013286847621202469,
0.228879913687706,
0.3088289499282837,
0.07982045412063599,
-0.4147563874721527,
-0.02587004005908966,
-0.34353238344192505,
0.05905463546514511,
0.12613829970359802,
-0.30803924798965454,
0.2850106656551361,
0.1268036663532257,
0.0008838959038257599,
0.40937289595603943,
-0.28311169147491455,
0.01046675257384777,
0.2350481152534485,
0.2123337984085083,
-0.2183549553155899,
0.23433350026607513,
0.7044737339019775,
0.03946312516927719,
-0.06359389424324036,
0.024102889001369476,
-0.07527802884578705,
-0.02549716830253601,
0.10504235327243805,
0.14828819036483765,
0.09824047982692719,
-0.08216772973537445,
0.38690781593322754,
0.4368690848350525,
0.06846827268600464,
0.31430014967918396,
0.004325494170188904,
0.11657984554767609,
-0.009466215968132019,
0.5320107340812683,
-0.0987352803349495,
0.11978624016046524,
-0.26756832003593445,
-0.08632765710353851,
-0.29432159662246704,
-0.43641865253448486,
0.2064095139503479,
0.33982497453689575,
-0.22468742728233337,
0.1606285721063614,
-0.040925100445747375,
0.04252225160598755,
0.08332934975624084,
0.052679166197776794,
-0.22351011633872986,
-0.06681033968925476,
-0.15147143602371216,
0.09301556646823883,
-0.2981915771961212,
-0.3095695376396179,
-0.06662433594465256,
0.16697926819324493,
0.007441982626914978,
-0.16483187675476074,
-0.030354663729667664,
0.417306125164032,
-0.27568501234054565,
-0.2563863694667816,
0.5147449970245361,
0.029435403645038605,
0.13583087921142578,
-0.2365862876176834,
-0.12322082370519638,
0.0945410504937172,
0.04226689040660858,
0.04341963678598404,
0.3437650203704834,
0.3731147348880768,
0.34390461444854736,
-0.4302558898925781,
-0.14595454931259155,
0.1627374142408371,
-0.037211257964372635,
-0.0025414731353521347,
0.09125087410211563,
-0.020830363035202026,
-0.062411244958639145,
0.3992863595485687,
0.15917712450027466,
-0.12675131857395172,
0.16631969809532166,
0.21965794265270233,
0.10909472405910492,
-0.3026357889175415,
-0.10869766026735306,
-0.30538761615753174,
0.26248523592948914,
-0.2851128876209259,
-0.049518220126628876,
-0.30523771047592163,
0.19323107600212097,
0.17760726809501648,
0.33776071667671204,
0.12174547463655472,
-0.09881381690502167,
0.033058471977710724,
-0.004167189821600914,
0.12083964049816132,
0.35445207357406616,
0.10216408967971802,
-0.3270568251609802,
-0.0004438832402229309,
-0.7650599479675293,
0.13783514499664307,
-0.16814664006233215,
-0.016868408769369125,
-0.1098429411649704,
0.328339159488678,
-0.2197895646095276,
0.27246561646461487,
0.09657267481088638,
-0.06403931975364685,
0.1835152953863144,
0.4634952247142792,
-0.1583319753408432,
-0.36348819732666016,
-0.17234256863594055,
-0.054561734199523926,
-0.26700830459594727,
-0.49851521849632263,
0.055147118866443634,
-0.32884109020233154,
0.03434132784605026,
-0.13427254557609558,
-0.265987366437912,
0.11085344851016998,
0.0066412389278411865,
0.35442885756492615,
-0.03945837914943695,
0.4598005414009094,
-0.09165333211421967,
-0.1288861781358719,
-0.28551849722862244,
-0.0585394985973835,
-0.08255884796380997,
0.20577818155288696,
-0.13068756461143494,
0.40400779247283936,
-0.03608329966664314,
0.020725540816783905,
-0.26718735694885254,
0.43974390625953674,
-0.08580873161554337,
0.2284308671951294,
-0.29260316491127014,
-0.0842902809381485,
0.056740038096904755,
0.0434817411005497,
-0.16588711738586426,
0.11521842330694199,
-0.2549753487110138,
0.09350203722715378,
-0.4043484330177307,
-0.2058277130126953,
0.1685027927160263,
-0.5642949342727661,
-0.20389918982982635,
-0.0926964208483696,
0.032639697194099426,
0.0032537803053855896,
0.005150794051587582,
-0.2986008822917938,
0.344370037317276,
0.3983898460865021,
-0.031239308416843414,
-0.17281615734100342,
-0.04685515537858009,
-0.02395515888929367,
-0.001215565949678421,
-0.03556507080793381,
-0.12497833371162415,
0.11707896739244461,
-0.23570407927036285,
0.16476722061634064,
-0.2442268282175064
] |
https://github.com/huggingface/datasets/issues/4915 | FileNotFoundError while downloading wikipedia dataset for any language | I am struggling with basically the same issue. I am trying to download the German Wikipedia dump.
As per the [documentation](https://huggingface.co/datasets/wikipedia), `"20220301.de"` should be available as a pre-processed dataset.
Issuing the command mentioned in the documentation cited above
from datasets import load_dataset
load_dataset("wikipedia", "20220301.de")
raises the following `FileNotFound` error
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/dewiki/20220301/dumpstatus.json
Using the ([undocumented](https://huggingface.co/docs/datasets/v1.2.1/package_reference/loading_methods.html#datasets.load_dataset)?) call to `load_dataset()` with `language` and `date` parameters
load_dataset("wikipedia", language="de", date="20220301", beam_runner="DirectRunner")
produces the same error.
EDIT: as I am using `datasets` v2.7.1, I should be looking at [that version's documentation](https://huggingface.co/docs/datasets/v2.7.1/en/package_reference/loading_methods#datasets.load_dataset)! It is mentioned there, that additional `kwargs` are "passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.7.1/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.7.1/en/package_reference/builder_classes#datasets.DatasetBuilder)". So I guess that is how `language` and `date` are used.
As I can see a folder `20221130` on `https://dumps.wikimedia.org/dewiki/`, I also tried
from datasets import load_dataset
load_dataset("wikipedia", "20221130.de")
which throws another error:
ValueError: BuilderConfig 20221120.de not found. Available: ['20220301.aa', ... '20220301.de', ...
basically telling me that the dataset I originally requested (`'20220301.de'`) is available...
It seems that `load_dataset` is not handling the vanishing older dumps for Wikipedia correctly? | ## Describe the bug
Hi, I am currently trying to download wikipedia dataset using
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner'). However, I end up in getting filenotfound error. I get this error for any language I try to download.
Environment:
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner')
```
## Expected results
to load the dataset
## Actual results
I am pasting the error trace here:
Downloading builder script: 35.9kB [00:00, ?B/s]
Downloading metadata: 30.4kB [00:00, 1.94MB/s]
Using custom data configuration 20220401.aa-date=20220401,language=aa
Downloading and preparing dataset wikipedia/20220401.aa to C:\Users\Shilpa\.cache\huggingface\datasets\wikipedia\20220401.aa-date=20220401,language=aa\2.0.0\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...
Downloading data: 100%|████████████████████████████████████████████████████████████| 11.1k/11.1k [00:00<00:00, 712kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.82s/it]
Extracting data files: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
Downloading data: 100%|███████████████████████████████████████████████████████████| 35.6k/35.6k [00:00<00:00, 84.3kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.93s/it]
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/abc/temp.py", line 32, in <module>
beam_runner='DirectRunner')
File "G:\Python3.7\lib\site-packages\datasets\load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 1394, in _download_and_prepare
pipeline_results = pipeline.run()
File "G:\Python3.7\lib\site-packages\apache_beam\pipeline.py", line 574, in run
return self.runner.run_pipeline(self, self._options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 131, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 201, in run_pipeline
options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 212, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 443, in run_stages
runner_execution_context, bundle_context_manager, bundle_input)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 776, in _execute_bundle
bundle_manager))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1000, in _run_bundle
data_input, data_output, input_timers, expected_timer_output)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1309, in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\worker_handlers.py", line 380, in push
response = self.worker.do_instruction(request)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 598, in do_instruction
getattr(request, request_type), request.instruction_id)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 1004, in process_bundle
element.data)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam\runners\worker\operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 324, in apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 905, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
RuntimeError: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
## Environment info
Python: 3.7.6
Windows 10 Pro
datasets :2.4.0
apache_beam: 2.41.0
mwparserfromhell: 0.6.4
| 175 | FileNotFoundError while downloading wikipedia dataset for any language
## Describe the bug
Hi, I am currently trying to download wikipedia dataset using
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner'). However, I end up in getting filenotfound error. I get this error for any language I try to download.
Environment:
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner')
```
## Expected results
to load the dataset
## Actual results
I am pasting the error trace here:
Downloading builder script: 35.9kB [00:00, ?B/s]
Downloading metadata: 30.4kB [00:00, 1.94MB/s]
Using custom data configuration 20220401.aa-date=20220401,language=aa
Downloading and preparing dataset wikipedia/20220401.aa to C:\Users\Shilpa\.cache\huggingface\datasets\wikipedia\20220401.aa-date=20220401,language=aa\2.0.0\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...
Downloading data: 100%|████████████████████████████████████████████████████████████| 11.1k/11.1k [00:00<00:00, 712kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.82s/it]
Extracting data files: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
Downloading data: 100%|███████████████████████████████████████████████████████████| 35.6k/35.6k [00:00<00:00, 84.3kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.93s/it]
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/abc/temp.py", line 32, in <module>
beam_runner='DirectRunner')
File "G:\Python3.7\lib\site-packages\datasets\load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 1394, in _download_and_prepare
pipeline_results = pipeline.run()
File "G:\Python3.7\lib\site-packages\apache_beam\pipeline.py", line 574, in run
return self.runner.run_pipeline(self, self._options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 131, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 201, in run_pipeline
options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 212, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 443, in run_stages
runner_execution_context, bundle_context_manager, bundle_input)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 776, in _execute_bundle
bundle_manager))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1000, in _run_bundle
data_input, data_output, input_timers, expected_timer_output)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1309, in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\worker_handlers.py", line 380, in push
response = self.worker.do_instruction(request)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 598, in do_instruction
getattr(request, request_type), request.instruction_id)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 1004, in process_bundle
element.data)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam\runners\worker\operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 324, in apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 905, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
RuntimeError: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
## Environment info
Python: 3.7.6
Windows 10 Pro
datasets :2.4.0
apache_beam: 2.41.0
mwparserfromhell: 0.6.4
I am struggling with basically the same issue. I am trying to download the German Wikipedia dump.
As per the [documentation](https://huggingface.co/datasets/wikipedia), `"20220301.de"` should be available as a pre-processed dataset.
Issuing the command mentioned in the documentation cited above
from datasets import load_dataset
load_dataset("wikipedia", "20220301.de")
raises the following `FileNotFound` error
FileNotFoundError: Couldn't find file at https://dumps.wikimedia.org/dewiki/20220301/dumpstatus.json
Using the ([undocumented](https://huggingface.co/docs/datasets/v1.2.1/package_reference/loading_methods.html#datasets.load_dataset)?) call to `load_dataset()` with `language` and `date` parameters
load_dataset("wikipedia", language="de", date="20220301", beam_runner="DirectRunner")
produces the same error.
EDIT: as I am using `datasets` v2.7.1, I should be looking at [that version's documentation](https://huggingface.co/docs/datasets/v2.7.1/en/package_reference/loading_methods#datasets.load_dataset)! It is mentioned there, that additional `kwargs` are "passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.7.1/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.7.1/en/package_reference/builder_classes#datasets.DatasetBuilder)". So I guess that is how `language` and `date` are used.
As I can see a folder `20221130` on `https://dumps.wikimedia.org/dewiki/`, I also tried
from datasets import load_dataset
load_dataset("wikipedia", "20221130.de")
which throws another error:
ValueError: BuilderConfig 20221120.de not found. Available: ['20220301.aa', ... '20220301.de', ...
basically telling me that the dataset I originally requested (`'20220301.de'`) is available...
It seems that `load_dataset` is not handling the vanishing older dumps for Wikipedia correctly? | [
-0.22171072661876678,
0.12476305663585663,
0.02336561307311058,
0.48378026485443115,
0.13305407762527466,
0.10554274171590805,
0.20086951553821564,
0.45038512349128723,
0.2548263669013977,
0.011655345559120178,
0.13270814716815948,
-0.09619120508432388,
0.08483631908893585,
-0.17022106051445007,
0.011670746840536594,
-0.19725127518177032,
0.06492558121681213,
-0.03742077946662903,
-0.011086598038673401,
-0.038156915456056595,
-0.34822356700897217,
0.1775761842727661,
-0.4111486077308655,
-0.1026601642370224,
-0.19150716066360474,
0.2309858202934265,
-0.10011617094278336,
0.09472022205591202,
-0.05143412947654724,
-0.11741678416728973,
0.4395785927772522,
-0.07478615641593933,
0.15988770127296448,
0.5133364200592041,
-0.00011308470129733905,
0.18318946659564972,
0.5690590739250183,
-0.20095062255859375,
-0.2633975148200989,
-0.40959423780441284,
-0.15942013263702393,
-0.21729452908039093,
-0.15482325851917267,
-0.30679717659950256,
-0.04988474026322365,
-0.027535632252693176,
0.29515722393989563,
-0.18309836089611053,
0.16675366461277008,
0.15276823937892914,
0.16118718683719635,
-0.15061362087726593,
0.33606022596359253,
-0.013974593952298164,
0.34716570377349854,
0.12006166577339172,
-0.023212648928165436,
0.17357560992240906,
-0.2269643247127533,
-0.10142948478460312,
-0.023755840957164764,
0.28021103143692017,
-0.26159876585006714,
0.03637336567044258,
0.2406981885433197,
-0.05447060614824295,
-0.1648940145969391,
-0.44164010882377625,
0.19789651036262512,
0.609778106212616,
0.8613625764846802,
-0.1297958791255951,
-0.32368960976600647,
-0.0708402767777443,
-0.06058453768491745,
0.02708602137863636,
0.3061339259147644,
0.291085422039032,
-0.1668315827846527,
-0.006340425461530685,
0.24467740952968597,
-0.1327696591615677,
-0.18863652646541595,
0.4577963352203369,
-0.21116618812084198,
0.39715251326560974,
-0.02255900576710701,
0.12399867922067642,
0.023670122027397156,
-0.23234276473522186,
-0.36747464537620544,
-0.36149656772613525,
-0.09949536621570587,
0.31997087597846985,
-0.2158997803926468,
0.03621073067188263,
0.09379129856824875,
0.07101254165172577,
0.30202949047088623,
-0.1365843266248703,
-0.17420430481433868,
-0.03386496752500534,
-0.16302013397216797,
0.08848437666893005,
0.2397523671388626,
-0.04819348454475403,
0.005659736692905426,
0.054201893508434296,
0.35276174545288086,
0.2269487828016281,
-0.1664007157087326,
-0.008084934204816818,
0.15602055191993713,
-0.23194731771945953,
-0.26011040806770325,
-0.008652938529849052,
0.4535675644874573,
-0.2311086505651474,
-0.25067946314811707,
0.15954738855361938,
-0.4669244885444641,
-0.18300800025463104,
-0.19664636254310608,
0.26687169075012207,
-0.22714537382125854,
0.21381023526191711,
0.21608446538448334,
0.31718599796295166,
-0.18571941554546356,
-0.20768781006336212,
-0.08275619149208069,
0.13227568566799164,
-0.13607096672058105,
0.06563200801610947,
0.37410685420036316,
-0.041268277913331985,
0.1544419378042221,
0.12337353080511093,
-0.12656334042549133,
0.0365179181098938,
-0.01045915950089693,
-0.30886930227279663,
-0.14472582936286926,
0.1546580195426941,
0.0586872361600399,
0.2878184914588928,
0.178974449634552,
-0.20398683845996857,
-0.03191808983683586,
0.12011071294546127,
-0.2136951982975006,
0.15481361746788025,
-0.20472076535224915,
0.15492509305477142,
-0.3297719955444336,
-0.0521545484662056,
-0.06672560423612595,
0.2685335874557495,
-0.19272568821907043,
-0.29498550295829773,
0.09827052056789398,
-0.009325377643108368,
-0.1986023336648941,
-0.1903703212738037,
0.30784139037132263,
0.8935926556587219,
-0.3268110752105713,
0.05501291900873184,
-0.07983162999153137,
-0.17165781557559967,
0.23141583800315857,
0.041644345968961716,
-0.0389750711619854,
0.32771554589271545,
-0.33727556467056274,
0.3739275336265564,
0.5122525095939636,
-0.37038522958755493,
-0.40343257784843445,
0.21477177739143372,
0.0026316121220588684,
0.3005979061126709,
0.09817059338092804,
0.03143656253814697,
0.07972748577594757,
0.029476555064320564,
0.04734398424625397,
0.2251911461353302,
0.046780288219451904,
0.038330622017383575,
-0.38288116455078125,
-0.21801595389842987,
0.40861743688583374,
0.3061091899871826,
0.1814163774251938,
0.01970873773097992,
0.291897177696228,
0.5705388784408569,
0.32744139432907104,
-0.09885428845882416,
0.07288805395364761,
0.28501200675964355,
-0.00265706330537796,
0.12118980288505554,
0.026708263903856277,
0.00941786915063858,
-0.6081057190895081,
0.25405386090278625,
0.0940745547413826,
0.03629598394036293,
-0.07090795040130615,
-0.033254850655794144,
-0.19663211703300476,
-0.28451162576675415,
-0.3861035704612732,
-0.18630650639533997,
0.1625181883573532,
0.1477409154176712,
-0.030680257827043533,
0.4093533754348755,
0.0197143517434597,
0.29104170203208923,
-0.17768892645835876,
0.04610640928149223,
-0.23103350400924683,
0.30396804213523865,
0.01166931726038456,
-0.0676044374704361,
-0.030566683039069176,
-0.01054268330335617,
0.22472211718559265,
-0.05167469009757042,
-0.0978923887014389,
0.12835143506526947,
0.23184120655059814,
0.018071867525577545,
0.10003431141376495,
-0.25669264793395996,
0.22530752420425415,
-0.22306232154369354,
0.04840165376663208,
0.3784569799900055,
0.23317693173885345,
-0.12640254199504852,
-0.17320480942726135,
0.13654837012290955,
-0.01552906259894371,
0.12641912698745728,
-0.059593722224235535,
-0.0752299502491951,
0.22724014520645142,
-0.11344616115093231,
-0.02610757201910019,
-0.016864247620105743,
0.3546002209186554,
0.2586793601512909,
0.09871162474155426,
-0.019677801057696342,
-0.3421553373336792,
-0.28212329745292664,
0.49639129638671875,
0.06860487163066864,
0.04725400730967522,
0.08523812890052795,
-0.2379162609577179,
0.04527612030506134,
0.06784706562757492,
0.11155852675437927,
0.2883845567703247,
0.09120650589466095,
-0.0705844908952713,
0.09831847250461578,
0.12734371423721313,
-0.012005938217043877,
0.14765474200248718,
0.06085718795657158,
0.3641892075538635,
0.36770206689834595,
-0.19778695702552795,
0.23690584301948547,
-0.1757003664970398,
-0.31807708740234375,
-0.2121324986219406,
0.19570833444595337,
-0.25921496748924255,
0.0025529563426971436,
-0.19497127830982208,
-0.4630076587200165,
-0.1903553456068039,
-0.022469446063041687,
-0.3731136918067932,
-0.30708587169647217,
-0.28688859939575195,
0.21443256735801697,
-0.12454934418201447,
0.02590414136648178,
-0.36862823367118835,
-0.2379274219274521,
0.07455248385667801,
-0.575444221496582,
-0.239584282040596,
-0.2474687546491623,
-0.30401626229286194,
0.04506472125649452,
0.5138823986053467,
0.028052909299731255,
0.10156313329935074,
-0.24942564964294434,
-0.09859367460012436,
-0.2565158009529114,
-0.23071101307868958,
0.09981079399585724,
-0.13496904075145721,
0.08676353842020035,
-0.056143537163734436,
0.539704442024231,
-0.2296752780675888,
-0.11914054304361343,
0.10419343411922455,
0.10818947851657867,
-0.1636137217283249,
0.27373266220092773,
-0.022284571081399918,
0.16379040479660034,
-0.07679371535778046,
-0.43569597601890564,
-0.22623498737812042,
-0.3360927999019623,
-0.04107706993818283,
0.06284631788730621,
-0.11908254027366638,
0.32308098673820496,
0.10165993124246597,
0.17081966996192932,
-0.04257465526461601,
0.059082046151161194,
-0.097420334815979,
-0.03681594505906105,
0.5346088409423828,
-0.06348986178636551,
-0.32163992524147034,
0.39529281854629517,
-0.16300515830516815,
-0.023099709302186966,
0.23557645082473755,
-0.4582493305206299,
0.11028213798999786,
0.11516988277435303,
0.21444275975227356,
-0.03238043934106827,
0.003922933712601662,
0.18457576632499695,
-0.32589033246040344,
0.12293130159378052,
-0.0643097385764122,
0.12454353272914886,
-0.10335236042737961,
-0.2534092962741852,
0.3826821744441986,
-0.013660799711942673,
0.1762695610523224,
0.03588228300213814,
0.7409828305244446,
0.24801957607269287,
0.13859358429908752,
0.4848823845386505,
0.022473935037851334,
0.2724514901638031,
-0.1959397792816162,
-0.15923158824443817,
0.005109096877276897,
0.1287681758403778,
0.04060196876525879,
0.14442913234233856,
-0.21482768654823303,
-0.2568712532520294,
-0.4483228921890259,
-0.12181961536407471,
-0.43516403436660767,
-0.38460594415664673,
-0.0028314832597970963,
0.05227705091238022,
0.038049064576625824,
0.05070200935006142,
0.20404917001724243,
0.25836482644081116,
-0.28639721870422363,
0.11647632718086243,
0.5629981756210327,
0.05412668362259865,
0.08031768351793289,
0.14821313321590424,
-0.06699475646018982,
-0.24681654572486877,
0.2685866951942444,
0.21703864634037018,
0.1613803654909134,
-0.10032211244106293,
-0.1382523477077484,
-0.12060758471488953,
-0.008679507300257683,
0.4951835870742798,
-0.20087090134620667,
0.03371637314558029,
0.2326715588569641,
0.1023746132850647,
-0.3569141626358032,
-0.1368982493877411,
-0.1268162578344345,
0.26286643743515015,
0.27049511671066284,
0.10836157202720642,
-0.4682171046733856,
-0.10303028672933578,
0.25016993284225464,
0.4589453637599945,
0.03530994430184364,
-0.14459307491779327,
-0.28996819257736206,
-0.18044182658195496,
-0.2432848960161209,
-0.1136963739991188,
-0.06357300281524658,
0.45438897609710693,
0.008367958478629589,
0.2700497508049011,
-0.22754009068012238,
0.1905943751335144,
-0.025074541568756104,
0.05076611414551735,
0.3920290172100067,
0.0958477333188057,
0.07574233412742615,
0.12285532802343369,
0.02842429094016552,
-0.002360191196203232,
0.3538907468318939,
0.3265068829059601,
-0.5151554346084595,
-0.07385101914405823,
-0.22678114473819733,
-0.3625333309173584,
0.07047893851995468,
0.0011671488173305988,
-0.09548894315958023,
-0.016665883362293243,
-0.14039131999015808,
0.008191595785319805,
-0.064426951110363,
0.22526678442955017,
-0.14972372353076935,
-0.45098116993904114,
-0.29682043194770813,
0.5810693502426147,
0.022138342261314392,
0.13674810528755188,
0.4095936119556427,
0.07326466590166092,
-0.29480239748954773,
0.16376319527626038,
-0.11217742413282394,
0.7027193903923035,
0.10972356796264648,
0.20207175612449646,
0.21881482005119324,
0.24162335693836212,
0.5957309603691101,
-0.27523159980773926,
0.0874643325805664,
-0.3753160238265991,
-0.03234172239899635,
-0.1554975062608719,
0.06607580184936523,
0.18941745162010193,
-0.025800831615924835,
-0.29185232520103455,
0.4276096522808075,
0.1369432657957077,
0.1958428919315338,
-0.06851650029420853,
0.21588236093521118,
-0.10563763231039047,
-0.042672038078308105,
-0.21969345211982727,
0.08496544510126114,
-0.1836397647857666,
0.5982843637466431,
-0.21740809082984924,
-0.135406956076622,
-0.2979982793331146,
-0.09154488146305084,
-0.42623019218444824,
0.28831130266189575,
-0.36813727021217346,
0.15228962898254395,
-0.18379198014736176,
-0.24381513893604279,
0.09102261066436768,
0.46624669432640076,
0.05019838362932205,
0.10240897536277771,
-0.40888988971710205,
0.12928691506385803,
-0.3434286415576935,
-0.15308290719985962,
0.009635292924940586,
-0.05725954845547676,
0.35280323028564453,
-0.07402481138706207,
-0.34969139099121094,
-0.018067777156829834,
-0.16212879121303558,
-0.1092412993311882,
0.06898187100887299,
-0.024689234793186188,
-0.05692022293806076,
0.021454213187098503,
-0.33657145500183105,
0.1678178906440735,
-0.01070217415690422,
0.039639707654714584,
0.14484815299510956,
0.012743577361106873,
0.04019545391201973,
-0.03584253787994385,
0.06264521926641464,
-0.33776038885116577,
0.0674138069152832,
0.4822019934654236,
-0.11890523880720139,
0.02100418135523796,
0.4799343943595886,
0.1906910389661789,
-0.2559366822242737,
-0.2120315432548523,
0.2095663845539093,
-0.39132755994796753,
-0.3344636559486389,
-0.1470957249403,
0.060144856572151184,
0.6185194849967957,
-0.1738620549440384,
0.06607972830533981,
0.08619008958339691,
-0.27221110463142395,
0.2807510793209076,
-0.4820563793182373,
0.04044675827026367,
0.2654450237751007,
-0.1824265569448471,
-0.01638754829764366,
0.18681380152702332,
-0.23151008784770966,
0.4170709252357483,
-0.461565762758255,
-0.22987794876098633,
0.019035648554563522,
-0.11426591873168945,
0.04232417792081833,
0.3851112127304077,
0.2444741427898407,
0.10767529904842377,
-0.07070449739694595,
0.1327887624502182,
-0.05794883519411087,
-0.08322114497423172,
-0.22339552640914917,
-0.08968771994113922,
0.16574938595294952,
0.20555680990219116,
-0.04214107245206833,
0.05585164949297905,
-0.3673812747001648,
0.05415809527039528,
-0.04526686668395996,
-0.01628231257200241,
0.033830419182777405,
-0.13952530920505524,
0.34012940526008606,
0.0480574294924736,
0.3712290823459625,
-0.46952706575393677,
0.30328476428985596,
-0.023521997034549713,
0.43515098094940186,
0.013286847621202469,
0.228879913687706,
0.3088289499282837,
0.07982045412063599,
-0.4147563874721527,
-0.02587004005908966,
-0.34353238344192505,
0.05905463546514511,
0.12613829970359802,
-0.30803924798965454,
0.2850106656551361,
0.1268036663532257,
0.0008838959038257599,
0.40937289595603943,
-0.28311169147491455,
0.01046675257384777,
0.2350481152534485,
0.2123337984085083,
-0.2183549553155899,
0.23433350026607513,
0.7044737339019775,
0.03946312516927719,
-0.06359389424324036,
0.024102889001369476,
-0.07527802884578705,
-0.02549716830253601,
0.10504235327243805,
0.14828819036483765,
0.09824047982692719,
-0.08216772973537445,
0.38690781593322754,
0.4368690848350525,
0.06846827268600464,
0.31430014967918396,
0.004325494170188904,
0.11657984554767609,
-0.009466215968132019,
0.5320107340812683,
-0.0987352803349495,
0.11978624016046524,
-0.26756832003593445,
-0.08632765710353851,
-0.29432159662246704,
-0.43641865253448486,
0.2064095139503479,
0.33982497453689575,
-0.22468742728233337,
0.1606285721063614,
-0.040925100445747375,
0.04252225160598755,
0.08332934975624084,
0.052679166197776794,
-0.22351011633872986,
-0.06681033968925476,
-0.15147143602371216,
0.09301556646823883,
-0.2981915771961212,
-0.3095695376396179,
-0.06662433594465256,
0.16697926819324493,
0.007441982626914978,
-0.16483187675476074,
-0.030354663729667664,
0.417306125164032,
-0.27568501234054565,
-0.2563863694667816,
0.5147449970245361,
0.029435403645038605,
0.13583087921142578,
-0.2365862876176834,
-0.12322082370519638,
0.0945410504937172,
0.04226689040660858,
0.04341963678598404,
0.3437650203704834,
0.3731147348880768,
0.34390461444854736,
-0.4302558898925781,
-0.14595454931259155,
0.1627374142408371,
-0.037211257964372635,
-0.0025414731353521347,
0.09125087410211563,
-0.020830363035202026,
-0.062411244958639145,
0.3992863595485687,
0.15917712450027466,
-0.12675131857395172,
0.16631969809532166,
0.21965794265270233,
0.10909472405910492,
-0.3026357889175415,
-0.10869766026735306,
-0.30538761615753174,
0.26248523592948914,
-0.2851128876209259,
-0.049518220126628876,
-0.30523771047592163,
0.19323107600212097,
0.17760726809501648,
0.33776071667671204,
0.12174547463655472,
-0.09881381690502167,
0.033058471977710724,
-0.004167189821600914,
0.12083964049816132,
0.35445207357406616,
0.10216408967971802,
-0.3270568251609802,
-0.0004438832402229309,
-0.7650599479675293,
0.13783514499664307,
-0.16814664006233215,
-0.016868408769369125,
-0.1098429411649704,
0.328339159488678,
-0.2197895646095276,
0.27246561646461487,
0.09657267481088638,
-0.06403931975364685,
0.1835152953863144,
0.4634952247142792,
-0.1583319753408432,
-0.36348819732666016,
-0.17234256863594055,
-0.054561734199523926,
-0.26700830459594727,
-0.49851521849632263,
0.055147118866443634,
-0.32884109020233154,
0.03434132784605026,
-0.13427254557609558,
-0.265987366437912,
0.11085344851016998,
0.0066412389278411865,
0.35442885756492615,
-0.03945837914943695,
0.4598005414009094,
-0.09165333211421967,
-0.1288861781358719,
-0.28551849722862244,
-0.0585394985973835,
-0.08255884796380997,
0.20577818155288696,
-0.13068756461143494,
0.40400779247283936,
-0.03608329966664314,
0.020725540816783905,
-0.26718735694885254,
0.43974390625953674,
-0.08580873161554337,
0.2284308671951294,
-0.29260316491127014,
-0.0842902809381485,
0.056740038096904755,
0.0434817411005497,
-0.16588711738586426,
0.11521842330694199,
-0.2549753487110138,
0.09350203722715378,
-0.4043484330177307,
-0.2058277130126953,
0.1685027927160263,
-0.5642949342727661,
-0.20389918982982635,
-0.0926964208483696,
0.032639697194099426,
0.0032537803053855896,
0.005150794051587582,
-0.2986008822917938,
0.344370037317276,
0.3983898460865021,
-0.031239308416843414,
-0.17281615734100342,
-0.04685515537858009,
-0.02395515888929367,
-0.001215565949678421,
-0.03556507080793381,
-0.12497833371162415,
0.11707896739244461,
-0.23570407927036285,
0.16476722061634064,
-0.2442268282175064
] |
https://github.com/huggingface/datasets/issues/4915 | FileNotFoundError while downloading wikipedia dataset for any language | I am able to start downloading the dataset when trying anything with the recent dumps for 20221201. But obviously, those are the big wiki dumps and I need the smaller preloaded version.
I am now getting some error when the files show up in my cache but it will say FileNotFoundError at the end of the download for some reason. The cache directory to the datasets\wikipedia\date.bn\ had something in it, then when the error came up it disappeared.
It is easy to test with the langauge "bn" because the amount of files is low.
dataset = load_dataset('wikipedia', date="20221201", language="bn", split='train', beam_runner='DirectRunner') | ## Describe the bug
Hi, I am currently trying to download wikipedia dataset using
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner'). However, I end up in getting filenotfound error. I get this error for any language I try to download.
Environment:
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner')
```
## Expected results
to load the dataset
## Actual results
I am pasting the error trace here:
Downloading builder script: 35.9kB [00:00, ?B/s]
Downloading metadata: 30.4kB [00:00, 1.94MB/s]
Using custom data configuration 20220401.aa-date=20220401,language=aa
Downloading and preparing dataset wikipedia/20220401.aa to C:\Users\Shilpa\.cache\huggingface\datasets\wikipedia\20220401.aa-date=20220401,language=aa\2.0.0\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...
Downloading data: 100%|████████████████████████████████████████████████████████████| 11.1k/11.1k [00:00<00:00, 712kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.82s/it]
Extracting data files: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
Downloading data: 100%|███████████████████████████████████████████████████████████| 35.6k/35.6k [00:00<00:00, 84.3kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.93s/it]
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/abc/temp.py", line 32, in <module>
beam_runner='DirectRunner')
File "G:\Python3.7\lib\site-packages\datasets\load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 1394, in _download_and_prepare
pipeline_results = pipeline.run()
File "G:\Python3.7\lib\site-packages\apache_beam\pipeline.py", line 574, in run
return self.runner.run_pipeline(self, self._options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 131, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 201, in run_pipeline
options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 212, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 443, in run_stages
runner_execution_context, bundle_context_manager, bundle_input)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 776, in _execute_bundle
bundle_manager))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1000, in _run_bundle
data_input, data_output, input_timers, expected_timer_output)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1309, in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\worker_handlers.py", line 380, in push
response = self.worker.do_instruction(request)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 598, in do_instruction
getattr(request, request_type), request.instruction_id)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 1004, in process_bundle
element.data)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam\runners\worker\operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 324, in apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 905, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
RuntimeError: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
## Environment info
Python: 3.7.6
Windows 10 Pro
datasets :2.4.0
apache_beam: 2.41.0
mwparserfromhell: 0.6.4
| 101 | FileNotFoundError while downloading wikipedia dataset for any language
## Describe the bug
Hi, I am currently trying to download wikipedia dataset using
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner'). However, I end up in getting filenotfound error. I get this error for any language I try to download.
Environment:
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("wikipedia", language="aa", date="20220401", split="train",beam_runner='DirectRunner')
```
## Expected results
to load the dataset
## Actual results
I am pasting the error trace here:
Downloading builder script: 35.9kB [00:00, ?B/s]
Downloading metadata: 30.4kB [00:00, 1.94MB/s]
Using custom data configuration 20220401.aa-date=20220401,language=aa
Downloading and preparing dataset wikipedia/20220401.aa to C:\Users\Shilpa\.cache\huggingface\datasets\wikipedia\20220401.aa-date=20220401,language=aa\2.0.0\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559...
Downloading data: 100%|████████████████████████████████████████████████████████████| 11.1k/11.1k [00:00<00:00, 712kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.82s/it]
Extracting data files: 100%|█████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]
Downloading data: 100%|███████████████████████████████████████████████████████████| 35.6k/35.6k [00:00<00:00, 84.3kB/s]
Downloading data files: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.93s/it]
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "G:/abc/temp.py", line 32, in <module>
beam_runner='DirectRunner')
File "G:\Python3.7\lib\site-packages\datasets\load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "G:\Python3.7\lib\site-packages\datasets\builder.py", line 1394, in _download_and_prepare
pipeline_results = pipeline.run()
File "G:\Python3.7\lib\site-packages\apache_beam\pipeline.py", line 574, in run
return self.runner.run_pipeline(self, self._options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 131, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 201, in run_pipeline
options)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 212, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 443, in run_stages
runner_execution_context, bundle_context_manager, bundle_input)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 776, in _execute_bundle
bundle_manager))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1000, in _run_bundle
data_input, data_output, input_timers, expected_timer_output)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\fn_runner.py", line 1309, in process_bundle
result_future = self._worker_handler.control_conn.push(process_bundle_req)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\portability\fn_api_runner\worker_handlers.py", line 380, in push
response = self.worker.do_instruction(request)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 598, in do_instruction
getattr(request, request_type), request.instruction_id)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 635, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 1004, in process_bundle
element.data)
File "G:\Python3.7\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 227, in process_encoded
self.output(decoded_value)
File "apache_beam\runners\worker\operations.py", line 526, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 528, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam\runners\worker\operations.py", line 237, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 324, in apache_beam.runners.worker.operations.GeneralPurposeConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 905, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 623, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1491, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1581, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "apache_beam\runners\common.py", line 1694, in apache_beam.runners.common._OutputHandler._write_value_to_tag
File "apache_beam\runners\worker\operations.py", line 240, in apache_beam.runners.worker.operations.SingletonElementConsumerSet.receive
File "apache_beam\runners\worker\operations.py", line 907, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\worker\operations.py", line 908, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam\runners\common.py", line 1419, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 1507, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1417, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam\runners\common.py", line 837, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam\runners\common.py", line 981, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "apache_beam\runners\common.py", line 1571, in apache_beam.runners.common._OutputHandler.handle_process_outputs
File "G:\Python3.7\lib\site-packages\apache_beam\io\iobase.py", line 1193, in process
self.writer = self.sink.open_writer(init_result, str(uuid.uuid4()))
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 202, in open_writer
return FileBasedSinkWriter(self, writer_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 419, in __init__
self.temp_handle = self.sink.open(temp_shard_path)
File "G:\Python3.7\lib\site-packages\apache_beam\io\parquetio.py", line 553, in open
self._file_handle = super().open(temp_path)
File "G:\Python3.7\lib\site-packages\apache_beam\options\value_provider.py", line 193, in _f
return fnc(self, *args, **kwargs)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filebasedsink.py", line 139, in open
temp_path, self.mime_type, self.compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\filesystems.py", line 224, in create
return filesystem.create(path, mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 163, in create
return self._path_open(path, 'wb', mime_type, compression_type)
File "G:\Python3.7\lib\site-packages\apache_beam\io\localfilesystem.py", line 140, in _path_open
raw_file = io.open(path, mode)
RuntimeError: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Shilpa\\.cache\\huggingface\\datasets\\wikipedia\\20220401.aa-date=20220401,language=aa\\2.0.0\\aa542ed919df55cc5d3347f42dd4521d05ca68751f50dbc32bae2a7f1e167559.incomplete\\beam-temp-wikipedia-train-880233e8287e11edaf9d3ca067f2714e\\20a05238-6106-4420-a713-4eca6dd5959a.wikipedia-train' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
## Environment info
Python: 3.7.6
Windows 10 Pro
datasets :2.4.0
apache_beam: 2.41.0
mwparserfromhell: 0.6.4
I am able to start downloading the dataset when trying anything with the recent dumps for 20221201. But obviously, those are the big wiki dumps and I need the smaller preloaded version.
I am now getting some error when the files show up in my cache but it will say FileNotFoundError at the end of the download for some reason. The cache directory to the datasets\wikipedia\date.bn\ had something in it, then when the error came up it disappeared.
It is easy to test with the langauge "bn" because the amount of files is low.
dataset = load_dataset('wikipedia', date="20221201", language="bn", split='train', beam_runner='DirectRunner') | [
-0.22171072661876678,
0.12476305663585663,
0.02336561307311058,
0.48378026485443115,
0.13305407762527466,
0.10554274171590805,
0.20086951553821564,
0.45038512349128723,
0.2548263669013977,
0.011655345559120178,
0.13270814716815948,
-0.09619120508432388,
0.08483631908893585,
-0.17022106051445007,
0.011670746840536594,
-0.19725127518177032,
0.06492558121681213,
-0.03742077946662903,
-0.011086598038673401,
-0.038156915456056595,
-0.34822356700897217,
0.1775761842727661,
-0.4111486077308655,
-0.1026601642370224,
-0.19150716066360474,
0.2309858202934265,
-0.10011617094278336,
0.09472022205591202,
-0.05143412947654724,
-0.11741678416728973,
0.4395785927772522,
-0.07478615641593933,
0.15988770127296448,
0.5133364200592041,
-0.00011308470129733905,
0.18318946659564972,
0.5690590739250183,
-0.20095062255859375,
-0.2633975148200989,
-0.40959423780441284,
-0.15942013263702393,
-0.21729452908039093,
-0.15482325851917267,
-0.30679717659950256,
-0.04988474026322365,
-0.027535632252693176,
0.29515722393989563,
-0.18309836089611053,
0.16675366461277008,
0.15276823937892914,
0.16118718683719635,
-0.15061362087726593,
0.33606022596359253,
-0.013974593952298164,
0.34716570377349854,
0.12006166577339172,
-0.023212648928165436,
0.17357560992240906,
-0.2269643247127533,
-0.10142948478460312,
-0.023755840957164764,
0.28021103143692017,
-0.26159876585006714,
0.03637336567044258,
0.2406981885433197,
-0.05447060614824295,
-0.1648940145969391,
-0.44164010882377625,
0.19789651036262512,
0.609778106212616,
0.8613625764846802,
-0.1297958791255951,
-0.32368960976600647,
-0.0708402767777443,
-0.06058453768491745,
0.02708602137863636,
0.3061339259147644,
0.291085422039032,
-0.1668315827846527,
-0.006340425461530685,
0.24467740952968597,
-0.1327696591615677,
-0.18863652646541595,
0.4577963352203369,
-0.21116618812084198,
0.39715251326560974,
-0.02255900576710701,
0.12399867922067642,
0.023670122027397156,
-0.23234276473522186,
-0.36747464537620544,
-0.36149656772613525,
-0.09949536621570587,
0.31997087597846985,
-0.2158997803926468,
0.03621073067188263,
0.09379129856824875,
0.07101254165172577,
0.30202949047088623,
-0.1365843266248703,
-0.17420430481433868,
-0.03386496752500534,
-0.16302013397216797,
0.08848437666893005,
0.2397523671388626,
-0.04819348454475403,
0.005659736692905426,
0.054201893508434296,
0.35276174545288086,
0.2269487828016281,
-0.1664007157087326,
-0.008084934204816818,
0.15602055191993713,
-0.23194731771945953,
-0.26011040806770325,
-0.008652938529849052,
0.4535675644874573,
-0.2311086505651474,
-0.25067946314811707,
0.15954738855361938,
-0.4669244885444641,
-0.18300800025463104,
-0.19664636254310608,
0.26687169075012207,
-0.22714537382125854,
0.21381023526191711,
0.21608446538448334,
0.31718599796295166,
-0.18571941554546356,
-0.20768781006336212,
-0.08275619149208069,
0.13227568566799164,
-0.13607096672058105,
0.06563200801610947,
0.37410685420036316,
-0.041268277913331985,
0.1544419378042221,
0.12337353080511093,
-0.12656334042549133,
0.0365179181098938,
-0.01045915950089693,
-0.30886930227279663,
-0.14472582936286926,
0.1546580195426941,
0.0586872361600399,
0.2878184914588928,
0.178974449634552,
-0.20398683845996857,
-0.03191808983683586,
0.12011071294546127,
-0.2136951982975006,
0.15481361746788025,
-0.20472076535224915,
0.15492509305477142,
-0.3297719955444336,
-0.0521545484662056,
-0.06672560423612595,
0.2685335874557495,
-0.19272568821907043,
-0.29498550295829773,
0.09827052056789398,
-0.009325377643108368,
-0.1986023336648941,
-0.1903703212738037,
0.30784139037132263,
0.8935926556587219,
-0.3268110752105713,
0.05501291900873184,
-0.07983162999153137,
-0.17165781557559967,
0.23141583800315857,
0.041644345968961716,
-0.0389750711619854,
0.32771554589271545,
-0.33727556467056274,
0.3739275336265564,
0.5122525095939636,
-0.37038522958755493,
-0.40343257784843445,
0.21477177739143372,
0.0026316121220588684,
0.3005979061126709,
0.09817059338092804,
0.03143656253814697,
0.07972748577594757,
0.029476555064320564,
0.04734398424625397,
0.2251911461353302,
0.046780288219451904,
0.038330622017383575,
-0.38288116455078125,
-0.21801595389842987,
0.40861743688583374,
0.3061091899871826,
0.1814163774251938,
0.01970873773097992,
0.291897177696228,
0.5705388784408569,
0.32744139432907104,
-0.09885428845882416,
0.07288805395364761,
0.28501200675964355,
-0.00265706330537796,
0.12118980288505554,
0.026708263903856277,
0.00941786915063858,
-0.6081057190895081,
0.25405386090278625,
0.0940745547413826,
0.03629598394036293,
-0.07090795040130615,
-0.033254850655794144,
-0.19663211703300476,
-0.28451162576675415,
-0.3861035704612732,
-0.18630650639533997,
0.1625181883573532,
0.1477409154176712,
-0.030680257827043533,
0.4093533754348755,
0.0197143517434597,
0.29104170203208923,
-0.17768892645835876,
0.04610640928149223,
-0.23103350400924683,
0.30396804213523865,
0.01166931726038456,
-0.0676044374704361,
-0.030566683039069176,
-0.01054268330335617,
0.22472211718559265,
-0.05167469009757042,
-0.0978923887014389,
0.12835143506526947,
0.23184120655059814,
0.018071867525577545,
0.10003431141376495,
-0.25669264793395996,
0.22530752420425415,
-0.22306232154369354,
0.04840165376663208,
0.3784569799900055,
0.23317693173885345,
-0.12640254199504852,
-0.17320480942726135,
0.13654837012290955,
-0.01552906259894371,
0.12641912698745728,
-0.059593722224235535,
-0.0752299502491951,
0.22724014520645142,
-0.11344616115093231,
-0.02610757201910019,
-0.016864247620105743,
0.3546002209186554,
0.2586793601512909,
0.09871162474155426,
-0.019677801057696342,
-0.3421553373336792,
-0.28212329745292664,
0.49639129638671875,
0.06860487163066864,
0.04725400730967522,
0.08523812890052795,
-0.2379162609577179,
0.04527612030506134,
0.06784706562757492,
0.11155852675437927,
0.2883845567703247,
0.09120650589466095,
-0.0705844908952713,
0.09831847250461578,
0.12734371423721313,
-0.012005938217043877,
0.14765474200248718,
0.06085718795657158,
0.3641892075538635,
0.36770206689834595,
-0.19778695702552795,
0.23690584301948547,
-0.1757003664970398,
-0.31807708740234375,
-0.2121324986219406,
0.19570833444595337,
-0.25921496748924255,
0.0025529563426971436,
-0.19497127830982208,
-0.4630076587200165,
-0.1903553456068039,
-0.022469446063041687,
-0.3731136918067932,
-0.30708587169647217,
-0.28688859939575195,
0.21443256735801697,
-0.12454934418201447,
0.02590414136648178,
-0.36862823367118835,
-0.2379274219274521,
0.07455248385667801,
-0.575444221496582,
-0.239584282040596,
-0.2474687546491623,
-0.30401626229286194,
0.04506472125649452,
0.5138823986053467,
0.028052909299731255,
0.10156313329935074,
-0.24942564964294434,
-0.09859367460012436,
-0.2565158009529114,
-0.23071101307868958,
0.09981079399585724,
-0.13496904075145721,
0.08676353842020035,
-0.056143537163734436,
0.539704442024231,
-0.2296752780675888,
-0.11914054304361343,
0.10419343411922455,
0.10818947851657867,
-0.1636137217283249,
0.27373266220092773,
-0.022284571081399918,
0.16379040479660034,
-0.07679371535778046,
-0.43569597601890564,
-0.22623498737812042,
-0.3360927999019623,
-0.04107706993818283,
0.06284631788730621,
-0.11908254027366638,
0.32308098673820496,
0.10165993124246597,
0.17081966996192932,
-0.04257465526461601,
0.059082046151161194,
-0.097420334815979,
-0.03681594505906105,
0.5346088409423828,
-0.06348986178636551,
-0.32163992524147034,
0.39529281854629517,
-0.16300515830516815,
-0.023099709302186966,
0.23557645082473755,
-0.4582493305206299,
0.11028213798999786,
0.11516988277435303,
0.21444275975227356,
-0.03238043934106827,
0.003922933712601662,
0.18457576632499695,
-0.32589033246040344,
0.12293130159378052,
-0.0643097385764122,
0.12454353272914886,
-0.10335236042737961,
-0.2534092962741852,
0.3826821744441986,
-0.013660799711942673,
0.1762695610523224,
0.03588228300213814,
0.7409828305244446,
0.24801957607269287,
0.13859358429908752,
0.4848823845386505,
0.022473935037851334,
0.2724514901638031,
-0.1959397792816162,
-0.15923158824443817,
0.005109096877276897,
0.1287681758403778,
0.04060196876525879,
0.14442913234233856,
-0.21482768654823303,
-0.2568712532520294,
-0.4483228921890259,
-0.12181961536407471,
-0.43516403436660767,
-0.38460594415664673,
-0.0028314832597970963,
0.05227705091238022,
0.038049064576625824,
0.05070200935006142,
0.20404917001724243,
0.25836482644081116,
-0.28639721870422363,
0.11647632718086243,
0.5629981756210327,
0.05412668362259865,
0.08031768351793289,
0.14821313321590424,
-0.06699475646018982,
-0.24681654572486877,
0.2685866951942444,
0.21703864634037018,
0.1613803654909134,
-0.10032211244106293,
-0.1382523477077484,
-0.12060758471488953,
-0.008679507300257683,
0.4951835870742798,
-0.20087090134620667,
0.03371637314558029,
0.2326715588569641,
0.1023746132850647,
-0.3569141626358032,
-0.1368982493877411,
-0.1268162578344345,
0.26286643743515015,
0.27049511671066284,
0.10836157202720642,
-0.4682171046733856,
-0.10303028672933578,
0.25016993284225464,
0.4589453637599945,
0.03530994430184364,
-0.14459307491779327,
-0.28996819257736206,
-0.18044182658195496,
-0.2432848960161209,
-0.1136963739991188,
-0.06357300281524658,
0.45438897609710693,
0.008367958478629589,
0.2700497508049011,
-0.22754009068012238,
0.1905943751335144,
-0.025074541568756104,
0.05076611414551735,
0.3920290172100067,
0.0958477333188057,
0.07574233412742615,
0.12285532802343369,
0.02842429094016552,
-0.002360191196203232,
0.3538907468318939,
0.3265068829059601,
-0.5151554346084595,
-0.07385101914405823,
-0.22678114473819733,
-0.3625333309173584,
0.07047893851995468,
0.0011671488173305988,
-0.09548894315958023,
-0.016665883362293243,
-0.14039131999015808,
0.008191595785319805,
-0.064426951110363,
0.22526678442955017,
-0.14972372353076935,
-0.45098116993904114,
-0.29682043194770813,
0.5810693502426147,
0.022138342261314392,
0.13674810528755188,
0.4095936119556427,
0.07326466590166092,
-0.29480239748954773,
0.16376319527626038,
-0.11217742413282394,
0.7027193903923035,
0.10972356796264648,
0.20207175612449646,
0.21881482005119324,
0.24162335693836212,
0.5957309603691101,
-0.27523159980773926,
0.0874643325805664,
-0.3753160238265991,
-0.03234172239899635,
-0.1554975062608719,
0.06607580184936523,
0.18941745162010193,
-0.025800831615924835,
-0.29185232520103455,
0.4276096522808075,
0.1369432657957077,
0.1958428919315338,
-0.06851650029420853,
0.21588236093521118,
-0.10563763231039047,
-0.042672038078308105,
-0.21969345211982727,
0.08496544510126114,
-0.1836397647857666,
0.5982843637466431,
-0.21740809082984924,
-0.135406956076622,
-0.2979982793331146,
-0.09154488146305084,
-0.42623019218444824,
0.28831130266189575,
-0.36813727021217346,
0.15228962898254395,
-0.18379198014736176,
-0.24381513893604279,
0.09102261066436768,
0.46624669432640076,
0.05019838362932205,
0.10240897536277771,
-0.40888988971710205,
0.12928691506385803,
-0.3434286415576935,
-0.15308290719985962,
0.009635292924940586,
-0.05725954845547676,
0.35280323028564453,
-0.07402481138706207,
-0.34969139099121094,
-0.018067777156829834,
-0.16212879121303558,
-0.1092412993311882,
0.06898187100887299,
-0.024689234793186188,
-0.05692022293806076,
0.021454213187098503,
-0.33657145500183105,
0.1678178906440735,
-0.01070217415690422,
0.039639707654714584,
0.14484815299510956,
0.012743577361106873,
0.04019545391201973,
-0.03584253787994385,
0.06264521926641464,
-0.33776038885116577,
0.0674138069152832,
0.4822019934654236,
-0.11890523880720139,
0.02100418135523796,
0.4799343943595886,
0.1906910389661789,
-0.2559366822242737,
-0.2120315432548523,
0.2095663845539093,
-0.39132755994796753,
-0.3344636559486389,
-0.1470957249403,
0.060144856572151184,
0.6185194849967957,
-0.1738620549440384,
0.06607972830533981,
0.08619008958339691,
-0.27221110463142395,
0.2807510793209076,
-0.4820563793182373,
0.04044675827026367,
0.2654450237751007,
-0.1824265569448471,
-0.01638754829764366,
0.18681380152702332,
-0.23151008784770966,
0.4170709252357483,
-0.461565762758255,
-0.22987794876098633,
0.019035648554563522,
-0.11426591873168945,
0.04232417792081833,
0.3851112127304077,
0.2444741427898407,
0.10767529904842377,
-0.07070449739694595,
0.1327887624502182,
-0.05794883519411087,
-0.08322114497423172,
-0.22339552640914917,
-0.08968771994113922,
0.16574938595294952,
0.20555680990219116,
-0.04214107245206833,
0.05585164949297905,
-0.3673812747001648,
0.05415809527039528,
-0.04526686668395996,
-0.01628231257200241,
0.033830419182777405,
-0.13952530920505524,
0.34012940526008606,
0.0480574294924736,
0.3712290823459625,
-0.46952706575393677,
0.30328476428985596,
-0.023521997034549713,
0.43515098094940186,
0.013286847621202469,
0.228879913687706,
0.3088289499282837,
0.07982045412063599,
-0.4147563874721527,
-0.02587004005908966,
-0.34353238344192505,
0.05905463546514511,
0.12613829970359802,
-0.30803924798965454,
0.2850106656551361,
0.1268036663532257,
0.0008838959038257599,
0.40937289595603943,
-0.28311169147491455,
0.01046675257384777,
0.2350481152534485,
0.2123337984085083,
-0.2183549553155899,
0.23433350026607513,
0.7044737339019775,
0.03946312516927719,
-0.06359389424324036,
0.024102889001369476,
-0.07527802884578705,
-0.02549716830253601,
0.10504235327243805,
0.14828819036483765,
0.09824047982692719,
-0.08216772973537445,
0.38690781593322754,
0.4368690848350525,
0.06846827268600464,
0.31430014967918396,
0.004325494170188904,
0.11657984554767609,
-0.009466215968132019,
0.5320107340812683,
-0.0987352803349495,
0.11978624016046524,
-0.26756832003593445,
-0.08632765710353851,
-0.29432159662246704,
-0.43641865253448486,
0.2064095139503479,
0.33982497453689575,
-0.22468742728233337,
0.1606285721063614,
-0.040925100445747375,
0.04252225160598755,
0.08332934975624084,
0.052679166197776794,
-0.22351011633872986,
-0.06681033968925476,
-0.15147143602371216,
0.09301556646823883,
-0.2981915771961212,
-0.3095695376396179,
-0.06662433594465256,
0.16697926819324493,
0.007441982626914978,
-0.16483187675476074,
-0.030354663729667664,
0.417306125164032,
-0.27568501234054565,
-0.2563863694667816,
0.5147449970245361,
0.029435403645038605,
0.13583087921142578,
-0.2365862876176834,
-0.12322082370519638,
0.0945410504937172,
0.04226689040660858,
0.04341963678598404,
0.3437650203704834,
0.3731147348880768,
0.34390461444854736,
-0.4302558898925781,
-0.14595454931259155,
0.1627374142408371,
-0.037211257964372635,
-0.0025414731353521347,
0.09125087410211563,
-0.020830363035202026,
-0.062411244958639145,
0.3992863595485687,
0.15917712450027466,
-0.12675131857395172,
0.16631969809532166,
0.21965794265270233,
0.10909472405910492,
-0.3026357889175415,
-0.10869766026735306,
-0.30538761615753174,
0.26248523592948914,
-0.2851128876209259,
-0.049518220126628876,
-0.30523771047592163,
0.19323107600212097,
0.17760726809501648,
0.33776071667671204,
0.12174547463655472,
-0.09881381690502167,
0.033058471977710724,
-0.004167189821600914,
0.12083964049816132,
0.35445207357406616,
0.10216408967971802,
-0.3270568251609802,
-0.0004438832402229309,
-0.7650599479675293,
0.13783514499664307,
-0.16814664006233215,
-0.016868408769369125,
-0.1098429411649704,
0.328339159488678,
-0.2197895646095276,
0.27246561646461487,
0.09657267481088638,
-0.06403931975364685,
0.1835152953863144,
0.4634952247142792,
-0.1583319753408432,
-0.36348819732666016,
-0.17234256863594055,
-0.054561734199523926,
-0.26700830459594727,
-0.49851521849632263,
0.055147118866443634,
-0.32884109020233154,
0.03434132784605026,
-0.13427254557609558,
-0.265987366437912,
0.11085344851016998,
0.0066412389278411865,
0.35442885756492615,
-0.03945837914943695,
0.4598005414009094,
-0.09165333211421967,
-0.1288861781358719,
-0.28551849722862244,
-0.0585394985973835,
-0.08255884796380997,
0.20577818155288696,
-0.13068756461143494,
0.40400779247283936,
-0.03608329966664314,
0.020725540816783905,
-0.26718735694885254,
0.43974390625953674,
-0.08580873161554337,
0.2284308671951294,
-0.29260316491127014,
-0.0842902809381485,
0.056740038096904755,
0.0434817411005497,
-0.16588711738586426,
0.11521842330694199,
-0.2549753487110138,
0.09350203722715378,
-0.4043484330177307,
-0.2058277130126953,
0.1685027927160263,
-0.5642949342727661,
-0.20389918982982635,
-0.0926964208483696,
0.032639697194099426,
0.0032537803053855896,
0.005150794051587582,
-0.2986008822917938,
0.344370037317276,
0.3983898460865021,
-0.031239308416843414,
-0.17281615734100342,
-0.04685515537858009,
-0.02395515888929367,
-0.001215565949678421,
-0.03556507080793381,
-0.12497833371162415,
0.11707896739244461,
-0.23570407927036285,
0.16476722061634064,
-0.2442268282175064
] |
https://github.com/huggingface/datasets/issues/4912 | datasets map() handles all data at a stroke and takes long time | Hi ! Interesting question ;)
> Which is better? Process in map() or in data-collator
As you said, both can be used in practice: map() if you want to preprocess before training, or a data-collator (or the equivalent `dataset.set_transform`) if you want to preprocess on-the-fly during training. Both options are great and really depend on your case.
To choose between the two, here are IMO the main caveats of each approach:
- if your preprocessing takes too much CPU for example, using a data-collator may slow down your training and your GPUs may not work at full speed
- on the other hand, map() may take a lot of time and disk space to run if your dataset is too big.
> Why huggingface advises map() function? There should be some advantages to using map()
To get the best throughput when training a model, it is often recommended to preprocess your dataset before training. Note that preprocessing may include other steps before tokenization such as data filtering, cleaning, chunking etc. which are often done before training. | **1. Background**
Huggingface datasets package advises using `map()` to process data in batches. In the example code on pretraining masked language model, they use `map()` to tokenize all data at a stroke before the train loop.
The corresponding code:
```
with accelerator.main_process_first():
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
desc="Running tokenizer on every text in dataset"
)
```
**2. The problem**
Thus, when I try the same pertaining code with a much larger corpus, it takes quite a long time to tokenize.
Also, we can choose to tokenize data in `data-collator`. In this way, the program only tokenizes one batch in the next training step and avoids getting stuck in tokenization.
**3. My question**
As described above, my questions are:
* **Which is better? Process in `map()` or in `data-collator`**
* **Why huggingface advises `map()` function?** There should be some advantages to using `map()`
Thanks for your answers! | 176 | datasets map() handles all data at a stroke and takes long time
**1. Background**
Huggingface datasets package advises using `map()` to process data in batches. In the example code on pretraining masked language model, they use `map()` to tokenize all data at a stroke before the train loop.
The corresponding code:
```
with accelerator.main_process_first():
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
desc="Running tokenizer on every text in dataset"
)
```
**2. The problem**
Thus, when I try the same pertaining code with a much larger corpus, it takes quite a long time to tokenize.
Also, we can choose to tokenize data in `data-collator`. In this way, the program only tokenizes one batch in the next training step and avoids getting stuck in tokenization.
**3. My question**
As described above, my questions are:
* **Which is better? Process in `map()` or in `data-collator`**
* **Why huggingface advises `map()` function?** There should be some advantages to using `map()`
Thanks for your answers!
Hi ! Interesting question ;)
> Which is better? Process in map() or in data-collator
As you said, both can be used in practice: map() if you want to preprocess before training, or a data-collator (or the equivalent `dataset.set_transform`) if you want to preprocess on-the-fly during training. Both options are great and really depend on your case.
To choose between the two, here are IMO the main caveats of each approach:
- if your preprocessing takes too much CPU for example, using a data-collator may slow down your training and your GPUs may not work at full speed
- on the other hand, map() may take a lot of time and disk space to run if your dataset is too big.
> Why huggingface advises map() function? There should be some advantages to using map()
To get the best throughput when training a model, it is often recommended to preprocess your dataset before training. Note that preprocessing may include other steps before tokenization such as data filtering, cleaning, chunking etc. which are often done before training. | [
-0.2952665388584137,
-0.522647500038147,
-0.07783889770507812,
0.04403214901685715,
-0.11448338627815247,
-0.17057329416275024,
0.3225848972797394,
0.017310161143541336,
-0.09668047726154327,
0.11515972018241882,
0.13637949526309967,
0.005903640761971474,
-0.05924689769744873,
0.1156558021903038,
0.18164703249931335,
-0.09054984152317047,
0.38569796085357666,
-0.1255021095275879,
0.13806284964084625,
0.10619457066059113,
-0.37314391136169434,
-0.22144325077533722,
-0.31890085339546204,
0.009190045297145844,
-0.2512803375720978,
-0.26761120557785034,
-0.20353016257286072,
-0.23335403203964233,
-0.21992340683937073,
-0.33590570092201233,
-0.10887275636196136,
0.27040112018585205,
0.3328835368156433,
0.5998773574829102,
-0.00012243789387866855,
-0.1549331694841385,
0.06649995595216751,
0.21270646154880524,
0.044801004230976105,
-0.16278569400310516,
0.07941723614931107,
-0.34420666098594666,
0.00977170467376709,
-0.21711117029190063,
0.13060292601585388,
-0.08277207612991333,
0.26089268922805786,
-0.34549665451049805,
0.345761239528656,
-0.14621445536613464,
0.05020841956138611,
0.3066489100456238,
-0.37373995780944824,
0.1700826734304428,
-0.0741083100438118,
0.16669052839279175,
-0.027883658185601234,
0.14388710260391235,
0.3097088634967804,
-0.0061194077134132385,
-0.11892137676477432,
0.33993035554885864,
-0.24215072393417358,
-0.33429819345474243,
0.45522451400756836,
0.08331748843193054,
0.12092025578022003,
-0.5534158945083618,
0.02820098027586937,
0.04100295901298523,
0.03894668444991112,
-0.13217315077781677,
-0.34417006373405457,
-0.2727528214454651,
-0.20218056440353394,
-0.16654746234416962,
0.006045036017894745,
0.17879942059516907,
0.23750892281532288,
0.09497261792421341,
-0.4763837456703186,
0.07986896485090256,
0.23602980375289917,
0.002913177013397217,
-0.18194979429244995,
0.13136909902095795,
-0.2044311761856079,
0.34774690866470337,
0.24545469880104065,
-0.0797119140625,
0.06646174192428589,
-0.5454676151275635,
0.13043805956840515,
0.41617506742477417,
-0.3443466126918793,
-0.08449827134609222,
-0.10892447084188461,
0.09840427339076996,
0.0501808226108551,
0.07576604932546616,
-0.11590765416622162,
0.189549058675766,
0.2765190005302429,
-0.01667015254497528,
0.2578706741333008,
0.08864735066890717,
0.40007057785987854,
0.03411516174674034,
0.07800941169261932,
-0.37866875529289246,
-0.05793428793549538,
-0.1383703649044037,
-0.18918180465698242,
0.02896023541688919,
-0.22448448836803436,
-0.007734380662441254,
-0.28445571660995483,
0.045187611132860184,
0.23716232180595398,
-0.024727459996938705,
-0.2934706211090088,
-0.3218704164028168,
0.08853360265493393,
0.33731064200401306,
-0.11365369707345963,
0.15824764966964722,
-0.15120570361614227,
-0.04827962815761566,
0.1901787668466568,
0.029541686177253723,
-0.044341109693050385,
-0.21001578867435455,
-0.2764698266983032,
0.22945110499858856,
-0.1929483860731125,
-0.15996816754341125,
0.1594492793083191,
0.120444156229496,
-0.07228110730648041,
-0.07081340253353119,
0.20433416962623596,
-0.6299593448638916,
0.3547789454460144,
-0.04409212991595268,
-0.11795711517333984,
0.48021528124809265,
-0.04048391059041023,
0.2854219079017639,
-0.1576853096485138,
0.24458983540534973,
-0.20682057738304138,
-0.22119662165641785,
0.6299672722816467,
-0.014141705818474293,
0.16318081319332123,
0.27310997247695923,
-0.4043583571910858,
0.426861435174942,
0.09036635607481003,
-0.0601862370967865,
0.03357074409723282,
-0.11142538487911224,
-0.37040844559669495,
-0.2945455014705658,
0.28728485107421875,
-0.009795933961868286,
0.16503988206386566,
0.053443439304828644,
0.23781932890415192,
0.10305261611938477,
0.4100326895713806,
0.38267120718955994,
-0.3601169288158417,
0.4603744149208069,
-0.003607019782066345,
0.2253422886133194,
0.26234185695648193,
-0.3944316804409027,
-0.1568954437971115,
0.4781910181045532,
0.017136000096797943,
0.07679340988397598,
-0.0991615578532219,
0.01884256675839424,
0.36028853058815,
-0.09343213587999344,
0.2173338085412979,
0.10228453576564789,
0.04889889061450958,
0.21596287190914154,
-0.051241178065538406,
0.07943733781576157,
0.6005848050117493,
-0.05273386463522911,
-0.17875370383262634,
0.056170955300331116,
-0.21017733216285706,
-0.12688791751861572,
0.011596206575632095,
0.09958752989768982,
0.019507363438606262,
0.07733336836099625,
-0.1470174342393875,
-0.03983176499605179,
-0.2639816701412201,
0.048148274421691895,
-0.32244259119033813,
-0.04357125982642174,
0.02921532467007637,
0.02913166768848896,
-0.10917611420154572,
-0.21557961404323578,
0.3485323488712311,
0.19453397393226624,
0.20378369092941284,
-0.10065314173698425,
-0.14087963104248047,
-0.028410620987415314,
0.2089226096868515,
-0.020024094730615616,
-0.27835822105407715,
0.20887675881385803,
-0.1253814697265625,
0.22287560999393463,
0.02228870615363121,
-0.2070712298154831,
0.17197701334953308,
0.012761805206537247,
-0.19721265137195587,
-0.030220545828342438,
-0.007094457745552063,
-0.29006868600845337,
0.10822538286447525,
0.42743879556655884,
0.04988444596529007,
-0.029074162244796753,
-0.34279829263687134,
0.1974027305841446,
0.4688797891139984,
0.17915776371955872,
-0.11213492602109909,
-0.32850492000579834,
0.2329157143831253,
-0.11970023810863495,
0.13430818915367126,
0.32998669147491455,
0.23552608489990234,
0.4677203595638275,
0.03195971995592117,
-0.2607429325580597,
-0.3040715157985687,
0.2013227343559265,
-0.2329421490430832,
0.1334756463766098,
-0.06252540647983551,
0.2581266164779663,
0.5705339312553406,
0.3959510624408722,
-0.15799087285995483,
-0.08594555407762527,
0.5557286739349365,
-0.25614428520202637,
-0.2336045503616333,
0.037046823650598526,
-0.306894987821579,
-0.1621355414390564,
0.24904654920101166,
-0.18077844381332397,
0.24624058604240417,
-0.05974729731678963,
0.012242067605257034,
-0.09327469766139984,
0.20173552632331848,
0.14017072319984436,
0.17858104407787323,
0.2592352628707886,
0.08987881988286972,
-0.26073890924453735,
-0.06564858555793762,
0.19812853634357452,
0.06527740508317947,
-0.059484921395778656,
-0.05566329509019852,
-0.023961475118994713,
0.08099943399429321,
-0.046472057700157166,
-0.17861652374267578,
-0.18811577558517456,
-0.013952202163636684,
-0.011208836920559406,
-0.22213315963745117,
0.0938674733042717,
-0.28126317262649536,
-0.1869816929101944,
-0.00885668583214283,
0.05256053805351257,
0.2743838131427765,
0.28547751903533936,
-0.29508477449417114,
-0.15487167239189148,
-0.02216729149222374,
-0.15540869534015656,
-0.005725745111703873,
-0.10581181943416595,
0.14248642325401306,
-0.15857261419296265,
0.1479911208152771,
-0.09005783498287201,
0.007630061358213425,
-0.13376784324645996,
-0.26361632347106934,
0.14963580667972565,
-0.2702168822288513,
-0.02548203431069851,
-0.09267748892307281,
0.013592325150966644,
-0.6715518236160278,
-0.21070429682731628,
0.18249939382076263,
-0.28033262491226196,
-0.16823944449424744,
-0.24366465210914612,
0.09401636570692062,
-0.2297295480966568,
0.006837829947471619,
0.16048948466777802,
-0.26147398352622986,
-0.1850653886795044,
0.3966735601425171,
-0.13680775463581085,
0.03455165773630142,
-0.34436511993408203,
-0.2455345243215561,
-0.03836986422538757,
-0.39333006739616394,
0.13131044805049896,
0.119541697204113,
-0.4533933103084564,
0.08828385919332504,
-0.035413701087236404,
-0.19754551351070404,
-0.23227965831756592,
0.045378319919109344,
-0.1984538435935974,
0.5766262412071228,
-0.2688775658607483,
0.06034175679087639,
-0.22068184614181519,
0.14546367526054382,
0.056069888174533844,
0.17575636506080627,
0.2124946564435959,
0.05350595712661743,
0.10958300530910492,
0.11385319381952286,
-0.3288002908229828,
-0.0037612691521644592,
0.09145013242959976,
0.1452527642250061,
0.47421813011169434,
0.5182746648788452,
0.025620263069868088,
0.7126694917678833,
0.22451305389404297,
-0.374561607837677,
-0.09996601939201355,
0.14874640107154846,
0.0010276921093463898,
-0.31335970759391785,
-0.2301214039325714,
0.26681363582611084,
-0.07232031226158142,
0.16558973491191864,
0.4134563207626343,
-0.16148582100868225,
-0.027363715693354607,
-0.15668591856956482,
-0.11620829999446869,
-0.2424144148826599,
-0.1613551676273346,
0.2823880910873413,
0.09270697832107544,
0.6815701723098755,
0.07250753045082092,
0.06008172035217285,
-0.020927712321281433,
0.01189844124019146,
0.11554566025733948,
0.11616408079862595,
0.4102461338043213,
0.04284016788005829,
-0.6807010769844055,
0.2122325748205185,
-0.7263909578323364,
0.23202191293239594,
0.12325785309076309,
0.2955664098262787,
0.026031088083982468,
-0.15514256060123444,
0.12445671111345291,
-0.05961724743247032,
0.6135526299476624,
0.026594514027237892,
-0.5379971861839294,
-0.4122846722602844,
-0.6001721620559692,
-0.39813968539237976,
0.2726724147796631,
-0.15199574828147888,
0.36757928133010864,
0.21083538234233856,
0.7063646912574768,
-0.313458114862442,
-0.3682956099510193,
-0.23002132773399353,
0.31862038373947144,
0.07011744379997253,
-0.10103649646043777,
-0.04031353443861008,
0.038350917398929596,
-0.3906596004962921,
0.1538039594888687,
0.12072325497865677,
0.008241236209869385,
0.3949083685874939,
-0.013117512688040733,
-0.06927335262298584,
0.12920764088630676,
0.16433727741241455,
0.12274806201457977,
0.15759971737861633,
0.047441430389881134,
0.2840344309806824,
0.32275721430778503,
0.3162442147731781,
0.21696029603481293,
-0.08474372327327728,
-0.22004562616348267,
-0.15251590311527252,
0.134912371635437,
0.13234911859035492,
0.7080832123756409,
0.38308531045913696,
0.01957499235868454,
0.31579458713531494,
0.10187800228595734,
0.09152868390083313,
-0.591482937335968,
0.2337556928396225,
0.30509188771247864,
0.3900371193885803,
-0.6457524299621582,
-0.456387996673584,
-0.07184214144945145,
0.41439443826675415,
-0.23484624922275543,
0.16379445791244507,
-0.22107242047786713,
-0.17437967658042908,
0.43706607818603516,
0.13892211019992828,
1.2113893032073975,
-0.20820508897304535,
0.29483553767204285,
-0.18650349974632263,
0.26360636949539185,
0.30668702721595764,
-0.3209690451622009,
0.035771340131759644,
-0.2724859416484833,
-0.26496437191963196,
-0.016267085447907448,
-0.24190524220466614,
0.21758422255516052,
0.45161086320877075,
-0.02819729410111904,
0.15495355427265167,
0.310525119304657,
0.42077094316482544,
-0.2021000236272812,
0.18602031469345093,
0.32403743267059326,
-0.48818710446357727,
-0.039251670241355896,
-0.0131930410861969,
0.03354176878929138,
0.1014203429222107,
-0.16826656460762024,
0.1972944438457489,
-0.04438161849975586,
-0.13547450304031372,
0.2854275107383728,
-0.25067204236984253,
-0.6794431805610657,
0.0459873229265213,
0.013023506850004196,
-0.19894158840179443,
0.2309826910495758,
0.11600597202777863,
0.19473639130592346,
0.32441943883895874,
0.35573580861091614,
0.0377473346889019,
0.2795141041278839,
0.21820755302906036,
-0.01649600639939308,
-0.2978364825248718,
0.00003061816096305847,
-0.013924118131399155,
0.29692065715789795,
-0.033423274755477905,
-0.22679881751537323,
-0.13776059448719025,
-0.2565993666648865,
0.1951940655708313,
0.23930920660495758,
-0.15393242239952087,
-0.3814384937286377,
0.3642984628677368,
0.009234033524990082,
0.05186377838253975,
-0.016576822847127914,
0.0211552232503891,
0.09736154228448868,
0.3481876850128174,
-0.13965213298797607,
-0.3088589310646057,
-0.15582337975502014,
-0.06837179511785507,
-0.09838307648897171,
-0.23174236714839935,
0.2134169340133667,
-0.10462531447410583,
-0.4506860375404358,
-0.08521410822868347,
0.29302287101745605,
0.05856834352016449,
0.00921456515789032,
0.20537669956684113,
-0.038248755037784576,
0.018589496612548828,
-0.07421906292438507,
0.22563624382019043,
0.08828437328338623,
-0.3844341039657593,
0.042466115206480026,
-0.10256679356098175,
-0.3686748147010803,
0.15180239081382751,
0.015788160264492035,
0.10551629960536957,
0.46746793389320374,
0.25460049510002136,
-0.1107267439365387,
0.2534538209438324,
-0.1750994324684143,
-0.1235349103808403,
0.12569697201251984,
0.45779499411582947,
0.06859268248081207,
-0.032282814383506775,
-0.024823153391480446,
0.07459215819835663,
-0.07335633784532547,
0.3350145220756531,
-0.1325654536485672,
-0.09703941643238068,
-0.07036146521568298,
0.22371944785118103,
0.21986308693885803,
-0.33134597539901733,
0.24031254649162292,
-0.02811516635119915,
0.033714406192302704,
-0.40467292070388794,
0.12005437910556793,
0.010378368198871613,
0.04779546707868576,
-0.42770084738731384,
0.07001596689224243,
0.036806944757699966,
-0.24992039799690247,
0.28450891375541687,
0.03593704104423523,
0.03189053386449814,
0.09071378409862518,
0.17652009427547455,
-0.04715263098478317,
-0.1672217845916748,
0.1303190290927887,
0.03936237841844559,
0.5264524817466736,
-0.08495336771011353,
0.1647445261478424,
0.002379830926656723,
0.04912621155381203,
0.07199549674987793,
0.16388237476348877,
0.24061289429664612,
-0.12640802562236786,
-0.18926186859607697,
0.4660661816596985,
0.031197037547826767,
0.05140479654073715,
0.11828110367059708,
0.35214826464653015,
-0.22009435296058655,
0.0768815279006958,
0.25516191124916077,
0.15652509033679962,
0.6810564994812012,
-0.3005680441856384,
-0.21214064955711365,
0.34603381156921387,
-0.20879016816616058,
0.07651622593402863,
0.04637226462364197,
0.19659851491451263,
0.1856979876756668,
0.5036056041717529,
0.4216393828392029,
0.07119306921958923,
-0.057479456067085266,
0.056841492652893066,
0.20723816752433777,
0.4721965491771698,
0.25069350004196167,
0.21568086743354797,
-0.3334847092628479,
0.17890200018882751,
0.4410836100578308,
-0.08732803165912628,
0.07926714420318604,
-0.08302232623100281,
0.20058128237724304,
-0.19049887359142303,
-0.4483494758605957,
0.30603736639022827,
0.4503914713859558,
-0.264259397983551,
-0.22422654926776886,
-0.18747831881046295,
0.05205852538347244,
-0.06909883767366409,
0.26151204109191895,
-0.07179589569568634,
-0.25898265838623047,
0.2378176599740982,
0.2311999648809433,
0.4045218825340271,
-0.047182418406009674,
-0.465196430683136,
-0.12846723198890686,
0.46258968114852905,
-0.15985529124736786,
0.2335822433233261,
-0.4345671534538269,
0.13615095615386963,
0.030173514038324356,
0.308877170085907,
0.1110658347606659,
0.2447279691696167,
-0.09996543824672699,
0.16698789596557617,
-0.2195960134267807,
0.18741334974765778,
-0.102918840944767,
0.3118659555912018,
0.05213135853409767,
0.05800194665789604,
0.22476811707019806,
-0.01857941597700119,
-0.059236571192741394,
-0.32809391617774963,
-0.040869925171136856,
-0.003390928730368614,
-0.10370168089866638,
0.061298612505197525,
-0.04360058158636093,
-0.20699721574783325,
0.117093026638031,
0.10223748534917831,
-0.1650727540254593,
0.2957201898097992,
0.4686705470085144,
-0.4410552680492401,
0.05160105973482132,
-0.14807802438735962,
0.0006738845258951187,
0.17319735884666443,
0.44110238552093506,
0.2814823091030121,
0.3540235161781311,
-0.3763417899608612,
-0.3966056704521179,
-0.2746695876121521,
-0.13630342483520508,
0.11570900678634644,
0.3146199882030487,
-0.11544886976480484,
-0.21175773441791534,
0.11529743671417236,
0.41482454538345337,
0.013258635997772217,
-0.19581957161426544,
-0.32842645049095154,
-0.09870053827762604,
0.03224058076739311,
0.41184404492378235,
-0.23363257944583893,
0.21424861252307892,
0.058930568397045135,
-0.10661900043487549,
0.17189717292785645,
0.2256159484386444,
-0.13918696343898773,
-0.18285101652145386,
0.10715547204017639,
-0.08207307755947113,
-0.5190153121948242,
0.5364503860473633,
0.2167881429195404,
0.09328535944223404,
0.054807983338832855,
0.1275993138551712,
0.3601870536804199,
0.038798555731773376,
-0.096892811357975,
0.3017165958881378,
-0.10877057909965515,
0.09301505237817764,
-0.19617508351802826,
-0.21902208030223846,
-0.08456490188837051,
-0.1443708837032318,
0.1268480271100998,
-0.34650328755378723,
-0.08184371888637543,
-0.16458633542060852,
-0.07371826469898224,
-0.22170178592205048,
0.24843890964984894,
0.5483865737915039,
0.06560816615819931,
-0.05863628536462784,
-0.18764063715934753,
-0.056322745978832245,
0.19932080805301666,
-0.6840330362319946,
-0.043102916330099106,
0.0250324085354805,
-0.2074374258518219,
0.13078543543815613,
-0.000004043802618980408,
-0.567149817943573,
-0.34988969564437866,
0.2093643993139267,
-0.056748636066913605,
-0.3932849168777466,
0.13588862121105194,
-0.28259387612342834,
-0.2999810576438904,
-0.17615389823913574,
0.26342451572418213,
-0.28276780247688293,
-0.3066211938858032,
-0.08795519918203354,
-0.18364101648330688
] |
https://github.com/huggingface/datasets/issues/4912 | datasets map() handles all data at a stroke and takes long time | Thanks for your clear explanation @lhoestq !
> * if your preprocessing takes too much CPU for example, using a data-collator may slow down your training and your GPUs may not work at full speed
> * on the other hand, map() may take a lot of time and disk space to run if your dataset is too big.
I really agree with you. There should be some trade-off between processing before and during the train loop.
Besides, I find `map()` function can cache the results once it has been executed. Very useful! | **1. Background**
Huggingface datasets package advises using `map()` to process data in batches. In the example code on pretraining masked language model, they use `map()` to tokenize all data at a stroke before the train loop.
The corresponding code:
```
with accelerator.main_process_first():
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
desc="Running tokenizer on every text in dataset"
)
```
**2. The problem**
Thus, when I try the same pertaining code with a much larger corpus, it takes quite a long time to tokenize.
Also, we can choose to tokenize data in `data-collator`. In this way, the program only tokenizes one batch in the next training step and avoids getting stuck in tokenization.
**3. My question**
As described above, my questions are:
* **Which is better? Process in `map()` or in `data-collator`**
* **Why huggingface advises `map()` function?** There should be some advantages to using `map()`
Thanks for your answers! | 93 | datasets map() handles all data at a stroke and takes long time
**1. Background**
Huggingface datasets package advises using `map()` to process data in batches. In the example code on pretraining masked language model, they use `map()` to tokenize all data at a stroke before the train loop.
The corresponding code:
```
with accelerator.main_process_first():
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
desc="Running tokenizer on every text in dataset"
)
```
**2. The problem**
Thus, when I try the same pertaining code with a much larger corpus, it takes quite a long time to tokenize.
Also, we can choose to tokenize data in `data-collator`. In this way, the program only tokenizes one batch in the next training step and avoids getting stuck in tokenization.
**3. My question**
As described above, my questions are:
* **Which is better? Process in `map()` or in `data-collator`**
* **Why huggingface advises `map()` function?** There should be some advantages to using `map()`
Thanks for your answers!
Thanks for your clear explanation @lhoestq !
> * if your preprocessing takes too much CPU for example, using a data-collator may slow down your training and your GPUs may not work at full speed
> * on the other hand, map() may take a lot of time and disk space to run if your dataset is too big.
I really agree with you. There should be some trade-off between processing before and during the train loop.
Besides, I find `map()` function can cache the results once it has been executed. Very useful! | [
-0.3046501874923706,
-0.5273287296295166,
-0.08986353129148483,
0.1113094687461853,
-0.13578695058822632,
-0.0669172927737236,
0.283641517162323,
0.04209790751338005,
-0.017623171210289,
0.04323548078536987,
0.06979703903198242,
0.006496783345937729,
-0.07888147234916687,
0.08780565857887268,
0.1404150426387787,
-0.06404314935207367,
0.4018983840942383,
-0.05026631057262421,
0.10251502692699432,
0.0820835679769516,
-0.3487370014190674,
-0.18092048168182373,
-0.38906407356262207,
0.055103957653045654,
-0.23178637027740479,
-0.29273438453674316,
-0.14342796802520752,
-0.23998099565505981,
-0.22905799746513367,
-0.3455663323402405,
-0.16939814388751984,
0.27527445554733276,
0.3267741799354553,
0.5796868801116943,
-0.00012474459072109312,
-0.1633893847465515,
0.044545963406562805,
0.24027270078659058,
0.05777448043227196,
-0.16193921864032745,
0.13885405659675598,
-0.26050007343292236,
-0.02566923201084137,
-0.253134548664093,
0.16538551449775696,
-0.05580976977944374,
0.28395843505859375,
-0.33085396885871887,
0.3243058919906616,
-0.1758376955986023,
0.03170809894800186,
0.293144553899765,
-0.3911229372024536,
0.18815235793590546,
-0.08188191801309586,
0.181942880153656,
0.012683069333434105,
0.08427000045776367,
0.3087344169616699,
-0.07314329594373703,
-0.15866076946258545,
0.40792667865753174,
-0.2264079451560974,
-0.27181655168533325,
0.39225471019744873,
0.06283298134803772,
0.1598619520664215,
-0.5443011522293091,
0.041367776691913605,
0.029555579647421837,
0.07983706146478653,
-0.10121212154626846,
-0.3063226044178009,
-0.26310616731643677,
-0.22499071061611176,
-0.20328153669834137,
-0.006516195833683014,
0.12960653007030487,
0.17870910465717316,
0.08394912630319595,
-0.4709542393684387,
0.04294007271528244,
0.1913084089756012,
0.018965300172567368,
-0.12835097312927246,
0.1453814059495926,
-0.199611634016037,
0.33632132411003113,
0.287874311208725,
-0.03853689134120941,
-0.029970861971378326,
-0.5012272596359253,
0.1807299256324768,
0.42308473587036133,
-0.356558233499527,
-0.09726370871067047,
-0.07123712450265884,
0.10803087055683136,
0.12680572271347046,
0.014631759375333786,
-0.1102992594242096,
0.22314107418060303,
0.23574919998645782,
0.006423082202672958,
0.2914622724056244,
0.046608489006757736,
0.33712488412857056,
0.09372355043888092,
0.09793245792388916,
-0.3593694567680359,
-0.13689881563186646,
-0.11814301460981369,
-0.16215209662914276,
0.07289468497037888,
-0.18206104636192322,
-0.010467622429132462,
-0.35737353563308716,
0.04826958850026131,
0.23576414585113525,
-0.021036289632320404,
-0.3366612493991852,
-0.3287558853626251,
0.14617952704429626,
0.37164536118507385,
-0.1346871703863144,
0.11935443431138992,
-0.23559452593326569,
-0.11023558676242828,
0.1575368344783783,
0.07639860361814499,
-0.05265340581536293,
-0.2268770933151245,
-0.28676000237464905,
0.2187804877758026,
-0.17081543803215027,
-0.1426163911819458,
0.19712020456790924,
0.09023454040288925,
-0.05702298879623413,
-0.027196044102311134,
0.1574387401342392,
-0.6188144683837891,
0.3833077549934387,
-0.06342624127864838,
-0.10300610959529877,
0.5488250851631165,
-0.05106949433684349,
0.3159383535385132,
-0.14696857333183289,
0.2261658012866974,
-0.29855430126190186,
-0.2555597424507141,
0.5980384349822998,
-0.03795786574482918,
0.1457986980676651,
0.2420213371515274,
-0.42914536595344543,
0.4135808050632477,
0.16034063696861267,
-0.08292900770902634,
0.041807621717453,
-0.08983950316905975,
-0.4200797379016876,
-0.28599706292152405,
0.23347213864326477,
-0.034506604075431824,
0.15954306721687317,
0.02845901995897293,
0.20945832133293152,
0.07911820709705353,
0.39488688111305237,
0.4653632640838623,
-0.36612772941589355,
0.48474159836769104,
-0.1045842170715332,
0.3129231929779053,
0.3031740188598633,
-0.4013957977294922,
-0.23049111664295197,
0.4694875180721283,
0.02632693201303482,
0.11830750852823257,
-0.1115788146853447,
0.021988598629832268,
0.4211699962615967,
-0.09259404987096786,
0.24516561627388,
0.13170507550239563,
0.025478657335042953,
0.21919159591197968,
-0.07797706127166748,
0.08162873238325119,
0.6369355320930481,
-0.03494507074356079,
-0.15467879176139832,
0.055532265454530716,
-0.17672932147979736,
-0.1858748197555542,
0.10704046487808228,
0.09281113743782043,
0.023221734911203384,
0.08143109083175659,
-0.12611933052539825,
-0.03919295221567154,
-0.1776008903980255,
0.0234726220369339,
-0.30439427495002747,
-0.05551186576485634,
0.01570095866918564,
0.021540779620409012,
-0.06953151524066925,
-0.22231674194335938,
0.3311120271682739,
0.11460695415735245,
0.17244644463062286,
-0.04960837587714195,
-0.1455470621585846,
-0.059750914573669434,
0.1748664230108261,
0.06673189997673035,
-0.2367696613073349,
0.1732710897922516,
-0.1371009200811386,
0.19159244000911713,
0.04354352504014969,
-0.2169235348701477,
0.14298588037490845,
0.06206555664539337,
-0.2556896209716797,
-0.02315225452184677,
-0.03045625239610672,
-0.26831284165382385,
0.09219466894865036,
0.37117964029312134,
0.027553051710128784,
-0.09251634776592255,
-0.2691590487957001,
0.23741503059864044,
0.4519827961921692,
0.17756694555282593,
-0.135812908411026,
-0.3137089014053345,
0.21833689510822296,
-0.11804050207138062,
0.16607680916786194,
0.33832216262817383,
0.25020739436149597,
0.437102735042572,
0.03775335103273392,
-0.24080564081668854,
-0.24348971247673035,
0.19862866401672363,
-0.18746992945671082,
0.1070745438337326,
-0.026650916785001755,
0.19512780010700226,
0.49692100286483765,
0.31224843859672546,
-0.18763384222984314,
-0.030149556696414948,
0.5792423486709595,
-0.2613118588924408,
-0.1653410792350769,
0.05278057977557182,
-0.33556702733039856,
-0.1471417248249054,
0.22905130684375763,
-0.2014317661523819,
0.22811150550842285,
-0.06993299722671509,
0.09288428723812103,
-0.09909687936306,
0.228083536028862,
0.16124776005744934,
0.18231987953186035,
0.24508114159107208,
0.06697479635477066,
-0.23584312200546265,
-0.0637575313448906,
0.1719820350408554,
-0.000053063035011291504,
-0.04688601940870285,
-0.03495125100016594,
0.02908485010266304,
0.02629629150032997,
-0.05360262468457222,
-0.17664453387260437,
-0.24646282196044922,
0.03689083829522133,
-0.037603266537189484,
-0.21255122125148773,
0.06078198552131653,
-0.21542233228683472,
-0.11485667526721954,
0.0408676378428936,
0.09288859367370605,
0.25839561223983765,
0.3209092319011688,
-0.2549078166484833,
-0.14316415786743164,
-0.03539588674902916,
-0.13056008517742157,
-0.04134318232536316,
-0.10553853213787079,
0.16298164427280426,
-0.11755876988172531,
0.16207697987556458,
-0.06794585287570953,
0.04775598645210266,
-0.1345701366662979,
-0.29666316509246826,
0.13708901405334473,
-0.22976796329021454,
-0.045773088932037354,
-0.10001461207866669,
0.06032506749033928,
-0.7880016565322876,
-0.1350725293159485,
0.1291174590587616,
-0.2992820143699646,
-0.21159738302230835,
-0.2393663227558136,
0.07886531203985214,
-0.19687123596668243,
-0.008155541494488716,
0.14853626489639282,
-0.24579046666622162,
-0.16564425826072693,
0.3948964476585388,
-0.15427491068840027,
0.1300516128540039,
-0.30585193634033203,
-0.23702643811702728,
-0.01955045387148857,
-0.4213090240955353,
0.04188178852200508,
0.028743524104356766,
-0.5454418659210205,
0.14426855742931366,
-0.08389570564031601,
-0.1876564621925354,
-0.1900007724761963,
0.04347962886095047,
-0.20627537369728088,
0.5155982375144958,
-0.32273930311203003,
0.05224845930933952,
-0.15123054385185242,
0.13653241097927094,
0.026253022253513336,
0.20659302175045013,
0.1867866814136505,
-0.004858120810240507,
0.1423998922109604,
0.11146076768636703,
-0.3290073573589325,
-0.0007336363196372986,
0.07601355016231537,
0.1918904185295105,
0.4297667145729065,
0.5115416049957275,
0.07533574104309082,
0.7315855622291565,
0.2855875492095947,
-0.2934706211090088,
-0.047735393047332764,
0.1603553593158722,
-0.0016976110637187958,
-0.3141216039657593,
-0.2569551467895508,
0.2424115091562271,
-0.09228470921516418,
0.16237297654151917,
0.4111343026161194,
-0.16633614897727966,
-0.04841754585504532,
-0.08819888532161713,
-0.10133111476898193,
-0.2832486927509308,
-0.19967947900295258,
0.3229207992553711,
0.018429521471261978,
0.6356043219566345,
0.07278983294963837,
0.04902298003435135,
-0.07082521170377731,
-0.0009309118613600731,
0.12175819277763367,
0.15208685398101807,
0.47069069743156433,
0.01924695447087288,
-0.7506322264671326,
0.1761496663093567,
-0.7374939322471619,
0.24236658215522766,
0.13482078909873962,
0.2803058326244354,
0.02822675183415413,
-0.08674630522727966,
0.15414749085903168,
0.014480918645858765,
0.6798102855682373,
-0.038389600813388824,
-0.4990665912628174,
-0.4410770535469055,
-0.5644672513008118,
-0.3074113130569458,
0.2747510075569153,
-0.12472185492515564,
0.4011182487010956,
0.23202139139175415,
0.7788004875183105,
-0.3217921257019043,
-0.3746289610862732,
-0.19157353043556213,
0.26635220646858215,
0.08498995006084442,
-0.1199398785829544,
-0.07826920598745346,
0.07350200414657593,
-0.38603878021240234,
0.1884002983570099,
0.1255071759223938,
-0.007595202885568142,
0.36168912053108215,
-0.06817732006311417,
-0.005302660167217255,
0.1579245626926422,
0.18177025020122528,
0.15058580040931702,
0.15079981088638306,
0.09631029516458511,
0.2191455066204071,
0.34282639622688293,
0.2576422095298767,
0.19805914163589478,
-0.08334620296955109,
-0.2597278654575348,
-0.1729828119277954,
0.11151096224784851,
0.15486790239810944,
0.6944422721862793,
0.365508496761322,
0.010380107909440994,
0.32372111082077026,
0.12420078366994858,
0.0987427830696106,
-0.5521688461303711,
0.25562146306037903,
0.31521621346473694,
0.38951966166496277,
-0.6965624690055847,
-0.4475770890712738,
-0.10259123891592026,
0.38776513934135437,
-0.22752243280410767,
0.24230526387691498,
-0.24719379842281342,
-0.1507197916507721,
0.4666520953178406,
0.05028607323765755,
1.168156385421753,
-0.27294254302978516,
0.2878090739250183,
-0.21739056706428528,
0.2902557849884033,
0.30670833587646484,
-0.2849329113960266,
0.08248096704483032,
-0.30514124035835266,
-0.2054765671491623,
-0.024159211665391922,
-0.2285025417804718,
0.20812252163887024,
0.4502856731414795,
-0.0020993947982788086,
0.17252348363399506,
0.334628164768219,
0.47317492961883545,
-0.25026175379753113,
0.2095121145248413,
0.3672882616519928,
-0.48528406023979187,
-0.002118300646543503,
-0.04267212003469467,
0.03219614923000336,
0.11804580688476562,
-0.14891007542610168,
0.12660366296768188,
-0.02742890454828739,
-0.19640487432479858,
0.24983958899974823,
-0.2886745035648346,
-0.6728050112724304,
0.10267715156078339,
0.02293664589524269,
-0.1783905029296875,
0.27966630458831787,
0.11554068326950073,
0.15281403064727783,
0.2851763665676117,
0.31196150183677673,
0.0026408545672893524,
0.27242445945739746,
0.19990789890289307,
-0.018897756934165955,
-0.2836703360080719,
0.009199079126119614,
-0.007561620324850082,
0.2724034786224365,
-0.017492488026618958,
-0.20611472427845,
-0.2268114686012268,
-0.29248368740081787,
0.23046399652957916,
0.24662309885025024,
-0.14649634063243866,
-0.373483806848526,
0.31356316804885864,
-0.07196439802646637,
0.06587834656238556,
-0.04003899544477463,
0.03725869953632355,
0.05707357078790665,
0.43392324447631836,
-0.09700480103492737,
-0.27844181656837463,
-0.1302448809146881,
-0.03980404883623123,
-0.08683211356401443,
-0.25351235270500183,
0.21759404242038727,
-0.1105005294084549,
-0.4397476315498352,
-0.09405001252889633,
0.25707751512527466,
0.09982282668352127,
0.04380539804697037,
0.1714053452014923,
-0.00035897688940167427,
0.029208168387413025,
-0.09309970587491989,
0.17378059029579163,
0.00734030082821846,
-0.3591310977935791,
0.005470756441354752,
-0.16659441590309143,
-0.42782649397850037,
0.19753974676132202,
-0.025339532643556595,
0.05962593853473663,
0.43568164110183716,
0.2658648192882538,
-0.10949426144361496,
0.25426027178764343,
-0.16462767124176025,
-0.035211846232414246,
0.14999140799045563,
0.43446752429008484,
-0.017198871821165085,
0.011230260133743286,
-0.002564534079283476,
0.07403160631656647,
-0.09055435657501221,
0.35231947898864746,
-0.19089365005493164,
-0.07963433861732483,
-0.01979227550327778,
0.2268940508365631,
0.21871107816696167,
-0.3396887481212616,
0.21830026805400848,
-0.025930998846888542,
0.0007754657417535782,
-0.3711516261100769,
0.10453082621097565,
0.02767891436815262,
0.04126274585723877,
-0.36171332001686096,
0.08397667109966278,
0.023001424968242645,
-0.17922116816043854,
0.2691858410835266,
0.013993889093399048,
0.018236547708511353,
0.07789641618728638,
0.1570359766483307,
-0.045651085674762726,
-0.1717771589756012,
0.04007074236869812,
0.014688566327095032,
0.5864750146865845,
-0.07258158922195435,
0.2025192379951477,
-0.05297435075044632,
0.0001487545669078827,
0.11666539311408997,
0.14733174443244934,
0.2699856460094452,
-0.13780051469802856,
-0.2012859731912613,
0.4878351092338562,
0.009834323078393936,
0.040732987225055695,
0.11165560781955719,
0.4041830003261566,
-0.21323542296886444,
0.05289580300450325,
0.2056402862071991,
0.17611739039421082,
0.6848055124282837,
-0.3172300457954407,
-0.23208442330360413,
0.348945289850235,
-0.1667199581861496,
0.10790321230888367,
0.07765378057956696,
0.18152450025081635,
0.16689138114452362,
0.4928775429725647,
0.44531285762786865,
0.0686531811952591,
0.054881930351257324,
0.10596573352813721,
0.18650324642658234,
0.42684680223464966,
0.2722876965999603,
0.16410274803638458,
-0.3517870008945465,
0.12321029603481293,
0.5168231725692749,
-0.11928477883338928,
0.13934394717216492,
-0.09114161133766174,
0.22741827368736267,
-0.1503666788339615,
-0.46130913496017456,
0.24060195684432983,
0.40359872579574585,
-0.28088098764419556,
-0.20166097581386566,
-0.1389104127883911,
0.03707072138786316,
0.0027480199933052063,
0.22670376300811768,
-0.1048058569431305,
-0.2249138206243515,
0.28515028953552246,
0.17647066712379456,
0.3251856863498688,
-0.005503712221980095,
-0.5269483923912048,
-0.06856295466423035,
0.46278178691864014,
-0.16423849761486053,
0.1640850454568863,
-0.47219210863113403,
0.17427916824817657,
-0.02073848620057106,
0.27784839272499084,
0.09630480408668518,
0.2699151933193207,
-0.11238895356655121,
0.11821010708808899,
-0.21476636826992035,
0.17348355054855347,
-0.08703761547803879,
0.32770854234695435,
0.1368609070777893,
-0.024112753570079803,
0.20595431327819824,
-0.06552723795175552,
-0.05020628497004509,
-0.25502529740333557,
-0.02171533927321434,
0.023854756727814674,
-0.08391369879245758,
-0.014903023838996887,
-0.07652536779642105,
-0.16387131810188293,
0.07152843475341797,
0.06830134987831116,
-0.17463737726211548,
0.3041079342365265,
0.4730744957923889,
-0.45201820135116577,
0.044957153499126434,
-0.19069325923919678,
-0.006331383250653744,
0.13509464263916016,
0.4594988524913788,
0.3210342824459076,
0.3551684617996216,
-0.45905736088752747,
-0.4029240012168884,
-0.2784881889820099,
-0.08359634131193161,
0.08420100063085556,
0.4445692300796509,
-0.09439398348331451,
-0.14519013464450836,
0.10812914371490479,
0.40850406885147095,
0.09232018887996674,
-0.22326931357383728,
-0.3310626447200775,
0.006083555519580841,
0.020331643521785736,
0.4513211250305176,
-0.27967941761016846,
0.22194446623325348,
0.05804119259119034,
-0.13758888840675354,
0.24361929297447205,
0.1773492693901062,
-0.15287300944328308,
-0.19203267991542816,
0.1514533907175064,
-0.10824763774871826,
-0.45009496808052063,
0.5978763103485107,
0.2038172483444214,
0.06632637977600098,
0.03209291398525238,
0.11380477994680405,
0.39124491810798645,
0.033653583377599716,
-0.11340205371379852,
0.28617480397224426,
-0.08736260235309601,
0.1175563633441925,
-0.1865619719028473,
-0.17871375381946564,
-0.08786691725254059,
-0.19315916299819946,
0.1376073956489563,
-0.4005049765110016,
-0.04076109826564789,
-0.12826021015644073,
-0.026702240109443665,
-0.15631604194641113,
0.2236124873161316,
0.5073627233505249,
0.058616701513528824,
-0.07372517138719559,
-0.2117975652217865,
-0.039680518209934235,
0.21672502160072327,
-0.6997174024581909,
-0.06462131440639496,
-0.02580086886882782,
-0.11454467475414276,
0.21295487880706787,
-0.04814920574426651,
-0.6882004141807556,
-0.35136544704437256,
0.23104999959468842,
0.014066320843994617,
-0.3736366927623749,
0.15956541895866394,
-0.2775103449821472,
-0.26762324571609497,
-0.15919579565525055,
0.2718338072299957,
-0.28550541400909424,
-0.3072383999824524,
-0.04374004900455475,
-0.19997338950634003
] |
https://github.com/huggingface/datasets/issues/4912 | datasets map() handles all data at a stroke and takes long time | @lhoestq How to preprocess on-the-fly during training?my data is about 1w hours, when I use map to preprocess, and It's not finished yet, but all disk space(2T) is full. | **1. Background**
Huggingface datasets package advises using `map()` to process data in batches. In the example code on pretraining masked language model, they use `map()` to tokenize all data at a stroke before the train loop.
The corresponding code:
```
with accelerator.main_process_first():
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
desc="Running tokenizer on every text in dataset"
)
```
**2. The problem**
Thus, when I try the same pertaining code with a much larger corpus, it takes quite a long time to tokenize.
Also, we can choose to tokenize data in `data-collator`. In this way, the program only tokenizes one batch in the next training step and avoids getting stuck in tokenization.
**3. My question**
As described above, my questions are:
* **Which is better? Process in `map()` or in `data-collator`**
* **Why huggingface advises `map()` function?** There should be some advantages to using `map()`
Thanks for your answers! | 29 | datasets map() handles all data at a stroke and takes long time
**1. Background**
Huggingface datasets package advises using `map()` to process data in batches. In the example code on pretraining masked language model, they use `map()` to tokenize all data at a stroke before the train loop.
The corresponding code:
```
with accelerator.main_process_first():
tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
desc="Running tokenizer on every text in dataset"
)
```
**2. The problem**
Thus, when I try the same pertaining code with a much larger corpus, it takes quite a long time to tokenize.
Also, we can choose to tokenize data in `data-collator`. In this way, the program only tokenizes one batch in the next training step and avoids getting stuck in tokenization.
**3. My question**
As described above, my questions are:
* **Which is better? Process in `map()` or in `data-collator`**
* **Why huggingface advises `map()` function?** There should be some advantages to using `map()`
Thanks for your answers!
@lhoestq How to preprocess on-the-fly during training?my data is about 1w hours, when I use map to preprocess, and It's not finished yet, but all disk space(2T) is full. | [
-0.28311681747436523,
-0.5527422428131104,
-0.12373478710651398,
0.09826099127531052,
-0.04951656609773636,
-0.06586512178182602,
0.23165546357631683,
0.07343322038650513,
-0.04355763643980026,
0.10113807767629623,
0.1012248620390892,
0.012302347458899021,
-0.09565040469169617,
0.12326780706644058,
0.10954125225543976,
-0.01660335808992386,
0.39478233456611633,
-0.08963191509246826,
0.13069772720336914,
0.11141897737979889,
-0.299235999584198,
-0.18917550146579742,
-0.3737465739250183,
0.014569632709026337,
-0.2656661570072174,
-0.3119147717952728,
-0.1532296985387802,
-0.3078542947769165,
-0.2907301187515259,
-0.3193143904209137,
-0.08828701823949814,
0.32775217294692993,
0.2886993885040283,
0.6222776770591736,
-0.00012246954429429024,
-0.14953699707984924,
0.07327646017074585,
0.1972889006137848,
0.006672579795122147,
-0.17407505214214325,
0.18832945823669434,
-0.2834268808364868,
-0.020704710856080055,
-0.23927587270736694,
0.09293349832296371,
-0.06147055700421333,
0.30463239550590515,
-0.4035474956035614,
0.35623103380203247,
-0.19084100425243378,
0.05722769722342491,
0.27784428000450134,
-0.35550326108932495,
0.1766006499528885,
-0.08931031078100204,
0.20045535266399384,
-0.06299694627523422,
0.13003987073898315,
0.31877878308296204,
-0.10749200731515884,
-0.07994578033685684,
0.3661651611328125,
-0.25694602727890015,
-0.2510822117328644,
0.3939398229122162,
0.04252961650490761,
0.09062056243419647,
-0.608421802520752,
0.024116728454828262,
-0.01426573097705841,
0.018902890384197235,
-0.16350463032722473,
-0.3090658187866211,
-0.25516125559806824,
-0.15849266946315765,
-0.15896084904670715,
-0.003116413950920105,
0.1590256541967392,
0.13059502840042114,
0.0680086612701416,
-0.5176677703857422,
-0.005159290507435799,
0.17257055640220642,
-0.010805562138557434,
-0.05621194466948509,
0.1329132616519928,
-0.21916016936302185,
0.27790549397468567,
0.2663338780403137,
-0.03074328601360321,
-0.03071131557226181,
-0.5130517482757568,
0.15568698942661285,
0.4768978953361511,
-0.35370558500289917,
-0.10290086269378662,
-0.11923154443502426,
0.02733616903424263,
0.11488059908151627,
-0.03936050832271576,
-0.08095913380384445,
0.19127699732780457,
0.2565445601940155,
-0.0317193940281868,
0.2530117630958557,
0.08432625234127045,
0.3230196237564087,
-0.010825399309396744,
0.04294329136610031,
-0.3763791024684906,
-0.12692813575267792,
-0.11090240627527237,
-0.2195800393819809,
0.06301897764205933,
-0.20674307644367218,
-0.014104451984167099,
-0.2948816418647766,
0.06469917297363281,
0.309010773897171,
-0.0015834355726838112,
-0.2499406933784485,
-0.32828640937805176,
0.034130826592445374,
0.3246523439884186,
-0.10601823031902313,
0.058935895562171936,
-0.1286463737487793,
-0.12459687888622284,
0.1279086321592331,
0.07442592084407806,
-0.048204004764556885,
-0.18334876000881195,
-0.2812941074371338,
0.2166636884212494,
-0.21574370563030243,
-0.043218184262514114,
0.15988101065158844,
0.08090704679489136,
-0.06777326762676239,
-0.05260765179991722,
0.11356513202190399,
-0.625465452671051,
0.3391573131084442,
-0.03502030298113823,
-0.14366544783115387,
0.5078374147415161,
-0.059436727315187454,
0.3795524835586548,
-0.16658008098602295,
0.22460684180259705,
-0.2558233439922333,
-0.269650936126709,
0.5864911675453186,
-0.01990014687180519,
0.180532768368721,
0.26502326130867004,
-0.42672064900398254,
0.39129096269607544,
0.18709345161914825,
-0.07656441628932953,
0.01684795320034027,
-0.0031014755368232727,
-0.4141835570335388,
-0.23114998638629913,
0.27764254808425903,
-0.03831647336483002,
0.15629589557647705,
0.00990399718284607,
0.3097379803657532,
0.12945716083049774,
0.43744412064552307,
0.3897843658924103,
-0.2949293255805969,
0.5007824301719666,
-0.05689595639705658,
0.23716171085834503,
0.3094790279865265,
-0.31999626755714417,
-0.16715504229068756,
0.47643351554870605,
-0.08032187074422836,
-0.00428040511906147,
-0.07909657806158066,
-0.01568947732448578,
0.3821401000022888,
-0.05962849408388138,
0.23649811744689941,
0.1916685551404953,
0.05001049488782883,
0.20060935616493225,
-0.12242206931114197,
-0.018594272434711456,
0.4398795962333679,
-0.03687414154410362,
-0.2034785896539688,
0.009247258305549622,
-0.18585067987442017,
-0.22314870357513428,
0.06850504130125046,
0.13200326263904572,
0.05744417756795883,
0.13780468702316284,
-0.16833437979221344,
0.007641106843948364,
-0.25346890091896057,
-0.004397045820951462,
-0.3227193057537079,
-0.0532175749540329,
-0.019943060353398323,
0.06282632797956467,
-0.12935325503349304,
-0.2059909850358963,
0.3029555380344391,
0.14065437018871307,
0.18127761781215668,
-0.053732264786958694,
-0.1235235333442688,
-0.08525282144546509,
0.20130757987499237,
0.09976896643638611,
-0.2787068486213684,
0.13795121014118195,
-0.2005990594625473,
0.19179348647594452,
0.032972291111946106,
-0.17075885832309723,
0.12830908596515656,
-0.012288752011954784,
-0.24245522916316986,
-0.025754794478416443,
-0.06665415316820145,
-0.27955591678619385,
0.038395099341869354,
0.3436162769794464,
-0.006139151286333799,
0.00759405642747879,
-0.1981917917728424,
0.2349582314491272,
0.37924954295158386,
0.22279706597328186,
-0.15963922441005707,
-0.32543545961380005,
0.21437610685825348,
-0.09714323282241821,
0.11691375076770782,
0.34182900190353394,
0.2789430320262909,
0.5206923484802246,
0.08867508172988892,
-0.24689675867557526,
-0.20555207133293152,
0.2052687704563141,
-0.11463065445423126,
0.08912891149520874,
-0.02780945971608162,
0.2458331435918808,
0.5645502805709839,
0.30054375529289246,
-0.11644589900970459,
-0.05918139964342117,
0.545480489730835,
-0.2327161729335785,
-0.24466466903686523,
0.07225213944911957,
-0.2916973829269409,
-0.18809959292411804,
0.2280966192483902,
-0.23984135687351227,
0.15468502044677734,
-0.07127410918474197,
0.10550174117088318,
-0.07400210946798325,
0.17777857184410095,
0.12364096939563751,
0.1673351228237152,
0.2826746106147766,
0.11140494048595428,
-0.2410631775856018,
-0.04856611415743828,
0.23376725614070892,
0.010883443057537079,
-0.052849333733320236,
0.03442864120006561,
-0.032408758997917175,
0.072482630610466,
-0.07335914671421051,
-0.15170690417289734,
-0.20603251457214355,
0.08853261917829514,
-0.08402738720178604,
-0.20873449742794037,
0.10354433953762054,
-0.2209918051958084,
-0.09362268447875977,
0.03162997588515282,
0.12008415907621384,
0.23184093832969666,
0.3621424436569214,
-0.23694351315498352,
-0.14474323391914368,
-0.028351133689284325,
-0.1818573921918869,
-0.006865732371807098,
-0.09945699572563171,
0.1863251030445099,
-0.14381860196590424,
0.1770041435956955,
-0.09365624189376831,
0.05459429323673248,
-0.10635630786418915,
-0.22609132528305054,
0.17303907871246338,
-0.2386823147535324,
-0.00025571323931217194,
-0.1435074359178543,
0.06988225132226944,
-0.6740404963493347,
-0.0913122221827507,
0.13706177473068237,
-0.32708361744880676,
-0.2019626796245575,
-0.2677518129348755,
0.05643926560878754,
-0.23645168542861938,
-0.05195506662130356,
0.1318800151348114,
-0.28939905762672424,
-0.18449965119361877,
0.3979923129081726,
-0.15653786063194275,
0.11176684498786926,
-0.27221205830574036,
-0.18606135249137878,
0.014262496493756771,
-0.4622993767261505,
0.1395455151796341,
0.06515424698591232,
-0.6338948607444763,
0.11724535375833511,
-0.02544208988547325,
-0.154078871011734,
-0.21733154356479645,
0.058762677013874054,
-0.1599968820810318,
0.5024480223655701,
-0.32887566089630127,
0.03960990160703659,
-0.20962634682655334,
0.18918278813362122,
0.030225582420825958,
0.14023147523403168,
0.2888525724411011,
0.06105406954884529,
0.09027363359928131,
0.1503654420375824,
-0.2775605320930481,
0.031859271228313446,
0.09121040999889374,
0.11535400152206421,
0.43599703907966614,
0.5116696953773499,
0.07884329557418823,
0.7952292561531067,
0.17043861746788025,
-0.2914041578769684,
0.01119551807641983,
0.1499437689781189,
0.040783725678920746,
-0.3541281223297119,
-0.22413428127765656,
0.19430024921894073,
-0.0918479859828949,
0.1309148222208023,
0.43048930168151855,
-0.12724393606185913,
-0.027972107753157616,
-0.12573769688606262,
-0.10906384885311127,
-0.24577853083610535,
-0.17709609866142273,
0.2763228714466095,
0.009864430874586105,
0.6450479626655579,
0.07541680335998535,
0.061797864735126495,
-0.0937868058681488,
-0.03995091840624809,
0.14912599325180054,
0.1172790378332138,
0.5001145005226135,
-0.033161427825689316,
-0.7139749526977539,
0.2137928009033203,
-0.7314938902854919,
0.23448951542377472,
0.10086968541145325,
0.34919536113739014,
0.0007329657673835754,
-0.10619673877954483,
0.21508952975273132,
-0.022609874606132507,
0.6017922163009644,
0.020180916413664818,
-0.4651293158531189,
-0.28902992606163025,
-0.5349876880645752,
-0.3293520510196686,
0.2685587406158447,
-0.17059916257858276,
0.38644716143608093,
0.25266575813293457,
0.7772156596183777,
-0.2704940438270569,
-0.4653521180152893,
-0.22662857174873352,
0.2553606629371643,
0.07589121162891388,
-0.12531548738479614,
-0.015160385519266129,
0.06418609619140625,
-0.44005659222602844,
0.2115502655506134,
0.1453106850385666,
-0.008928884752094746,
0.3297869861125946,
-0.0666414424777031,
-0.08657364547252655,
0.20800462365150452,
0.16172946989536285,
0.06849715113639832,
0.12644430994987488,
0.10699456185102463,
0.30123448371887207,
0.32180023193359375,
0.21188636124134064,
0.20011582970619202,
-0.10906170308589935,
-0.29148033261299133,
-0.10183067619800568,
0.10547896474599838,
0.16234835982322693,
0.7003281712532043,
0.37051406502723694,
0.05442201718688011,
0.34923404455184937,
0.013522098772227764,
0.17291642725467682,
-0.6585693359375,
0.2951306700706482,
0.35200080275535583,
0.3557150661945343,
-0.6141688227653503,
-0.49087172746658325,
-0.060179777443408966,
0.44297054409980774,
-0.2722271680831909,
0.25463706254959106,
-0.26794010400772095,
-0.13988003134727478,
0.47886526584625244,
0.13223706185817719,
1.1910617351531982,
-0.2665383219718933,
0.3426268994808197,
-0.25614961981773376,
0.2913922071456909,
0.1664402335882187,
-0.36729317903518677,
0.07137241959571838,
-0.26560893654823303,
-0.21587324142456055,
-0.003157803788781166,
-0.18620678782463074,
0.21931302547454834,
0.4559530019760132,
-0.005722008645534515,
0.18677204847335815,
0.3100118637084961,
0.4061969220638275,
-0.23412513732910156,
0.17770694196224213,
0.4312221109867096,
-0.5359653830528259,
-0.012508850544691086,
-0.015634551644325256,
0.09501343220472336,
0.1332816183567047,
-0.1494627296924591,
0.14852173626422882,
0.047540370374917984,
-0.15939605236053467,
0.26600968837738037,
-0.26992249488830566,
-0.6423547863960266,
0.06422500312328339,
-0.10534064471721649,
-0.1770753562450409,
0.16651597619056702,
0.15820379555225372,
0.1636587381362915,
0.3367239236831665,
0.3111271560192108,
0.024449672549962997,
0.24789679050445557,
0.18589921295642853,
-0.09714610874652863,
-0.22797554731369019,
0.0227920301258564,
-0.010223470628261566,
0.3252226710319519,
-0.05911176651716232,
-0.266877681016922,
-0.15711058676242828,
-0.31870391964912415,
0.1757110059261322,
0.2745465934276581,
-0.10941899567842484,
-0.4008721113204956,
0.24690961837768555,
-0.07242639362812042,
0.07762625813484192,
-0.019322052597999573,
0.047341302037239075,
0.07352667301893234,
0.4190291464328766,
-0.077656090259552,
-0.31064432859420776,
-0.1343950629234314,
0.037681806832551956,
-0.11024495214223862,
-0.20137497782707214,
0.27782589197158813,
-0.14988820254802704,
-0.3980935215950012,
-0.12291262298822403,
0.2456774115562439,
0.06881938129663467,
0.08195848017930984,
0.16536013782024384,
0.03369652107357979,
-0.0031820833683013916,
-0.10244855284690857,
0.20757922530174255,
0.09433738887310028,
-0.3981727659702301,
-0.010085351765155792,
-0.12965896725654602,
-0.4891909658908844,
0.14168432354927063,
0.0006882064044475555,
0.05678433179855347,
0.5000719428062439,
0.22395488619804382,
-0.031357500702142715,
0.29606834053993225,
-0.1922549307346344,
-0.008069107308983803,
0.09960690885782242,
0.4255182445049286,
0.055204495787620544,
-0.020357489585876465,
0.020642979070544243,
0.06161028519272804,
-0.06182585656642914,
0.3004988431930542,
-0.18514108657836914,
-0.11373257637023926,
-0.016900280490517616,
0.22463659942150116,
0.18969035148620605,
-0.23666641116142273,
0.24669593572616577,
-0.025268875062465668,
-0.05905590578913689,
-0.3976385295391083,
0.04664454981684685,
0.050880469381809235,
0.052710168063640594,
-0.43436503410339355,
0.14126935601234436,
0.06848984956741333,
-0.2204381823539734,
0.310384601354599,
0.025306548923254013,
0.05805348604917526,
0.04650194197893143,
0.0719422772526741,
-0.010221034288406372,
-0.17574113607406616,
0.09890732914209366,
-0.020661987364292145,
0.6123805046081543,
-0.09465879946947098,
0.19244572520256042,
0.03223804756999016,
0.02225688472390175,
0.1166168749332428,
0.14438655972480774,
0.23535707592964172,
-0.10595506429672241,
-0.22533445060253143,
0.5167564153671265,
0.026738904416561127,
0.05387439578771591,
0.06503250449895859,
0.37609609961509705,
-0.22827965021133423,
0.08225293457508087,
0.1908716857433319,
0.245012104511261,
0.7025813460350037,
-0.31166625022888184,
-0.1489875316619873,
0.25145283341407776,
-0.14052559435367584,
0.08397309482097626,
0.06833934783935547,
0.23002611100673676,
0.17440566420555115,
0.5078560709953308,
0.41766050457954407,
0.038973189890384674,
-0.03479689359664917,
0.059323251247406006,
0.29197704792022705,
0.40677136182785034,
0.26384323835372925,
0.08454612642526627,
-0.41784700751304626,
0.17092730104923248,
0.44853776693344116,
-0.050978243350982666,
0.18374748528003693,
-0.14549818634986877,
0.2886240780353546,
-0.15148642659187317,
-0.45428621768951416,
0.24121230840682983,
0.46259206533432007,
-0.2568872272968292,
-0.21572798490524292,
-0.07062893360853195,
0.03103519231081009,
0.015463650226593018,
0.20830076932907104,
-0.05521679297089577,
-0.20737792551517487,
0.32180532813072205,
0.14159908890724182,
0.37793493270874023,
0.04899642616510391,
-0.502740740776062,
-0.060542456805706024,
0.48173680901527405,
-0.16337358951568604,
0.2703011631965637,
-0.49055540561676025,
0.17574858665466309,
-0.09914825856685638,
0.304995596408844,
0.11637011915445328,
0.2764873504638672,
-0.1802886724472046,
0.13634304702281952,
-0.15744322538375854,
0.14844778180122375,
-0.0652451366186142,
0.38016214966773987,
0.053278546780347824,
-0.029018953442573547,
0.22078092396259308,
-0.05127565562725067,
-0.07583413273096085,
-0.29986998438835144,
-0.011421728879213333,
0.03153306245803833,
-0.057013146579265594,
0.10499650985002518,
-0.011832650750875473,
-0.27469611167907715,
0.0697411596775055,
0.08707225322723389,
-0.23963162302970886,
0.3263981342315674,
0.4535250961780548,
-0.5038094520568848,
0.05470278114080429,
-0.14926742017269135,
0.009301319718360901,
0.18495060503482819,
0.494207501411438,
0.2574091851711273,
0.24625584483146667,
-0.3943288326263428,
-0.44429516792297363,
-0.3221706449985504,
-0.1283353865146637,
0.096635602414608,
0.3910455107688904,
-0.18554170429706573,
-0.22407974302768707,
0.12067671865224838,
0.3156248927116394,
0.05343368649482727,
-0.3320094048976898,
-0.3001682460308075,
0.03783358260989189,
-0.1248190701007843,
0.4615344703197479,
-0.25637996196746826,
0.23602603375911713,
0.09241386502981186,
-0.10394809395074844,
0.22454722225666046,
0.19034475088119507,
-0.1440107226371765,
-0.1384839117527008,
0.23914194107055664,
-0.15074284374713898,
-0.4892372786998749,
0.6226992607116699,
0.13745346665382385,
0.09947536140680313,
-0.01971885934472084,
0.0820709690451622,
0.3663122355937958,
0.1258162409067154,
-0.06487752497196198,
0.3083529770374298,
-0.05798519775271416,
0.08055674284696579,
-0.2694168984889984,
-0.27074331045150757,
-0.07144557684659958,
-0.2803928256034851,
0.09219232201576233,
-0.3617859184741974,
-0.06515512615442276,
-0.18475228548049927,
-0.026044104248285294,
-0.13024437427520752,
0.22015729546546936,
0.4941646158695221,
0.0862252414226532,
-0.05442027002573013,
-0.25926804542541504,
-0.10627029091119766,
0.2516292333602905,
-0.5578225255012512,
-0.14247998595237732,
-0.044204723089933395,
-0.15773940086364746,
0.11058175563812256,
-0.01388767920434475,
-0.6040395498275757,
-0.26789751648902893,
0.2332465797662735,
-0.013220984488725662,
-0.2900610566139221,
0.19755351543426514,
-0.2681354284286499,
-0.25476861000061035,
-0.16943185031414032,
0.3933819532394409,
-0.286465048789978,
-0.2742955684661865,
-0.14680755138397217,
-0.21905237436294556
] |
https://github.com/huggingface/datasets/issues/4911 | [Tests] Ensure `datasets` supports renamed repositories | You could also switch to using `huggingface_hub` more directly, where such a guarantee is already tested =)
cc @Wauplin | On https://hf.co/datasets you can rename a dataset (or sometimes move it to another user/org). The website handles redirections correctly and AFAIK `datasets` does as well.
However it would be nice to have an integration test to make sure we don't break support for renamed datasets.
To implement this we can use the /api/repos/move endpoint on hub-ci to rename/move a repo (it is documented at https://huggingface.co/docs/hub/api) | 19 | [Tests] Ensure `datasets` supports renamed repositories
On https://hf.co/datasets you can rename a dataset (or sometimes move it to another user/org). The website handles redirections correctly and AFAIK `datasets` does as well.
However it would be nice to have an integration test to make sure we don't break support for renamed datasets.
To implement this we can use the /api/repos/move endpoint on hub-ci to rename/move a repo (it is documented at https://huggingface.co/docs/hub/api)
You could also switch to using `huggingface_hub` more directly, where such a guarantee is already tested =)
cc @Wauplin | [
-0.010479379445314407,
0.007558867335319519,
-0.09012259542942047,
-0.17886166274547577,
0.16744142770767212,
0.038315825164318085,
0.3702643811702728,
0.2152164727449417,
0.20627954602241516,
0.131017804145813,
-0.44258925318717957,
0.08228754252195358,
0.2687171995639801,
0.24720646440982819,
0.09828037768602371,
0.1505219042301178,
0.2919614315032959,
-0.08708210289478302,
-0.12606151401996613,
-0.14945143461227417,
-0.1737038940191269,
-0.011148596182465553,
-0.02777397632598877,
0.19418814778327942,
-0.12257041037082672,
-0.01726931519806385,
-0.025530699640512466,
0.30929720401763916,
-0.1253814846277237,
-0.37357646226882935,
0.23995409905910492,
0.6462088823318481,
-0.19776253402233124,
0.977144181728363,
-0.00010879682668019086,
0.025366589426994324,
0.25075340270996094,
0.06919672340154648,
-0.5072003602981567,
-0.36493784189224243,
-0.2957952320575714,
0.12035560607910156,
-0.19712689518928528,
-0.1060125082731247,
-0.1654425859451294,
0.2028988152742386,
-0.010298153385519981,
-0.04873424768447876,
0.09220180660486221,
0.33333227038383484,
0.24434463679790497,
0.4198608100414276,
-0.10885536670684814,
-0.3025170862674713,
0.05840529501438141,
0.3466995358467102,
-0.29006558656692505,
0.3018709719181061,
0.019714877009391785,
0.2504640519618988,
0.03459480032324791,
0.341947466135025,
0.10390892624855042,
0.25420087575912476,
0.2183757722377777,
-0.08101315051317215,
-0.09036653488874435,
-0.05883300304412842,
0.019253235310316086,
0.23341384530067444,
0.25661569833755493,
-0.3227628171443939,
-0.48717886209487915,
-0.20633956789970398,
0.0317411944270134,
0.07234297692775726,
0.2463551163673401,
-0.10310047119855881,
0.12451159954071045,
0.16846345365047455,
-0.22249311208724976,
-0.5179853439331055,
-0.0033320412039756775,
-0.026320651173591614,
-0.19990946352481842,
0.22134393453598022,
-0.07428251206874847,
0.07314668595790863,
0.05001363158226013,
-0.02160368487238884,
0.04245472699403763,
0.005842464044690132,
-0.19147281348705292,
-0.10788659751415253,
-0.03937588259577751,
-0.18995188176631927,
0.043484658002853394,
0.46114498376846313,
0.43418753147125244,
0.14103254675865173,
-0.22840949892997742,
0.059900909662246704,
-0.3486243486404419,
0.07026244699954987,
-0.08690701425075531,
0.14283670485019684,
0.13087056577205658,
0.16402371227741241,
0.5423105359077454,
0.44806763529777527,
0.026002448052167892,
0.05296436697244644,
0.08628249168395996,
0.05750865116715431,
-0.3474978804588318,
-0.4159010052680969,
0.317107617855072,
-0.28070229291915894,
-0.23944556713104248,
-0.025464121252298355,
0.04584167152643204,
0.03282540664076805,
0.09540217369794846,
0.4876375198364258,
-0.05155675858259201,
-0.02865177020430565,
-0.12583589553833008,
0.369051456451416,
-0.12441682815551758,
0.22128869593143463,
-0.2775481641292572,
-0.012137889862060547,
-0.2239273190498352,
0.19192473590373993,
0.16654081642627716,
-0.2889117896556854,
0.21433986723423004,
-0.15954911708831787,
0.3801390528678894,
-0.12129680812358856,
-0.21067596971988678,
0.2880271077156067,
0.13644441962242126,
0.3097050189971924,
0.0064864568412303925,
0.06469445675611496,
-0.0031723305583000183,
-0.2303675264120102,
-0.17688310146331787,
-0.11137878149747849,
-0.4177914261817932,
-0.09691452234983444,
0.04064275696873665,
0.18714511394500732,
-0.2027314454317093,
-0.05218100547790527,
-0.26788634061813354,
0.15187987685203552,
-0.29560795426368713,
-0.05148104578256607,
0.21342676877975464,
0.2183556705713272,
0.06829974055290222,
0.06841123849153519,
-0.05043041706085205,
0.3471947908401489,
0.43069666624069214,
-0.3314721882343292,
0.10464103519916534,
0.006630605086684227,
-0.2699841260910034,
0.07163045555353165,
-0.14280273020267487,
-0.13571271300315857,
-0.3109481930732727,
0.1305243968963623,
0.23222994804382324,
-0.708367109298706,
-0.19021759927272797,
0.001375117339193821,
-0.26502031087875366,
-0.09406794607639313,
-0.14542430639266968,
-0.19656813144683838,
-0.07448936998844147,
-0.3011491000652313,
-0.20081403851509094,
-0.12906107306480408,
0.07997196167707443,
0.1938193440437317,
-0.2714715301990509,
-0.27415671944618225,
-0.3612394332885742,
-0.12696634232997894,
0.10099387913942337,
0.29027485847473145,
0.10465935617685318,
0.12322112172842026,
0.24196085333824158,
-0.09465284645557404,
0.014000740833580494,
0.05850057303905487,
0.3553740978240967,
0.19749073684215546,
0.006317968014627695,
0.057217277586460114,
-0.2390071451663971,
0.20763349533081055,
-0.06009966507554054,
0.21055656671524048,
0.33630573749542236,
-0.4396696090698242,
-0.4554052948951721,
-0.037524573504924774,
-0.1073971539735794,
-0.20390908420085907,
0.1447911411523819,
0.2422843873500824,
0.08635014295578003,
0.011912059038877487,
-0.23352618515491486,
0.5265349745750427,
-0.04946153610944748,
0.3605576753616333,
-0.2848534882068634,
0.5470230579376221,
0.035246726125478745,
0.14807496964931488,
-0.18707111477851868,
0.20889756083488464,
0.12759897112846375,
-0.2867923378944397,
-0.030889421701431274,
0.36197659373283386,
-0.21459254622459412,
0.14463123679161072,
0.6446120142936707,
0.12487177550792694,
0.3085837960243225,
-0.05813775584101677,
-0.03005448542535305,
-0.1230865865945816,
0.00662433635443449,
0.19645601511001587,
-0.15926125645637512,
0.19473007321357727,
-0.22386334836483002,
0.19810310006141663,
-0.02542167901992798,
-0.03102404996752739,
0.386996328830719,
-0.2633136510848999,
-0.27740374207496643,
-0.14905554056167603,
-0.04908336326479912,
-0.02755517140030861,
-0.06553192436695099,
-0.0940239280462265,
-0.1824130415916443,
-0.0033078715205192566,
0.25293272733688354,
-0.10560637712478638,
0.04324113205075264,
0.19205224514007568,
-0.1376507580280304,
-0.13147646188735962,
0.2075960338115692,
0.09526197612285614,
0.20387592911720276,
0.12913019955158234,
0.0929190069437027,
0.2022034376859665,
0.000782771036028862,
-0.18614822626113892,
0.03980358690023422,
0.1024710088968277,
0.07837605476379395,
-0.10719095915555954,
0.296286016702652,
-0.16964955627918243,
-0.35321593284606934,
-0.17419597506523132,
0.1024513766169548,
0.047220081090927124,
-0.39305567741394043,
-0.1611868441104889,
-0.1347026377916336,
0.030197083950042725,
-0.10128612816333771,
-0.325247585773468,
-0.37589961290359497,
-0.46720027923583984,
0.17182378470897675,
0.4618683159351349,
-0.1341579407453537,
0.2750787138938904,
0.131845623254776,
0.19030344486236572,
-0.27156829833984375,
-0.15071821212768555,
-0.4906460642814636,
-0.09094852954149246,
-0.06344477087259293,
0.08051739633083344,
0.07639463990926743,
0.008011925965547562,
0.3799166679382324,
-0.34274905920028687,
-0.14563781023025513,
-0.5789086222648621,
-0.364333838224411,
0.21934960782527924,
-0.04358937591314316,
0.030699195340275764,
-0.09389401972293854,
0.08401031047105789,
0.030330419540405273,
0.24285487830638885,
0.13589325547218323,
-0.17436878383159637,
-0.17297905683517456,
-0.06994013488292694,
0.061591342091560364,
0.13584955036640167,
-0.03647918254137039,
-0.07008088380098343,
-0.05130137503147125,
-0.3157719671726227,
0.12520940601825714,
-0.0009908489882946014,
-0.19818128645420074,
-0.008195233531296253,
-0.09987904131412506,
-0.01749003306031227,
-0.16715732216835022,
-0.22086647152900696,
-0.4549563527107239,
-0.48213133215904236,
0.0882759764790535,
-0.27850741147994995,
-0.11273841559886932,
0.2271251678466797,
0.046015821397304535,
0.17796871066093445,
-0.08141385018825531,
-0.3951800465583801,
-0.5168476104736328,
-0.0746232122182846,
0.4255748689174652,
0.2549678385257721,
0.10201062262058258,
0.30085518956184387,
-0.0077825491316616535,
-0.19607000052928925,
-0.08418142050504684,
-0.34393513202667236,
0.09329920262098312,
0.28955504298210144,
0.14703558385372162,
-0.034529801458120346,
0.06267746537923813,
-0.1379854381084442,
0.46754157543182373,
0.16692522168159485,
0.02885196916759014,
0.29566359519958496,
-0.13736969232559204,
0.42334556579589844,
-0.1014905497431755,
-0.19759757816791534,
0.20236138999462128,
0.008427292108535767,
-0.011769113130867481,
0.25590944290161133,
0.22454649209976196,
0.24166248738765717,
-0.1513195037841797,
-0.12182779610157013,
-0.17195627093315125,
-0.46905624866485596,
-0.28201615810394287,
-0.29233649373054504,
0.08982470631599426,
0.3738362491130829,
0.059902966022491455,
-0.06435053795576096,
-0.12700335681438446,
0.2328844964504242,
0.4219589829444885,
0.11602894216775894,
-0.016481542959809303,
-0.3922639489173889,
-0.00369293917901814,
-0.5075440406799316,
0.2388075590133667,
-0.06408270448446274,
0.13255919516086578,
-0.025992903858423233,
-0.08279216289520264,
0.07540960609912872,
-0.11704785376787186,
0.26179563999176025,
-0.16237232089042664,
0.08223538100719452,
-0.05752360075712204,
-0.14475680887699127,
-0.08137223869562149,
-0.11017467081546783,
-0.11499644815921783,
0.19105777144432068,
-0.15330740809440613,
0.48399680852890015,
-0.4919432997703552,
-0.3619976341724396,
0.29215723276138306,
-0.15879854559898376,
0.017852377146482468,
0.3275412619113922,
-0.38878798484802246,
-0.6175051331520081,
-0.4853406548500061,
0.18082477152347565,
-0.035644691437482834,
-0.05479627102613449,
-0.2637530267238617,
-0.07472202181816101,
0.046681616455316544,
0.009205155074596405,
0.17596375942230225,
0.36601319909095764,
0.07578082382678986,
0.2980524003505707,
0.028319571167230606,
0.23375803232192993,
0.1375998556613922,
0.42298614978790283,
0.7184172868728638,
-0.07216052711009979,
-0.21667265892028809,
-0.015774033963680267,
0.08295682072639465,
0.01937294751405716,
0.49917927384376526,
0.13586729764938354,
0.29263874888420105,
-0.0075688548386096954,
0.223062664270401,
-0.353088915348053,
0.2628387212753296,
0.26801612973213196,
0.31230998039245605,
-0.563152015209198,
-0.08326908200979233,
0.3699108064174652,
-0.06276817619800568,
-0.1551060676574707,
0.2677069902420044,
0.8654143214225769,
-0.17350491881370544,
0.1920711100101471,
-0.16174840927124023,
0.9775645136833191,
-0.1079898327589035,
-0.024020548909902573,
0.28407347202301025,
-0.3830314874649048,
0.4561288356781006,
-0.19571758806705475,
0.05091739818453789,
-0.2290777713060379,
0.09900196641683578,
-0.10045246034860611,
0.00009886547923088074,
0.19388505816459656,
-0.0872926414012909,
-0.08773276209831238,
0.24790333211421967,
0.04753924906253815,
0.4904060363769531,
-0.002104290761053562,
0.15173287689685822,
-0.12348411232233047,
-0.15968333184719086,
-0.3146325349807739,
0.28122395277023315,
0.029302388429641724,
0.5096262693405151,
-0.05409036576747894,
0.06863364577293396,
-0.34468385577201843,
-0.0538356676697731,
-0.18432483077049255,
-0.10688544064760208,
0.12011822313070297,
-0.23468343913555145,
0.07484221458435059,
-0.030157960951328278,
0.15824852883815765,
-0.1187383234500885,
0.694247841835022,
0.2351464033126831,
-0.3696133494377136,
0.3540042042732239,
-0.3206280767917633,
0.11698558181524277,
0.029878227040171623,
-0.08396406471729279,
0.118003249168396,
-0.133052259683609,
-0.39078977704048157,
-0.029631629586219788,
0.0503903366625309,
-0.16559098660945892,
-0.22561410069465637,
-0.004793122410774231,
0.052740249782800674,
-0.35408860445022583,
0.3621333837509155,
0.3653094172477722,
0.049957338720560074,
-0.2954633831977844,
0.15086723864078522,
-0.11638648808002472,
-0.21422672271728516,
-0.05847785621881485,
0.3021077811717987,
-0.3059893846511841,
-0.262584388256073,
0.2854849100112915,
-0.22240331768989563,
-0.15075184404850006,
0.03525074943900108,
-0.22395579516887665,
-0.016302110627293587,
-0.20179936289787292,
-0.07917440682649612,
0.37077796459198,
-0.42365917563438416,
0.16650690138339996,
-0.021238794550299644,
-0.37127432227134705,
-0.12463810294866562,
0.07411382347345352,
0.1078852117061615,
0.12444669753313065,
-0.05376376211643219,
-0.04721909761428833,
-0.12457285076379776,
0.2076324224472046,
0.09477533400058746,
0.1327473223209381,
0.0628337413072586,
0.2529616355895996,
-0.025010129436850548,
-0.12248307466506958,
-0.3666270971298218,
0.09953434020280838,
-0.4269014000892639,
0.15546341240406036,
-0.17997483909130096,
0.001601971685886383,
0.2781338691711426,
-0.313808798789978,
0.14982759952545166,
-0.09314616024494171,
-0.18520568311214447,
-0.23724016547203064,
-0.28937098383903503,
0.11122319847345352,
0.005147065967321396,
0.12368477135896683,
-0.09016953408718109,
0.05015257000923157,
0.12214648723602295,
-0.19872812926769257,
0.3595108985900879,
0.30886828899383545,
0.097731813788414,
-0.09962178766727448,
0.4352957606315613,
-0.1651744544506073,
0.12317587435245514,
0.18678009510040283,
0.2524046301841736,
0.22651374340057373,
-0.2325916886329651,
0.11491522192955017,
-0.32007160782814026,
-0.06730180978775024,
0.12649022042751312,
0.3839794993400574,
0.33419114351272583,
0.2850292921066284,
0.06572018563747406,
-0.06014414131641388,
0.1906106173992157,
0.09240638464689255,
0.4123401343822479,
0.19433265924453735,
-0.04135087877511978,
-0.09809112548828125,
0.3048606812953949,
0.19751085340976715,
-0.29120782017707825,
-0.13701222836971283,
0.32393136620521545,
-0.29926085472106934,
0.36466556787490845,
0.275872141122818,
0.2654028832912445,
0.29594558477401733,
0.09764377027750015,
0.11110580712556839,
0.3206508755683899,
0.10092362761497498,
0.035092003643512726,
0.0762636810541153,
-0.25937843322753906,
0.3623347282409668,
0.3671075403690338,
-0.09985467791557312,
-0.016779929399490356,
0.13974416255950928,
0.1319708526134491,
0.6879763603210449,
0.08507311344146729,
0.3083353042602539,
0.40732041001319885,
-0.08236157894134521,
-0.04273400828242302,
-0.17165684700012207,
0.24610626697540283,
0.0926138386130333,
0.09482774138450623,
0.13861389458179474,
-0.28244251012802124,
-0.4032289981842041,
-0.1827869564294815,
0.09748094528913498,
-0.11530991643667221,
-0.19610072672367096,
-0.03750019520521164,
-0.08702414482831955,
-0.18858283758163452,
-0.04678550735116005,
-0.11478792130947113,
-0.24293865263462067,
0.2983779311180115,
-0.0878293365240097,
-0.024196527898311615,
-0.5208925604820251,
-0.07233303040266037,
0.0382361002266407,
0.2232300341129303,
0.13241152465343475,
0.13383366167545319,
0.06784188747406006,
-0.15981371700763702,
0.2324860543012619,
0.35964035987854004,
0.13828879594802856,
-0.4472196698188782,
0.1868775486946106,
0.03261561691761017,
0.010654795914888382,
-0.04340801388025284,
-0.04094644635915756,
0.054550494998693466,
-0.19182562828063965,
-0.17052841186523438,
0.0017474871128797531,
0.2713632583618164,
-0.17958717048168182,
0.023943930864334106,
-0.2772146463394165,
-0.03786838427186012,
-0.15729974210262299,
0.5933671593666077,
-0.17554859817028046,
0.07170075923204422,
-0.3473507761955261,
0.04985944181680679,
-0.08036870509386063,
0.23445430397987366,
0.37559303641319275,
-0.29642757773399353,
0.05438760668039322,
-0.175990492105484,
0.08162017166614532,
0.30012452602386475,
0.341209352016449,
0.14769247174263,
-0.019038349390029907,
-0.06955140084028244,
-0.253116250038147,
-0.3721088469028473,
0.268818736076355,
0.0054725222289562225,
0.1028464287519455,
-0.06652320176362991,
-0.1260213553905487,
-0.008286505937576294,
-0.04107555001974106,
0.21508929133415222,
-0.4564701318740845,
0.1620435118675232,
-0.04627804458141327,
-0.1873941570520401,
0.08391466736793518,
-0.38569343090057373,
0.10650268942117691,
0.1577548384666443,
-0.168998122215271,
0.2509934604167938,
0.3065629005432129,
-0.08606446534395218,
0.15817618370056152,
0.19283434748649597,
0.1978452354669571,
-0.6455428600311279,
0.16418832540512085,
0.14766979217529297,
0.006604701280593872,
-0.1038847416639328,
-0.11257753521203995,
-0.21605002880096436,
-0.3572334051132202,
-0.26106011867523193,
-0.03165603429079056,
-0.3007568418979645,
0.06631642580032349,
0.0517321452498436,
-0.15742188692092896,
-0.033465202897787094,
0.048442766070365906,
0.2988443374633789,
0.20046831667423248,
-0.1774369776248932,
0.13916979730129242,
0.06278663873672485,
-0.003244232153519988,
0.2389058619737625,
0.35256680846214294,
0.10188157856464386,
0.07826519757509232,
-0.21836620569229126,
-0.29627203941345215,
0.8004240989685059,
-0.04752318188548088,
-0.30066344141960144,
-0.018959766253829002,
0.351951539516449,
0.11567197740077972,
-0.5643709897994995,
-0.5247330069541931,
0.18359923362731934,
0.08625473827123642,
0.07185433804988861,
-0.19243298470973969,
0.2240545004606247,
-0.11255018413066864,
0.061629120260477066,
-0.13361209630966187,
0.20441754162311554,
0.09652923792600632,
-0.15856583416461945,
0.28901901841163635,
0.1318662017583847
] |
https://github.com/huggingface/datasets/issues/4910 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder() | I am getting similar error - `TypeError: type object got multiple values for keyword argument 'name'` while following this [tutorial](https://huggingface.co/docs/datasets/dataset_script#create-a-dataset-loading-script). I am getting this error with the `dataset-cli test` command.
`datasets` version: 2.4.0 | ## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
| 33 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder()
## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
I am getting similar error - `TypeError: type object got multiple values for keyword argument 'name'` while following this [tutorial](https://huggingface.co/docs/datasets/dataset_script#create-a-dataset-loading-script). I am getting this error with the `dataset-cli test` command.
`datasets` version: 2.4.0 | [
-0.08519301563501358,
-0.14594313502311707,
0.006792660802602768,
0.4719575047492981,
0.27088138461112976,
0.08011270314455032,
0.24027591943740845,
0.1089896708726883,
-0.2414916455745697,
0.15479227900505066,
-0.09932543337345123,
0.3852587640285492,
-0.030969001352787018,
0.24276365339756012,
0.06773883104324341,
-0.03544536232948303,
0.054739415645599365,
0.06146349385380745,
-0.2279936671257019,
0.12118467688560486,
-0.21832925081253052,
0.2624109387397766,
-0.020392369478940964,
0.25486302375793457,
-0.3395843505859375,
-0.10613759607076645,
-0.24992352724075317,
0.031117435544729233,
0.014837938360869884,
-0.4849989414215088,
0.31618157029151917,
0.13647474348545074,
-0.1703227311372757,
0.6551611423492432,
-0.00011286996596027166,
0.16506776213645935,
0.23495176434516907,
0.1325702965259552,
-0.5751627683639526,
-0.21676503121852875,
-0.05722127854824066,
0.008684549480676651,
0.08764950186014175,
-0.3176528513431549,
0.13384458422660828,
-0.14094997942447662,
-0.15338554978370667,
-0.10389886796474457,
0.38512033224105835,
0.05811421945691109,
0.17437338829040527,
0.2745927572250366,
0.028946805745363235,
-0.07463809102773666,
-0.04037842899560928,
0.06256090849637985,
-0.1101265549659729,
0.13717493414878845,
-0.2049751877784729,
0.2105477750301361,
0.06919534504413605,
0.1355566680431366,
-0.24306444823741913,
0.02049260027706623,
0.5361902713775635,
-0.04544783756136894,
0.17179381847381592,
-0.22794228792190552,
0.16312538087368011,
0.23452553153038025,
0.08205421268939972,
-0.43653562664985657,
-0.4073426425457001,
-0.5173814296722412,
0.0876118391752243,
-0.107334204018116,
0.282135933637619,
0.15203073620796204,
-0.3582257032394409,
-0.12245604395866394,
-0.07505388557910919,
-0.0042612734250724316,
-0.0016531571745872498,
0.07943063974380493,
0.1254553496837616,
0.1809983253479004,
-0.1276191920042038,
0.16871926188468933,
0.3222739100456238,
-0.07918091118335724,
-0.05021548271179199,
-0.5685057640075684,
-0.1787455528974533,
0.03454909101128578,
-0.04429638013243675,
0.20805397629737854,
0.06080795079469681,
0.38588112592697144,
0.5216395258903503,
-0.34687352180480957,
-0.03800837695598602,
-0.16286993026733398,
0.11662688851356506,
0.13898925483226776,
0.34274548292160034,
0.2298440784215927,
0.35447701811790466,
0.08471644669771194,
0.0071446336805820465,
0.1768621951341629,
-0.422379732131958,
-0.02075302228331566,
0.0821656584739685,
-0.18779443204402924,
0.14866741001605988,
0.03792339935898781,
0.5304942727088928,
0.1173870861530304,
-0.1371062695980072,
-0.14625871181488037,
-0.06090337410569191,
-0.14173705875873566,
0.1668754518032074,
0.28391560912132263,
0.04657460004091263,
0.07618536800146103,
0.0294359028339386,
0.3637068271636963,
-0.024139316752552986,
-0.1479981243610382,
-0.21447676420211792,
-0.007654029875993729,
-0.19244830310344696,
0.09213639795780182,
-0.04483027011156082,
-0.5829445123672485,
0.24345427751541138,
0.3944115936756134,
0.08613868057727814,
-0.3127298653125763,
-0.11282716691493988,
0.13183395564556122,
-0.2910442650318146,
-0.0518706850707531,
-0.14534637331962585,
0.4744473099708557,
0.02490926720201969,
-0.18245066702365875,
-0.20523688197135925,
-0.19515946507453918,
-0.3722633421421051,
-0.32103845477104187,
0.11706186830997467,
0.1901029497385025,
-0.13670295476913452,
0.20555110275745392,
-0.44215914607048035,
0.021724138408899307,
0.25424984097480774,
0.017691057175397873,
-0.2308785319328308,
-0.04370591789484024,
-0.3340532183647156,
-0.3247619569301605,
0.15836256742477417,
0.48256534337997437,
0.11942628026008606,
-0.32447656989097595,
-0.13321299850940704,
0.17104367911815643,
-0.1105993315577507,
0.001449301838874817,
-0.41569340229034424,
0.5486012697219849,
-0.34069666266441345,
0.14723694324493408,
0.49837759137153625,
-0.17491915822029114,
-0.1170329749584198,
0.35693785548210144,
0.04424073547124863,
0.2540223300457001,
0.23949885368347168,
-0.2880409061908722,
-0.16898733377456665,
-0.011639201082289219,
0.13137286901474,
0.11549381166696548,
0.09703385084867477,
0.1863536536693573,
-0.07208900153636932,
-0.2772684395313263,
0.1306408792734146,
-0.30968254804611206,
-0.18344521522521973,
0.01441173255443573,
-0.1269494593143463,
0.10822348296642303,
0.2312471866607666,
-0.34139585494995117,
-0.15581844747066498,
0.17981399595737457,
-0.051369559019804,
0.057915981858968735,
-0.08353723585605621,
-0.07854217290878296,
-0.6448091864585876,
0.29318368434906006,
-0.16519415378570557,
0.15125589072704315,
-0.2257334142923355,
-0.38054358959198,
-0.23676654696464539,
0.24898992478847504,
-0.45464029908180237,
-0.0911744087934494,
0.16519838571548462,
0.27198463678359985,
-0.12215860188007355,
0.14374014735221863,
-0.12931884825229645,
-0.041844502091407776,
0.04398707300424576,
0.14157149195671082,
-0.20059917867183685,
0.12697800993919373,
-0.3418159484863281,
-0.007650335319340229,
0.00901496410369873,
0.2006816565990448,
0.3212139308452606,
-0.015710169449448586,
0.015980340540409088,
0.27306193113327026,
-0.11481861770153046,
0.230036661028862,
-0.15306362509727478,
0.14120620489120483,
0.23116815090179443,
0.26302072405815125,
0.03145214542746544,
0.08611859381198883,
0.12535466253757477,
-0.11900001019239426,
0.3160568177700043,
0.4567224383354187,
0.27438685297966003,
0.46601971983909607,
0.10743984580039978,
-0.004676584154367447,
-0.08210502564907074,
0.03603028878569603,
0.032734885811805725,
-0.2216217964887619,
0.13999687135219574,
-0.16471204161643982,
0.18515539169311523,
0.22801610827445984,
-0.05310085415840149,
0.17010554671287537,
0.3884848356246948,
0.08949494361877441,
0.1526886224746704,
-0.06775888800621033,
-0.12134843319654465,
0.07633916288614273,
-0.0912986621260643,
0.27382102608680725,
0.2382635623216629,
0.06876310706138611,
-0.08204466104507446,
0.10657830536365509,
-0.16888666152954102,
-0.018857508897781372,
0.23925593495368958,
0.34763282537460327,
0.06919338554143906,
0.13268113136291504,
0.02642500400543213,
0.0426197312772274,
-0.2447521686553955,
-0.023488808423280716,
0.02052462287247181,
0.010220710188150406,
-0.4857616424560547,
0.281681627035141,
-0.26339980959892273,
-0.13183081150054932,
-0.3286435306072235,
-0.03496736288070679,
-0.3447872996330261,
-0.4871562421321869,
-0.15020200610160828,
0.04787465184926987,
-0.21012647449970245,
0.16149315237998962,
-0.187832772731781,
0.1008714884519577,
-0.02852526679635048,
-0.00044582970440387726,
-0.12571419775485992,
-0.15545088052749634,
-0.24372276663780212,
-0.12246982753276825,
0.47471368312835693,
-0.11733333766460419,
0.1498989313840866,
-0.08419216424226761,
-0.17614580690860748,
-0.11680852621793747,
-0.2923862934112549,
0.3260782063007355,
-0.10809668898582458,
0.5198299288749695,
0.3955690264701843,
0.27974435687065125,
0.08574675023555756,
-0.7071952819824219,
0.5273146629333496,
0.13888223469257355,
-0.012812291271984577,
0.2169605940580368,
0.02029380388557911,
-0.05989551171660423,
-0.10167527198791504,
-0.060538552701473236,
0.19594986736774445,
-0.3254178464412689,
-0.015394531190395355,
-0.12702089548110962,
0.12321306020021439,
0.5703558325767517,
0.2826966941356659,
0.12998731434345245,
-0.39296287298202515,
0.36304861307144165,
-0.07958472520112991,
-0.1020592749118805,
0.06975876539945602,
-0.06895814836025238,
-0.24356453120708466,
-0.2104908674955368,
-0.1625443696975708,
0.3503536880016327,
-0.2534930109977722,
-0.3982998728752136,
-0.3161853849887848,
-0.21541672945022583,
0.43021905422210693,
0.17269738018512726,
0.09278323501348495,
-0.28115352988243103,
0.2967935800552368,
-0.06286539882421494,
-0.13380512595176697,
-0.16837117075920105,
0.25808003544807434,
-0.13730260729789734,
0.1453358232975006,
0.223155677318573,
0.24498280882835388,
-0.06826747953891754,
0.3269980549812317,
0.34819379448890686,
-0.19053980708122253,
0.4311788082122803,
-0.1365460604429245,
0.34966880083084106,
-0.20850244164466858,
-0.5836889147758484,
-0.34453704953193665,
-0.15398046374320984,
-0.047941338270902634,
0.19266363978385925,
0.04444892704486847,
0.35163331031799316,
-0.17792735993862152,
-0.23908181488513947,
-0.1577083170413971,
-0.5157604217529297,
0.002899063751101494,
-0.009006664156913757,
-0.0823744460940361,
-0.011623687110841274,
0.04215783625841141,
-0.22947609424591064,
0.15282389521598816,
0.25278979539871216,
0.15333810448646545,
-0.0532417818903923,
0.008581395260989666,
-0.28123605251312256,
-0.12414145469665527,
-0.2418815791606903,
0.30487746000289917,
0.067392498254776,
-0.21101875603199005,
0.10935690999031067,
0.1639489233493805,
-0.003054969012737274,
-0.0214706901460886,
0.5779324173927307,
-0.018962854519486427,
0.1991378515958786,
0.06752876937389374,
-0.08183005452156067,
-0.3701930046081543,
-0.056061599403619766,
0.07136590778827667,
0.1983376443386078,
0.28697264194488525,
0.3765125572681427,
-0.5835590958595276,
-0.1810869723558426,
-0.015715409070253372,
0.3340977728366852,
-0.18211133778095245,
-0.1147400289773941,
-0.1655113697052002,
-0.4028494358062744,
-0.2640482485294342,
-0.15972480177879333,
0.08668336272239685,
0.3688933849334717,
0.017163945361971855,
-0.005611930042505264,
0.0021332763135433197,
-0.04059721529483795,
0.12407092750072479,
0.16751116514205933,
0.4992747902870178,
-0.12614451348781586,
0.12278789281845093,
0.05496911704540253,
0.062282729893922806,
0.09040861576795578,
0.6278823018074036,
-0.25038769841194153,
-0.23554947972297668,
-0.3095196783542633,
-0.056172747164964676,
0.22143378853797913,
0.34966903924942017,
-0.19029022753238678,
0.24877718091011047,
0.0655822604894638,
-0.052293673157691956,
-0.15259949862957,
0.002721858210861683,
0.5194914937019348,
0.08793067187070847,
-0.15376435220241547,
-0.5734370350837708,
0.588078498840332,
0.09976918995380402,
-0.1802544742822647,
0.2873460054397583,
0.4528495669364929,
-0.42743515968322754,
0.37027573585510254,
-0.11776223033666611,
0.8632777333259583,
0.18954290449619293,
0.24428917467594147,
0.3900461792945862,
0.09585420787334442,
0.3645685613155365,
0.15402443706989288,
-0.08633636683225632,
-0.3569331169128418,
0.1122409850358963,
0.14670953154563904,
-0.026738887652754784,
0.04832077771425247,
0.16746777296066284,
-0.29633989930152893,
0.18398652970790863,
-0.4132699966430664,
0.29152944684028625,
-0.22493265569210052,
0.26365581154823303,
-0.19731099903583527,
-0.058685678988695145,
-0.4418042302131653,
0.10379794239997864,
-0.05097486823797226,
0.19936878979206085,
0.02190987393260002,
-0.2321079820394516,
0.18327106535434723,
-0.4755513072013855,
-0.2830694019794464,
0.05048806965351105,
-0.33834901452064514,
0.2363026738166809,
0.12344926595687866,
-0.04467986151576042,
0.11878228187561035,
0.46471327543258667,
0.3770855665206909,
0.03344002738595009,
-0.06846162676811218,
0.13245859742164612,
-0.18811437487602234,
-0.02263854630291462,
-0.31649449467658997,
-0.13487108051776886,
0.17723391950130463,
-0.08587317168712616,
-0.13801103830337524,
0.019037991762161255,
-0.043128933757543564,
-0.10810281336307526,
-0.1240658089518547,
-0.05360817909240723,
-0.3734748363494873,
-0.5802383422851562,
-0.13178595900535583,
-0.14860333502292633,
0.10639163851737976,
-0.2842957675457001,
0.0638355165719986,
-0.147508442401886,
-0.28042852878570557,
-0.01583566516637802,
0.1438254863023758,
-0.1403050422668457,
0.09541705250740051,
0.10746492445468903,
0.005422711372375488,
0.13476240634918213,
0.6162465810775757,
0.04773853346705437,
-0.11422525346279144,
-0.08871926367282867,
0.13746947050094604,
0.31087344884872437,
-0.37409770488739014,
0.3050093352794647,
-0.025112776085734367,
-0.045069336891174316,
-0.1480938345193863,
0.732974648475647,
0.17103278636932373,
0.2776179909706116,
0.008606720715761185,
-0.08346216380596161,
-0.05732237547636032,
0.2575116753578186,
-0.03810722753405571,
0.29431837797164917,
0.006985511630773544,
0.029358642175793648,
0.13094070553779602,
0.26390841603279114,
-0.28537890315055847,
-0.08096669614315033,
-0.18314065039157867,
0.045673418790102005,
0.32602807879447937,
-0.07304149866104126,
0.2079375982284546,
0.1280592381954193,
0.1305363029241562,
-0.011515721678733826,
-0.21582093834877014,
-0.15986594557762146,
-0.3132457435131073,
0.1374211311340332,
0.008826394565403461,
0.21152684092521667,
0.08751889318227768,
-0.010876239277422428,
0.23077069222927094,
-0.2788582146167755,
0.31716862320899963,
0.16736170649528503,
-0.031034089624881744,
0.15625327825546265,
0.13662351667881012,
0.20369088649749756,
0.06951181590557098,
0.1423925757408142,
-0.1997145414352417,
0.19290263950824738,
0.3586812913417816,
0.22282999753952026,
-0.12515582144260406,
-0.028817307204008102,
0.052880242466926575,
0.14701208472251892,
-0.18334849178791046,
0.16340017318725586,
0.0925685465335846,
-0.23288147151470184,
-0.09912770986557007,
0.2808533012866974,
0.252600759267807,
0.4642675518989563,
-0.3501046299934387,
0.16490094363689423,
-0.13060808181762695,
0.0920008197426796,
-0.12319470196962357,
-0.296474426984787,
0.2805491089820862,
-0.32026776671409607,
0.041611481457948685,
0.3654356896877289,
0.1862589716911316,
-0.16158033907413483,
-0.1494530737400055,
-0.11335452646017075,
0.35729658603668213,
-0.1114431619644165,
0.40068185329437256,
0.5323944091796875,
0.03944920375943184,
-0.03986449912190437,
0.2974790632724762,
0.259181410074234,
0.08008872717618942,
0.26104187965393066,
-0.4594918489456177,
0.0978689193725586,
0.010390400886535645,
-0.19618958234786987,
0.48240166902542114,
-0.06934194266796112,
0.4847164750099182,
0.27205222845077515,
-0.0869525820016861,
0.012415815144777298,
-0.14669890701770782,
0.3089441657066345,
-0.2319159358739853,
-0.1549394726753235,
-0.29755157232284546,
0.29844191670417786,
-0.21309629082679749,
-0.28461503982543945,
-0.2574390769004822,
-0.2881096303462982,
-0.13378217816352844,
-0.04512994736433029,
-0.04473145678639412,
-0.3223118185997009,
0.37862470746040344,
-0.044959187507629395,
-0.08326703310012817,
-0.214882031083107,
-0.08946149796247482,
0.14780613780021667,
0.08853480219841003,
-0.37906262278556824,
0.2412554919719696,
0.3497841954231262,
0.027483437210321426,
0.04667837172746658,
0.333101749420166,
0.8321417570114136,
0.3508356213569641,
-0.026464387774467468,
0.03932600095868111,
-0.04619738087058067,
0.011306477710604668,
-0.060098085552453995,
-0.19010306894779205,
-0.20099744200706482,
0.18358789384365082,
0.42203307151794434,
0.1010255292057991,
-0.16755127906799316,
-0.3007484972476959,
0.08652520924806595,
0.34449371695518494,
-0.29742276668548584,
0.23916733264923096,
-0.2950367033481598,
-0.021010607481002808,
-0.13583412766456604,
0.28305211663246155,
-0.36508336663246155,
-0.20492611825466156,
0.5070193409919739,
0.07554551213979721,
0.06268440186977386,
-0.2516941428184509,
0.095626100897789,
0.15402017533779144,
0.5281152129173279,
0.14122101664543152,
0.05185745283961296,
-0.43078699707984924,
0.10599282383918762,
-0.5533005595207214,
-0.07547556608915329,
-0.13322237133979797,
-0.11323688924312592,
0.16033492982387543,
0.03736133873462677,
-0.19731000065803528,
0.10727868974208832,
0.1578671783208847,
0.2401515394449234,
0.029125314205884933,
0.037937458604574203,
-0.4085516929626465,
-0.2739596962928772,
0.1890488862991333,
-0.18092584609985352,
0.1925642043352127,
-0.2366178333759308,
0.1463562250137329,
-0.30365774035453796,
0.01740090548992157,
0.07216104120016098,
0.13594892621040344,
0.20686747133731842,
-0.322506844997406,
0.15999072790145874,
0.050935886800289154,
0.5018405914306641,
-0.05515792965888977,
-0.2660669982433319,
-0.24398642778396606,
-0.28833380341529846,
-0.21785663068294525,
0.005787573754787445,
0.09979808330535889,
0.10039680451154709,
-0.3156595528125763,
-0.11289305984973907,
-0.3973327875137329,
0.10145553201436996,
0.20169785618782043,
-0.3076213300228119,
0.021677589043974876,
0.1976681351661682,
-0.07342246919870377,
-0.05770527571439743,
0.13368795812129974,
0.06750214844942093,
-0.04951035976409912,
0.2457188218832016,
-0.009262904524803162,
-0.5538161993026733,
0.7703667283058167,
-0.23501965403556824,
-0.3211057484149933,
-0.06664067506790161,
0.12151135504245758,
0.017082780599594116,
0.020477857440710068,
-0.7054316401481628,
-0.026324063539505005,
0.3465484082698822,
0.08370321989059448,
-0.24896524846553802,
0.1779339462518692,
-0.06699885427951813,
-0.05615312606096268,
0.019067656248807907,
-0.15319453179836273,
0.07188285887241364,
-0.29968953132629395,
0.21892425417900085,
-0.17063772678375244
] |
https://github.com/huggingface/datasets/issues/4910 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder() | In my case, this was happening because I defined multiple `BuilderConfig` for multiple types, but didn't had all the data files that are requierd by those configs.
I think this is different than the original issue by @bablf . | ## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
| 39 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder()
## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
In my case, this was happening because I defined multiple `BuilderConfig` for multiple types, but didn't had all the data files that are requierd by those configs.
I think this is different than the original issue by @bablf . | [
-0.08519301563501358,
-0.14594313502311707,
0.006792660802602768,
0.4719575047492981,
0.27088138461112976,
0.08011270314455032,
0.24027591943740845,
0.1089896708726883,
-0.2414916455745697,
0.15479227900505066,
-0.09932543337345123,
0.3852587640285492,
-0.030969001352787018,
0.24276365339756012,
0.06773883104324341,
-0.03544536232948303,
0.054739415645599365,
0.06146349385380745,
-0.2279936671257019,
0.12118467688560486,
-0.21832925081253052,
0.2624109387397766,
-0.020392369478940964,
0.25486302375793457,
-0.3395843505859375,
-0.10613759607076645,
-0.24992352724075317,
0.031117435544729233,
0.014837938360869884,
-0.4849989414215088,
0.31618157029151917,
0.13647474348545074,
-0.1703227311372757,
0.6551611423492432,
-0.00011286996596027166,
0.16506776213645935,
0.23495176434516907,
0.1325702965259552,
-0.5751627683639526,
-0.21676503121852875,
-0.05722127854824066,
0.008684549480676651,
0.08764950186014175,
-0.3176528513431549,
0.13384458422660828,
-0.14094997942447662,
-0.15338554978370667,
-0.10389886796474457,
0.38512033224105835,
0.05811421945691109,
0.17437338829040527,
0.2745927572250366,
0.028946805745363235,
-0.07463809102773666,
-0.04037842899560928,
0.06256090849637985,
-0.1101265549659729,
0.13717493414878845,
-0.2049751877784729,
0.2105477750301361,
0.06919534504413605,
0.1355566680431366,
-0.24306444823741913,
0.02049260027706623,
0.5361902713775635,
-0.04544783756136894,
0.17179381847381592,
-0.22794228792190552,
0.16312538087368011,
0.23452553153038025,
0.08205421268939972,
-0.43653562664985657,
-0.4073426425457001,
-0.5173814296722412,
0.0876118391752243,
-0.107334204018116,
0.282135933637619,
0.15203073620796204,
-0.3582257032394409,
-0.12245604395866394,
-0.07505388557910919,
-0.0042612734250724316,
-0.0016531571745872498,
0.07943063974380493,
0.1254553496837616,
0.1809983253479004,
-0.1276191920042038,
0.16871926188468933,
0.3222739100456238,
-0.07918091118335724,
-0.05021548271179199,
-0.5685057640075684,
-0.1787455528974533,
0.03454909101128578,
-0.04429638013243675,
0.20805397629737854,
0.06080795079469681,
0.38588112592697144,
0.5216395258903503,
-0.34687352180480957,
-0.03800837695598602,
-0.16286993026733398,
0.11662688851356506,
0.13898925483226776,
0.34274548292160034,
0.2298440784215927,
0.35447701811790466,
0.08471644669771194,
0.0071446336805820465,
0.1768621951341629,
-0.422379732131958,
-0.02075302228331566,
0.0821656584739685,
-0.18779443204402924,
0.14866741001605988,
0.03792339935898781,
0.5304942727088928,
0.1173870861530304,
-0.1371062695980072,
-0.14625871181488037,
-0.06090337410569191,
-0.14173705875873566,
0.1668754518032074,
0.28391560912132263,
0.04657460004091263,
0.07618536800146103,
0.0294359028339386,
0.3637068271636963,
-0.024139316752552986,
-0.1479981243610382,
-0.21447676420211792,
-0.007654029875993729,
-0.19244830310344696,
0.09213639795780182,
-0.04483027011156082,
-0.5829445123672485,
0.24345427751541138,
0.3944115936756134,
0.08613868057727814,
-0.3127298653125763,
-0.11282716691493988,
0.13183395564556122,
-0.2910442650318146,
-0.0518706850707531,
-0.14534637331962585,
0.4744473099708557,
0.02490926720201969,
-0.18245066702365875,
-0.20523688197135925,
-0.19515946507453918,
-0.3722633421421051,
-0.32103845477104187,
0.11706186830997467,
0.1901029497385025,
-0.13670295476913452,
0.20555110275745392,
-0.44215914607048035,
0.021724138408899307,
0.25424984097480774,
0.017691057175397873,
-0.2308785319328308,
-0.04370591789484024,
-0.3340532183647156,
-0.3247619569301605,
0.15836256742477417,
0.48256534337997437,
0.11942628026008606,
-0.32447656989097595,
-0.13321299850940704,
0.17104367911815643,
-0.1105993315577507,
0.001449301838874817,
-0.41569340229034424,
0.5486012697219849,
-0.34069666266441345,
0.14723694324493408,
0.49837759137153625,
-0.17491915822029114,
-0.1170329749584198,
0.35693785548210144,
0.04424073547124863,
0.2540223300457001,
0.23949885368347168,
-0.2880409061908722,
-0.16898733377456665,
-0.011639201082289219,
0.13137286901474,
0.11549381166696548,
0.09703385084867477,
0.1863536536693573,
-0.07208900153636932,
-0.2772684395313263,
0.1306408792734146,
-0.30968254804611206,
-0.18344521522521973,
0.01441173255443573,
-0.1269494593143463,
0.10822348296642303,
0.2312471866607666,
-0.34139585494995117,
-0.15581844747066498,
0.17981399595737457,
-0.051369559019804,
0.057915981858968735,
-0.08353723585605621,
-0.07854217290878296,
-0.6448091864585876,
0.29318368434906006,
-0.16519415378570557,
0.15125589072704315,
-0.2257334142923355,
-0.38054358959198,
-0.23676654696464539,
0.24898992478847504,
-0.45464029908180237,
-0.0911744087934494,
0.16519838571548462,
0.27198463678359985,
-0.12215860188007355,
0.14374014735221863,
-0.12931884825229645,
-0.041844502091407776,
0.04398707300424576,
0.14157149195671082,
-0.20059917867183685,
0.12697800993919373,
-0.3418159484863281,
-0.007650335319340229,
0.00901496410369873,
0.2006816565990448,
0.3212139308452606,
-0.015710169449448586,
0.015980340540409088,
0.27306193113327026,
-0.11481861770153046,
0.230036661028862,
-0.15306362509727478,
0.14120620489120483,
0.23116815090179443,
0.26302072405815125,
0.03145214542746544,
0.08611859381198883,
0.12535466253757477,
-0.11900001019239426,
0.3160568177700043,
0.4567224383354187,
0.27438685297966003,
0.46601971983909607,
0.10743984580039978,
-0.004676584154367447,
-0.08210502564907074,
0.03603028878569603,
0.032734885811805725,
-0.2216217964887619,
0.13999687135219574,
-0.16471204161643982,
0.18515539169311523,
0.22801610827445984,
-0.05310085415840149,
0.17010554671287537,
0.3884848356246948,
0.08949494361877441,
0.1526886224746704,
-0.06775888800621033,
-0.12134843319654465,
0.07633916288614273,
-0.0912986621260643,
0.27382102608680725,
0.2382635623216629,
0.06876310706138611,
-0.08204466104507446,
0.10657830536365509,
-0.16888666152954102,
-0.018857508897781372,
0.23925593495368958,
0.34763282537460327,
0.06919338554143906,
0.13268113136291504,
0.02642500400543213,
0.0426197312772274,
-0.2447521686553955,
-0.023488808423280716,
0.02052462287247181,
0.010220710188150406,
-0.4857616424560547,
0.281681627035141,
-0.26339980959892273,
-0.13183081150054932,
-0.3286435306072235,
-0.03496736288070679,
-0.3447872996330261,
-0.4871562421321869,
-0.15020200610160828,
0.04787465184926987,
-0.21012647449970245,
0.16149315237998962,
-0.187832772731781,
0.1008714884519577,
-0.02852526679635048,
-0.00044582970440387726,
-0.12571419775485992,
-0.15545088052749634,
-0.24372276663780212,
-0.12246982753276825,
0.47471368312835693,
-0.11733333766460419,
0.1498989313840866,
-0.08419216424226761,
-0.17614580690860748,
-0.11680852621793747,
-0.2923862934112549,
0.3260782063007355,
-0.10809668898582458,
0.5198299288749695,
0.3955690264701843,
0.27974435687065125,
0.08574675023555756,
-0.7071952819824219,
0.5273146629333496,
0.13888223469257355,
-0.012812291271984577,
0.2169605940580368,
0.02029380388557911,
-0.05989551171660423,
-0.10167527198791504,
-0.060538552701473236,
0.19594986736774445,
-0.3254178464412689,
-0.015394531190395355,
-0.12702089548110962,
0.12321306020021439,
0.5703558325767517,
0.2826966941356659,
0.12998731434345245,
-0.39296287298202515,
0.36304861307144165,
-0.07958472520112991,
-0.1020592749118805,
0.06975876539945602,
-0.06895814836025238,
-0.24356453120708466,
-0.2104908674955368,
-0.1625443696975708,
0.3503536880016327,
-0.2534930109977722,
-0.3982998728752136,
-0.3161853849887848,
-0.21541672945022583,
0.43021905422210693,
0.17269738018512726,
0.09278323501348495,
-0.28115352988243103,
0.2967935800552368,
-0.06286539882421494,
-0.13380512595176697,
-0.16837117075920105,
0.25808003544807434,
-0.13730260729789734,
0.1453358232975006,
0.223155677318573,
0.24498280882835388,
-0.06826747953891754,
0.3269980549812317,
0.34819379448890686,
-0.19053980708122253,
0.4311788082122803,
-0.1365460604429245,
0.34966880083084106,
-0.20850244164466858,
-0.5836889147758484,
-0.34453704953193665,
-0.15398046374320984,
-0.047941338270902634,
0.19266363978385925,
0.04444892704486847,
0.35163331031799316,
-0.17792735993862152,
-0.23908181488513947,
-0.1577083170413971,
-0.5157604217529297,
0.002899063751101494,
-0.009006664156913757,
-0.0823744460940361,
-0.011623687110841274,
0.04215783625841141,
-0.22947609424591064,
0.15282389521598816,
0.25278979539871216,
0.15333810448646545,
-0.0532417818903923,
0.008581395260989666,
-0.28123605251312256,
-0.12414145469665527,
-0.2418815791606903,
0.30487746000289917,
0.067392498254776,
-0.21101875603199005,
0.10935690999031067,
0.1639489233493805,
-0.003054969012737274,
-0.0214706901460886,
0.5779324173927307,
-0.018962854519486427,
0.1991378515958786,
0.06752876937389374,
-0.08183005452156067,
-0.3701930046081543,
-0.056061599403619766,
0.07136590778827667,
0.1983376443386078,
0.28697264194488525,
0.3765125572681427,
-0.5835590958595276,
-0.1810869723558426,
-0.015715409070253372,
0.3340977728366852,
-0.18211133778095245,
-0.1147400289773941,
-0.1655113697052002,
-0.4028494358062744,
-0.2640482485294342,
-0.15972480177879333,
0.08668336272239685,
0.3688933849334717,
0.017163945361971855,
-0.005611930042505264,
0.0021332763135433197,
-0.04059721529483795,
0.12407092750072479,
0.16751116514205933,
0.4992747902870178,
-0.12614451348781586,
0.12278789281845093,
0.05496911704540253,
0.062282729893922806,
0.09040861576795578,
0.6278823018074036,
-0.25038769841194153,
-0.23554947972297668,
-0.3095196783542633,
-0.056172747164964676,
0.22143378853797913,
0.34966903924942017,
-0.19029022753238678,
0.24877718091011047,
0.0655822604894638,
-0.052293673157691956,
-0.15259949862957,
0.002721858210861683,
0.5194914937019348,
0.08793067187070847,
-0.15376435220241547,
-0.5734370350837708,
0.588078498840332,
0.09976918995380402,
-0.1802544742822647,
0.2873460054397583,
0.4528495669364929,
-0.42743515968322754,
0.37027573585510254,
-0.11776223033666611,
0.8632777333259583,
0.18954290449619293,
0.24428917467594147,
0.3900461792945862,
0.09585420787334442,
0.3645685613155365,
0.15402443706989288,
-0.08633636683225632,
-0.3569331169128418,
0.1122409850358963,
0.14670953154563904,
-0.026738887652754784,
0.04832077771425247,
0.16746777296066284,
-0.29633989930152893,
0.18398652970790863,
-0.4132699966430664,
0.29152944684028625,
-0.22493265569210052,
0.26365581154823303,
-0.19731099903583527,
-0.058685678988695145,
-0.4418042302131653,
0.10379794239997864,
-0.05097486823797226,
0.19936878979206085,
0.02190987393260002,
-0.2321079820394516,
0.18327106535434723,
-0.4755513072013855,
-0.2830694019794464,
0.05048806965351105,
-0.33834901452064514,
0.2363026738166809,
0.12344926595687866,
-0.04467986151576042,
0.11878228187561035,
0.46471327543258667,
0.3770855665206909,
0.03344002738595009,
-0.06846162676811218,
0.13245859742164612,
-0.18811437487602234,
-0.02263854630291462,
-0.31649449467658997,
-0.13487108051776886,
0.17723391950130463,
-0.08587317168712616,
-0.13801103830337524,
0.019037991762161255,
-0.043128933757543564,
-0.10810281336307526,
-0.1240658089518547,
-0.05360817909240723,
-0.3734748363494873,
-0.5802383422851562,
-0.13178595900535583,
-0.14860333502292633,
0.10639163851737976,
-0.2842957675457001,
0.0638355165719986,
-0.147508442401886,
-0.28042852878570557,
-0.01583566516637802,
0.1438254863023758,
-0.1403050422668457,
0.09541705250740051,
0.10746492445468903,
0.005422711372375488,
0.13476240634918213,
0.6162465810775757,
0.04773853346705437,
-0.11422525346279144,
-0.08871926367282867,
0.13746947050094604,
0.31087344884872437,
-0.37409770488739014,
0.3050093352794647,
-0.025112776085734367,
-0.045069336891174316,
-0.1480938345193863,
0.732974648475647,
0.17103278636932373,
0.2776179909706116,
0.008606720715761185,
-0.08346216380596161,
-0.05732237547636032,
0.2575116753578186,
-0.03810722753405571,
0.29431837797164917,
0.006985511630773544,
0.029358642175793648,
0.13094070553779602,
0.26390841603279114,
-0.28537890315055847,
-0.08096669614315033,
-0.18314065039157867,
0.045673418790102005,
0.32602807879447937,
-0.07304149866104126,
0.2079375982284546,
0.1280592381954193,
0.1305363029241562,
-0.011515721678733826,
-0.21582093834877014,
-0.15986594557762146,
-0.3132457435131073,
0.1374211311340332,
0.008826394565403461,
0.21152684092521667,
0.08751889318227768,
-0.010876239277422428,
0.23077069222927094,
-0.2788582146167755,
0.31716862320899963,
0.16736170649528503,
-0.031034089624881744,
0.15625327825546265,
0.13662351667881012,
0.20369088649749756,
0.06951181590557098,
0.1423925757408142,
-0.1997145414352417,
0.19290263950824738,
0.3586812913417816,
0.22282999753952026,
-0.12515582144260406,
-0.028817307204008102,
0.052880242466926575,
0.14701208472251892,
-0.18334849178791046,
0.16340017318725586,
0.0925685465335846,
-0.23288147151470184,
-0.09912770986557007,
0.2808533012866974,
0.252600759267807,
0.4642675518989563,
-0.3501046299934387,
0.16490094363689423,
-0.13060808181762695,
0.0920008197426796,
-0.12319470196962357,
-0.296474426984787,
0.2805491089820862,
-0.32026776671409607,
0.041611481457948685,
0.3654356896877289,
0.1862589716911316,
-0.16158033907413483,
-0.1494530737400055,
-0.11335452646017075,
0.35729658603668213,
-0.1114431619644165,
0.40068185329437256,
0.5323944091796875,
0.03944920375943184,
-0.03986449912190437,
0.2974790632724762,
0.259181410074234,
0.08008872717618942,
0.26104187965393066,
-0.4594918489456177,
0.0978689193725586,
0.010390400886535645,
-0.19618958234786987,
0.48240166902542114,
-0.06934194266796112,
0.4847164750099182,
0.27205222845077515,
-0.0869525820016861,
0.012415815144777298,
-0.14669890701770782,
0.3089441657066345,
-0.2319159358739853,
-0.1549394726753235,
-0.29755157232284546,
0.29844191670417786,
-0.21309629082679749,
-0.28461503982543945,
-0.2574390769004822,
-0.2881096303462982,
-0.13378217816352844,
-0.04512994736433029,
-0.04473145678639412,
-0.3223118185997009,
0.37862470746040344,
-0.044959187507629395,
-0.08326703310012817,
-0.214882031083107,
-0.08946149796247482,
0.14780613780021667,
0.08853480219841003,
-0.37906262278556824,
0.2412554919719696,
0.3497841954231262,
0.027483437210321426,
0.04667837172746658,
0.333101749420166,
0.8321417570114136,
0.3508356213569641,
-0.026464387774467468,
0.03932600095868111,
-0.04619738087058067,
0.011306477710604668,
-0.060098085552453995,
-0.19010306894779205,
-0.20099744200706482,
0.18358789384365082,
0.42203307151794434,
0.1010255292057991,
-0.16755127906799316,
-0.3007484972476959,
0.08652520924806595,
0.34449371695518494,
-0.29742276668548584,
0.23916733264923096,
-0.2950367033481598,
-0.021010607481002808,
-0.13583412766456604,
0.28305211663246155,
-0.36508336663246155,
-0.20492611825466156,
0.5070193409919739,
0.07554551213979721,
0.06268440186977386,
-0.2516941428184509,
0.095626100897789,
0.15402017533779144,
0.5281152129173279,
0.14122101664543152,
0.05185745283961296,
-0.43078699707984924,
0.10599282383918762,
-0.5533005595207214,
-0.07547556608915329,
-0.13322237133979797,
-0.11323688924312592,
0.16033492982387543,
0.03736133873462677,
-0.19731000065803528,
0.10727868974208832,
0.1578671783208847,
0.2401515394449234,
0.029125314205884933,
0.037937458604574203,
-0.4085516929626465,
-0.2739596962928772,
0.1890488862991333,
-0.18092584609985352,
0.1925642043352127,
-0.2366178333759308,
0.1463562250137329,
-0.30365774035453796,
0.01740090548992157,
0.07216104120016098,
0.13594892621040344,
0.20686747133731842,
-0.322506844997406,
0.15999072790145874,
0.050935886800289154,
0.5018405914306641,
-0.05515792965888977,
-0.2660669982433319,
-0.24398642778396606,
-0.28833380341529846,
-0.21785663068294525,
0.005787573754787445,
0.09979808330535889,
0.10039680451154709,
-0.3156595528125763,
-0.11289305984973907,
-0.3973327875137329,
0.10145553201436996,
0.20169785618782043,
-0.3076213300228119,
0.021677589043974876,
0.1976681351661682,
-0.07342246919870377,
-0.05770527571439743,
0.13368795812129974,
0.06750214844942093,
-0.04951035976409912,
0.2457188218832016,
-0.009262904524803162,
-0.5538161993026733,
0.7703667283058167,
-0.23501965403556824,
-0.3211057484149933,
-0.06664067506790161,
0.12151135504245758,
0.017082780599594116,
0.020477857440710068,
-0.7054316401481628,
-0.026324063539505005,
0.3465484082698822,
0.08370321989059448,
-0.24896524846553802,
0.1779339462518692,
-0.06699885427951813,
-0.05615312606096268,
0.019067656248807907,
-0.15319453179836273,
0.07188285887241364,
-0.29968953132629395,
0.21892425417900085,
-0.17063772678375244
] |
https://github.com/huggingface/datasets/issues/4910 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder() | Hi ! I think this can be fixed by letting the config_kwargs take over the builder kwargs here:
https://github.com/huggingface/datasets/blob/7feeb5648a63b6135a8259dedc3b1e19185ee4c7/src/datasets/load.py#L1533-L1534
maybe something like this ?
```python
**{**builder_kwargs, **config_kwargs}
```
Let me know if you'd like to contribute and fix this bug, so I can assign you :)
> In my case, this was happening because I defined multiple BuilderConfig for multiple types, but didn't had all the data files that are requierd by those configs.
>
> I think this is different than the original issue by @bablf .
Feel free to to open an new issue, I'd be happy to help
| ## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
| 101 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder()
## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
Hi ! I think this can be fixed by letting the config_kwargs take over the builder kwargs here:
https://github.com/huggingface/datasets/blob/7feeb5648a63b6135a8259dedc3b1e19185ee4c7/src/datasets/load.py#L1533-L1534
maybe something like this ?
```python
**{**builder_kwargs, **config_kwargs}
```
Let me know if you'd like to contribute and fix this bug, so I can assign you :)
> In my case, this was happening because I defined multiple BuilderConfig for multiple types, but didn't had all the data files that are requierd by those configs.
>
> I think this is different than the original issue by @bablf .
Feel free to to open an new issue, I'd be happy to help
| [
-0.08519301563501358,
-0.14594313502311707,
0.006792660802602768,
0.4719575047492981,
0.27088138461112976,
0.08011270314455032,
0.24027591943740845,
0.1089896708726883,
-0.2414916455745697,
0.15479227900505066,
-0.09932543337345123,
0.3852587640285492,
-0.030969001352787018,
0.24276365339756012,
0.06773883104324341,
-0.03544536232948303,
0.054739415645599365,
0.06146349385380745,
-0.2279936671257019,
0.12118467688560486,
-0.21832925081253052,
0.2624109387397766,
-0.020392369478940964,
0.25486302375793457,
-0.3395843505859375,
-0.10613759607076645,
-0.24992352724075317,
0.031117435544729233,
0.014837938360869884,
-0.4849989414215088,
0.31618157029151917,
0.13647474348545074,
-0.1703227311372757,
0.6551611423492432,
-0.00011286996596027166,
0.16506776213645935,
0.23495176434516907,
0.1325702965259552,
-0.5751627683639526,
-0.21676503121852875,
-0.05722127854824066,
0.008684549480676651,
0.08764950186014175,
-0.3176528513431549,
0.13384458422660828,
-0.14094997942447662,
-0.15338554978370667,
-0.10389886796474457,
0.38512033224105835,
0.05811421945691109,
0.17437338829040527,
0.2745927572250366,
0.028946805745363235,
-0.07463809102773666,
-0.04037842899560928,
0.06256090849637985,
-0.1101265549659729,
0.13717493414878845,
-0.2049751877784729,
0.2105477750301361,
0.06919534504413605,
0.1355566680431366,
-0.24306444823741913,
0.02049260027706623,
0.5361902713775635,
-0.04544783756136894,
0.17179381847381592,
-0.22794228792190552,
0.16312538087368011,
0.23452553153038025,
0.08205421268939972,
-0.43653562664985657,
-0.4073426425457001,
-0.5173814296722412,
0.0876118391752243,
-0.107334204018116,
0.282135933637619,
0.15203073620796204,
-0.3582257032394409,
-0.12245604395866394,
-0.07505388557910919,
-0.0042612734250724316,
-0.0016531571745872498,
0.07943063974380493,
0.1254553496837616,
0.1809983253479004,
-0.1276191920042038,
0.16871926188468933,
0.3222739100456238,
-0.07918091118335724,
-0.05021548271179199,
-0.5685057640075684,
-0.1787455528974533,
0.03454909101128578,
-0.04429638013243675,
0.20805397629737854,
0.06080795079469681,
0.38588112592697144,
0.5216395258903503,
-0.34687352180480957,
-0.03800837695598602,
-0.16286993026733398,
0.11662688851356506,
0.13898925483226776,
0.34274548292160034,
0.2298440784215927,
0.35447701811790466,
0.08471644669771194,
0.0071446336805820465,
0.1768621951341629,
-0.422379732131958,
-0.02075302228331566,
0.0821656584739685,
-0.18779443204402924,
0.14866741001605988,
0.03792339935898781,
0.5304942727088928,
0.1173870861530304,
-0.1371062695980072,
-0.14625871181488037,
-0.06090337410569191,
-0.14173705875873566,
0.1668754518032074,
0.28391560912132263,
0.04657460004091263,
0.07618536800146103,
0.0294359028339386,
0.3637068271636963,
-0.024139316752552986,
-0.1479981243610382,
-0.21447676420211792,
-0.007654029875993729,
-0.19244830310344696,
0.09213639795780182,
-0.04483027011156082,
-0.5829445123672485,
0.24345427751541138,
0.3944115936756134,
0.08613868057727814,
-0.3127298653125763,
-0.11282716691493988,
0.13183395564556122,
-0.2910442650318146,
-0.0518706850707531,
-0.14534637331962585,
0.4744473099708557,
0.02490926720201969,
-0.18245066702365875,
-0.20523688197135925,
-0.19515946507453918,
-0.3722633421421051,
-0.32103845477104187,
0.11706186830997467,
0.1901029497385025,
-0.13670295476913452,
0.20555110275745392,
-0.44215914607048035,
0.021724138408899307,
0.25424984097480774,
0.017691057175397873,
-0.2308785319328308,
-0.04370591789484024,
-0.3340532183647156,
-0.3247619569301605,
0.15836256742477417,
0.48256534337997437,
0.11942628026008606,
-0.32447656989097595,
-0.13321299850940704,
0.17104367911815643,
-0.1105993315577507,
0.001449301838874817,
-0.41569340229034424,
0.5486012697219849,
-0.34069666266441345,
0.14723694324493408,
0.49837759137153625,
-0.17491915822029114,
-0.1170329749584198,
0.35693785548210144,
0.04424073547124863,
0.2540223300457001,
0.23949885368347168,
-0.2880409061908722,
-0.16898733377456665,
-0.011639201082289219,
0.13137286901474,
0.11549381166696548,
0.09703385084867477,
0.1863536536693573,
-0.07208900153636932,
-0.2772684395313263,
0.1306408792734146,
-0.30968254804611206,
-0.18344521522521973,
0.01441173255443573,
-0.1269494593143463,
0.10822348296642303,
0.2312471866607666,
-0.34139585494995117,
-0.15581844747066498,
0.17981399595737457,
-0.051369559019804,
0.057915981858968735,
-0.08353723585605621,
-0.07854217290878296,
-0.6448091864585876,
0.29318368434906006,
-0.16519415378570557,
0.15125589072704315,
-0.2257334142923355,
-0.38054358959198,
-0.23676654696464539,
0.24898992478847504,
-0.45464029908180237,
-0.0911744087934494,
0.16519838571548462,
0.27198463678359985,
-0.12215860188007355,
0.14374014735221863,
-0.12931884825229645,
-0.041844502091407776,
0.04398707300424576,
0.14157149195671082,
-0.20059917867183685,
0.12697800993919373,
-0.3418159484863281,
-0.007650335319340229,
0.00901496410369873,
0.2006816565990448,
0.3212139308452606,
-0.015710169449448586,
0.015980340540409088,
0.27306193113327026,
-0.11481861770153046,
0.230036661028862,
-0.15306362509727478,
0.14120620489120483,
0.23116815090179443,
0.26302072405815125,
0.03145214542746544,
0.08611859381198883,
0.12535466253757477,
-0.11900001019239426,
0.3160568177700043,
0.4567224383354187,
0.27438685297966003,
0.46601971983909607,
0.10743984580039978,
-0.004676584154367447,
-0.08210502564907074,
0.03603028878569603,
0.032734885811805725,
-0.2216217964887619,
0.13999687135219574,
-0.16471204161643982,
0.18515539169311523,
0.22801610827445984,
-0.05310085415840149,
0.17010554671287537,
0.3884848356246948,
0.08949494361877441,
0.1526886224746704,
-0.06775888800621033,
-0.12134843319654465,
0.07633916288614273,
-0.0912986621260643,
0.27382102608680725,
0.2382635623216629,
0.06876310706138611,
-0.08204466104507446,
0.10657830536365509,
-0.16888666152954102,
-0.018857508897781372,
0.23925593495368958,
0.34763282537460327,
0.06919338554143906,
0.13268113136291504,
0.02642500400543213,
0.0426197312772274,
-0.2447521686553955,
-0.023488808423280716,
0.02052462287247181,
0.010220710188150406,
-0.4857616424560547,
0.281681627035141,
-0.26339980959892273,
-0.13183081150054932,
-0.3286435306072235,
-0.03496736288070679,
-0.3447872996330261,
-0.4871562421321869,
-0.15020200610160828,
0.04787465184926987,
-0.21012647449970245,
0.16149315237998962,
-0.187832772731781,
0.1008714884519577,
-0.02852526679635048,
-0.00044582970440387726,
-0.12571419775485992,
-0.15545088052749634,
-0.24372276663780212,
-0.12246982753276825,
0.47471368312835693,
-0.11733333766460419,
0.1498989313840866,
-0.08419216424226761,
-0.17614580690860748,
-0.11680852621793747,
-0.2923862934112549,
0.3260782063007355,
-0.10809668898582458,
0.5198299288749695,
0.3955690264701843,
0.27974435687065125,
0.08574675023555756,
-0.7071952819824219,
0.5273146629333496,
0.13888223469257355,
-0.012812291271984577,
0.2169605940580368,
0.02029380388557911,
-0.05989551171660423,
-0.10167527198791504,
-0.060538552701473236,
0.19594986736774445,
-0.3254178464412689,
-0.015394531190395355,
-0.12702089548110962,
0.12321306020021439,
0.5703558325767517,
0.2826966941356659,
0.12998731434345245,
-0.39296287298202515,
0.36304861307144165,
-0.07958472520112991,
-0.1020592749118805,
0.06975876539945602,
-0.06895814836025238,
-0.24356453120708466,
-0.2104908674955368,
-0.1625443696975708,
0.3503536880016327,
-0.2534930109977722,
-0.3982998728752136,
-0.3161853849887848,
-0.21541672945022583,
0.43021905422210693,
0.17269738018512726,
0.09278323501348495,
-0.28115352988243103,
0.2967935800552368,
-0.06286539882421494,
-0.13380512595176697,
-0.16837117075920105,
0.25808003544807434,
-0.13730260729789734,
0.1453358232975006,
0.223155677318573,
0.24498280882835388,
-0.06826747953891754,
0.3269980549812317,
0.34819379448890686,
-0.19053980708122253,
0.4311788082122803,
-0.1365460604429245,
0.34966880083084106,
-0.20850244164466858,
-0.5836889147758484,
-0.34453704953193665,
-0.15398046374320984,
-0.047941338270902634,
0.19266363978385925,
0.04444892704486847,
0.35163331031799316,
-0.17792735993862152,
-0.23908181488513947,
-0.1577083170413971,
-0.5157604217529297,
0.002899063751101494,
-0.009006664156913757,
-0.0823744460940361,
-0.011623687110841274,
0.04215783625841141,
-0.22947609424591064,
0.15282389521598816,
0.25278979539871216,
0.15333810448646545,
-0.0532417818903923,
0.008581395260989666,
-0.28123605251312256,
-0.12414145469665527,
-0.2418815791606903,
0.30487746000289917,
0.067392498254776,
-0.21101875603199005,
0.10935690999031067,
0.1639489233493805,
-0.003054969012737274,
-0.0214706901460886,
0.5779324173927307,
-0.018962854519486427,
0.1991378515958786,
0.06752876937389374,
-0.08183005452156067,
-0.3701930046081543,
-0.056061599403619766,
0.07136590778827667,
0.1983376443386078,
0.28697264194488525,
0.3765125572681427,
-0.5835590958595276,
-0.1810869723558426,
-0.015715409070253372,
0.3340977728366852,
-0.18211133778095245,
-0.1147400289773941,
-0.1655113697052002,
-0.4028494358062744,
-0.2640482485294342,
-0.15972480177879333,
0.08668336272239685,
0.3688933849334717,
0.017163945361971855,
-0.005611930042505264,
0.0021332763135433197,
-0.04059721529483795,
0.12407092750072479,
0.16751116514205933,
0.4992747902870178,
-0.12614451348781586,
0.12278789281845093,
0.05496911704540253,
0.062282729893922806,
0.09040861576795578,
0.6278823018074036,
-0.25038769841194153,
-0.23554947972297668,
-0.3095196783542633,
-0.056172747164964676,
0.22143378853797913,
0.34966903924942017,
-0.19029022753238678,
0.24877718091011047,
0.0655822604894638,
-0.052293673157691956,
-0.15259949862957,
0.002721858210861683,
0.5194914937019348,
0.08793067187070847,
-0.15376435220241547,
-0.5734370350837708,
0.588078498840332,
0.09976918995380402,
-0.1802544742822647,
0.2873460054397583,
0.4528495669364929,
-0.42743515968322754,
0.37027573585510254,
-0.11776223033666611,
0.8632777333259583,
0.18954290449619293,
0.24428917467594147,
0.3900461792945862,
0.09585420787334442,
0.3645685613155365,
0.15402443706989288,
-0.08633636683225632,
-0.3569331169128418,
0.1122409850358963,
0.14670953154563904,
-0.026738887652754784,
0.04832077771425247,
0.16746777296066284,
-0.29633989930152893,
0.18398652970790863,
-0.4132699966430664,
0.29152944684028625,
-0.22493265569210052,
0.26365581154823303,
-0.19731099903583527,
-0.058685678988695145,
-0.4418042302131653,
0.10379794239997864,
-0.05097486823797226,
0.19936878979206085,
0.02190987393260002,
-0.2321079820394516,
0.18327106535434723,
-0.4755513072013855,
-0.2830694019794464,
0.05048806965351105,
-0.33834901452064514,
0.2363026738166809,
0.12344926595687866,
-0.04467986151576042,
0.11878228187561035,
0.46471327543258667,
0.3770855665206909,
0.03344002738595009,
-0.06846162676811218,
0.13245859742164612,
-0.18811437487602234,
-0.02263854630291462,
-0.31649449467658997,
-0.13487108051776886,
0.17723391950130463,
-0.08587317168712616,
-0.13801103830337524,
0.019037991762161255,
-0.043128933757543564,
-0.10810281336307526,
-0.1240658089518547,
-0.05360817909240723,
-0.3734748363494873,
-0.5802383422851562,
-0.13178595900535583,
-0.14860333502292633,
0.10639163851737976,
-0.2842957675457001,
0.0638355165719986,
-0.147508442401886,
-0.28042852878570557,
-0.01583566516637802,
0.1438254863023758,
-0.1403050422668457,
0.09541705250740051,
0.10746492445468903,
0.005422711372375488,
0.13476240634918213,
0.6162465810775757,
0.04773853346705437,
-0.11422525346279144,
-0.08871926367282867,
0.13746947050094604,
0.31087344884872437,
-0.37409770488739014,
0.3050093352794647,
-0.025112776085734367,
-0.045069336891174316,
-0.1480938345193863,
0.732974648475647,
0.17103278636932373,
0.2776179909706116,
0.008606720715761185,
-0.08346216380596161,
-0.05732237547636032,
0.2575116753578186,
-0.03810722753405571,
0.29431837797164917,
0.006985511630773544,
0.029358642175793648,
0.13094070553779602,
0.26390841603279114,
-0.28537890315055847,
-0.08096669614315033,
-0.18314065039157867,
0.045673418790102005,
0.32602807879447937,
-0.07304149866104126,
0.2079375982284546,
0.1280592381954193,
0.1305363029241562,
-0.011515721678733826,
-0.21582093834877014,
-0.15986594557762146,
-0.3132457435131073,
0.1374211311340332,
0.008826394565403461,
0.21152684092521667,
0.08751889318227768,
-0.010876239277422428,
0.23077069222927094,
-0.2788582146167755,
0.31716862320899963,
0.16736170649528503,
-0.031034089624881744,
0.15625327825546265,
0.13662351667881012,
0.20369088649749756,
0.06951181590557098,
0.1423925757408142,
-0.1997145414352417,
0.19290263950824738,
0.3586812913417816,
0.22282999753952026,
-0.12515582144260406,
-0.028817307204008102,
0.052880242466926575,
0.14701208472251892,
-0.18334849178791046,
0.16340017318725586,
0.0925685465335846,
-0.23288147151470184,
-0.09912770986557007,
0.2808533012866974,
0.252600759267807,
0.4642675518989563,
-0.3501046299934387,
0.16490094363689423,
-0.13060808181762695,
0.0920008197426796,
-0.12319470196962357,
-0.296474426984787,
0.2805491089820862,
-0.32026776671409607,
0.041611481457948685,
0.3654356896877289,
0.1862589716911316,
-0.16158033907413483,
-0.1494530737400055,
-0.11335452646017075,
0.35729658603668213,
-0.1114431619644165,
0.40068185329437256,
0.5323944091796875,
0.03944920375943184,
-0.03986449912190437,
0.2974790632724762,
0.259181410074234,
0.08008872717618942,
0.26104187965393066,
-0.4594918489456177,
0.0978689193725586,
0.010390400886535645,
-0.19618958234786987,
0.48240166902542114,
-0.06934194266796112,
0.4847164750099182,
0.27205222845077515,
-0.0869525820016861,
0.012415815144777298,
-0.14669890701770782,
0.3089441657066345,
-0.2319159358739853,
-0.1549394726753235,
-0.29755157232284546,
0.29844191670417786,
-0.21309629082679749,
-0.28461503982543945,
-0.2574390769004822,
-0.2881096303462982,
-0.13378217816352844,
-0.04512994736433029,
-0.04473145678639412,
-0.3223118185997009,
0.37862470746040344,
-0.044959187507629395,
-0.08326703310012817,
-0.214882031083107,
-0.08946149796247482,
0.14780613780021667,
0.08853480219841003,
-0.37906262278556824,
0.2412554919719696,
0.3497841954231262,
0.027483437210321426,
0.04667837172746658,
0.333101749420166,
0.8321417570114136,
0.3508356213569641,
-0.026464387774467468,
0.03932600095868111,
-0.04619738087058067,
0.011306477710604668,
-0.060098085552453995,
-0.19010306894779205,
-0.20099744200706482,
0.18358789384365082,
0.42203307151794434,
0.1010255292057991,
-0.16755127906799316,
-0.3007484972476959,
0.08652520924806595,
0.34449371695518494,
-0.29742276668548584,
0.23916733264923096,
-0.2950367033481598,
-0.021010607481002808,
-0.13583412766456604,
0.28305211663246155,
-0.36508336663246155,
-0.20492611825466156,
0.5070193409919739,
0.07554551213979721,
0.06268440186977386,
-0.2516941428184509,
0.095626100897789,
0.15402017533779144,
0.5281152129173279,
0.14122101664543152,
0.05185745283961296,
-0.43078699707984924,
0.10599282383918762,
-0.5533005595207214,
-0.07547556608915329,
-0.13322237133979797,
-0.11323688924312592,
0.16033492982387543,
0.03736133873462677,
-0.19731000065803528,
0.10727868974208832,
0.1578671783208847,
0.2401515394449234,
0.029125314205884933,
0.037937458604574203,
-0.4085516929626465,
-0.2739596962928772,
0.1890488862991333,
-0.18092584609985352,
0.1925642043352127,
-0.2366178333759308,
0.1463562250137329,
-0.30365774035453796,
0.01740090548992157,
0.07216104120016098,
0.13594892621040344,
0.20686747133731842,
-0.322506844997406,
0.15999072790145874,
0.050935886800289154,
0.5018405914306641,
-0.05515792965888977,
-0.2660669982433319,
-0.24398642778396606,
-0.28833380341529846,
-0.21785663068294525,
0.005787573754787445,
0.09979808330535889,
0.10039680451154709,
-0.3156595528125763,
-0.11289305984973907,
-0.3973327875137329,
0.10145553201436996,
0.20169785618782043,
-0.3076213300228119,
0.021677589043974876,
0.1976681351661682,
-0.07342246919870377,
-0.05770527571439743,
0.13368795812129974,
0.06750214844942093,
-0.04951035976409912,
0.2457188218832016,
-0.009262904524803162,
-0.5538161993026733,
0.7703667283058167,
-0.23501965403556824,
-0.3211057484149933,
-0.06664067506790161,
0.12151135504245758,
0.017082780599594116,
0.020477857440710068,
-0.7054316401481628,
-0.026324063539505005,
0.3465484082698822,
0.08370321989059448,
-0.24896524846553802,
0.1779339462518692,
-0.06699885427951813,
-0.05615312606096268,
0.019067656248807907,
-0.15319453179836273,
0.07188285887241364,
-0.29968953132629395,
0.21892425417900085,
-0.17063772678375244
] |
https://github.com/huggingface/datasets/issues/4910 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder() | Cool thank you ! Let me know if you have questions or if I can help | ## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
| 16 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder()
## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
Cool thank you ! Let me know if you have questions or if I can help | [
-0.08519301563501358,
-0.14594313502311707,
0.006792660802602768,
0.4719575047492981,
0.27088138461112976,
0.08011270314455032,
0.24027591943740845,
0.1089896708726883,
-0.2414916455745697,
0.15479227900505066,
-0.09932543337345123,
0.3852587640285492,
-0.030969001352787018,
0.24276365339756012,
0.06773883104324341,
-0.03544536232948303,
0.054739415645599365,
0.06146349385380745,
-0.2279936671257019,
0.12118467688560486,
-0.21832925081253052,
0.2624109387397766,
-0.020392369478940964,
0.25486302375793457,
-0.3395843505859375,
-0.10613759607076645,
-0.24992352724075317,
0.031117435544729233,
0.014837938360869884,
-0.4849989414215088,
0.31618157029151917,
0.13647474348545074,
-0.1703227311372757,
0.6551611423492432,
-0.00011286996596027166,
0.16506776213645935,
0.23495176434516907,
0.1325702965259552,
-0.5751627683639526,
-0.21676503121852875,
-0.05722127854824066,
0.008684549480676651,
0.08764950186014175,
-0.3176528513431549,
0.13384458422660828,
-0.14094997942447662,
-0.15338554978370667,
-0.10389886796474457,
0.38512033224105835,
0.05811421945691109,
0.17437338829040527,
0.2745927572250366,
0.028946805745363235,
-0.07463809102773666,
-0.04037842899560928,
0.06256090849637985,
-0.1101265549659729,
0.13717493414878845,
-0.2049751877784729,
0.2105477750301361,
0.06919534504413605,
0.1355566680431366,
-0.24306444823741913,
0.02049260027706623,
0.5361902713775635,
-0.04544783756136894,
0.17179381847381592,
-0.22794228792190552,
0.16312538087368011,
0.23452553153038025,
0.08205421268939972,
-0.43653562664985657,
-0.4073426425457001,
-0.5173814296722412,
0.0876118391752243,
-0.107334204018116,
0.282135933637619,
0.15203073620796204,
-0.3582257032394409,
-0.12245604395866394,
-0.07505388557910919,
-0.0042612734250724316,
-0.0016531571745872498,
0.07943063974380493,
0.1254553496837616,
0.1809983253479004,
-0.1276191920042038,
0.16871926188468933,
0.3222739100456238,
-0.07918091118335724,
-0.05021548271179199,
-0.5685057640075684,
-0.1787455528974533,
0.03454909101128578,
-0.04429638013243675,
0.20805397629737854,
0.06080795079469681,
0.38588112592697144,
0.5216395258903503,
-0.34687352180480957,
-0.03800837695598602,
-0.16286993026733398,
0.11662688851356506,
0.13898925483226776,
0.34274548292160034,
0.2298440784215927,
0.35447701811790466,
0.08471644669771194,
0.0071446336805820465,
0.1768621951341629,
-0.422379732131958,
-0.02075302228331566,
0.0821656584739685,
-0.18779443204402924,
0.14866741001605988,
0.03792339935898781,
0.5304942727088928,
0.1173870861530304,
-0.1371062695980072,
-0.14625871181488037,
-0.06090337410569191,
-0.14173705875873566,
0.1668754518032074,
0.28391560912132263,
0.04657460004091263,
0.07618536800146103,
0.0294359028339386,
0.3637068271636963,
-0.024139316752552986,
-0.1479981243610382,
-0.21447676420211792,
-0.007654029875993729,
-0.19244830310344696,
0.09213639795780182,
-0.04483027011156082,
-0.5829445123672485,
0.24345427751541138,
0.3944115936756134,
0.08613868057727814,
-0.3127298653125763,
-0.11282716691493988,
0.13183395564556122,
-0.2910442650318146,
-0.0518706850707531,
-0.14534637331962585,
0.4744473099708557,
0.02490926720201969,
-0.18245066702365875,
-0.20523688197135925,
-0.19515946507453918,
-0.3722633421421051,
-0.32103845477104187,
0.11706186830997467,
0.1901029497385025,
-0.13670295476913452,
0.20555110275745392,
-0.44215914607048035,
0.021724138408899307,
0.25424984097480774,
0.017691057175397873,
-0.2308785319328308,
-0.04370591789484024,
-0.3340532183647156,
-0.3247619569301605,
0.15836256742477417,
0.48256534337997437,
0.11942628026008606,
-0.32447656989097595,
-0.13321299850940704,
0.17104367911815643,
-0.1105993315577507,
0.001449301838874817,
-0.41569340229034424,
0.5486012697219849,
-0.34069666266441345,
0.14723694324493408,
0.49837759137153625,
-0.17491915822029114,
-0.1170329749584198,
0.35693785548210144,
0.04424073547124863,
0.2540223300457001,
0.23949885368347168,
-0.2880409061908722,
-0.16898733377456665,
-0.011639201082289219,
0.13137286901474,
0.11549381166696548,
0.09703385084867477,
0.1863536536693573,
-0.07208900153636932,
-0.2772684395313263,
0.1306408792734146,
-0.30968254804611206,
-0.18344521522521973,
0.01441173255443573,
-0.1269494593143463,
0.10822348296642303,
0.2312471866607666,
-0.34139585494995117,
-0.15581844747066498,
0.17981399595737457,
-0.051369559019804,
0.057915981858968735,
-0.08353723585605621,
-0.07854217290878296,
-0.6448091864585876,
0.29318368434906006,
-0.16519415378570557,
0.15125589072704315,
-0.2257334142923355,
-0.38054358959198,
-0.23676654696464539,
0.24898992478847504,
-0.45464029908180237,
-0.0911744087934494,
0.16519838571548462,
0.27198463678359985,
-0.12215860188007355,
0.14374014735221863,
-0.12931884825229645,
-0.041844502091407776,
0.04398707300424576,
0.14157149195671082,
-0.20059917867183685,
0.12697800993919373,
-0.3418159484863281,
-0.007650335319340229,
0.00901496410369873,
0.2006816565990448,
0.3212139308452606,
-0.015710169449448586,
0.015980340540409088,
0.27306193113327026,
-0.11481861770153046,
0.230036661028862,
-0.15306362509727478,
0.14120620489120483,
0.23116815090179443,
0.26302072405815125,
0.03145214542746544,
0.08611859381198883,
0.12535466253757477,
-0.11900001019239426,
0.3160568177700043,
0.4567224383354187,
0.27438685297966003,
0.46601971983909607,
0.10743984580039978,
-0.004676584154367447,
-0.08210502564907074,
0.03603028878569603,
0.032734885811805725,
-0.2216217964887619,
0.13999687135219574,
-0.16471204161643982,
0.18515539169311523,
0.22801610827445984,
-0.05310085415840149,
0.17010554671287537,
0.3884848356246948,
0.08949494361877441,
0.1526886224746704,
-0.06775888800621033,
-0.12134843319654465,
0.07633916288614273,
-0.0912986621260643,
0.27382102608680725,
0.2382635623216629,
0.06876310706138611,
-0.08204466104507446,
0.10657830536365509,
-0.16888666152954102,
-0.018857508897781372,
0.23925593495368958,
0.34763282537460327,
0.06919338554143906,
0.13268113136291504,
0.02642500400543213,
0.0426197312772274,
-0.2447521686553955,
-0.023488808423280716,
0.02052462287247181,
0.010220710188150406,
-0.4857616424560547,
0.281681627035141,
-0.26339980959892273,
-0.13183081150054932,
-0.3286435306072235,
-0.03496736288070679,
-0.3447872996330261,
-0.4871562421321869,
-0.15020200610160828,
0.04787465184926987,
-0.21012647449970245,
0.16149315237998962,
-0.187832772731781,
0.1008714884519577,
-0.02852526679635048,
-0.00044582970440387726,
-0.12571419775485992,
-0.15545088052749634,
-0.24372276663780212,
-0.12246982753276825,
0.47471368312835693,
-0.11733333766460419,
0.1498989313840866,
-0.08419216424226761,
-0.17614580690860748,
-0.11680852621793747,
-0.2923862934112549,
0.3260782063007355,
-0.10809668898582458,
0.5198299288749695,
0.3955690264701843,
0.27974435687065125,
0.08574675023555756,
-0.7071952819824219,
0.5273146629333496,
0.13888223469257355,
-0.012812291271984577,
0.2169605940580368,
0.02029380388557911,
-0.05989551171660423,
-0.10167527198791504,
-0.060538552701473236,
0.19594986736774445,
-0.3254178464412689,
-0.015394531190395355,
-0.12702089548110962,
0.12321306020021439,
0.5703558325767517,
0.2826966941356659,
0.12998731434345245,
-0.39296287298202515,
0.36304861307144165,
-0.07958472520112991,
-0.1020592749118805,
0.06975876539945602,
-0.06895814836025238,
-0.24356453120708466,
-0.2104908674955368,
-0.1625443696975708,
0.3503536880016327,
-0.2534930109977722,
-0.3982998728752136,
-0.3161853849887848,
-0.21541672945022583,
0.43021905422210693,
0.17269738018512726,
0.09278323501348495,
-0.28115352988243103,
0.2967935800552368,
-0.06286539882421494,
-0.13380512595176697,
-0.16837117075920105,
0.25808003544807434,
-0.13730260729789734,
0.1453358232975006,
0.223155677318573,
0.24498280882835388,
-0.06826747953891754,
0.3269980549812317,
0.34819379448890686,
-0.19053980708122253,
0.4311788082122803,
-0.1365460604429245,
0.34966880083084106,
-0.20850244164466858,
-0.5836889147758484,
-0.34453704953193665,
-0.15398046374320984,
-0.047941338270902634,
0.19266363978385925,
0.04444892704486847,
0.35163331031799316,
-0.17792735993862152,
-0.23908181488513947,
-0.1577083170413971,
-0.5157604217529297,
0.002899063751101494,
-0.009006664156913757,
-0.0823744460940361,
-0.011623687110841274,
0.04215783625841141,
-0.22947609424591064,
0.15282389521598816,
0.25278979539871216,
0.15333810448646545,
-0.0532417818903923,
0.008581395260989666,
-0.28123605251312256,
-0.12414145469665527,
-0.2418815791606903,
0.30487746000289917,
0.067392498254776,
-0.21101875603199005,
0.10935690999031067,
0.1639489233493805,
-0.003054969012737274,
-0.0214706901460886,
0.5779324173927307,
-0.018962854519486427,
0.1991378515958786,
0.06752876937389374,
-0.08183005452156067,
-0.3701930046081543,
-0.056061599403619766,
0.07136590778827667,
0.1983376443386078,
0.28697264194488525,
0.3765125572681427,
-0.5835590958595276,
-0.1810869723558426,
-0.015715409070253372,
0.3340977728366852,
-0.18211133778095245,
-0.1147400289773941,
-0.1655113697052002,
-0.4028494358062744,
-0.2640482485294342,
-0.15972480177879333,
0.08668336272239685,
0.3688933849334717,
0.017163945361971855,
-0.005611930042505264,
0.0021332763135433197,
-0.04059721529483795,
0.12407092750072479,
0.16751116514205933,
0.4992747902870178,
-0.12614451348781586,
0.12278789281845093,
0.05496911704540253,
0.062282729893922806,
0.09040861576795578,
0.6278823018074036,
-0.25038769841194153,
-0.23554947972297668,
-0.3095196783542633,
-0.056172747164964676,
0.22143378853797913,
0.34966903924942017,
-0.19029022753238678,
0.24877718091011047,
0.0655822604894638,
-0.052293673157691956,
-0.15259949862957,
0.002721858210861683,
0.5194914937019348,
0.08793067187070847,
-0.15376435220241547,
-0.5734370350837708,
0.588078498840332,
0.09976918995380402,
-0.1802544742822647,
0.2873460054397583,
0.4528495669364929,
-0.42743515968322754,
0.37027573585510254,
-0.11776223033666611,
0.8632777333259583,
0.18954290449619293,
0.24428917467594147,
0.3900461792945862,
0.09585420787334442,
0.3645685613155365,
0.15402443706989288,
-0.08633636683225632,
-0.3569331169128418,
0.1122409850358963,
0.14670953154563904,
-0.026738887652754784,
0.04832077771425247,
0.16746777296066284,
-0.29633989930152893,
0.18398652970790863,
-0.4132699966430664,
0.29152944684028625,
-0.22493265569210052,
0.26365581154823303,
-0.19731099903583527,
-0.058685678988695145,
-0.4418042302131653,
0.10379794239997864,
-0.05097486823797226,
0.19936878979206085,
0.02190987393260002,
-0.2321079820394516,
0.18327106535434723,
-0.4755513072013855,
-0.2830694019794464,
0.05048806965351105,
-0.33834901452064514,
0.2363026738166809,
0.12344926595687866,
-0.04467986151576042,
0.11878228187561035,
0.46471327543258667,
0.3770855665206909,
0.03344002738595009,
-0.06846162676811218,
0.13245859742164612,
-0.18811437487602234,
-0.02263854630291462,
-0.31649449467658997,
-0.13487108051776886,
0.17723391950130463,
-0.08587317168712616,
-0.13801103830337524,
0.019037991762161255,
-0.043128933757543564,
-0.10810281336307526,
-0.1240658089518547,
-0.05360817909240723,
-0.3734748363494873,
-0.5802383422851562,
-0.13178595900535583,
-0.14860333502292633,
0.10639163851737976,
-0.2842957675457001,
0.0638355165719986,
-0.147508442401886,
-0.28042852878570557,
-0.01583566516637802,
0.1438254863023758,
-0.1403050422668457,
0.09541705250740051,
0.10746492445468903,
0.005422711372375488,
0.13476240634918213,
0.6162465810775757,
0.04773853346705437,
-0.11422525346279144,
-0.08871926367282867,
0.13746947050094604,
0.31087344884872437,
-0.37409770488739014,
0.3050093352794647,
-0.025112776085734367,
-0.045069336891174316,
-0.1480938345193863,
0.732974648475647,
0.17103278636932373,
0.2776179909706116,
0.008606720715761185,
-0.08346216380596161,
-0.05732237547636032,
0.2575116753578186,
-0.03810722753405571,
0.29431837797164917,
0.006985511630773544,
0.029358642175793648,
0.13094070553779602,
0.26390841603279114,
-0.28537890315055847,
-0.08096669614315033,
-0.18314065039157867,
0.045673418790102005,
0.32602807879447937,
-0.07304149866104126,
0.2079375982284546,
0.1280592381954193,
0.1305363029241562,
-0.011515721678733826,
-0.21582093834877014,
-0.15986594557762146,
-0.3132457435131073,
0.1374211311340332,
0.008826394565403461,
0.21152684092521667,
0.08751889318227768,
-0.010876239277422428,
0.23077069222927094,
-0.2788582146167755,
0.31716862320899963,
0.16736170649528503,
-0.031034089624881744,
0.15625327825546265,
0.13662351667881012,
0.20369088649749756,
0.06951181590557098,
0.1423925757408142,
-0.1997145414352417,
0.19290263950824738,
0.3586812913417816,
0.22282999753952026,
-0.12515582144260406,
-0.028817307204008102,
0.052880242466926575,
0.14701208472251892,
-0.18334849178791046,
0.16340017318725586,
0.0925685465335846,
-0.23288147151470184,
-0.09912770986557007,
0.2808533012866974,
0.252600759267807,
0.4642675518989563,
-0.3501046299934387,
0.16490094363689423,
-0.13060808181762695,
0.0920008197426796,
-0.12319470196962357,
-0.296474426984787,
0.2805491089820862,
-0.32026776671409607,
0.041611481457948685,
0.3654356896877289,
0.1862589716911316,
-0.16158033907413483,
-0.1494530737400055,
-0.11335452646017075,
0.35729658603668213,
-0.1114431619644165,
0.40068185329437256,
0.5323944091796875,
0.03944920375943184,
-0.03986449912190437,
0.2974790632724762,
0.259181410074234,
0.08008872717618942,
0.26104187965393066,
-0.4594918489456177,
0.0978689193725586,
0.010390400886535645,
-0.19618958234786987,
0.48240166902542114,
-0.06934194266796112,
0.4847164750099182,
0.27205222845077515,
-0.0869525820016861,
0.012415815144777298,
-0.14669890701770782,
0.3089441657066345,
-0.2319159358739853,
-0.1549394726753235,
-0.29755157232284546,
0.29844191670417786,
-0.21309629082679749,
-0.28461503982543945,
-0.2574390769004822,
-0.2881096303462982,
-0.13378217816352844,
-0.04512994736433029,
-0.04473145678639412,
-0.3223118185997009,
0.37862470746040344,
-0.044959187507629395,
-0.08326703310012817,
-0.214882031083107,
-0.08946149796247482,
0.14780613780021667,
0.08853480219841003,
-0.37906262278556824,
0.2412554919719696,
0.3497841954231262,
0.027483437210321426,
0.04667837172746658,
0.333101749420166,
0.8321417570114136,
0.3508356213569641,
-0.026464387774467468,
0.03932600095868111,
-0.04619738087058067,
0.011306477710604668,
-0.060098085552453995,
-0.19010306894779205,
-0.20099744200706482,
0.18358789384365082,
0.42203307151794434,
0.1010255292057991,
-0.16755127906799316,
-0.3007484972476959,
0.08652520924806595,
0.34449371695518494,
-0.29742276668548584,
0.23916733264923096,
-0.2950367033481598,
-0.021010607481002808,
-0.13583412766456604,
0.28305211663246155,
-0.36508336663246155,
-0.20492611825466156,
0.5070193409919739,
0.07554551213979721,
0.06268440186977386,
-0.2516941428184509,
0.095626100897789,
0.15402017533779144,
0.5281152129173279,
0.14122101664543152,
0.05185745283961296,
-0.43078699707984924,
0.10599282383918762,
-0.5533005595207214,
-0.07547556608915329,
-0.13322237133979797,
-0.11323688924312592,
0.16033492982387543,
0.03736133873462677,
-0.19731000065803528,
0.10727868974208832,
0.1578671783208847,
0.2401515394449234,
0.029125314205884933,
0.037937458604574203,
-0.4085516929626465,
-0.2739596962928772,
0.1890488862991333,
-0.18092584609985352,
0.1925642043352127,
-0.2366178333759308,
0.1463562250137329,
-0.30365774035453796,
0.01740090548992157,
0.07216104120016098,
0.13594892621040344,
0.20686747133731842,
-0.322506844997406,
0.15999072790145874,
0.050935886800289154,
0.5018405914306641,
-0.05515792965888977,
-0.2660669982433319,
-0.24398642778396606,
-0.28833380341529846,
-0.21785663068294525,
0.005787573754787445,
0.09979808330535889,
0.10039680451154709,
-0.3156595528125763,
-0.11289305984973907,
-0.3973327875137329,
0.10145553201436996,
0.20169785618782043,
-0.3076213300228119,
0.021677589043974876,
0.1976681351661682,
-0.07342246919870377,
-0.05770527571439743,
0.13368795812129974,
0.06750214844942093,
-0.04951035976409912,
0.2457188218832016,
-0.009262904524803162,
-0.5538161993026733,
0.7703667283058167,
-0.23501965403556824,
-0.3211057484149933,
-0.06664067506790161,
0.12151135504245758,
0.017082780599594116,
0.020477857440710068,
-0.7054316401481628,
-0.026324063539505005,
0.3465484082698822,
0.08370321989059448,
-0.24896524846553802,
0.1779339462518692,
-0.06699885427951813,
-0.05615312606096268,
0.019067656248807907,
-0.15319453179836273,
0.07188285887241364,
-0.29968953132629395,
0.21892425417900085,
-0.17063772678375244
] |
https://github.com/huggingface/datasets/issues/4910 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder() | @lhoestq On second thoughts, I think this might be expected behavior; although a better error message might help.
Reasoning: Given n configs, if no data file is provided for any config, then it should be an error. Then why it should not be the case if out of n configs, for some data files are provided but not for others. Also, I was using `--all_configs` flag with `dataset-cli test`. | ## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
| 69 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder()
## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
@lhoestq On second thoughts, I think this might be expected behavior; although a better error message might help.
Reasoning: Given n configs, if no data file is provided for any config, then it should be an error. Then why it should not be the case if out of n configs, for some data files are provided but not for others. Also, I was using `--all_configs` flag with `dataset-cli test`. | [
-0.08519301563501358,
-0.14594313502311707,
0.006792660802602768,
0.4719575047492981,
0.27088138461112976,
0.08011270314455032,
0.24027591943740845,
0.1089896708726883,
-0.2414916455745697,
0.15479227900505066,
-0.09932543337345123,
0.3852587640285492,
-0.030969001352787018,
0.24276365339756012,
0.06773883104324341,
-0.03544536232948303,
0.054739415645599365,
0.06146349385380745,
-0.2279936671257019,
0.12118467688560486,
-0.21832925081253052,
0.2624109387397766,
-0.020392369478940964,
0.25486302375793457,
-0.3395843505859375,
-0.10613759607076645,
-0.24992352724075317,
0.031117435544729233,
0.014837938360869884,
-0.4849989414215088,
0.31618157029151917,
0.13647474348545074,
-0.1703227311372757,
0.6551611423492432,
-0.00011286996596027166,
0.16506776213645935,
0.23495176434516907,
0.1325702965259552,
-0.5751627683639526,
-0.21676503121852875,
-0.05722127854824066,
0.008684549480676651,
0.08764950186014175,
-0.3176528513431549,
0.13384458422660828,
-0.14094997942447662,
-0.15338554978370667,
-0.10389886796474457,
0.38512033224105835,
0.05811421945691109,
0.17437338829040527,
0.2745927572250366,
0.028946805745363235,
-0.07463809102773666,
-0.04037842899560928,
0.06256090849637985,
-0.1101265549659729,
0.13717493414878845,
-0.2049751877784729,
0.2105477750301361,
0.06919534504413605,
0.1355566680431366,
-0.24306444823741913,
0.02049260027706623,
0.5361902713775635,
-0.04544783756136894,
0.17179381847381592,
-0.22794228792190552,
0.16312538087368011,
0.23452553153038025,
0.08205421268939972,
-0.43653562664985657,
-0.4073426425457001,
-0.5173814296722412,
0.0876118391752243,
-0.107334204018116,
0.282135933637619,
0.15203073620796204,
-0.3582257032394409,
-0.12245604395866394,
-0.07505388557910919,
-0.0042612734250724316,
-0.0016531571745872498,
0.07943063974380493,
0.1254553496837616,
0.1809983253479004,
-0.1276191920042038,
0.16871926188468933,
0.3222739100456238,
-0.07918091118335724,
-0.05021548271179199,
-0.5685057640075684,
-0.1787455528974533,
0.03454909101128578,
-0.04429638013243675,
0.20805397629737854,
0.06080795079469681,
0.38588112592697144,
0.5216395258903503,
-0.34687352180480957,
-0.03800837695598602,
-0.16286993026733398,
0.11662688851356506,
0.13898925483226776,
0.34274548292160034,
0.2298440784215927,
0.35447701811790466,
0.08471644669771194,
0.0071446336805820465,
0.1768621951341629,
-0.422379732131958,
-0.02075302228331566,
0.0821656584739685,
-0.18779443204402924,
0.14866741001605988,
0.03792339935898781,
0.5304942727088928,
0.1173870861530304,
-0.1371062695980072,
-0.14625871181488037,
-0.06090337410569191,
-0.14173705875873566,
0.1668754518032074,
0.28391560912132263,
0.04657460004091263,
0.07618536800146103,
0.0294359028339386,
0.3637068271636963,
-0.024139316752552986,
-0.1479981243610382,
-0.21447676420211792,
-0.007654029875993729,
-0.19244830310344696,
0.09213639795780182,
-0.04483027011156082,
-0.5829445123672485,
0.24345427751541138,
0.3944115936756134,
0.08613868057727814,
-0.3127298653125763,
-0.11282716691493988,
0.13183395564556122,
-0.2910442650318146,
-0.0518706850707531,
-0.14534637331962585,
0.4744473099708557,
0.02490926720201969,
-0.18245066702365875,
-0.20523688197135925,
-0.19515946507453918,
-0.3722633421421051,
-0.32103845477104187,
0.11706186830997467,
0.1901029497385025,
-0.13670295476913452,
0.20555110275745392,
-0.44215914607048035,
0.021724138408899307,
0.25424984097480774,
0.017691057175397873,
-0.2308785319328308,
-0.04370591789484024,
-0.3340532183647156,
-0.3247619569301605,
0.15836256742477417,
0.48256534337997437,
0.11942628026008606,
-0.32447656989097595,
-0.13321299850940704,
0.17104367911815643,
-0.1105993315577507,
0.001449301838874817,
-0.41569340229034424,
0.5486012697219849,
-0.34069666266441345,
0.14723694324493408,
0.49837759137153625,
-0.17491915822029114,
-0.1170329749584198,
0.35693785548210144,
0.04424073547124863,
0.2540223300457001,
0.23949885368347168,
-0.2880409061908722,
-0.16898733377456665,
-0.011639201082289219,
0.13137286901474,
0.11549381166696548,
0.09703385084867477,
0.1863536536693573,
-0.07208900153636932,
-0.2772684395313263,
0.1306408792734146,
-0.30968254804611206,
-0.18344521522521973,
0.01441173255443573,
-0.1269494593143463,
0.10822348296642303,
0.2312471866607666,
-0.34139585494995117,
-0.15581844747066498,
0.17981399595737457,
-0.051369559019804,
0.057915981858968735,
-0.08353723585605621,
-0.07854217290878296,
-0.6448091864585876,
0.29318368434906006,
-0.16519415378570557,
0.15125589072704315,
-0.2257334142923355,
-0.38054358959198,
-0.23676654696464539,
0.24898992478847504,
-0.45464029908180237,
-0.0911744087934494,
0.16519838571548462,
0.27198463678359985,
-0.12215860188007355,
0.14374014735221863,
-0.12931884825229645,
-0.041844502091407776,
0.04398707300424576,
0.14157149195671082,
-0.20059917867183685,
0.12697800993919373,
-0.3418159484863281,
-0.007650335319340229,
0.00901496410369873,
0.2006816565990448,
0.3212139308452606,
-0.015710169449448586,
0.015980340540409088,
0.27306193113327026,
-0.11481861770153046,
0.230036661028862,
-0.15306362509727478,
0.14120620489120483,
0.23116815090179443,
0.26302072405815125,
0.03145214542746544,
0.08611859381198883,
0.12535466253757477,
-0.11900001019239426,
0.3160568177700043,
0.4567224383354187,
0.27438685297966003,
0.46601971983909607,
0.10743984580039978,
-0.004676584154367447,
-0.08210502564907074,
0.03603028878569603,
0.032734885811805725,
-0.2216217964887619,
0.13999687135219574,
-0.16471204161643982,
0.18515539169311523,
0.22801610827445984,
-0.05310085415840149,
0.17010554671287537,
0.3884848356246948,
0.08949494361877441,
0.1526886224746704,
-0.06775888800621033,
-0.12134843319654465,
0.07633916288614273,
-0.0912986621260643,
0.27382102608680725,
0.2382635623216629,
0.06876310706138611,
-0.08204466104507446,
0.10657830536365509,
-0.16888666152954102,
-0.018857508897781372,
0.23925593495368958,
0.34763282537460327,
0.06919338554143906,
0.13268113136291504,
0.02642500400543213,
0.0426197312772274,
-0.2447521686553955,
-0.023488808423280716,
0.02052462287247181,
0.010220710188150406,
-0.4857616424560547,
0.281681627035141,
-0.26339980959892273,
-0.13183081150054932,
-0.3286435306072235,
-0.03496736288070679,
-0.3447872996330261,
-0.4871562421321869,
-0.15020200610160828,
0.04787465184926987,
-0.21012647449970245,
0.16149315237998962,
-0.187832772731781,
0.1008714884519577,
-0.02852526679635048,
-0.00044582970440387726,
-0.12571419775485992,
-0.15545088052749634,
-0.24372276663780212,
-0.12246982753276825,
0.47471368312835693,
-0.11733333766460419,
0.1498989313840866,
-0.08419216424226761,
-0.17614580690860748,
-0.11680852621793747,
-0.2923862934112549,
0.3260782063007355,
-0.10809668898582458,
0.5198299288749695,
0.3955690264701843,
0.27974435687065125,
0.08574675023555756,
-0.7071952819824219,
0.5273146629333496,
0.13888223469257355,
-0.012812291271984577,
0.2169605940580368,
0.02029380388557911,
-0.05989551171660423,
-0.10167527198791504,
-0.060538552701473236,
0.19594986736774445,
-0.3254178464412689,
-0.015394531190395355,
-0.12702089548110962,
0.12321306020021439,
0.5703558325767517,
0.2826966941356659,
0.12998731434345245,
-0.39296287298202515,
0.36304861307144165,
-0.07958472520112991,
-0.1020592749118805,
0.06975876539945602,
-0.06895814836025238,
-0.24356453120708466,
-0.2104908674955368,
-0.1625443696975708,
0.3503536880016327,
-0.2534930109977722,
-0.3982998728752136,
-0.3161853849887848,
-0.21541672945022583,
0.43021905422210693,
0.17269738018512726,
0.09278323501348495,
-0.28115352988243103,
0.2967935800552368,
-0.06286539882421494,
-0.13380512595176697,
-0.16837117075920105,
0.25808003544807434,
-0.13730260729789734,
0.1453358232975006,
0.223155677318573,
0.24498280882835388,
-0.06826747953891754,
0.3269980549812317,
0.34819379448890686,
-0.19053980708122253,
0.4311788082122803,
-0.1365460604429245,
0.34966880083084106,
-0.20850244164466858,
-0.5836889147758484,
-0.34453704953193665,
-0.15398046374320984,
-0.047941338270902634,
0.19266363978385925,
0.04444892704486847,
0.35163331031799316,
-0.17792735993862152,
-0.23908181488513947,
-0.1577083170413971,
-0.5157604217529297,
0.002899063751101494,
-0.009006664156913757,
-0.0823744460940361,
-0.011623687110841274,
0.04215783625841141,
-0.22947609424591064,
0.15282389521598816,
0.25278979539871216,
0.15333810448646545,
-0.0532417818903923,
0.008581395260989666,
-0.28123605251312256,
-0.12414145469665527,
-0.2418815791606903,
0.30487746000289917,
0.067392498254776,
-0.21101875603199005,
0.10935690999031067,
0.1639489233493805,
-0.003054969012737274,
-0.0214706901460886,
0.5779324173927307,
-0.018962854519486427,
0.1991378515958786,
0.06752876937389374,
-0.08183005452156067,
-0.3701930046081543,
-0.056061599403619766,
0.07136590778827667,
0.1983376443386078,
0.28697264194488525,
0.3765125572681427,
-0.5835590958595276,
-0.1810869723558426,
-0.015715409070253372,
0.3340977728366852,
-0.18211133778095245,
-0.1147400289773941,
-0.1655113697052002,
-0.4028494358062744,
-0.2640482485294342,
-0.15972480177879333,
0.08668336272239685,
0.3688933849334717,
0.017163945361971855,
-0.005611930042505264,
0.0021332763135433197,
-0.04059721529483795,
0.12407092750072479,
0.16751116514205933,
0.4992747902870178,
-0.12614451348781586,
0.12278789281845093,
0.05496911704540253,
0.062282729893922806,
0.09040861576795578,
0.6278823018074036,
-0.25038769841194153,
-0.23554947972297668,
-0.3095196783542633,
-0.056172747164964676,
0.22143378853797913,
0.34966903924942017,
-0.19029022753238678,
0.24877718091011047,
0.0655822604894638,
-0.052293673157691956,
-0.15259949862957,
0.002721858210861683,
0.5194914937019348,
0.08793067187070847,
-0.15376435220241547,
-0.5734370350837708,
0.588078498840332,
0.09976918995380402,
-0.1802544742822647,
0.2873460054397583,
0.4528495669364929,
-0.42743515968322754,
0.37027573585510254,
-0.11776223033666611,
0.8632777333259583,
0.18954290449619293,
0.24428917467594147,
0.3900461792945862,
0.09585420787334442,
0.3645685613155365,
0.15402443706989288,
-0.08633636683225632,
-0.3569331169128418,
0.1122409850358963,
0.14670953154563904,
-0.026738887652754784,
0.04832077771425247,
0.16746777296066284,
-0.29633989930152893,
0.18398652970790863,
-0.4132699966430664,
0.29152944684028625,
-0.22493265569210052,
0.26365581154823303,
-0.19731099903583527,
-0.058685678988695145,
-0.4418042302131653,
0.10379794239997864,
-0.05097486823797226,
0.19936878979206085,
0.02190987393260002,
-0.2321079820394516,
0.18327106535434723,
-0.4755513072013855,
-0.2830694019794464,
0.05048806965351105,
-0.33834901452064514,
0.2363026738166809,
0.12344926595687866,
-0.04467986151576042,
0.11878228187561035,
0.46471327543258667,
0.3770855665206909,
0.03344002738595009,
-0.06846162676811218,
0.13245859742164612,
-0.18811437487602234,
-0.02263854630291462,
-0.31649449467658997,
-0.13487108051776886,
0.17723391950130463,
-0.08587317168712616,
-0.13801103830337524,
0.019037991762161255,
-0.043128933757543564,
-0.10810281336307526,
-0.1240658089518547,
-0.05360817909240723,
-0.3734748363494873,
-0.5802383422851562,
-0.13178595900535583,
-0.14860333502292633,
0.10639163851737976,
-0.2842957675457001,
0.0638355165719986,
-0.147508442401886,
-0.28042852878570557,
-0.01583566516637802,
0.1438254863023758,
-0.1403050422668457,
0.09541705250740051,
0.10746492445468903,
0.005422711372375488,
0.13476240634918213,
0.6162465810775757,
0.04773853346705437,
-0.11422525346279144,
-0.08871926367282867,
0.13746947050094604,
0.31087344884872437,
-0.37409770488739014,
0.3050093352794647,
-0.025112776085734367,
-0.045069336891174316,
-0.1480938345193863,
0.732974648475647,
0.17103278636932373,
0.2776179909706116,
0.008606720715761185,
-0.08346216380596161,
-0.05732237547636032,
0.2575116753578186,
-0.03810722753405571,
0.29431837797164917,
0.006985511630773544,
0.029358642175793648,
0.13094070553779602,
0.26390841603279114,
-0.28537890315055847,
-0.08096669614315033,
-0.18314065039157867,
0.045673418790102005,
0.32602807879447937,
-0.07304149866104126,
0.2079375982284546,
0.1280592381954193,
0.1305363029241562,
-0.011515721678733826,
-0.21582093834877014,
-0.15986594557762146,
-0.3132457435131073,
0.1374211311340332,
0.008826394565403461,
0.21152684092521667,
0.08751889318227768,
-0.010876239277422428,
0.23077069222927094,
-0.2788582146167755,
0.31716862320899963,
0.16736170649528503,
-0.031034089624881744,
0.15625327825546265,
0.13662351667881012,
0.20369088649749756,
0.06951181590557098,
0.1423925757408142,
-0.1997145414352417,
0.19290263950824738,
0.3586812913417816,
0.22282999753952026,
-0.12515582144260406,
-0.028817307204008102,
0.052880242466926575,
0.14701208472251892,
-0.18334849178791046,
0.16340017318725586,
0.0925685465335846,
-0.23288147151470184,
-0.09912770986557007,
0.2808533012866974,
0.252600759267807,
0.4642675518989563,
-0.3501046299934387,
0.16490094363689423,
-0.13060808181762695,
0.0920008197426796,
-0.12319470196962357,
-0.296474426984787,
0.2805491089820862,
-0.32026776671409607,
0.041611481457948685,
0.3654356896877289,
0.1862589716911316,
-0.16158033907413483,
-0.1494530737400055,
-0.11335452646017075,
0.35729658603668213,
-0.1114431619644165,
0.40068185329437256,
0.5323944091796875,
0.03944920375943184,
-0.03986449912190437,
0.2974790632724762,
0.259181410074234,
0.08008872717618942,
0.26104187965393066,
-0.4594918489456177,
0.0978689193725586,
0.010390400886535645,
-0.19618958234786987,
0.48240166902542114,
-0.06934194266796112,
0.4847164750099182,
0.27205222845077515,
-0.0869525820016861,
0.012415815144777298,
-0.14669890701770782,
0.3089441657066345,
-0.2319159358739853,
-0.1549394726753235,
-0.29755157232284546,
0.29844191670417786,
-0.21309629082679749,
-0.28461503982543945,
-0.2574390769004822,
-0.2881096303462982,
-0.13378217816352844,
-0.04512994736433029,
-0.04473145678639412,
-0.3223118185997009,
0.37862470746040344,
-0.044959187507629395,
-0.08326703310012817,
-0.214882031083107,
-0.08946149796247482,
0.14780613780021667,
0.08853480219841003,
-0.37906262278556824,
0.2412554919719696,
0.3497841954231262,
0.027483437210321426,
0.04667837172746658,
0.333101749420166,
0.8321417570114136,
0.3508356213569641,
-0.026464387774467468,
0.03932600095868111,
-0.04619738087058067,
0.011306477710604668,
-0.060098085552453995,
-0.19010306894779205,
-0.20099744200706482,
0.18358789384365082,
0.42203307151794434,
0.1010255292057991,
-0.16755127906799316,
-0.3007484972476959,
0.08652520924806595,
0.34449371695518494,
-0.29742276668548584,
0.23916733264923096,
-0.2950367033481598,
-0.021010607481002808,
-0.13583412766456604,
0.28305211663246155,
-0.36508336663246155,
-0.20492611825466156,
0.5070193409919739,
0.07554551213979721,
0.06268440186977386,
-0.2516941428184509,
0.095626100897789,
0.15402017533779144,
0.5281152129173279,
0.14122101664543152,
0.05185745283961296,
-0.43078699707984924,
0.10599282383918762,
-0.5533005595207214,
-0.07547556608915329,
-0.13322237133979797,
-0.11323688924312592,
0.16033492982387543,
0.03736133873462677,
-0.19731000065803528,
0.10727868974208832,
0.1578671783208847,
0.2401515394449234,
0.029125314205884933,
0.037937458604574203,
-0.4085516929626465,
-0.2739596962928772,
0.1890488862991333,
-0.18092584609985352,
0.1925642043352127,
-0.2366178333759308,
0.1463562250137329,
-0.30365774035453796,
0.01740090548992157,
0.07216104120016098,
0.13594892621040344,
0.20686747133731842,
-0.322506844997406,
0.15999072790145874,
0.050935886800289154,
0.5018405914306641,
-0.05515792965888977,
-0.2660669982433319,
-0.24398642778396606,
-0.28833380341529846,
-0.21785663068294525,
0.005787573754787445,
0.09979808330535889,
0.10039680451154709,
-0.3156595528125763,
-0.11289305984973907,
-0.3973327875137329,
0.10145553201436996,
0.20169785618782043,
-0.3076213300228119,
0.021677589043974876,
0.1976681351661682,
-0.07342246919870377,
-0.05770527571439743,
0.13368795812129974,
0.06750214844942093,
-0.04951035976409912,
0.2457188218832016,
-0.009262904524803162,
-0.5538161993026733,
0.7703667283058167,
-0.23501965403556824,
-0.3211057484149933,
-0.06664067506790161,
0.12151135504245758,
0.017082780599594116,
0.020477857440710068,
-0.7054316401481628,
-0.026324063539505005,
0.3465484082698822,
0.08370321989059448,
-0.24896524846553802,
0.1779339462518692,
-0.06699885427951813,
-0.05615312606096268,
0.019067656248807907,
-0.15319453179836273,
0.07188285887241364,
-0.29968953132629395,
0.21892425417900085,
-0.17063772678375244
] |
https://github.com/huggingface/datasets/issues/4910 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder() | Ok I see - maybe we should check the values of builder_kwargs raise an error if any key in config_kwargs tries to overwrite it ? The builder kwargs are determined from the builder's type and location (in some cases it forces the base_path, data_files and config name for example) | ## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
| 49 | Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder()
## Describe the bug
In `load_dataset_builder()`, `build_kwargs` and `config_kwargs` can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: `base_path`. It might happen with other kwargs as well. I think a quickfix would be
```python
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")
```
and then pass base_path into `builder_cls`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")
```
## Expected results
The docs state: `**config_kwargs` — Keyword arguments to be passed to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.BuilderConfig) and used in the [DatasetBuilder](https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/builder_classes#datasets.DatasetBuilder).
So I would expect to be able to pass the base_path into `load_dataset()`.
## Actual results
TypeError("type object got multiple values for keyword argument "base_path").
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: macOS-12.5-arm64-arm-64bit
- Python version: 3.8.9
- PyArrow version: 9.0.0
Ok I see - maybe we should check the values of builder_kwargs raise an error if any key in config_kwargs tries to overwrite it ? The builder kwargs are determined from the builder's type and location (in some cases it forces the base_path, data_files and config name for example) | [
-0.08519301563501358,
-0.14594313502311707,
0.006792660802602768,
0.4719575047492981,
0.27088138461112976,
0.08011270314455032,
0.24027591943740845,
0.1089896708726883,
-0.2414916455745697,
0.15479227900505066,
-0.09932543337345123,
0.3852587640285492,
-0.030969001352787018,
0.24276365339756012,
0.06773883104324341,
-0.03544536232948303,
0.054739415645599365,
0.06146349385380745,
-0.2279936671257019,
0.12118467688560486,
-0.21832925081253052,
0.2624109387397766,
-0.020392369478940964,
0.25486302375793457,
-0.3395843505859375,
-0.10613759607076645,
-0.24992352724075317,
0.031117435544729233,
0.014837938360869884,
-0.4849989414215088,
0.31618157029151917,
0.13647474348545074,
-0.1703227311372757,
0.6551611423492432,
-0.00011286996596027166,
0.16506776213645935,
0.23495176434516907,
0.1325702965259552,
-0.5751627683639526,
-0.21676503121852875,
-0.05722127854824066,
0.008684549480676651,
0.08764950186014175,
-0.3176528513431549,
0.13384458422660828,
-0.14094997942447662,
-0.15338554978370667,
-0.10389886796474457,
0.38512033224105835,
0.05811421945691109,
0.17437338829040527,
0.2745927572250366,
0.028946805745363235,
-0.07463809102773666,
-0.04037842899560928,
0.06256090849637985,
-0.1101265549659729,
0.13717493414878845,
-0.2049751877784729,
0.2105477750301361,
0.06919534504413605,
0.1355566680431366,
-0.24306444823741913,
0.02049260027706623,
0.5361902713775635,
-0.04544783756136894,
0.17179381847381592,
-0.22794228792190552,
0.16312538087368011,
0.23452553153038025,
0.08205421268939972,
-0.43653562664985657,
-0.4073426425457001,
-0.5173814296722412,
0.0876118391752243,
-0.107334204018116,
0.282135933637619,
0.15203073620796204,
-0.3582257032394409,
-0.12245604395866394,
-0.07505388557910919,
-0.0042612734250724316,
-0.0016531571745872498,
0.07943063974380493,
0.1254553496837616,
0.1809983253479004,
-0.1276191920042038,
0.16871926188468933,
0.3222739100456238,
-0.07918091118335724,
-0.05021548271179199,
-0.5685057640075684,
-0.1787455528974533,
0.03454909101128578,
-0.04429638013243675,
0.20805397629737854,
0.06080795079469681,
0.38588112592697144,
0.5216395258903503,
-0.34687352180480957,
-0.03800837695598602,
-0.16286993026733398,
0.11662688851356506,
0.13898925483226776,
0.34274548292160034,
0.2298440784215927,
0.35447701811790466,
0.08471644669771194,
0.0071446336805820465,
0.1768621951341629,
-0.422379732131958,
-0.02075302228331566,
0.0821656584739685,
-0.18779443204402924,
0.14866741001605988,
0.03792339935898781,
0.5304942727088928,
0.1173870861530304,
-0.1371062695980072,
-0.14625871181488037,
-0.06090337410569191,
-0.14173705875873566,
0.1668754518032074,
0.28391560912132263,
0.04657460004091263,
0.07618536800146103,
0.0294359028339386,
0.3637068271636963,
-0.024139316752552986,
-0.1479981243610382,
-0.21447676420211792,
-0.007654029875993729,
-0.19244830310344696,
0.09213639795780182,
-0.04483027011156082,
-0.5829445123672485,
0.24345427751541138,
0.3944115936756134,
0.08613868057727814,
-0.3127298653125763,
-0.11282716691493988,
0.13183395564556122,
-0.2910442650318146,
-0.0518706850707531,
-0.14534637331962585,
0.4744473099708557,
0.02490926720201969,
-0.18245066702365875,
-0.20523688197135925,
-0.19515946507453918,
-0.3722633421421051,
-0.32103845477104187,
0.11706186830997467,
0.1901029497385025,
-0.13670295476913452,
0.20555110275745392,
-0.44215914607048035,
0.021724138408899307,
0.25424984097480774,
0.017691057175397873,
-0.2308785319328308,
-0.04370591789484024,
-0.3340532183647156,
-0.3247619569301605,
0.15836256742477417,
0.48256534337997437,
0.11942628026008606,
-0.32447656989097595,
-0.13321299850940704,
0.17104367911815643,
-0.1105993315577507,
0.001449301838874817,
-0.41569340229034424,
0.5486012697219849,
-0.34069666266441345,
0.14723694324493408,
0.49837759137153625,
-0.17491915822029114,
-0.1170329749584198,
0.35693785548210144,
0.04424073547124863,
0.2540223300457001,
0.23949885368347168,
-0.2880409061908722,
-0.16898733377456665,
-0.011639201082289219,
0.13137286901474,
0.11549381166696548,
0.09703385084867477,
0.1863536536693573,
-0.07208900153636932,
-0.2772684395313263,
0.1306408792734146,
-0.30968254804611206,
-0.18344521522521973,
0.01441173255443573,
-0.1269494593143463,
0.10822348296642303,
0.2312471866607666,
-0.34139585494995117,
-0.15581844747066498,
0.17981399595737457,
-0.051369559019804,
0.057915981858968735,
-0.08353723585605621,
-0.07854217290878296,
-0.6448091864585876,
0.29318368434906006,
-0.16519415378570557,
0.15125589072704315,
-0.2257334142923355,
-0.38054358959198,
-0.23676654696464539,
0.24898992478847504,
-0.45464029908180237,
-0.0911744087934494,
0.16519838571548462,
0.27198463678359985,
-0.12215860188007355,
0.14374014735221863,
-0.12931884825229645,
-0.041844502091407776,
0.04398707300424576,
0.14157149195671082,
-0.20059917867183685,
0.12697800993919373,
-0.3418159484863281,
-0.007650335319340229,
0.00901496410369873,
0.2006816565990448,
0.3212139308452606,
-0.015710169449448586,
0.015980340540409088,
0.27306193113327026,
-0.11481861770153046,
0.230036661028862,
-0.15306362509727478,
0.14120620489120483,
0.23116815090179443,
0.26302072405815125,
0.03145214542746544,
0.08611859381198883,
0.12535466253757477,
-0.11900001019239426,
0.3160568177700043,
0.4567224383354187,
0.27438685297966003,
0.46601971983909607,
0.10743984580039978,
-0.004676584154367447,
-0.08210502564907074,
0.03603028878569603,
0.032734885811805725,
-0.2216217964887619,
0.13999687135219574,
-0.16471204161643982,
0.18515539169311523,
0.22801610827445984,
-0.05310085415840149,
0.17010554671287537,
0.3884848356246948,
0.08949494361877441,
0.1526886224746704,
-0.06775888800621033,
-0.12134843319654465,
0.07633916288614273,
-0.0912986621260643,
0.27382102608680725,
0.2382635623216629,
0.06876310706138611,
-0.08204466104507446,
0.10657830536365509,
-0.16888666152954102,
-0.018857508897781372,
0.23925593495368958,
0.34763282537460327,
0.06919338554143906,
0.13268113136291504,
0.02642500400543213,
0.0426197312772274,
-0.2447521686553955,
-0.023488808423280716,
0.02052462287247181,
0.010220710188150406,
-0.4857616424560547,
0.281681627035141,
-0.26339980959892273,
-0.13183081150054932,
-0.3286435306072235,
-0.03496736288070679,
-0.3447872996330261,
-0.4871562421321869,
-0.15020200610160828,
0.04787465184926987,
-0.21012647449970245,
0.16149315237998962,
-0.187832772731781,
0.1008714884519577,
-0.02852526679635048,
-0.00044582970440387726,
-0.12571419775485992,
-0.15545088052749634,
-0.24372276663780212,
-0.12246982753276825,
0.47471368312835693,
-0.11733333766460419,
0.1498989313840866,
-0.08419216424226761,
-0.17614580690860748,
-0.11680852621793747,
-0.2923862934112549,
0.3260782063007355,
-0.10809668898582458,
0.5198299288749695,
0.3955690264701843,
0.27974435687065125,
0.08574675023555756,
-0.7071952819824219,
0.5273146629333496,
0.13888223469257355,
-0.012812291271984577,
0.2169605940580368,
0.02029380388557911,
-0.05989551171660423,
-0.10167527198791504,
-0.060538552701473236,
0.19594986736774445,
-0.3254178464412689,
-0.015394531190395355,
-0.12702089548110962,
0.12321306020021439,
0.5703558325767517,
0.2826966941356659,
0.12998731434345245,
-0.39296287298202515,
0.36304861307144165,
-0.07958472520112991,
-0.1020592749118805,
0.06975876539945602,
-0.06895814836025238,
-0.24356453120708466,
-0.2104908674955368,
-0.1625443696975708,
0.3503536880016327,
-0.2534930109977722,
-0.3982998728752136,
-0.3161853849887848,
-0.21541672945022583,
0.43021905422210693,
0.17269738018512726,
0.09278323501348495,
-0.28115352988243103,
0.2967935800552368,
-0.06286539882421494,
-0.13380512595176697,
-0.16837117075920105,
0.25808003544807434,
-0.13730260729789734,
0.1453358232975006,
0.223155677318573,
0.24498280882835388,
-0.06826747953891754,
0.3269980549812317,
0.34819379448890686,
-0.19053980708122253,
0.4311788082122803,
-0.1365460604429245,
0.34966880083084106,
-0.20850244164466858,
-0.5836889147758484,
-0.34453704953193665,
-0.15398046374320984,
-0.047941338270902634,
0.19266363978385925,
0.04444892704486847,
0.35163331031799316,
-0.17792735993862152,
-0.23908181488513947,
-0.1577083170413971,
-0.5157604217529297,
0.002899063751101494,
-0.009006664156913757,
-0.0823744460940361,
-0.011623687110841274,
0.04215783625841141,
-0.22947609424591064,
0.15282389521598816,
0.25278979539871216,
0.15333810448646545,
-0.0532417818903923,
0.008581395260989666,
-0.28123605251312256,
-0.12414145469665527,
-0.2418815791606903,
0.30487746000289917,
0.067392498254776,
-0.21101875603199005,
0.10935690999031067,
0.1639489233493805,
-0.003054969012737274,
-0.0214706901460886,
0.5779324173927307,
-0.018962854519486427,
0.1991378515958786,
0.06752876937389374,
-0.08183005452156067,
-0.3701930046081543,
-0.056061599403619766,
0.07136590778827667,
0.1983376443386078,
0.28697264194488525,
0.3765125572681427,
-0.5835590958595276,
-0.1810869723558426,
-0.015715409070253372,
0.3340977728366852,
-0.18211133778095245,
-0.1147400289773941,
-0.1655113697052002,
-0.4028494358062744,
-0.2640482485294342,
-0.15972480177879333,
0.08668336272239685,
0.3688933849334717,
0.017163945361971855,
-0.005611930042505264,
0.0021332763135433197,
-0.04059721529483795,
0.12407092750072479,
0.16751116514205933,
0.4992747902870178,
-0.12614451348781586,
0.12278789281845093,
0.05496911704540253,
0.062282729893922806,
0.09040861576795578,
0.6278823018074036,
-0.25038769841194153,
-0.23554947972297668,
-0.3095196783542633,
-0.056172747164964676,
0.22143378853797913,
0.34966903924942017,
-0.19029022753238678,
0.24877718091011047,
0.0655822604894638,
-0.052293673157691956,
-0.15259949862957,
0.002721858210861683,
0.5194914937019348,
0.08793067187070847,
-0.15376435220241547,
-0.5734370350837708,
0.588078498840332,
0.09976918995380402,
-0.1802544742822647,
0.2873460054397583,
0.4528495669364929,
-0.42743515968322754,
0.37027573585510254,
-0.11776223033666611,
0.8632777333259583,
0.18954290449619293,
0.24428917467594147,
0.3900461792945862,
0.09585420787334442,
0.3645685613155365,
0.15402443706989288,
-0.08633636683225632,
-0.3569331169128418,
0.1122409850358963,
0.14670953154563904,
-0.026738887652754784,
0.04832077771425247,
0.16746777296066284,
-0.29633989930152893,
0.18398652970790863,
-0.4132699966430664,
0.29152944684028625,
-0.22493265569210052,
0.26365581154823303,
-0.19731099903583527,
-0.058685678988695145,
-0.4418042302131653,
0.10379794239997864,
-0.05097486823797226,
0.19936878979206085,
0.02190987393260002,
-0.2321079820394516,
0.18327106535434723,
-0.4755513072013855,
-0.2830694019794464,
0.05048806965351105,
-0.33834901452064514,
0.2363026738166809,
0.12344926595687866,
-0.04467986151576042,
0.11878228187561035,
0.46471327543258667,
0.3770855665206909,
0.03344002738595009,
-0.06846162676811218,
0.13245859742164612,
-0.18811437487602234,
-0.02263854630291462,
-0.31649449467658997,
-0.13487108051776886,
0.17723391950130463,
-0.08587317168712616,
-0.13801103830337524,
0.019037991762161255,
-0.043128933757543564,
-0.10810281336307526,
-0.1240658089518547,
-0.05360817909240723,
-0.3734748363494873,
-0.5802383422851562,
-0.13178595900535583,
-0.14860333502292633,
0.10639163851737976,
-0.2842957675457001,
0.0638355165719986,
-0.147508442401886,
-0.28042852878570557,
-0.01583566516637802,
0.1438254863023758,
-0.1403050422668457,
0.09541705250740051,
0.10746492445468903,
0.005422711372375488,
0.13476240634918213,
0.6162465810775757,
0.04773853346705437,
-0.11422525346279144,
-0.08871926367282867,
0.13746947050094604,
0.31087344884872437,
-0.37409770488739014,
0.3050093352794647,
-0.025112776085734367,
-0.045069336891174316,
-0.1480938345193863,
0.732974648475647,
0.17103278636932373,
0.2776179909706116,
0.008606720715761185,
-0.08346216380596161,
-0.05732237547636032,
0.2575116753578186,
-0.03810722753405571,
0.29431837797164917,
0.006985511630773544,
0.029358642175793648,
0.13094070553779602,
0.26390841603279114,
-0.28537890315055847,
-0.08096669614315033,
-0.18314065039157867,
0.045673418790102005,
0.32602807879447937,
-0.07304149866104126,
0.2079375982284546,
0.1280592381954193,
0.1305363029241562,
-0.011515721678733826,
-0.21582093834877014,
-0.15986594557762146,
-0.3132457435131073,
0.1374211311340332,
0.008826394565403461,
0.21152684092521667,
0.08751889318227768,
-0.010876239277422428,
0.23077069222927094,
-0.2788582146167755,
0.31716862320899963,
0.16736170649528503,
-0.031034089624881744,
0.15625327825546265,
0.13662351667881012,
0.20369088649749756,
0.06951181590557098,
0.1423925757408142,
-0.1997145414352417,
0.19290263950824738,
0.3586812913417816,
0.22282999753952026,
-0.12515582144260406,
-0.028817307204008102,
0.052880242466926575,
0.14701208472251892,
-0.18334849178791046,
0.16340017318725586,
0.0925685465335846,
-0.23288147151470184,
-0.09912770986557007,
0.2808533012866974,
0.252600759267807,
0.4642675518989563,
-0.3501046299934387,
0.16490094363689423,
-0.13060808181762695,
0.0920008197426796,
-0.12319470196962357,
-0.296474426984787,
0.2805491089820862,
-0.32026776671409607,
0.041611481457948685,
0.3654356896877289,
0.1862589716911316,
-0.16158033907413483,
-0.1494530737400055,
-0.11335452646017075,
0.35729658603668213,
-0.1114431619644165,
0.40068185329437256,
0.5323944091796875,
0.03944920375943184,
-0.03986449912190437,
0.2974790632724762,
0.259181410074234,
0.08008872717618942,
0.26104187965393066,
-0.4594918489456177,
0.0978689193725586,
0.010390400886535645,
-0.19618958234786987,
0.48240166902542114,
-0.06934194266796112,
0.4847164750099182,
0.27205222845077515,
-0.0869525820016861,
0.012415815144777298,
-0.14669890701770782,
0.3089441657066345,
-0.2319159358739853,
-0.1549394726753235,
-0.29755157232284546,
0.29844191670417786,
-0.21309629082679749,
-0.28461503982543945,
-0.2574390769004822,
-0.2881096303462982,
-0.13378217816352844,
-0.04512994736433029,
-0.04473145678639412,
-0.3223118185997009,
0.37862470746040344,
-0.044959187507629395,
-0.08326703310012817,
-0.214882031083107,
-0.08946149796247482,
0.14780613780021667,
0.08853480219841003,
-0.37906262278556824,
0.2412554919719696,
0.3497841954231262,
0.027483437210321426,
0.04667837172746658,
0.333101749420166,
0.8321417570114136,
0.3508356213569641,
-0.026464387774467468,
0.03932600095868111,
-0.04619738087058067,
0.011306477710604668,
-0.060098085552453995,
-0.19010306894779205,
-0.20099744200706482,
0.18358789384365082,
0.42203307151794434,
0.1010255292057991,
-0.16755127906799316,
-0.3007484972476959,
0.08652520924806595,
0.34449371695518494,
-0.29742276668548584,
0.23916733264923096,
-0.2950367033481598,
-0.021010607481002808,
-0.13583412766456604,
0.28305211663246155,
-0.36508336663246155,
-0.20492611825466156,
0.5070193409919739,
0.07554551213979721,
0.06268440186977386,
-0.2516941428184509,
0.095626100897789,
0.15402017533779144,
0.5281152129173279,
0.14122101664543152,
0.05185745283961296,
-0.43078699707984924,
0.10599282383918762,
-0.5533005595207214,
-0.07547556608915329,
-0.13322237133979797,
-0.11323688924312592,
0.16033492982387543,
0.03736133873462677,
-0.19731000065803528,
0.10727868974208832,
0.1578671783208847,
0.2401515394449234,
0.029125314205884933,
0.037937458604574203,
-0.4085516929626465,
-0.2739596962928772,
0.1890488862991333,
-0.18092584609985352,
0.1925642043352127,
-0.2366178333759308,
0.1463562250137329,
-0.30365774035453796,
0.01740090548992157,
0.07216104120016098,
0.13594892621040344,
0.20686747133731842,
-0.322506844997406,
0.15999072790145874,
0.050935886800289154,
0.5018405914306641,
-0.05515792965888977,
-0.2660669982433319,
-0.24398642778396606,
-0.28833380341529846,
-0.21785663068294525,
0.005787573754787445,
0.09979808330535889,
0.10039680451154709,
-0.3156595528125763,
-0.11289305984973907,
-0.3973327875137329,
0.10145553201436996,
0.20169785618782043,
-0.3076213300228119,
0.021677589043974876,
0.1976681351661682,
-0.07342246919870377,
-0.05770527571439743,
0.13368795812129974,
0.06750214844942093,
-0.04951035976409912,
0.2457188218832016,
-0.009262904524803162,
-0.5538161993026733,
0.7703667283058167,
-0.23501965403556824,
-0.3211057484149933,
-0.06664067506790161,
0.12151135504245758,
0.017082780599594116,
0.020477857440710068,
-0.7054316401481628,
-0.026324063539505005,
0.3465484082698822,
0.08370321989059448,
-0.24896524846553802,
0.1779339462518692,
-0.06699885427951813,
-0.05615312606096268,
0.019067656248807907,
-0.15319453179836273,
0.07188285887241364,
-0.29968953132629395,
0.21892425417900085,
-0.17063772678375244
] |
https://github.com/huggingface/datasets/issues/4907 | None Type error for swda datasets | Thanks for reporting @hannan72 ! I couldn't reproduce the error on my side, can you share the full stack trace please ? | ## Describe the bug
I got `'NoneType' object is not callable` error while calling the swda datasets.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("swda")
```
## Expected results
Run without error
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Python version: 3.8.10
| 22 | None Type error for swda datasets
## Describe the bug
I got `'NoneType' object is not callable` error while calling the swda datasets.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("swda")
```
## Expected results
Run without error
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Python version: 3.8.10
Thanks for reporting @hannan72 ! I couldn't reproduce the error on my side, can you share the full stack trace please ? | [
-0.08841851353645325,
-0.33844897150993347,
-0.023160098120570183,
0.3386499285697937,
0.5491559505462646,
-0.04582618921995163,
0.3424973785877228,
0.08639145642518997,
0.1629427671432495,
0.2257208675146103,
0.012357985600829124,
0.2270767092704773,
-0.10950137674808502,
0.16010768711566925,
-0.05334990471601486,
-0.17099183797836304,
-0.008561521768569946,
0.13468173146247864,
-0.10733066499233246,
-0.009551625698804855,
-0.5122122764587402,
-0.012946953997015953,
-0.2875198721885681,
0.018923945724964142,
-0.22854439914226532,
-0.16847126185894012,
0.06495248526334763,
-0.11928118020296097,
-0.10937689989805222,
-0.4488045275211334,
0.604092538356781,
-0.12333451211452484,
0.3613060712814331,
0.6144797205924988,
-0.00010710853530326858,
-0.16669511795043945,
0.6427575349807739,
0.011865785345435143,
-0.1637386679649353,
-0.3062483072280884,
-0.31571173667907715,
-0.32429543137550354,
0.25046390295028687,
-0.11773396283388138,
-0.17980816960334778,
-0.33624058961868286,
-0.01919294334948063,
-0.20172348618507385,
0.2045268714427948,
0.29721325635910034,
0.2904212474822998,
0.35932210087776184,
0.0855732262134552,
-0.30571621656417847,
0.011410951614379883,
0.3265290856361389,
-0.07941947132349014,
-0.04364361613988876,
0.2724481225013733,
0.15803736448287964,
0.563299298286438,
0.3145020604133606,
-0.4160540699958801,
-0.20500552654266357,
0.3407514989376068,
0.020027924329042435,
-0.21338841319084167,
-0.29439017176628113,
0.24222159385681152,
0.2995273470878601,
0.7848957180976868,
-0.24993443489074707,
-0.2877630889415741,
0.0980011448264122,
0.10774533450603485,
0.07891614735126495,
0.16872954368591309,
0.08800750970840454,
-0.0008746813982725143,
-0.04893125221133232,
0.0004412211128510535,
0.3541353642940521,
-0.29151853919029236,
0.20023734867572784,
0.05288270115852356,
-0.06506018340587616,
-0.2100815773010254,
0.12517260015010834,
-0.18229971826076508,
-0.3223402500152588,
0.31772124767303467,
-0.16020885109901428,
-0.06656341254711151,
0.12415316700935364,
-0.31576889753341675,
-0.029669109731912613,
0.1057262271642685,
-0.06110387295484543,
0.08795725554227829,
-0.06848420202732086,
0.037410467863082886,
-0.015004627406597137,
0.03741418942809105,
0.19986972212791443,
0.363882452249527,
0.09795881807804108,
0.27645283937454224,
-0.14743831753730774,
0.08983713388442993,
-0.2577510476112366,
0.05168415233492851,
-0.1827544867992401,
-0.10428407043218613,
-0.0709473043680191,
0.04360117390751839,
-0.013471748679876328,
0.6864092350006104,
-0.13785973191261292,
-0.22508344054222107,
-0.030371490865945816,
-0.2931159436702728,
0.21482162177562714,
0.1101854220032692,
0.522097647190094,
0.18692077696323395,
0.5448540449142456,
0.4255886673927307,
0.12833744287490845,
-0.13314443826675415,
-0.14074872434139252,
-0.2556828260421753,
0.05647067725658417,
-0.11364758014678955,
-0.2768092751502991,
0.17741219699382782,
0.30182307958602905,
-0.038934119045734406,
0.13302277028560638,
-0.23602460324764252,
0.07868185639381409,
0.03442075848579407,
-0.2564871609210968,
-0.0014638230204582214,
0.29491695761680603,
0.148166224360466,
0.07017409056425095,
0.24072977900505066,
0.029725685715675354,
-0.14411088824272156,
0.1235882043838501,
-0.27466121315956116,
-0.16793140769004822,
-0.28173837065696716,
0.19362087547779083,
-0.09028847515583038,
0.012306250631809235,
0.02972704917192459,
0.08518179506063461,
0.031561240553855896,
-0.11092530190944672,
0.04815172031521797,
-0.17781083285808563,
0.10624143481254578,
-0.19378481805324554,
-0.12019843608140945,
0.5604779720306396,
-0.4059271216392517,
-0.024315625429153442,
-0.03611701354384422,
-0.1897118240594864,
0.4156472682952881,
-0.11271883547306061,
-0.17385105788707733,
-0.036444567143917084,
-0.0602881982922554,
-0.048910725861787796,
0.4948352873325348,
-0.3810487389564514,
-0.2280293107032776,
0.003626667894423008,
0.04943838715553284,
-0.14957979321479797,
-0.01668333262205124,
0.07465051859617233,
-0.07757332175970078,
0.16843044757843018,
0.09683641046285629,
0.33304762840270996,
-0.07416700571775436,
0.13329805433750153,
-0.20285363495349884,
-0.2514488399028778,
0.09003816545009613,
0.07404933869838715,
0.23808954656124115,
0.10181783139705658,
-0.11515314131975174,
-0.05949035659432411,
-0.04194474220275879,
-0.13669393956661224,
-0.05565779656171799,
-0.11621086299419403,
0.6177404522895813,
0.17667487263679504,
0.05090917646884918,
-0.5099971890449524,
-0.47034502029418945,
0.06834764778614044,
-0.005439683794975281,
0.37957873940467834,
-0.09221848845481873,
-0.1698852926492691,
-0.029446007683873177,
0.06694542616605759,
0.06015811488032341,
0.046072203665971756,
0.26719868183135986,
0.15815675258636475,
-0.11058509349822998,
0.081947922706604,
-0.23124900460243225,
-0.0033141709864139557,
-0.007429966703057289,
0.12477188557386398,
-0.012935565784573555,
0.2857891023159027,
0.11884545534849167,
-0.36203494668006897,
0.11895352602005005,
0.407690167427063,
0.4151192307472229,
0.111423559486866,
-0.060306258499622345,
0.07895481586456299,
-0.1149538904428482,
-0.3578099012374878,
-0.08913984149694443,
-0.16206590831279755,
-0.03699039667844772,
-0.4089738428592682,
0.06680195778608322,
0.2160230278968811,
0.39321061968803406,
-0.10941247642040253,
0.0713004469871521,
0.5232954621315002,
-0.1261690855026245,
0.3414601981639862,
-0.3136330842971802,
0.40097153186798096,
0.2091435045003891,
-0.02561006136238575,
-0.021182065829634666,
-0.12957574427127838,
-0.07148820161819458,
0.0655428022146225,
0.11922438442707062,
0.008761849254369736,
-0.201712504029274,
0.1910339593887329,
0.528849184513092,
-0.053168728947639465,
0.15069887042045593,
-0.007130347192287445,
-0.40102142095565796,
0.1271475851535797,
0.09617478400468826,
0.3261478841304779,
0.2805243134498596,
0.2942669987678528,
-0.23346206545829773,
-0.2034912109375,
0.011878296732902527,
0.14272037148475647,
0.09111079573631287,
0.06185688078403473,
0.09167730063199997,
0.023012660443782806,
0.11618020385503769,
0.07501000910997391,
-0.3450932502746582,
-0.054506443440914154,
-0.18145732581615448,
0.23244839906692505,
-0.26563841104507446,
0.14895033836364746,
-0.170754075050354,
-0.2725795805454254,
-0.05431792885065079,
-0.09822647273540497,
-0.21366693079471588,
-0.2268078476190567,
-0.269584596157074,
-0.05431879684329033,
0.06276492774486542,
0.16966962814331055,
-0.1806470900774002,
0.2903747260570526,
-0.03806908428668976,
0.06883751600980759,
-0.17017914354801178,
0.10339047759771347,
-0.24796316027641296,
0.07897123694419861,
0.37838977575302124,
0.31815972924232483,
0.5193778872489929,
0.028397953137755394,
0.22739219665527344,
-0.011276118457317352,
-0.14466363191604614,
-0.19750213623046875,
0.1666286587715149,
0.11258634924888611,
0.4590680003166199,
0.13754187524318695,
0.2583019733428955,
-0.23753118515014648,
0.1873493790626526,
-0.3831167221069336,
0.0631473958492279,
0.20458148419857025,
-0.39567849040031433,
0.03043770045042038,
-0.2633921504020691,
-0.2299925684928894,
-0.41897040605545044,
-0.263120174407959,
0.03822115436196327,
0.00902630016207695,
0.1365310400724411,
-0.26936426758766174,
0.2315935492515564,
0.3451511561870575,
-0.06246960535645485,
0.04603620618581772,
-0.011876019649207592,
-0.10256124287843704,
0.24180951714515686,
-0.05829768627882004,
-0.397348016500473,
0.31403663754463196,
-0.17946337163448334,
0.3766578733921051,
-0.14303025603294373,
0.005417376756668091,
-0.10462941974401474,
-0.22964315116405487,
0.05875226482748985,
-0.06502862274646759,
-0.13467933237552643,
0.4294617772102356,
0.1713351607322693,
-0.14440874755382538,
-0.16979503631591797,
-0.14795543253421783,
-0.0009204596281051636,
-0.08400647342205048,
-0.004350088536739349,
0.16325634717941284,
0.42178526520729065,
-0.17311134934425354,
0.11850491166114807,
0.10300479829311371,
-0.21099524199962616,
0.2627173960208893,
0.011438177898526192,
0.2545831799507141,
-0.20608913898468018,
-0.394914448261261,
-0.08800069242715836,
-0.005993828177452087,
0.14372842013835907,
0.05467619374394417,
-0.08599993586540222,
-0.04812726378440857,
-0.2162705957889557,
-0.19161196053028107,
-0.5954470038414001,
-0.15569835901260376,
0.0944196805357933,
-0.0290316641330719,
-0.167184978723526,
-0.071797676384449,
0.225992351770401,
-0.5076947212219238,
0.01192283071577549,
-0.09687019884586334,
0.15705463290214539,
0.15946713089942932,
-0.0941186398267746,
-0.6647160649299622,
0.06668113172054291,
-0.28696122765541077,
0.3673306703567505,
-0.26160043478012085,
0.23085959255695343,
-0.04517878219485283,
0.012847736477851868,
0.08503659814596176,
-0.0550503246486187,
0.6327629685401917,
-0.047149449586868286,
0.11375603824853897,
0.41545671224594116,
-0.08905526995658875,
-0.38768598437309265,
0.04443586245179176,
-0.12608250975608826,
0.08429338783025742,
-0.06615550816059113,
-0.029984794557094574,
-0.3182274401187897,
-0.14683490991592407,
0.16182982921600342,
-0.15604069828987122,
-0.01645321398973465,
-0.23004044592380524,
0.07353369891643524,
-0.05380187928676605,
-0.031152673065662384,
-0.08012820035219193,
0.010080033913254738,
0.3911549746990204,
-0.44543108344078064,
-0.23324324190616608,
-0.5855093002319336,
0.02830217033624649,
0.29455143213272095,
0.07889917492866516,
0.3874867558479309,
-0.05025484040379524,
-0.09434972703456879,
-0.1093551516532898,
0.17130276560783386,
0.40570053458213806,
0.26655760407447815,
0.24233384430408478,
-0.5764899849891663,
0.08562267571687698,
-0.11770787835121155,
0.2564527988433838,
0.14490674436092377,
-0.17251980304718018,
0.045559946447610855,
-0.007730487734079361,
0.09885310381650925,
-0.23837445676326752,
-0.16937409341335297,
0.4087839424610138,
0.006347605027258396,
-0.28005626797676086,
-0.3040490448474884,
0.5159517526626587,
0.14683327078819275,
0.11760078370571136,
0.1745114028453827,
0.4460325241088867,
-0.23270587623119354,
0.41332894563674927,
0.22502011060714722,
0.9022600650787354,
-0.1069086343050003,
0.09360013902187347,
0.2869621217250824,
-0.09933829307556152,
0.8344804048538208,
0.025773897767066956,
-0.08310376852750778,
-0.38118115067481995,
0.04519849643111229,
-0.06323054432868958,
-0.22191844880580902,
0.38605865836143494,
-0.0005389191210269928,
-0.3556383550167084,
0.10329782962799072,
-0.3667038679122925,
0.10845597088336945,
-0.07012636959552765,
-0.23577287793159485,
-0.14123661816120148,
-0.16604474186897278,
-0.33918288350105286,
0.16803139448165894,
-0.11910586059093475,
0.15369221568107605,
-0.05777699500322342,
-0.203006774187088,
-0.19280068576335907,
-0.2510124742984772,
-0.1327507197856903,
0.06175745278596878,
-0.020773299038410187,
-0.37960731983184814,
0.0069008879363536835,
-0.1534063220024109,
0.16645297408103943,
0.4745226204395294,
0.20684733986854553,
-0.09477382898330688,
-0.4231274724006653,
-0.03202368691563606,
0.015204839408397675,
0.13991405069828033,
-0.1458629071712494,
0.046928610652685165,
0.1750202178955078,
-0.0029869936406612396,
-0.28391125798225403,
0.21072757244110107,
0.09802965074777603,
0.21918533742427826,
0.07932868599891663,
0.06310686469078064,
-0.23953701555728912,
-0.42384132742881775,
-0.3690044581890106,
-0.028009340167045593,
0.3249051570892334,
-0.1476987898349762,
0.213722825050354,
0.1296410709619522,
-0.10049668699502945,
0.007553577423095703,
-0.0058036670088768005,
0.02270074188709259,
0.03776279836893082,
0.3704354166984558,
0.39717450737953186,
0.1771596223115921,
0.31025147438049316,
0.2760021388530731,
-0.175042986869812,
-0.3166840970516205,
0.1698550283908844,
0.4362538158893585,
-0.37368616461753845,
0.2944813668727875,
0.1842598021030426,
-0.26115909218788147,
0.07629308104515076,
0.21741676330566406,
-0.12992608547210693,
-0.10850249975919724,
-0.1036134660243988,
-0.12426973134279251,
-0.30410921573638916,
0.23903249204158783,
0.07097044587135315,
0.17581170797348022,
-0.24718740582466125,
0.29828116297721863,
0.19109493494033813,
-0.2598258852958679,
-0.3459252417087555,
0.08573087304830551,
-0.4444739520549774,
0.057034872472286224,
-0.4524829089641571,
-0.07675955444574356,
0.10916959494352341,
0.19060760736465454,
0.17942366003990173,
-0.08280415832996368,
-0.07106338441371918,
-0.21041083335876465,
-0.14409615099430084,
0.10859358310699463,
0.21512657403945923,
0.02034923806786537,
0.2696029543876648,
-0.07605461031198502,
-0.23095616698265076,
-0.13551689684391022,
-0.013961275108158588,
0.27728456258773804,
-0.24046899378299713,
0.31969404220581055,
0.22642265260219574,
0.27271345257759094,
0.04595409333705902,
0.28258824348449707,
-0.032708555459976196,
-0.05549663305282593,
-0.02002304047346115,
-0.13737785816192627,
0.04526761546730995,
-0.0022582486271858215,
-0.18028022348880768,
0.11427471041679382,
-0.09717793762683868,
0.22787511348724365,
0.04093240946531296,
-0.18935562670230865,
-0.17489808797836304,
0.2962522506713867,
0.06714101135730743,
0.23724807798862457,
-0.19398948550224304,
0.2915736138820648,
-0.03626878932118416,
0.2804402709007263,
-0.32250353693962097,
-0.15420874953269958,
0.0008131004869937897,
-0.03516001254320145,
0.0068469904363155365,
0.024750418961048126,
-0.36143797636032104,
0.002787940204143524,
-0.24751536548137665,
-0.09666410088539124,
0.29408884048461914,
-0.2834787964820862,
0.3859311044216156,
0.5724872350692749,
-0.11206477135419846,
0.013848766684532166,
0.19667136669158936,
0.17408303916454315,
0.061437733471393585,
0.4816265106201172,
-0.1075616404414177,
0.2815014123916626,
-0.2702338993549347,
0.14343608915805817,
0.042427193373441696,
-0.4920096695423126,
0.0041846781969070435,
0.13880370557308197,
0.1086631566286087,
-0.013084881007671356,
-0.3373068571090698,
0.06032520532608032,
-0.3636929988861084,
-0.3736625015735626,
-0.47015106678009033,
-0.07347360253334045,
-0.2803717255592346,
0.04689653962850571,
-0.17987509071826935,
-0.09590821713209152,
0.19442135095596313,
-0.2535591423511505,
-0.05035954341292381,
-0.2076583057641983,
0.10617639869451523,
-0.08740825951099396,
-0.006456397473812103,
-0.23795931041240692,
-0.04368788003921509,
0.2512570023536682,
0.0439574271440506,
-0.06728944182395935,
-0.12762917578220367,
0.14558903872966766,
0.024278514087200165,
0.10083036124706268,
0.4970950186252594,
0.22815413773059845,
0.586902916431427,
-0.03326535224914551,
-0.1252337098121643,
-0.0164530947804451,
-0.2342049479484558,
-0.0704384446144104,
0.14209815859794617,
0.08929893374443054,
0.3552864193916321,
0.0992339700460434,
0.19829267263412476,
-0.1387956738471985,
-0.036683376878499985,
-0.2170005589723587,
0.17455726861953735,
-0.30299079418182373,
0.47580686211586,
-0.49203744530677795,
-0.05060304328799248,
-0.17599822580814362,
0.11994825303554535,
-0.318200945854187,
-0.043132536113262177,
0.2121136635541916,
0.19897525012493134,
0.107723668217659,
-0.11188367754220963,
0.08919966220855713,
-0.294007807970047,
0.2940044105052948,
-0.2728006839752197,
0.3277839422225952,
-0.09578350186347961,
0.06028841435909271,
-0.281772255897522,
0.22375330328941345,
-0.0012909658253192902,
0.24083906412124634,
0.012809820473194122,
-0.16237789392471313,
-0.1756821870803833,
-0.21355895698070526,
-0.15069086849689484,
0.13154418766498566,
0.3740476667881012,
0.29401838779449463,
-0.5360985994338989,
-0.31883737444877625,
-0.24362684786319733,
-0.0988246351480484,
0.038909561932086945,
-0.21078121662139893,
0.062192294746637344,
-0.059579379856586456,
0.04648364335298538,
0.08047173917293549,
-0.03504743427038193,
-0.05154458060860634,
0.37848514318466187,
0.554818868637085,
0.25483912229537964,
0.1999782919883728,
0.12293555587530136,
-0.053514424711465836,
-0.17932143807411194,
-0.21508115530014038,
-0.19667743146419525,
0.28563588857650757,
0.17045435309410095,
0.28033071756362915,
-0.09266968071460724,
0.3994702100753784,
-0.11508306115865707,
-0.16415844857692719,
-0.107961505651474,
0.449698805809021,
-0.4263249933719635,
0.4482415020465851,
-0.22859305143356323,
-0.1196233332157135,
0.025636740028858185,
-0.08553113788366318,
0.04672694206237793,
0.17377759516239166,
-0.08547466993331909,
0.11436998844146729,
0.6361780166625977,
-0.17031508684158325,
-0.12750208377838135,
-0.15729711949825287,
0.2101980745792389,
-0.06522268801927567,
-0.2485613226890564,
-0.44144701957702637,
0.051717884838581085,
0.3408828377723694,
0.08597995340824127,
0.06026017293334007,
0.08396941423416138,
-0.07085631787776947,
-0.1618514209985733,
-0.21270686388015747,
0.23971806466579437,
0.002883549779653549,
0.18438619375228882,
0.2522718608379364,
-0.07770263403654099
] |
https://github.com/huggingface/datasets/issues/4907 | None Type error for swda datasets | Thanks a lot for your response @lhoestq
The problem is solved accidentally today and I don't know exactly why it was happened yesterday.
The issue can be closed. | ## Describe the bug
I got `'NoneType' object is not callable` error while calling the swda datasets.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("swda")
```
## Expected results
Run without error
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Python version: 3.8.10
| 28 | None Type error for swda datasets
## Describe the bug
I got `'NoneType' object is not callable` error while calling the swda datasets.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("swda")
```
## Expected results
Run without error
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Python version: 3.8.10
Thanks a lot for your response @lhoestq
The problem is solved accidentally today and I don't know exactly why it was happened yesterday.
The issue can be closed. | [
-0.17806191742420197,
-0.34598565101623535,
-0.07972870767116547,
0.2565613389015198,
0.5517394542694092,
-0.14056116342544556,
0.3678429424762726,
0.17458580434322357,
0.11615718901157379,
0.33144330978393555,
-0.05972087383270264,
0.2500876188278198,
-0.07787412405014038,
0.16190296411514282,
-0.06827389448881149,
-0.10408274829387665,
-0.005111686885356903,
0.15349416434764862,
-0.14547228813171387,
-0.050651781260967255,
-0.4682505130767822,
0.015534419566392899,
-0.2216019183397293,
0.043500036001205444,
-0.1929963082075119,
-0.10524892061948776,
0.041221022605895996,
-0.08296150714159012,
-0.09951091557741165,
-0.4525289833545685,
0.5218946933746338,
-0.1174079179763794,
0.3098427653312683,
0.47279706597328186,
-0.00010022320930147544,
-0.06328738480806351,
0.6043498516082764,
-0.0026274267584085464,
-0.16519680619239807,
-0.19871120154857635,
-0.2660583555698395,
-0.2837737500667572,
0.22914019227027893,
-0.166128009557724,
-0.24511852860450745,
-0.36353203654289246,
0.004230126738548279,
-0.1646244078874588,
0.20444682240486145,
0.28839248418807983,
0.36611703038215637,
0.3561899960041046,
0.08036863803863525,
-0.320894718170166,
0.05094163864850998,
0.2377983033657074,
-0.08315617591142654,
-0.06785166263580322,
0.295033723115921,
0.14737224578857422,
0.4180959165096283,
0.35910898447036743,
-0.3490031659603119,
-0.15411178767681122,
0.24216431379318237,
0.03431063890457153,
-0.1670679748058319,
-0.23057183623313904,
0.25401681661605835,
0.21511298418045044,
0.7210059762001038,
-0.17544114589691162,
-0.2704058587551117,
0.10161436349153519,
0.02780432254076004,
0.05796460062265396,
0.13168363273143768,
0.10710645467042923,
0.03690400719642639,
0.0016007646918296814,
0.0802520141005516,
0.4016786217689514,
-0.23986570537090302,
0.145746648311615,
0.053803011775016785,
0.07214661687612534,
-0.24500411748886108,
0.09059026092290878,
-0.17754928767681122,
-0.3247705101966858,
0.2808160185813904,
-0.10612750053405762,
-0.10079464316368103,
0.06632422655820847,
-0.27547916769981384,
-0.03727239370346069,
0.1681205928325653,
-0.10921274870634079,
0.07529431581497192,
-0.028711367398500443,
0.09234985709190369,
0.1109355166554451,
0.11258745938539505,
0.19063401222229004,
0.2651156485080719,
0.09115445613861084,
0.3020106852054596,
-0.17632797360420227,
0.1590167135000229,
-0.18039923906326294,
-0.01945546828210354,
-0.163873553276062,
-0.06681206822395325,
-0.050943948328495026,
0.021478217095136642,
-0.04951690137386322,
0.6133850812911987,
-0.13582444190979004,
-0.21836142241954803,
-0.06895115971565247,
-0.24085310101509094,
0.15719562768936157,
0.04464542493224144,
0.6071590781211853,
0.16530704498291016,
0.4586579203605652,
0.3642235994338989,
0.1359243541955948,
-0.12890762090682983,
-0.07095550745725632,
-0.30964937806129456,
0.058305829763412476,
-0.12403659522533417,
-0.32853731513023376,
0.21686746180057526,
0.29549241065979004,
0.017821503803133965,
0.04605628177523613,
-0.24788789451122284,
0.04134291410446167,
0.0411243736743927,
-0.17967520654201508,
0.09610368311405182,
0.31303995847702026,
0.18166932463645935,
0.024880612269043922,
0.21162989735603333,
0.028471745550632477,
-0.11648879945278168,
0.08955436944961548,
-0.23321077227592468,
-0.1960253268480301,
-0.2313857227563858,
0.3017525374889374,
-0.005372578278183937,
-0.0007506944239139557,
0.06705398857593536,
0.062363479286432266,
0.008979544043540955,
-0.0990247130393982,
0.015764519572257996,
-0.14450103044509888,
0.09195201098918915,
-0.20498578250408173,
-0.09627756476402283,
0.46074700355529785,
-0.3601784110069275,
-0.06350775063037872,
-0.030198676511645317,
-0.23702916502952576,
0.3824409544467926,
-0.05137057229876518,
-0.2054324746131897,
0.023142289370298386,
-0.10221049934625626,
-0.044959913939237595,
0.46273571252822876,
-0.3310239613056183,
-0.24353089928627014,
-0.00818654429167509,
0.027610741555690765,
-0.14223764836788177,
0.027202576398849487,
0.025580111891031265,
-0.04265676811337471,
0.19655068218708038,
0.07901062071323395,
0.29673993587493896,
-0.02016408182680607,
0.22045129537582397,
-0.2020217776298523,
-0.23644296824932098,
0.02709219790995121,
0.05012834444642067,
0.2557896673679352,
0.07961030304431915,
-0.024787813425064087,
-0.06378261744976044,
0.06317537277936935,
-0.17750035226345062,
-0.03228471428155899,
-0.05743709206581116,
0.5434600114822388,
0.13081058859825134,
0.05553899705410004,
-0.4844094216823578,
-0.38592344522476196,
0.06603063642978668,
-0.04659530892968178,
0.353223592042923,
-0.07164883613586426,
-0.19528751075267792,
-0.08980424702167511,
0.06278461217880249,
0.02406451106071472,
-0.04723891243338585,
0.3618503212928772,
0.25594857335090637,
-0.06316964328289032,
0.08348788321018219,
-0.18454089760780334,
0.008169962093234062,
-0.041108183562755585,
0.07014220952987671,
0.007216937839984894,
0.2859325706958771,
0.06654209643602371,
-0.3305915296077728,
0.11752523481845856,
0.3786277174949646,
0.364431232213974,
0.06303676962852478,
-0.05745876580476761,
0.09106799960136414,
-0.16433833539485931,
-0.28381967544555664,
-0.05241058021783829,
-0.16423462331295013,
-0.09950949251651764,
-0.36708056926727295,
0.06334245204925537,
0.21232473850250244,
0.3729609251022339,
-0.09248051047325134,
0.02854108437895775,
0.5302437543869019,
-0.04470989480614662,
0.23499450087547302,
-0.19353562593460083,
0.30353662371635437,
0.30688199400901794,
-0.04955410957336426,
-0.025153499096632004,
-0.1769745945930481,
-0.09300519526004791,
0.09779244661331177,
0.08751510083675385,
0.0037393588572740555,
-0.25621113181114197,
0.20233380794525146,
0.5869141221046448,
-0.02037300169467926,
0.1847095489501953,
0.017194652929902077,
-0.38107043504714966,
0.13663563132286072,
0.0968991070985794,
0.36445173621177673,
0.29856589436531067,
0.32227635383605957,
-0.14602133631706238,
-0.23157766461372375,
-0.0015428019687533379,
0.07113758474588394,
0.12748296558856964,
0.06471649557352066,
0.07012399286031723,
0.0633443295955658,
0.15928082168102264,
-0.012125457637012005,
-0.4841115474700928,
0.015661105513572693,
-0.1989903450012207,
0.19791829586029053,
-0.2074163258075714,
0.12809833884239197,
-0.17771773040294647,
-0.26729267835617065,
-0.04468700662255287,
-0.08660847693681717,
-0.16571621596813202,
-0.258705735206604,
-0.16713261604309082,
-0.038412902504205704,
-0.0034804977476596832,
0.2119818925857544,
-0.09258231520652771,
0.26944172382354736,
-0.006143080070614815,
0.09781504422426224,
-0.13419687747955322,
0.10176108032464981,
-0.2011631429195404,
0.1523730605840683,
0.30865827202796936,
0.2886141240596771,
0.5261654853820801,
-0.00876067765057087,
0.2400902956724167,
-0.08127030730247498,
-0.2003534436225891,
-0.15565207600593567,
0.14361563324928284,
0.1225946694612503,
0.39529451727867126,
0.17521584033966064,
0.23828904330730438,
-0.2730434834957123,
0.1953965425491333,
-0.45055481791496277,
0.019797516986727715,
0.16446088254451752,
-0.30146369338035583,
-0.03279605135321617,
-0.35560768842697144,
-0.2808738052845001,
-0.43577539920806885,
-0.31659018993377686,
0.07357819378376007,
0.026667840778827667,
0.11566495895385742,
-0.24815933406352997,
0.21089869737625122,
0.2932450771331787,
-0.12381480634212494,
0.10450708121061325,
-0.08626104146242142,
-0.09471835941076279,
0.2454175055027008,
-0.10752347111701965,
-0.46813997626304626,
0.24710515141487122,
-0.19653885066509247,
0.3737076222896576,
-0.2060244232416153,
0.011123038828372955,
-0.1498337984085083,
-0.24862448871135712,
0.04742824658751488,
0.010531269013881683,
-0.06906624883413315,
0.43989887833595276,
0.15499067306518555,
-0.24042826890945435,
-0.1911695897579193,
-0.09842367470264435,
0.029230482876300812,
-0.09953650087118149,
-0.028881646692752838,
0.05828488990664482,
0.39884835481643677,
-0.1742691993713379,
0.09967950731515884,
0.006683411076664925,
-0.2115337997674942,
0.2727178931236267,
-0.016327878460288048,
0.3385559618473053,
-0.21545973420143127,
-0.38113492727279663,
-0.10108909010887146,
-0.005587056279182434,
0.1638924479484558,
0.12473264336585999,
-0.106086865067482,
-0.12596657872200012,
-0.19740241765975952,
-0.12008830904960632,
-0.5720486640930176,
-0.17839305102825165,
0.09885819256305695,
0.08949580043554306,
-0.17131969332695007,
0.010537486523389816,
0.26424890756607056,
-0.5115893483161926,
0.03634946420788765,
-0.08438937366008759,
0.15034477412700653,
0.08964395523071289,
-0.1291588693857193,
-0.6387872099876404,
0.11051817983388901,
-0.3323045074939728,
0.3705208897590637,
-0.20456463098526,
0.14245304465293884,
-0.04075922071933746,
-0.0838184803724289,
0.09890738874673843,
-0.15809153020381927,
0.5878704786300659,
-0.02529171295464039,
0.13016989827156067,
0.41278818249702454,
-0.1142435148358345,
-0.28962424397468567,
0.022709663957357407,
-0.22000718116760254,
0.04412055388092995,
0.02805410325527191,
0.010676085948944092,
-0.3521876335144043,
-0.14764641225337982,
0.12519684433937073,
-0.11191916465759277,
-0.06196535751223564,
-0.14008185267448425,
0.02219649776816368,
-0.08401402831077576,
-0.13234484195709229,
-0.05683714896440506,
0.011299489066004753,
0.3672940731048584,
-0.49994856119155884,
-0.2617233097553253,
-0.5312549471855164,
-0.015813041478395462,
0.2303384393453598,
0.13382717967033386,
0.39758819341659546,
-0.03183995932340622,
-0.08758990466594696,
-0.1856357306241989,
0.2486676275730133,
0.364067941904068,
0.2758164405822754,
0.207738995552063,
-0.4417796730995178,
0.09457620233297348,
-0.20639456808567047,
0.22337663173675537,
0.19079311192035675,
-0.18789944052696228,
0.09571041166782379,
-0.01310976967215538,
0.15203960239887238,
-0.21882234513759613,
-0.060150474309921265,
0.40292829275131226,
0.051158782094717026,
-0.14812107384204865,
-0.266073614358902,
0.4541185796260834,
0.08352230489253998,
0.0838809609413147,
0.13336196541786194,
0.350330114364624,
-0.2294856756925583,
0.3802497982978821,
0.13032835721969604,
0.8506384491920471,
-0.10297207534313202,
0.11544466018676758,
0.2867470979690552,
-0.12954507768154144,
0.7248116135597229,
0.017613708972930908,
-0.03450992703437805,
-0.39945030212402344,
0.002176772803068161,
-0.012309713289141655,
-0.1804824322462082,
0.4042065441608429,
0.02006436139345169,
-0.3550863265991211,
0.06441610306501389,
-0.2285829335451126,
0.1513281613588333,
-0.13707908987998962,
-0.13329195976257324,
-0.1531190276145935,
-0.16371120512485504,
-0.3376558721065521,
0.24673008918762207,
-0.07160678505897522,
0.10385927557945251,
-0.052824825048446655,
-0.236469104886055,
-0.19094309210777283,
-0.31144410371780396,
-0.055742740631103516,
0.10862938314676285,
0.005459013860672712,
-0.288992702960968,
-0.026419032365083694,
-0.17387297749519348,
0.04915129765868187,
0.4128330647945404,
0.16252410411834717,
-0.04372198507189751,
-0.39135873317718506,
0.057607561349868774,
0.034419428557157516,
0.13608120381832123,
-0.20033563673496246,
0.07086171209812164,
0.1617065817117691,
-0.028485525399446487,
-0.30178242921829224,
0.18152113258838654,
0.04961397498846054,
0.09278950095176697,
0.029436737298965454,
0.10136570781469345,
-0.19392715394496918,
-0.4155770540237427,
-0.3229828178882599,
-0.00873102992773056,
0.18972769379615784,
-0.19692252576351166,
0.27379825711250305,
0.1062992736697197,
-0.11555496603250504,
0.045755285769701004,
0.06753458082675934,
-0.06179486960172653,
-0.01762167364358902,
0.35970237851142883,
0.3552323877811432,
0.20114915072917938,
0.3350921869277954,
0.20255939662456512,
-0.20605437457561493,
-0.37154194712638855,
0.0676426962018013,
0.3454134166240692,
-0.36699143052101135,
0.30791550874710083,
0.20457786321640015,
-0.2974247336387634,
0.13338898122310638,
0.2605203688144684,
-0.16636469960212708,
-0.08507256954908371,
-0.14903604984283447,
-0.1262035220861435,
-0.32692500948905945,
0.23159931600093842,
-0.00006782636046409607,
0.239610955119133,
-0.1359775960445404,
0.35362380743026733,
0.1386743187904358,
-0.23807641863822937,
-0.4411209523677826,
0.06382444500923157,
-0.43767088651657104,
0.0826440304517746,
-0.4773750603199005,
-0.13681235909461975,
0.1812836229801178,
0.191019669175148,
0.2589951753616333,
-0.014220397919416428,
-0.09010392427444458,
-0.3326660096645355,
-0.09754812717437744,
0.07853453606367111,
0.15617311000823975,
0.07420511543750763,
0.22703738510608673,
-0.06474867463111877,
-0.23774263262748718,
-0.1374112069606781,
0.038459017872810364,
0.14937058091163635,
-0.23109470307826996,
0.26152777671813965,
0.25045332312583923,
0.26092153787612915,
0.1088678389787674,
0.1846245974302292,
-0.06527861952781677,
-0.03469492495059967,
-0.09739049524068832,
-0.1392263025045395,
-0.06279360502958298,
-0.023317154496908188,
-0.10317059606313705,
0.07911063730716705,
-0.07823285460472107,
0.28099584579467773,
0.12385618686676025,
-0.1510947346687317,
-0.2939068675041199,
0.2662999927997589,
0.16247938573360443,
0.1924481987953186,
-0.1656486690044403,
0.23346765339374542,
-0.04455859586596489,
0.3549823760986328,
-0.35892558097839355,
-0.11592063307762146,
-0.055611785501241684,
-0.04978499189019203,
0.13897962868213654,
0.05196113884449005,
-0.27433109283447266,
-0.004558779299259186,
-0.14547483623027802,
-0.02339116483926773,
0.2735360264778137,
-0.2909812927246094,
0.27693402767181396,
0.4648057520389557,
-0.13922762870788574,
0.012101974338293076,
0.22581501305103302,
0.08062765002250671,
0.07612673193216324,
0.4931143522262573,
-0.046849288046360016,
0.3190772235393524,
-0.24181944131851196,
0.1190149188041687,
0.03726339712738991,
-0.4467466175556183,
0.035439424216747284,
0.06744957715272903,
0.06371951103210449,
0.014808449894189835,
-0.20285934209823608,
0.09133965522050858,
-0.35045555233955383,
-0.27308017015457153,
-0.4862448573112488,
-0.01136292889714241,
-0.3352694809436798,
-0.013511203229427338,
-0.20308218896389008,
-0.11691400408744812,
0.21414166688919067,
-0.18566399812698364,
-0.02325839176774025,
-0.10018478333950043,
0.08610773086547852,
-0.10584703087806702,
0.015460826456546783,
-0.18741512298583984,
-0.058525972068309784,
0.12444248795509338,
0.059358201920986176,
-0.10112249851226807,
-0.06616660207509995,
0.14081299304962158,
0.03727761656045914,
0.11712701618671417,
0.4686393737792969,
0.23674455285072327,
0.5082021355628967,
-0.018750477582216263,
-0.09615711122751236,
-0.02284112200140953,
-0.2467801719903946,
-0.1605800837278366,
0.1450580209493637,
0.13162396848201752,
0.3053761422634125,
0.16498440504074097,
0.2905481159687042,
-0.22596023976802826,
-0.06762832403182983,
-0.16873398423194885,
0.14520949125289917,
-0.22833378612995148,
0.360067754983902,
-0.36882123351097107,
-0.04726690053939819,
-0.20833472907543182,
0.0420207642018795,
-0.34735986590385437,
-0.045135945081710815,
0.13210761547088623,
0.1575353741645813,
0.17871475219726562,
-0.2232912927865982,
0.13417461514472961,
-0.24588871002197266,
0.3283151686191559,
-0.3153150677680969,
0.3054777681827545,
-0.03258226811885834,
0.016616344451904297,
-0.3295152187347412,
0.21779030561447144,
-0.02220563217997551,
0.21337591111660004,
-0.05872608721256256,
-0.08051563054323196,
-0.09142761677503586,
-0.23548375070095062,
-0.09148676693439484,
0.10778907686471939,
0.35438036918640137,
0.18321865797042847,
-0.5914922952651978,
-0.23784352838993073,
-0.16867409646511078,
-0.10257938504219055,
0.06191229820251465,
-0.2697579264640808,
0.06314367800951004,
-0.11411157250404358,
0.14602774381637573,
0.1208222433924675,
-0.08218750357627869,
-0.09626060724258423,
0.3337656259536743,
0.5267837047576904,
0.19451715052127838,
0.19568996131420135,
-0.046141330152750015,
-0.05165376886725426,
-0.1495422124862671,
-0.24364064633846283,
-0.18248891830444336,
0.24199235439300537,
0.2082020491361618,
0.361992746591568,
-0.04082077741622925,
0.3852814733982086,
-0.11733724921941757,
-0.06433234363794327,
-0.01522020436823368,
0.3972039818763733,
-0.3017234802246094,
0.47991853952407837,
-0.19111093878746033,
-0.1528373807668686,
-0.005069069564342499,
-0.007612932473421097,
0.05979398638010025,
0.1416645050048828,
-0.11598996818065643,
-0.035398103296756744,
0.6279382705688477,
-0.14354418218135834,
-0.19073371589183807,
-0.11888140439987183,
0.1741594672203064,
-0.024271555244922638,
-0.21254417300224304,
-0.4217035174369812,
0.13486695289611816,
0.3037252724170685,
0.07962345331907272,
0.03244319185614586,
0.07989881932735443,
-0.08097454905509949,
-0.1534605175256729,
-0.22056987881660461,
0.2574104070663452,
0.04032672941684723,
0.15098987519741058,
0.16439956426620483,
-0.09285050630569458
] |
https://github.com/huggingface/datasets/issues/4906 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import) | Thanks for reporting, @OPterminator.
However, we are not able to reproduce this issue.
There might be 2 reasons why you get this exception:
- Either the name of your local Python file: if it is called `datasets.py` this could generate a circular import when trying to import the Hugging Face `datasets` library.
- You could try to rename it and run it again.
- Another cause could be the simultaneous use of the packages `nlp` and `datasets`. Please note that we renamed the Hugging Face `nlp` library to `datasets` more than 2 years ago: they are 2 versions of the same library.
- Please try to update your script and use only `datasets` (`nlp` name is no longer in use and is out of date). | ## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
| 125 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
Thanks for reporting, @OPterminator.
However, we are not able to reproduce this issue.
There might be 2 reasons why you get this exception:
- Either the name of your local Python file: if it is called `datasets.py` this could generate a circular import when trying to import the Hugging Face `datasets` library.
- You could try to rename it and run it again.
- Another cause could be the simultaneous use of the packages `nlp` and `datasets`. Please note that we renamed the Hugging Face `nlp` library to `datasets` more than 2 years ago: they are 2 versions of the same library.
- Please try to update your script and use only `datasets` (`nlp` name is no longer in use and is out of date). | [
-0.2775006592273712,
-0.24207346141338348,
-0.04461362957954407,
0.1706514060497284,
0.2661904990673065,
0.058018989861011505,
0.20556212961673737,
0.17970316112041473,
-0.059139739722013474,
-0.042035624384880066,
-0.08086638152599335,
0.35249266028404236,
-0.3115460276603699,
0.08479202538728714,
0.03337257727980614,
-0.037684887647628784,
0.10332494974136353,
0.08125311136245728,
-0.31609585881233215,
-0.10554884374141693,
-0.12318490445613861,
0.08857348561286926,
-0.29163461923599243,
-0.05722302198410034,
-0.13032867014408112,
-0.11377298086881638,
0.050033919513225555,
0.17448315024375916,
-0.2878383696079254,
-0.4896661937236786,
0.20199447870254517,
-0.2329179346561432,
0.14150206744670868,
0.34789973497390747,
-0.00011066455044783652,
0.14530996978282928,
0.28968900442123413,
-0.03292524814605713,
-0.3947031497955322,
-0.18310250341892242,
0.015892744064331055,
-0.2677006721496582,
0.19688193500041962,
-0.11565413326025009,
0.2253408432006836,
-0.0000022174790501594543,
-0.13211970031261444,
-0.17772817611694336,
0.3848723769187927,
0.4231010973453522,
0.2509199380874634,
0.36832156777381897,
0.3481288552284241,
-0.07321640104055405,
-0.14124470949172974,
0.1322179138660431,
-0.10670407116413116,
0.047279536724090576,
0.16764762997627258,
-0.11178399622440338,
0.11694622039794922,
0.14339159429073334,
-0.10157553106546402,
0.30673906207084656,
0.17301374673843384,
-0.11238206177949905,
0.20166167616844177,
-0.4488432705402374,
-0.0035316944122314453,
0.020549211651086807,
0.4859694242477417,
-0.34062010049819946,
-0.4327462315559387,
-0.10433885455131531,
0.2907516658306122,
-0.2095295488834381,
-0.015782274305820465,
0.25180384516716003,
-0.16984540224075317,
0.16623766720294952,
-0.126663938164711,
-0.09143321216106415,
-0.19778679311275482,
0.27985289692878723,
-0.37080061435699463,
0.25993475317955017,
-0.05765480548143387,
0.03487366437911987,
-0.06224597617983818,
-0.1709011197090149,
0.5021548867225647,
-0.04920611530542374,
0.19536982476711273,
0.1710646152496338,
-0.17504747211933136,
0.047369085252285004,
0.3851121664047241,
0.05973966419696808,
-0.08776916563510895,
0.31775420904159546,
-0.0983797088265419,
0.03481747955083847,
-0.03712708503007889,
0.30872660875320435,
-0.016095876693725586,
0.03649095073342323,
-0.12249615043401718,
0.4629843533039093,
0.2699597179889679,
0.02348235808312893,
0.026690755039453506,
0.09532119333744049,
-0.15794603526592255,
-0.11409399658441544,
0.034290675073862076,
0.009816660545766354,
0.32551759481430054,
-0.09433913230895996,
-0.467536062002182,
-0.051856763660907745,
-0.19528287649154663,
0.11984753608703613,
0.17403768002986908,
0.21600472927093506,
-0.2721647620201111,
0.3422996997833252,
0.12810519337654114,
0.18161948025226593,
-0.1852758377790451,
-0.04623931273818016,
-0.23746556043624878,
0.15390679240226746,
-0.14500735700130463,
-0.13559120893478394,
0.13609106838703156,
-0.2294323593378067,
0.30341172218322754,
0.13893771171569824,
-0.11675304174423218,
-0.003984369337558746,
0.3704977333545685,
-0.18406911194324493,
-0.058401428163051605,
0.3080308437347412,
0.04985975846648216,
0.3170221149921417,
0.3064502477645874,
-0.21600539982318878,
-0.1106526181101799,
-0.03282589465379715,
-0.41354596614837646,
-0.2724292576313019,
-0.3094726502895355,
0.2973445653915405,
-0.2502285838127136,
-0.05080225318670273,
-0.2178674340248108,
-0.16115446388721466,
-0.009053409099578857,
-0.10636675357818604,
-0.28047385811805725,
-0.31523436307907104,
-0.05794394388794899,
-0.20004060864448547,
0.35799750685691833,
0.32271790504455566,
-0.27942556142807007,
-0.2638675570487976,
-0.20225203037261963,
0.0019280873239040375,
0.0018429011106491089,
0.28046348690986633,
-0.23707500100135803,
0.37401166558265686,
-0.2584768235683441,
-0.23636670410633087,
0.415568470954895,
-0.4688444435596466,
-0.274543821811676,
-0.056412868201732635,
-0.1510140597820282,
0.1341286450624466,
-0.14245757460594177,
-0.06888757646083832,
0.08464705944061279,
0.08455285429954529,
0.4006634056568146,
0.4482423663139343,
0.003321366384625435,
-0.008199766278266907,
-0.17874287068843842,
-0.15476791560649872,
0.24175500869750977,
0.03618339076638222,
0.23759040236473083,
0.07919062674045563,
-0.03789597004652023,
0.031297583132982254,
0.07475975155830383,
-0.00022912770509719849,
0.008019741624593735,
0.40289849042892456,
0.43958795070648193,
0.04681265726685524,
-0.1622423380613327,
-0.23580396175384521,
-0.34307533502578735,
0.25113075971603394,
0.33248215913772583,
0.059855829924345016,
-0.2718019485473633,
-0.00959240086376667,
-0.41476893424987793,
0.1223704144358635,
-0.09523659944534302,
-0.13963447511196136,
0.16803881525993347,
0.24425138533115387,
-0.02380438521504402,
0.18637894093990326,
-0.30578282475471497,
0.4410889148712158,
-0.04049370065331459,
0.15749721229076385,
-0.4303837716579437,
0.3454747200012207,
-0.2914995551109314,
-0.09599723666906357,
0.19979546964168549,
0.12956613302230835,
0.06380156427621841,
-0.1125827357172966,
-0.10558637976646423,
0.07958492636680603,
0.052455611526966095,
0.08396964520215988,
-0.02190259099006653,
0.1011112853884697,
0.062404267489910126,
-0.3221614360809326,
-0.045447610318660736,
0.22655577957630157,
0.31743958592414856,
-0.11582082509994507,
-0.10328621417284012,
0.14799366891384125,
0.16047953069210052,
0.02355329692363739,
0.253548800945282,
0.2179674506187439,
0.2853770852088928,
-0.048714637756347656,
-0.14558814465999603,
-0.2306056022644043,
0.41466614603996277,
0.005547570064663887,
0.2221650928258896,
-0.05781219154596329,
-0.15842923521995544,
0.04314613342285156,
0.3955138623714447,
0.10214056074619293,
0.03601086884737015,
0.14821432530879974,
-0.31642600893974304,
0.06181466579437256,
0.12994639575481415,
0.13672561943531036,
0.4446890354156494,
0.14244163036346436,
-0.07678219676017761,
0.2353537380695343,
-0.18954266607761383,
-0.14629431068897247,
0.17196246981620789,
0.19171911478042603,
-0.07836652547121048,
0.14936813712120056,
0.23899619281291962,
0.13906165957450867,
-0.1617218554019928,
-0.5220280885696411,
0.1154480054974556,
0.4746926724910736,
-0.505323588848114,
0.06584319472312927,
-0.46442911028862,
-0.0702584907412529,
-0.16649332642555237,
-0.1483643352985382,
0.06724126636981964,
-0.3208220303058624,
-0.27429789304733276,
0.5157068967819214,
-0.06785885244607925,
0.17135286331176758,
-0.26744115352630615,
0.08943067491054535,
0.05150759220123291,
-0.051521144807338715,
-0.00511951744556427,
-0.18175481259822845,
-0.03473431617021561,
0.07348112761974335,
0.290377676486969,
0.18275971710681915,
0.5052530169487,
-0.18077901005744934,
0.2141696661710739,
-0.04569148272275925,
-0.4314253628253937,
-0.059717826545238495,
0.16037997603416443,
0.34962597489356995,
0.13811536133289337,
0.2268129140138626,
-0.1385030299425125,
-0.2944590151309967,
0.2882464528083801,
-0.10828235000371933,
-0.20147083699703217,
0.17753182351589203,
-0.04552186280488968,
-0.2853735089302063,
-0.07560284435749054,
-0.25596722960472107,
-0.45685914158821106,
-0.533658504486084,
-0.09360800683498383,
0.2604706585407257,
0.12777142226696014,
0.33321213722229004,
0.02592919021844864,
0.23161765933036804,
0.14519350230693817,
0.15808571875095367,
-0.03655217960476875,
-0.2056892216205597,
0.48262491822242737,
-0.3134560286998749,
-0.4168644845485687,
-0.042009126394987106,
-0.2850343585014343,
0.25918450951576233,
0.21197770535945892,
-0.5002511143684387,
-0.06413882970809937,
-0.19833171367645264,
0.2561534643173218,
-0.16154545545578003,
0.16255740821361542,
0.2069082260131836,
0.1560354381799698,
-0.04785563051700592,
-0.07198479026556015,
-0.18310312926769257,
-0.3673669993877411,
0.06571723520755768,
0.07190120220184326,
-0.22198879718780518,
0.3527865409851074,
0.05580490455031395,
0.611434817314148,
0.10525256395339966,
-0.03225081041455269,
0.21265196800231934,
-0.009991167113184929,
0.2582743167877197,
-0.09663219004869461,
-0.6281751990318298,
0.04671875014901161,
-0.11047717928886414,
0.05618268996477127,
-0.06831289827823639,
-0.15265682339668274,
-0.10594486445188522,
-0.200847789645195,
0.2735740542411804,
-0.2572714388370514,
-0.15161022543907166,
0.07533221691846848,
-0.08419887721538544,
0.21566534042358398,
0.06155836209654808,
-0.0985318124294281,
-0.2714383602142334,
-0.06562946736812592,
0.012258538976311684,
0.14188653230667114,
-0.1555662453174591,
0.10347547382116318,
-0.5286014080047607,
-0.21280261874198914,
-0.07959242910146713,
0.16694170236587524,
-0.005309909116476774,
0.46134287118911743,
0.037483591586351395,
0.005800675600767136,
-0.005379416048526764,
-0.08806923031806946,
0.36848175525665283,
-0.043707579374313354,
-0.14674575626850128,
0.344928503036499,
-0.1100088432431221,
-0.8670599460601807,
-0.02393522299826145,
-0.2906341552734375,
0.08364220708608627,
0.3337988555431366,
0.18968139588832855,
-0.13833926618099213,
0.06743545085191727,
-0.0217907652258873,
0.3680764436721802,
-0.10852319002151489,
0.08532058447599411,
-0.16949094831943512,
-0.5002074241638184,
-0.5236356258392334,
-0.08513271063566208,
0.07480473816394806,
0.1865348368883133,
0.11112454533576965,
0.06512528657913208,
-0.34133297204971313,
-0.1500426083803177,
0.08254848420619965,
0.23574839532375336,
0.06223934888839722,
0.04769572988152504,
0.35144567489624023,
-0.02985125035047531,
-0.04984389990568161,
0.37742364406585693,
0.6002733111381531,
-0.04873800650238991,
-0.33254188299179077,
-0.04554490000009537,
0.03771250322461128,
0.14669060707092285,
0.032381102442741394,
-0.051210980862379074,
0.13214680552482605,
-0.19093866646289825,
0.10874062776565552,
-0.11094324290752411,
0.3155507445335388,
0.15925417840480804,
0.04922736808657646,
-0.1740751564502716,
-0.3244180381298065,
0.17802375555038452,
0.11078023910522461,
0.026807978749275208,
0.5816492438316345,
0.06685882061719894,
-0.1456654667854309,
0.26930975914001465,
-0.13134130835533142,
0.6396872401237488,
0.41636794805526733,
-0.041689325124025345,
0.409453421831131,
-0.006434325128793716,
0.5233031511306763,
0.01741006225347519,
0.07596521079540253,
-0.2951543629169464,
-0.07219813019037247,
-0.0018319860100746155,
-0.3078939616680145,
0.25279390811920166,
-0.227172389626503,
-0.12476417422294617,
0.14523114264011383,
-0.1624913215637207,
0.10594981908798218,
0.1111447736620903,
0.3241651952266693,
0.04375636577606201,
-0.1731252372264862,
-0.18055403232574463,
0.19401930272579193,
-0.27307671308517456,
0.4175560772418976,
-0.03635178506374359,
0.12170211225748062,
-0.15814796090126038,
-0.19069147109985352,
-0.21074871718883514,
0.09602683782577515,
-0.1865159273147583,
0.5763900279998779,
0.18128438293933868,
-0.2087288498878479,
0.20751257240772247,
0.032516688108444214,
0.26882225275039673,
0.06124786287546158,
-0.12569953501224518,
0.08262547105550766,
-0.11682815104722977,
0.03334607556462288,
0.1364908218383789,
-0.0181565061211586,
0.4995169937610626,
-0.19626101851463318,
-0.14696714282035828,
0.28618526458740234,
0.005306619219481945,
0.0009025111794471741,
0.18051698803901672,
0.1021626815199852,
0.18323606252670288,
-0.17877928912639618,
-0.29135453701019287,
-0.010673336684703827,
0.16432198882102966,
-0.25539880990982056,
0.17204201221466064,
0.17631810903549194,
-0.23437711596488953,
0.5269705653190613,
-0.029082302004098892,
-0.09364929795265198,
-0.060429465025663376,
0.5038352012634277,
-0.12545451521873474,
-0.03391125425696373,
0.4253857731819153,
0.0037509314715862274,
-0.2274894118309021,
-0.16190573573112488,
0.20951497554779053,
-0.13695178925991058,
-0.3716197609901428,
0.1167784258723259,
0.005292536690831184,
0.024826616048812866,
-0.07031262665987015,
-0.023679379373788834,
0.1923745572566986,
0.1282559484243393,
-0.06201885640621185,
-0.6253932118415833,
-0.26388922333717346,
0.08244694769382477,
0.03345869481563568,
-0.07375931739807129,
-0.11779023706912994,
0.31485962867736816,
-0.011782770045101643,
0.12440767139196396,
-0.35474246740341187,
0.08306482434272766,
-0.2320188730955124,
0.2166161835193634,
0.07319886982440948,
-0.06891593337059021,
-0.10622483491897583,
-0.12841203808784485,
0.14706727862358093,
0.03703876584768295,
-0.16490581631660461,
-0.3014600872993469,
-0.25970426201820374,
0.1031353771686554,
0.14760303497314453,
-0.22768773138523102,
0.2594794034957886,
-0.11892672628164291,
0.012519310228526592,
-0.06634648144245148,
-0.11096538603305817,
0.29668182134628296,
-0.02761741727590561,
0.17873942852020264,
-0.16106542944908142,
-0.06564947217702866,
-0.08800286799669266,
0.12807124853134155,
-0.00005755573511123657,
-0.001478038728237152,
-0.06090327724814415,
0.1955324113368988,
0.11855591833591461,
0.09117679297924042,
-0.277160108089447,
-0.09280212968587875,
-0.26703035831451416,
0.06472338736057281,
0.35794854164123535,
-0.3996219038963318,
0.14770567417144775,
-0.022943176329135895,
-0.04536120593547821,
0.4884302318096161,
-0.37118208408355713,
0.14837190508842468,
0.3930785059928894,
0.2435016632080078,
-0.31499823927879333,
-0.06241559237241745,
0.22849883139133453,
0.097301185131073,
0.08298750221729279,
-0.005590938031673431,
-0.0021320804953575134,
-0.19477790594100952,
0.15731102228164673,
0.06335386633872986,
0.4350648522377014,
-0.15986138582229614,
0.3405029773712158,
0.26539990305900574,
-0.1725967824459076,
0.022402897477149963,
-0.029339177533984184,
0.22543099522590637,
0.17512136697769165,
0.5000418424606323,
-0.03605865687131882,
-0.05577348917722702,
-0.14869236946105957,
-0.12648829817771912,
0.12357380986213684,
-0.29200032353401184,
0.015109999105334282,
-0.031938910484313965,
0.03979174792766571,
0.019949734210968018,
-0.04772995412349701,
-0.03838489204645157,
-0.0886523574590683,
-0.2141147404909134,
0.044655635952949524,
0.2365419566631317,
-0.03287782520055771,
0.11796383559703827,
-0.3622157573699951,
0.06917291134595871,
-0.17932943999767303,
0.029768098145723343,
0.0602436400949955,
-0.21631012856960297,
0.06676638871431351,
0.24104231595993042,
-0.40368497371673584,
-0.605308473110199,
-0.14872398972511292,
0.22543862462043762,
0.07570528984069824,
-0.2549225091934204,
0.11821136623620987,
0.2799668312072754,
-0.12545841932296753,
-0.35019734501838684,
0.3104458153247833,
0.6052207946777344,
0.29724493622779846,
-0.0005661621689796448,
0.1796358823776245,
0.03348599001765251,
-0.2270834594964981,
-0.10745004564523697,
0.1809825450181961,
-0.0741259753704071,
0.084261953830719,
0.29734763503074646,
0.19002096354961395,
-0.2886580228805542,
0.12471053004264832,
0.044984713196754456,
0.0026340708136558533,
-0.3253538906574249,
0.39419832825660706,
-0.15580691397190094,
-0.1277221143245697,
-0.04201560467481613,
-0.012866877019405365,
-0.39773792028427124,
0.1289706826210022,
0.7170612812042236,
-0.0026647867634892464,
0.08312481641769409,
-0.20665700733661652,
0.09984167665243149,
-0.08658689260482788,
0.36910775303840637,
0.3679363429546356,
0.32648536562919617,
-0.2348644733428955,
-0.15994107723236084,
-0.6859852075576782,
0.12717793881893158,
-0.16880929470062256,
-0.1009160652756691,
0.059098824858665466,
0.13929417729377747,
-0.043289490044116974,
0.2713605761528015,
-0.1936178356409073,
0.1643591970205307,
-0.0856282114982605,
0.06807899475097656,
-0.434000700712204,
-0.27802014350891113,
-0.09781701862812042,
0.020456034690141678,
0.05387679487466812,
-0.39736562967300415,
0.08212152123451233,
-0.40998682379722595,
0.14358490705490112,
-0.1831357181072235,
-0.17931237816810608,
0.012505736202001572,
0.12302935868501663,
0.22397243976593018,
0.13991379737854004,
0.6028478145599365,
-0.08384809643030167,
0.11336997896432877,
-0.19214338064193726,
-0.4339522123336792,
-0.17891539633274078,
0.44748005270957947,
0.23736941814422607,
0.5612441301345825,
-0.1406320482492447,
-0.2952290177345276,
-0.2654533386230469,
0.26909390091896057,
0.10592268407344818,
-0.10158935189247131,
-0.11553926765918732,
0.35036101937294006,
-0.09681183099746704,
0.2226482331752777,
0.11840185523033142,
0.18177151679992676,
-0.13409429788589478,
0.251631498336792,
-0.28862065076828003,
-0.608522355556488,
0.59804368019104,
-0.34040138125419617,
-0.29492896795272827,
-0.09664614498615265,
0.3278684616088867,
0.07860957831144333,
-0.17334257066249847,
-0.3546924889087677,
0.07545686513185501,
0.38273584842681885,
-0.22352707386016846,
-0.32733771204948425,
0.42725253105163574,
0.07845483720302582,
0.16851922869682312,
-0.07755014300346375,
0.4521098732948303,
-0.01949498802423477,
-0.28134074807167053,
0.3119499385356903,
0.02625519037246704
] |
https://github.com/huggingface/datasets/issues/4906 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import) | i am also facing this issue
```
----> 1 import datasets
3 dataset = datasets.load_dataset("ucberkeley-dlab/measuring-hate-speech", "binary")
4 df = dataset["train"].to_pandas()
File ~/.pyenv/versions/3.10.9/lib/python3.10/site-packages/datasets/__init__.py:52
50 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
51 from .info import DatasetInfo, MetricInfo
---> 52 from .inspect import (
53 get_dataset_config_info,
54 get_dataset_config_names,
55 get_dataset_infos,
56 get_dataset_split_names,
57 inspect_dataset,
58 inspect_metric,
59 list_datasets,
60 list_metrics,
61 )
62 from .iterable_dataset import IterableDataset
63 from .load import load_dataset, load_dataset_builder, load_from_disk, load_metric
File ~/.pyenv/versions/3.10.9/lib/python3.10/site-packages/datasets/inspect.py:30
28 from .download.streaming_download_manager import StreamingDownloadManager
...
---> 16 logger = datasets.utils.logging.get_logger(__name__)
19 if datasets.config.PYARROW_VERSION.major >= 7:
21 def pa_table_to_pylist(table):
``` | ## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
| 95 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
i am also facing this issue
```
----> 1 import datasets
3 dataset = datasets.load_dataset("ucberkeley-dlab/measuring-hate-speech", "binary")
4 df = dataset["train"].to_pandas()
File ~/.pyenv/versions/3.10.9/lib/python3.10/site-packages/datasets/__init__.py:52
50 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
51 from .info import DatasetInfo, MetricInfo
---> 52 from .inspect import (
53 get_dataset_config_info,
54 get_dataset_config_names,
55 get_dataset_infos,
56 get_dataset_split_names,
57 inspect_dataset,
58 inspect_metric,
59 list_datasets,
60 list_metrics,
61 )
62 from .iterable_dataset import IterableDataset
63 from .load import load_dataset, load_dataset_builder, load_from_disk, load_metric
File ~/.pyenv/versions/3.10.9/lib/python3.10/site-packages/datasets/inspect.py:30
28 from .download.streaming_download_manager import StreamingDownloadManager
...
---> 16 logger = datasets.utils.logging.get_logger(__name__)
19 if datasets.config.PYARROW_VERSION.major >= 7:
21 def pa_table_to_pylist(table):
``` | [
-0.2775006592273712,
-0.24207346141338348,
-0.04461362957954407,
0.1706514060497284,
0.2661904990673065,
0.058018989861011505,
0.20556212961673737,
0.17970316112041473,
-0.059139739722013474,
-0.042035624384880066,
-0.08086638152599335,
0.35249266028404236,
-0.3115460276603699,
0.08479202538728714,
0.03337257727980614,
-0.037684887647628784,
0.10332494974136353,
0.08125311136245728,
-0.31609585881233215,
-0.10554884374141693,
-0.12318490445613861,
0.08857348561286926,
-0.29163461923599243,
-0.05722302198410034,
-0.13032867014408112,
-0.11377298086881638,
0.050033919513225555,
0.17448315024375916,
-0.2878383696079254,
-0.4896661937236786,
0.20199447870254517,
-0.2329179346561432,
0.14150206744670868,
0.34789973497390747,
-0.00011066455044783652,
0.14530996978282928,
0.28968900442123413,
-0.03292524814605713,
-0.3947031497955322,
-0.18310250341892242,
0.015892744064331055,
-0.2677006721496582,
0.19688193500041962,
-0.11565413326025009,
0.2253408432006836,
-0.0000022174790501594543,
-0.13211970031261444,
-0.17772817611694336,
0.3848723769187927,
0.4231010973453522,
0.2509199380874634,
0.36832156777381897,
0.3481288552284241,
-0.07321640104055405,
-0.14124470949172974,
0.1322179138660431,
-0.10670407116413116,
0.047279536724090576,
0.16764762997627258,
-0.11178399622440338,
0.11694622039794922,
0.14339159429073334,
-0.10157553106546402,
0.30673906207084656,
0.17301374673843384,
-0.11238206177949905,
0.20166167616844177,
-0.4488432705402374,
-0.0035316944122314453,
0.020549211651086807,
0.4859694242477417,
-0.34062010049819946,
-0.4327462315559387,
-0.10433885455131531,
0.2907516658306122,
-0.2095295488834381,
-0.015782274305820465,
0.25180384516716003,
-0.16984540224075317,
0.16623766720294952,
-0.126663938164711,
-0.09143321216106415,
-0.19778679311275482,
0.27985289692878723,
-0.37080061435699463,
0.25993475317955017,
-0.05765480548143387,
0.03487366437911987,
-0.06224597617983818,
-0.1709011197090149,
0.5021548867225647,
-0.04920611530542374,
0.19536982476711273,
0.1710646152496338,
-0.17504747211933136,
0.047369085252285004,
0.3851121664047241,
0.05973966419696808,
-0.08776916563510895,
0.31775420904159546,
-0.0983797088265419,
0.03481747955083847,
-0.03712708503007889,
0.30872660875320435,
-0.016095876693725586,
0.03649095073342323,
-0.12249615043401718,
0.4629843533039093,
0.2699597179889679,
0.02348235808312893,
0.026690755039453506,
0.09532119333744049,
-0.15794603526592255,
-0.11409399658441544,
0.034290675073862076,
0.009816660545766354,
0.32551759481430054,
-0.09433913230895996,
-0.467536062002182,
-0.051856763660907745,
-0.19528287649154663,
0.11984753608703613,
0.17403768002986908,
0.21600472927093506,
-0.2721647620201111,
0.3422996997833252,
0.12810519337654114,
0.18161948025226593,
-0.1852758377790451,
-0.04623931273818016,
-0.23746556043624878,
0.15390679240226746,
-0.14500735700130463,
-0.13559120893478394,
0.13609106838703156,
-0.2294323593378067,
0.30341172218322754,
0.13893771171569824,
-0.11675304174423218,
-0.003984369337558746,
0.3704977333545685,
-0.18406911194324493,
-0.058401428163051605,
0.3080308437347412,
0.04985975846648216,
0.3170221149921417,
0.3064502477645874,
-0.21600539982318878,
-0.1106526181101799,
-0.03282589465379715,
-0.41354596614837646,
-0.2724292576313019,
-0.3094726502895355,
0.2973445653915405,
-0.2502285838127136,
-0.05080225318670273,
-0.2178674340248108,
-0.16115446388721466,
-0.009053409099578857,
-0.10636675357818604,
-0.28047385811805725,
-0.31523436307907104,
-0.05794394388794899,
-0.20004060864448547,
0.35799750685691833,
0.32271790504455566,
-0.27942556142807007,
-0.2638675570487976,
-0.20225203037261963,
0.0019280873239040375,
0.0018429011106491089,
0.28046348690986633,
-0.23707500100135803,
0.37401166558265686,
-0.2584768235683441,
-0.23636670410633087,
0.415568470954895,
-0.4688444435596466,
-0.274543821811676,
-0.056412868201732635,
-0.1510140597820282,
0.1341286450624466,
-0.14245757460594177,
-0.06888757646083832,
0.08464705944061279,
0.08455285429954529,
0.4006634056568146,
0.4482423663139343,
0.003321366384625435,
-0.008199766278266907,
-0.17874287068843842,
-0.15476791560649872,
0.24175500869750977,
0.03618339076638222,
0.23759040236473083,
0.07919062674045563,
-0.03789597004652023,
0.031297583132982254,
0.07475975155830383,
-0.00022912770509719849,
0.008019741624593735,
0.40289849042892456,
0.43958795070648193,
0.04681265726685524,
-0.1622423380613327,
-0.23580396175384521,
-0.34307533502578735,
0.25113075971603394,
0.33248215913772583,
0.059855829924345016,
-0.2718019485473633,
-0.00959240086376667,
-0.41476893424987793,
0.1223704144358635,
-0.09523659944534302,
-0.13963447511196136,
0.16803881525993347,
0.24425138533115387,
-0.02380438521504402,
0.18637894093990326,
-0.30578282475471497,
0.4410889148712158,
-0.04049370065331459,
0.15749721229076385,
-0.4303837716579437,
0.3454747200012207,
-0.2914995551109314,
-0.09599723666906357,
0.19979546964168549,
0.12956613302230835,
0.06380156427621841,
-0.1125827357172966,
-0.10558637976646423,
0.07958492636680603,
0.052455611526966095,
0.08396964520215988,
-0.02190259099006653,
0.1011112853884697,
0.062404267489910126,
-0.3221614360809326,
-0.045447610318660736,
0.22655577957630157,
0.31743958592414856,
-0.11582082509994507,
-0.10328621417284012,
0.14799366891384125,
0.16047953069210052,
0.02355329692363739,
0.253548800945282,
0.2179674506187439,
0.2853770852088928,
-0.048714637756347656,
-0.14558814465999603,
-0.2306056022644043,
0.41466614603996277,
0.005547570064663887,
0.2221650928258896,
-0.05781219154596329,
-0.15842923521995544,
0.04314613342285156,
0.3955138623714447,
0.10214056074619293,
0.03601086884737015,
0.14821432530879974,
-0.31642600893974304,
0.06181466579437256,
0.12994639575481415,
0.13672561943531036,
0.4446890354156494,
0.14244163036346436,
-0.07678219676017761,
0.2353537380695343,
-0.18954266607761383,
-0.14629431068897247,
0.17196246981620789,
0.19171911478042603,
-0.07836652547121048,
0.14936813712120056,
0.23899619281291962,
0.13906165957450867,
-0.1617218554019928,
-0.5220280885696411,
0.1154480054974556,
0.4746926724910736,
-0.505323588848114,
0.06584319472312927,
-0.46442911028862,
-0.0702584907412529,
-0.16649332642555237,
-0.1483643352985382,
0.06724126636981964,
-0.3208220303058624,
-0.27429789304733276,
0.5157068967819214,
-0.06785885244607925,
0.17135286331176758,
-0.26744115352630615,
0.08943067491054535,
0.05150759220123291,
-0.051521144807338715,
-0.00511951744556427,
-0.18175481259822845,
-0.03473431617021561,
0.07348112761974335,
0.290377676486969,
0.18275971710681915,
0.5052530169487,
-0.18077901005744934,
0.2141696661710739,
-0.04569148272275925,
-0.4314253628253937,
-0.059717826545238495,
0.16037997603416443,
0.34962597489356995,
0.13811536133289337,
0.2268129140138626,
-0.1385030299425125,
-0.2944590151309967,
0.2882464528083801,
-0.10828235000371933,
-0.20147083699703217,
0.17753182351589203,
-0.04552186280488968,
-0.2853735089302063,
-0.07560284435749054,
-0.25596722960472107,
-0.45685914158821106,
-0.533658504486084,
-0.09360800683498383,
0.2604706585407257,
0.12777142226696014,
0.33321213722229004,
0.02592919021844864,
0.23161765933036804,
0.14519350230693817,
0.15808571875095367,
-0.03655217960476875,
-0.2056892216205597,
0.48262491822242737,
-0.3134560286998749,
-0.4168644845485687,
-0.042009126394987106,
-0.2850343585014343,
0.25918450951576233,
0.21197770535945892,
-0.5002511143684387,
-0.06413882970809937,
-0.19833171367645264,
0.2561534643173218,
-0.16154545545578003,
0.16255740821361542,
0.2069082260131836,
0.1560354381799698,
-0.04785563051700592,
-0.07198479026556015,
-0.18310312926769257,
-0.3673669993877411,
0.06571723520755768,
0.07190120220184326,
-0.22198879718780518,
0.3527865409851074,
0.05580490455031395,
0.611434817314148,
0.10525256395339966,
-0.03225081041455269,
0.21265196800231934,
-0.009991167113184929,
0.2582743167877197,
-0.09663219004869461,
-0.6281751990318298,
0.04671875014901161,
-0.11047717928886414,
0.05618268996477127,
-0.06831289827823639,
-0.15265682339668274,
-0.10594486445188522,
-0.200847789645195,
0.2735740542411804,
-0.2572714388370514,
-0.15161022543907166,
0.07533221691846848,
-0.08419887721538544,
0.21566534042358398,
0.06155836209654808,
-0.0985318124294281,
-0.2714383602142334,
-0.06562946736812592,
0.012258538976311684,
0.14188653230667114,
-0.1555662453174591,
0.10347547382116318,
-0.5286014080047607,
-0.21280261874198914,
-0.07959242910146713,
0.16694170236587524,
-0.005309909116476774,
0.46134287118911743,
0.037483591586351395,
0.005800675600767136,
-0.005379416048526764,
-0.08806923031806946,
0.36848175525665283,
-0.043707579374313354,
-0.14674575626850128,
0.344928503036499,
-0.1100088432431221,
-0.8670599460601807,
-0.02393522299826145,
-0.2906341552734375,
0.08364220708608627,
0.3337988555431366,
0.18968139588832855,
-0.13833926618099213,
0.06743545085191727,
-0.0217907652258873,
0.3680764436721802,
-0.10852319002151489,
0.08532058447599411,
-0.16949094831943512,
-0.5002074241638184,
-0.5236356258392334,
-0.08513271063566208,
0.07480473816394806,
0.1865348368883133,
0.11112454533576965,
0.06512528657913208,
-0.34133297204971313,
-0.1500426083803177,
0.08254848420619965,
0.23574839532375336,
0.06223934888839722,
0.04769572988152504,
0.35144567489624023,
-0.02985125035047531,
-0.04984389990568161,
0.37742364406585693,
0.6002733111381531,
-0.04873800650238991,
-0.33254188299179077,
-0.04554490000009537,
0.03771250322461128,
0.14669060707092285,
0.032381102442741394,
-0.051210980862379074,
0.13214680552482605,
-0.19093866646289825,
0.10874062776565552,
-0.11094324290752411,
0.3155507445335388,
0.15925417840480804,
0.04922736808657646,
-0.1740751564502716,
-0.3244180381298065,
0.17802375555038452,
0.11078023910522461,
0.026807978749275208,
0.5816492438316345,
0.06685882061719894,
-0.1456654667854309,
0.26930975914001465,
-0.13134130835533142,
0.6396872401237488,
0.41636794805526733,
-0.041689325124025345,
0.409453421831131,
-0.006434325128793716,
0.5233031511306763,
0.01741006225347519,
0.07596521079540253,
-0.2951543629169464,
-0.07219813019037247,
-0.0018319860100746155,
-0.3078939616680145,
0.25279390811920166,
-0.227172389626503,
-0.12476417422294617,
0.14523114264011383,
-0.1624913215637207,
0.10594981908798218,
0.1111447736620903,
0.3241651952266693,
0.04375636577606201,
-0.1731252372264862,
-0.18055403232574463,
0.19401930272579193,
-0.27307671308517456,
0.4175560772418976,
-0.03635178506374359,
0.12170211225748062,
-0.15814796090126038,
-0.19069147109985352,
-0.21074871718883514,
0.09602683782577515,
-0.1865159273147583,
0.5763900279998779,
0.18128438293933868,
-0.2087288498878479,
0.20751257240772247,
0.032516688108444214,
0.26882225275039673,
0.06124786287546158,
-0.12569953501224518,
0.08262547105550766,
-0.11682815104722977,
0.03334607556462288,
0.1364908218383789,
-0.0181565061211586,
0.4995169937610626,
-0.19626101851463318,
-0.14696714282035828,
0.28618526458740234,
0.005306619219481945,
0.0009025111794471741,
0.18051698803901672,
0.1021626815199852,
0.18323606252670288,
-0.17877928912639618,
-0.29135453701019287,
-0.010673336684703827,
0.16432198882102966,
-0.25539880990982056,
0.17204201221466064,
0.17631810903549194,
-0.23437711596488953,
0.5269705653190613,
-0.029082302004098892,
-0.09364929795265198,
-0.060429465025663376,
0.5038352012634277,
-0.12545451521873474,
-0.03391125425696373,
0.4253857731819153,
0.0037509314715862274,
-0.2274894118309021,
-0.16190573573112488,
0.20951497554779053,
-0.13695178925991058,
-0.3716197609901428,
0.1167784258723259,
0.005292536690831184,
0.024826616048812866,
-0.07031262665987015,
-0.023679379373788834,
0.1923745572566986,
0.1282559484243393,
-0.06201885640621185,
-0.6253932118415833,
-0.26388922333717346,
0.08244694769382477,
0.03345869481563568,
-0.07375931739807129,
-0.11779023706912994,
0.31485962867736816,
-0.011782770045101643,
0.12440767139196396,
-0.35474246740341187,
0.08306482434272766,
-0.2320188730955124,
0.2166161835193634,
0.07319886982440948,
-0.06891593337059021,
-0.10622483491897583,
-0.12841203808784485,
0.14706727862358093,
0.03703876584768295,
-0.16490581631660461,
-0.3014600872993469,
-0.25970426201820374,
0.1031353771686554,
0.14760303497314453,
-0.22768773138523102,
0.2594794034957886,
-0.11892672628164291,
0.012519310228526592,
-0.06634648144245148,
-0.11096538603305817,
0.29668182134628296,
-0.02761741727590561,
0.17873942852020264,
-0.16106542944908142,
-0.06564947217702866,
-0.08800286799669266,
0.12807124853134155,
-0.00005755573511123657,
-0.001478038728237152,
-0.06090327724814415,
0.1955324113368988,
0.11855591833591461,
0.09117679297924042,
-0.277160108089447,
-0.09280212968587875,
-0.26703035831451416,
0.06472338736057281,
0.35794854164123535,
-0.3996219038963318,
0.14770567417144775,
-0.022943176329135895,
-0.04536120593547821,
0.4884302318096161,
-0.37118208408355713,
0.14837190508842468,
0.3930785059928894,
0.2435016632080078,
-0.31499823927879333,
-0.06241559237241745,
0.22849883139133453,
0.097301185131073,
0.08298750221729279,
-0.005590938031673431,
-0.0021320804953575134,
-0.19477790594100952,
0.15731102228164673,
0.06335386633872986,
0.4350648522377014,
-0.15986138582229614,
0.3405029773712158,
0.26539990305900574,
-0.1725967824459076,
0.022402897477149963,
-0.029339177533984184,
0.22543099522590637,
0.17512136697769165,
0.5000418424606323,
-0.03605865687131882,
-0.05577348917722702,
-0.14869236946105957,
-0.12648829817771912,
0.12357380986213684,
-0.29200032353401184,
0.015109999105334282,
-0.031938910484313965,
0.03979174792766571,
0.019949734210968018,
-0.04772995412349701,
-0.03838489204645157,
-0.0886523574590683,
-0.2141147404909134,
0.044655635952949524,
0.2365419566631317,
-0.03287782520055771,
0.11796383559703827,
-0.3622157573699951,
0.06917291134595871,
-0.17932943999767303,
0.029768098145723343,
0.0602436400949955,
-0.21631012856960297,
0.06676638871431351,
0.24104231595993042,
-0.40368497371673584,
-0.605308473110199,
-0.14872398972511292,
0.22543862462043762,
0.07570528984069824,
-0.2549225091934204,
0.11821136623620987,
0.2799668312072754,
-0.12545841932296753,
-0.35019734501838684,
0.3104458153247833,
0.6052207946777344,
0.29724493622779846,
-0.0005661621689796448,
0.1796358823776245,
0.03348599001765251,
-0.2270834594964981,
-0.10745004564523697,
0.1809825450181961,
-0.0741259753704071,
0.084261953830719,
0.29734763503074646,
0.19002096354961395,
-0.2886580228805542,
0.12471053004264832,
0.044984713196754456,
0.0026340708136558533,
-0.3253538906574249,
0.39419832825660706,
-0.15580691397190094,
-0.1277221143245697,
-0.04201560467481613,
-0.012866877019405365,
-0.39773792028427124,
0.1289706826210022,
0.7170612812042236,
-0.0026647867634892464,
0.08312481641769409,
-0.20665700733661652,
0.09984167665243149,
-0.08658689260482788,
0.36910775303840637,
0.3679363429546356,
0.32648536562919617,
-0.2348644733428955,
-0.15994107723236084,
-0.6859852075576782,
0.12717793881893158,
-0.16880929470062256,
-0.1009160652756691,
0.059098824858665466,
0.13929417729377747,
-0.043289490044116974,
0.2713605761528015,
-0.1936178356409073,
0.1643591970205307,
-0.0856282114982605,
0.06807899475097656,
-0.434000700712204,
-0.27802014350891113,
-0.09781701862812042,
0.020456034690141678,
0.05387679487466812,
-0.39736562967300415,
0.08212152123451233,
-0.40998682379722595,
0.14358490705490112,
-0.1831357181072235,
-0.17931237816810608,
0.012505736202001572,
0.12302935868501663,
0.22397243976593018,
0.13991379737854004,
0.6028478145599365,
-0.08384809643030167,
0.11336997896432877,
-0.19214338064193726,
-0.4339522123336792,
-0.17891539633274078,
0.44748005270957947,
0.23736941814422607,
0.5612441301345825,
-0.1406320482492447,
-0.2952290177345276,
-0.2654533386230469,
0.26909390091896057,
0.10592268407344818,
-0.10158935189247131,
-0.11553926765918732,
0.35036101937294006,
-0.09681183099746704,
0.2226482331752777,
0.11840185523033142,
0.18177151679992676,
-0.13409429788589478,
0.251631498336792,
-0.28862065076828003,
-0.608522355556488,
0.59804368019104,
-0.34040138125419617,
-0.29492896795272827,
-0.09664614498615265,
0.3278684616088867,
0.07860957831144333,
-0.17334257066249847,
-0.3546924889087677,
0.07545686513185501,
0.38273584842681885,
-0.22352707386016846,
-0.32733771204948425,
0.42725253105163574,
0.07845483720302582,
0.16851922869682312,
-0.07755014300346375,
0.4521098732948303,
-0.01949498802423477,
-0.28134074807167053,
0.3119499385356903,
0.02625519037246704
] |
https://github.com/huggingface/datasets/issues/4906 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import) | I am facing the same question. And this happens when i installing `evaluate` package while `jupyter notebook` running. I'm not sure if the error occured because of trying to import the package installed when the notebook is running. Surpringly when i stop the notebook and rerun, the issue has been solved itself. Hope this will be helpful : ) | ## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
| 59 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
I am facing the same question. And this happens when i installing `evaluate` package while `jupyter notebook` running. I'm not sure if the error occured because of trying to import the package installed when the notebook is running. Surpringly when i stop the notebook and rerun, the issue has been solved itself. Hope this will be helpful : ) | [
-0.2775006592273712,
-0.24207346141338348,
-0.04461362957954407,
0.1706514060497284,
0.2661904990673065,
0.058018989861011505,
0.20556212961673737,
0.17970316112041473,
-0.059139739722013474,
-0.042035624384880066,
-0.08086638152599335,
0.35249266028404236,
-0.3115460276603699,
0.08479202538728714,
0.03337257727980614,
-0.037684887647628784,
0.10332494974136353,
0.08125311136245728,
-0.31609585881233215,
-0.10554884374141693,
-0.12318490445613861,
0.08857348561286926,
-0.29163461923599243,
-0.05722302198410034,
-0.13032867014408112,
-0.11377298086881638,
0.050033919513225555,
0.17448315024375916,
-0.2878383696079254,
-0.4896661937236786,
0.20199447870254517,
-0.2329179346561432,
0.14150206744670868,
0.34789973497390747,
-0.00011066455044783652,
0.14530996978282928,
0.28968900442123413,
-0.03292524814605713,
-0.3947031497955322,
-0.18310250341892242,
0.015892744064331055,
-0.2677006721496582,
0.19688193500041962,
-0.11565413326025009,
0.2253408432006836,
-0.0000022174790501594543,
-0.13211970031261444,
-0.17772817611694336,
0.3848723769187927,
0.4231010973453522,
0.2509199380874634,
0.36832156777381897,
0.3481288552284241,
-0.07321640104055405,
-0.14124470949172974,
0.1322179138660431,
-0.10670407116413116,
0.047279536724090576,
0.16764762997627258,
-0.11178399622440338,
0.11694622039794922,
0.14339159429073334,
-0.10157553106546402,
0.30673906207084656,
0.17301374673843384,
-0.11238206177949905,
0.20166167616844177,
-0.4488432705402374,
-0.0035316944122314453,
0.020549211651086807,
0.4859694242477417,
-0.34062010049819946,
-0.4327462315559387,
-0.10433885455131531,
0.2907516658306122,
-0.2095295488834381,
-0.015782274305820465,
0.25180384516716003,
-0.16984540224075317,
0.16623766720294952,
-0.126663938164711,
-0.09143321216106415,
-0.19778679311275482,
0.27985289692878723,
-0.37080061435699463,
0.25993475317955017,
-0.05765480548143387,
0.03487366437911987,
-0.06224597617983818,
-0.1709011197090149,
0.5021548867225647,
-0.04920611530542374,
0.19536982476711273,
0.1710646152496338,
-0.17504747211933136,
0.047369085252285004,
0.3851121664047241,
0.05973966419696808,
-0.08776916563510895,
0.31775420904159546,
-0.0983797088265419,
0.03481747955083847,
-0.03712708503007889,
0.30872660875320435,
-0.016095876693725586,
0.03649095073342323,
-0.12249615043401718,
0.4629843533039093,
0.2699597179889679,
0.02348235808312893,
0.026690755039453506,
0.09532119333744049,
-0.15794603526592255,
-0.11409399658441544,
0.034290675073862076,
0.009816660545766354,
0.32551759481430054,
-0.09433913230895996,
-0.467536062002182,
-0.051856763660907745,
-0.19528287649154663,
0.11984753608703613,
0.17403768002986908,
0.21600472927093506,
-0.2721647620201111,
0.3422996997833252,
0.12810519337654114,
0.18161948025226593,
-0.1852758377790451,
-0.04623931273818016,
-0.23746556043624878,
0.15390679240226746,
-0.14500735700130463,
-0.13559120893478394,
0.13609106838703156,
-0.2294323593378067,
0.30341172218322754,
0.13893771171569824,
-0.11675304174423218,
-0.003984369337558746,
0.3704977333545685,
-0.18406911194324493,
-0.058401428163051605,
0.3080308437347412,
0.04985975846648216,
0.3170221149921417,
0.3064502477645874,
-0.21600539982318878,
-0.1106526181101799,
-0.03282589465379715,
-0.41354596614837646,
-0.2724292576313019,
-0.3094726502895355,
0.2973445653915405,
-0.2502285838127136,
-0.05080225318670273,
-0.2178674340248108,
-0.16115446388721466,
-0.009053409099578857,
-0.10636675357818604,
-0.28047385811805725,
-0.31523436307907104,
-0.05794394388794899,
-0.20004060864448547,
0.35799750685691833,
0.32271790504455566,
-0.27942556142807007,
-0.2638675570487976,
-0.20225203037261963,
0.0019280873239040375,
0.0018429011106491089,
0.28046348690986633,
-0.23707500100135803,
0.37401166558265686,
-0.2584768235683441,
-0.23636670410633087,
0.415568470954895,
-0.4688444435596466,
-0.274543821811676,
-0.056412868201732635,
-0.1510140597820282,
0.1341286450624466,
-0.14245757460594177,
-0.06888757646083832,
0.08464705944061279,
0.08455285429954529,
0.4006634056568146,
0.4482423663139343,
0.003321366384625435,
-0.008199766278266907,
-0.17874287068843842,
-0.15476791560649872,
0.24175500869750977,
0.03618339076638222,
0.23759040236473083,
0.07919062674045563,
-0.03789597004652023,
0.031297583132982254,
0.07475975155830383,
-0.00022912770509719849,
0.008019741624593735,
0.40289849042892456,
0.43958795070648193,
0.04681265726685524,
-0.1622423380613327,
-0.23580396175384521,
-0.34307533502578735,
0.25113075971603394,
0.33248215913772583,
0.059855829924345016,
-0.2718019485473633,
-0.00959240086376667,
-0.41476893424987793,
0.1223704144358635,
-0.09523659944534302,
-0.13963447511196136,
0.16803881525993347,
0.24425138533115387,
-0.02380438521504402,
0.18637894093990326,
-0.30578282475471497,
0.4410889148712158,
-0.04049370065331459,
0.15749721229076385,
-0.4303837716579437,
0.3454747200012207,
-0.2914995551109314,
-0.09599723666906357,
0.19979546964168549,
0.12956613302230835,
0.06380156427621841,
-0.1125827357172966,
-0.10558637976646423,
0.07958492636680603,
0.052455611526966095,
0.08396964520215988,
-0.02190259099006653,
0.1011112853884697,
0.062404267489910126,
-0.3221614360809326,
-0.045447610318660736,
0.22655577957630157,
0.31743958592414856,
-0.11582082509994507,
-0.10328621417284012,
0.14799366891384125,
0.16047953069210052,
0.02355329692363739,
0.253548800945282,
0.2179674506187439,
0.2853770852088928,
-0.048714637756347656,
-0.14558814465999603,
-0.2306056022644043,
0.41466614603996277,
0.005547570064663887,
0.2221650928258896,
-0.05781219154596329,
-0.15842923521995544,
0.04314613342285156,
0.3955138623714447,
0.10214056074619293,
0.03601086884737015,
0.14821432530879974,
-0.31642600893974304,
0.06181466579437256,
0.12994639575481415,
0.13672561943531036,
0.4446890354156494,
0.14244163036346436,
-0.07678219676017761,
0.2353537380695343,
-0.18954266607761383,
-0.14629431068897247,
0.17196246981620789,
0.19171911478042603,
-0.07836652547121048,
0.14936813712120056,
0.23899619281291962,
0.13906165957450867,
-0.1617218554019928,
-0.5220280885696411,
0.1154480054974556,
0.4746926724910736,
-0.505323588848114,
0.06584319472312927,
-0.46442911028862,
-0.0702584907412529,
-0.16649332642555237,
-0.1483643352985382,
0.06724126636981964,
-0.3208220303058624,
-0.27429789304733276,
0.5157068967819214,
-0.06785885244607925,
0.17135286331176758,
-0.26744115352630615,
0.08943067491054535,
0.05150759220123291,
-0.051521144807338715,
-0.00511951744556427,
-0.18175481259822845,
-0.03473431617021561,
0.07348112761974335,
0.290377676486969,
0.18275971710681915,
0.5052530169487,
-0.18077901005744934,
0.2141696661710739,
-0.04569148272275925,
-0.4314253628253937,
-0.059717826545238495,
0.16037997603416443,
0.34962597489356995,
0.13811536133289337,
0.2268129140138626,
-0.1385030299425125,
-0.2944590151309967,
0.2882464528083801,
-0.10828235000371933,
-0.20147083699703217,
0.17753182351589203,
-0.04552186280488968,
-0.2853735089302063,
-0.07560284435749054,
-0.25596722960472107,
-0.45685914158821106,
-0.533658504486084,
-0.09360800683498383,
0.2604706585407257,
0.12777142226696014,
0.33321213722229004,
0.02592919021844864,
0.23161765933036804,
0.14519350230693817,
0.15808571875095367,
-0.03655217960476875,
-0.2056892216205597,
0.48262491822242737,
-0.3134560286998749,
-0.4168644845485687,
-0.042009126394987106,
-0.2850343585014343,
0.25918450951576233,
0.21197770535945892,
-0.5002511143684387,
-0.06413882970809937,
-0.19833171367645264,
0.2561534643173218,
-0.16154545545578003,
0.16255740821361542,
0.2069082260131836,
0.1560354381799698,
-0.04785563051700592,
-0.07198479026556015,
-0.18310312926769257,
-0.3673669993877411,
0.06571723520755768,
0.07190120220184326,
-0.22198879718780518,
0.3527865409851074,
0.05580490455031395,
0.611434817314148,
0.10525256395339966,
-0.03225081041455269,
0.21265196800231934,
-0.009991167113184929,
0.2582743167877197,
-0.09663219004869461,
-0.6281751990318298,
0.04671875014901161,
-0.11047717928886414,
0.05618268996477127,
-0.06831289827823639,
-0.15265682339668274,
-0.10594486445188522,
-0.200847789645195,
0.2735740542411804,
-0.2572714388370514,
-0.15161022543907166,
0.07533221691846848,
-0.08419887721538544,
0.21566534042358398,
0.06155836209654808,
-0.0985318124294281,
-0.2714383602142334,
-0.06562946736812592,
0.012258538976311684,
0.14188653230667114,
-0.1555662453174591,
0.10347547382116318,
-0.5286014080047607,
-0.21280261874198914,
-0.07959242910146713,
0.16694170236587524,
-0.005309909116476774,
0.46134287118911743,
0.037483591586351395,
0.005800675600767136,
-0.005379416048526764,
-0.08806923031806946,
0.36848175525665283,
-0.043707579374313354,
-0.14674575626850128,
0.344928503036499,
-0.1100088432431221,
-0.8670599460601807,
-0.02393522299826145,
-0.2906341552734375,
0.08364220708608627,
0.3337988555431366,
0.18968139588832855,
-0.13833926618099213,
0.06743545085191727,
-0.0217907652258873,
0.3680764436721802,
-0.10852319002151489,
0.08532058447599411,
-0.16949094831943512,
-0.5002074241638184,
-0.5236356258392334,
-0.08513271063566208,
0.07480473816394806,
0.1865348368883133,
0.11112454533576965,
0.06512528657913208,
-0.34133297204971313,
-0.1500426083803177,
0.08254848420619965,
0.23574839532375336,
0.06223934888839722,
0.04769572988152504,
0.35144567489624023,
-0.02985125035047531,
-0.04984389990568161,
0.37742364406585693,
0.6002733111381531,
-0.04873800650238991,
-0.33254188299179077,
-0.04554490000009537,
0.03771250322461128,
0.14669060707092285,
0.032381102442741394,
-0.051210980862379074,
0.13214680552482605,
-0.19093866646289825,
0.10874062776565552,
-0.11094324290752411,
0.3155507445335388,
0.15925417840480804,
0.04922736808657646,
-0.1740751564502716,
-0.3244180381298065,
0.17802375555038452,
0.11078023910522461,
0.026807978749275208,
0.5816492438316345,
0.06685882061719894,
-0.1456654667854309,
0.26930975914001465,
-0.13134130835533142,
0.6396872401237488,
0.41636794805526733,
-0.041689325124025345,
0.409453421831131,
-0.006434325128793716,
0.5233031511306763,
0.01741006225347519,
0.07596521079540253,
-0.2951543629169464,
-0.07219813019037247,
-0.0018319860100746155,
-0.3078939616680145,
0.25279390811920166,
-0.227172389626503,
-0.12476417422294617,
0.14523114264011383,
-0.1624913215637207,
0.10594981908798218,
0.1111447736620903,
0.3241651952266693,
0.04375636577606201,
-0.1731252372264862,
-0.18055403232574463,
0.19401930272579193,
-0.27307671308517456,
0.4175560772418976,
-0.03635178506374359,
0.12170211225748062,
-0.15814796090126038,
-0.19069147109985352,
-0.21074871718883514,
0.09602683782577515,
-0.1865159273147583,
0.5763900279998779,
0.18128438293933868,
-0.2087288498878479,
0.20751257240772247,
0.032516688108444214,
0.26882225275039673,
0.06124786287546158,
-0.12569953501224518,
0.08262547105550766,
-0.11682815104722977,
0.03334607556462288,
0.1364908218383789,
-0.0181565061211586,
0.4995169937610626,
-0.19626101851463318,
-0.14696714282035828,
0.28618526458740234,
0.005306619219481945,
0.0009025111794471741,
0.18051698803901672,
0.1021626815199852,
0.18323606252670288,
-0.17877928912639618,
-0.29135453701019287,
-0.010673336684703827,
0.16432198882102966,
-0.25539880990982056,
0.17204201221466064,
0.17631810903549194,
-0.23437711596488953,
0.5269705653190613,
-0.029082302004098892,
-0.09364929795265198,
-0.060429465025663376,
0.5038352012634277,
-0.12545451521873474,
-0.03391125425696373,
0.4253857731819153,
0.0037509314715862274,
-0.2274894118309021,
-0.16190573573112488,
0.20951497554779053,
-0.13695178925991058,
-0.3716197609901428,
0.1167784258723259,
0.005292536690831184,
0.024826616048812866,
-0.07031262665987015,
-0.023679379373788834,
0.1923745572566986,
0.1282559484243393,
-0.06201885640621185,
-0.6253932118415833,
-0.26388922333717346,
0.08244694769382477,
0.03345869481563568,
-0.07375931739807129,
-0.11779023706912994,
0.31485962867736816,
-0.011782770045101643,
0.12440767139196396,
-0.35474246740341187,
0.08306482434272766,
-0.2320188730955124,
0.2166161835193634,
0.07319886982440948,
-0.06891593337059021,
-0.10622483491897583,
-0.12841203808784485,
0.14706727862358093,
0.03703876584768295,
-0.16490581631660461,
-0.3014600872993469,
-0.25970426201820374,
0.1031353771686554,
0.14760303497314453,
-0.22768773138523102,
0.2594794034957886,
-0.11892672628164291,
0.012519310228526592,
-0.06634648144245148,
-0.11096538603305817,
0.29668182134628296,
-0.02761741727590561,
0.17873942852020264,
-0.16106542944908142,
-0.06564947217702866,
-0.08800286799669266,
0.12807124853134155,
-0.00005755573511123657,
-0.001478038728237152,
-0.06090327724814415,
0.1955324113368988,
0.11855591833591461,
0.09117679297924042,
-0.277160108089447,
-0.09280212968587875,
-0.26703035831451416,
0.06472338736057281,
0.35794854164123535,
-0.3996219038963318,
0.14770567417144775,
-0.022943176329135895,
-0.04536120593547821,
0.4884302318096161,
-0.37118208408355713,
0.14837190508842468,
0.3930785059928894,
0.2435016632080078,
-0.31499823927879333,
-0.06241559237241745,
0.22849883139133453,
0.097301185131073,
0.08298750221729279,
-0.005590938031673431,
-0.0021320804953575134,
-0.19477790594100952,
0.15731102228164673,
0.06335386633872986,
0.4350648522377014,
-0.15986138582229614,
0.3405029773712158,
0.26539990305900574,
-0.1725967824459076,
0.022402897477149963,
-0.029339177533984184,
0.22543099522590637,
0.17512136697769165,
0.5000418424606323,
-0.03605865687131882,
-0.05577348917722702,
-0.14869236946105957,
-0.12648829817771912,
0.12357380986213684,
-0.29200032353401184,
0.015109999105334282,
-0.031938910484313965,
0.03979174792766571,
0.019949734210968018,
-0.04772995412349701,
-0.03838489204645157,
-0.0886523574590683,
-0.2141147404909134,
0.044655635952949524,
0.2365419566631317,
-0.03287782520055771,
0.11796383559703827,
-0.3622157573699951,
0.06917291134595871,
-0.17932943999767303,
0.029768098145723343,
0.0602436400949955,
-0.21631012856960297,
0.06676638871431351,
0.24104231595993042,
-0.40368497371673584,
-0.605308473110199,
-0.14872398972511292,
0.22543862462043762,
0.07570528984069824,
-0.2549225091934204,
0.11821136623620987,
0.2799668312072754,
-0.12545841932296753,
-0.35019734501838684,
0.3104458153247833,
0.6052207946777344,
0.29724493622779846,
-0.0005661621689796448,
0.1796358823776245,
0.03348599001765251,
-0.2270834594964981,
-0.10745004564523697,
0.1809825450181961,
-0.0741259753704071,
0.084261953830719,
0.29734763503074646,
0.19002096354961395,
-0.2886580228805542,
0.12471053004264832,
0.044984713196754456,
0.0026340708136558533,
-0.3253538906574249,
0.39419832825660706,
-0.15580691397190094,
-0.1277221143245697,
-0.04201560467481613,
-0.012866877019405365,
-0.39773792028427124,
0.1289706826210022,
0.7170612812042236,
-0.0026647867634892464,
0.08312481641769409,
-0.20665700733661652,
0.09984167665243149,
-0.08658689260482788,
0.36910775303840637,
0.3679363429546356,
0.32648536562919617,
-0.2348644733428955,
-0.15994107723236084,
-0.6859852075576782,
0.12717793881893158,
-0.16880929470062256,
-0.1009160652756691,
0.059098824858665466,
0.13929417729377747,
-0.043289490044116974,
0.2713605761528015,
-0.1936178356409073,
0.1643591970205307,
-0.0856282114982605,
0.06807899475097656,
-0.434000700712204,
-0.27802014350891113,
-0.09781701862812042,
0.020456034690141678,
0.05387679487466812,
-0.39736562967300415,
0.08212152123451233,
-0.40998682379722595,
0.14358490705490112,
-0.1831357181072235,
-0.17931237816810608,
0.012505736202001572,
0.12302935868501663,
0.22397243976593018,
0.13991379737854004,
0.6028478145599365,
-0.08384809643030167,
0.11336997896432877,
-0.19214338064193726,
-0.4339522123336792,
-0.17891539633274078,
0.44748005270957947,
0.23736941814422607,
0.5612441301345825,
-0.1406320482492447,
-0.2952290177345276,
-0.2654533386230469,
0.26909390091896057,
0.10592268407344818,
-0.10158935189247131,
-0.11553926765918732,
0.35036101937294006,
-0.09681183099746704,
0.2226482331752777,
0.11840185523033142,
0.18177151679992676,
-0.13409429788589478,
0.251631498336792,
-0.28862065076828003,
-0.608522355556488,
0.59804368019104,
-0.34040138125419617,
-0.29492896795272827,
-0.09664614498615265,
0.3278684616088867,
0.07860957831144333,
-0.17334257066249847,
-0.3546924889087677,
0.07545686513185501,
0.38273584842681885,
-0.22352707386016846,
-0.32733771204948425,
0.42725253105163574,
0.07845483720302582,
0.16851922869682312,
-0.07755014300346375,
0.4521098732948303,
-0.01949498802423477,
-0.28134074807167053,
0.3119499385356903,
0.02625519037246704
] |
https://github.com/huggingface/datasets/issues/4906 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import) | I also got this error.
It helped me to find the python process and kill it, then restart the kernel and the error disappeared. | ## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
| 24 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
I also got this error.
It helped me to find the python process and kill it, then restart the kernel and the error disappeared. | [
-0.2775006592273712,
-0.24207346141338348,
-0.04461362957954407,
0.1706514060497284,
0.2661904990673065,
0.058018989861011505,
0.20556212961673737,
0.17970316112041473,
-0.059139739722013474,
-0.042035624384880066,
-0.08086638152599335,
0.35249266028404236,
-0.3115460276603699,
0.08479202538728714,
0.03337257727980614,
-0.037684887647628784,
0.10332494974136353,
0.08125311136245728,
-0.31609585881233215,
-0.10554884374141693,
-0.12318490445613861,
0.08857348561286926,
-0.29163461923599243,
-0.05722302198410034,
-0.13032867014408112,
-0.11377298086881638,
0.050033919513225555,
0.17448315024375916,
-0.2878383696079254,
-0.4896661937236786,
0.20199447870254517,
-0.2329179346561432,
0.14150206744670868,
0.34789973497390747,
-0.00011066455044783652,
0.14530996978282928,
0.28968900442123413,
-0.03292524814605713,
-0.3947031497955322,
-0.18310250341892242,
0.015892744064331055,
-0.2677006721496582,
0.19688193500041962,
-0.11565413326025009,
0.2253408432006836,
-0.0000022174790501594543,
-0.13211970031261444,
-0.17772817611694336,
0.3848723769187927,
0.4231010973453522,
0.2509199380874634,
0.36832156777381897,
0.3481288552284241,
-0.07321640104055405,
-0.14124470949172974,
0.1322179138660431,
-0.10670407116413116,
0.047279536724090576,
0.16764762997627258,
-0.11178399622440338,
0.11694622039794922,
0.14339159429073334,
-0.10157553106546402,
0.30673906207084656,
0.17301374673843384,
-0.11238206177949905,
0.20166167616844177,
-0.4488432705402374,
-0.0035316944122314453,
0.020549211651086807,
0.4859694242477417,
-0.34062010049819946,
-0.4327462315559387,
-0.10433885455131531,
0.2907516658306122,
-0.2095295488834381,
-0.015782274305820465,
0.25180384516716003,
-0.16984540224075317,
0.16623766720294952,
-0.126663938164711,
-0.09143321216106415,
-0.19778679311275482,
0.27985289692878723,
-0.37080061435699463,
0.25993475317955017,
-0.05765480548143387,
0.03487366437911987,
-0.06224597617983818,
-0.1709011197090149,
0.5021548867225647,
-0.04920611530542374,
0.19536982476711273,
0.1710646152496338,
-0.17504747211933136,
0.047369085252285004,
0.3851121664047241,
0.05973966419696808,
-0.08776916563510895,
0.31775420904159546,
-0.0983797088265419,
0.03481747955083847,
-0.03712708503007889,
0.30872660875320435,
-0.016095876693725586,
0.03649095073342323,
-0.12249615043401718,
0.4629843533039093,
0.2699597179889679,
0.02348235808312893,
0.026690755039453506,
0.09532119333744049,
-0.15794603526592255,
-0.11409399658441544,
0.034290675073862076,
0.009816660545766354,
0.32551759481430054,
-0.09433913230895996,
-0.467536062002182,
-0.051856763660907745,
-0.19528287649154663,
0.11984753608703613,
0.17403768002986908,
0.21600472927093506,
-0.2721647620201111,
0.3422996997833252,
0.12810519337654114,
0.18161948025226593,
-0.1852758377790451,
-0.04623931273818016,
-0.23746556043624878,
0.15390679240226746,
-0.14500735700130463,
-0.13559120893478394,
0.13609106838703156,
-0.2294323593378067,
0.30341172218322754,
0.13893771171569824,
-0.11675304174423218,
-0.003984369337558746,
0.3704977333545685,
-0.18406911194324493,
-0.058401428163051605,
0.3080308437347412,
0.04985975846648216,
0.3170221149921417,
0.3064502477645874,
-0.21600539982318878,
-0.1106526181101799,
-0.03282589465379715,
-0.41354596614837646,
-0.2724292576313019,
-0.3094726502895355,
0.2973445653915405,
-0.2502285838127136,
-0.05080225318670273,
-0.2178674340248108,
-0.16115446388721466,
-0.009053409099578857,
-0.10636675357818604,
-0.28047385811805725,
-0.31523436307907104,
-0.05794394388794899,
-0.20004060864448547,
0.35799750685691833,
0.32271790504455566,
-0.27942556142807007,
-0.2638675570487976,
-0.20225203037261963,
0.0019280873239040375,
0.0018429011106491089,
0.28046348690986633,
-0.23707500100135803,
0.37401166558265686,
-0.2584768235683441,
-0.23636670410633087,
0.415568470954895,
-0.4688444435596466,
-0.274543821811676,
-0.056412868201732635,
-0.1510140597820282,
0.1341286450624466,
-0.14245757460594177,
-0.06888757646083832,
0.08464705944061279,
0.08455285429954529,
0.4006634056568146,
0.4482423663139343,
0.003321366384625435,
-0.008199766278266907,
-0.17874287068843842,
-0.15476791560649872,
0.24175500869750977,
0.03618339076638222,
0.23759040236473083,
0.07919062674045563,
-0.03789597004652023,
0.031297583132982254,
0.07475975155830383,
-0.00022912770509719849,
0.008019741624593735,
0.40289849042892456,
0.43958795070648193,
0.04681265726685524,
-0.1622423380613327,
-0.23580396175384521,
-0.34307533502578735,
0.25113075971603394,
0.33248215913772583,
0.059855829924345016,
-0.2718019485473633,
-0.00959240086376667,
-0.41476893424987793,
0.1223704144358635,
-0.09523659944534302,
-0.13963447511196136,
0.16803881525993347,
0.24425138533115387,
-0.02380438521504402,
0.18637894093990326,
-0.30578282475471497,
0.4410889148712158,
-0.04049370065331459,
0.15749721229076385,
-0.4303837716579437,
0.3454747200012207,
-0.2914995551109314,
-0.09599723666906357,
0.19979546964168549,
0.12956613302230835,
0.06380156427621841,
-0.1125827357172966,
-0.10558637976646423,
0.07958492636680603,
0.052455611526966095,
0.08396964520215988,
-0.02190259099006653,
0.1011112853884697,
0.062404267489910126,
-0.3221614360809326,
-0.045447610318660736,
0.22655577957630157,
0.31743958592414856,
-0.11582082509994507,
-0.10328621417284012,
0.14799366891384125,
0.16047953069210052,
0.02355329692363739,
0.253548800945282,
0.2179674506187439,
0.2853770852088928,
-0.048714637756347656,
-0.14558814465999603,
-0.2306056022644043,
0.41466614603996277,
0.005547570064663887,
0.2221650928258896,
-0.05781219154596329,
-0.15842923521995544,
0.04314613342285156,
0.3955138623714447,
0.10214056074619293,
0.03601086884737015,
0.14821432530879974,
-0.31642600893974304,
0.06181466579437256,
0.12994639575481415,
0.13672561943531036,
0.4446890354156494,
0.14244163036346436,
-0.07678219676017761,
0.2353537380695343,
-0.18954266607761383,
-0.14629431068897247,
0.17196246981620789,
0.19171911478042603,
-0.07836652547121048,
0.14936813712120056,
0.23899619281291962,
0.13906165957450867,
-0.1617218554019928,
-0.5220280885696411,
0.1154480054974556,
0.4746926724910736,
-0.505323588848114,
0.06584319472312927,
-0.46442911028862,
-0.0702584907412529,
-0.16649332642555237,
-0.1483643352985382,
0.06724126636981964,
-0.3208220303058624,
-0.27429789304733276,
0.5157068967819214,
-0.06785885244607925,
0.17135286331176758,
-0.26744115352630615,
0.08943067491054535,
0.05150759220123291,
-0.051521144807338715,
-0.00511951744556427,
-0.18175481259822845,
-0.03473431617021561,
0.07348112761974335,
0.290377676486969,
0.18275971710681915,
0.5052530169487,
-0.18077901005744934,
0.2141696661710739,
-0.04569148272275925,
-0.4314253628253937,
-0.059717826545238495,
0.16037997603416443,
0.34962597489356995,
0.13811536133289337,
0.2268129140138626,
-0.1385030299425125,
-0.2944590151309967,
0.2882464528083801,
-0.10828235000371933,
-0.20147083699703217,
0.17753182351589203,
-0.04552186280488968,
-0.2853735089302063,
-0.07560284435749054,
-0.25596722960472107,
-0.45685914158821106,
-0.533658504486084,
-0.09360800683498383,
0.2604706585407257,
0.12777142226696014,
0.33321213722229004,
0.02592919021844864,
0.23161765933036804,
0.14519350230693817,
0.15808571875095367,
-0.03655217960476875,
-0.2056892216205597,
0.48262491822242737,
-0.3134560286998749,
-0.4168644845485687,
-0.042009126394987106,
-0.2850343585014343,
0.25918450951576233,
0.21197770535945892,
-0.5002511143684387,
-0.06413882970809937,
-0.19833171367645264,
0.2561534643173218,
-0.16154545545578003,
0.16255740821361542,
0.2069082260131836,
0.1560354381799698,
-0.04785563051700592,
-0.07198479026556015,
-0.18310312926769257,
-0.3673669993877411,
0.06571723520755768,
0.07190120220184326,
-0.22198879718780518,
0.3527865409851074,
0.05580490455031395,
0.611434817314148,
0.10525256395339966,
-0.03225081041455269,
0.21265196800231934,
-0.009991167113184929,
0.2582743167877197,
-0.09663219004869461,
-0.6281751990318298,
0.04671875014901161,
-0.11047717928886414,
0.05618268996477127,
-0.06831289827823639,
-0.15265682339668274,
-0.10594486445188522,
-0.200847789645195,
0.2735740542411804,
-0.2572714388370514,
-0.15161022543907166,
0.07533221691846848,
-0.08419887721538544,
0.21566534042358398,
0.06155836209654808,
-0.0985318124294281,
-0.2714383602142334,
-0.06562946736812592,
0.012258538976311684,
0.14188653230667114,
-0.1555662453174591,
0.10347547382116318,
-0.5286014080047607,
-0.21280261874198914,
-0.07959242910146713,
0.16694170236587524,
-0.005309909116476774,
0.46134287118911743,
0.037483591586351395,
0.005800675600767136,
-0.005379416048526764,
-0.08806923031806946,
0.36848175525665283,
-0.043707579374313354,
-0.14674575626850128,
0.344928503036499,
-0.1100088432431221,
-0.8670599460601807,
-0.02393522299826145,
-0.2906341552734375,
0.08364220708608627,
0.3337988555431366,
0.18968139588832855,
-0.13833926618099213,
0.06743545085191727,
-0.0217907652258873,
0.3680764436721802,
-0.10852319002151489,
0.08532058447599411,
-0.16949094831943512,
-0.5002074241638184,
-0.5236356258392334,
-0.08513271063566208,
0.07480473816394806,
0.1865348368883133,
0.11112454533576965,
0.06512528657913208,
-0.34133297204971313,
-0.1500426083803177,
0.08254848420619965,
0.23574839532375336,
0.06223934888839722,
0.04769572988152504,
0.35144567489624023,
-0.02985125035047531,
-0.04984389990568161,
0.37742364406585693,
0.6002733111381531,
-0.04873800650238991,
-0.33254188299179077,
-0.04554490000009537,
0.03771250322461128,
0.14669060707092285,
0.032381102442741394,
-0.051210980862379074,
0.13214680552482605,
-0.19093866646289825,
0.10874062776565552,
-0.11094324290752411,
0.3155507445335388,
0.15925417840480804,
0.04922736808657646,
-0.1740751564502716,
-0.3244180381298065,
0.17802375555038452,
0.11078023910522461,
0.026807978749275208,
0.5816492438316345,
0.06685882061719894,
-0.1456654667854309,
0.26930975914001465,
-0.13134130835533142,
0.6396872401237488,
0.41636794805526733,
-0.041689325124025345,
0.409453421831131,
-0.006434325128793716,
0.5233031511306763,
0.01741006225347519,
0.07596521079540253,
-0.2951543629169464,
-0.07219813019037247,
-0.0018319860100746155,
-0.3078939616680145,
0.25279390811920166,
-0.227172389626503,
-0.12476417422294617,
0.14523114264011383,
-0.1624913215637207,
0.10594981908798218,
0.1111447736620903,
0.3241651952266693,
0.04375636577606201,
-0.1731252372264862,
-0.18055403232574463,
0.19401930272579193,
-0.27307671308517456,
0.4175560772418976,
-0.03635178506374359,
0.12170211225748062,
-0.15814796090126038,
-0.19069147109985352,
-0.21074871718883514,
0.09602683782577515,
-0.1865159273147583,
0.5763900279998779,
0.18128438293933868,
-0.2087288498878479,
0.20751257240772247,
0.032516688108444214,
0.26882225275039673,
0.06124786287546158,
-0.12569953501224518,
0.08262547105550766,
-0.11682815104722977,
0.03334607556462288,
0.1364908218383789,
-0.0181565061211586,
0.4995169937610626,
-0.19626101851463318,
-0.14696714282035828,
0.28618526458740234,
0.005306619219481945,
0.0009025111794471741,
0.18051698803901672,
0.1021626815199852,
0.18323606252670288,
-0.17877928912639618,
-0.29135453701019287,
-0.010673336684703827,
0.16432198882102966,
-0.25539880990982056,
0.17204201221466064,
0.17631810903549194,
-0.23437711596488953,
0.5269705653190613,
-0.029082302004098892,
-0.09364929795265198,
-0.060429465025663376,
0.5038352012634277,
-0.12545451521873474,
-0.03391125425696373,
0.4253857731819153,
0.0037509314715862274,
-0.2274894118309021,
-0.16190573573112488,
0.20951497554779053,
-0.13695178925991058,
-0.3716197609901428,
0.1167784258723259,
0.005292536690831184,
0.024826616048812866,
-0.07031262665987015,
-0.023679379373788834,
0.1923745572566986,
0.1282559484243393,
-0.06201885640621185,
-0.6253932118415833,
-0.26388922333717346,
0.08244694769382477,
0.03345869481563568,
-0.07375931739807129,
-0.11779023706912994,
0.31485962867736816,
-0.011782770045101643,
0.12440767139196396,
-0.35474246740341187,
0.08306482434272766,
-0.2320188730955124,
0.2166161835193634,
0.07319886982440948,
-0.06891593337059021,
-0.10622483491897583,
-0.12841203808784485,
0.14706727862358093,
0.03703876584768295,
-0.16490581631660461,
-0.3014600872993469,
-0.25970426201820374,
0.1031353771686554,
0.14760303497314453,
-0.22768773138523102,
0.2594794034957886,
-0.11892672628164291,
0.012519310228526592,
-0.06634648144245148,
-0.11096538603305817,
0.29668182134628296,
-0.02761741727590561,
0.17873942852020264,
-0.16106542944908142,
-0.06564947217702866,
-0.08800286799669266,
0.12807124853134155,
-0.00005755573511123657,
-0.001478038728237152,
-0.06090327724814415,
0.1955324113368988,
0.11855591833591461,
0.09117679297924042,
-0.277160108089447,
-0.09280212968587875,
-0.26703035831451416,
0.06472338736057281,
0.35794854164123535,
-0.3996219038963318,
0.14770567417144775,
-0.022943176329135895,
-0.04536120593547821,
0.4884302318096161,
-0.37118208408355713,
0.14837190508842468,
0.3930785059928894,
0.2435016632080078,
-0.31499823927879333,
-0.06241559237241745,
0.22849883139133453,
0.097301185131073,
0.08298750221729279,
-0.005590938031673431,
-0.0021320804953575134,
-0.19477790594100952,
0.15731102228164673,
0.06335386633872986,
0.4350648522377014,
-0.15986138582229614,
0.3405029773712158,
0.26539990305900574,
-0.1725967824459076,
0.022402897477149963,
-0.029339177533984184,
0.22543099522590637,
0.17512136697769165,
0.5000418424606323,
-0.03605865687131882,
-0.05577348917722702,
-0.14869236946105957,
-0.12648829817771912,
0.12357380986213684,
-0.29200032353401184,
0.015109999105334282,
-0.031938910484313965,
0.03979174792766571,
0.019949734210968018,
-0.04772995412349701,
-0.03838489204645157,
-0.0886523574590683,
-0.2141147404909134,
0.044655635952949524,
0.2365419566631317,
-0.03287782520055771,
0.11796383559703827,
-0.3622157573699951,
0.06917291134595871,
-0.17932943999767303,
0.029768098145723343,
0.0602436400949955,
-0.21631012856960297,
0.06676638871431351,
0.24104231595993042,
-0.40368497371673584,
-0.605308473110199,
-0.14872398972511292,
0.22543862462043762,
0.07570528984069824,
-0.2549225091934204,
0.11821136623620987,
0.2799668312072754,
-0.12545841932296753,
-0.35019734501838684,
0.3104458153247833,
0.6052207946777344,
0.29724493622779846,
-0.0005661621689796448,
0.1796358823776245,
0.03348599001765251,
-0.2270834594964981,
-0.10745004564523697,
0.1809825450181961,
-0.0741259753704071,
0.084261953830719,
0.29734763503074646,
0.19002096354961395,
-0.2886580228805542,
0.12471053004264832,
0.044984713196754456,
0.0026340708136558533,
-0.3253538906574249,
0.39419832825660706,
-0.15580691397190094,
-0.1277221143245697,
-0.04201560467481613,
-0.012866877019405365,
-0.39773792028427124,
0.1289706826210022,
0.7170612812042236,
-0.0026647867634892464,
0.08312481641769409,
-0.20665700733661652,
0.09984167665243149,
-0.08658689260482788,
0.36910775303840637,
0.3679363429546356,
0.32648536562919617,
-0.2348644733428955,
-0.15994107723236084,
-0.6859852075576782,
0.12717793881893158,
-0.16880929470062256,
-0.1009160652756691,
0.059098824858665466,
0.13929417729377747,
-0.043289490044116974,
0.2713605761528015,
-0.1936178356409073,
0.1643591970205307,
-0.0856282114982605,
0.06807899475097656,
-0.434000700712204,
-0.27802014350891113,
-0.09781701862812042,
0.020456034690141678,
0.05387679487466812,
-0.39736562967300415,
0.08212152123451233,
-0.40998682379722595,
0.14358490705490112,
-0.1831357181072235,
-0.17931237816810608,
0.012505736202001572,
0.12302935868501663,
0.22397243976593018,
0.13991379737854004,
0.6028478145599365,
-0.08384809643030167,
0.11336997896432877,
-0.19214338064193726,
-0.4339522123336792,
-0.17891539633274078,
0.44748005270957947,
0.23736941814422607,
0.5612441301345825,
-0.1406320482492447,
-0.2952290177345276,
-0.2654533386230469,
0.26909390091896057,
0.10592268407344818,
-0.10158935189247131,
-0.11553926765918732,
0.35036101937294006,
-0.09681183099746704,
0.2226482331752777,
0.11840185523033142,
0.18177151679992676,
-0.13409429788589478,
0.251631498336792,
-0.28862065076828003,
-0.608522355556488,
0.59804368019104,
-0.34040138125419617,
-0.29492896795272827,
-0.09664614498615265,
0.3278684616088867,
0.07860957831144333,
-0.17334257066249847,
-0.3546924889087677,
0.07545686513185501,
0.38273584842681885,
-0.22352707386016846,
-0.32733771204948425,
0.42725253105163574,
0.07845483720302582,
0.16851922869682312,
-0.07755014300346375,
0.4521098732948303,
-0.01949498802423477,
-0.28134074807167053,
0.3119499385356903,
0.02625519037246704
] |
https://github.com/huggingface/datasets/issues/4906 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import) | > I also got this error. It helped me to find the python process and kill it, then restart the kernel and the error disappeared.
Yes! | ## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
| 26 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
> I also got this error. It helped me to find the python process and kill it, then restart the kernel and the error disappeared.
Yes! | [
-0.2775006592273712,
-0.24207346141338348,
-0.04461362957954407,
0.1706514060497284,
0.2661904990673065,
0.058018989861011505,
0.20556212961673737,
0.17970316112041473,
-0.059139739722013474,
-0.042035624384880066,
-0.08086638152599335,
0.35249266028404236,
-0.3115460276603699,
0.08479202538728714,
0.03337257727980614,
-0.037684887647628784,
0.10332494974136353,
0.08125311136245728,
-0.31609585881233215,
-0.10554884374141693,
-0.12318490445613861,
0.08857348561286926,
-0.29163461923599243,
-0.05722302198410034,
-0.13032867014408112,
-0.11377298086881638,
0.050033919513225555,
0.17448315024375916,
-0.2878383696079254,
-0.4896661937236786,
0.20199447870254517,
-0.2329179346561432,
0.14150206744670868,
0.34789973497390747,
-0.00011066455044783652,
0.14530996978282928,
0.28968900442123413,
-0.03292524814605713,
-0.3947031497955322,
-0.18310250341892242,
0.015892744064331055,
-0.2677006721496582,
0.19688193500041962,
-0.11565413326025009,
0.2253408432006836,
-0.0000022174790501594543,
-0.13211970031261444,
-0.17772817611694336,
0.3848723769187927,
0.4231010973453522,
0.2509199380874634,
0.36832156777381897,
0.3481288552284241,
-0.07321640104055405,
-0.14124470949172974,
0.1322179138660431,
-0.10670407116413116,
0.047279536724090576,
0.16764762997627258,
-0.11178399622440338,
0.11694622039794922,
0.14339159429073334,
-0.10157553106546402,
0.30673906207084656,
0.17301374673843384,
-0.11238206177949905,
0.20166167616844177,
-0.4488432705402374,
-0.0035316944122314453,
0.020549211651086807,
0.4859694242477417,
-0.34062010049819946,
-0.4327462315559387,
-0.10433885455131531,
0.2907516658306122,
-0.2095295488834381,
-0.015782274305820465,
0.25180384516716003,
-0.16984540224075317,
0.16623766720294952,
-0.126663938164711,
-0.09143321216106415,
-0.19778679311275482,
0.27985289692878723,
-0.37080061435699463,
0.25993475317955017,
-0.05765480548143387,
0.03487366437911987,
-0.06224597617983818,
-0.1709011197090149,
0.5021548867225647,
-0.04920611530542374,
0.19536982476711273,
0.1710646152496338,
-0.17504747211933136,
0.047369085252285004,
0.3851121664047241,
0.05973966419696808,
-0.08776916563510895,
0.31775420904159546,
-0.0983797088265419,
0.03481747955083847,
-0.03712708503007889,
0.30872660875320435,
-0.016095876693725586,
0.03649095073342323,
-0.12249615043401718,
0.4629843533039093,
0.2699597179889679,
0.02348235808312893,
0.026690755039453506,
0.09532119333744049,
-0.15794603526592255,
-0.11409399658441544,
0.034290675073862076,
0.009816660545766354,
0.32551759481430054,
-0.09433913230895996,
-0.467536062002182,
-0.051856763660907745,
-0.19528287649154663,
0.11984753608703613,
0.17403768002986908,
0.21600472927093506,
-0.2721647620201111,
0.3422996997833252,
0.12810519337654114,
0.18161948025226593,
-0.1852758377790451,
-0.04623931273818016,
-0.23746556043624878,
0.15390679240226746,
-0.14500735700130463,
-0.13559120893478394,
0.13609106838703156,
-0.2294323593378067,
0.30341172218322754,
0.13893771171569824,
-0.11675304174423218,
-0.003984369337558746,
0.3704977333545685,
-0.18406911194324493,
-0.058401428163051605,
0.3080308437347412,
0.04985975846648216,
0.3170221149921417,
0.3064502477645874,
-0.21600539982318878,
-0.1106526181101799,
-0.03282589465379715,
-0.41354596614837646,
-0.2724292576313019,
-0.3094726502895355,
0.2973445653915405,
-0.2502285838127136,
-0.05080225318670273,
-0.2178674340248108,
-0.16115446388721466,
-0.009053409099578857,
-0.10636675357818604,
-0.28047385811805725,
-0.31523436307907104,
-0.05794394388794899,
-0.20004060864448547,
0.35799750685691833,
0.32271790504455566,
-0.27942556142807007,
-0.2638675570487976,
-0.20225203037261963,
0.0019280873239040375,
0.0018429011106491089,
0.28046348690986633,
-0.23707500100135803,
0.37401166558265686,
-0.2584768235683441,
-0.23636670410633087,
0.415568470954895,
-0.4688444435596466,
-0.274543821811676,
-0.056412868201732635,
-0.1510140597820282,
0.1341286450624466,
-0.14245757460594177,
-0.06888757646083832,
0.08464705944061279,
0.08455285429954529,
0.4006634056568146,
0.4482423663139343,
0.003321366384625435,
-0.008199766278266907,
-0.17874287068843842,
-0.15476791560649872,
0.24175500869750977,
0.03618339076638222,
0.23759040236473083,
0.07919062674045563,
-0.03789597004652023,
0.031297583132982254,
0.07475975155830383,
-0.00022912770509719849,
0.008019741624593735,
0.40289849042892456,
0.43958795070648193,
0.04681265726685524,
-0.1622423380613327,
-0.23580396175384521,
-0.34307533502578735,
0.25113075971603394,
0.33248215913772583,
0.059855829924345016,
-0.2718019485473633,
-0.00959240086376667,
-0.41476893424987793,
0.1223704144358635,
-0.09523659944534302,
-0.13963447511196136,
0.16803881525993347,
0.24425138533115387,
-0.02380438521504402,
0.18637894093990326,
-0.30578282475471497,
0.4410889148712158,
-0.04049370065331459,
0.15749721229076385,
-0.4303837716579437,
0.3454747200012207,
-0.2914995551109314,
-0.09599723666906357,
0.19979546964168549,
0.12956613302230835,
0.06380156427621841,
-0.1125827357172966,
-0.10558637976646423,
0.07958492636680603,
0.052455611526966095,
0.08396964520215988,
-0.02190259099006653,
0.1011112853884697,
0.062404267489910126,
-0.3221614360809326,
-0.045447610318660736,
0.22655577957630157,
0.31743958592414856,
-0.11582082509994507,
-0.10328621417284012,
0.14799366891384125,
0.16047953069210052,
0.02355329692363739,
0.253548800945282,
0.2179674506187439,
0.2853770852088928,
-0.048714637756347656,
-0.14558814465999603,
-0.2306056022644043,
0.41466614603996277,
0.005547570064663887,
0.2221650928258896,
-0.05781219154596329,
-0.15842923521995544,
0.04314613342285156,
0.3955138623714447,
0.10214056074619293,
0.03601086884737015,
0.14821432530879974,
-0.31642600893974304,
0.06181466579437256,
0.12994639575481415,
0.13672561943531036,
0.4446890354156494,
0.14244163036346436,
-0.07678219676017761,
0.2353537380695343,
-0.18954266607761383,
-0.14629431068897247,
0.17196246981620789,
0.19171911478042603,
-0.07836652547121048,
0.14936813712120056,
0.23899619281291962,
0.13906165957450867,
-0.1617218554019928,
-0.5220280885696411,
0.1154480054974556,
0.4746926724910736,
-0.505323588848114,
0.06584319472312927,
-0.46442911028862,
-0.0702584907412529,
-0.16649332642555237,
-0.1483643352985382,
0.06724126636981964,
-0.3208220303058624,
-0.27429789304733276,
0.5157068967819214,
-0.06785885244607925,
0.17135286331176758,
-0.26744115352630615,
0.08943067491054535,
0.05150759220123291,
-0.051521144807338715,
-0.00511951744556427,
-0.18175481259822845,
-0.03473431617021561,
0.07348112761974335,
0.290377676486969,
0.18275971710681915,
0.5052530169487,
-0.18077901005744934,
0.2141696661710739,
-0.04569148272275925,
-0.4314253628253937,
-0.059717826545238495,
0.16037997603416443,
0.34962597489356995,
0.13811536133289337,
0.2268129140138626,
-0.1385030299425125,
-0.2944590151309967,
0.2882464528083801,
-0.10828235000371933,
-0.20147083699703217,
0.17753182351589203,
-0.04552186280488968,
-0.2853735089302063,
-0.07560284435749054,
-0.25596722960472107,
-0.45685914158821106,
-0.533658504486084,
-0.09360800683498383,
0.2604706585407257,
0.12777142226696014,
0.33321213722229004,
0.02592919021844864,
0.23161765933036804,
0.14519350230693817,
0.15808571875095367,
-0.03655217960476875,
-0.2056892216205597,
0.48262491822242737,
-0.3134560286998749,
-0.4168644845485687,
-0.042009126394987106,
-0.2850343585014343,
0.25918450951576233,
0.21197770535945892,
-0.5002511143684387,
-0.06413882970809937,
-0.19833171367645264,
0.2561534643173218,
-0.16154545545578003,
0.16255740821361542,
0.2069082260131836,
0.1560354381799698,
-0.04785563051700592,
-0.07198479026556015,
-0.18310312926769257,
-0.3673669993877411,
0.06571723520755768,
0.07190120220184326,
-0.22198879718780518,
0.3527865409851074,
0.05580490455031395,
0.611434817314148,
0.10525256395339966,
-0.03225081041455269,
0.21265196800231934,
-0.009991167113184929,
0.2582743167877197,
-0.09663219004869461,
-0.6281751990318298,
0.04671875014901161,
-0.11047717928886414,
0.05618268996477127,
-0.06831289827823639,
-0.15265682339668274,
-0.10594486445188522,
-0.200847789645195,
0.2735740542411804,
-0.2572714388370514,
-0.15161022543907166,
0.07533221691846848,
-0.08419887721538544,
0.21566534042358398,
0.06155836209654808,
-0.0985318124294281,
-0.2714383602142334,
-0.06562946736812592,
0.012258538976311684,
0.14188653230667114,
-0.1555662453174591,
0.10347547382116318,
-0.5286014080047607,
-0.21280261874198914,
-0.07959242910146713,
0.16694170236587524,
-0.005309909116476774,
0.46134287118911743,
0.037483591586351395,
0.005800675600767136,
-0.005379416048526764,
-0.08806923031806946,
0.36848175525665283,
-0.043707579374313354,
-0.14674575626850128,
0.344928503036499,
-0.1100088432431221,
-0.8670599460601807,
-0.02393522299826145,
-0.2906341552734375,
0.08364220708608627,
0.3337988555431366,
0.18968139588832855,
-0.13833926618099213,
0.06743545085191727,
-0.0217907652258873,
0.3680764436721802,
-0.10852319002151489,
0.08532058447599411,
-0.16949094831943512,
-0.5002074241638184,
-0.5236356258392334,
-0.08513271063566208,
0.07480473816394806,
0.1865348368883133,
0.11112454533576965,
0.06512528657913208,
-0.34133297204971313,
-0.1500426083803177,
0.08254848420619965,
0.23574839532375336,
0.06223934888839722,
0.04769572988152504,
0.35144567489624023,
-0.02985125035047531,
-0.04984389990568161,
0.37742364406585693,
0.6002733111381531,
-0.04873800650238991,
-0.33254188299179077,
-0.04554490000009537,
0.03771250322461128,
0.14669060707092285,
0.032381102442741394,
-0.051210980862379074,
0.13214680552482605,
-0.19093866646289825,
0.10874062776565552,
-0.11094324290752411,
0.3155507445335388,
0.15925417840480804,
0.04922736808657646,
-0.1740751564502716,
-0.3244180381298065,
0.17802375555038452,
0.11078023910522461,
0.026807978749275208,
0.5816492438316345,
0.06685882061719894,
-0.1456654667854309,
0.26930975914001465,
-0.13134130835533142,
0.6396872401237488,
0.41636794805526733,
-0.041689325124025345,
0.409453421831131,
-0.006434325128793716,
0.5233031511306763,
0.01741006225347519,
0.07596521079540253,
-0.2951543629169464,
-0.07219813019037247,
-0.0018319860100746155,
-0.3078939616680145,
0.25279390811920166,
-0.227172389626503,
-0.12476417422294617,
0.14523114264011383,
-0.1624913215637207,
0.10594981908798218,
0.1111447736620903,
0.3241651952266693,
0.04375636577606201,
-0.1731252372264862,
-0.18055403232574463,
0.19401930272579193,
-0.27307671308517456,
0.4175560772418976,
-0.03635178506374359,
0.12170211225748062,
-0.15814796090126038,
-0.19069147109985352,
-0.21074871718883514,
0.09602683782577515,
-0.1865159273147583,
0.5763900279998779,
0.18128438293933868,
-0.2087288498878479,
0.20751257240772247,
0.032516688108444214,
0.26882225275039673,
0.06124786287546158,
-0.12569953501224518,
0.08262547105550766,
-0.11682815104722977,
0.03334607556462288,
0.1364908218383789,
-0.0181565061211586,
0.4995169937610626,
-0.19626101851463318,
-0.14696714282035828,
0.28618526458740234,
0.005306619219481945,
0.0009025111794471741,
0.18051698803901672,
0.1021626815199852,
0.18323606252670288,
-0.17877928912639618,
-0.29135453701019287,
-0.010673336684703827,
0.16432198882102966,
-0.25539880990982056,
0.17204201221466064,
0.17631810903549194,
-0.23437711596488953,
0.5269705653190613,
-0.029082302004098892,
-0.09364929795265198,
-0.060429465025663376,
0.5038352012634277,
-0.12545451521873474,
-0.03391125425696373,
0.4253857731819153,
0.0037509314715862274,
-0.2274894118309021,
-0.16190573573112488,
0.20951497554779053,
-0.13695178925991058,
-0.3716197609901428,
0.1167784258723259,
0.005292536690831184,
0.024826616048812866,
-0.07031262665987015,
-0.023679379373788834,
0.1923745572566986,
0.1282559484243393,
-0.06201885640621185,
-0.6253932118415833,
-0.26388922333717346,
0.08244694769382477,
0.03345869481563568,
-0.07375931739807129,
-0.11779023706912994,
0.31485962867736816,
-0.011782770045101643,
0.12440767139196396,
-0.35474246740341187,
0.08306482434272766,
-0.2320188730955124,
0.2166161835193634,
0.07319886982440948,
-0.06891593337059021,
-0.10622483491897583,
-0.12841203808784485,
0.14706727862358093,
0.03703876584768295,
-0.16490581631660461,
-0.3014600872993469,
-0.25970426201820374,
0.1031353771686554,
0.14760303497314453,
-0.22768773138523102,
0.2594794034957886,
-0.11892672628164291,
0.012519310228526592,
-0.06634648144245148,
-0.11096538603305817,
0.29668182134628296,
-0.02761741727590561,
0.17873942852020264,
-0.16106542944908142,
-0.06564947217702866,
-0.08800286799669266,
0.12807124853134155,
-0.00005755573511123657,
-0.001478038728237152,
-0.06090327724814415,
0.1955324113368988,
0.11855591833591461,
0.09117679297924042,
-0.277160108089447,
-0.09280212968587875,
-0.26703035831451416,
0.06472338736057281,
0.35794854164123535,
-0.3996219038963318,
0.14770567417144775,
-0.022943176329135895,
-0.04536120593547821,
0.4884302318096161,
-0.37118208408355713,
0.14837190508842468,
0.3930785059928894,
0.2435016632080078,
-0.31499823927879333,
-0.06241559237241745,
0.22849883139133453,
0.097301185131073,
0.08298750221729279,
-0.005590938031673431,
-0.0021320804953575134,
-0.19477790594100952,
0.15731102228164673,
0.06335386633872986,
0.4350648522377014,
-0.15986138582229614,
0.3405029773712158,
0.26539990305900574,
-0.1725967824459076,
0.022402897477149963,
-0.029339177533984184,
0.22543099522590637,
0.17512136697769165,
0.5000418424606323,
-0.03605865687131882,
-0.05577348917722702,
-0.14869236946105957,
-0.12648829817771912,
0.12357380986213684,
-0.29200032353401184,
0.015109999105334282,
-0.031938910484313965,
0.03979174792766571,
0.019949734210968018,
-0.04772995412349701,
-0.03838489204645157,
-0.0886523574590683,
-0.2141147404909134,
0.044655635952949524,
0.2365419566631317,
-0.03287782520055771,
0.11796383559703827,
-0.3622157573699951,
0.06917291134595871,
-0.17932943999767303,
0.029768098145723343,
0.0602436400949955,
-0.21631012856960297,
0.06676638871431351,
0.24104231595993042,
-0.40368497371673584,
-0.605308473110199,
-0.14872398972511292,
0.22543862462043762,
0.07570528984069824,
-0.2549225091934204,
0.11821136623620987,
0.2799668312072754,
-0.12545841932296753,
-0.35019734501838684,
0.3104458153247833,
0.6052207946777344,
0.29724493622779846,
-0.0005661621689796448,
0.1796358823776245,
0.03348599001765251,
-0.2270834594964981,
-0.10745004564523697,
0.1809825450181961,
-0.0741259753704071,
0.084261953830719,
0.29734763503074646,
0.19002096354961395,
-0.2886580228805542,
0.12471053004264832,
0.044984713196754456,
0.0026340708136558533,
-0.3253538906574249,
0.39419832825660706,
-0.15580691397190094,
-0.1277221143245697,
-0.04201560467481613,
-0.012866877019405365,
-0.39773792028427124,
0.1289706826210022,
0.7170612812042236,
-0.0026647867634892464,
0.08312481641769409,
-0.20665700733661652,
0.09984167665243149,
-0.08658689260482788,
0.36910775303840637,
0.3679363429546356,
0.32648536562919617,
-0.2348644733428955,
-0.15994107723236084,
-0.6859852075576782,
0.12717793881893158,
-0.16880929470062256,
-0.1009160652756691,
0.059098824858665466,
0.13929417729377747,
-0.043289490044116974,
0.2713605761528015,
-0.1936178356409073,
0.1643591970205307,
-0.0856282114982605,
0.06807899475097656,
-0.434000700712204,
-0.27802014350891113,
-0.09781701862812042,
0.020456034690141678,
0.05387679487466812,
-0.39736562967300415,
0.08212152123451233,
-0.40998682379722595,
0.14358490705490112,
-0.1831357181072235,
-0.17931237816810608,
0.012505736202001572,
0.12302935868501663,
0.22397243976593018,
0.13991379737854004,
0.6028478145599365,
-0.08384809643030167,
0.11336997896432877,
-0.19214338064193726,
-0.4339522123336792,
-0.17891539633274078,
0.44748005270957947,
0.23736941814422607,
0.5612441301345825,
-0.1406320482492447,
-0.2952290177345276,
-0.2654533386230469,
0.26909390091896057,
0.10592268407344818,
-0.10158935189247131,
-0.11553926765918732,
0.35036101937294006,
-0.09681183099746704,
0.2226482331752777,
0.11840185523033142,
0.18177151679992676,
-0.13409429788589478,
0.251631498336792,
-0.28862065076828003,
-0.608522355556488,
0.59804368019104,
-0.34040138125419617,
-0.29492896795272827,
-0.09664614498615265,
0.3278684616088867,
0.07860957831144333,
-0.17334257066249847,
-0.3546924889087677,
0.07545686513185501,
0.38273584842681885,
-0.22352707386016846,
-0.32733771204948425,
0.42725253105163574,
0.07845483720302582,
0.16851922869682312,
-0.07755014300346375,
0.4521098732948303,
-0.01949498802423477,
-0.28134074807167053,
0.3119499385356903,
0.02625519037246704
] |
https://github.com/huggingface/datasets/issues/4906 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import) | > I am facing the same question. And this happens when i installing `evaluate` package while `jupyter notebook` running. I'm not sure if the error occured because of trying to import the package installed when the notebook is running. Surpringly when i stop the notebook and rerun, the issue has been solved itself. Hope this will be helpful : )
Thank you! :) | ## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
| 63 | Can't import datasets AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Describe the bug
A clear and concise description of what the bug is.
Not able to import datasets
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
import os
os.environ["WANDB_API_KEY"] = "0" ## to silence warning
import numpy as np
import random
import sklearn
import matplotlib.pyplot as plt
import pandas as pd
import sys
import tensorflow as tf
import plotly.express as px
import transformers
import tokenizers
import nlp as nlp
import utils
import datasets
```
## Expected results
A clear and concise description of the expected results.
import should work normal
## Actual results
Specify the actual results or traceback.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-21-b3b5b0b62103> in <module>
13 import nlp as nlp
14 import utils
---> 15 import datasets
~\anaconda3\lib\site-packages\datasets\__init__.py in <module>
44 from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
45 from .info import DatasetInfo, MetricInfo
---> 46 from .inspect import (
47 get_dataset_config_info,
48 get_dataset_config_names,
~\anaconda3\lib\site-packages\datasets\inspect.py in <module>
28 from .download.streaming_download_manager import StreamingDownloadManager
29 from .info import DatasetInfo
---> 30 from .load import dataset_module_factory, import_main_class, load_dataset_builder, metric_module_factory
31 from .utils.file_utils import relative_to_absolute_path
32 from .utils.logging import get_logger
~\anaconda3\lib\site-packages\datasets\load.py in <module>
53 from .iterable_dataset import IterableDataset
54 from .metric import Metric
---> 55 from .packaged_modules import (
56 _EXTENSION_TO_MODULE,
57 _MODULE_SUPPORTS_METADATA,
~\anaconda3\lib\site-packages\datasets\packaged_modules\__init__.py in <module>
4 from typing import List
5
----> 6 from .csv import csv
7 from .imagefolder import imagefolder
8 from .json import json
~\anaconda3\lib\site-packages\datasets\packaged_modules\csv\csv.py in <module>
13
14
---> 15 logger = datasets.utils.logging.get_logger(__name__)
16
17 _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS = ["names", "prefix"]
AttributeError: partially initialized module 'datasets' has no attribute 'utils' (most likely due to a circular import)
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.8.8
- PyArrow version: 9.0.0
- Pandas version: 1.2.4
> I am facing the same question. And this happens when i installing `evaluate` package while `jupyter notebook` running. I'm not sure if the error occured because of trying to import the package installed when the notebook is running. Surpringly when i stop the notebook and rerun, the issue has been solved itself. Hope this will be helpful : )
Thank you! :) | [
-0.2775006592273712,
-0.24207346141338348,
-0.04461362957954407,
0.1706514060497284,
0.2661904990673065,
0.058018989861011505,
0.20556212961673737,
0.17970316112041473,
-0.059139739722013474,
-0.042035624384880066,
-0.08086638152599335,
0.35249266028404236,
-0.3115460276603699,
0.08479202538728714,
0.03337257727980614,
-0.037684887647628784,
0.10332494974136353,
0.08125311136245728,
-0.31609585881233215,
-0.10554884374141693,
-0.12318490445613861,
0.08857348561286926,
-0.29163461923599243,
-0.05722302198410034,
-0.13032867014408112,
-0.11377298086881638,
0.050033919513225555,
0.17448315024375916,
-0.2878383696079254,
-0.4896661937236786,
0.20199447870254517,
-0.2329179346561432,
0.14150206744670868,
0.34789973497390747,
-0.00011066455044783652,
0.14530996978282928,
0.28968900442123413,
-0.03292524814605713,
-0.3947031497955322,
-0.18310250341892242,
0.015892744064331055,
-0.2677006721496582,
0.19688193500041962,
-0.11565413326025009,
0.2253408432006836,
-0.0000022174790501594543,
-0.13211970031261444,
-0.17772817611694336,
0.3848723769187927,
0.4231010973453522,
0.2509199380874634,
0.36832156777381897,
0.3481288552284241,
-0.07321640104055405,
-0.14124470949172974,
0.1322179138660431,
-0.10670407116413116,
0.047279536724090576,
0.16764762997627258,
-0.11178399622440338,
0.11694622039794922,
0.14339159429073334,
-0.10157553106546402,
0.30673906207084656,
0.17301374673843384,
-0.11238206177949905,
0.20166167616844177,
-0.4488432705402374,
-0.0035316944122314453,
0.020549211651086807,
0.4859694242477417,
-0.34062010049819946,
-0.4327462315559387,
-0.10433885455131531,
0.2907516658306122,
-0.2095295488834381,
-0.015782274305820465,
0.25180384516716003,
-0.16984540224075317,
0.16623766720294952,
-0.126663938164711,
-0.09143321216106415,
-0.19778679311275482,
0.27985289692878723,
-0.37080061435699463,
0.25993475317955017,
-0.05765480548143387,
0.03487366437911987,
-0.06224597617983818,
-0.1709011197090149,
0.5021548867225647,
-0.04920611530542374,
0.19536982476711273,
0.1710646152496338,
-0.17504747211933136,
0.047369085252285004,
0.3851121664047241,
0.05973966419696808,
-0.08776916563510895,
0.31775420904159546,
-0.0983797088265419,
0.03481747955083847,
-0.03712708503007889,
0.30872660875320435,
-0.016095876693725586,
0.03649095073342323,
-0.12249615043401718,
0.4629843533039093,
0.2699597179889679,
0.02348235808312893,
0.026690755039453506,
0.09532119333744049,
-0.15794603526592255,
-0.11409399658441544,
0.034290675073862076,
0.009816660545766354,
0.32551759481430054,
-0.09433913230895996,
-0.467536062002182,
-0.051856763660907745,
-0.19528287649154663,
0.11984753608703613,
0.17403768002986908,
0.21600472927093506,
-0.2721647620201111,
0.3422996997833252,
0.12810519337654114,
0.18161948025226593,
-0.1852758377790451,
-0.04623931273818016,
-0.23746556043624878,
0.15390679240226746,
-0.14500735700130463,
-0.13559120893478394,
0.13609106838703156,
-0.2294323593378067,
0.30341172218322754,
0.13893771171569824,
-0.11675304174423218,
-0.003984369337558746,
0.3704977333545685,
-0.18406911194324493,
-0.058401428163051605,
0.3080308437347412,
0.04985975846648216,
0.3170221149921417,
0.3064502477645874,
-0.21600539982318878,
-0.1106526181101799,
-0.03282589465379715,
-0.41354596614837646,
-0.2724292576313019,
-0.3094726502895355,
0.2973445653915405,
-0.2502285838127136,
-0.05080225318670273,
-0.2178674340248108,
-0.16115446388721466,
-0.009053409099578857,
-0.10636675357818604,
-0.28047385811805725,
-0.31523436307907104,
-0.05794394388794899,
-0.20004060864448547,
0.35799750685691833,
0.32271790504455566,
-0.27942556142807007,
-0.2638675570487976,
-0.20225203037261963,
0.0019280873239040375,
0.0018429011106491089,
0.28046348690986633,
-0.23707500100135803,
0.37401166558265686,
-0.2584768235683441,
-0.23636670410633087,
0.415568470954895,
-0.4688444435596466,
-0.274543821811676,
-0.056412868201732635,
-0.1510140597820282,
0.1341286450624466,
-0.14245757460594177,
-0.06888757646083832,
0.08464705944061279,
0.08455285429954529,
0.4006634056568146,
0.4482423663139343,
0.003321366384625435,
-0.008199766278266907,
-0.17874287068843842,
-0.15476791560649872,
0.24175500869750977,
0.03618339076638222,
0.23759040236473083,
0.07919062674045563,
-0.03789597004652023,
0.031297583132982254,
0.07475975155830383,
-0.00022912770509719849,
0.008019741624593735,
0.40289849042892456,
0.43958795070648193,
0.04681265726685524,
-0.1622423380613327,
-0.23580396175384521,
-0.34307533502578735,
0.25113075971603394,
0.33248215913772583,
0.059855829924345016,
-0.2718019485473633,
-0.00959240086376667,
-0.41476893424987793,
0.1223704144358635,
-0.09523659944534302,
-0.13963447511196136,
0.16803881525993347,
0.24425138533115387,
-0.02380438521504402,
0.18637894093990326,
-0.30578282475471497,
0.4410889148712158,
-0.04049370065331459,
0.15749721229076385,
-0.4303837716579437,
0.3454747200012207,
-0.2914995551109314,
-0.09599723666906357,
0.19979546964168549,
0.12956613302230835,
0.06380156427621841,
-0.1125827357172966,
-0.10558637976646423,
0.07958492636680603,
0.052455611526966095,
0.08396964520215988,
-0.02190259099006653,
0.1011112853884697,
0.062404267489910126,
-0.3221614360809326,
-0.045447610318660736,
0.22655577957630157,
0.31743958592414856,
-0.11582082509994507,
-0.10328621417284012,
0.14799366891384125,
0.16047953069210052,
0.02355329692363739,
0.253548800945282,
0.2179674506187439,
0.2853770852088928,
-0.048714637756347656,
-0.14558814465999603,
-0.2306056022644043,
0.41466614603996277,
0.005547570064663887,
0.2221650928258896,
-0.05781219154596329,
-0.15842923521995544,
0.04314613342285156,
0.3955138623714447,
0.10214056074619293,
0.03601086884737015,
0.14821432530879974,
-0.31642600893974304,
0.06181466579437256,
0.12994639575481415,
0.13672561943531036,
0.4446890354156494,
0.14244163036346436,
-0.07678219676017761,
0.2353537380695343,
-0.18954266607761383,
-0.14629431068897247,
0.17196246981620789,
0.19171911478042603,
-0.07836652547121048,
0.14936813712120056,
0.23899619281291962,
0.13906165957450867,
-0.1617218554019928,
-0.5220280885696411,
0.1154480054974556,
0.4746926724910736,
-0.505323588848114,
0.06584319472312927,
-0.46442911028862,
-0.0702584907412529,
-0.16649332642555237,
-0.1483643352985382,
0.06724126636981964,
-0.3208220303058624,
-0.27429789304733276,
0.5157068967819214,
-0.06785885244607925,
0.17135286331176758,
-0.26744115352630615,
0.08943067491054535,
0.05150759220123291,
-0.051521144807338715,
-0.00511951744556427,
-0.18175481259822845,
-0.03473431617021561,
0.07348112761974335,
0.290377676486969,
0.18275971710681915,
0.5052530169487,
-0.18077901005744934,
0.2141696661710739,
-0.04569148272275925,
-0.4314253628253937,
-0.059717826545238495,
0.16037997603416443,
0.34962597489356995,
0.13811536133289337,
0.2268129140138626,
-0.1385030299425125,
-0.2944590151309967,
0.2882464528083801,
-0.10828235000371933,
-0.20147083699703217,
0.17753182351589203,
-0.04552186280488968,
-0.2853735089302063,
-0.07560284435749054,
-0.25596722960472107,
-0.45685914158821106,
-0.533658504486084,
-0.09360800683498383,
0.2604706585407257,
0.12777142226696014,
0.33321213722229004,
0.02592919021844864,
0.23161765933036804,
0.14519350230693817,
0.15808571875095367,
-0.03655217960476875,
-0.2056892216205597,
0.48262491822242737,
-0.3134560286998749,
-0.4168644845485687,
-0.042009126394987106,
-0.2850343585014343,
0.25918450951576233,
0.21197770535945892,
-0.5002511143684387,
-0.06413882970809937,
-0.19833171367645264,
0.2561534643173218,
-0.16154545545578003,
0.16255740821361542,
0.2069082260131836,
0.1560354381799698,
-0.04785563051700592,
-0.07198479026556015,
-0.18310312926769257,
-0.3673669993877411,
0.06571723520755768,
0.07190120220184326,
-0.22198879718780518,
0.3527865409851074,
0.05580490455031395,
0.611434817314148,
0.10525256395339966,
-0.03225081041455269,
0.21265196800231934,
-0.009991167113184929,
0.2582743167877197,
-0.09663219004869461,
-0.6281751990318298,
0.04671875014901161,
-0.11047717928886414,
0.05618268996477127,
-0.06831289827823639,
-0.15265682339668274,
-0.10594486445188522,
-0.200847789645195,
0.2735740542411804,
-0.2572714388370514,
-0.15161022543907166,
0.07533221691846848,
-0.08419887721538544,
0.21566534042358398,
0.06155836209654808,
-0.0985318124294281,
-0.2714383602142334,
-0.06562946736812592,
0.012258538976311684,
0.14188653230667114,
-0.1555662453174591,
0.10347547382116318,
-0.5286014080047607,
-0.21280261874198914,
-0.07959242910146713,
0.16694170236587524,
-0.005309909116476774,
0.46134287118911743,
0.037483591586351395,
0.005800675600767136,
-0.005379416048526764,
-0.08806923031806946,
0.36848175525665283,
-0.043707579374313354,
-0.14674575626850128,
0.344928503036499,
-0.1100088432431221,
-0.8670599460601807,
-0.02393522299826145,
-0.2906341552734375,
0.08364220708608627,
0.3337988555431366,
0.18968139588832855,
-0.13833926618099213,
0.06743545085191727,
-0.0217907652258873,
0.3680764436721802,
-0.10852319002151489,
0.08532058447599411,
-0.16949094831943512,
-0.5002074241638184,
-0.5236356258392334,
-0.08513271063566208,
0.07480473816394806,
0.1865348368883133,
0.11112454533576965,
0.06512528657913208,
-0.34133297204971313,
-0.1500426083803177,
0.08254848420619965,
0.23574839532375336,
0.06223934888839722,
0.04769572988152504,
0.35144567489624023,
-0.02985125035047531,
-0.04984389990568161,
0.37742364406585693,
0.6002733111381531,
-0.04873800650238991,
-0.33254188299179077,
-0.04554490000009537,
0.03771250322461128,
0.14669060707092285,
0.032381102442741394,
-0.051210980862379074,
0.13214680552482605,
-0.19093866646289825,
0.10874062776565552,
-0.11094324290752411,
0.3155507445335388,
0.15925417840480804,
0.04922736808657646,
-0.1740751564502716,
-0.3244180381298065,
0.17802375555038452,
0.11078023910522461,
0.026807978749275208,
0.5816492438316345,
0.06685882061719894,
-0.1456654667854309,
0.26930975914001465,
-0.13134130835533142,
0.6396872401237488,
0.41636794805526733,
-0.041689325124025345,
0.409453421831131,
-0.006434325128793716,
0.5233031511306763,
0.01741006225347519,
0.07596521079540253,
-0.2951543629169464,
-0.07219813019037247,
-0.0018319860100746155,
-0.3078939616680145,
0.25279390811920166,
-0.227172389626503,
-0.12476417422294617,
0.14523114264011383,
-0.1624913215637207,
0.10594981908798218,
0.1111447736620903,
0.3241651952266693,
0.04375636577606201,
-0.1731252372264862,
-0.18055403232574463,
0.19401930272579193,
-0.27307671308517456,
0.4175560772418976,
-0.03635178506374359,
0.12170211225748062,
-0.15814796090126038,
-0.19069147109985352,
-0.21074871718883514,
0.09602683782577515,
-0.1865159273147583,
0.5763900279998779,
0.18128438293933868,
-0.2087288498878479,
0.20751257240772247,
0.032516688108444214,
0.26882225275039673,
0.06124786287546158,
-0.12569953501224518,
0.08262547105550766,
-0.11682815104722977,
0.03334607556462288,
0.1364908218383789,
-0.0181565061211586,
0.4995169937610626,
-0.19626101851463318,
-0.14696714282035828,
0.28618526458740234,
0.005306619219481945,
0.0009025111794471741,
0.18051698803901672,
0.1021626815199852,
0.18323606252670288,
-0.17877928912639618,
-0.29135453701019287,
-0.010673336684703827,
0.16432198882102966,
-0.25539880990982056,
0.17204201221466064,
0.17631810903549194,
-0.23437711596488953,
0.5269705653190613,
-0.029082302004098892,
-0.09364929795265198,
-0.060429465025663376,
0.5038352012634277,
-0.12545451521873474,
-0.03391125425696373,
0.4253857731819153,
0.0037509314715862274,
-0.2274894118309021,
-0.16190573573112488,
0.20951497554779053,
-0.13695178925991058,
-0.3716197609901428,
0.1167784258723259,
0.005292536690831184,
0.024826616048812866,
-0.07031262665987015,
-0.023679379373788834,
0.1923745572566986,
0.1282559484243393,
-0.06201885640621185,
-0.6253932118415833,
-0.26388922333717346,
0.08244694769382477,
0.03345869481563568,
-0.07375931739807129,
-0.11779023706912994,
0.31485962867736816,
-0.011782770045101643,
0.12440767139196396,
-0.35474246740341187,
0.08306482434272766,
-0.2320188730955124,
0.2166161835193634,
0.07319886982440948,
-0.06891593337059021,
-0.10622483491897583,
-0.12841203808784485,
0.14706727862358093,
0.03703876584768295,
-0.16490581631660461,
-0.3014600872993469,
-0.25970426201820374,
0.1031353771686554,
0.14760303497314453,
-0.22768773138523102,
0.2594794034957886,
-0.11892672628164291,
0.012519310228526592,
-0.06634648144245148,
-0.11096538603305817,
0.29668182134628296,
-0.02761741727590561,
0.17873942852020264,
-0.16106542944908142,
-0.06564947217702866,
-0.08800286799669266,
0.12807124853134155,
-0.00005755573511123657,
-0.001478038728237152,
-0.06090327724814415,
0.1955324113368988,
0.11855591833591461,
0.09117679297924042,
-0.277160108089447,
-0.09280212968587875,
-0.26703035831451416,
0.06472338736057281,
0.35794854164123535,
-0.3996219038963318,
0.14770567417144775,
-0.022943176329135895,
-0.04536120593547821,
0.4884302318096161,
-0.37118208408355713,
0.14837190508842468,
0.3930785059928894,
0.2435016632080078,
-0.31499823927879333,
-0.06241559237241745,
0.22849883139133453,
0.097301185131073,
0.08298750221729279,
-0.005590938031673431,
-0.0021320804953575134,
-0.19477790594100952,
0.15731102228164673,
0.06335386633872986,
0.4350648522377014,
-0.15986138582229614,
0.3405029773712158,
0.26539990305900574,
-0.1725967824459076,
0.022402897477149963,
-0.029339177533984184,
0.22543099522590637,
0.17512136697769165,
0.5000418424606323,
-0.03605865687131882,
-0.05577348917722702,
-0.14869236946105957,
-0.12648829817771912,
0.12357380986213684,
-0.29200032353401184,
0.015109999105334282,
-0.031938910484313965,
0.03979174792766571,
0.019949734210968018,
-0.04772995412349701,
-0.03838489204645157,
-0.0886523574590683,
-0.2141147404909134,
0.044655635952949524,
0.2365419566631317,
-0.03287782520055771,
0.11796383559703827,
-0.3622157573699951,
0.06917291134595871,
-0.17932943999767303,
0.029768098145723343,
0.0602436400949955,
-0.21631012856960297,
0.06676638871431351,
0.24104231595993042,
-0.40368497371673584,
-0.605308473110199,
-0.14872398972511292,
0.22543862462043762,
0.07570528984069824,
-0.2549225091934204,
0.11821136623620987,
0.2799668312072754,
-0.12545841932296753,
-0.35019734501838684,
0.3104458153247833,
0.6052207946777344,
0.29724493622779846,
-0.0005661621689796448,
0.1796358823776245,
0.03348599001765251,
-0.2270834594964981,
-0.10745004564523697,
0.1809825450181961,
-0.0741259753704071,
0.084261953830719,
0.29734763503074646,
0.19002096354961395,
-0.2886580228805542,
0.12471053004264832,
0.044984713196754456,
0.0026340708136558533,
-0.3253538906574249,
0.39419832825660706,
-0.15580691397190094,
-0.1277221143245697,
-0.04201560467481613,
-0.012866877019405365,
-0.39773792028427124,
0.1289706826210022,
0.7170612812042236,
-0.0026647867634892464,
0.08312481641769409,
-0.20665700733661652,
0.09984167665243149,
-0.08658689260482788,
0.36910775303840637,
0.3679363429546356,
0.32648536562919617,
-0.2348644733428955,
-0.15994107723236084,
-0.6859852075576782,
0.12717793881893158,
-0.16880929470062256,
-0.1009160652756691,
0.059098824858665466,
0.13929417729377747,
-0.043289490044116974,
0.2713605761528015,
-0.1936178356409073,
0.1643591970205307,
-0.0856282114982605,
0.06807899475097656,
-0.434000700712204,
-0.27802014350891113,
-0.09781701862812042,
0.020456034690141678,
0.05387679487466812,
-0.39736562967300415,
0.08212152123451233,
-0.40998682379722595,
0.14358490705490112,
-0.1831357181072235,
-0.17931237816810608,
0.012505736202001572,
0.12302935868501663,
0.22397243976593018,
0.13991379737854004,
0.6028478145599365,
-0.08384809643030167,
0.11336997896432877,
-0.19214338064193726,
-0.4339522123336792,
-0.17891539633274078,
0.44748005270957947,
0.23736941814422607,
0.5612441301345825,
-0.1406320482492447,
-0.2952290177345276,
-0.2654533386230469,
0.26909390091896057,
0.10592268407344818,
-0.10158935189247131,
-0.11553926765918732,
0.35036101937294006,
-0.09681183099746704,
0.2226482331752777,
0.11840185523033142,
0.18177151679992676,
-0.13409429788589478,
0.251631498336792,
-0.28862065076828003,
-0.608522355556488,
0.59804368019104,
-0.34040138125419617,
-0.29492896795272827,
-0.09664614498615265,
0.3278684616088867,
0.07860957831144333,
-0.17334257066249847,
-0.3546924889087677,
0.07545686513185501,
0.38273584842681885,
-0.22352707386016846,
-0.32733771204948425,
0.42725253105163574,
0.07845483720302582,
0.16851922869682312,
-0.07755014300346375,
0.4521098732948303,
-0.01949498802423477,
-0.28134074807167053,
0.3119499385356903,
0.02625519037246704
] |
https://github.com/huggingface/datasets/issues/4900 | Dataset Viewer issue for asaxena1990/Dummy_dataset | Seems to be linked to the use of the undocumented `_resolve_features` method in the dataset viewer backend:
```
>>> from datasets import load_dataset
>>> dataset = load_dataset("asaxena1990/Dummy_dataset", name="asaxena1990--Dummy_dataset", split="train", streaming=True)
Using custom data configuration asaxena1990--Dummy_dataset-4a704ed7e5627563
>>> dataset._resolve_features()
Failed to read file 'https://huggingface.co/datasets/asaxena1990/Dummy_dataset/resolve/06885879a8bdd767d2d27695484fc6c83244617a/dummy_dataset_train.json' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column() changed from object to array in row 0
Traceback (most recent call last):
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 109, in _generate_tables
pa_table = paj.read_json(
File "pyarrow/_json.pyx", line 246, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: JSON parse error: Column() changed from object to array in row 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1261, in _resolve_features
features = _infer_features_from_batch(self._head())
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 686, in _head
return _examples_to_batch([x for key, x in islice(self._iter(), n)])
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 686, in <listcomp>
return _examples_to_batch([x for key, x in islice(self._iter(), n)])
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 708, in _iter
yield from ex_iterable
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 112, in __iter__
yield from self.generate_examples_fn(**self.kwargs)
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 651, in wrapper
for key, table in generate_tables_fn(**kwargs):
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 137, in _generate_tables
f"This JSON file contain the following fields: {str(list(dataset.keys()))}. "
AttributeError: 'list' object has no attribute 'keys'
```
Pinging @huggingface/datasets | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 214 | Dataset Viewer issue for asaxena1990/Dummy_dataset
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Seems to be linked to the use of the undocumented `_resolve_features` method in the dataset viewer backend:
```
>>> from datasets import load_dataset
>>> dataset = load_dataset("asaxena1990/Dummy_dataset", name="asaxena1990--Dummy_dataset", split="train", streaming=True)
Using custom data configuration asaxena1990--Dummy_dataset-4a704ed7e5627563
>>> dataset._resolve_features()
Failed to read file 'https://huggingface.co/datasets/asaxena1990/Dummy_dataset/resolve/06885879a8bdd767d2d27695484fc6c83244617a/dummy_dataset_train.json' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Column() changed from object to array in row 0
Traceback (most recent call last):
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 109, in _generate_tables
pa_table = paj.read_json(
File "pyarrow/_json.pyx", line 246, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: JSON parse error: Column() changed from object to array in row 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1261, in _resolve_features
features = _infer_features_from_batch(self._head())
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 686, in _head
return _examples_to_batch([x for key, x in islice(self._iter(), n)])
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 686, in <listcomp>
return _examples_to_batch([x for key, x in islice(self._iter(), n)])
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 708, in _iter
yield from ex_iterable
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 112, in __iter__
yield from self.generate_examples_fn(**self.kwargs)
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 651, in wrapper
for key, table in generate_tables_fn(**kwargs):
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 137, in _generate_tables
f"This JSON file contain the following fields: {str(list(dataset.keys()))}. "
AttributeError: 'list' object has no attribute 'keys'
```
Pinging @huggingface/datasets | [
-0.20269231498241425,
0.26051169633865356,
-0.055382952094078064,
0.044126130640506744,
0.4276179075241089,
0.021940745413303375,
0.4294307231903076,
0.4869363605976105,
-0.11032232642173767,
0.08851145207881927,
0.030759239569306374,
0.7051367163658142,
0.06559456884860992,
0.2082926481962204,
-0.23999354243278503,
-0.136580228805542,
-0.14813363552093506,
0.18217448890209198,
0.22965677082538605,
0.10503090918064117,
-0.33339348435401917,
-0.04544936120510101,
-0.12137856334447861,
-0.013827614486217499,
-0.16606226563453674,
0.2543705105781555,
0.2504643201828003,
-0.2586953639984131,
-0.1379915475845337,
-0.6244266629219055,
0.26188355684280396,
-0.07121001183986664,
-0.09348085522651672,
0.22401173412799835,
-0.00011113694199593738,
0.25956517457962036,
0.48560506105422974,
0.10397642850875854,
-0.25324445962905884,
0.12231393158435822,
-0.29078149795532227,
-0.22817696630954742,
0.49860426783561707,
-0.290301114320755,
-0.13162434101104736,
-0.42786309123039246,
-0.000502297654747963,
-0.23158209025859833,
0.2949417233467102,
0.18993425369262695,
0.2607365846633911,
0.0938708707690239,
0.33774906396865845,
0.02367529273033142,
0.021206658333539963,
0.22036974132061005,
-0.25535252690315247,
0.2283642739057541,
-0.0033739283680915833,
0.19774185121059418,
-0.2849635183811188,
0.2229262888431549,
-0.0509546659886837,
0.2652086913585663,
0.22471734881401062,
-0.015036462806165218,
0.15147322416305542,
-0.16176335513591766,
0.17757198214530945,
0.004363659769296646,
0.6508789658546448,
-0.2253371775150299,
-0.356110543012619,
-0.2514818608760834,
0.17704887688159943,
-0.09442326426506042,
0.1476323902606964,
0.19049997627735138,
-0.06323374807834625,
0.08874286711215973,
-0.035819895565509796,
-0.11234834790229797,
-0.30563968420028687,
0.0315796434879303,
-0.5075100064277649,
0.015537284314632416,
-0.2285817414522171,
0.2038423717021942,
-0.04679674282670021,
-0.2108457237482071,
0.2547098398208618,
-0.029384315013885498,
0.03667460009455681,
-0.040505971759557724,
-0.44070953130722046,
-0.0053994618356227875,
0.2948075830936432,
-0.5372553467750549,
0.057267360389232635,
0.10517130047082901,
0.3165709972381592,
0.35027363896369934,
0.015023692511022091,
0.010449662804603577,
0.17641054093837738,
0.35216057300567627,
0.0975399762392044,
0.16568367183208466,
0.35098856687545776,
0.46195533871650696,
0.17154420912265778,
0.056524865329265594,
-0.08939313143491745,
-0.09687772393226624,
-0.1639808863401413,
-0.05535672605037689,
0.7450855374336243,
-0.32795166969299316,
-0.26135098934173584,
0.017604852095246315,
-0.18598955869674683,
-0.10307617485523224,
-0.08960975706577301,
0.27302226424217224,
0.02577267959713936,
0.41181039810180664,
0.020937960594892502,
0.06372377276420593,
-0.21779951453208923,
-0.13699568808078766,
-0.04479621350765228,
-0.24633528292179108,
-0.25934791564941406,
-0.18013112246990204,
0.36628958582878113,
-0.22925959527492523,
0.22873669862747192,
-0.07608841359615326,
-0.19595761597156525,
-0.009694632142782211,
0.113283172249794,
-0.13890060782432556,
-0.07344051450490952,
0.28618866205215454,
0.019518695771694183,
0.07923343777656555,
-0.11551696062088013,
-0.13762682676315308,
0.04742120951414108,
0.20145714282989502,
0.0015225857496261597,
-0.30331429839134216,
-0.06681260466575623,
0.19965608417987823,
-0.1679459661245346,
0.009449595585465431,
0.1525183767080307,
0.1618703454732895,
-0.02886166423559189,
-0.17313699424266815,
-0.03372690826654434,
-0.18406137824058533,
-0.13522756099700928,
-0.3388098478317261,
0.26916438341140747,
0.173772394657135,
-0.707841157913208,
0.1772061139345169,
-0.37507855892181396,
-0.3084864020347595,
-0.2474820911884308,
-0.010942284017801285,
-0.16403737664222717,
-0.09638635069131851,
-0.26024559140205383,
0.06786008179187775,
-0.029011033475399017,
-0.17877887189388275,
-0.6188063025474548,
0.09064795076847076,
-0.06911088526248932,
0.15490049123764038,
0.1183718740940094,
-0.029526645317673683,
0.2788318395614624,
0.01451157033443451,
0.013739868998527527,
0.22332172095775604,
0.0378657802939415,
-0.13227029144763947,
-0.17918288707733154,
-0.3046035170555115,
-0.12856420874595642,
0.18803295493125916,
0.1549517810344696,
-0.0884290263056755,
0.07695366442203522,
-0.47780856490135193,
0.18064047396183014,
-0.08431340754032135,
0.12515690922737122,
-0.04120884835720062,
0.12346667051315308,
-0.06256721913814545,
0.11712205410003662,
0.06506583839654922,
-0.5708516836166382,
0.11651953309774399,
0.04731017351150513,
-0.048275575041770935,
-0.43792641162872314,
-0.21099436283111572,
-0.3434874713420868,
0.17409922182559967,
-0.31681060791015625,
-0.03274550661444664,
0.1873425394296646,
0.22738461196422577,
-0.22178012132644653,
0.20219971239566803,
-0.18945258855819702,
0.030800610780715942,
0.08325577527284622,
0.08276601880788803,
-0.3153228163719177,
0.33798861503601074,
0.1079103946685791,
-0.25821059942245483,
0.10261143743991852,
0.095648854970932,
0.13474464416503906,
-0.21172258257865906,
-0.1173490360379219,
0.23971840739250183,
0.03417554497718811,
0.278994619846344,
-0.0848071500658989,
0.1106441393494606,
0.26608195900917053,
-0.6018763780593872,
0.2747815251350403,
0.30230551958084106,
0.24528712034225464,
-0.047971561551094055,
-0.2257905900478363,
0.27358636260032654,
0.1452697217464447,
0.24959701299667358,
0.13579168915748596,
0.15176042914390564,
0.3310873806476593,
-0.06092347204685211,
-0.022044271230697632,
-0.22000668942928314,
-0.021286312490701675,
0.14298850297927856,
0.0066735707223415375,
0.06263873726129532,
-0.38219648599624634,
0.3521403968334198,
0.4332355558872223,
-0.13146142661571503,
-0.0035483241081237793,
0.14038944244384766,
-0.41473445296287537,
-0.025019539520144463,
0.21000976860523224,
0.2162768393754959,
0.20206478238105774,
0.11437258124351501,
-0.12424840033054352,
0.34920012950897217,
-0.08940315246582031,
-0.05690271779894829,
0.17531615495681763,
0.18101003766059875,
0.02706361562013626,
0.4355567395687103,
0.17176969349384308,
-0.24367333948612213,
-0.32757705450057983,
-0.033514752984046936,
0.1885826140642166,
0.16879931092262268,
-0.43133363127708435,
-0.16561844944953918,
-0.3510085642337799,
-0.3321051597595215,
0.017307650297880173,
-0.22760801017284393,
0.13424152135849,
-0.41510194540023804,
-0.02221393957734108,
0.24452632665634155,
-0.2672710716724396,
0.13107258081436157,
-0.42022743821144104,
0.11299963295459747,
0.023087671026587486,
0.004470044746994972,
-0.12297340482473373,
-0.14152483642101288,
-0.17793506383895874,
0.1414649784564972,
0.24514849483966827,
0.08073955774307251,
0.17517206072807312,
-0.16328999400138855,
0.24104858934879303,
-0.3178015649318695,
-0.35156863927841187,
0.000814530998468399,
-0.09197565913200378,
0.39075371623039246,
0.15474247932434082,
0.06999140977859497,
0.1388828009366989,
-0.17239263653755188,
0.31225576996803284,
0.04999072849750519,
-0.044898297637701035,
0.16727204620838165,
0.024271540343761444,
0.05416315048933029,
-0.085574209690094,
-0.5569080710411072,
0.023018306121230125,
-0.5074456334114075,
0.126613050699234,
0.08526228368282318,
0.13332608342170715,
-0.0703088790178299,
0.32057034969329834,
0.43342339992523193,
-0.06303320080041885,
-0.18515479564666748,
-0.1718016117811203,
0.2091001272201538,
0.3985799252986908,
-0.12574873864650726,
-0.3240025043487549,
0.2428026795387268,
-0.27023184299468994,
0.27613791823387146,
0.06419733166694641,
-0.29272162914276123,
-0.09023980051279068,
-0.1486995667219162,
0.25029999017715454,
-0.12113405764102936,
-0.2805584669113159,
0.40667179226875305,
0.19889840483665466,
-0.1311446726322174,
-0.07610802352428436,
-0.461010605096817,
0.13244041800498962,
-0.03257797658443451,
-0.04960104078054428,
0.05714907497167587,
0.32724297046661377,
-0.06954997777938843,
0.5814726948738098,
-0.11512243747711182,
0.08148777484893799,
0.3628717064857483,
-0.0371842160820961,
0.14463350176811218,
0.047353506088256836,
-0.23075416684150696,
-0.08817057311534882,
-0.23923563957214355,
0.038101956248283386,
0.04916529729962349,
-0.039791401475667953,
-0.2771829664707184,
-0.1974506825208664,
-0.13173601031303406,
-0.2881571352481842,
-0.3921383023262024,
0.031241191551089287,
0.07061716914176941,
0.28864172101020813,
-0.01993325725197792,
0.21924084424972534,
-0.04367724806070328,
-0.005206807982176542,
0.01784772425889969,
0.12326760590076447,
0.09011491388082504,
-0.28407803177833557,
-0.5539752840995789,
-0.21813233196735382,
-0.20000413060188293,
0.46505892276763916,
-0.05276351422071457,
0.5144641995429993,
0.03251524642109871,
-0.1781495213508606,
0.18165308237075806,
-0.2176906019449234,
0.5070027709007263,
-0.012519294396042824,
-0.031071357429027557,
0.34103408455848694,
0.07009226083755493,
-0.495806485414505,
-0.16440977156162262,
0.013932116329669952,
0.08517144620418549,
-0.4750688672065735,
0.12203826010227203,
-0.26491299271583557,
-0.10770370811223984,
0.3697353005409241,
-0.1127278208732605,
-0.18918773531913757,
0.1344279646873474,
-0.08868318796157837,
-0.37614503502845764,
-0.2133072465658188,
-0.16190961003303528,
-0.27918505668640137,
-0.030446454882621765,
-0.10045310109853745,
-0.07456259429454803,
-0.3529309928417206,
-0.14207789301872253,
-0.1783083826303482,
0.35914063453674316,
0.26661399006843567,
-0.13086938858032227,
0.2767222821712494,
0.40741273760795593,
0.21624065935611725,
0.3099108040332794,
0.47776731848716736,
0.3239154517650604,
-0.5354694724082947,
0.13091354072093964,
-0.14151017367839813,
0.3084045350551605,
0.21383067965507507,
-0.21023158729076385,
-0.04901044815778732,
-0.03141789883375168,
-0.15931056439876556,
-0.23148824274539948,
0.025073345750570297,
0.5542049407958984,
0.027590062469244003,
-0.24486705660820007,
-0.35177385807037354,
0.5776176452636719,
-0.07494409382343292,
-0.1510123759508133,
0.11322110146284103,
0.17912006378173828,
-0.03241998702287674,
0.40090101957321167,
0.07576767355203629,
0.624401867389679,
0.11090390384197235,
-0.13755206763744354,
0.6800190210342407,
-0.31141555309295654,
0.19960370659828186,
-0.14675986766815186,
0.4176222085952759,
-0.28759005665779114,
-0.10875708609819412,
-0.0281479861587286,
-0.21288922429084778,
0.4656044840812683,
-0.1506204605102539,
-0.23107536137104034,
0.16777662932872772,
-0.19673144817352295,
-0.07912187278270721,
0.09571906924247742,
0.07607218623161316,
-0.044690780341625214,
0.08115485310554504,
-0.13152854144573212,
0.15838611125946045,
-0.26538121700286865,
-0.07252846658229828,
0.09384019672870636,
-0.1345687359571457,
-0.0870824009180069,
-0.06775487214326859,
0.01457030326128006,
0.19716650247573853,
-0.02944805659353733,
-0.19278444349765778,
-0.08115412294864655,
-0.09492051601409912,
0.23370695114135742,
-0.3325599431991577,
-0.4177752733230591,
-0.047740887850522995,
-0.1284659057855606,
0.19174712896347046,
-0.10518375784158707,
0.14459925889968872,
0.19758759438991547,
-0.03678426891565323,
0.23507839441299438,
-0.029299860820174217,
-0.3154904246330261,
0.2889884114265442,
-0.011359790340065956,
-0.055616594851017,
0.1652470827102661,
-0.1110362857580185,
0.32523006200790405,
-0.486023873090744,
-0.26280128955841064,
-0.12562252581119537,
-0.03499876335263252,
-0.0889265388250351,
0.1345568299293518,
-0.131708562374115,
-0.10002198815345764,
0.2896248996257782,
-0.054251331835985184,
-0.19725343585014343,
0.10033740103244781,
0.38459426164627075,
0.11148218810558319,
0.15852096676826477,
0.5985132455825806,
-0.03424781560897827,
-0.08457408100366592,
-0.1423908919095993,
-0.44971898198127747,
-0.036193616688251495,
-0.6226221323013306,
0.1809951812028885,
-0.21761605143547058,
-0.011093094944953918,
0.061824552714824677,
-0.08219510316848755,
-0.019504807889461517,
-0.15429872274398804,
-0.17478059232234955,
-0.49690917134284973,
-0.24294164776802063,
0.28845831751823425,
-0.06587575376033783,
0.1922444850206375,
-0.14197570085525513,
0.08151355385780334,
0.09422895312309265,
-0.1739891916513443,
-0.3197517991065979,
0.24632233381271362,
-0.08898971974849701,
0.09293924272060394,
-0.009888403117656708,
0.025051727890968323,
-0.013535788282752037,
-0.01017256174236536,
0.20023873448371887,
0.059287093579769135,
-0.340567946434021,
-0.23949062824249268,
0.013493612408638,
0.14855137467384338,
0.0921572893857956,
-0.3586646020412445,
0.004750743508338928,
-0.21807174384593964,
-0.1733265370130539,
0.22796303033828735,
0.0812072902917862,
-0.05109785124659538,
-0.15185649693012238,
0.06386442482471466,
-0.1638939082622528,
-0.07712530344724655,
0.022260960191488266,
0.2395075261592865,
0.07363385707139969,
0.17765504121780396,
0.15561360120773315,
0.26830071210861206,
-0.3165736198425293,
0.10304565727710724,
-0.22813592851161957,
-0.009653151035308838,
-0.16850794851779938,
-0.013602875173091888,
0.3604305684566498,
-0.29611337184906006,
0.0700206607580185,
-0.013662617653608322,
0.16657349467277527,
0.3810441493988037,
-0.2444666028022766,
-0.2151191234588623,
0.19162222743034363,
0.24145452678203583,
-0.4232529103755951,
-0.006072653457522392,
0.5219871401786804,
0.2341633141040802,
0.11821919679641724,
-0.21534517407417297,
0.3750876486301422,
0.05434735119342804,
0.11713709682226181,
0.21230396628379822,
0.03593667224049568,
0.263248085975647,
0.2391616404056549,
0.8136094212532043,
-0.171216681599617,
0.001283399760723114,
0.3429759740829468,
0.13337558507919312,
0.25686168670654297,
0.40309667587280273,
-0.23200979828834534,
0.09937926381826401,
0.06399643421173096,
0.26050394773483276,
0.1198815107345581,
-0.3605019152164459,
0.06464150547981262,
0.14202378690242767,
-0.22087445855140686,
0.14742501080036163,
0.1791684776544571,
0.30721306800842285,
0.13975243270397186,
-0.09531384706497192,
-0.21507811546325684,
0.2548658549785614,
-0.18841838836669922,
0.09250161051750183,
-0.004601180553436279,
-0.3548295795917511,
-0.1797316074371338,
0.08733674883842468,
-0.14089176058769226,
-0.0727970153093338,
0.28485262393951416,
-0.013768024742603302,
-0.3508780002593994,
-0.38541916012763977,
0.5686317682266235,
-0.02089541032910347,
0.3739774525165558,
0.08515793085098267,
0.13569657504558563,
0.3107920289039612,
0.0513269267976284,
0.14915727078914642,
0.6497225165367126,
0.13104039430618286,
0.1510581374168396,
-0.11677016317844391,
-0.07636669278144836,
-0.07098421454429626,
-0.0016402099281549454,
0.0011744406074285507,
0.1792362779378891,
0.21854791045188904,
-0.08527468144893646,
0.2044253796339035,
0.1868712455034256,
-0.16735978424549103,
0.18057186901569366,
-0.07601965963840485,
0.24042542278766632,
-0.35360589623451233,
0.30654266476631165,
-0.19191031157970428,
-0.2087579369544983,
0.10524711012840271,
-0.3130495846271515,
-0.2455640435218811,
-0.010238719172775745,
0.6330641508102417,
0.028197526931762695,
-0.049427974969148636,
-0.2695745527744293,
0.08033555001020432,
-0.20989809930324554,
0.35849475860595703,
0.1380174309015274,
-0.00003436952829360962,
-0.09076213091611862,
-0.01277131587266922,
-0.6651982069015503,
0.24539420008659363,
0.26069390773773193,
-0.08374692499637604,
0.42547929286956787,
0.1248013973236084,
-0.03511679917573929,
0.20889510214328766,
0.25228437781333923,
0.08503851294517517,
0.2198820561170578,
0.33702176809310913,
-0.2863611578941345,
0.05347706004977226,
0.06791587173938751,
-0.10592827200889587,
-0.13844026625156403,
-0.46237805485725403,
0.27056434750556946,
-0.06783849000930786,
0.028404392302036285,
0.010403461754322052,
-0.10016635805368423,
0.17167223989963531,
-0.005154512822628021,
0.5587440729141235,
0.11244042962789536,
0.24996499717235565,
0.21687215566635132,
0.021343758329749107,
-0.2606987953186035,
-0.08323448151350021,
-0.1404016613960266,
0.23031562566757202,
0.2790933847427368,
0.4403429627418518,
0.025983484461903572,
0.4453689157962799,
-0.14319907128810883,
0.06340114027261734,
-0.0017111897468566895,
-0.006484498269855976,
-0.30544763803482056,
0.2517906129360199,
-0.23541831970214844,
0.014972039498388767,
0.08105707168579102,
0.17174863815307617,
0.16668188571929932,
0.1334025263786316,
-0.33443039655685425,
-0.26315948367118835,
0.35305729508399963,
-0.2672788202762604,
-0.2867656648159027,
0.2849178612232208,
0.15556871891021729,
0.06365452706813812,
-0.16818203032016754,
-0.42543986439704895,
-0.02217646688222885,
0.435636043548584,
-0.19669070839881897,
0.1942932903766632,
0.168723464012146,
-0.20253081619739532,
-0.10525593906641006,
-0.21713201701641083,
0.32652002573013306,
0.07883808016777039,
-0.0304636862128973,
-0.1309928297996521,
-0.12366864830255508
] |
https://github.com/huggingface/datasets/issues/4900 | Dataset Viewer issue for asaxena1990/Dummy_dataset | Hi ! JSON files containing a list of object are not supported yet, you can use JSON Lines files instead in the meantime
```json
{"text": "can I know this?", "intent": "Know", "type": "Test"}
{"text": "can I know this?", "intent": "Know", "type": "Test"}
...
``` | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 44 | Dataset Viewer issue for asaxena1990/Dummy_dataset
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Hi ! JSON files containing a list of object are not supported yet, you can use JSON Lines files instead in the meantime
```json
{"text": "can I know this?", "intent": "Know", "type": "Test"}
{"text": "can I know this?", "intent": "Know", "type": "Test"}
...
``` | [
-0.3857173025608063,
0.09111353754997253,
-0.12313087284564972,
0.23911698162555695,
0.2645220160484314,
0.02568017691373825,
0.29560837149620056,
0.4872158467769623,
0.34922051429748535,
0.20957031846046448,
-0.20694251358509064,
0.3939044177532196,
-0.019562408328056335,
0.2151203751564026,
-0.11786027252674103,
-0.004140622913837433,
-0.14477747678756714,
0.30644819140434265,
0.12650153040885925,
-0.010403964668512344,
-0.21258796751499176,
0.017669618129730225,
0.09592755138874054,
0.0409819521009922,
0.051337357610464096,
0.05026417225599289,
0.037160009145736694,
-0.17682024836540222,
-0.32845842838287354,
-0.4267411530017853,
-0.04500965029001236,
0.12042236328125,
0.18369539082050323,
0.29812347888946533,
-0.00009910731751006097,
0.11708901822566986,
0.19678112864494324,
-0.035098351538181305,
-0.40538614988327026,
-0.09847673773765564,
-0.5164466500282288,
-0.11223349720239639,
0.3213316798210144,
-0.22280076146125793,
-0.2773364782333374,
-0.30979058146476746,
0.1548263430595398,
-0.38629162311553955,
0.4225319027900696,
0.3184412717819214,
0.3048975467681885,
-0.005777173675596714,
0.24420742690563202,
-0.21217186748981476,
0.19151799380779266,
0.202922523021698,
-0.22351980209350586,
-0.12542277574539185,
0.1511637270450592,
0.47350794076919556,
-0.11692256480455399,
0.2707918584346771,
0.004564037546515465,
0.21883463859558105,
0.16334593296051025,
-0.1290379762649536,
0.11504125595092773,
-0.13613256812095642,
0.4457041323184967,
0.21392899751663208,
0.860683262348175,
-0.15324950218200684,
-0.20491398870944977,
-0.04273880273103714,
-0.0028656884096562862,
-0.11791050434112549,
-0.02131713181734085,
0.15117402374744415,
-0.14742767810821533,
0.21370668709278107,
-0.02206326648592949,
-0.23297865688800812,
-0.2426544427871704,
0.10491257160902023,
-0.1271737813949585,
0.13449206948280334,
-0.30276450514793396,
0.10043598711490631,
0.011387147009372711,
-0.3299674391746521,
0.33533844351768494,
-0.20012035965919495,
-0.20604196190834045,
-0.08310326933860779,
-0.1909583956003189,
-0.20023584365844727,
0.23371705412864685,
-0.3026057481765747,
0.1182391569018364,
0.09867755323648453,
0.40603557229042053,
0.310283362865448,
-0.03615265339612961,
0.12568256258964539,
0.27827343344688416,
0.2517834007740021,
0.43634578585624695,
0.05202959105372429,
0.24922871589660645,
0.35127028822898865,
0.057630930095911026,
-0.0982365682721138,
-0.3465935289859772,
0.13446950912475586,
-0.3217374384403229,
0.00014227069914340973,
0.44094038009643555,
-0.317414790391922,
-0.353947252035141,
-0.021247457712888718,
-0.08304676413536072,
-0.09806260466575623,
-0.08543387800455093,
0.46806713938713074,
-0.001026167650707066,
0.16450628638267517,
0.0717422142624855,
0.12410719692707062,
0.028068432584404945,
-0.4121341407299042,
-0.09238152951002121,
-0.16139426827430725,
0.007334206253290176,
-0.13566310703754425,
0.2579393684864044,
-0.04357292875647545,
0.40874382853507996,
-0.4207979738712311,
-0.11440004408359528,
-0.1662169247865677,
0.2511415481567383,
-0.15232540667057037,
0.03895081952214241,
0.25368180871009827,
0.23961931467056274,
-0.2194778472185135,
0.13170281052589417,
-0.36030077934265137,
-0.013575427234172821,
0.19218572974205017,
-0.05513615161180496,
0.08272254467010498,
-0.1340714991092682,
0.3123336732387543,
-0.046695277094841,
-0.03289917856454849,
0.05772148817777634,
0.33244431018829346,
-0.1897362470626831,
-0.07575578987598419,
-0.14110994338989258,
0.27102574706077576,
-0.22151948511600494,
-0.2435823380947113,
-0.024479728192090988,
0.21639397740364075,
-0.5436583161354065,
0.048294588923454285,
-0.372955322265625,
-0.291155070066452,
-0.38504284620285034,
-0.0920441597700119,
-0.13956955075263977,
0.1498730182647705,
-0.18009613454341888,
0.11141206324100494,
0.03232068568468094,
-0.3125160336494446,
-0.17457155883312225,
0.28068920969963074,
-0.1482940912246704,
-0.16030970215797424,
0.16126638650894165,
0.05179700255393982,
0.4176388680934906,
-0.07051003724336624,
-0.05315878987312317,
0.09339987486600876,
0.13538342714309692,
-0.01783980242908001,
0.025010455399751663,
-0.35692211985588074,
-0.219808891415596,
0.20124180614948273,
-0.010121025145053864,
0.07186530530452728,
0.23055440187454224,
-0.17724750936031342,
0.3062872588634491,
-0.18961073458194733,
-0.03453981131315231,
-0.014283478260040283,
0.2597358226776123,
-0.2219703048467636,
0.05123807489871979,
0.0459720715880394,
-0.6033288240432739,
-0.03232648968696594,
-0.10183048248291016,
-0.08908906579017639,
-0.1400921791791916,
-0.26452428102493286,
-0.11566904932260513,
0.1671854853630066,
-0.14754989743232727,
-0.071896493434906,
0.33862993121147156,
0.3768470287322998,
-0.3345177471637726,
0.06130396947264671,
-0.01571173593401909,
-0.09850751608610153,
0.17192699015140533,
0.00424612732604146,
-0.1348148137331009,
0.0865807756781578,
-0.019037051126360893,
0.14619986712932587,
0.3123740255832672,
-0.05673398822546005,
0.1774313896894455,
-0.15477384626865387,
-0.062017567455768585,
0.18016082048416138,
0.27450889348983765,
0.060218844562768936,
0.1540229171514511,
-0.06991930305957794,
0.06653236597776413,
-0.32876700162887573,
0.29585233330726624,
0.3488744795322418,
0.216666579246521,
-0.2546510398387909,
-0.5996379256248474,
0.2700088918209076,
0.26148706674575806,
0.11767031252384186,
0.1677120327949524,
0.19514374434947968,
0.41040486097335815,
-0.1761356145143509,
0.005650784820318222,
-0.2192555069923401,
-0.11520619690418243,
0.17513880133628845,
-0.15228258073329926,
-0.011140568181872368,
-0.3687131404876709,
0.16927260160446167,
0.4521936774253845,
0.06835809350013733,
0.1644732654094696,
0.05963772162795067,
-0.2798299789428711,
-0.08601255714893341,
0.1909850388765335,
0.25870048999786377,
0.2006145566701889,
0.3325898051261902,
-0.11503593623638153,
0.02082117833197117,
0.29135245084762573,
-0.10708799213171005,
0.13459044694900513,
0.03289984539151192,
0.13524597883224487,
0.20820611715316772,
0.08269427716732025,
-0.33437737822532654,
-0.2737993001937866,
-0.17835134267807007,
0.09525007009506226,
0.18955425918102264,
-0.20534422993659973,
-0.22958815097808838,
-0.1407882273197174,
-0.49594587087631226,
0.133999302983284,
0.15370863676071167,
0.20209839940071106,
-0.26711419224739075,
0.1411152482032776,
0.2004665732383728,
-0.2156955599784851,
0.13124686479568481,
-0.3040023744106293,
0.4160838723182678,
0.08718511462211609,
0.08936753123998642,
-0.07606931775808334,
-0.051121488213539124,
-0.09560180455446243,
0.24704676866531372,
0.422146737575531,
0.09513437002897263,
0.17000548541545868,
-0.08748729526996613,
0.359774112701416,
-0.35952258110046387,
-0.20333552360534668,
0.12335827201604843,
0.0930410772562027,
0.12066911160945892,
0.02893630415201187,
0.1470271348953247,
-0.09330733865499496,
-0.15421997010707855,
0.07765913009643555,
-0.0015654545277357101,
-0.2182188630104065,
-0.009815983474254608,
0.1560784876346588,
-0.24894531071186066,
-0.1265897899866104,
-0.480861097574234,
0.04250739887356758,
-0.34090307354927063,
0.23694555461406708,
0.373357892036438,
0.27003443241119385,
0.0607326440513134,
0.32008543610572815,
0.3390248715877533,
0.012727449648082256,
-0.2786563038825989,
-0.17635706067085266,
-0.10159696638584137,
0.11085173487663269,
-0.3043416738510132,
-0.4795283377170563,
0.422344833612442,
-0.05764703080058098,
0.23605084419250488,
-0.15833936631679535,
-0.2156212031841278,
-0.013656972907483578,
-0.058280766010284424,
-0.0766788050532341,
0.014491692185401917,
-0.39487144351005554,
0.27834099531173706,
0.1261499673128128,
-0.24087391793727875,
-0.3624058663845062,
-0.44631317257881165,
0.3798266053199768,
-0.2455253005027771,
0.04156968742609024,
-0.032924577593803406,
0.19319674372673035,
0.03707009181380272,
0.33527231216430664,
0.03499339520931244,
-0.05290086194872856,
0.23065420985221863,
-0.004929577931761742,
0.3493584394454956,
0.04766698554158211,
-0.11702731251716614,
0.02843729965388775,
-0.09511518478393555,
-0.17999812960624695,
0.33261117339134216,
0.08907933533191681,
-0.23807118833065033,
-0.32294762134552,
0.0697682648897171,
-0.21770456433296204,
-0.12299248576164246,
-0.06759005039930344,
0.21796777844429016,
-0.07513061910867691,
0.12233299016952515,
0.19009920954704285,
-0.08855551481246948,
-0.07963646948337555,
-0.07377097010612488,
0.07555466890335083,
0.0016904324293136597,
-0.18572980165481567,
-0.5545234084129333,
0.11146954447031021,
-0.13442853093147278,
0.5483666658401489,
-0.18571989238262177,
0.2735494077205658,
-0.11152607202529907,
0.14194554090499878,
0.0865788608789444,
-0.1080881804227829,
0.23322853446006775,
-0.23614437878131866,
0.07417380809783936,
0.2047540545463562,
0.17349755764007568,
-0.10744690895080566,
0.24168892204761505,
-0.12377068400382996,
0.1658887416124344,
-0.29270029067993164,
0.15679073333740234,
-0.2300725281238556,
-0.19285881519317627,
0.2192542999982834,
-0.12483799457550049,
-0.21490035951137543,
0.02566499635577202,
0.07833908498287201,
-0.1669858992099762,
-0.30113038420677185,
-0.22812211513519287,
-0.12564966082572937,
-0.06918632239103317,
-0.06998434662818909,
-0.053702324628829956,
-0.2766411006450653,
0.011408910155296326,
-0.12824633717536926,
0.1828327476978302,
0.3392829895019531,
0.10419721156358719,
0.12127989530563354,
0.44591912627220154,
0.365332692861557,
0.3332834839820862,
0.4851490259170532,
0.03509934991598129,
-0.4680511951446533,
0.17176547646522522,
-0.3511312007904053,
0.09460023790597916,
0.2559911012649536,
-0.12056054174900055,
0.042119983583688736,
0.09690157324075699,
-0.05189238488674164,
0.10117398947477341,
0.04170332849025726,
0.2830108106136322,
0.02554893121123314,
-0.24486182630062103,
-0.36930373311042786,
0.3969757556915283,
-0.1682729721069336,
-0.16368913650512695,
0.08043041080236435,
-0.1796387881040573,
-0.22483332455158234,
0.3277592062950134,
0.11624249815940857,
0.6023443937301636,
0.025468360632658005,
-0.04293414577841759,
0.36843442916870117,
-0.46272891759872437,
0.17988289892673492,
-0.2533223330974579,
0.18460248410701752,
-0.23265355825424194,
-0.018758408725261688,
-0.09824579209089279,
-0.062070876359939575,
0.2711428999900818,
0.2644502520561218,
-0.4009090065956116,
-0.01825009472668171,
-0.07735022157430649,
-0.0366298072040081,
0.0931960865855217,
0.4150209426879883,
-0.03957463800907135,
-0.044873129576444626,
0.1430179625749588,
0.31032106280326843,
-0.2775324583053589,
-0.11221787333488464,
0.07534172385931015,
-0.45261162519454956,
0.012206938117742538,
-0.16087087988853455,
-0.1891205608844757,
0.20683756470680237,
-0.0841289535164833,
-0.13210491836071014,
-0.26324960589408875,
0.022855639457702637,
0.19236347079277039,
0.02771921083331108,
-0.1539396494626999,
0.2112523764371872,
-0.3503265082836151,
0.1557091325521469,
-0.32894960045814514,
0.12487339228391647,
-0.21303097903728485,
-0.09009018540382385,
0.24409987032413483,
-0.11923247575759888,
-0.12965907156467438,
0.19281986355781555,
0.05079393461346626,
-0.21376989781856537,
0.11758789420127869,
-0.022337406873703003,
0.15522804856300354,
-0.28614407777786255,
-0.2803497910499573,
-0.12768828868865967,
-0.3966425955295563,
-0.14998005330562592,
0.20828421413898468,
0.02070331573486328,
-0.1717015951871872,
-0.04027221351861954,
0.4181673526763916,
-0.17267227172851562,
0.10149535536766052,
0.29105016589164734,
0.09978942573070526,
-0.13090410828590393,
0.5691629648208618,
0.14534848928451538,
-0.1546008437871933,
-0.4108315706253052,
0.0015422999858856201,
0.19413302838802338,
-0.3377615511417389,
0.18574760854244232,
-0.13353870809078217,
-0.003628551959991455,
0.032462816685438156,
0.11433130502700806,
-0.12308000028133392,
0.029520325362682343,
-0.004039682447910309,
-0.4903043806552887,
-0.2582196891307831,
0.1080264300107956,
-0.3148982524871826,
0.2574390769004822,
-0.23770296573638916,
-0.1946321576833725,
0.26754286885261536,
-0.11076128482818604,
-0.4524786174297333,
0.2180897444486618,
-0.21290245652198792,
-0.07031279802322388,
-0.16039395332336426,
0.12868893146514893,
0.026082273572683334,
-0.050300758332014084,
0.17248111963272095,
-0.05066497623920441,
-0.4236222505569458,
-0.3217107951641083,
-0.01902763359248638,
0.06141708791255951,
0.16759386658668518,
-0.19099904596805573,
-0.11091956496238708,
-0.25703901052474976,
-0.23603075742721558,
0.14753195643424988,
-0.1751820594072342,
-0.06122615188360214,
-0.17111685872077942,
-0.10615789145231247,
-0.12516848742961884,
-0.042459502816200256,
0.09930405020713806,
0.002741243690252304,
0.24898859858512878,
0.18083456158638,
-0.06588227301836014,
0.03800534829497337,
-0.14516201615333557,
-0.025844499468803406,
0.1929471492767334,
0.15651443600654602,
0.16349849104881287,
0.2017858922481537,
0.2466435432434082,
-0.27818524837493896,
0.09314164519309998,
0.16702325642108917,
0.2519386410713196,
0.1605234146118164,
-0.26126447319984436,
0.15660615265369415,
0.24106815457344055,
0.30748358368873596,
-0.37613028287887573,
0.039126258343458176,
0.45802706480026245,
-0.04126624017953873,
0.14350318908691406,
-0.0636604055762291,
0.11785562336444855,
-0.04047637805342674,
0.15300342440605164,
0.2768000364303589,
0.04864036291837692,
0.045562706887722015,
0.17126479744911194,
0.3679756820201874,
-0.18222913146018982,
0.08253388106822968,
0.22982396185398102,
0.2879936695098877,
0.2526145875453949,
0.562707781791687,
-0.16893339157104492,
0.2401507943868637,
0.17784759402275085,
0.04119216278195381,
0.28181904554367065,
-0.37635549902915955,
0.345511257648468,
0.2081160545349121,
-0.14165066182613373,
0.09922502189874649,
0.18711623549461365,
-0.023253418505191803,
0.20607990026474,
0.09394767135381699,
-0.3466142416000366,
-0.032095808535814285,
-0.04920884966850281,
0.18440081179141998,
-0.1275070756673813,
-0.26392966508865356,
-0.0018692612648010254,
-0.03630456700921059,
0.002856031060218811,
-0.1370803266763687,
-0.13086912035942078,
-0.12604013085365295,
-0.1479250192642212,
-0.29501697421073914,
0.3079898953437805,
0.012404050678014755,
-0.05959918349981308,
-0.1373494565486908,
0.19989123940467834,
0.19790934026241302,
0.16659870743751526,
0.22113536298274994,
0.5088464021682739,
-0.06770612299442291,
0.1522238701581955,
0.04129909351468086,
0.003196864388883114,
-0.1754739135503769,
-0.2767573595046997,
-0.11506281793117523,
0.25103676319122314,
0.2153501957654953,
-0.2822306752204895,
0.35926681756973267,
0.24208864569664001,
-0.15204578638076782,
0.3620535135269165,
0.18676137924194336,
-0.037260863929986954,
-0.07983255386352539,
-0.16746065020561218,
-0.13220909237861633,
-0.09535340219736099,
-0.1252184361219406,
-0.42548927664756775,
-0.14697737991809845,
-0.1597554236650467,
0.513827383518219,
-0.1332738846540451,
0.13695716857910156,
-0.37777718901634216,
0.12563540041446686,
-0.12393280863761902,
0.13457205891609192,
0.09367380291223526,
0.14731810986995697,
-0.18867023289203644,
-0.030439209192991257,
-0.5757887959480286,
0.09155263751745224,
0.06623582541942596,
-0.10376890748739243,
0.1479720026254654,
0.03595422953367233,
0.2267700731754303,
0.22037075459957123,
0.10115163028240204,
0.07736548781394958,
0.22147931158542633,
0.31758779287338257,
-0.36314505338668823,
-0.058539967983961105,
0.37351930141448975,
0.3546190559864044,
0.04095020145177841,
-0.372765451669693,
0.21725572645664215,
-0.016217131167650223,
0.16933855414390564,
-0.2510942220687866,
0.22764238715171814,
-0.135258749127388,
-0.23431047797203064,
0.2032245248556137,
0.006598452106118202,
0.44569525122642517,
-0.046090252697467804,
0.14680519700050354,
-0.07117384672164917,
-0.07783064246177673,
-0.19608943164348602,
0.22492602467536926,
0.5668408274650574,
0.3274877667427063,
-0.052817247807979584,
0.21809309720993042,
0.04004986211657524,
0.04546349495649338,
-0.13958656787872314,
0.007306551095098257,
-0.29486045241355896,
0.3399355113506317,
-0.29380032420158386,
0.13073855638504028,
0.13162633776664734,
-0.08796165138483047,
-0.012324124574661255,
-0.135370135307312,
-0.18772119283676147,
-0.1963106393814087,
0.4006115794181824,
-0.2597101032733917,
-0.3572216033935547,
0.19452528655529022,
0.09779942780733109,
-0.11068596690893173,
-0.1960461288690567,
-0.3088371157646179,
0.1522688865661621,
0.3497962951660156,
-0.14064204692840576,
0.1479407697916031,
0.04414496570825577,
0.03146648034453392,
0.029929909855127335,
-0.15695999562740326,
0.3526877164840698,
0.356336772441864,
-0.09698732197284698,
-0.20012283325195312,
-0.31700122356414795
] |
https://github.com/huggingface/datasets/issues/4898 | Dataset Viewer issue for timit_asr | Yes, the dataset viewer is based on `datasets`, and the following does not work:
```
>>> from datasets import get_dataset_split_names
>>> get_dataset_split_names('timit_asr')
Downloading builder script: 7.48kB [00:00, 6.69MB/s]
Traceback (most recent call last):
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 354, in get_dataset_config_info
for split_generator in builder._split_generators(
File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/timit_asr/43f9448dd5db58e95ee48a277f466481b151f112ea53e27f8173784da9254fb2/timit_asr.py", line 117, in _split_generators
data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
File "/home/slesage/.pyenv/versions/3.9.6/lib/python3.9/posixpath.py", line 231, in expanduser
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 404, in get_dataset_split_names
info = get_dataset_config_info(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 359, in get_dataset_config_info
raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.
```
cc @huggingface/datasets | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 136 | Dataset Viewer issue for timit_asr
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Yes, the dataset viewer is based on `datasets`, and the following does not work:
```
>>> from datasets import get_dataset_split_names
>>> get_dataset_split_names('timit_asr')
Downloading builder script: 7.48kB [00:00, 6.69MB/s]
Traceback (most recent call last):
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 354, in get_dataset_config_info
for split_generator in builder._split_generators(
File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/timit_asr/43f9448dd5db58e95ee48a277f466481b151f112ea53e27f8173784da9254fb2/timit_asr.py", line 117, in _split_generators
data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
File "/home/slesage/.pyenv/versions/3.9.6/lib/python3.9/posixpath.py", line 231, in expanduser
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 404, in get_dataset_split_names
info = get_dataset_config_info(
File "/home/slesage/hf/datasets-server/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 359, in get_dataset_config_info
raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.
```
cc @huggingface/datasets | [
-0.4638701379299164,
-0.00477243959903717,
-0.026129458099603653,
0.3046242296695709,
0.4482001066207886,
-0.020980902016162872,
0.246046781539917,
0.37231379747390747,
-0.5133568644523621,
0.14389927685260773,
-0.07815973460674286,
0.33165472745895386,
-0.48170360922813416,
0.3632708489894867,
0.037859704345464706,
-0.1944950968027115,
-0.21152088046073914,
0.24509437382221222,
-0.3208187520503998,
0.1717977374792099,
-0.14746609330177307,
0.34006595611572266,
-0.04386809468269348,
0.3378487825393677,
-0.04869629070162773,
0.029869068413972855,
0.11538878083229065,
0.1149761900305748,
-0.22762499749660492,
-0.5852335095405579,
0.10563451051712036,
0.0331520140171051,
0.25459250807762146,
0.5914600491523743,
-0.00011495716171339154,
0.3277592658996582,
0.2131485790014267,
0.06966706365346909,
-0.36423641443252563,
-0.410758912563324,
-0.18589496612548828,
-0.13522373139858246,
0.25169870257377625,
-0.006335847079753876,
-0.041828323155641556,
-0.3408867120742798,
0.1903492957353592,
-0.35823187232017517,
-0.0535120964050293,
0.36510249972343445,
0.2467721700668335,
0.23613527417182922,
0.06625127792358398,
-0.09541982412338257,
0.17934882640838623,
0.3103250563144684,
-0.1292800009250641,
-0.23129689693450928,
-0.31010448932647705,
0.3619349002838135,
-0.014347180724143982,
0.06341239809989929,
-0.07311097532510757,
0.120722696185112,
0.39695584774017334,
-0.028242677450180054,
-0.1770874261856079,
-0.35190147161483765,
0.016772285103797913,
0.14763715863227844,
0.7187802791595459,
-0.26202279329299927,
-0.11136515438556671,
-0.19343158602714539,
-0.2624925971031189,
0.04605790227651596,
0.27616819739341736,
0.34962254762649536,
-0.39756786823272705,
0.2165319323539734,
-0.25979310274124146,
-0.05977853015065193,
-0.3353428244590759,
0.14458952844142914,
-0.3350372314453125,
-0.1993759572505951,
-0.24334126710891724,
0.1457332968711853,
-0.009458083659410477,
-0.031621672213077545,
0.30325737595558167,
-0.10185720026493073,
0.013519767671823502,
-0.057576220482587814,
-0.13773080706596375,
0.032432980835437775,
0.21159473061561584,
0.003972329199314117,
-0.028787653893232346,
0.08674028515815735,
0.3186797499656677,
0.13263678550720215,
-0.21057264506816864,
0.11453203856945038,
0.10531361401081085,
0.021711010485887527,
0.1610974669456482,
0.2301313877105713,
0.43381190299987793,
0.11403420567512512,
-0.036164380609989166,
-0.08745351433753967,
-0.17483733594417572,
-0.2635304629802704,
-0.14634975790977478,
-0.11476524919271469,
0.45921486616134644,
-0.06273120641708374,
-0.5119876861572266,
-0.06304944306612015,
-0.2560133934020996,
0.01776452362537384,
0.25677749514579773,
0.2305053174495697,
0.036175746470689774,
0.34076353907585144,
0.045220308005809784,
0.004211237654089928,
-0.16435295343399048,
-0.21766841411590576,
-0.11256840080022812,
-0.04544812813401222,
-0.03605668246746063,
-0.16523046791553497,
0.1193886250257492,
-0.4778859615325928,
0.09505167603492737,
-0.10972964763641357,
-0.11193239688873291,
0.14997626841068268,
0.1625373363494873,
-0.04841677099466324,
0.020170584321022034,
0.31589052081108093,
0.18335792422294617,
0.21708165109157562,
-0.07136377692222595,
-0.13820046186447144,
0.02956891804933548,
0.24073201417922974,
0.003293141722679138,
-0.3076881170272827,
-0.16536028683185577,
0.23209932446479797,
-0.31938570737838745,
-0.01565825566649437,
0.13362818956375122,
0.0247053075581789,
0.0195552259683609,
-0.13016840815544128,
-0.38164955377578735,
-0.21455876529216766,
-0.32216501235961914,
-0.32890763878822327,
0.2603817284107208,
0.26879405975341797,
-0.7046464085578918,
-0.008980240672826767,
-0.27611473202705383,
-0.26131388545036316,
0.133206307888031,
0.05966576933860779,
-0.08288639783859253,
0.3838745057582855,
-0.434198796749115,
-0.027116648852825165,
0.4213502109050751,
-0.0023104362189769745,
-0.27317842841148376,
0.2227388471364975,
-0.159675732254982,
0.06985928118228912,
0.3897276222705841,
-0.09085140377283096,
0.20895707607269287,
-0.03045455366373062,
-0.21979033946990967,
0.08707115799188614,
-0.033012740314006805,
-0.012653693556785583,
-0.24411624670028687,
-0.18730652332305908,
0.1261865794658661,
0.18446527421474457,
0.4387839436531067,
-0.08868838101625443,
0.15851916372776031,
0.12918567657470703,
0.2996993362903595,
-0.1019708514213562,
0.12828488647937775,
0.11419151723384857,
0.09570853412151337,
0.03552807867527008,
0.15171271562576294,
-0.4252127707004547,
-0.1974053978919983,
-0.012271909043192863,
0.06246058642864227,
0.10363807529211044,
-0.06982135772705078,
-0.028516443446278572,
-0.3039470613002777,
0.0027015842497348785,
-0.2953758239746094,
0.03470608964562416,
0.1808529794216156,
0.5741245746612549,
-0.09255972504615784,
0.09892669320106506,
-0.020396340638399124,
0.24402372539043427,
0.15420939028263092,
0.1601574420928955,
0.0006515029817819595,
0.32487815618515015,
-0.14574044942855835,
-0.08598887920379639,
-0.08702046424150467,
0.11476881802082062,
-0.001492515206336975,
-0.19302397966384888,
-0.07748188823461533,
0.3943035900592804,
0.10007044672966003,
0.01682303100824356,
-0.0040577128529548645,
-0.1834559589624405,
0.18844333291053772,
-0.3922838270664215,
0.22235648334026337,
0.2432449758052826,
0.09837591648101807,
0.06658502668142319,
-0.0414389967918396,
0.0465487539768219,
-0.2483222931623459,
0.2896164059638977,
0.1684972494840622,
0.36349794268608093,
0.192177876830101,
0.01316509023308754,
0.15209515392780304,
-0.18716782331466675,
0.2661183178424835,
-0.10324624180793762,
-0.057524919509887695,
-0.07754141837358475,
-0.3349192142486572,
0.23246228694915771,
0.3704301118850708,
0.07880574464797974,
-0.10737276822328568,
0.290102481842041,
-0.2966138422489166,
0.28903481364250183,
-0.059797503054142,
0.3355250954627991,
0.27133119106292725,
0.2277258336544037,
0.1443728655576706,
0.004115834832191467,
0.07560459524393082,
-0.13480186462402344,
0.40445804595947266,
0.4442785978317261,
-0.3145218789577484,
0.27894139289855957,
-0.12251218408346176,
-0.14781081676483154,
-0.26807552576065063,
-0.17583897709846497,
0.0625360831618309,
0.28428468108177185,
-0.4304189682006836,
-0.03278643265366554,
-0.3637482225894928,
-0.36046332120895386,
-0.19966362416744232,
-0.1309041976928711,
-0.06325280666351318,
-0.4261270761489868,
-0.06561347842216492,
0.21715453267097473,
-0.045649103820323944,
0.14627918601036072,
-0.31599730253219604,
-0.08167211711406708,
0.0747099295258522,
0.18128925561904907,
-0.12121731042861938,
0.0798024907708168,
-0.23945820331573486,
0.15003912150859833,
0.5535653233528137,
0.06546930968761444,
0.31409552693367004,
-0.43116945028305054,
0.25657230615615845,
-0.31084534525871277,
-0.31875625252723694,
0.17753282189369202,
-0.16571028530597687,
0.3868655562400818,
0.49515801668167114,
-0.04774199426174164,
0.08846673369407654,
-0.21549241244792938,
0.2932261526584625,
-0.044302042573690414,
-0.07490721344947815,
0.31134194135665894,
0.13097558915615082,
-0.03675198182463646,
-0.2525380849838257,
-0.2435457706451416,
-0.17293189465999603,
-0.48944735527038574,
0.10416001081466675,
0.38213422894477844,
0.35570889711380005,
0.2090330570936203,
0.12439380586147308,
0.24327948689460754,
0.1529100239276886,
0.06937741488218307,
-0.04546064883470535,
-0.16224969923496246,
0.24705414474010468,
-0.3611730635166168,
-0.2759581208229065,
0.16334927082061768,
0.10535554587841034,
0.15893499553203583,
0.00782514363527298,
-0.4380655884742737,
0.3565528988838196,
-0.23562486469745636,
0.2212241291999817,
-0.06812708079814911,
0.04254228621721268,
0.11375528573989868,
0.36520951986312866,
-0.060159832239151,
-0.18545222282409668,
0.09222476184368134,
0.07394422590732574,
-0.287503719329834,
0.028743833303451538,
0.3161724805831909,
0.46716487407684326,
0.12672966718673706,
0.4166640043258667,
0.2736745774745941,
-0.019723523408174515,
0.3658008575439453,
-0.11103429645299911,
0.44542062282562256,
0.0506889745593071,
-0.48123621940612793,
0.11298257857561111,
0.00845789909362793,
0.022554922848939896,
0.2385273575782776,
0.051270995289087296,
0.18396435678005219,
-0.19093014299869537,
-0.052907545119524,
-0.002485223114490509,
-0.34731796383857727,
-0.03785152733325958,
-0.33773860335350037,
0.15112154185771942,
-0.007401604205369949,
0.0379205122590065,
-0.12454652786254883,
-0.23947274684906006,
-0.04275441914796829,
0.3074679970741272,
-0.035135842859745026,
-0.0692637711763382,
-0.34225189685821533,
0.056171949952840805,
-0.4771447777748108,
0.31888729333877563,
0.16801010072231293,
0.17897987365722656,
0.0016148462891578674,
-0.21211391687393188,
0.18577608466148376,
0.14382196962833405,
0.5077406764030457,
-0.25737830996513367,
-0.011642687022686005,
0.23049965500831604,
0.15935532748699188,
-0.40599507093429565,
-0.0057955048978328705,
-0.17799560725688934,
0.40007585287094116,
-0.03667972609400749,
-0.027823269367218018,
-0.055181264877319336,
-0.3810957074165344,
0.3844068646430969,
0.16932635009288788,
-0.1174614280462265,
0.0405547060072422,
-0.17460283637046814,
-0.3994455635547638,
0.014978917315602303,
-0.2714815139770508,
-0.10627080500125885,
0.30668380856513977,
-0.15302914381027222,
-0.1280813366174698,
-0.28548699617385864,
-0.2659853994846344,
0.31044942140579224,
0.14142033457756042,
0.5154411792755127,
-0.24674510955810547,
0.3427191972732544,
0.2942092716693878,
0.19953183829784393,
0.30947139859199524,
0.5013518333435059,
-0.14086447656154633,
-0.39345526695251465,
0.2996293902397156,
-0.2822473347187042,
0.34556499123573303,
0.16635024547576904,
-0.46024370193481445,
-0.09061842411756516,
-0.11027106642723083,
0.31107619404792786,
-0.15758898854255676,
0.326559841632843,
0.37234368920326233,
-0.11912266910076141,
-0.1581961214542389,
-0.4156215488910675,
0.026322562247514725,
0.11787992715835571,
-0.03454635664820671,
0.3795887231826782,
-0.020760074257850647,
-0.32195553183555603,
0.19704705476760864,
-0.05440627783536911,
0.685089111328125,
0.06275086849927902,
0.11822524666786194,
0.28503191471099854,
-0.08597543835639954,
0.07199740409851074,
-0.22450554370880127,
0.16053520143032074,
-0.3867081105709076,
-0.1747407615184784,
-0.19060757756233215,
-0.16378578543663025,
0.22998568415641785,
0.09822726994752884,
-0.4093959927558899,
0.02235203981399536,
0.06546427309513092,
0.31664225459098816,
0.08149973303079605,
0.29128649830818176,
-0.25189709663391113,
0.004484568722546101,
0.18594412505626678,
0.12942585349082947,
-0.15960247814655304,
-0.04531526193022728,
0.10836997628211975,
-0.06117650121450424,
0.07568284869194031,
-0.3270745277404785,
-0.29561734199523926,
-0.11657051742076874,
-0.2630862295627594,
-0.061999812722206116,
-0.2298608124256134,
-0.37138378620147705,
0.4368414878845215,
0.27125924825668335,
0.06839211285114288,
0.2250220626592636,
-0.030196012929081917,
0.024727605283260345,
-0.14556124806404114,
0.17831385135650635,
0.19618269801139832,
0.23608548939228058,
0.16672007739543915,
-0.011481596156954765,
-0.021920129656791687,
0.15829461812973022,
0.030399702489376068,
0.03465622663497925,
-0.17752718925476074,
0.02760065346956253,
0.2258085161447525,
-0.63127601146698,
0.2858230173587799,
-0.3361009955406189,
-0.014605667442083359,
-0.16562269628047943,
0.13396432995796204,
-0.06484882533550262,
-0.22318124771118164,
0.23793864250183105,
-0.12028186023235321,
-0.2414143830537796,
0.06553614139556885,
0.16447637975215912,
0.10710348933935165,
0.28438064455986023,
0.5421839952468872,
0.028158392757177353,
-0.348675012588501,
-0.21723628044128418,
0.46531474590301514,
-0.25640228390693665,
-0.3269486427307129,
0.3091863989830017,
-0.043062057346105576,
0.08475582301616669,
0.20118598639965057,
0.16647283732891083,
-0.0770922377705574,
0.09726357460021973,
-0.3507636785507202,
-0.4100588858127594,
-0.041985172778367996,
0.02512453868985176,
-0.1607133001089096,
0.261391818523407,
0.017953887581825256,
0.06181001663208008,
0.00650273822247982,
-0.3629318177700043,
-0.2921123206615448,
0.10723106563091278,
-0.048162974417209625,
0.04334835708141327,
-0.20991073548793793,
-0.1288565993309021,
0.18694762885570526,
-0.11755190789699554,
0.14708343148231506,
0.0797298327088356,
-0.0807587206363678,
-0.1389501988887787,
-0.13532593846321106,
0.13997235894203186,
0.050773099064826965,
-0.3464129865169525,
0.059956472367048264,
0.04724501073360443,
-0.22793275117874146,
0.0664735734462738,
0.02521805837750435,
-0.022923896089196205,
-0.13044489920139313,
0.06614788621664047,
0.14853186905384064,
-0.18288761377334595,
-0.0647335797548294,
0.2952004373073578,
-0.06434734165668488,
0.447884202003479,
0.07997643202543259,
0.3904247283935547,
-0.20564065873622894,
-0.09348675608634949,
0.08702660351991653,
0.19767963886260986,
0.026364892721176147,
-0.13638365268707275,
0.35956114530563354,
-0.48446381092071533,
0.11755862832069397,
0.14845804870128632,
0.4160289764404297,
0.5779374241828918,
-0.09693627059459686,
-0.08887182176113129,
0.3020545244216919,
0.1507658064365387,
-0.17307591438293457,
-0.0993678867816925,
0.11200369894504547,
-0.09881501644849777,
0.17257602512836456,
0.2057807445526123,
-0.031217770650982857,
-0.10105394572019577,
0.22688530385494232,
0.1276259422302246,
0.35735130310058594,
0.16079023480415344,
0.21376068890094757,
0.8835816979408264,
-0.11733731627464294,
0.04062650352716446,
0.18011438846588135,
0.017201803624629974,
-0.01212463527917862,
0.840632438659668,
-0.38324466347694397,
0.03492552042007446,
-0.37259215116500854,
-0.15335337817668915,
0.25712162256240845,
-0.31060075759887695,
-0.12329111993312836,
-0.010665073990821838,
-0.11873835325241089,
-0.04336389899253845,
-0.10580085217952728,
0.5913487076759338,
-0.2742084264755249,
0.1589430272579193,
-0.2547367215156555,
0.13899636268615723,
-0.1814253032207489,
0.12738360464572906,
-0.5218169689178467,
-0.256102591753006,
-0.34513476490974426,
-0.09127259254455566,
-0.037186477333307266,
-0.0838727205991745,
0.01396886259317398,
0.23168136179447174,
0.040285803377628326,
-0.3705980181694031,
0.0205330029129982,
-0.13183537125587463,
-0.004344478249549866,
-0.3073716461658478,
0.18127617239952087,
0.27400970458984375,
0.20136725902557373,
0.08980867266654968,
0.2649514973163605,
0.4577042758464813,
0.1374778151512146,
-0.24286893010139465,
-0.28636717796325684,
-0.22094224393367767,
-0.10080605745315552,
-0.12218242138624191,
0.12769606709480286,
-0.11158338189125061,
0.16279107332229614,
0.3657149374485016,
0.08187054097652435,
-0.09289266914129257,
-0.14397558569908142,
0.26385319232940674,
0.005573407746851444,
-0.2257981300354004,
0.2586747109889984,
-0.23285463452339172,
-0.03514614701271057,
-0.020694565027952194,
-0.467375248670578,
-0.38527485728263855,
0.022421836853027344,
0.4825671315193176,
-0.04277518019080162,
0.033745113760232925,
-0.34764790534973145,
0.05392897129058838,
0.05796433985233307,
0.3668344020843506,
0.06547051668167114,
0.048738252371549606,
-0.19909533858299255,
-0.3862249255180359,
-0.47235628962516785,
0.08976366370916367,
0.038701266050338745,
-0.32600441575050354,
0.09418133646249771,
0.06973449885845184,
-0.023564666509628296,
0.15700218081474304,
0.4648716449737549,
0.47024720907211304,
-0.0637267529964447,
0.46881791949272156,
-0.08783411979675293,
-0.12785914540290833,
0.13620811700820923,
-0.13129255175590515,
-0.1383659541606903,
-0.4759836494922638,
0.17971664667129517,
-0.18066467344760895,
0.032396793365478516,
-0.18570609390735626,
0.008625179529190063,
0.16786949336528778,
-0.11041504144668579,
0.06478770822286606,
-0.020414037629961967,
0.29539263248443604,
0.11948258429765701,
0.039819829165935516,
-0.16526183485984802,
-0.35699141025543213,
-0.38848912715911865,
0.483917772769928,
0.1961798071861267,
0.2720743715763092,
-0.18339067697525024,
-0.1477319449186325,
-0.2888917028903961,
0.12316137552261353,
0.07324440032243729,
0.3763335943222046,
-0.11036770790815353,
0.16941052675247192,
-0.39352232217788696,
0.1930466592311859,
0.26831769943237305,
0.11260262876749039,
0.06859426945447922,
0.15079408884048462,
-0.5468127131462097,
-0.5901817679405212,
0.33614611625671387,
-0.28436726331710815,
-0.3868485391139984,
0.02499375119805336,
-0.06681032478809357,
0.06524145603179932,
-0.27604740858078003,
-0.3795275390148163,
-0.09511596709489822,
0.49695712327957153,
-0.03489861637353897,
0.20772230625152588,
-0.000352516770362854,
0.07335714995861053,
0.07856351137161255,
-0.12282389402389526,
0.28988319635391235,
0.11816247552633286,
-0.21578165888786316,
0.08084240555763245,
-0.0269724503159523
] |
https://github.com/huggingface/datasets/issues/4898 | Dataset Viewer issue for timit_asr | Due to license restriction, this dataset needs manual downloading of the original data.
This information is in the dataset card: https://huggingface.co/datasets/timit_asr
> The dataset needs to be downloaded manually from https://catalog.ldc.upenn.edu/LDC93S1 | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 31 | Dataset Viewer issue for timit_asr
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Due to license restriction, this dataset needs manual downloading of the original data.
This information is in the dataset card: https://huggingface.co/datasets/timit_asr
> The dataset needs to be downloaded manually from https://catalog.ldc.upenn.edu/LDC93S1 | [
-0.48284536600112915,
-0.3338775038719177,
-0.10713218152523041,
0.2479642778635025,
0.12183617055416107,
0.03672032058238983,
0.12027832120656967,
0.25015440583229065,
-0.39043331146240234,
0.17018502950668335,
-0.23189178109169006,
0.3474963307380676,
-0.19933469593524933,
0.4099123477935791,
0.01690797507762909,
-0.025376945734024048,
-0.19630005955696106,
0.2347731590270996,
-0.3649944067001343,
0.05494960397481918,
0.016613252460956573,
0.229317769408226,
-0.028352003544569016,
0.11948947608470917,
0.1723950058221817,
-0.038835346698760986,
0.14084546267986298,
-0.08228857070207596,
-0.23646517097949982,
-0.3956749439239502,
0.07579473406076431,
0.060870926827192307,
0.23167267441749573,
0.2978217303752899,
-0.00010029599070549011,
0.14221954345703125,
0.06280222535133362,
0.061569683253765106,
-0.21421468257904053,
0.03327646106481552,
-0.03576430678367615,
0.04114413261413574,
0.23350149393081665,
0.014291346073150635,
-0.23261508345603943,
-0.16491399705410004,
0.25060969591140747,
-0.07516489923000336,
0.2809433043003082,
0.21725784242153168,
0.401197612285614,
0.2187563180923462,
-0.005451556295156479,
-0.18017643690109253,
0.04406115785241127,
0.13450852036476135,
-0.041035912930965424,
0.06696321070194244,
-0.11079052090644836,
0.3361835479736328,
-0.1810254156589508,
0.19260235130786896,
0.15171554684638977,
0.1180281788110733,
0.08838323503732681,
-0.15708614885807037,
0.036854542791843414,
-0.32818835973739624,
0.19159293174743652,
0.08521154522895813,
0.908767819404602,
-0.16684216260910034,
0.021054070442914963,
0.12107697874307632,
-0.0029133851639926434,
0.06656751781702042,
0.2486690878868103,
0.15586566925048828,
-0.17199862003326416,
0.3053054213523865,
-0.1220703274011612,
0.019841013476252556,
-0.41118863224983215,
0.060075290501117706,
-0.2785951495170593,
-0.32032009959220886,
-0.3147992491722107,
-0.045379482209682465,
0.006458226591348648,
-0.19565491378307343,
0.18600453436374664,
0.20082713663578033,
-0.11943280696868896,
-0.01555932778865099,
-0.008278999477624893,
-0.0724334642291069,
0.1290830671787262,
0.04637343809008598,
0.05253300815820694,
0.2787139415740967,
0.4509057104587555,
0.21947398781776428,
-0.17762921750545502,
0.022939473390579224,
0.030938660725951195,
-0.03339040279388428,
0.04025743529200554,
-0.023276731371879578,
0.446791410446167,
0.038856543600559235,
0.005371861159801483,
-0.04779532551765442,
-0.12335770577192307,
-0.1662735641002655,
-0.18210765719413757,
-0.2815060615539551,
0.08630507439374924,
-0.3115733563899994,
-0.4884357452392578,
-0.01421565655618906,
-0.021111801266670227,
0.15056270360946655,
0.06939982622861862,
0.20984745025634766,
-0.015658164396882057,
0.09126889705657959,
0.08512628078460693,
-0.0650818794965744,
-0.1715724915266037,
-0.15572728216648102,
-0.20840631425380707,
-0.06911233067512512,
-0.023128142580389977,
-0.2935905158519745,
0.2766668498516083,
-0.3537002503871918,
0.177622988820076,
0.04407915100455284,
-0.07518801093101501,
0.25175023078918457,
-0.027688510715961456,
-0.0639137253165245,
-0.003272794187068939,
0.3445890247821808,
0.11338743567466736,
0.06603655219078064,
-0.21489249169826508,
-0.01657406985759735,
0.12814432382583618,
0.02643965557217598,
0.1316908299922943,
-0.10510919988155365,
-0.04338967800140381,
0.38061919808387756,
-0.23254133760929108,
-0.17016224563121796,
0.1082804799079895,
0.23215384781360626,
-0.15058556199073792,
-0.3002186715602875,
-0.2519240379333496,
0.042176488786935806,
-0.2307407557964325,
-0.23726814985275269,
0.21221202611923218,
0.3087329566478729,
-0.6238903403282166,
0.06562986969947815,
0.03557873144745827,
-0.3239116668701172,
0.0027947649359703064,
0.08843325823545456,
-0.04378170520067215,
0.10695015639066696,
-0.3809978663921356,
-0.043177030980587006,
0.23848095536231995,
-0.08884933590888977,
-0.5332092642784119,
0.09773575514554977,
-0.23764930665493011,
-0.13591891527175903,
0.27107250690460205,
0.0964353159070015,
0.2368367463350296,
0.028248675167560577,
-0.16388829052448273,
0.10506725311279297,
0.2102007120847702,
-0.05316378176212311,
-0.26447346806526184,
-0.09700071066617966,
0.0030532479286193848,
0.23590339720249176,
0.26765936613082886,
0.08937980234622955,
0.254922091960907,
0.04487977921962738,
0.2475534975528717,
0.10249887406826019,
0.1204708144068718,
0.07849599421024323,
0.12875714898109436,
-0.10072372853755951,
-0.0053401365876197815,
-0.2750912606716156,
-0.01895635575056076,
-0.08865471929311752,
0.04036484658718109,
0.1775989532470703,
0.15866264700889587,
0.039186231791973114,
-0.33001387119293213,
-0.2674325108528137,
-0.12229366600513458,
-0.07195311784744263,
0.36462870240211487,
0.49389705061912537,
-0.17230430245399475,
0.2196674793958664,
0.06434442102909088,
0.34107986092567444,
-0.050169337540864944,
-0.10491210222244263,
-0.07647362351417542,
0.13529977202415466,
-0.19378957152366638,
-0.008708513341844082,
0.17478984594345093,
-0.17196545004844666,
-0.06177248805761337,
-0.17322367429733276,
-0.01296997256577015,
0.2296343743801117,
-0.13776494562625885,
0.10225094854831696,
0.12114351987838745,
0.00579620897769928,
0.20770904421806335,
-0.6452705264091492,
0.0017476584762334824,
0.2081567645072937,
-0.00352264940738678,
0.08660534769296646,
-0.29250529408454895,
0.10750792175531387,
-0.07380348443984985,
-0.09514570981264114,
0.1495348960161209,
0.37762683629989624,
0.25641608238220215,
-0.0505109466612339,
0.05319596827030182,
-0.1443571299314499,
0.29708683490753174,
0.05374125763773918,
-0.07247672230005264,
-0.19724667072296143,
-0.424269437789917,
0.32737159729003906,
0.09301914274692535,
0.09709201753139496,
-0.08699094504117966,
0.19049564003944397,
-0.17332246899604797,
0.15025588870048523,
0.05885991454124451,
0.12814195454120636,
0.18239164352416992,
0.41681379079818726,
0.15755043923854828,
-0.010333826765418053,
-0.07048653811216354,
-0.2347266525030136,
0.14286021888256073,
0.015258505940437317,
-0.24380998313426971,
0.1779555380344391,
-0.0363788865506649,
-0.13279664516448975,
-0.46893051266670227,
-0.1383097618818283,
0.10992950201034546,
0.29936420917510986,
-0.3158704340457916,
-0.23404160141944885,
-0.2237771451473236,
-0.4680265784263611,
0.045111168175935745,
0.09709998220205307,
-0.037481244653463364,
-0.32852473855018616,
0.08061344921588898,
0.3503485321998596,
-0.10621780157089233,
0.18471334874629974,
-0.3647330701351166,
0.19234375655651093,
-0.01970958150923252,
0.3528146743774414,
-0.19766119122505188,
0.15532054007053375,
-0.2904794216156006,
0.33689039945602417,
0.2640436589717865,
0.08078449964523315,
0.4761964678764343,
-0.42022213339805603,
0.42520177364349365,
-0.40651437640190125,
-0.37184545397758484,
0.14961698651313782,
-0.055060602724552155,
0.327053964138031,
0.2137293517589569,
0.20601195096969604,
-0.40293431282043457,
-0.005627350881695747,
0.06376781314611435,
-0.18549460172653198,
-0.24113178253173828,
0.09823821485042572,
-0.045351166278123856,
-0.039797715842723846,
-0.15902398526668549,
-0.29378679394721985,
-0.14114944636821747,
-0.39860308170318604,
0.25662559270858765,
0.2518901824951172,
0.22814135253429413,
0.2731799781322479,
0.023204166442155838,
0.19006599485874176,
0.2459266632795334,
0.11058758944272995,
-0.3066762685775757,
-0.3173673152923584,
0.22944389283657074,
-0.37307316064834595,
-0.594916045665741,
0.20295676589012146,
0.3514508008956909,
0.1954774707555771,
0.08776858448982239,
-0.4684962034225464,
0.12749908864498138,
-0.0704403668642044,
0.22599026560783386,
-0.17245687544345856,
-0.018255876377224922,
0.21883314847946167,
0.08805523812770844,
-0.25641050934791565,
-0.2543974816799164,
0.01477111503481865,
0.23860731720924377,
-0.22597649693489075,
-0.027056939899921417,
-0.00059511698782444,
0.17346161603927612,
0.1239631175994873,
0.3473125696182251,
0.12602342665195465,
-0.11128595471382141,
0.26275932788848877,
-0.22651222348213196,
0.44179844856262207,
0.09065619856119156,
-0.19342771172523499,
0.054740164428949356,
0.15022683143615723,
0.21246865391731262,
0.24112722277641296,
0.04953981563448906,
0.09268039464950562,
-0.270729124546051,
-0.02767530269920826,
-0.1132316142320633,
-0.19725051522254944,
-0.16846774518489838,
-0.25019577145576477,
0.1710297167301178,
0.05639592185616493,
0.03893233835697174,
-0.024858970195055008,
-0.3556532561779022,
0.07006227970123291,
0.36740005016326904,
0.007621839642524719,
0.008608225733041763,
-0.2772417664527893,
0.06684708595275879,
-0.371407687664032,
0.2783506512641907,
-0.02344444952905178,
0.28981471061706543,
-0.23145249485969543,
-0.2652771472930908,
0.23151595890522003,
0.1254403293132782,
0.4134622812271118,
-0.29797127842903137,
0.14246970415115356,
0.22178058326244354,
0.1840612292289734,
-0.2942718267440796,
0.11904396116733551,
-0.23586146533489227,
0.1701664924621582,
-0.007024243474006653,
0.0069838762283325195,
-0.02659010887145996,
-0.22804416716098785,
0.16871249675750732,
-0.0022790306247770786,
-0.16408772766590118,
-0.09481742233037949,
-0.08683088421821594,
-0.2885386347770691,
-0.03965703770518303,
-0.0623399093747139,
-0.07713955640792847,
0.06592708826065063,
-0.12728312611579895,
0.02593628689646721,
-0.38740769028663635,
-0.10838763415813446,
0.3126720190048218,
0.215439572930336,
0.3943524658679962,
0.06258600205183029,
0.3591957688331604,
0.3482733368873596,
0.2440570443868637,
0.26854678988456726,
0.3930930197238922,
-0.056701336055994034,
-0.21959692239761353,
0.4076739251613617,
-0.20320506393909454,
0.13816551864147186,
0.21733355522155762,
-0.1493929922580719,
0.0032128915190696716,
-0.13762067258358002,
0.15713930130004883,
-0.08051373064517975,
0.31781673431396484,
0.08024385571479797,
-0.20849871635437012,
-0.21770791709423065,
-0.16913442313671112,
0.18201091885566711,
-0.07573115825653076,
-0.17922097444534302,
0.23849616944789886,
0.06114482879638672,
-0.1591133326292038,
0.08239804953336716,
-0.01625227928161621,
0.9392342567443848,
-0.04961664229631424,
0.15090323984622955,
0.18507608771324158,
-0.054887864738702774,
0.10684598237276077,
-0.24053093791007996,
0.2040085643529892,
-0.29640302062034607,
-0.2097112536430359,
-0.10480155050754547,
0.02328428253531456,
-0.0042202770709991455,
0.04564940556883812,
-0.19042201340198517,
-0.11100108921527863,
0.1462235003709793,
0.3662639260292053,
0.16466665267944336,
0.2695169448852539,
-0.0438116118311882,
0.005037866532802582,
0.07618547976016998,
0.29430750012397766,
-0.08733212947845459,
0.0879223495721817,
0.05335664004087448,
-0.2170296460390091,
0.10505099594593048,
-0.11375405639410019,
-0.23373295366764069,
-0.027505850419402122,
-0.22081033885478973,
0.04335445910692215,
-0.34465304017066956,
-0.3853418827056885,
0.23480620980262756,
0.17817385494709015,
0.06742596626281738,
0.23707295954227448,
-0.16851122677326202,
0.016828196123242378,
-0.008407406508922577,
-0.0450710766017437,
-0.006248585879802704,
0.3342198431491852,
0.11387325823307037,
-0.17445433139801025,
-0.04510876536369324,
0.277529776096344,
0.13856440782546997,
0.025286756455898285,
-0.17735880613327026,
0.0025411322712898254,
0.013684552162885666,
-0.4569329619407654,
0.356765478849411,
-0.24676674604415894,
-0.17269617319107056,
-0.21518856287002563,
0.27703210711479187,
0.10502341389656067,
-0.13615462183952332,
0.09973954409360886,
0.23476994037628174,
-0.2450532764196396,
-0.10434281826019287,
0.47753360867500305,
0.043633121997117996,
0.06029777228832245,
0.430621474981308,
-0.07203333079814911,
-0.23477189242839813,
-0.3641977608203888,
0.1711435616016388,
-0.18153348565101624,
-0.3847739100456238,
0.019962280988693237,
-0.01610426977276802,
0.17206324636936188,
0.20958495140075684,
0.1612967699766159,
0.05748174712061882,
-0.14526617527008057,
-0.16281189024448395,
-0.35214725136756897,
-0.37825721502304077,
0.05807075649499893,
-0.16402387619018555,
0.3186821937561035,
-0.08150358498096466,
0.03976338356733322,
0.14184251427650452,
-0.3227444589138031,
-0.4984714388847351,
0.10713936388492584,
-0.06458177417516708,
-0.05747506022453308,
-0.1245369166135788,
-0.04002638906240463,
0.0833374634385109,
0.004956592805683613,
0.2689734101295471,
0.15649428963661194,
-0.32443228363990784,
-0.33389079570770264,
-0.08048124611377716,
0.06252028048038483,
0.023884952068328857,
-0.19280634820461273,
-0.10083886981010437,
0.015662051737308502,
-0.3139549195766449,
0.2795015871524811,
-0.08548492193222046,
-0.0667591542005539,
-0.06215909123420715,
-0.008330320939421654,
0.0033811256289482117,
-0.026527039706707,
0.09909676015377045,
0.12810176610946655,
0.20311830937862396,
0.2449195235967636,
-0.09884974360466003,
0.199131578207016,
-0.21089592576026917,
-0.12522834539413452,
0.05459505692124367,
0.1865319311618805,
0.1999272108078003,
-0.1681264340877533,
0.10002534836530685,
-0.2754296660423279,
0.2392442524433136,
0.10167171061038971,
0.2576172649860382,
0.3779600262641907,
-0.11641930788755417,
-0.14416535198688507,
0.19890514016151428,
0.36467570066452026,
-0.27745985984802246,
0.08061783760786057,
-0.15417209267616272,
-0.06861954182386398,
0.11204150319099426,
-0.0380212739109993,
0.10080157220363617,
-0.04014987125992775,
0.25318050384521484,
0.11630838364362717,
0.20049379765987396,
-0.01630612462759018,
-0.022869575768709183,
0.6508686542510986,
-0.13307751715183258,
0.022463474422693253,
0.15307055413722992,
0.23168450593948364,
-0.10114952176809311,
0.580286979675293,
-0.21308591961860657,
-0.021428244188427925,
-0.45970720052719116,
0.032952845096588135,
0.18322241306304932,
-0.351208359003067,
-0.15229065716266632,
0.1947142779827118,
-0.038721486926078796,
0.04953763633966446,
-0.017024196684360504,
0.5139363408088684,
0.00839310698211193,
-0.0034328745678067207,
-0.3157196342945099,
0.034867286682128906,
-0.21358567476272583,
0.11006931960582733,
-0.4058195650577545,
-0.3595559298992157,
-0.12773752212524414,
0.049543190747499466,
-0.08072890341281891,
0.024724222719669342,
0.0899437665939331,
0.09477055817842484,
-0.09153272211551666,
-0.3241863250732422,
-0.20693424344062805,
0.07512412965297699,
0.0410376600921154,
-0.14929865300655365,
0.1766711175441742,
0.14383412897586823,
0.07518599182367325,
0.17558515071868896,
0.38946983218193054,
0.30164802074432373,
-0.09662540256977081,
-0.020342521369457245,
0.009825948625802994,
-0.13729196786880493,
-0.12756574153900146,
-0.1551174521446228,
0.3451250493526459,
0.27886298298835754,
-0.15182100236415863,
0.31885260343551636,
0.22921819984912872,
-0.23652401566505432,
0.02073371410369873,
0.011945679783821106,
0.017977921292185783,
-0.1286587119102478,
-0.05024280399084091,
-0.2527881860733032,
-0.05768315866589546,
0.003000522032380104,
-0.504736602306366,
-0.1834607720375061,
0.08610007911920547,
0.22160722315311432,
-0.03394273668527603,
0.0657387524843216,
-0.3624318838119507,
0.16085846722126007,
0.007162995636463165,
0.6091665029525757,
0.1689440757036209,
0.19748803973197937,
-0.10810593515634537,
-0.49712157249450684,
-0.5277850031852722,
0.17691218852996826,
0.23178862035274506,
-0.24422016739845276,
-0.009587343782186508,
0.016757624223828316,
0.1403721570968628,
0.160349503159523,
0.3689475357532501,
0.35533955693244934,
-0.16958573460578918,
0.48514115810394287,
-0.17659923434257507,
-0.016784869134426117,
0.15933263301849365,
0.01956285536289215,
-0.10916979610919952,
-0.24592390656471252,
0.18746565282344818,
-0.05460052192211151,
0.24969348311424255,
-0.2566198706626892,
0.21520310640335083,
-0.1563856601715088,
-0.018082186579704285,
0.31052422523498535,
0.025821372866630554,
0.3265079855918884,
-0.05772743374109268,
-0.02531498670578003,
-0.09431815147399902,
-0.2682259976863861,
-0.25296685099601746,
0.3013336658477783,
0.3131446838378906,
0.228056401014328,
0.009372586384415627,
-0.2061135470867157,
0.014676358550786972,
0.04335125535726547,
0.08606448769569397,
0.36321526765823364,
-0.2100626528263092,
0.012818925082683563,
-0.09994484484195709,
0.03640817850828171,
0.19736173748970032,
0.25793975591659546,
0.09656862914562225,
-0.1035899892449379,
-0.5981729030609131,
-0.48592913150787354,
0.24889832735061646,
-0.4628533124923706,
-0.18441228568553925,
0.11502531170845032,
0.06143725663423538,
0.12828278541564941,
-0.10013876110315323,
-0.3942234516143799,
0.08689413219690323,
0.35803499817848206,
-0.20246639847755432,
0.04759639874100685,
0.2945941090583801,
-0.13999591767787933,
0.09424901008605957,
-0.09993212670087814,
0.5140116810798645,
0.27620282769203186,
-0.2487921416759491,
-0.0463300421833992,
-0.16839204728603363
] |
https://github.com/huggingface/datasets/issues/4898 | Dataset Viewer issue for timit_asr | Maybe a better error message for datasets that need manual downloading? @severo
Maybe we can raise a specific excpetion as done from `load_dataset`... | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 23 | Dataset Viewer issue for timit_asr
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Maybe a better error message for datasets that need manual downloading? @severo
Maybe we can raise a specific excpetion as done from `load_dataset`... | [
-0.4799196422100067,
-0.19095495343208313,
-0.08812350034713745,
0.1269700825214386,
0.31942564249038696,
-0.0033424273133277893,
0.14519187808036804,
0.2044476866722107,
-0.12543538212776184,
0.13900750875473022,
-0.10956619679927826,
0.24690403044223785,
-0.260699987411499,
0.2751755118370056,
-0.24439144134521484,
0.1252860426902771,
-0.23571458458900452,
0.19566884636878967,
-0.2574215531349182,
0.01980883628129959,
-0.03729268163442612,
0.09705367684364319,
-0.039183326065540314,
0.272652804851532,
0.0852382704615593,
-0.032768748700618744,
0.2712738513946533,
-0.09307505935430527,
-0.16961312294006348,
-0.6792492270469666,
0.21315298974514008,
0.18998534977436066,
0.3789699375629425,
0.2004902958869934,
-0.00010132195166079327,
0.1635047197341919,
0.3356972932815552,
0.15305790305137634,
-0.5140166878700256,
0.05789261311292648,
-0.22172453999519348,
-0.1869857758283615,
0.3908294439315796,
0.05127406865358353,
-0.13600222766399384,
-0.18848681449890137,
0.25152334570884705,
-0.03686437010765076,
0.08252296596765518,
0.29104751348495483,
0.34151965379714966,
0.3007698059082031,
0.04864798113703728,
-0.27175241708755493,
0.1139545887708664,
0.007125735282897949,
-0.08742255717515945,
0.0629262924194336,
-0.0883437842130661,
0.24740535020828247,
-0.3249170780181885,
0.2747468054294586,
0.13052785396575928,
0.18897782266139984,
0.10723478347063065,
-0.23472420871257782,
0.08520263433456421,
-0.37354791164398193,
-0.02291567251086235,
0.0741257593035698,
1.122902512550354,
-0.07384427636861801,
-0.036977216601371765,
-0.09252983331680298,
-0.030129823833703995,
0.14391560852527618,
0.32281553745269775,
0.1936647593975067,
-0.2749353051185608,
0.4057672321796417,
-0.16674458980560303,
0.035566337406635284,
-0.4212709963321686,
0.11478415131568909,
-0.2871491312980652,
-0.31325316429138184,
-0.2189348191022873,
0.06411826610565186,
0.14978159964084625,
-0.25981080532073975,
0.31647562980651855,
0.2178134322166443,
-0.11850249767303467,
0.007891539484262466,
-0.1598367989063263,
-0.130367249250412,
0.2807593047618866,
-0.023817703127861023,
0.19586095213890076,
0.18299180269241333,
0.4670097529888153,
0.1767098307609558,
-0.3168862462043762,
0.10966761410236359,
0.17092013359069824,
0.01677841879427433,
0.22984498739242554,
0.008418905548751354,
0.49215829372406006,
-0.034049149602651596,
0.054188940674066544,
-0.0548475980758667,
-0.12638996541500092,
-0.12285780906677246,
-0.01918574422597885,
-0.09528397768735886,
0.20678545534610748,
-0.25021377205848694,
-0.49215713143348694,
0.07190775126218796,
-0.04778807610273361,
0.003969430457800627,
-0.03176567330956459,
0.275480717420578,
-0.12325140833854675,
0.19023919105529785,
-0.007821887731552124,
-0.15434101223945618,
-0.12901060283184052,
-0.2731357514858246,
-0.1326579451560974,
-0.18611589074134827,
-0.11611293256282806,
-0.1457103043794632,
0.2771839201450348,
-0.1337738335132599,
0.01995757222175598,
-0.053340379148721695,
-0.05241536349058151,
0.10463829338550568,
0.14100760221481323,
-0.0751110166311264,
-0.1510220766067505,
0.5110743045806885,
0.15140560269355774,
0.04158616065979004,
-0.1755319982767105,
-0.06259002536535263,
0.11396972090005875,
0.10506346821784973,
-0.048079319298267365,
-0.2690921723842621,
-0.0820116251707077,
0.35280779004096985,
-0.24072979390621185,
-0.16039127111434937,
0.03554537892341614,
0.1725342571735382,
-0.2649419605731964,
-0.24099013209342957,
-0.35977962613105774,
0.1470819115638733,
-0.08693961799144745,
-0.20645146071910858,
0.058594681322574615,
0.44187402725219727,
-0.5368070006370544,
0.17331627011299133,
-0.1522005796432495,
-0.44285494089126587,
0.0662396103143692,
0.030378246679902077,
-0.15591265261173248,
0.26173290610313416,
-0.3835672438144684,
-0.0019249022006988525,
0.36198461055755615,
-0.15297789871692657,
-0.390118271112442,
0.5017070770263672,
-0.30035969614982605,
-0.04690621420741081,
0.12434074282646179,
0.20781072974205017,
0.21160724759101868,
-0.024610504508018494,
-0.1645466685295105,
0.09161639213562012,
0.18818143010139465,
0.045115724205970764,
-0.3271721303462982,
-0.16775675117969513,
-0.0005223564803600311,
0.3220747709274292,
0.2866586148738861,
0.11381199955940247,
0.3829649090766907,
-0.02409679815173149,
0.23830971121788025,
0.05769462138414383,
0.06164290010929108,
0.03471260517835617,
0.0895179733633995,
-0.13079583644866943,
-0.15437714755535126,
-0.09276345372200012,
-0.2833555042743683,
0.020194806158542633,
0.021068084985017776,
0.28690725564956665,
0.08271116763353348,
-0.08866577595472336,
-0.3864225745201111,
-0.18292288482189178,
-0.15254244208335876,
-0.04379099979996681,
0.325194388628006,
0.33722445368766785,
-0.25922244787216187,
0.1964840590953827,
0.09774518013000488,
0.4509098529815674,
-0.1642559915781021,
0.09008532762527466,
0.181962788105011,
0.06081882864236832,
-0.07954767346382141,
0.05627062916755676,
0.08280058205127716,
-0.32990288734436035,
0.035104796290397644,
-0.0017185693141072989,
-0.07237345725297928,
0.3213236629962921,
-0.057665202766656876,
0.13152527809143066,
0.08607783913612366,
-0.2357465773820877,
0.11866629123687744,
-0.3657606244087219,
-0.025473902001976967,
0.1643042117357254,
-0.06659115850925446,
0.009235642850399017,
-0.34660133719444275,
0.02271229773759842,
-0.14072901010513306,
0.0627923309803009,
0.04960835725069046,
0.2804759740829468,
0.28498756885528564,
-0.05500650033354759,
-0.0323420912027359,
-0.05773022770881653,
0.07702799141407013,
0.03248841315507889,
-0.04170210659503937,
-0.10795283317565918,
-0.5037534832954407,
0.17805328965187073,
0.08512994647026062,
0.017063327133655548,
0.005854655057191849,
0.3864443898200989,
0.04884101450443268,
0.11734170466661453,
0.15999463200569153,
0.29005324840545654,
0.234822615981102,
0.354621559381485,
0.05410562828183174,
-0.059655047953128815,
-0.04704812541604042,
-0.21534059941768646,
0.10504856705665588,
-0.02380663901567459,
-0.14462624490261078,
0.14714254438877106,
-0.030776845291256905,
-0.1802191138267517,
-0.314800500869751,
-0.19118469953536987,
0.14631442725658417,
0.3216458261013031,
-0.40934839844703674,
-0.39996281266212463,
-0.10024159401655197,
-0.4268234372138977,
0.08569222688674927,
0.1229955181479454,
-0.1369680017232895,
-0.3708370625972748,
0.12988726794719696,
0.3014574348926544,
-0.2823726534843445,
0.23590640723705292,
-0.5189124941825867,
0.1485416293144226,
0.01247905008494854,
0.29074129462242126,
-0.0664888545870781,
0.08070802688598633,
-0.3111024498939514,
0.22937548160552979,
0.2978205680847168,
-0.1042349711060524,
0.45731785893440247,
-0.35858726501464844,
0.3910391926765442,
-0.34791162610054016,
-0.16419388353824615,
0.14301684498786926,
0.10928162932395935,
0.20754602551460266,
0.16724035143852234,
0.18723982572555542,
-0.1488143652677536,
-0.1984448879957199,
0.15061402320861816,
0.07033649832010269,
-0.07978124171495438,
0.12480634450912476,
0.1173945888876915,
0.14104825258255005,
-0.1055416464805603,
-0.43861904740333557,
-0.26540398597717285,
-0.5396886467933655,
0.17305874824523926,
0.059719961136579514,
0.26502034068107605,
0.26286280155181885,
0.2414383888244629,
0.023088395595550537,
0.19996942579746246,
-0.05872263014316559,
-0.15489977598190308,
-0.3448288142681122,
0.22137637436389923,
-0.3015391230583191,
-0.4741832911968231,
0.1650983989238739,
0.3712541460990906,
0.18669329583644867,
0.14258728921413422,
-0.4826393723487854,
0.12569038569927216,
-0.13558287918567657,
0.13259752094745636,
-0.15157055854797363,
-0.134879469871521,
0.11719081550836563,
0.1954192966222763,
-0.24169540405273438,
-0.09015662223100662,
-0.030020883306860924,
0.20962944626808167,
-0.36713647842407227,
0.012840636074543,
0.04668208956718445,
0.33929482102394104,
0.06426893174648285,
0.3244748115539551,
-0.006351065821945667,
-0.0026225075125694275,
0.33245474100112915,
-0.09493766725063324,
0.47420191764831543,
0.19220660626888275,
-0.27278244495391846,
0.00787811167538166,
0.12227364629507065,
0.006157487630844116,
0.24153053760528564,
0.0497119314968586,
-0.16956408321857452,
-0.3193666636943817,
-0.0965920239686966,
-0.13426747918128967,
-0.36061495542526245,
-0.1062430888414383,
-0.28318169713020325,
0.11276832222938538,
0.13252319395542145,
0.0742027536034584,
-0.014237908646464348,
-0.19093036651611328,
0.04272979497909546,
0.2936955988407135,
0.11625389754772186,
-0.08650851249694824,
-0.22263239324092865,
0.22253979742527008,
-0.26250654458999634,
0.29527175426483154,
-0.03141171485185623,
0.3782363533973694,
-0.1260184943675995,
-0.19920614361763,
0.19495657086372375,
0.16581393778324127,
0.37431395053863525,
-0.4071533679962158,
0.09683144092559814,
0.05622931942343712,
0.3219303488731384,
-0.23426944017410278,
0.061722930520772934,
-0.00975019484758377,
0.26448747515678406,
0.002967093139886856,
0.008014976978302002,
-0.1472875475883484,
-0.2388657182455063,
0.14076459407806396,
-0.1105816662311554,
-0.1456645131111145,
-0.30754557251930237,
-0.08641135692596436,
-0.1533999741077423,
-0.1596447080373764,
0.078803651034832,
-0.10626387596130371,
-0.07869044691324234,
-0.2426634132862091,
-0.12061049044132233,
-0.28485020995140076,
-0.01619439758360386,
0.21762996912002563,
0.21936890482902527,
0.27264460921287537,
-0.005996664986014366,
0.3566909432411194,
0.279455304145813,
0.27208027243614197,
0.30611804127693176,
0.47639456391334534,
-0.34546157717704773,
-0.3463371992111206,
0.33893996477127075,
-0.24142782390117645,
0.15046162903308868,
0.20866182446479797,
-0.05586341395974159,
-0.011003799736499786,
-0.13095968961715698,
0.19840869307518005,
-0.11311659216880798,
0.46534088253974915,
0.0712398961186409,
-0.3161714971065521,
-0.3041510581970215,
-0.30962854623794556,
0.30132192373275757,
-0.07335349917411804,
-0.24259363114833832,
0.22263149917125702,
0.1086660847067833,
-0.162131667137146,
-0.010190010070800781,
-0.02611255645751953,
0.8079425096511841,
-0.12623579800128937,
0.13660423457622528,
0.03834899887442589,
-0.008288230746984482,
0.1983676552772522,
-0.4161869287490845,
0.20809723436832428,
-0.32024526596069336,
-0.024969052523374557,
-0.09445522725582123,
-0.055058736354112625,
-0.02638232707977295,
0.20566435158252716,
-0.20666061341762543,
0.07815103977918625,
0.13391682505607605,
0.3471028804779053,
0.17996227741241455,
0.44731709361076355,
-0.23098640143871307,
-0.1849019080400467,
-0.0874384418129921,
0.23708957433700562,
-0.12953974306583405,
0.1230851262807846,
-0.0537586584687233,
-0.20295196771621704,
0.36159029603004456,
-0.1399826556444168,
-0.15695294737815857,
0.031627826392650604,
-0.2163086235523224,
-0.10765738785266876,
-0.37559518218040466,
-0.3145526647567749,
0.27523595094680786,
0.1602400243282318,
-0.059952229261398315,
0.30784085392951965,
-0.1567074954509735,
0.015984805300831795,
-0.12838831543922424,
0.15745939314365387,
-0.1117720976471901,
0.08218201249837875,
0.1614292860031128,
-0.07332846522331238,
-0.21734586358070374,
0.18035179376602173,
0.03975328430533409,
0.0019693523645401,
-0.04792434722185135,
0.08665331453084946,
0.051560696214437485,
-0.5149786472320557,
0.21645908057689667,
-0.24227869510650635,
-0.15392452478408813,
-0.1047481894493103,
0.2558375597000122,
0.18069282174110413,
-0.07045859098434448,
0.14752477407455444,
0.37811779975891113,
-0.25340431928634644,
0.03229649364948273,
0.43231916427612305,
0.05109383910894394,
-0.10687460750341415,
0.3587643504142761,
-0.09957103431224823,
-0.26212432980537415,
-0.3261321783065796,
0.2023817002773285,
-0.1900138109922409,
-0.40244796872138977,
0.12107575684785843,
-0.012001574970781803,
0.09489583969116211,
0.13097070157527924,
0.041653674095869064,
0.051486384123563766,
-0.03230952471494675,
-0.059908103197813034,
-0.29480165243148804,
-0.41415897011756897,
0.10260327905416489,
-0.2446230798959732,
0.32179170846939087,
-0.07731343805789948,
-0.04009160026907921,
0.20949269831180573,
-0.4006336033344269,
-0.4571748375892639,
0.01887870952486992,
-0.12340866774320602,
-0.08383546024560928,
-0.06994929164648056,
0.1067354679107666,
0.09431058913469315,
-0.04424271732568741,
0.1875961720943451,
0.19704514741897583,
-0.21661365032196045,
-0.22488880157470703,
0.012279599905014038,
0.10914861410856247,
0.07004165649414062,
-0.06730587035417557,
-0.08151856809854507,
-0.20307475328445435,
-0.11271975934505463,
0.18675820529460907,
-0.08029455691576004,
0.012319192290306091,
-0.17809313535690308,
-0.0012745978310704231,
0.02004409208893776,
0.10330872982740402,
-0.09373067319393158,
0.32060542702674866,
0.0377345010638237,
0.3340688645839691,
-0.1455141007900238,
0.1728009432554245,
-0.18584202229976654,
-0.04588492959737778,
0.34208303689956665,
0.20719972252845764,
0.2114398181438446,
0.011876558884978294,
0.12155516445636749,
-0.23822461068630219,
0.09882096946239471,
0.05817472189664841,
0.24119263887405396,
0.262009859085083,
-0.10982615500688553,
-0.3252788484096527,
0.24338752031326294,
0.35412949323654175,
-0.217824786901474,
0.04209655523300171,
-0.12826240062713623,
-0.10013382136821747,
0.0850321352481842,
0.0065011754631996155,
0.026836123317480087,
-0.10061833262443542,
0.4005619287490845,
0.2956482172012329,
0.3100161552429199,
-0.01731571927666664,
-0.12651532888412476,
0.6336441040039062,
-0.25904589891433716,
0.06415844708681107,
0.15979553759098053,
-0.0036628060042858124,
0.027228951454162598,
0.5979931354522705,
-0.3838951587677002,
0.05909895896911621,
-0.22653207182884216,
0.05749896168708801,
0.015209861099720001,
-0.4756309390068054,
0.024419352412223816,
0.2222115695476532,
-0.05442929267883301,
-0.06018122285604477,
0.029128283262252808,
0.3699784576892853,
0.06677326560020447,
0.12212799489498138,
-0.3321452736854553,
-0.02732301875948906,
-0.23704227805137634,
0.12818020582199097,
-0.3460344970226288,
-0.4448922872543335,
-0.17667049169540405,
-0.003586187958717346,
-0.11042946577072144,
-0.09752604365348816,
0.007995247840881348,
0.006009846925735474,
0.029652390629053116,
-0.363922655582428,
-0.15659555792808533,
0.1378212571144104,
0.06866900622844696,
-0.24839578568935394,
0.17180994153022766,
0.2583823800086975,
0.12085217982530594,
0.21578161418437958,
0.330070436000824,
0.33881980180740356,
0.21497400104999542,
-0.032581206411123276,
-0.04208505526185036,
0.004179223440587521,
0.005327409133315086,
-0.1963539719581604,
0.3477252423763275,
0.12398916482925415,
-0.1184973269701004,
0.3363884389400482,
0.2170436978340149,
-0.22200599312782288,
0.18863725662231445,
0.06913170218467712,
-0.12622669339179993,
-0.1120307445526123,
0.08896605670452118,
-0.08453841507434845,
-0.11939272284507751,
-0.12118598818778992,
-0.31586340069770813,
-0.09594172239303589,
0.06490139663219452,
0.41120263934135437,
-0.061566539108753204,
0.07031470537185669,
-0.48011109232902527,
0.1418672800064087,
0.03218216076493263,
0.5627831220626831,
0.28059306740760803,
0.2328154742717743,
-0.28011083602905273,
-0.2127533107995987,
-0.6850682497024536,
0.20865154266357422,
-0.009182427078485489,
-0.17509451508522034,
-0.007329870015382767,
0.03193170577287674,
0.06583486497402191,
0.2654152512550354,
0.2664908766746521,
0.3723950982093811,
-0.10120797902345657,
0.49633148312568665,
-0.07110206037759781,
-0.029829714447259903,
0.1376419961452484,
-0.0301657784730196,
-0.1518159955739975,
-0.41124898195266724,
0.18262018263339996,
-0.062480341643095016,
0.1900988221168518,
-0.24484319984912872,
0.24067378044128418,
0.06423868238925934,
-0.051358677446842194,
0.40779319405555725,
0.07937157154083252,
0.5235286355018616,
0.05184981971979141,
-0.03851187601685524,
-0.15284939110279083,
-0.4274638593196869,
-0.1560637354850769,
0.03403966873884201,
0.3583807945251465,
0.21145176887512207,
0.10309860855340958,
-0.1505485326051712,
-0.17433752119541168,
0.029440248385071754,
-0.012437213212251663,
0.4463941752910614,
-0.17286233603954315,
0.012009968981146812,
-0.015416689217090607,
-0.10525962710380554,
0.017565608024597168,
0.08195914328098297,
0.16556569933891296,
0.04971270263195038,
-0.5185911059379578,
-0.5551526546478271,
0.28974926471710205,
-0.36275118589401245,
-0.1781216561794281,
0.07407110929489136,
0.15221795439720154,
0.102489173412323,
-0.19697469472885132,
-0.35178032517433167,
0.17659789323806763,
0.38324442505836487,
-0.09413086622953415,
0.051847029477357864,
0.1656501293182373,
-0.0204959437251091,
0.01339869573712349,
-0.0699889212846756,
0.389055460691452,
0.18326374888420105,
-0.23053862154483795,
-0.07242518663406372,
-0.1676531583070755
] |
https://github.com/huggingface/datasets/issues/4898 | Dataset Viewer issue for timit_asr | The preview is now disabled (and a descriptive warning is displayed) for datasets requiring manual download. See:

| ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 18 | Dataset Viewer issue for timit_asr
### Link
_No response_
### Description
_No response_
### Owner
_No response_
The preview is now disabled (and a descriptive warning is displayed) for datasets requiring manual download. See:

| [
-0.5423986911773682,
-0.17824333906173706,
-0.10382427275180817,
0.050804805010557175,
0.21838106215000153,
0.027927368879318237,
0.19199340045452118,
0.33082520961761475,
-0.33997681736946106,
0.19646304845809937,
-0.27264806628227234,
0.22909538447856903,
-0.24326322972774506,
0.18418028950691223,
-0.12107175588607788,
0.14152714610099792,
-0.09961021691560745,
0.1638004183769226,
-0.3833233416080475,
0.09748360514640808,
-0.09493086487054825,
0.11146959662437439,
-0.11297693848609924,
0.2341039925813675,
0.19230936467647552,
-0.04211258143186569,
0.25461843609809875,
-0.20880788564682007,
-0.27282291650772095,
-0.5840832591056824,
0.07127536833286285,
0.18879015743732452,
0.12710003554821014,
0.26274624466896057,
-0.00010255737288389355,
0.22757799923419952,
0.33640342950820923,
0.1645728051662445,
-0.3539811670780182,
-0.1201271265745163,
-0.10868299752473831,
-0.024064142256975174,
0.42011550068855286,
0.10445549339056015,
-0.20805105566978455,
-0.23261502385139465,
0.36556553840637207,
-0.08010820299386978,
0.1489832103252411,
0.18282689154148102,
0.3754979074001312,
0.31599217653274536,
-0.07970724999904633,
-0.22995389997959137,
0.11151942610740662,
0.18147994577884674,
-0.2776598334312439,
-0.020309168845415115,
-0.1165996789932251,
0.19056710600852966,
-0.254977285861969,
0.15904198586940765,
0.14779864251613617,
0.13906271755695343,
0.021950609982013702,
-0.09998290240764618,
0.13762103021144867,
-0.38140881061553955,
0.08463551104068756,
0.02839774824678898,
0.9766020774841309,
-0.16702359914779663,
-0.12341708689928055,
0.017790213227272034,
0.010729261673986912,
0.152282252907753,
0.1907121241092682,
0.2074299454689026,
-0.2624443769454956,
0.30941087007522583,
-0.3406852185726166,
-0.008517918176949024,
-0.29928213357925415,
0.10005618631839752,
-0.2019692063331604,
-0.2114030420780182,
-0.2859794795513153,
0.02434306964278221,
0.11342818289995193,
-0.27241212129592896,
0.24388600885868073,
0.08227428793907166,
-0.20048242807388306,
0.036714907735586166,
-0.002706814557313919,
-0.1771903783082962,
0.2299942672252655,
-0.15531998872756958,
0.15226247906684875,
0.24389861524105072,
0.44294628500938416,
0.14495843648910522,
-0.2239343822002411,
0.04010797291994095,
0.18846195936203003,
0.03991159051656723,
0.2498784363269806,
0.1241045817732811,
0.4555146098136902,
0.1135653406381607,
0.2766883671283722,
-0.005835939198732376,
0.015532220713794231,
-0.09011285752058029,
-0.11452709138393402,
-0.2307838797569275,
0.20601485669612885,
-0.34476974606513977,
-0.5529036521911621,
0.07030709832906723,
-0.03873575106263161,
0.11999456584453583,
-0.10488290339708328,
0.15201041102409363,
-0.033990032970905304,
-0.06609466671943665,
0.044488467276096344,
0.04112570732831955,
-0.1509576439857483,
-0.1238114982843399,
-0.1944105327129364,
-0.1712464541196823,
-0.14693015813827515,
-0.11896093934774399,
0.2551167607307434,
-0.06743660569190979,
0.11777181923389435,
0.12044990807771683,
0.024337485432624817,
0.17753633856773376,
-0.012717349454760551,
-0.04361221194267273,
-0.1288224756717682,
0.4721480906009674,
0.08514821529388428,
0.08281783759593964,
-0.06640155613422394,
-0.08663357049226761,
0.12277466803789139,
0.2456357777118683,
0.1284075677394867,
-0.0854395180940628,
-0.022972727194428444,
0.3199639916419983,
-0.37870359420776367,
-0.16487206518650055,
-0.024176545441150665,
0.20177829265594482,
-0.10115586966276169,
-0.0721122995018959,
-0.15686869621276855,
0.07459603250026703,
-0.2660175561904907,
-0.1334109902381897,
0.09189929813146591,
0.33084940910339355,
-0.580534815788269,
0.03471594303846359,
-0.16935686767101288,
-0.512875497341156,
0.06207546591758728,
0.04223383963108063,
-0.18122074007987976,
0.06776794046163559,
-0.3201427161693573,
0.05076234042644501,
0.1429530382156372,
-0.09869340062141418,
-0.46618643403053284,
0.36869335174560547,
-0.2742932438850403,
0.0311762485653162,
0.058569107204675674,
0.043712981045246124,
0.11747587472200394,
-0.10709952563047409,
-0.2939992845058441,
-0.033094458281993866,
0.34222611784935,
-0.050825007259845734,
-0.3405897915363312,
-0.20889821648597717,
0.05849681422114372,
0.2440238744020462,
0.2596855163574219,
0.09968417882919312,
0.26911306381225586,
0.01693301647901535,
0.27512380480766296,
0.24868810176849365,
0.09814464300870895,
0.060674406588077545,
0.025844892486929893,
-0.12552639842033386,
-0.17416107654571533,
-0.15598201751708984,
-0.20537897944450378,
-0.002559136599302292,
0.04653734713792801,
0.17476220428943634,
0.11647313833236694,
-0.13829821348190308,
-0.33384135365486145,
-0.13696806132793427,
-0.21931831538677216,
-0.16108500957489014,
0.320364385843277,
0.35581982135772705,
-0.33316147327423096,
0.28845807909965515,
0.1635533571243286,
0.30783650279045105,
-0.16100765764713287,
-0.025519292801618576,
0.16268979012966156,
-0.004525206983089447,
-0.06916482001543045,
0.0673249363899231,
0.10309453308582306,
-0.26943284273147583,
-0.07376814633607864,
-0.05120591074228287,
-0.08390563726425171,
0.37721776962280273,
-0.16371332108974457,
0.09451756626367569,
0.0849517285823822,
-0.01794983446598053,
0.1425100415945053,
-0.5280174612998962,
0.04356943815946579,
0.13195563852787018,
-0.0680096372961998,
0.04606955498456955,
-0.4020278751850128,
0.01890227198600769,
-0.04222648963332176,
-0.005468055605888367,
0.02355717122554779,
0.23688796162605286,
0.2518150806427002,
-0.10996174812316895,
-0.11361449211835861,
-0.24761022627353668,
0.09706425666809082,
0.0471125990152359,
-0.10537119209766388,
-0.19895099103450775,
-0.350129097700119,
0.25545331835746765,
0.05667302757501602,
0.09261052310466766,
-0.07286734133958817,
0.3779982626438141,
-0.05000404268503189,
0.1179843321442604,
0.0533890426158905,
0.04401613399386406,
0.2600707709789276,
0.2719602584838867,
0.15550793707370758,
0.010440456680953503,
-0.08378738164901733,
-0.1784735769033432,
0.12952889502048492,
0.14280261099338531,
-0.19855155050754547,
0.14807015657424927,
0.040451567620038986,
-0.1833844631910324,
-0.3672485947608948,
-0.09698925912380219,
0.18301810324192047,
0.2498728483915329,
-0.34156835079193115,
-0.2274703085422516,
-0.1920575201511383,
-0.34788385033607483,
0.11195483803749084,
0.006256989203393459,
-0.04801079258322716,
-0.3391267657279968,
0.17295700311660767,
0.3814147114753723,
-0.1893826276063919,
0.3880249261856079,
-0.37907537817955017,
0.1769242286682129,
0.02249220199882984,
0.2973451316356659,
-0.08228152990341187,
0.2710041105747223,
-0.2031129002571106,
0.28912729024887085,
0.2914487421512604,
-0.15774166584014893,
0.46026360988616943,
-0.22802257537841797,
0.3265431523323059,
-0.42643067240715027,
-0.18708184361457825,
0.14962899684906006,
-0.13916561007499695,
0.371762216091156,
0.11830417066812515,
0.04699180647730827,
-0.21556046605110168,
-0.023830600082874298,
0.06590685993432999,
-0.04086422920227051,
-0.21970447897911072,
-0.013547240756452084,
-0.005869604647159576,
-0.10624752938747406,
-0.20584087073802948,
-0.2950100898742676,
-0.13110463321208954,
-0.43519553542137146,
0.17646363377571106,
0.15147770941257477,
0.14763252437114716,
0.32403692603111267,
0.15082620084285736,
0.07114950567483902,
0.23795340955257416,
-0.06601423770189285,
-0.2474588006734848,
-0.3120032846927643,
0.16096501052379608,
-0.3993845582008362,
-0.42164313793182373,
0.18135948479175568,
0.4010409712791443,
0.1537449061870575,
0.12749916315078735,
-0.5120490193367004,
0.28234803676605225,
-0.18835310637950897,
0.18747065961360931,
-0.09249334037303925,
-0.2222958654165268,
0.16618908941745758,
0.14188642799854279,
-0.28546053171157837,
-0.16902005672454834,
0.08288319408893585,
0.19425266981124878,
-0.4564153552055359,
0.07346123456954956,
-0.028504755347967148,
0.1613786816596985,
0.20070309937000275,
0.41562825441360474,
0.14124265313148499,
-0.016704823821783066,
0.16974717378616333,
-0.11244029551744461,
0.5218191146850586,
0.02649231255054474,
-0.15397077798843384,
-0.08324459195137024,
0.10053928941488266,
0.12018878757953644,
0.3037440776824951,
-0.061475999653339386,
-0.2858937382698059,
-0.16628961265087128,
0.1680678278207779,
-0.044965945184230804,
-0.22315402328968048,
-0.10528692603111267,
-0.3274231255054474,
0.18334196507930756,
0.12673278152942657,
0.1231960728764534,
0.07103776931762695,
-0.38029608130455017,
-0.016528138890862465,
0.28951454162597656,
0.040494587272405624,
-0.07767529785633087,
-0.22379016876220703,
0.17064687609672546,
-0.3676498234272003,
0.1514575034379959,
-0.01047238614410162,
0.469828724861145,
-0.27312690019607544,
-0.312139630317688,
0.3276021182537079,
0.18964706361293793,
0.36511528491973877,
-0.3560960590839386,
0.17059218883514404,
0.2840595841407776,
0.14156876504421234,
-0.33537694811820984,
-0.039114225655794144,
-0.19859877228736877,
0.3123118281364441,
-0.004179801791906357,
0.12537793815135956,
0.05741965025663376,
-0.24357524514198303,
0.19996294379234314,
-0.25650617480278015,
-0.08242747187614441,
-0.1265738308429718,
-0.10098996013402939,
-0.056901611387729645,
-0.052715420722961426,
0.08857381343841553,
-0.007392521947622299,
-0.08313581347465515,
-0.37591108679771423,
-0.08079177141189575,
-0.3145110309123993,
-0.018515493720769882,
0.1750504970550537,
0.17306315898895264,
0.27816298604011536,
0.0426730215549469,
0.4366303086280823,
0.3801957070827484,
0.015202019363641739,
0.20914585888385773,
0.380076140165329,
-0.01373068243265152,
-0.27228763699531555,
0.36729031801223755,
-0.2295171469449997,
0.1120033711194992,
0.28004616498947144,
-0.18125426769256592,
-0.11174068599939346,
-0.2542901039123535,
0.22408822178840637,
-0.22183826565742493,
0.38721632957458496,
0.15593162178993225,
-0.35308077931404114,
-0.22282050549983978,
-0.21384090185165405,
0.3964831531047821,
-0.06157835200428963,
-0.22363124787807465,
0.2243872731924057,
-0.04276756942272186,
-0.10499779880046844,
-0.019541960209608078,
0.06845851242542267,
0.7939489483833313,
-0.02699197083711624,
0.1770060956478119,
0.09319224208593369,
0.062116943299770355,
0.012307602912187576,
-0.3708617091178894,
0.15121139585971832,
-0.26531124114990234,
-0.20687808096408844,
-0.07525734603404999,
-0.03834031894803047,
0.15017729997634888,
0.13068415224552155,
-0.16866184771060944,
-0.15613824129104614,
0.10466475784778595,
0.4396001398563385,
0.20959524810314178,
0.14954929053783417,
-0.11788270622491837,
-0.05939457193017006,
0.27669721841812134,
0.2976943850517273,
-0.07620789110660553,
0.14042262732982635,
0.04088316485285759,
-0.04397452622652054,
0.15551641583442688,
0.0020962990820407867,
-0.35877305269241333,
0.10576266795396805,
0.006781787145882845,
0.07059173285961151,
-0.397621750831604,
-0.35848450660705566,
0.40701183676719666,
0.19148418307304382,
-0.1047704666852951,
0.32906028628349304,
-0.2078568935394287,
0.12123984098434448,
-0.009848400950431824,
0.02990696206688881,
-0.11284849047660828,
0.30370989441871643,
0.09298236668109894,
-0.081916943192482,
-0.11659622937440872,
0.18509046733379364,
0.14648938179016113,
0.07221976667642593,
-0.20757518708705902,
-0.03679538518190384,
0.14782480895519257,
-0.5998663306236267,
0.29776236414909363,
-0.2466808259487152,
-0.052669376134872437,
-0.2193746715784073,
0.2673691511154175,
0.04760491102933884,
-0.05671713128685951,
0.11407575756311417,
0.2371748834848404,
-0.3278762698173523,
-0.004068050533533096,
0.5382247567176819,
0.07184053212404251,
-0.04342560097575188,
0.42748814821243286,
-0.08320808410644531,
-0.3249242305755615,
-0.3701901137828827,
0.17284196615219116,
-0.2095448076725006,
-0.29535534977912903,
0.1560278832912445,
-0.07710136473178864,
0.15595386922359467,
0.14450299739837646,
0.10057106614112854,
0.03382200747728348,
-0.21948695182800293,
-0.2105368971824646,
-0.29291149973869324,
-0.2068205028772354,
0.007373809814453125,
-0.2547324299812317,
0.48075437545776367,
-0.19826459884643555,
-0.00942155160009861,
0.21487130224704742,
-0.3300366699695587,
-0.44606032967567444,
0.09579666703939438,
-0.15801146626472473,
-0.0483643040060997,
-0.03484309837222099,
0.079707071185112,
0.13633625209331512,
-0.004171987064182758,
0.20053014159202576,
0.23594868183135986,
-0.31312960386276245,
-0.2854367792606354,
-0.13146907091140747,
0.07440543919801712,
0.07464534044265747,
-0.2391846776008606,
0.04981338977813721,
-0.010186530649662018,
-0.1916816383600235,
0.20489533245563507,
0.06115557625889778,
0.013503674417734146,
-0.063889279961586,
0.1411769986152649,
0.061916790902614594,
-0.019767045974731445,
0.17361263930797577,
0.09970402717590332,
0.09023287892341614,
0.3552857041358948,
0.007136278320103884,
0.15925011038780212,
-0.14697177708148956,
-0.0719999447464943,
0.15321099758148193,
0.1676720678806305,
0.16876545548439026,
0.11115793138742447,
0.014919504523277283,
-0.3272862434387207,
0.24027645587921143,
0.034780219197273254,
0.2852417230606079,
0.2734818160533905,
-0.2035582810640335,
-0.34090739488601685,
0.31180909276008606,
0.3084927499294281,
-0.2265893816947937,
-0.06951134651899338,
-0.22201590240001678,
0.11840090900659561,
0.09875904023647308,
-0.04079044610261917,
0.004200514405965805,
0.01122506707906723,
0.4446350336074829,
0.19500109553337097,
0.23962831497192383,
-0.020612243562936783,
0.09985452890396118,
0.7125380635261536,
-0.25919610261917114,
-0.04051006957888603,
0.10993334650993347,
0.09143803268671036,
-0.056862927973270416,
0.7342111468315125,
-0.0724489614367485,
0.06486917287111282,
-0.38615694642066956,
0.16022202372550964,
0.011009573936462402,
-0.4118873178958893,
-0.052148159593343735,
0.22139382362365723,
-0.1258084923028946,
0.09979595243930817,
0.09000620990991592,
0.3949476182460785,
0.1301468461751938,
0.10392093658447266,
-0.3451659381389618,
0.022630341351032257,
-0.22877803444862366,
0.07836176455020905,
-0.3706541657447815,
-0.33653587102890015,
-0.14030972123146057,
0.1620231419801712,
-0.16813397407531738,
-0.06544078886508942,
0.14697043597698212,
0.0234634131193161,
-0.12117239832878113,
-0.3397678732872009,
0.0032787732779979706,
0.05805350840091705,
0.0381440594792366,
-0.18944883346557617,
0.09866584092378616,
0.19178131222724915,
0.18522891402244568,
0.10387927293777466,
0.3746753931045532,
0.2653757631778717,
0.0267470832914114,
-0.002330359071493149,
-0.06623508036136627,
-0.18498189747333527,
-0.05162975192070007,
-0.08440166711807251,
0.35564619302749634,
0.170080304145813,
-0.1318831443786621,
0.2933589220046997,
0.19617097079753876,
-0.21695038676261902,
0.23077575862407684,
0.1039150059223175,
-0.035819754004478455,
-0.14668385684490204,
0.10397345572710037,
-0.10954706370830536,
-0.09495625644922256,
0.09880243986845016,
-0.47561410069465637,
-0.06514739245176315,
-0.004479656927287579,
0.3261464834213257,
-0.03915616497397423,
0.09126084297895432,
-0.4638828933238983,
0.14807981252670288,
0.10360811650753021,
0.5319518446922302,
0.19072842597961426,
0.11376506090164185,
-0.20879419147968292,
-0.4091891646385193,
-0.5061078071594238,
0.19955021142959595,
-0.004135109484195709,
-0.14201222360134125,
0.06716360151767731,
0.025465352460741997,
0.03096313774585724,
0.39891743659973145,
0.3008567690849304,
0.28426459431648254,
-0.20032812654972076,
0.4958692193031311,
-0.11998310685157776,
-0.037701841443777084,
0.08074580878019333,
0.010149122215807438,
-0.15548087656497955,
-0.2992316782474518,
0.09503618627786636,
-0.04493831470608711,
0.1786256730556488,
-0.2951303720474243,
0.1710403859615326,
0.04004858806729317,
0.03482756018638611,
0.43200862407684326,
0.007235419936478138,
0.3274584114551544,
0.07116585224866867,
-0.06948833912611008,
-0.21462655067443848,
-0.33581817150115967,
-0.16502338647842407,
0.10549849271774292,
0.3147941827774048,
0.25052934885025024,
-0.07577505707740784,
-0.13294370472431183,
-0.006959378719329834,
-0.055026330053806305,
0.04241175204515457,
0.37972491979599,
-0.241646870970726,
-0.03561405837535858,
-0.00045314058661460876,
-0.0829944908618927,
0.05739450082182884,
0.24540957808494568,
0.09235355257987976,
0.08859443664550781,
-0.535287618637085,
-0.5772119760513306,
0.2730397880077362,
-0.29040011763572693,
-0.25125715136528015,
0.2042936086654663,
-0.017080038785934448,
-0.03829754889011383,
-0.30371734499931335,
-0.3292261064052582,
0.10987798124551773,
0.33581122756004333,
-0.13888347148895264,
0.11433111131191254,
0.23083283007144928,
-0.06557947397232056,
-0.0023406855762004852,
-0.1551596075296402,
0.7156980037689209,
0.22343435883522034,
-0.1286802440881729,
0.039287615567445755,
-0.22341158986091614
] |
https://github.com/huggingface/datasets/issues/4897 | datasets generate large arrow file | Hi ! The cache files are the results of all the transforms you applied to the dataset using `map` for example.
Did you run a transform that could potentially blow up the size of the dataset ? | Checking the large file in disk, and found the large cache file in the cifar10 data directory:

As we know, the size of cifar10 dataset is ~130MB, but the cache file has almost 30GB size, there may be some problems here. | 37 | datasets generate large arrow file
Checking the large file in disk, and found the large cache file in the cifar10 data directory:

As we know, the size of cifar10 dataset is ~130MB, but the cache file has almost 30GB size, there may be some problems here.
Hi ! The cache files are the results of all the transforms you applied to the dataset using `map` for example.
Did you run a transform that could potentially blow up the size of the dataset ? | [
-0.4616396725177765,
-0.2394554316997528,
-0.17766296863555908,
0.45532381534576416,
0.15048417448997498,
0.020401746034622192,
0.03904127702116966,
0.25771966576576233,
0.08392596244812012,
0.13997727632522583,
-0.16053983569145203,
0.10484838485717773,
-0.001942112110555172,
0.023272408172488213,
-0.04050866514444351,
0.15077698230743408,
-0.034359775483608246,
0.17563337087631226,
-0.5455708503723145,
-0.06860271841287613,
-0.03562241047620773,
0.19949528574943542,
0.16394415497779846,
0.01487741619348526,
-0.5723364353179932,
-0.4097660481929779,
0.06022142618894577,
0.06772099435329437,
-0.36936262249946594,
-0.2072843611240387,
0.07499895244836807,
-0.1703435778617859,
-0.0211127158254385,
0.45661792159080505,
-0.00010438180470373482,
-0.06737975776195526,
0.3240630626678467,
0.002682885155081749,
-0.027247194200754166,
0.39251911640167236,
-0.06344135105609894,
-0.04213966429233551,
-0.07202447205781937,
-0.14879168570041656,
0.06702373176813126,
-0.14964371919631958,
-0.2905844748020172,
-0.43119028210639954,
0.3489419221878052,
0.23779693245887756,
0.391404926776886,
-0.2539828419685364,
-0.22518880665302277,
0.03614560514688492,
0.34342971444129944,
0.043812114745378494,
-0.1841311901807785,
-0.13126111030578613,
0.15505048632621765,
0.13965553045272827,
-0.29136285185813904,
0.3668157756328583,
0.07061569392681122,
-0.027746811509132385,
0.24408555030822754,
-0.07598999887704849,
-0.05917345732450485,
-0.3558591306209564,
0.5330415964126587,
0.23270371556282043,
0.6296050548553467,
0.0028047561645507812,
0.0007234769873321056,
-0.01403908059000969,
-0.05372168496251106,
-0.037087999284267426,
0.13261191546916962,
0.21461649239063263,
0.0184258334338665,
0.05237039178609848,
-0.29498156905174255,
-0.008415616117417812,
-0.03610770031809807,
-0.2528578042984009,
-0.06242280453443527,
-0.4849742352962494,
-0.34984853863716125,
-0.042278654873371124,
0.10741531848907471,
-0.2819821834564209,
0.06758242845535278,
-0.07742209732532501,
-0.25798311829566956,
-0.015645474195480347,
-0.2637327015399933,
-0.06300745159387589,
-0.051470860838890076,
0.43680116534233093,
0.19786694645881653,
-0.018459632992744446,
0.3861542046070099,
-0.0679333359003067,
0.08957910537719727,
-0.22668829560279846,
-0.0704217404127121,
0.30529025197029114,
-0.32037878036499023,
-0.15076632797718048,
-0.030385874211788177,
-0.30255526304244995,
-0.3225213885307312,
-0.13698193430900574,
-0.09774739295244217,
-0.3127865493297577,
0.21056775748729706,
-0.22372272610664368,
-0.06160368025302887,
-0.3246932923793793,
0.11489220708608627,
0.10582932084798813,
0.3891811668872833,
0.21770581603050232,
0.08177319914102554,
0.3488261103630066,
0.049086228013038635,
0.10373473167419434,
-0.04831358417868614,
-0.14341853559017181,
-0.17357933521270752,
-0.02869187667965889,
-0.24984443187713623,
-0.004770183935761452,
-0.17990919947624207,
0.09073220193386078,
0.15609274804592133,
-0.16415929794311523,
0.175985187292099,
-0.06487058103084564,
-0.012184806168079376,
-0.07463311403989792,
0.3271532654762268,
-0.24033445119857788,
0.43400633335113525,
0.39245933294296265,
-0.17221873998641968,
0.08245949447154999,
-0.05850109085440636,
0.09433402121067047,
-0.09469320625066757,
0.2617128789424896,
-0.4421505928039551,
-0.40592336654663086,
-0.10881611704826355,
0.32321062684059143,
-0.08302772045135498,
0.1321064531803131,
-0.1880171000957489,
-0.20424260199069977,
0.2803182303905487,
-0.021353790536522865,
0.12302522361278534,
-0.14493374526500702,
-0.22330288589000702,
-0.1528056263923645,
-0.04533739387989044,
0.24927672743797302,
-0.37663534283638,
0.3059850037097931,
-0.37516239285469055,
0.10093286633491516,
0.0018780380487442017,
0.3721597492694855,
-0.13949987292289734,
0.09907369315624237,
-0.3577542304992676,
0.08367712795734406,
0.40519917011260986,
-0.23231622576713562,
-0.5823948383331299,
0.2034309059381485,
-0.09088622033596039,
-0.05051631107926369,
0.1568118780851364,
0.11836499720811844,
0.3876122832298279,
0.007568745873868465,
0.13630890846252441,
0.10403766483068466,
0.03709527105093002,
0.16926786303520203,
-0.35327231884002686,
-0.30263927578926086,
-0.2653196454048157,
0.012952592223882675,
0.07108581811189651,
-0.13381963968276978,
0.2059386670589447,
-0.10809218138456345,
0.07189539819955826,
-0.13037681579589844,
0.07286562025547028,
0.37942856550216675,
0.1192564070224762,
-0.26219993829727173,
0.18490910530090332,
0.033261604607105255,
-0.07419858127832413,
0.1716286838054657,
-0.13236087560653687,
-0.3536643087863922,
0.10155228525400162,
-0.26207947731018066,
-0.1412191092967987,
-0.13469944894313812,
-0.1885915994644165,
-0.037078212946653366,
0.25561898946762085,
-0.02517317235469818,
0.14958098530769348,
-0.24203082919120789,
0.16202978789806366,
0.2754468321800232,
-0.012549536302685738,
-0.17435839772224426,
-0.3526857793331146,
-0.09966203570365906,
-0.061718590557575226,
0.014960762113332748,
-0.012235347181558609,
-0.13971245288848877,
-0.019255444407463074,
-0.029405640438199043,
-0.19040349125862122,
0.003101348876953125,
-0.0107609573751688,
0.16019871830940247,
0.04245159029960632,
0.3198240399360657,
0.0381382554769516,
-0.24999019503593445,
0.320258766412735,
0.033427122980356216,
0.07080555707216263,
-0.07838001102209091,
0.0030781663954257965,
0.1134624183177948,
-0.23451180756092072,
-0.012861952185630798,
-0.057570211589336395,
-0.01336929015815258,
0.23871082067489624,
-0.03345904126763344,
0.22428396344184875,
-0.17297276854515076,
-0.07059377431869507,
-0.012237008661031723,
0.6076341271400452,
0.30298715829849243,
0.26951512694358826,
0.4087372422218323,
0.43354395031929016,
-0.003163561224937439,
-0.0190175399184227,
0.19628486037254333,
-0.3820561468601227,
-0.1466062366962433,
0.09121423214673996,
0.4474952518939972,
0.42909765243530273,
0.27452585101127625,
0.14209860563278198,
-0.04667862504720688,
0.25088781118392944,
-0.08791761845350266,
0.4360251724720001,
0.00804099440574646,
0.30944809317588806,
0.2912180423736572,
0.16056904196739197,
-0.07974782586097717,
-0.4773528575897217,
-0.1504785418510437,
0.043949782848358154,
0.20460863411426544,
-0.1362275332212448,
0.15294106304645538,
-0.1634431779384613,
0.03863418847322464,
-0.0840979740023613,
0.10303521901369095,
0.11942760646343231,
-0.08346067368984222,
0.10263222455978394,
-0.03683682158589363,
-0.07355324923992157,
0.035725004971027374,
-0.17115633189678192,
0.4279681444168091,
0.26637235283851624,
0.1920366734266281,
-0.18234620988368988,
-0.16235870122909546,
-0.18503838777542114,
0.1765480935573578,
0.1676534116268158,
-0.17053891718387604,
0.14547263085842133,
-0.2097034454345703,
0.3549186587333679,
-0.3117678761482239,
-0.17360305786132812,
0.18612255156040192,
-0.0051779597997665405,
0.009613579139113426,
-0.09218883514404297,
0.2031937837600708,
-0.03855268657207489,
-0.07756572216749191,
-0.14921952784061432,
-0.1808239370584488,
-0.3610655963420868,
0.1227789968252182,
-0.3555482029914856,
-0.07923437654972076,
-0.17769044637680054,
-0.2270154058933258,
-0.1556767225265503,
-0.35042354464530945,
0.14605960249900818,
-0.12446554005146027,
0.1177329570055008,
0.47742196917533875,
0.1110176369547844,
0.10234320163726807,
0.08220212906599045,
0.12076923251152039,
-0.3268778920173645,
-0.6254187822341919,
0.46964025497436523,
-0.3747222423553467,
-0.2894749641418457,
0.07474617660045624,
0.007599346339702606,
0.13957127928733826,
0.19110725820064545,
-0.5308730006217957,
0.122140072286129,
-0.45002758502960205,
-0.013662459328770638,
-0.05109141767024994,
-0.09877637028694153,
0.23288069665431976,
0.006730540189892054,
-0.21908675134181976,
-0.0894567146897316,
0.08902323246002197,
0.05833785608410835,
-0.16503283381462097,
0.3281768560409546,
-0.37667787075042725,
0.24719789624214172,
-0.010636730119585991,
0.31106895208358765,
0.20927564799785614,
-0.09680061042308807,
0.040273040533065796,
0.09799106419086456,
0.41573867201805115,
-0.3957279622554779,
-0.0706227719783783,
0.23011283576488495,
-0.10849013924598694,
-0.25463801622390747,
0.33488357067108154,
0.22409260272979736,
-0.07412970811128616,
0.29349857568740845,
-0.09757697582244873,
-0.16729457676410675,
-0.23070117831230164,
0.2839401066303253,
-0.16752368211746216,
-0.024683505296707153,
0.06497184932231903,
-0.07351032644510269,
-0.2971092164516449,
-0.24507200717926025,
-0.005841787438839674,
0.01634887605905533,
0.030708592385053635,
0.06514667719602585,
-0.05292613431811333,
0.15091969072818756,
-0.29749414324760437,
0.21776697039604187,
-0.08702560514211655,
-0.03098195418715477,
-0.11643600463867188,
-0.05279816687107086,
0.10565375536680222,
-0.09939979761838913,
0.519748330116272,
-0.15115922689437866,
0.12895795702934265,
0.01580333709716797,
-0.03038138337433338,
-0.31260043382644653,
-0.04176606237888336,
0.024643268436193466,
0.18090380728244781,
0.3310787081718445,
0.20769982039928436,
0.025007769465446472,
0.0024866729509085417,
-0.018169157207012177,
0.40845105051994324,
-0.1812180131673813,
0.02787226438522339,
-0.24495360255241394,
-0.3164651095867157,
-0.04157427325844765,
0.034922901540994644,
0.04952652007341385,
-0.10048617422580719,
-0.0515553280711174,
-0.32196280360221863,
-0.1981908529996872,
-0.1366380751132965,
0.041597481817007065,
0.094963937997818,
0.5298740267753601,
0.028005054220557213,
0.2877086102962494,
-0.04367964714765549,
0.33869102597236633,
0.1283266544342041,
0.4911886155605316,
0.12449292838573456,
0.12391817569732666,
0.18663257360458374,
-0.28497549891471863,
-0.1843305230140686,
0.1987382471561432,
-0.14449860155582428,
-0.11188863962888718,
0.001292666420340538,
0.3272833824157715,
-0.04174969345331192,
0.18981611728668213,
-0.009181087836623192,
0.07520534098148346,
-0.24907957017421722,
-0.015935178846120834,
0.29919788241386414,
0.19582319259643555,
-0.08653052896261215,
0.6119943261146545,
-0.1157970279455185,
-0.10488610714673996,
0.38546568155288696,
0.16946887969970703,
0.8857446908950806,
-0.1653463989496231,
0.0939529612660408,
-0.05575728416442871,
-0.06170050799846649,
0.19593098759651184,
-0.23848119378089905,
-0.04401278868317604,
-0.19504518806934357,
-0.4200385510921478,
0.14800891280174255,
-0.03330381214618683,
-0.12964633107185364,
0.2207861840724945,
-0.16030514240264893,
0.02129521407186985,
-0.07107841968536377,
0.19384317100048065,
-0.1636146456003189,
0.14583958685398102,
-0.07738325744867325,
-0.09681588411331177,
0.09428815543651581,
0.31086137890815735,
-0.10857479274272919,
-0.03305138275027275,
-0.06549273431301117,
0.0062917014583945274,
-0.03810078650712967,
-0.10653214156627655,
-0.13531072437763214,
0.0787661075592041,
-0.25074106454849243,
0.3551192879676819,
-0.18849362432956696,
-0.4105997085571289,
-0.05219351127743721,
0.12140960991382599,
0.08720292150974274,
0.19439125061035156,
-0.21044476330280304,
0.4574715495109558,
0.1534338891506195,
-0.030439015477895737,
-0.06861378997564316,
-0.3268541097640991,
-0.05823267996311188,
-0.14454728364944458,
-0.1789296567440033,
-0.09110190719366074,
-0.06561774015426636,
-0.15724124014377594,
0.17527556419372559,
0.1951562613248825,
0.06432711333036423,
-0.0032935477793216705,
-0.2366192489862442,
-0.06474390625953674,
-0.3624483644962311,
0.13891245424747467,
0.23979756236076355,
0.042497292160987854,
0.06711000949144363,
0.4300842881202698,
0.1557314693927765,
-0.508486270904541,
-0.08126725256443024,
0.10497037321329117,
0.09403829276561737,
-0.024535203352570534,
0.31990906596183777,
-0.22102676331996918,
-0.2805209159851074,
-0.24872088432312012,
0.054357513785362244,
0.08057845383882523,
-0.43403181433677673,
-0.032951828092336655,
-0.06930478662252426,
-0.13376498222351074,
0.13118717074394226,
0.10830163955688477,
0.2616991400718689,
-0.017160773277282715,
-0.2101701945066452,
-0.1559523642063141,
-0.5361149907112122,
0.07885333150625229,
-0.31993845105171204,
0.3332386314868927,
0.003584623336791992,
-0.24503447115421295,
0.020295774564146996,
0.30342739820480347,
-0.40552401542663574,
0.3545430898666382,
-0.04185561090707779,
0.05659745633602142,
-0.14694297313690186,
-0.2783842384815216,
0.060155097395181656,
-0.08771096169948578,
0.07736074924468994,
0.24612177908420563,
-0.2657869756221771,
-0.3884313404560089,
0.03601017966866493,
0.056836530566215515,
-0.07693927735090256,
-0.0773756355047226,
-0.11209218204021454,
-0.0838223397731781,
-0.13758563995361328,
-0.19654302299022675,
0.3040265142917633,
0.06715051829814911,
0.09348271042108536,
-0.27071529626846313,
-0.24894733726978302,
-0.4561785161495209,
-0.17887389659881592,
0.10904448479413986,
0.13665126264095306,
0.099197156727314,
0.13371457159519196,
0.18007498979568481,
-0.03789762780070305,
-0.20705260336399078,
-0.09458610415458679,
0.17742402851581573,
-0.11282914876937866,
0.08535641431808472,
0.3118167221546173,
-0.07223120331764221,
0.08272045850753784,
0.28943416476249695,
0.021046366542577744,
0.2101646065711975,
0.04631635546684265,
-0.1639002114534378,
0.02078869193792343,
0.3168545067310333,
-0.1587543934583664,
-0.18793383240699768,
0.01656215824186802,
0.00439867889508605,
-0.029723787680268288,
0.100581094622612,
0.1824561208486557,
-0.25881898403167725,
0.25451788306236267,
0.18655753135681152,
0.44904106855392456,
-0.1912001669406891,
0.01620880700647831,
0.022810082882642746,
0.08792050182819366,
0.011387187987565994,
0.36978277564048767,
0.0621081106364727,
0.20723238587379456,
0.603344202041626,
-0.02057371288537979,
0.3240838944911957,
0.140840083360672,
0.08827356994152069,
-0.19684326648712158,
-0.4579015076160431,
0.17838625609874725,
0.20182447135448456,
-0.19970712065696716,
0.12401169538497925,
0.2912549078464508,
0.05783604085445404,
0.2717241048812866,
-0.42186450958251953,
-0.4156833589076996,
0.08662460744380951,
-0.30548733472824097,
0.06008411571383476,
0.011329922825098038,
-0.0983324646949768,
0.20077693462371826,
0.2489801049232483,
-0.1375427097082138,
0.3466072082519531,
0.30099916458129883,
0.1526167094707489,
-0.1035563051700592,
0.06811119616031647,
0.04135938361287117,
0.2432217299938202,
0.05627783015370369,
-0.14955291152000427,
0.4304977059364319,
0.2533119320869446,
0.09294925630092621,
0.023089420050382614,
0.40565595030784607,
0.4747002124786377,
0.2880650758743286,
0.037228893488645554,
0.19198982417583466,
0.22380304336547852,
-0.14275845885276794,
-0.36077702045440674,
0.03713636472821236,
0.1903725415468216,
-0.28385481238365173,
0.22539038956165314,
0.2548970580101013,
-0.2697697877883911,
0.05399447679519653,
-0.0908108502626419,
0.10613499581813812,
0.11736851930618286,
-0.4021056592464447,
0.024693161249160767,
-0.15774528682231903,
-0.3659101128578186,
0.045062106102705,
-0.3268163204193115,
0.24819929897785187,
0.5902431011199951,
-0.30477261543273926,
0.07948976010084152,
-0.12663055956363678,
0.11962267756462097,
-0.13702458143234253,
0.5524961948394775,
0.25585705041885376,
0.18073338270187378,
-0.0568409338593483,
-0.2632858157157898,
-0.47925865650177,
0.18051409721374512,
-0.36325255036354065,
0.3660663068294525,
-0.0059648361057043076,
0.2751997411251068,
0.024721644818782806,
-0.002817109227180481,
0.49419599771499634,
-0.11316578835248947,
-0.06379212439060211,
0.1725189983844757,
-0.4842130243778229,
0.08196638524532318,
0.29027658700942993,
0.0899793952703476,
0.07625211030244827,
-0.47931963205337524,
0.15794731676578522,
0.18916748464107513,
0.2444126307964325,
0.10687278211116791,
-0.05283328518271446,
-0.2565285265445709,
-0.06430429220199585,
0.3469504415988922,
0.11772530525922775,
0.14995676279067993,
-0.11122313886880875,
-0.0868586078286171,
-0.2626197338104248,
-0.14853578805923462,
0.167532816529274,
0.1507139652967453,
0.39194878935813904,
0.2568575441837311,
-0.06659859418869019,
-0.08563099801540375,
-0.008794563822448254,
0.01737632416188717,
0.05976087599992752,
0.20985527336597443,
-0.16963595151901245,
0.06301510334014893,
-0.2369767725467682,
0.26242703199386597,
0.04695737734436989,
0.44551387429237366,
-0.11988742649555206,
0.08161180466413498,
-0.048012055456638336,
-0.37266409397125244,
0.4650600254535675,
-0.15926311910152435,
-0.27181461453437805,
0.24114298820495605,
0.36656254529953003,
0.3471573293209076,
-0.1043354943394661,
-0.07066181302070618,
0.15617889165878296,
0.09857835620641708,
-0.16099461913108826,
-0.18977218866348267,
0.1945473700761795,
-0.2048308551311493,
0.14094524085521698,
-0.09999735653400421,
0.8314855098724365,
0.08624826371669769,
-0.16841010749340057,
-0.19054372608661652,
-0.2806517481803894
] |
https://github.com/huggingface/datasets/issues/4897 | datasets generate large arrow file | @lhoestq,
I don't remember, but I can't imagine what kind of transform may generate data that grow over 200 times in size.
I think maybe it doesn' matter, it's just cache after all. | Checking the large file in disk, and found the large cache file in the cifar10 data directory:

As we know, the size of cifar10 dataset is ~130MB, but the cache file has almost 30GB size, there may be some problems here. | 33 | datasets generate large arrow file
Checking the large file in disk, and found the large cache file in the cifar10 data directory:

As we know, the size of cifar10 dataset is ~130MB, but the cache file has almost 30GB size, there may be some problems here.
@lhoestq,
I don't remember, but I can't imagine what kind of transform may generate data that grow over 200 times in size.
I think maybe it doesn' matter, it's just cache after all. | [
-0.34047555923461914,
-0.24572636187076569,
-0.1616014689207077,
0.4434879422187805,
0.0819568857550621,
-0.09782885760068893,
0.11157429218292236,
0.2064029574394226,
0.05085295811295509,
0.08592820167541504,
-0.07221105694770813,
0.07038772851228714,
0.00771119212731719,
0.0853307917714119,
0.18398301303386688,
0.10557408630847931,
0.16290807723999023,
0.12938416004180908,
-0.7458082437515259,
-0.09736549854278564,
-0.1610669493675232,
0.21387363970279694,
0.1154157817363739,
-0.033691562712192535,
-0.5675488710403442,
-0.19307032227516174,
0.07657906413078308,
0.07435911893844604,
-0.37541237473487854,
-0.14856024086475372,
-0.03334074094891548,
-0.26087456941604614,
-0.11080753058195114,
0.5628519654273987,
-0.00011020670353900641,
-0.045850466936826706,
0.299877405166626,
-0.07817357778549194,
-0.07645155489444733,
0.3067074418067932,
-0.08253049850463867,
-0.03257571905851364,
-0.305450439453125,
-0.2516336143016815,
0.15055882930755615,
-0.19932612776756287,
-0.2568115293979645,
-0.31572115421295166,
0.3728569746017456,
0.2469983696937561,
0.3157425820827484,
-0.32540038228034973,
-0.19607636332511902,
-0.08362051099538803,
0.32758140563964844,
0.18590624630451202,
-0.10177189111709595,
-0.20836631953716278,
0.1518542766571045,
0.28143975138664246,
-0.20748686790466309,
0.24175392091274261,
0.1642005443572998,
-0.16127467155456543,
0.2365199327468872,
-0.12126118689775467,
-0.13165849447250366,
-0.3440706729888916,
0.6369109153747559,
0.3393191695213318,
0.5020337700843811,
-0.021132811903953552,
-0.04090125858783722,
0.07004507631063461,
-0.18174688518047333,
0.14358679950237274,
0.11059941351413727,
0.264327734708786,
0.10882912576198578,
0.04818737506866455,
-0.3762646019458771,
-0.009834024123847485,
-0.02393098548054695,
-0.2324001044034958,
-0.3360669016838074,
-0.4424789249897003,
-0.33962178230285645,
0.04776474088430405,
0.06020941585302353,
-0.31618988513946533,
0.1622713953256607,
-0.12760625779628754,
-0.09970031678676605,
0.009557711891829967,
-0.13431738317012787,
-0.016523487865924835,
-0.14717453718185425,
0.36731427907943726,
0.20761966705322266,
-0.04392063617706299,
0.37174054980278015,
-0.15510299801826477,
-0.023269034922122955,
-0.18044811487197876,
-0.13165625929832458,
0.38024014234542847,
-0.4219356179237366,
-0.20373058319091797,
-0.09126579761505127,
-0.3269548714160919,
-0.31104427576065063,
-0.08344165235757828,
-0.151170551776886,
-0.22361981868743896,
0.09888942539691925,
-0.34433168172836304,
-0.18413186073303223,
-0.2379213124513626,
0.07424867153167725,
0.10447920113801956,
0.30858519673347473,
0.23404671251773834,
0.022720560431480408,
0.247361958026886,
0.17451325058937073,
0.13188353180885315,
-0.011231468990445137,
-0.17589880526065826,
0.05684288591146469,
-0.04560226574540138,
-0.24722403287887573,
-0.003476204350590706,
-0.18338792026042938,
0.07303164899349213,
0.13964982330799103,
-0.0090184286236763,
0.18007977306842804,
-0.08861435949802399,
0.05486706644296646,
0.019484199583530426,
0.23490607738494873,
-0.12195999920368195,
0.5984615087509155,
0.44186317920684814,
-0.3114595115184784,
-0.009113513864576817,
-0.04172218218445778,
0.1550733596086502,
-0.13846488296985626,
0.37711766362190247,
-0.4248737692832947,
-0.3211641013622284,
-0.02928139455616474,
0.28572094440460205,
-0.20605772733688354,
0.08616435527801514,
-0.20741218328475952,
-0.15217135846614838,
0.19838295876979828,
-0.12200978398323059,
0.3338155746459961,
-0.1286281794309616,
-0.08525441586971283,
-0.10048522800207138,
-0.13646385073661804,
0.10770364105701447,
-0.40970906615257263,
0.18344299495220184,
-0.2552173435688019,
0.07132546603679657,
-0.0893583819270134,
0.33894917368888855,
-0.15902745723724365,
-0.07267401367425919,
-0.32381370663642883,
0.0960843563079834,
0.41599440574645996,
-0.18560084700584412,
-0.48004934191703796,
0.17766690254211426,
-0.11801347881555557,
-0.053589463233947754,
0.19765177369117737,
0.17149540781974792,
0.43746352195739746,
-0.13848695158958435,
0.0005047917366027832,
0.1891215443611145,
0.16687892377376556,
0.13100066781044006,
-0.25353220105171204,
-0.40136462450027466,
-0.2280593365430832,
-0.12126755714416504,
0.14080248773097992,
-0.013938181102275848,
0.27629926800727844,
0.030246712267398834,
0.07530277967453003,
-0.12632708251476288,
0.11051815748214722,
0.2529745101928711,
-0.04041149094700813,
-0.33547985553741455,
0.2854631245136261,
0.07355347275733948,
0.07806165516376495,
0.10278391093015671,
-0.22848665714263916,
-0.324038565158844,
0.1273859590291977,
-0.2591361403465271,
-0.23409005999565125,
-0.024218203499913216,
0.05426023155450821,
0.027455981820821762,
0.18235917389392853,
-0.0025048479437828064,
0.18816052377223969,
-0.219613179564476,
0.22257469594478607,
0.2664167881011963,
-0.02362465113401413,
-0.2054583579301834,
-0.4129802882671356,
-0.10961519926786423,
0.05435575917363167,
0.1447882056236267,
-0.11578457057476044,
-0.13323059678077698,
0.02690470963716507,
-0.1511569619178772,
-0.0982004925608635,
-0.03962749242782593,
-0.12548573315143585,
0.2953967750072479,
-0.02928224951028824,
0.4905439019203186,
0.09778955578804016,
-0.2232774794101715,
0.3831506073474884,
0.07287174463272095,
0.07686995714902878,
-0.05843646079301834,
-0.07398634403944016,
0.12718303501605988,
-0.23322798311710358,
-0.03856781870126724,
0.05212046951055527,
0.07382873445749283,
0.15254300832748413,
-0.05894190073013306,
0.10062805563211441,
-0.16410404443740845,
-0.05286161229014397,
0.05713092163205147,
0.5726855397224426,
0.3311024606227875,
0.3714025914669037,
0.48523327708244324,
0.5024105906486511,
-0.1749846339225769,
-0.06730519980192184,
0.19536679983139038,
-0.4342215657234192,
-0.17281508445739746,
0.03635339066386223,
0.5128825306892395,
0.4824764132499695,
0.2916296422481537,
0.24051786959171295,
-0.02550589106976986,
0.3266603350639343,
-0.07344605028629303,
0.4696597754955292,
0.05073010176420212,
0.3166288435459137,
0.2313840389251709,
0.22890838980674744,
-0.025608964264392853,
-0.5070913434028625,
-0.1847773939371109,
0.1387815624475479,
0.06187836825847626,
-0.10004362463951111,
0.31401708722114563,
-0.07710664719343185,
0.03926347941160202,
-0.21356116235256195,
0.01375935971736908,
0.1864742487668991,
-0.05300212651491165,
0.017942817881703377,
-0.07517446577548981,
-0.05402734875679016,
-0.039311185479164124,
-0.11933565139770508,
0.47787946462631226,
0.18324889242649078,
0.1049741581082344,
-0.2922564744949341,
-0.02018130198121071,
-0.04611910134553909,
0.16831959784030914,
0.09671185910701752,
-0.24777066707611084,
0.06218777596950531,
-0.238398477435112,
0.40378397703170776,
-0.3403072953224182,
-0.33944541215896606,
0.24888376891613007,
-0.0412277951836586,
-0.06608099490404129,
-0.047099873423576355,
0.02694045752286911,
0.030401386320590973,
0.09870899468660355,
-0.26911014318466187,
-0.33424699306488037,
-0.3721922039985657,
0.12159886956214905,
-0.3851420283317566,
-0.11382776498794556,
-0.17945004999637604,
-0.18268036842346191,
-0.1410391926765442,
-0.2851245701313019,
0.2606837749481201,
0.055139992386102676,
0.07705536484718323,
0.46433812379837036,
0.051356397569179535,
0.09722568094730377,
0.24075891077518463,
0.008172336965799332,
-0.37182676792144775,
-0.5455427169799805,
0.39685529470443726,
-0.3431149423122406,
-0.3154921233654022,
-0.08118190616369247,
-0.09804077446460724,
0.04078130051493645,
0.3793163299560547,
-0.45197176933288574,
0.15346163511276245,
-0.49795979261398315,
-0.02845478057861328,
-0.02982717752456665,
0.02876182459294796,
0.3355000615119934,
-0.07467438280582428,
-0.23762047290802002,
-0.1375775933265686,
0.11600065231323242,
0.027722105383872986,
-0.07345305383205414,
0.29998236894607544,
-0.3409713804721832,
0.09801759570837021,
0.08461859822273254,
0.28905338048934937,
0.22476093471050262,
-0.11961106956005096,
-0.07739241421222687,
0.029567666351795197,
0.43629875779151917,
-0.3368092179298401,
0.05604592710733414,
0.32323360443115234,
-0.0760902613401413,
-0.2643939256668091,
0.23242075741291046,
0.0999198630452156,
-0.12249045819044113,
0.32140544056892395,
-0.12020674347877502,
-0.19998323917388916,
-0.03982054442167282,
0.2966494560241699,
-0.15767084062099457,
-0.033504240214824677,
0.11010183393955231,
-0.12496650964021683,
-0.2950896918773651,
-0.17935454845428467,
-0.06026386097073555,
-0.08396454155445099,
0.0723983496427536,
0.08385223150253296,
0.04163694009184837,
0.11457818746566772,
-0.3002908229827881,
0.24174268543720245,
-0.13898925483226776,
-0.06105192005634308,
-0.06603915244340897,
-0.2548657953739166,
0.05226200073957443,
-0.19821015000343323,
0.6601331830024719,
-0.14266419410705566,
0.11270895600318909,
0.00891997292637825,
-0.07869286835193634,
-0.3599259853363037,
0.0031625814735889435,
0.019828911870718002,
0.19271397590637207,
0.3048693537712097,
0.2933439612388611,
0.07556235045194626,
0.0530359111726284,
0.1753862053155899,
0.4597248435020447,
-0.16355983912944794,
0.06339197605848312,
-0.21864204108715057,
-0.3754788339138031,
0.01075737364590168,
-0.11170168966054916,
0.055284351110458374,
-0.1425454169511795,
-0.09941674768924713,
-0.16381974518299103,
-0.25558361411094666,
-0.047260530292987823,
-0.0729261189699173,
0.08927668631076813,
0.2928493916988373,
0.10178367048501968,
0.18551842868328094,
-0.08134602755308151,
0.325710654258728,
0.06729767471551895,
0.4764978587627411,
0.28005605936050415,
0.15176084637641907,
0.08927305042743683,
-0.1979522556066513,
-0.26252779364585876,
0.26157015562057495,
-0.14052751660346985,
-0.14051076769828796,
0.09275903552770615,
0.29626965522766113,
-0.06822028756141663,
0.07655009627342224,
0.06069763004779816,
-0.06470710784196854,
-0.3481661081314087,
-0.07779353857040405,
0.537272036075592,
0.22250843048095703,
-0.1280852109193802,
0.5341135859489441,
-0.07712428271770477,
-0.1347239911556244,
0.3228485584259033,
0.1609935313463211,
1.0441765785217285,
-0.14446504414081573,
0.23492631316184998,
0.023029953241348267,
-0.1764245182275772,
0.23399336636066437,
-0.22306060791015625,
-0.12259429693222046,
-0.22441330552101135,
-0.4506167471408844,
-0.0078071244060993195,
-0.13962240517139435,
-0.06911636143922806,
0.25575709342956543,
-0.29246777296066284,
-0.05920056998729706,
-0.11950839310884476,
0.2464006245136261,
-0.07814308255910873,
0.04499979317188263,
-0.18625807762145996,
-0.002415621653199196,
0.158310204744339,
0.27797386050224304,
0.008002478629350662,
-0.05375498905777931,
-0.03626010939478874,
0.037491947412490845,
-0.19053439795970917,
-0.05431519076228142,
-0.17921565473079681,
0.12384922057390213,
-0.1370362937450409,
0.40790241956710815,
-0.17044943571090698,
-0.5495795607566833,
-0.11989369988441467,
0.01633240282535553,
0.07594682276248932,
0.040717680007219315,
-0.20337045192718506,
0.43310609459877014,
0.14956435561180115,
0.03699371591210365,
0.132758229970932,
-0.3771095871925354,
0.08531851321458817,
-0.14573729038238525,
-0.13175734877586365,
-0.024449646472930908,
0.014093155972659588,
-0.0659618154168129,
0.20390203595161438,
0.2505127787590027,
0.04956108331680298,
0.023257751017808914,
-0.2307647168636322,
0.08637893199920654,
-0.5281029939651489,
0.10155642032623291,
0.16874009370803833,
-0.03751946985721588,
0.02510075457394123,
0.4483734667301178,
0.02924652025103569,
-0.5620772838592529,
-0.14698149263858795,
0.17026346921920776,
0.143657386302948,
0.02635258436203003,
0.19374683499336243,
-0.2757352888584137,
-0.25134584307670593,
-0.2361389398574829,
0.1355557143688202,
0.04731256142258644,
-0.5518171191215515,
0.07207870483398438,
-0.124007947742939,
-0.14531901478767395,
0.0697275772690773,
0.16224655508995056,
0.20747248828411102,
-0.034093886613845825,
-0.3705923557281494,
-0.15955200791358948,
-0.30887728929519653,
0.09785723686218262,
-0.2791294455528259,
0.3073132038116455,
-0.04722616821527481,
-0.2176767736673355,
0.053980402648448944,
0.18137189745903015,
-0.3668212294578552,
0.4560675024986267,
0.13421693444252014,
0.012446319684386253,
-0.18455788493156433,
-0.29572322964668274,
0.017598293721675873,
-0.058983854949474335,
0.004681030288338661,
0.21719428896903992,
-0.2681587040424347,
-0.3226333558559418,
-0.056120872497558594,
0.0734843909740448,
-0.04661419987678528,
-0.13434956967830658,
-0.12028829753398895,
-0.039035599678754807,
-0.1417389065027237,
-0.12496697902679443,
0.28206682205200195,
0.18650323152542114,
0.15242159366607666,
-0.25184378027915955,
-0.2852879464626312,
-0.4742216169834137,
-0.18385542929172516,
0.15377570688724518,
0.2423398792743683,
0.13229408860206604,
0.025694184005260468,
0.327009916305542,
0.010090479627251625,
-0.18899759650230408,
-0.2677716612815857,
0.28804081678390503,
-0.03525760769844055,
0.07387351989746094,
0.4112122356891632,
-0.11443209648132324,
0.14926038682460785,
0.30982547998428345,
0.06839882582426071,
0.3276687264442444,
-0.06537014991044998,
-0.21050448715686798,
0.02657075598835945,
0.23825736343860626,
-0.234643816947937,
-0.23813776671886444,
0.0046118274331092834,
0.02026473730802536,
-0.023790551349520683,
0.17962977290153503,
0.21663898229599,
-0.3571755290031433,
0.22623373568058014,
0.10391367226839066,
0.47907328605651855,
-0.1593455672264099,
0.08975997567176819,
0.18058814108371735,
0.14074119925498962,
0.1789998561143875,
0.39391201734542847,
0.1641238033771515,
0.21628844738006592,
0.6220987439155579,
0.06052769720554352,
0.3080127537250519,
0.16237503290176392,
0.09868110716342926,
0.034036602824926376,
-0.25719118118286133,
0.2197982221841812,
0.19833475351333618,
-0.26448413729667664,
0.17212378978729248,
0.37617620825767517,
0.06778279691934586,
0.25166043639183044,
-0.187354177236557,
-0.5867413282394409,
0.11495605111122131,
-0.2191067636013031,
0.06075110659003258,
0.08001532405614853,
-0.1890573650598526,
0.18767189979553223,
0.2523115277290344,
-0.144307941198349,
0.36681628227233887,
0.4518600106239319,
0.11539562791585922,
-0.05732053518295288,
0.09520707279443741,
0.09278890490531921,
0.13187409937381744,
0.02539125084877014,
-0.1936015486717224,
0.35830312967300415,
0.28880685567855835,
0.08591700345277786,
0.18198253214359283,
0.5923532247543335,
0.40565893054008484,
0.23162223398685455,
0.10429473221302032,
0.2739289402961731,
0.09466971457004547,
-0.1886526644229889,
-0.3579268455505371,
0.10590706765651703,
0.24109984934329987,
-0.35764962434768677,
0.1672813892364502,
0.23419521749019623,
-0.21875622868537903,
0.11629456281661987,
0.004558447748422623,
0.029333055019378662,
0.029404956847429276,
-0.33994340896606445,
-0.034680455923080444,
-0.17455343902111053,
-0.3296741545200348,
0.05900219455361366,
-0.4088437259197235,
0.2618681490421295,
0.4741242825984955,
-0.3295247554779053,
0.16365936398506165,
-0.0322660356760025,
0.1037091538310051,
-0.10759341716766357,
0.5595881938934326,
0.18102532625198364,
0.1955588459968567,
0.07763691991567612,
-0.23325972259044647,
-0.377046138048172,
0.13448402285575867,
-0.24282169342041016,
0.3911157250404358,
-0.04789623245596886,
0.23882834613323212,
0.1325036585330963,
-0.027160219848155975,
0.46305137872695923,
-0.1006973385810852,
-0.24331147968769073,
0.17873865365982056,
-0.27468329668045044,
-0.06691333651542664,
0.41621673107147217,
0.0848575010895729,
-0.05790649354457855,
-0.4838789403438568,
0.18580535054206848,
0.14305797219276428,
0.1989346146583557,
0.04008544236421585,
-0.09965750575065613,
-0.24221166968345642,
-0.14292852580547333,
0.4263416826725006,
0.20759156346321106,
0.10498640686273575,
-0.20488345623016357,
-0.0037277471274137497,
-0.27069294452667236,
-0.1278981864452362,
0.05957170948386192,
0.2311376929283142,
0.38931047916412354,
0.06552109867334366,
-0.05850769579410553,
-0.14974220097064972,
0.12437719106674194,
-0.08507965505123138,
0.05254729092121124,
0.22853191196918488,
-0.26032310724258423,
-0.014738887548446655,
-0.4616079330444336,
0.19327332079410553,
0.053309354931116104,
0.542451024055481,
-0.14315950870513916,
0.023896532133221626,
0.10736870765686035,
-0.4679044485092163,
0.4566006064414978,
-0.22816966474056244,
-0.35804420709609985,
0.27995097637176514,
0.2599037289619446,
0.1513981819152832,
-0.20225976407527924,
0.09454796463251114,
0.23014765977859497,
0.1119203269481659,
-0.19601047039031982,
-0.12203113734722137,
0.29457125067710876,
-0.3420957624912262,
0.047976475208997726,
-0.11519880592823029,
0.9766240119934082,
0.052527062594890594,
-0.2273440957069397,
-0.2016230970621109,
-0.21685069799423218
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | I don't know the main problem but it looks like, it is ignoring the last directory in your case. So, create a directory called 'zzz' in the same folder as train, validation and test. if it doesn't work, create a directory called "aaa". It worked for me.
| ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 47 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
I don't know the main problem but it looks like, it is ignoring the last directory in your case. So, create a directory called 'zzz' in the same folder as train, validation and test. if it doesn't work, create a directory called "aaa". It worked for me.
| [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | @SamSamhuns could you please try to load it with the current main-branch version of `datasets`? I suppose the problem is that it tries to get splits names from filenames in this case, ignoring directories names, but `val` wasn't in keywords at that time, but it was fixed recently in this PR https://github.com/huggingface/datasets/pull/4844. | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 52 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
@SamSamhuns could you please try to load it with the current main-branch version of `datasets`? I suppose the problem is that it tries to get splits names from filenames in this case, ignoring directories names, but `val` wasn't in keywords at that time, but it was fixed recently in this PR https://github.com/huggingface/datasets/pull/4844. | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | I have a similar problem.
When I try to create `data_infos.json` using `datasets-cli test Peter.py --save_infos --all_configs` I get an error:
`ValueError: Unknown split "test". Should be one of ['train'].`
The `data_infos.json` is created perfectly fine when I use only one split - `datasets.Split.TRAIN`
@polinaeterna Could you help here please?
You can find the code here: https://huggingface.co/datasets/sberbank-ai/Peter/tree/add_splits (add_splits branch) | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 59 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
I have a similar problem.
When I try to create `data_infos.json` using `datasets-cli test Peter.py --save_infos --all_configs` I get an error:
`ValueError: Unknown split "test". Should be one of ['train'].`
The `data_infos.json` is created perfectly fine when I use only one split - `datasets.Split.TRAIN`
@polinaeterna Could you help here please?
You can find the code here: https://huggingface.co/datasets/sberbank-ai/Peter/tree/add_splits (add_splits branch) | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | @skalinin It seems the `dataset_infos.json` of your dataset is missing the info on the test split (and `datasets-cli` doesn't ignore the cached infos at the moment, which is a known bug), so your issue is not related to this one. I think you can fix your issue by deleting all the cached `dataset_infos.json` (in the local repo and in `~/.cache/huggingface/modules`) before running the `datasets-cli test` command. Let us know if that doesn't help, and I can try to generate it myself. | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 81 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
@skalinin It seems the `dataset_infos.json` of your dataset is missing the info on the test split (and `datasets-cli` doesn't ignore the cached infos at the moment, which is a known bug), so your issue is not related to this one. I think you can fix your issue by deleting all the cached `dataset_infos.json` (in the local repo and in `~/.cache/huggingface/modules`) before running the `datasets-cli test` command. Let us know if that doesn't help, and I can try to generate it myself. | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | This code indeed behaves as expected on `main`. But suppose the `val_234.png` is renamed to some other value not containing one of [these](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L31) keywords, in that case, this issue becomes relevant again because the real cause of it is the order in which we check the predefined split patterns to assign data files to each split - first we assign data files based on filenames, and only if this fails meaning not a single split found (`val` is not recognized here in the older versions of `datasets`, which results in an empty `validation` split), do we assign based on directory names.
@polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if `data_dir` is specified (or if `load_dataset(data_dir)` is called)? | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 127 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
This code indeed behaves as expected on `main`. But suppose the `val_234.png` is renamed to some other value not containing one of [these](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L31) keywords, in that case, this issue becomes relevant again because the real cause of it is the order in which we check the predefined split patterns to assign data files to each split - first we assign data files based on filenames, and only if this fails meaning not a single split found (`val` is not recognized here in the older versions of `datasets`, which results in an empty `validation` split), do we assign based on directory names.
@polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if `data_dir` is specified (or if `load_dataset(data_dir)` is called)? | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | > @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?
yes that makes sense ! | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 32 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
> @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?
yes that makes sense ! | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | Looks like the `val/validation` dir name issue is fixed with the current main-branch version of the `datasets` repository.
> @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?
I agree with this as well. I would expect higher precedence to the directory name over the file name. Right now if I place a single file named `train_00001.jpg` under the `validation` directory, `load_dataset` cannot find the validation split. | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 84 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
Looks like the `val/validation` dir name issue is fixed with the current main-branch version of the `datasets` repository.
> @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?
I agree with this as well. I would expect higher precedence to the directory name over the file name. Right now if I place a single file named `train_00001.jpg` under the `validation` directory, `load_dataset` cannot find the validation split. | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | > @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?
Sounds good to me! opened a PR: https://github.com/huggingface/datasets/pull/4985 | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 35 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
> @polinaeterna @lhoestq Perhaps one way to fix this would be to swap the [order](https://github.com/huggingface/datasets/blob/38c8c725f3996ff1ff03f6fd461aa6d645321034/src/datasets/data_files.py#L78-L79) of the patterns if data_dir is specified (or if load_dataset(data_dir) is called)?
Sounds good to me! opened a PR: https://github.com/huggingface/datasets/pull/4985 | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | Hi there @polinaeterna @mariosasko ! I have installed 5.2.3.dev0, which should have this fix. Unfortunately, I am still getting the error:
`ValueError: Unknown split "validation". Should be one of ['train'].` When I call `load_dataset("csv", data_files=files, split=split)`
Any help would be greatly appreciated! | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 42 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
Hi there @polinaeterna @mariosasko ! I have installed 5.2.3.dev0, which should have this fix. Unfortunately, I am still getting the error:
`ValueError: Unknown split "validation". Should be one of ['train'].` When I call `load_dataset("csv", data_files=files, split=split)`
Any help would be greatly appreciated! | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | Hi there @polinaeterna . My local CSV files are stored as follows:
binding:
---------- tune.csv
---------- public_data:
--------------------------- train.csv
`self.list_shards(split)` sucessfully finds the relevant data files | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 26 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
Hi there @polinaeterna . My local CSV files are stored as follows:
binding:
---------- tune.csv
---------- public_data:
--------------------------- train.csv
`self.list_shards(split)` sucessfully finds the relevant data files | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | @shaneacton do you have `validation.csv`/`val.csv`/`valid.csv`/`dev.csv` file in your data folder? I can't find it in the structure you provided | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 19 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
@shaneacton do you have `validation.csv`/`val.csv`/`valid.csv`/`dev.csv` file in your data folder? I can't find it in the structure you provided | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | @polinaeterna no, does the name of the split need to match the name of the file exactly?
But my train file is not actually named 'train.py' its called 'XXXXXXXXX_train_XXXXXXXX.csv'
And the code works fine for train, but fails for validation.
Does the file name need to _contain_ the split name? | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 50 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
@polinaeterna no, does the name of the split need to match the name of the file exactly?
But my train file is not actually named 'train.py' its called 'XXXXXXXXX_train_XXXXXXXX.csv'
And the code works fine for train, but fails for validation.
Does the file name need to _contain_ the split name? | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | @shaneacton what files do you expect to be included in "validation" split? yes, you should somehow indicate that a file belongs to a certain split - either by including split name in a filename or by putting it into a folder with split name, you can also check out [this documentation page](https://huggingface.co/docs/datasets/main/en/repository_structure) :)
by default all the data goes to a single `train` split | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 64 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
@shaneacton what files do you expect to be included in "validation" split? yes, you should somehow indicate that a file belongs to a certain split - either by including split name in a filename or by putting it into a folder with split name, you can also check out [this documentation page](https://huggingface.co/docs/datasets/main/en/repository_structure) :)
by default all the data goes to a single `train` split | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | @polinaeterna I have specified my train/test/tune files via the `split_to_filepattern` argument when initialising my `FileDataSource` class. This is how `list_shards` is able to find the right files.
After your last message, I have tried renaminig my data files to simply `train.csv` and `validation.csv`, however I am still getting the same error: `Unknown split "validation". Should be one of ['train']` | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 59 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
@polinaeterna I have specified my train/test/tune files via the `split_to_filepattern` argument when initialising my `FileDataSource` class. This is how `list_shards` is able to find the right files.
After your last message, I have tried renaminig my data files to simply `train.csv` and `validation.csv`, however I am still getting the same error: `Unknown split "validation". Should be one of ['train']` | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4895 | load_dataset method returns Unknown split "validation" even if this dir exists | For me it resolved by adding the verification_mode param:
```
imdb_ds = load_dataset(
"imdb", verification_mode="no_checks"
)
imdb_ds
``` | ## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
| 18 | load_dataset method returns Unknown split "validation" even if this dir exists
## Describe the bug
The `datasets.load_dataset` returns a `ValueError: Unknown split "validation". Should be one of ['train', 'test'].` when running `load_dataset(local_data_dir_path, split="validation")` even if the `validation` sub-directory exists in the local data path.
The data directories are as follows and attached to this issue:
```
test_data1
|_ train
|_ 1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ 234.png
|_ metadata.jsonl
...
test_data2
|_ train
|_ train_1012.png
|_ metadata.jsonl
...
|_ test
...
|_ validation
|_ val_234.png
|_ metadata.jsonl
...
```
They contain the same image files and `metadata.jsonl` but the images in `test_data2` have the split names prepended i.e.
`train_1012.png, val_234.png` and the images in `test_data1` do not have the split names prepended to the image names i.e. `1012.png, 234.png`
I actually saw in another issue `val` was not recognized as a split name but here I would expect the files to take the split from the parent directory name i.e. val should become part of the validation split?
## Steps to reproduce the bug
```python
import datasets
datasets.logging.set_verbosity_error()
from datasets import load_dataset, get_dataset_split_names
# the following only finds train, validation and test splits correctly
path = "./test_data1"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
# the following only finds train and test splits
path = "./test_data2"
print("######################", get_dataset_split_names(path), "######################")
dataset_list = []
for spt in ["train", "test", "validation"]:
dataset = load_dataset(path, split=spt)
dataset_list.append(dataset)
```
## Expected results
```
###################### ['train', 'test', 'validation'] ######################
###################### ['train', 'test', 'validation'] ######################
```
## Actual results
```
Traceback (most recent call last):
File "test_data_loader.py", line 11, in <module>
dataset = load_dataset(path, split=spt)
File "/home/venv/lib/python3.8/site-packages/datasets/load.py", line 1758, in load_dataset
ds = builder_instance.as_dataset(split=split, ignore_verifications=ignore_verifications, in_memory=keep_in_memory)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 893, in as_dataset
datasets = map_nested(
File "/home/venv/lib/python3.8/site-packages/datasets/utils/py_utils.py", line 385, in map_nested
return function(data_struct)
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 924, in _build_single_dataset
ds = self._as_dataset(
File "/home/venv/lib/python3.8/site-packages/datasets/builder.py", line 993, in _as_dataset
dataset_kwargs = ArrowReader(self._cache_dir, self.info).read(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 211, in read
files = self.get_file_instructions(name, instructions, split_infos)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 184, in get_file_instructions
file_instructions = make_file_instructions(
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 107, in make_file_instructions
absolute_instructions = instruction.to_absolute(name2len)
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in to_absolute
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 616, in <listcomp>
return [_rel_to_abs_instr(rel_instr, name2len) for rel_instr in self._relative_instructions]
File "/home/venv/lib/python3.8/site-packages/datasets/arrow_reader.py", line 433, in _rel_to_abs_instr
raise ValueError(f'Unknown split "{split}". Should be one of {list(name2len)}.')
ValueError: Unknown split "validation". Should be one of ['train', 'test'].
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Linux Ubuntu 18.04
- Python version: 3.8.12
- PyArrow version: 9.0.0
Data files
[test_data1.zip](https://github.com/huggingface/datasets/files/9424463/test_data1.zip)
[test_data2.zip](https://github.com/huggingface/datasets/files/9424468/test_data2.zip)
For me it resolved by adding the verification_mode param:
```
imdb_ds = load_dataset(
"imdb", verification_mode="no_checks"
)
imdb_ds
``` | [
-0.05173032358288765,
0.036226674914360046,
-0.039877623319625854,
0.6336588263511658,
0.11677103489637375,
0.21259906888008118,
0.5250093340873718,
0.3904186487197876,
0.010430566966533661,
0.05747022107243538,
-0.21614046394824982,
0.34347644448280334,
-0.15186502039432526,
0.01707734353840351,
-0.34201309084892273,
-0.3240353465080261,
-0.15035319328308105,
-0.00684993714094162,
0.25759202241897583,
-0.15820050239562988,
-0.3358837962150574,
0.296482115983963,
-0.15660664439201355,
0.1709543615579605,
-0.5209019780158997,
-0.04260030388832092,
-0.21776024997234344,
0.5686678290367126,
-0.054601967334747314,
-0.36829012632369995,
0.24453796446323395,
-0.28995829820632935,
0.2243730127811432,
0.538703441619873,
-0.00012224122474435717,
0.07241399586200714,
0.28511202335357666,
-0.24739375710487366,
-0.22968296706676483,
-0.40066641569137573,
-0.5534675717353821,
-0.15803390741348267,
0.04660911113023758,
-0.2930770814418793,
0.01860935613512993,
-0.18716204166412354,
-0.16989780962467194,
-0.23909145593643188,
0.29563188552856445,
0.2618955969810486,
0.13161669671535492,
-0.02809029631316662,
-0.20433102548122406,
-0.03324240818619728,
-0.05878535658121109,
0.2765953540802002,
-0.0011938177049160004,
0.29517897963523865,
-0.08175067603588104,
-0.12203464657068253,
0.05402854457497597,
0.23773103952407837,
0.16369065642356873,
0.17990823090076447,
0.0953260213136673,
0.1817314475774765,
-0.1290004849433899,
-0.30105534195899963,
-0.2034001648426056,
0.2639508843421936,
0.4024410545825958,
-0.07813308387994766,
-0.3642025291919708,
-0.35424086451530457,
-0.1688954085111618,
-0.05921831727027893,
0.16720938682556152,
0.42613333463668823,
-0.11979952454566956,
0.12684226036071777,
-0.17827002704143524,
-0.024954263120889664,
-0.06895805150270462,
0.09722395986318588,
-0.1313285529613495,
0.3202672600746155,
0.028106320649385452,
0.1249091625213623,
0.12374505400657654,
0.17736147344112396,
0.024428296834230423,
-0.2910158038139343,
0.1859743297100067,
0.13142447173595428,
-0.3436880111694336,
-0.025376176461577415,
-0.09695283323526382,
-0.28890660405158997,
-0.2536703944206238,
0.20093309879302979,
0.034896545112133026,
-0.2826712727546692,
-0.1904274970293045,
0.24985969066619873,
0.49741432070732117,
0.07664486765861511,
0.07468380033969879,
0.6315968036651611,
0.06296863406896591,
0.192859947681427,
-0.06273625791072845,
-0.04710675776004791,
-0.17873543500900269,
-0.39014703035354614,
0.12516862154006958,
0.24735912680625916,
0.31220388412475586,
0.026245709508657455,
-0.5176183581352234,
-0.05259006470441818,
-0.462076872587204,
-0.2203332483768463,
0.2023729383945465,
0.15240973234176636,
0.08036620914936066,
0.2187204658985138,
0.09561063349246979,
0.09803817421197891,
-0.05053982883691788,
0.015175114385783672,
-0.17059867084026337,
0.23095345497131348,
-0.24567651748657227,
-0.12154164165258408,
0.20966564118862152,
-0.29271751642227173,
0.17307454347610474,
-0.029984701424837112,
-0.0533309280872345,
-0.23265306651592255,
-0.10485817492008209,
-0.20719122886657715,
0.13884460926055908,
0.30581554770469666,
-0.16730469465255737,
0.16771678626537323,
0.2167234718799591,
0.017756961286067963,
-0.28221726417541504,
0.09325417131185532,
-0.513624906539917,
-0.3331638276576996,
0.06534130126237869,
0.10173864662647247,
-0.15237753093242645,
0.23722970485687256,
-0.3029598593711853,
-0.1518675982952118,
0.22077995538711548,
0.08436554670333862,
-0.07836680859327316,
-0.2533707022666931,
-0.25881123542785645,
-0.19518455862998962,
0.26917576789855957,
0.4223319888114929,
-0.449409157037735,
-0.033037327229976654,
-0.2422691136598587,
-0.23581817746162415,
0.011978082358837128,
0.31886011362075806,
-0.027119344100356102,
0.534832239151001,
-0.4485296607017517,
0.44437623023986816,
0.2463037669658661,
-0.5389140248298645,
0.05520712584257126,
0.48050737380981445,
-0.07384943217039108,
0.03424762934446335,
0.047378502786159515,
-0.1410253643989563,
-0.03936634585261345,
-0.09922686219215393,
0.05240088701248169,
0.5744614005088806,
-0.33165308833122253,
0.034822531044483185,
-0.18871437013149261,
-0.1819915920495987,
-0.0411955788731575,
0.2969568073749542,
0.08225783705711365,
-0.0836147591471672,
0.21488338708877563,
0.02582297846674919,
0.23015853762626648,
0.023656539618968964,
-0.02756522037088871,
0.253548264503479,
0.23463726043701172,
0.001600898802280426,
0.20740735530853271,
-0.2748715877532959,
-0.3097091019153595,
0.14370891451835632,
0.1487119495868683,
-0.19043034315109253,
-0.37382614612579346,
0.06995631754398346,
-0.5123049020767212,
-0.056142836809158325,
-0.3306455612182617,
-0.11256727576255798,
0.04173866659402847,
0.23243921995162964,
0.18510080873966217,
-0.10511140525341034,
-0.17739254236221313,
0.16321885585784912,
-0.0158573929220438,
0.2064329832792282,
-0.27811577916145325,
0.5086225271224976,
-0.013361593708395958,
0.06744492799043655,
-0.10028091073036194,
0.12891799211502075,
0.20334291458129883,
-0.2450595498085022,
-0.22271236777305603,
0.669543445110321,
0.4205360412597656,
0.06001129746437073,
-0.14649641513824463,
-0.07389543950557709,
0.12248807400465012,
-0.1276267170906067,
-0.14694903790950775,
0.18305444717407227,
0.1276891529560089,
-0.03722382336854935,
-0.14004629850387573,
0.386360764503479,
-0.578522801399231,
0.2896890640258789,
0.09127900004386902,
0.10076572746038437,
0.06993386894464493,
-0.20024845004081726,
0.007100950926542282,
-0.28998321294784546,
0.15942242741584778,
-0.05556033179163933,
0.2881644666194916,
0.05258740484714508,
-0.03265129774808884,
-0.2872241735458374,
0.4136788845062256,
-0.15309228003025055,
-0.04717252403497696,
-0.032313086092472076,
0.24646255373954773,
0.19700896739959717,
0.018781960010528564,
0.5975164175033569,
0.8066951036453247,
0.021440017968416214,
-0.12852242588996887,
0.038248177617788315,
-0.07919000834226608,
-0.12340305000543594,
0.17033378779888153,
0.10859599709510803,
0.3619217276573181,
0.3905501663684845,
-0.04809419438242912,
-0.02256406471133232,
-0.12921851873397827,
-0.08211974799633026,
0.20162983238697052,
0.14861316978931427,
-0.34491321444511414,
0.31234678626060486,
-0.29162856936454773,
-0.07939688861370087,
-0.4356657862663269,
-0.2686390280723572,
-0.05146395042538643,
-0.38566944003105164,
-0.008856341242790222,
-0.16732250154018402,
-0.23310789465904236,
0.25295665860176086,
-0.16986168920993805,
0.06847847998142242,
-0.021555237472057343,
-0.3800334930419922,
-0.25052449107170105,
0.016327092424035072,
-0.1971566379070282,
-0.06956908106803894,
0.24704591929912567,
0.08064684271812439,
0.21460826694965363,
-0.16154247522354126,
-0.029863527044653893,
-0.12046188861131668,
-0.2133161723613739,
0.18248949944972992,
-0.180122509598732,
0.24273788928985596,
0.5406275987625122,
0.15575285255908966,
0.3827859163284302,
-0.4410754442214966,
0.4117213189601898,
0.043852098286151886,
-0.12387923896312714,
0.05716357380151749,
0.2525091767311096,
0.09186572581529617,
-0.21412862837314606,
-0.6006832718849182,
-0.4648873805999756,
-0.3153870105743408,
0.1081632673740387,
-0.04704134166240692,
0.19725863635540009,
0.08203181624412537,
0.051354460418224335,
-0.037773407995700836,
0.024275649338960648,
-0.07222484797239304,
-0.06740806996822357,
0.009876590222120285,
0.16075082123279572,
-0.13837715983390808,
-0.07410943508148193,
-0.15890589356422424,
-0.12964226305484772,
0.18476082384586334,
0.013276198878884315,
-0.27626869082450867,
-0.21538259088993073,
-0.16643695533275604,
0.19198472797870636,
-0.17633835971355438,
0.005079174414277077,
0.13659366965293884,
-0.00403542211279273,
0.10337263345718384,
-0.29132360219955444,
-0.02697831206023693,
0.14702409505844116,
-0.007071636617183685,
0.2752692401409149,
-0.020197473466396332,
0.35725417733192444,
0.2393314242362976,
0.5897137522697449,
0.007541170343756676,
-0.1335352063179016,
0.24983365833759308,
-0.15567833185195923,
0.1985509842634201,
0.008807122707366943,
-0.4781135618686676,
0.08162417262792587,
0.07112400978803635,
-0.2887519598007202,
0.1844903826713562,
0.13506470620632172,
-0.06698537617921829,
-0.1661486029624939,
0.06259936094284058,
-0.31428998708724976,
-0.20227503776550293,
0.03571106120944023,
-0.11425073444843292,
0.2534120976924896,
-0.06823888421058655,
0.19189557433128357,
0.10689270496368408,
0.06726910918951035,
-0.06432408094406128,
0.43114423751831055,
0.2910199761390686,
0.03893544524908066,
-0.2308565080165863,
-0.0276960376650095,
0.33074671030044556,
0.07307860255241394,
0.22793042659759521,
0.38195493817329407,
0.013843107968568802,
-0.06336773186922073,
0.08993708342313766,
0.12371242046356201,
0.6205382347106934,
-0.30971893668174744,
0.15034455060958862,
0.07429340481758118,
-0.08674274384975433,
-0.18127425014972687,
-0.22887688875198364,
-0.17736752331256866,
0.09457515925168991,
0.3229540288448334,
0.6024080514907837,
-0.24499326944351196,
-0.23362958431243896,
0.4157297611236572,
0.270564466714859,
-0.21911190450191498,
-0.1652304083108902,
-0.26082339882850647,
-0.2491704523563385,
-0.1629328429698944,
-0.021318398416042328,
0.1281963735818863,
0.28704795241355896,
0.023790378123521805,
0.21629779040813446,
0.06149449199438095,
-0.1401132047176361,
0.09624013304710388,
0.15798498690128326,
0.3199935555458069,
-0.29624488949775696,
0.18031828105449677,
0.19114167988300323,
0.19319888949394226,
0.4879746735095978,
0.6779384016990662,
-0.5155031085014343,
-0.4248808026313782,
0.15854835510253906,
-0.07393249124288559,
0.36759108304977417,
0.2951776385307312,
-0.29298385977745056,
-0.31790465116500854,
-0.17147034406661987,
0.06817897409200668,
-0.472380131483078,
0.0716753676533699,
0.37117666006088257,
-0.19846494495868683,
-0.09298828989267349,
-0.44929760694503784,
0.310166597366333,
0.1408655196428299,
-0.049761492758989334,
0.27743861079216003,
-0.12041455507278442,
-0.39409053325653076,
0.23410753905773163,
-0.0017891600728034973,
0.7059686183929443,
0.0982067808508873,
0.030794953927397728,
0.2704372704029083,
-0.2757118344306946,
0.15783891081809998,
-0.09161381423473358,
0.09361110627651215,
-0.43067172169685364,
-0.24124257266521454,
-0.059484679251909256,
-0.1988949030637741,
0.22108420729637146,
0.33350998163223267,
0.0911206603050232,
0.335309237241745,
-0.098444864153862,
0.23262588679790497,
-0.10109562426805496,
0.31265687942504883,
-0.13035133481025696,
-0.14353208243846893,
-0.21966488659381866,
0.03453284502029419,
-0.062481895089149475,
0.22328047454357147,
-0.0257338285446167,
-0.13389986753463745,
-0.13070325553417206,
-0.2594369053840637,
-0.23352393507957458,
0.10327643901109695,
-0.22249934077262878,
0.3163056969642639,
0.04584452137351036,
-0.2022455334663391,
0.05548367276787758,
0.361960768699646,
-0.01496153324842453,
-0.07461276650428772,
0.020037483423948288,
0.26218461990356445,
-0.05158737301826477,
0.29547613859176636,
-0.08353155106306076,
-0.017481684684753418,
0.40004900097846985,
0.21012276411056519,
-0.03433217853307724,
-0.16746488213539124,
-0.17497175931930542,
-0.3726717233657837,
-0.2202719748020172,
0.31659120321273804,
-0.08316059410572052,
-0.4575025737285614,
-0.15450534224510193,
-0.274502158164978,
0.1983136683702469,
0.0017853640019893646,
0.08803004026412964,
0.11806157231330872,
-0.1507459282875061,
0.172814279794693,
-0.1635030210018158,
-0.4189562499523163,
-0.009036250412464142,
0.21619215607643127,
-0.05092978477478027,
-0.049558207392692566,
0.4607083797454834,
-0.08210358023643494,
0.07042227685451508,
-0.23822256922721863,
0.49317437410354614,
0.16336587071418762,
-0.35185351967811584,
0.25743672251701355,
-0.09769715368747711,
-0.07345090061426163,
-0.01904347352683544,
-0.01294749602675438,
0.18133099377155304,
0.03639564663171768,
-0.08269761502742767,
-0.5741590261459351,
0.06077641248703003,
0.10711397230625153,
-0.09811614453792572,
0.19684769213199615,
-0.2512189745903015,
0.1046043187379837,
-0.13982096314430237,
-0.084384024143219,
-0.20136025547981262,
0.28676533699035645,
-0.1931050568819046,
0.11283645033836365,
-0.014638841152191162,
0.1618262529373169,
0.31416916847229004,
-0.20490582287311554,
0.09814909845590591,
-0.02712593600153923,
0.0027025388553738594,
-0.07737851142883301,
-0.21411797404289246,
0.18691018223762512,
0.08077764511108398,
0.11946636438369751,
-0.205142542719841,
-0.14566564559936523,
-0.2048194259405136,
-0.1520845890045166,
-0.039767902344465256,
0.21517834067344666,
-0.01874391734600067,
0.4285247325897217,
0.11846120655536652,
-0.093890480697155,
0.06382187455892563,
0.10095073282718658,
-0.32854750752449036,
0.44904351234436035,
0.06867366284132004,
0.3263932466506958,
0.004977099131792784,
-0.006546616554260254,
-0.2837166488170624,
-0.10255304723978043,
-0.017051994800567627,
0.17277705669403076,
0.25980719923973083,
-0.11487798392772675,
0.15699502825737,
-0.09903427213430405,
0.5730718374252319,
0.39446496963500977,
-0.24540917575359344,
0.12001785635948181,
0.11938703060150146,
0.14079836010932922,
-0.14995823800563812,
-0.017323248088359833,
0.17438524961471558,
0.11064666509628296,
0.0012078918516635895,
0.33828869462013245,
0.05286635830998421,
0.20881998538970947,
-0.35450053215026855,
-0.01783699169754982,
0.6358084082603455,
-0.028102818876504898,
0.39026007056236267,
0.9216665625572205,
-0.19293487071990967,
0.18568122386932373,
0.11783367395401001,
-0.24071818590164185,
0.0320063978433609,
0.49056029319763184,
0.002653375267982483,
0.31356343626976013,
-0.16610077023506165,
-0.08169202506542206,
0.3266718089580536,
-0.26715925335884094,
-0.08479377627372742,
0.018827050924301147,
-0.048173561692237854,
0.15838804841041565,
-0.19769102334976196,
0.3967740833759308,
-0.4970061182975769,
-0.0896725133061409,
-0.2775742709636688,
0.08341502398252487,
-0.11197365075349808,
0.044058479368686676,
-0.32090383768081665,
-0.18610620498657227,
-0.2662510275840759,
0.0029663480818271637,
0.11141505837440491,
-0.20883215963840485,
0.29815083742141724,
0.17786815762519836,
-0.060956016182899475,
-0.19523561000823975,
-0.0478358268737793,
0.25431910157203674,
0.14147359132766724,
-0.3608427047729492,
0.3114944100379944,
0.12818671762943268,
-0.12428982555866241,
0.4271107017993927,
0.11025524884462357,
0.4051765501499176,
0.46829646825790405,
0.11811526119709015,
-0.19647270441055298,
-0.2499135285615921,
-0.08303031325340271,
0.05173557251691818,
0.4514719247817993,
-0.2777784466743469,
0.20345483720302582,
0.3688827455043793,
0.10995030403137207,
-0.07732779532670975,
0.1369534134864807,
0.09813100099563599,
0.13236339390277863,
-0.41787657141685486,
0.807167649269104,
-0.27729231119155884,
0.04203362762928009,
0.011295132339000702,
-0.058491192758083344,
-0.3347380459308624,
-0.2369358092546463,
0.2500971853733063,
0.10144714266061783,
0.3609578311443329,
0.07003135234117508,
0.020833279937505722,
-0.030913539230823517,
0.24435165524482727,
0.12630270421504974,
-0.11062837392091751,
-0.24533206224441528,
0.003259815275669098,
-0.690030574798584,
-0.15845754742622375,
-0.14880028367042542,
-0.40599775314331055,
0.015784023329615593,
0.07191717624664307,
0.05194586142897606,
0.12990017235279083,
0.17582689225673676,
0.06895564496517181,
0.22016368806362152,
0.37019258737564087,
-0.3594411611557007,
-0.347257524728775,
-0.03574153780937195,
0.06469660252332687,
-0.040793728083372116,
-0.570776104927063,
0.008920755237340927,
0.03247566148638725,
-0.08800181746482849,
0.08639685809612274,
-0.26950061321258545,
0.3119695782661438,
0.2749127149581909,
0.03230814263224602,
0.20111794769763947,
0.49048110842704773,
-0.11324483156204224,
-0.030099106952548027,
-0.3140774369239807,
-0.21921560168266296,
-0.2152695506811142,
0.3481009006500244,
-0.015707500278949738,
0.5132957696914673,
-0.2848465144634247,
-0.17532655596733093,
-0.6047391891479492,
0.14667265117168427,
-0.12401166558265686,
0.04398477077484131,
-0.21066533029079437,
-0.05582905560731888,
-0.17718078196048737,
0.151737779378891,
0.32643741369247437,
0.3413184583187103,
-0.19683972001075745,
0.2134684920310974,
-0.04195675253868103,
-0.4444649815559387,
0.3817714750766754,
-0.35945120453834534,
-0.2916111350059509,
0.07151655107736588,
0.09474044293165207,
0.015121635049581528,
0.1084199920296669,
-0.3219226002693176,
-0.12275250256061554,
0.4682011604309082,
-0.017174653708934784,
-0.0991751104593277,
-0.0482109896838665,
0.28586915135383606,
0.04297659173607826,
0.17667654156684875,
-0.0500754714012146,
0.1847781240940094,
-0.37261763215065,
0.40637895464897156,
-0.044834308326244354
] |
https://github.com/huggingface/datasets/issues/4893 | Oversampling strategy for iterable datasets in `interleave_datasets` | Hi @lhoestq,
I plunged into the code and it should be manageable for me to work on it!
#take
Also, setting `d1`, `d2` and `d3` as you did raised a `SyntaxError: 'yield' inside list comprehension` for me, on Python 3.8.10.
The following snippet works for me though:
```
d1 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [0, 1, 2]])), {}))
d2 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [10, 11, 12, 13]])), {}))
d3 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [20, 21, 22, 23, 24]])), {}))
```
| In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :) | 97 | Oversampling strategy for iterable datasets in `interleave_datasets`
In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :)
Hi @lhoestq,
I plunged into the code and it should be manageable for me to work on it!
#take
Also, setting `d1`, `d2` and `d3` as you did raised a `SyntaxError: 'yield' inside list comprehension` for me, on Python 3.8.10.
The following snippet works for me though:
```
d1 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [0, 1, 2]])), {}))
d2 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [10, 11, 12, 13]])), {}))
d3 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [20, 21, 22, 23, 24]])), {}))
```
| [
-0.4228614270687103,
-0.19995376467704773,
-0.06890371441841125,
-0.19114218652248383,
0.19798752665519714,
0.018049202859401703,
0.23852773010730743,
0.025174468755722046,
-0.017834683880209923,
0.05424167215824127,
-0.3786226511001587,
0.2754654288291931,
-0.1617426872253418,
0.27959734201431274,
0.0845312848687172,
-0.1858823001384735,
0.16869425773620605,
-0.13665933907032013,
-0.30628275871276855,
0.22576172649860382,
-0.3226749300956726,
0.09969581663608551,
-0.2237790822982788,
-0.5156590938568115,
0.11419841647148132,
0.17546822130680084,
-0.23132477700710297,
0.0730714425444603,
-0.013745607808232307,
-0.5280194282531738,
0.36043253540992737,
0.6017293930053711,
0.4299820065498352,
-0.13487517833709717,
-0.00011433787585701793,
-0.10878632962703705,
0.1047595664858818,
-0.16824884712696075,
-0.12814442813396454,
0.2010156512260437,
-0.1965935230255127,
-0.353300005197525,
0.0070067960768938065,
-0.08421355485916138,
-0.18220996856689453,
-0.17284709215164185,
-0.029626337811350822,
-0.40934550762176514,
0.4686136841773987,
-0.11059968173503876,
0.08707734942436218,
0.3693918287754059,
0.2736918330192566,
-0.02633822150528431,
0.03228199481964111,
-0.26285630464553833,
-0.22892500460147858,
0.2955482006072998,
0.6199077367782593,
-0.05853768438100815,
0.06040709838271141,
0.020141471177339554,
-0.1008201539516449,
-0.06992174685001373,
0.09664103388786316,
-0.30881503224372864,
-0.1384871006011963,
-0.10580551624298096,
-0.2865822911262512,
0.21440348029136658,
0.3457825481891632,
-0.0069595761597156525,
-0.2809508442878723,
-0.5274587869644165,
0.15039676427841187,
-0.3430873155593872,
-0.023959383368492126,
-0.15873152017593384,
0.2036621868610382,
0.15521925687789917,
-0.3709712624549866,
-0.21208420395851135,
0.026511982083320618,
0.35383957624435425,
0.06770732998847961,
0.23327171802520752,
-0.10532637685537338,
0.08862751722335815,
0.6984668374061584,
-0.18226005136966705,
0.15459458529949188,
-0.03215232864022255,
-0.1045861691236496,
0.3786810338497162,
-0.7781854271888733,
-0.3321959376335144,
0.0024702921509742737,
0.05562979727983475,
0.5051997900009155,
0.33966153860092163,
0.19600810110569,
0.15188391506671906,
0.1788933128118515,
-0.008603803813457489,
0.6398940682411194,
-0.012422424741089344,
-0.2901928126811981,
-0.010755768045783043,
0.054076194763183594,
0.132512629032135,
0.0706377774477005,
-0.12900123000144958,
0.005477530881762505,
-0.20709538459777832,
0.1610240936279297,
-0.1237902119755745,
-0.04935489594936371,
0.08186313509941101,
-0.2596208453178406,
-0.2002827227115631,
-0.3229806125164032,
-0.2975955903530121,
0.13650090992450714,
-0.30767959356307983,
0.09304822981357574,
0.19369637966156006,
-0.2928294539451599,
0.39581841230392456,
-0.0389043353497982,
-0.2813195586204529,
-0.08524785935878754,
-0.048860128968954086,
-0.19901235401630402,
0.2509607672691345,
0.2894781529903412,
-0.2279752492904663,
0.26034578680992126,
0.07239608466625214,
0.26866745948791504,
0.0029826387763023376,
0.38287660479545593,
0.009968776255846024,
0.20873557031154633,
-0.05381252244114876,
-0.0024550631642341614,
-0.24414180219173431,
0.0657510906457901,
0.14693446457386017,
-0.020698241889476776,
-0.07613600045442581,
-0.17188188433647156,
-0.2333378791809082,
-0.04812593758106232,
0.11585889756679535,
-0.6768346428871155,
-0.1360449492931366,
-0.1377597451210022,
0.4196183979511261,
0.10985051095485687,
0.00020026043057441711,
0.13369356095790863,
0.05383273959159851,
0.07176373898983002,
0.055523816496133804,
0.39595794677734375,
0.3329800069332123,
-0.2898479104042053,
-0.07895989716053009,
0.01696557179093361,
0.031925879418849945,
0.19434258341789246,
0.20252743363380432,
-0.31185978651046753,
-0.11314026266336441,
-0.2901151180267334,
-0.37140709161758423,
-0.00535101443529129,
-0.14348649978637695,
-0.2884048521518707,
0.038502003997564316,
-0.049500733613967896,
0.6357329487800598,
0.22383549809455872,
0.03185044974088669,
0.6378974914550781,
-0.17264646291732788,
0.12114627659320831,
0.3014492988586426,
-0.3803785741329193,
-0.40889114141464233,
-0.2522648572921753,
-0.03321428969502449,
-0.06653399765491486,
0.13556717336177826,
0.07188933342695236,
0.07181631773710251,
-0.06558192521333694,
0.39120548963546753,
0.3945560157299042,
0.02902844361960888,
0.2984706163406372,
0.1504419595003128,
0.1148274689912796,
0.15419094264507294,
-0.04404621198773384,
-0.5754544734954834,
-0.18242481350898743,
0.03573013097047806,
0.016837317496538162,
0.06763733923435211,
0.04296698793768883,
-0.031270671635866165,
-0.06376335024833679,
-0.11456098407506943,
-0.3211856782436371,
-0.18504178524017334,
0.0535864382982254,
0.08818401396274567,
0.24043574929237366,
-0.08254733681678772,
-0.261499285697937,
0.2003871649503708,
-0.14835886657238007,
-0.12394940108060837,
-0.3649168014526367,
0.42537814378738403,
0.36914804577827454,
0.05163492262363434,
0.00328759104013443,
0.38105952739715576,
-0.1183464303612709,
-0.5188270211219788,
0.003123148810118437,
0.34990280866622925,
-0.04152657836675644,
-0.11387519538402557,
0.16730940341949463,
0.48310166597366333,
0.3614557087421417,
-0.47386452555656433,
-0.03581387549638748,
-0.11497029662132263,
-0.12969379127025604,
-0.2066514790058136,
0.2792602479457855,
0.5734533667564392,
-0.0793343335390091,
0.39583078026771545,
-0.10107496380805969,
0.03640144318342209,
0.26304662227630615,
0.037621792405843735,
-0.5252797603607178,
-0.456766277551651,
-0.3033704459667206,
-0.04945788159966469,
0.20814628899097443,
-0.07060016691684723,
-0.17133329808712006,
0.07831241190433502,
0.24987761676311493,
0.08170469105243683,
-0.2880946695804596,
-0.051648981869220734,
-0.13068276643753052,
-0.011987177655100822,
0.006470629014074802,
0.02180764451622963,
0.3905605673789978,
0.22022980451583862,
0.4254142642021179,
-0.12475267797708511,
0.0493956059217453,
-0.013258966617286205,
0.35021379590034485,
0.23842452466487885,
0.08616235107183456,
0.15315118432044983,
0.1167868822813034,
-0.14034941792488098,
-0.3414052128791809,
-0.3277100920677185,
0.032584987580776215,
-0.010615019127726555,
0.07959742844104767,
-0.05877482891082764,
-0.4858565032482147,
-0.1715955138206482,
0.0408274307847023,
-0.360262006521225,
-0.17918066680431366,
-0.5262871384620667,
-0.12122659385204315,
0.5758896470069885,
-0.05097859352827072,
0.21860454976558685,
-0.2493358850479126,
0.22563579678535461,
0.029247062280774117,
-0.26010408997535706,
0.17373910546302795,
0.007503379136323929,
0.018747156485915184,
0.10092803835868835,
0.18039004504680634,
-0.6855865716934204,
-0.00021495483815670013,
0.0862014889717102,
-0.23356503248214722,
-0.3024901747703552,
-0.1598348766565323,
0.22435787320137024,
0.03917142003774643,
0.05434960871934891,
0.3384595513343811,
-0.18700011074543,
-0.1507849544286728,
-0.1143917441368103,
0.08263245224952698,
-0.03436586260795593,
0.2240075170993805,
0.06527051329612732,
0.0169390756636858,
0.3498254716396332,
-0.07005880028009415,
-0.0781310573220253,
-0.25002411007881165,
-0.5311596989631653,
-0.03193975239992142,
-0.027887806296348572,
-0.34057414531707764,
0.13549122214317322,
-0.07560957968235016,
-0.0964498519897461,
0.09549646079540253,
-0.2920699119567871,
-0.2903927266597748,
-0.3503485918045044,
0.3411945104598999,
-0.3733065724372864,
0.020387843251228333,
-0.06500569730997086,
-0.2673543095588684,
0.34586888551712036,
0.2518981695175171,
-0.002951696515083313,
0.09414205700159073,
0.06865046173334122,
0.07689091563224792,
-0.14896266162395477,
0.26295697689056396,
-0.1345507651567459,
-0.08753297477960587,
0.05390816181898117,
-0.019291413947939873,
0.29474881291389465,
0.23015719652175903,
0.06652522087097168,
0.2700378894805908,
0.21366649866104126,
0.19032996892929077,
0.151570662856102,
0.6235873699188232,
0.17512938380241394,
0.09156529605388641,
0.591338038444519,
0.20510253310203552,
0.16125456988811493,
-0.216342031955719,
-0.22483432292938232,
-0.06357663124799728,
-0.020259380340576172,
-0.026032743975520134,
0.16287165880203247,
-0.011053159832954407,
-0.2126709669828415,
-0.08780890703201294,
-0.02833838388323784,
0.3647666275501251,
-0.2551399767398834,
0.1165793165564537,
-0.22476094961166382,
0.3270491659641266,
0.030442357063293457,
-0.05548472702503204,
-0.06530851125717163,
-0.016129590570926666,
-0.18551665544509888,
-0.11294649541378021,
0.3292671740055084,
-0.011085416190326214,
-0.09472329914569855,
-0.09674102067947388,
-0.640402615070343,
0.14791882038116455,
-0.016434278339147568,
0.5093227624893188,
0.25743335485458374,
-0.2125006914138794,
-0.06631940603256226,
0.020545214414596558,
0.664801299571991,
-0.24740265309810638,
-0.4775487780570984,
0.10376252233982086,
0.07324864715337753,
-0.07109469175338745,
-0.2869220972061157,
-0.13114047050476074,
0.36908283829689026,
0.26213523745536804,
0.2766018807888031,
-0.15965144336223602,
-0.30085480213165283,
0.5392159223556519,
0.22101643681526184,
0.03611749783158302,
-0.14161622524261475,
-0.10117098689079285,
-0.30098700523376465,
-0.0038672108203172684,
0.11025937646627426,
0.23786534368991852,
0.4052906334400177,
-0.22699494659900665,
-0.04106888547539711,
-0.1836710125207901,
-0.133540540933609,
0.050785958766937256,
0.11802725493907928,
0.1832866072654724,
0.12719295918941498,
0.42996397614479065,
0.11424289643764496,
-0.17654524743556976,
0.2667860686779022,
0.506500244140625,
-0.012804880738258362,
-0.31921276450157166,
0.1699504852294922,
-0.15720298886299133,
0.13690556585788727,
-0.1525992453098297,
0.0753893107175827,
0.2864605486392975,
-0.08433257043361664,
0.0584791898727417,
-0.20226730406284332,
-0.08235327154397964,
0.2678423523902893,
0.10236311703920364,
-0.30829164385795593,
-0.7050920128822327,
0.2462713122367859,
0.20669738948345184,
-0.05461860075592995,
0.46187105774879456,
0.20552974939346313,
-0.3354891240596771,
0.1811949908733368,
0.20757344365119934,
0.5010929107666016,
0.11962314695119858,
-0.0508410818874836,
0.13563120365142822,
0.12963800132274628,
0.19670234620571136,
-0.12079878896474838,
0.279413640499115,
0.30406931042671204,
-0.4989718496799469,
0.0820470005273819,
0.11999188363552094,
0.2180590033531189,
0.4028940200805664,
-0.011053189635276794,
0.36497989296913147,
0.003649666905403137,
-0.1629462093114853,
-0.07278530299663544,
0.030639804899692535,
-0.24435803294181824,
-0.2687385380268097,
-0.1405869573354721,
0.13292764127254486,
0.18391574919223785,
-0.221194326877594,
0.0094137042760849,
-0.07706212252378464,
0.5860863327980042,
0.16444025933742523,
-0.29148513078689575,
-0.04710886999964714,
-0.013756172731518745,
-0.0705733671784401,
-0.22098496556282043,
-0.08316602557897568,
0.4444860816001892,
-0.06414638459682465,
0.37794244289398193,
-0.20041683316230774,
0.058060966432094574,
0.04735521227121353,
0.013097628951072693,
-0.08273174613714218,
-0.2545057535171509,
0.1275332123041153,
0.2340368926525116,
0.12783947587013245,
-0.31684792041778564,
0.05943985655903816,
0.2810773253440857,
-0.3441653847694397,
0.16553574800491333,
0.04485664516687393,
0.01929943636059761,
-0.21014896035194397,
-0.05433673411607742,
0.20958217978477478,
-0.035347554832696915,
-0.28603294491767883,
0.005644730292260647,
0.06942189484834671,
-0.41859006881713867,
0.2450825273990631,
-0.49350258708000183,
-0.10494630038738251,
-0.30074557662010193,
0.4893891215324402,
0.1828320324420929,
-0.11459758132696152,
0.30034559965133667,
-0.01226964220404625,
-0.020626047626137733,
-0.1395706832408905,
-0.05418717488646507,
0.10418955981731415,
0.044403478503227234,
0.28655415773391724,
-0.007339982315897942,
0.14874379336833954,
0.07118593901395798,
0.14550621807575226,
0.12860488891601562,
0.11349967122077942,
-0.09831134229898453,
-0.2527849078178406,
-0.23234879970550537,
0.16234004497528076,
-0.006395943462848663,
0.1770227551460266,
-0.06819108873605728,
-0.12349563837051392,
-0.1057138666510582,
-0.042366378009319305,
-0.24975866079330444,
-0.27106085419654846,
-0.0022822022438049316,
-0.14208237826824188,
-0.013250574469566345,
-0.22170531749725342,
0.21007375419139862,
0.21563871204853058,
0.04537465423345566,
0.22997109591960907,
-0.06331688910722733,
-0.1417820155620575,
-0.1444675177335739,
0.09618568420410156,
-0.03866862505674362,
-0.1824466437101364,
0.02760050818324089,
-0.0346328504383564,
-0.14894740283489227,
-0.33516550064086914,
0.2557225227355957,
-0.044949084520339966,
0.1843642145395279,
0.34433022141456604,
-0.0077369920909404755,
-0.3374364376068115,
-0.0688125416636467,
-0.10028885304927826,
0.3309062123298645,
0.003987528383731842,
0.07942099869251251,
0.35287660360336304,
0.16631054878234863,
-0.1393880546092987,
-0.3492645025253296,
0.3048457205295563,
0.1986166536808014,
-0.2012956738471985,
0.2669609487056732,
0.14089465141296387,
-0.22268664836883545,
0.45866236090660095,
0.27616792917251587,
0.6373780965805054,
0.3198302090167999,
-0.16349811851978302,
0.09156142920255661,
0.16532815992832184,
-0.077059805393219,
-0.11490670591592789,
0.26963043212890625,
0.12473780661821365,
0.47642189264297485,
0.4296891689300537,
0.4760090410709381,
-0.21860167384147644,
0.1679239273071289,
-0.09533374756574631,
0.3425845205783844,
-0.16877730190753937,
0.503261148929596,
0.32082656025886536,
0.27996763586997986,
0.025445152074098587,
0.21868760883808136,
-0.09434930980205536,
0.480822890996933,
0.015928898006677628,
-0.4874308109283447,
0.534805178642273,
0.041670456528663635,
-0.2542116641998291,
0.08264324069023132,
-0.3991651237010956,
-0.1445205956697464,
0.19620834290981293,
-0.01774384081363678,
0.5268101096153259,
0.029291726648807526,
0.3825754225254059,
-0.15879277884960175,
-0.2625945210456848,
-0.11275700479745865,
0.044532112777233124,
0.19440695643424988,
-0.22280475497245789,
-0.05998203158378601,
-0.3130738139152527,
-0.4130704402923584,
-0.028498947620391846,
0.09097903966903687,
-0.1375379115343094,
0.4764527976512909,
-0.23779495060443878,
0.4062083959579468,
-0.35260894894599915,
0.2964533269405365,
0.2323109209537506,
0.24252918362617493,
-0.18276014924049377,
0.14747343957424164,
0.35827410221099854,
-0.1494767814874649,
0.12764078378677368,
0.22279752790927887,
0.1377735137939453,
-0.0846264511346817,
0.11759713292121887,
-0.03350137174129486,
-0.12890638411045074,
-0.13042956590652466,
-0.14472557604312897,
0.1716044545173645,
-0.26766788959503174,
-0.29749494791030884,
0.2645478844642639,
0.07653041183948517,
-0.048632245510816574,
0.17760469019412994,
0.24110201001167297,
-0.020370468497276306,
-0.43993666768074036,
-0.26814404129981995,
0.2385418862104416,
0.03553397208452225,
0.2767585515975952,
-0.13001391291618347,
-0.20106840133666992,
-0.12932364642620087,
0.06524689495563507,
-0.14938724040985107,
-0.08957535773515701,
0.07651297748088837,
0.043573424220085144,
-0.1937098503112793,
0.3913644552230835,
0.28818538784980774,
0.05077178031206131,
-0.11005771905183792,
-0.3517293334007263,
-0.351175457239151,
-0.079857237637043,
-0.12736357748508453,
-0.3102472424507141,
0.20453904569149017,
0.46562814712524414,
-0.04945296794176102,
0.09368228912353516,
0.17411646246910095,
0.0032196203246712685,
-0.008351864293217659,
0.35161831974983215,
-0.3080570697784424,
-0.3352521061897278,
-0.0007150024175643921,
0.38858088850975037,
-0.003643076866865158,
-0.09871295839548111,
-0.25195690989494324,
-0.00024273712188005447,
-0.1046961322426796,
-0.0005049519240856171,
0.006968609988689423,
0.18383954465389252,
-0.23363450169563293,
0.11301320791244507,
0.21673281490802765,
0.2332531362771988,
-0.11622843891382217,
0.08746644854545593,
-0.3445644676685333,
-0.21952016651630402,
-0.3470282256603241,
0.05207119882106781,
-0.10352444648742676,
0.28852227330207825,
-0.2160041630268097,
-0.05839505419135094,
-0.10489093512296677,
0.4040500521659851,
0.16923542320728302,
-0.16306762397289276,
-0.3691819906234741,
0.3158996105194092,
0.03609238564968109,
0.07215891778469086,
0.03783562034368515,
0.524087131023407,
-0.022667743265628815,
0.1833178699016571,
0.039747580885887146,
-0.22094279527664185,
0.0263853520154953,
-0.23716439306735992,
-0.3006233274936676,
-0.2102663815021515,
-0.040000736713409424,
0.16946080327033997,
-0.26246392726898193,
-0.3756300210952759,
0.02981726825237274,
0.2718253433704376,
0.05227385833859444,
0.020848795771598816,
0.47513407468795776,
0.18623091280460358,
-0.0942298099398613,
-0.25323420763015747,
0.08961870521306992,
0.3342975378036499,
-0.08363717794418335,
0.07144413888454437,
-0.24265240132808685
] |
https://github.com/huggingface/datasets/issues/4893 | Oversampling strategy for iterable datasets in `interleave_datasets` | Hi @ylacombe :) Is there anything I can do to help ? Feel free to ping me if you have any question :) | In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :) | 23 | Oversampling strategy for iterable datasets in `interleave_datasets`
In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :)
Hi @ylacombe :) Is there anything I can do to help ? Feel free to ping me if you have any question :) | [
-0.4228614270687103,
-0.19995376467704773,
-0.06890371441841125,
-0.19114218652248383,
0.19798752665519714,
0.018049202859401703,
0.23852773010730743,
0.025174468755722046,
-0.017834683880209923,
0.05424167215824127,
-0.3786226511001587,
0.2754654288291931,
-0.1617426872253418,
0.27959734201431274,
0.0845312848687172,
-0.1858823001384735,
0.16869425773620605,
-0.13665933907032013,
-0.30628275871276855,
0.22576172649860382,
-0.3226749300956726,
0.09969581663608551,
-0.2237790822982788,
-0.5156590938568115,
0.11419841647148132,
0.17546822130680084,
-0.23132477700710297,
0.0730714425444603,
-0.013745607808232307,
-0.5280194282531738,
0.36043253540992737,
0.6017293930053711,
0.4299820065498352,
-0.13487517833709717,
-0.00011433787585701793,
-0.10878632962703705,
0.1047595664858818,
-0.16824884712696075,
-0.12814442813396454,
0.2010156512260437,
-0.1965935230255127,
-0.353300005197525,
0.0070067960768938065,
-0.08421355485916138,
-0.18220996856689453,
-0.17284709215164185,
-0.029626337811350822,
-0.40934550762176514,
0.4686136841773987,
-0.11059968173503876,
0.08707734942436218,
0.3693918287754059,
0.2736918330192566,
-0.02633822150528431,
0.03228199481964111,
-0.26285630464553833,
-0.22892500460147858,
0.2955482006072998,
0.6199077367782593,
-0.05853768438100815,
0.06040709838271141,
0.020141471177339554,
-0.1008201539516449,
-0.06992174685001373,
0.09664103388786316,
-0.30881503224372864,
-0.1384871006011963,
-0.10580551624298096,
-0.2865822911262512,
0.21440348029136658,
0.3457825481891632,
-0.0069595761597156525,
-0.2809508442878723,
-0.5274587869644165,
0.15039676427841187,
-0.3430873155593872,
-0.023959383368492126,
-0.15873152017593384,
0.2036621868610382,
0.15521925687789917,
-0.3709712624549866,
-0.21208420395851135,
0.026511982083320618,
0.35383957624435425,
0.06770732998847961,
0.23327171802520752,
-0.10532637685537338,
0.08862751722335815,
0.6984668374061584,
-0.18226005136966705,
0.15459458529949188,
-0.03215232864022255,
-0.1045861691236496,
0.3786810338497162,
-0.7781854271888733,
-0.3321959376335144,
0.0024702921509742737,
0.05562979727983475,
0.5051997900009155,
0.33966153860092163,
0.19600810110569,
0.15188391506671906,
0.1788933128118515,
-0.008603803813457489,
0.6398940682411194,
-0.012422424741089344,
-0.2901928126811981,
-0.010755768045783043,
0.054076194763183594,
0.132512629032135,
0.0706377774477005,
-0.12900123000144958,
0.005477530881762505,
-0.20709538459777832,
0.1610240936279297,
-0.1237902119755745,
-0.04935489594936371,
0.08186313509941101,
-0.2596208453178406,
-0.2002827227115631,
-0.3229806125164032,
-0.2975955903530121,
0.13650090992450714,
-0.30767959356307983,
0.09304822981357574,
0.19369637966156006,
-0.2928294539451599,
0.39581841230392456,
-0.0389043353497982,
-0.2813195586204529,
-0.08524785935878754,
-0.048860128968954086,
-0.19901235401630402,
0.2509607672691345,
0.2894781529903412,
-0.2279752492904663,
0.26034578680992126,
0.07239608466625214,
0.26866745948791504,
0.0029826387763023376,
0.38287660479545593,
0.009968776255846024,
0.20873557031154633,
-0.05381252244114876,
-0.0024550631642341614,
-0.24414180219173431,
0.0657510906457901,
0.14693446457386017,
-0.020698241889476776,
-0.07613600045442581,
-0.17188188433647156,
-0.2333378791809082,
-0.04812593758106232,
0.11585889756679535,
-0.6768346428871155,
-0.1360449492931366,
-0.1377597451210022,
0.4196183979511261,
0.10985051095485687,
0.00020026043057441711,
0.13369356095790863,
0.05383273959159851,
0.07176373898983002,
0.055523816496133804,
0.39595794677734375,
0.3329800069332123,
-0.2898479104042053,
-0.07895989716053009,
0.01696557179093361,
0.031925879418849945,
0.19434258341789246,
0.20252743363380432,
-0.31185978651046753,
-0.11314026266336441,
-0.2901151180267334,
-0.37140709161758423,
-0.00535101443529129,
-0.14348649978637695,
-0.2884048521518707,
0.038502003997564316,
-0.049500733613967896,
0.6357329487800598,
0.22383549809455872,
0.03185044974088669,
0.6378974914550781,
-0.17264646291732788,
0.12114627659320831,
0.3014492988586426,
-0.3803785741329193,
-0.40889114141464233,
-0.2522648572921753,
-0.03321428969502449,
-0.06653399765491486,
0.13556717336177826,
0.07188933342695236,
0.07181631773710251,
-0.06558192521333694,
0.39120548963546753,
0.3945560157299042,
0.02902844361960888,
0.2984706163406372,
0.1504419595003128,
0.1148274689912796,
0.15419094264507294,
-0.04404621198773384,
-0.5754544734954834,
-0.18242481350898743,
0.03573013097047806,
0.016837317496538162,
0.06763733923435211,
0.04296698793768883,
-0.031270671635866165,
-0.06376335024833679,
-0.11456098407506943,
-0.3211856782436371,
-0.18504178524017334,
0.0535864382982254,
0.08818401396274567,
0.24043574929237366,
-0.08254733681678772,
-0.261499285697937,
0.2003871649503708,
-0.14835886657238007,
-0.12394940108060837,
-0.3649168014526367,
0.42537814378738403,
0.36914804577827454,
0.05163492262363434,
0.00328759104013443,
0.38105952739715576,
-0.1183464303612709,
-0.5188270211219788,
0.003123148810118437,
0.34990280866622925,
-0.04152657836675644,
-0.11387519538402557,
0.16730940341949463,
0.48310166597366333,
0.3614557087421417,
-0.47386452555656433,
-0.03581387549638748,
-0.11497029662132263,
-0.12969379127025604,
-0.2066514790058136,
0.2792602479457855,
0.5734533667564392,
-0.0793343335390091,
0.39583078026771545,
-0.10107496380805969,
0.03640144318342209,
0.26304662227630615,
0.037621792405843735,
-0.5252797603607178,
-0.456766277551651,
-0.3033704459667206,
-0.04945788159966469,
0.20814628899097443,
-0.07060016691684723,
-0.17133329808712006,
0.07831241190433502,
0.24987761676311493,
0.08170469105243683,
-0.2880946695804596,
-0.051648981869220734,
-0.13068276643753052,
-0.011987177655100822,
0.006470629014074802,
0.02180764451622963,
0.3905605673789978,
0.22022980451583862,
0.4254142642021179,
-0.12475267797708511,
0.0493956059217453,
-0.013258966617286205,
0.35021379590034485,
0.23842452466487885,
0.08616235107183456,
0.15315118432044983,
0.1167868822813034,
-0.14034941792488098,
-0.3414052128791809,
-0.3277100920677185,
0.032584987580776215,
-0.010615019127726555,
0.07959742844104767,
-0.05877482891082764,
-0.4858565032482147,
-0.1715955138206482,
0.0408274307847023,
-0.360262006521225,
-0.17918066680431366,
-0.5262871384620667,
-0.12122659385204315,
0.5758896470069885,
-0.05097859352827072,
0.21860454976558685,
-0.2493358850479126,
0.22563579678535461,
0.029247062280774117,
-0.26010408997535706,
0.17373910546302795,
0.007503379136323929,
0.018747156485915184,
0.10092803835868835,
0.18039004504680634,
-0.6855865716934204,
-0.00021495483815670013,
0.0862014889717102,
-0.23356503248214722,
-0.3024901747703552,
-0.1598348766565323,
0.22435787320137024,
0.03917142003774643,
0.05434960871934891,
0.3384595513343811,
-0.18700011074543,
-0.1507849544286728,
-0.1143917441368103,
0.08263245224952698,
-0.03436586260795593,
0.2240075170993805,
0.06527051329612732,
0.0169390756636858,
0.3498254716396332,
-0.07005880028009415,
-0.0781310573220253,
-0.25002411007881165,
-0.5311596989631653,
-0.03193975239992142,
-0.027887806296348572,
-0.34057414531707764,
0.13549122214317322,
-0.07560957968235016,
-0.0964498519897461,
0.09549646079540253,
-0.2920699119567871,
-0.2903927266597748,
-0.3503485918045044,
0.3411945104598999,
-0.3733065724372864,
0.020387843251228333,
-0.06500569730997086,
-0.2673543095588684,
0.34586888551712036,
0.2518981695175171,
-0.002951696515083313,
0.09414205700159073,
0.06865046173334122,
0.07689091563224792,
-0.14896266162395477,
0.26295697689056396,
-0.1345507651567459,
-0.08753297477960587,
0.05390816181898117,
-0.019291413947939873,
0.29474881291389465,
0.23015719652175903,
0.06652522087097168,
0.2700378894805908,
0.21366649866104126,
0.19032996892929077,
0.151570662856102,
0.6235873699188232,
0.17512938380241394,
0.09156529605388641,
0.591338038444519,
0.20510253310203552,
0.16125456988811493,
-0.216342031955719,
-0.22483432292938232,
-0.06357663124799728,
-0.020259380340576172,
-0.026032743975520134,
0.16287165880203247,
-0.011053159832954407,
-0.2126709669828415,
-0.08780890703201294,
-0.02833838388323784,
0.3647666275501251,
-0.2551399767398834,
0.1165793165564537,
-0.22476094961166382,
0.3270491659641266,
0.030442357063293457,
-0.05548472702503204,
-0.06530851125717163,
-0.016129590570926666,
-0.18551665544509888,
-0.11294649541378021,
0.3292671740055084,
-0.011085416190326214,
-0.09472329914569855,
-0.09674102067947388,
-0.640402615070343,
0.14791882038116455,
-0.016434278339147568,
0.5093227624893188,
0.25743335485458374,
-0.2125006914138794,
-0.06631940603256226,
0.020545214414596558,
0.664801299571991,
-0.24740265309810638,
-0.4775487780570984,
0.10376252233982086,
0.07324864715337753,
-0.07109469175338745,
-0.2869220972061157,
-0.13114047050476074,
0.36908283829689026,
0.26213523745536804,
0.2766018807888031,
-0.15965144336223602,
-0.30085480213165283,
0.5392159223556519,
0.22101643681526184,
0.03611749783158302,
-0.14161622524261475,
-0.10117098689079285,
-0.30098700523376465,
-0.0038672108203172684,
0.11025937646627426,
0.23786534368991852,
0.4052906334400177,
-0.22699494659900665,
-0.04106888547539711,
-0.1836710125207901,
-0.133540540933609,
0.050785958766937256,
0.11802725493907928,
0.1832866072654724,
0.12719295918941498,
0.42996397614479065,
0.11424289643764496,
-0.17654524743556976,
0.2667860686779022,
0.506500244140625,
-0.012804880738258362,
-0.31921276450157166,
0.1699504852294922,
-0.15720298886299133,
0.13690556585788727,
-0.1525992453098297,
0.0753893107175827,
0.2864605486392975,
-0.08433257043361664,
0.0584791898727417,
-0.20226730406284332,
-0.08235327154397964,
0.2678423523902893,
0.10236311703920364,
-0.30829164385795593,
-0.7050920128822327,
0.2462713122367859,
0.20669738948345184,
-0.05461860075592995,
0.46187105774879456,
0.20552974939346313,
-0.3354891240596771,
0.1811949908733368,
0.20757344365119934,
0.5010929107666016,
0.11962314695119858,
-0.0508410818874836,
0.13563120365142822,
0.12963800132274628,
0.19670234620571136,
-0.12079878896474838,
0.279413640499115,
0.30406931042671204,
-0.4989718496799469,
0.0820470005273819,
0.11999188363552094,
0.2180590033531189,
0.4028940200805664,
-0.011053189635276794,
0.36497989296913147,
0.003649666905403137,
-0.1629462093114853,
-0.07278530299663544,
0.030639804899692535,
-0.24435803294181824,
-0.2687385380268097,
-0.1405869573354721,
0.13292764127254486,
0.18391574919223785,
-0.221194326877594,
0.0094137042760849,
-0.07706212252378464,
0.5860863327980042,
0.16444025933742523,
-0.29148513078689575,
-0.04710886999964714,
-0.013756172731518745,
-0.0705733671784401,
-0.22098496556282043,
-0.08316602557897568,
0.4444860816001892,
-0.06414638459682465,
0.37794244289398193,
-0.20041683316230774,
0.058060966432094574,
0.04735521227121353,
0.013097628951072693,
-0.08273174613714218,
-0.2545057535171509,
0.1275332123041153,
0.2340368926525116,
0.12783947587013245,
-0.31684792041778564,
0.05943985655903816,
0.2810773253440857,
-0.3441653847694397,
0.16553574800491333,
0.04485664516687393,
0.01929943636059761,
-0.21014896035194397,
-0.05433673411607742,
0.20958217978477478,
-0.035347554832696915,
-0.28603294491767883,
0.005644730292260647,
0.06942189484834671,
-0.41859006881713867,
0.2450825273990631,
-0.49350258708000183,
-0.10494630038738251,
-0.30074557662010193,
0.4893891215324402,
0.1828320324420929,
-0.11459758132696152,
0.30034559965133667,
-0.01226964220404625,
-0.020626047626137733,
-0.1395706832408905,
-0.05418717488646507,
0.10418955981731415,
0.044403478503227234,
0.28655415773391724,
-0.007339982315897942,
0.14874379336833954,
0.07118593901395798,
0.14550621807575226,
0.12860488891601562,
0.11349967122077942,
-0.09831134229898453,
-0.2527849078178406,
-0.23234879970550537,
0.16234004497528076,
-0.006395943462848663,
0.1770227551460266,
-0.06819108873605728,
-0.12349563837051392,
-0.1057138666510582,
-0.042366378009319305,
-0.24975866079330444,
-0.27106085419654846,
-0.0022822022438049316,
-0.14208237826824188,
-0.013250574469566345,
-0.22170531749725342,
0.21007375419139862,
0.21563871204853058,
0.04537465423345566,
0.22997109591960907,
-0.06331688910722733,
-0.1417820155620575,
-0.1444675177335739,
0.09618568420410156,
-0.03866862505674362,
-0.1824466437101364,
0.02760050818324089,
-0.0346328504383564,
-0.14894740283489227,
-0.33516550064086914,
0.2557225227355957,
-0.044949084520339966,
0.1843642145395279,
0.34433022141456604,
-0.0077369920909404755,
-0.3374364376068115,
-0.0688125416636467,
-0.10028885304927826,
0.3309062123298645,
0.003987528383731842,
0.07942099869251251,
0.35287660360336304,
0.16631054878234863,
-0.1393880546092987,
-0.3492645025253296,
0.3048457205295563,
0.1986166536808014,
-0.2012956738471985,
0.2669609487056732,
0.14089465141296387,
-0.22268664836883545,
0.45866236090660095,
0.27616792917251587,
0.6373780965805054,
0.3198302090167999,
-0.16349811851978302,
0.09156142920255661,
0.16532815992832184,
-0.077059805393219,
-0.11490670591592789,
0.26963043212890625,
0.12473780661821365,
0.47642189264297485,
0.4296891689300537,
0.4760090410709381,
-0.21860167384147644,
0.1679239273071289,
-0.09533374756574631,
0.3425845205783844,
-0.16877730190753937,
0.503261148929596,
0.32082656025886536,
0.27996763586997986,
0.025445152074098587,
0.21868760883808136,
-0.09434930980205536,
0.480822890996933,
0.015928898006677628,
-0.4874308109283447,
0.534805178642273,
0.041670456528663635,
-0.2542116641998291,
0.08264324069023132,
-0.3991651237010956,
-0.1445205956697464,
0.19620834290981293,
-0.01774384081363678,
0.5268101096153259,
0.029291726648807526,
0.3825754225254059,
-0.15879277884960175,
-0.2625945210456848,
-0.11275700479745865,
0.044532112777233124,
0.19440695643424988,
-0.22280475497245789,
-0.05998203158378601,
-0.3130738139152527,
-0.4130704402923584,
-0.028498947620391846,
0.09097903966903687,
-0.1375379115343094,
0.4764527976512909,
-0.23779495060443878,
0.4062083959579468,
-0.35260894894599915,
0.2964533269405365,
0.2323109209537506,
0.24252918362617493,
-0.18276014924049377,
0.14747343957424164,
0.35827410221099854,
-0.1494767814874649,
0.12764078378677368,
0.22279752790927887,
0.1377735137939453,
-0.0846264511346817,
0.11759713292121887,
-0.03350137174129486,
-0.12890638411045074,
-0.13042956590652466,
-0.14472557604312897,
0.1716044545173645,
-0.26766788959503174,
-0.29749494791030884,
0.2645478844642639,
0.07653041183948517,
-0.048632245510816574,
0.17760469019412994,
0.24110201001167297,
-0.020370468497276306,
-0.43993666768074036,
-0.26814404129981995,
0.2385418862104416,
0.03553397208452225,
0.2767585515975952,
-0.13001391291618347,
-0.20106840133666992,
-0.12932364642620087,
0.06524689495563507,
-0.14938724040985107,
-0.08957535773515701,
0.07651297748088837,
0.043573424220085144,
-0.1937098503112793,
0.3913644552230835,
0.28818538784980774,
0.05077178031206131,
-0.11005771905183792,
-0.3517293334007263,
-0.351175457239151,
-0.079857237637043,
-0.12736357748508453,
-0.3102472424507141,
0.20453904569149017,
0.46562814712524414,
-0.04945296794176102,
0.09368228912353516,
0.17411646246910095,
0.0032196203246712685,
-0.008351864293217659,
0.35161831974983215,
-0.3080570697784424,
-0.3352521061897278,
-0.0007150024175643921,
0.38858088850975037,
-0.003643076866865158,
-0.09871295839548111,
-0.25195690989494324,
-0.00024273712188005447,
-0.1046961322426796,
-0.0005049519240856171,
0.006968609988689423,
0.18383954465389252,
-0.23363450169563293,
0.11301320791244507,
0.21673281490802765,
0.2332531362771988,
-0.11622843891382217,
0.08746644854545593,
-0.3445644676685333,
-0.21952016651630402,
-0.3470282256603241,
0.05207119882106781,
-0.10352444648742676,
0.28852227330207825,
-0.2160041630268097,
-0.05839505419135094,
-0.10489093512296677,
0.4040500521659851,
0.16923542320728302,
-0.16306762397289276,
-0.3691819906234741,
0.3158996105194092,
0.03609238564968109,
0.07215891778469086,
0.03783562034368515,
0.524087131023407,
-0.022667743265628815,
0.1833178699016571,
0.039747580885887146,
-0.22094279527664185,
0.0263853520154953,
-0.23716439306735992,
-0.3006233274936676,
-0.2102663815021515,
-0.040000736713409424,
0.16946080327033997,
-0.26246392726898193,
-0.3756300210952759,
0.02981726825237274,
0.2718253433704376,
0.05227385833859444,
0.020848795771598816,
0.47513407468795776,
0.18623091280460358,
-0.0942298099398613,
-0.25323420763015747,
0.08961870521306992,
0.3342975378036499,
-0.08363717794418335,
0.07144413888454437,
-0.24265240132808685
] |
https://github.com/huggingface/datasets/issues/4893 | Oversampling strategy for iterable datasets in `interleave_datasets` | Hi @lhoestq,
I actually have already wrote the code last time [on this commit](https://github.com/ylacombe/datasets/commit/84769db97facc78a33ec53f7b1b395951e1804df) but I still have to change the docs and write some tests though. I'm working on it.
However, I still your advice on one matter.
In #4831, when using a `Dataset` list with probabilities, I had change the original behavior so that it stops as soon as one or all datasets are out of samples. By nature, this behavior can't be applied with an `IterableDataset` because one only knows an iterable dataset is out of sample when receiving a StopIteration error after calling the iterator once again.
To sum up, as it is right know, the behavior is not consistent with an `IterableDataset` list or a `Dataset` list, when using probabilities.
To be honest, I think that the current behavior with a `Dataset` list is desirable and avoid having too many samples, so I would recommand keeping that as it is, but I can understand the desire to have the same behavior for both classes.
What do you think ? Please let me know if you need more details.
EDIT:
Here is an example:
```
>>> from tests.test_iterable_dataset import *
>>> d1 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [0, 1, 2]])), {}))
>>> d2 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [10, 11, 12, 13]])), {}))
>>> d3 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [20, 21, 22, 23, 24]])), {}))
>>> dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42)
>>> [x["a"] for x in dataset]
[10, 0, 11, 1, 2, 20, 12, 13]
>>> from tests.test_arrow_dataset import *
>>> d1 = Dataset.from_dict({"a": [0, 1, 2]})
>>> d2 = Dataset.from_dict({"a": [10, 11, 12]})
>>> d3 = Dataset.from_dict({"a": [20, 21, 22]})
>>> interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42)["a"]
[10, 0, 11, 1, 2]
[10, 0, 11, 1, 2]
```
| In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :) | 314 | Oversampling strategy for iterable datasets in `interleave_datasets`
In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :)
Hi @lhoestq,
I actually have already wrote the code last time [on this commit](https://github.com/ylacombe/datasets/commit/84769db97facc78a33ec53f7b1b395951e1804df) but I still have to change the docs and write some tests though. I'm working on it.
However, I still your advice on one matter.
In #4831, when using a `Dataset` list with probabilities, I had change the original behavior so that it stops as soon as one or all datasets are out of samples. By nature, this behavior can't be applied with an `IterableDataset` because one only knows an iterable dataset is out of sample when receiving a StopIteration error after calling the iterator once again.
To sum up, as it is right know, the behavior is not consistent with an `IterableDataset` list or a `Dataset` list, when using probabilities.
To be honest, I think that the current behavior with a `Dataset` list is desirable and avoid having too many samples, so I would recommand keeping that as it is, but I can understand the desire to have the same behavior for both classes.
What do you think ? Please let me know if you need more details.
EDIT:
Here is an example:
```
>>> from tests.test_iterable_dataset import *
>>> d1 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [0, 1, 2]])), {}))
>>> d2 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [10, 11, 12, 13]])), {}))
>>> d3 = IterableDataset(ExamplesIterable((lambda: (yield from [(i, {"a": i}) for i in [20, 21, 22, 23, 24]])), {}))
>>> dataset = interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42)
>>> [x["a"] for x in dataset]
[10, 0, 11, 1, 2, 20, 12, 13]
>>> from tests.test_arrow_dataset import *
>>> d1 = Dataset.from_dict({"a": [0, 1, 2]})
>>> d2 = Dataset.from_dict({"a": [10, 11, 12]})
>>> d3 = Dataset.from_dict({"a": [20, 21, 22]})
>>> interleave_datasets([d1, d2, d3], probabilities=[0.7, 0.2, 0.1], seed=42)["a"]
[10, 0, 11, 1, 2]
[10, 0, 11, 1, 2]
```
| [
-0.4228614270687103,
-0.19995376467704773,
-0.06890371441841125,
-0.19114218652248383,
0.19798752665519714,
0.018049202859401703,
0.23852773010730743,
0.025174468755722046,
-0.017834683880209923,
0.05424167215824127,
-0.3786226511001587,
0.2754654288291931,
-0.1617426872253418,
0.27959734201431274,
0.0845312848687172,
-0.1858823001384735,
0.16869425773620605,
-0.13665933907032013,
-0.30628275871276855,
0.22576172649860382,
-0.3226749300956726,
0.09969581663608551,
-0.2237790822982788,
-0.5156590938568115,
0.11419841647148132,
0.17546822130680084,
-0.23132477700710297,
0.0730714425444603,
-0.013745607808232307,
-0.5280194282531738,
0.36043253540992737,
0.6017293930053711,
0.4299820065498352,
-0.13487517833709717,
-0.00011433787585701793,
-0.10878632962703705,
0.1047595664858818,
-0.16824884712696075,
-0.12814442813396454,
0.2010156512260437,
-0.1965935230255127,
-0.353300005197525,
0.0070067960768938065,
-0.08421355485916138,
-0.18220996856689453,
-0.17284709215164185,
-0.029626337811350822,
-0.40934550762176514,
0.4686136841773987,
-0.11059968173503876,
0.08707734942436218,
0.3693918287754059,
0.2736918330192566,
-0.02633822150528431,
0.03228199481964111,
-0.26285630464553833,
-0.22892500460147858,
0.2955482006072998,
0.6199077367782593,
-0.05853768438100815,
0.06040709838271141,
0.020141471177339554,
-0.1008201539516449,
-0.06992174685001373,
0.09664103388786316,
-0.30881503224372864,
-0.1384871006011963,
-0.10580551624298096,
-0.2865822911262512,
0.21440348029136658,
0.3457825481891632,
-0.0069595761597156525,
-0.2809508442878723,
-0.5274587869644165,
0.15039676427841187,
-0.3430873155593872,
-0.023959383368492126,
-0.15873152017593384,
0.2036621868610382,
0.15521925687789917,
-0.3709712624549866,
-0.21208420395851135,
0.026511982083320618,
0.35383957624435425,
0.06770732998847961,
0.23327171802520752,
-0.10532637685537338,
0.08862751722335815,
0.6984668374061584,
-0.18226005136966705,
0.15459458529949188,
-0.03215232864022255,
-0.1045861691236496,
0.3786810338497162,
-0.7781854271888733,
-0.3321959376335144,
0.0024702921509742737,
0.05562979727983475,
0.5051997900009155,
0.33966153860092163,
0.19600810110569,
0.15188391506671906,
0.1788933128118515,
-0.008603803813457489,
0.6398940682411194,
-0.012422424741089344,
-0.2901928126811981,
-0.010755768045783043,
0.054076194763183594,
0.132512629032135,
0.0706377774477005,
-0.12900123000144958,
0.005477530881762505,
-0.20709538459777832,
0.1610240936279297,
-0.1237902119755745,
-0.04935489594936371,
0.08186313509941101,
-0.2596208453178406,
-0.2002827227115631,
-0.3229806125164032,
-0.2975955903530121,
0.13650090992450714,
-0.30767959356307983,
0.09304822981357574,
0.19369637966156006,
-0.2928294539451599,
0.39581841230392456,
-0.0389043353497982,
-0.2813195586204529,
-0.08524785935878754,
-0.048860128968954086,
-0.19901235401630402,
0.2509607672691345,
0.2894781529903412,
-0.2279752492904663,
0.26034578680992126,
0.07239608466625214,
0.26866745948791504,
0.0029826387763023376,
0.38287660479545593,
0.009968776255846024,
0.20873557031154633,
-0.05381252244114876,
-0.0024550631642341614,
-0.24414180219173431,
0.0657510906457901,
0.14693446457386017,
-0.020698241889476776,
-0.07613600045442581,
-0.17188188433647156,
-0.2333378791809082,
-0.04812593758106232,
0.11585889756679535,
-0.6768346428871155,
-0.1360449492931366,
-0.1377597451210022,
0.4196183979511261,
0.10985051095485687,
0.00020026043057441711,
0.13369356095790863,
0.05383273959159851,
0.07176373898983002,
0.055523816496133804,
0.39595794677734375,
0.3329800069332123,
-0.2898479104042053,
-0.07895989716053009,
0.01696557179093361,
0.031925879418849945,
0.19434258341789246,
0.20252743363380432,
-0.31185978651046753,
-0.11314026266336441,
-0.2901151180267334,
-0.37140709161758423,
-0.00535101443529129,
-0.14348649978637695,
-0.2884048521518707,
0.038502003997564316,
-0.049500733613967896,
0.6357329487800598,
0.22383549809455872,
0.03185044974088669,
0.6378974914550781,
-0.17264646291732788,
0.12114627659320831,
0.3014492988586426,
-0.3803785741329193,
-0.40889114141464233,
-0.2522648572921753,
-0.03321428969502449,
-0.06653399765491486,
0.13556717336177826,
0.07188933342695236,
0.07181631773710251,
-0.06558192521333694,
0.39120548963546753,
0.3945560157299042,
0.02902844361960888,
0.2984706163406372,
0.1504419595003128,
0.1148274689912796,
0.15419094264507294,
-0.04404621198773384,
-0.5754544734954834,
-0.18242481350898743,
0.03573013097047806,
0.016837317496538162,
0.06763733923435211,
0.04296698793768883,
-0.031270671635866165,
-0.06376335024833679,
-0.11456098407506943,
-0.3211856782436371,
-0.18504178524017334,
0.0535864382982254,
0.08818401396274567,
0.24043574929237366,
-0.08254733681678772,
-0.261499285697937,
0.2003871649503708,
-0.14835886657238007,
-0.12394940108060837,
-0.3649168014526367,
0.42537814378738403,
0.36914804577827454,
0.05163492262363434,
0.00328759104013443,
0.38105952739715576,
-0.1183464303612709,
-0.5188270211219788,
0.003123148810118437,
0.34990280866622925,
-0.04152657836675644,
-0.11387519538402557,
0.16730940341949463,
0.48310166597366333,
0.3614557087421417,
-0.47386452555656433,
-0.03581387549638748,
-0.11497029662132263,
-0.12969379127025604,
-0.2066514790058136,
0.2792602479457855,
0.5734533667564392,
-0.0793343335390091,
0.39583078026771545,
-0.10107496380805969,
0.03640144318342209,
0.26304662227630615,
0.037621792405843735,
-0.5252797603607178,
-0.456766277551651,
-0.3033704459667206,
-0.04945788159966469,
0.20814628899097443,
-0.07060016691684723,
-0.17133329808712006,
0.07831241190433502,
0.24987761676311493,
0.08170469105243683,
-0.2880946695804596,
-0.051648981869220734,
-0.13068276643753052,
-0.011987177655100822,
0.006470629014074802,
0.02180764451622963,
0.3905605673789978,
0.22022980451583862,
0.4254142642021179,
-0.12475267797708511,
0.0493956059217453,
-0.013258966617286205,
0.35021379590034485,
0.23842452466487885,
0.08616235107183456,
0.15315118432044983,
0.1167868822813034,
-0.14034941792488098,
-0.3414052128791809,
-0.3277100920677185,
0.032584987580776215,
-0.010615019127726555,
0.07959742844104767,
-0.05877482891082764,
-0.4858565032482147,
-0.1715955138206482,
0.0408274307847023,
-0.360262006521225,
-0.17918066680431366,
-0.5262871384620667,
-0.12122659385204315,
0.5758896470069885,
-0.05097859352827072,
0.21860454976558685,
-0.2493358850479126,
0.22563579678535461,
0.029247062280774117,
-0.26010408997535706,
0.17373910546302795,
0.007503379136323929,
0.018747156485915184,
0.10092803835868835,
0.18039004504680634,
-0.6855865716934204,
-0.00021495483815670013,
0.0862014889717102,
-0.23356503248214722,
-0.3024901747703552,
-0.1598348766565323,
0.22435787320137024,
0.03917142003774643,
0.05434960871934891,
0.3384595513343811,
-0.18700011074543,
-0.1507849544286728,
-0.1143917441368103,
0.08263245224952698,
-0.03436586260795593,
0.2240075170993805,
0.06527051329612732,
0.0169390756636858,
0.3498254716396332,
-0.07005880028009415,
-0.0781310573220253,
-0.25002411007881165,
-0.5311596989631653,
-0.03193975239992142,
-0.027887806296348572,
-0.34057414531707764,
0.13549122214317322,
-0.07560957968235016,
-0.0964498519897461,
0.09549646079540253,
-0.2920699119567871,
-0.2903927266597748,
-0.3503485918045044,
0.3411945104598999,
-0.3733065724372864,
0.020387843251228333,
-0.06500569730997086,
-0.2673543095588684,
0.34586888551712036,
0.2518981695175171,
-0.002951696515083313,
0.09414205700159073,
0.06865046173334122,
0.07689091563224792,
-0.14896266162395477,
0.26295697689056396,
-0.1345507651567459,
-0.08753297477960587,
0.05390816181898117,
-0.019291413947939873,
0.29474881291389465,
0.23015719652175903,
0.06652522087097168,
0.2700378894805908,
0.21366649866104126,
0.19032996892929077,
0.151570662856102,
0.6235873699188232,
0.17512938380241394,
0.09156529605388641,
0.591338038444519,
0.20510253310203552,
0.16125456988811493,
-0.216342031955719,
-0.22483432292938232,
-0.06357663124799728,
-0.020259380340576172,
-0.026032743975520134,
0.16287165880203247,
-0.011053159832954407,
-0.2126709669828415,
-0.08780890703201294,
-0.02833838388323784,
0.3647666275501251,
-0.2551399767398834,
0.1165793165564537,
-0.22476094961166382,
0.3270491659641266,
0.030442357063293457,
-0.05548472702503204,
-0.06530851125717163,
-0.016129590570926666,
-0.18551665544509888,
-0.11294649541378021,
0.3292671740055084,
-0.011085416190326214,
-0.09472329914569855,
-0.09674102067947388,
-0.640402615070343,
0.14791882038116455,
-0.016434278339147568,
0.5093227624893188,
0.25743335485458374,
-0.2125006914138794,
-0.06631940603256226,
0.020545214414596558,
0.664801299571991,
-0.24740265309810638,
-0.4775487780570984,
0.10376252233982086,
0.07324864715337753,
-0.07109469175338745,
-0.2869220972061157,
-0.13114047050476074,
0.36908283829689026,
0.26213523745536804,
0.2766018807888031,
-0.15965144336223602,
-0.30085480213165283,
0.5392159223556519,
0.22101643681526184,
0.03611749783158302,
-0.14161622524261475,
-0.10117098689079285,
-0.30098700523376465,
-0.0038672108203172684,
0.11025937646627426,
0.23786534368991852,
0.4052906334400177,
-0.22699494659900665,
-0.04106888547539711,
-0.1836710125207901,
-0.133540540933609,
0.050785958766937256,
0.11802725493907928,
0.1832866072654724,
0.12719295918941498,
0.42996397614479065,
0.11424289643764496,
-0.17654524743556976,
0.2667860686779022,
0.506500244140625,
-0.012804880738258362,
-0.31921276450157166,
0.1699504852294922,
-0.15720298886299133,
0.13690556585788727,
-0.1525992453098297,
0.0753893107175827,
0.2864605486392975,
-0.08433257043361664,
0.0584791898727417,
-0.20226730406284332,
-0.08235327154397964,
0.2678423523902893,
0.10236311703920364,
-0.30829164385795593,
-0.7050920128822327,
0.2462713122367859,
0.20669738948345184,
-0.05461860075592995,
0.46187105774879456,
0.20552974939346313,
-0.3354891240596771,
0.1811949908733368,
0.20757344365119934,
0.5010929107666016,
0.11962314695119858,
-0.0508410818874836,
0.13563120365142822,
0.12963800132274628,
0.19670234620571136,
-0.12079878896474838,
0.279413640499115,
0.30406931042671204,
-0.4989718496799469,
0.0820470005273819,
0.11999188363552094,
0.2180590033531189,
0.4028940200805664,
-0.011053189635276794,
0.36497989296913147,
0.003649666905403137,
-0.1629462093114853,
-0.07278530299663544,
0.030639804899692535,
-0.24435803294181824,
-0.2687385380268097,
-0.1405869573354721,
0.13292764127254486,
0.18391574919223785,
-0.221194326877594,
0.0094137042760849,
-0.07706212252378464,
0.5860863327980042,
0.16444025933742523,
-0.29148513078689575,
-0.04710886999964714,
-0.013756172731518745,
-0.0705733671784401,
-0.22098496556282043,
-0.08316602557897568,
0.4444860816001892,
-0.06414638459682465,
0.37794244289398193,
-0.20041683316230774,
0.058060966432094574,
0.04735521227121353,
0.013097628951072693,
-0.08273174613714218,
-0.2545057535171509,
0.1275332123041153,
0.2340368926525116,
0.12783947587013245,
-0.31684792041778564,
0.05943985655903816,
0.2810773253440857,
-0.3441653847694397,
0.16553574800491333,
0.04485664516687393,
0.01929943636059761,
-0.21014896035194397,
-0.05433673411607742,
0.20958217978477478,
-0.035347554832696915,
-0.28603294491767883,
0.005644730292260647,
0.06942189484834671,
-0.41859006881713867,
0.2450825273990631,
-0.49350258708000183,
-0.10494630038738251,
-0.30074557662010193,
0.4893891215324402,
0.1828320324420929,
-0.11459758132696152,
0.30034559965133667,
-0.01226964220404625,
-0.020626047626137733,
-0.1395706832408905,
-0.05418717488646507,
0.10418955981731415,
0.044403478503227234,
0.28655415773391724,
-0.007339982315897942,
0.14874379336833954,
0.07118593901395798,
0.14550621807575226,
0.12860488891601562,
0.11349967122077942,
-0.09831134229898453,
-0.2527849078178406,
-0.23234879970550537,
0.16234004497528076,
-0.006395943462848663,
0.1770227551460266,
-0.06819108873605728,
-0.12349563837051392,
-0.1057138666510582,
-0.042366378009319305,
-0.24975866079330444,
-0.27106085419654846,
-0.0022822022438049316,
-0.14208237826824188,
-0.013250574469566345,
-0.22170531749725342,
0.21007375419139862,
0.21563871204853058,
0.04537465423345566,
0.22997109591960907,
-0.06331688910722733,
-0.1417820155620575,
-0.1444675177335739,
0.09618568420410156,
-0.03866862505674362,
-0.1824466437101364,
0.02760050818324089,
-0.0346328504383564,
-0.14894740283489227,
-0.33516550064086914,
0.2557225227355957,
-0.044949084520339966,
0.1843642145395279,
0.34433022141456604,
-0.0077369920909404755,
-0.3374364376068115,
-0.0688125416636467,
-0.10028885304927826,
0.3309062123298645,
0.003987528383731842,
0.07942099869251251,
0.35287660360336304,
0.16631054878234863,
-0.1393880546092987,
-0.3492645025253296,
0.3048457205295563,
0.1986166536808014,
-0.2012956738471985,
0.2669609487056732,
0.14089465141296387,
-0.22268664836883545,
0.45866236090660095,
0.27616792917251587,
0.6373780965805054,
0.3198302090167999,
-0.16349811851978302,
0.09156142920255661,
0.16532815992832184,
-0.077059805393219,
-0.11490670591592789,
0.26963043212890625,
0.12473780661821365,
0.47642189264297485,
0.4296891689300537,
0.4760090410709381,
-0.21860167384147644,
0.1679239273071289,
-0.09533374756574631,
0.3425845205783844,
-0.16877730190753937,
0.503261148929596,
0.32082656025886536,
0.27996763586997986,
0.025445152074098587,
0.21868760883808136,
-0.09434930980205536,
0.480822890996933,
0.015928898006677628,
-0.4874308109283447,
0.534805178642273,
0.041670456528663635,
-0.2542116641998291,
0.08264324069023132,
-0.3991651237010956,
-0.1445205956697464,
0.19620834290981293,
-0.01774384081363678,
0.5268101096153259,
0.029291726648807526,
0.3825754225254059,
-0.15879277884960175,
-0.2625945210456848,
-0.11275700479745865,
0.044532112777233124,
0.19440695643424988,
-0.22280475497245789,
-0.05998203158378601,
-0.3130738139152527,
-0.4130704402923584,
-0.028498947620391846,
0.09097903966903687,
-0.1375379115343094,
0.4764527976512909,
-0.23779495060443878,
0.4062083959579468,
-0.35260894894599915,
0.2964533269405365,
0.2323109209537506,
0.24252918362617493,
-0.18276014924049377,
0.14747343957424164,
0.35827410221099854,
-0.1494767814874649,
0.12764078378677368,
0.22279752790927887,
0.1377735137939453,
-0.0846264511346817,
0.11759713292121887,
-0.03350137174129486,
-0.12890638411045074,
-0.13042956590652466,
-0.14472557604312897,
0.1716044545173645,
-0.26766788959503174,
-0.29749494791030884,
0.2645478844642639,
0.07653041183948517,
-0.048632245510816574,
0.17760469019412994,
0.24110201001167297,
-0.020370468497276306,
-0.43993666768074036,
-0.26814404129981995,
0.2385418862104416,
0.03553397208452225,
0.2767585515975952,
-0.13001391291618347,
-0.20106840133666992,
-0.12932364642620087,
0.06524689495563507,
-0.14938724040985107,
-0.08957535773515701,
0.07651297748088837,
0.043573424220085144,
-0.1937098503112793,
0.3913644552230835,
0.28818538784980774,
0.05077178031206131,
-0.11005771905183792,
-0.3517293334007263,
-0.351175457239151,
-0.079857237637043,
-0.12736357748508453,
-0.3102472424507141,
0.20453904569149017,
0.46562814712524414,
-0.04945296794176102,
0.09368228912353516,
0.17411646246910095,
0.0032196203246712685,
-0.008351864293217659,
0.35161831974983215,
-0.3080570697784424,
-0.3352521061897278,
-0.0007150024175643921,
0.38858088850975037,
-0.003643076866865158,
-0.09871295839548111,
-0.25195690989494324,
-0.00024273712188005447,
-0.1046961322426796,
-0.0005049519240856171,
0.006968609988689423,
0.18383954465389252,
-0.23363450169563293,
0.11301320791244507,
0.21673281490802765,
0.2332531362771988,
-0.11622843891382217,
0.08746644854545593,
-0.3445644676685333,
-0.21952016651630402,
-0.3470282256603241,
0.05207119882106781,
-0.10352444648742676,
0.28852227330207825,
-0.2160041630268097,
-0.05839505419135094,
-0.10489093512296677,
0.4040500521659851,
0.16923542320728302,
-0.16306762397289276,
-0.3691819906234741,
0.3158996105194092,
0.03609238564968109,
0.07215891778469086,
0.03783562034368515,
0.524087131023407,
-0.022667743265628815,
0.1833178699016571,
0.039747580885887146,
-0.22094279527664185,
0.0263853520154953,
-0.23716439306735992,
-0.3006233274936676,
-0.2102663815021515,
-0.040000736713409424,
0.16946080327033997,
-0.26246392726898193,
-0.3756300210952759,
0.02981726825237274,
0.2718253433704376,
0.05227385833859444,
0.020848795771598816,
0.47513407468795776,
0.18623091280460358,
-0.0942298099398613,
-0.25323420763015747,
0.08961870521306992,
0.3342975378036499,
-0.08363717794418335,
0.07144413888454437,
-0.24265240132808685
] |
https://github.com/huggingface/datasets/issues/4893 | Oversampling strategy for iterable datasets in `interleave_datasets` | Hi ! Awesome :)
Maybe you can pre-load the next sample to know if the dataset is empty or not ?
This way it should be possible to have the same behavior for `IterableDataset` | In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :) | 34 | Oversampling strategy for iterable datasets in `interleave_datasets`
In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :)
Hi ! Awesome :)
Maybe you can pre-load the next sample to know if the dataset is empty or not ?
This way it should be possible to have the same behavior for `IterableDataset` | [
-0.4228614270687103,
-0.19995376467704773,
-0.06890371441841125,
-0.19114218652248383,
0.19798752665519714,
0.018049202859401703,
0.23852773010730743,
0.025174468755722046,
-0.017834683880209923,
0.05424167215824127,
-0.3786226511001587,
0.2754654288291931,
-0.1617426872253418,
0.27959734201431274,
0.0845312848687172,
-0.1858823001384735,
0.16869425773620605,
-0.13665933907032013,
-0.30628275871276855,
0.22576172649860382,
-0.3226749300956726,
0.09969581663608551,
-0.2237790822982788,
-0.5156590938568115,
0.11419841647148132,
0.17546822130680084,
-0.23132477700710297,
0.0730714425444603,
-0.013745607808232307,
-0.5280194282531738,
0.36043253540992737,
0.6017293930053711,
0.4299820065498352,
-0.13487517833709717,
-0.00011433787585701793,
-0.10878632962703705,
0.1047595664858818,
-0.16824884712696075,
-0.12814442813396454,
0.2010156512260437,
-0.1965935230255127,
-0.353300005197525,
0.0070067960768938065,
-0.08421355485916138,
-0.18220996856689453,
-0.17284709215164185,
-0.029626337811350822,
-0.40934550762176514,
0.4686136841773987,
-0.11059968173503876,
0.08707734942436218,
0.3693918287754059,
0.2736918330192566,
-0.02633822150528431,
0.03228199481964111,
-0.26285630464553833,
-0.22892500460147858,
0.2955482006072998,
0.6199077367782593,
-0.05853768438100815,
0.06040709838271141,
0.020141471177339554,
-0.1008201539516449,
-0.06992174685001373,
0.09664103388786316,
-0.30881503224372864,
-0.1384871006011963,
-0.10580551624298096,
-0.2865822911262512,
0.21440348029136658,
0.3457825481891632,
-0.0069595761597156525,
-0.2809508442878723,
-0.5274587869644165,
0.15039676427841187,
-0.3430873155593872,
-0.023959383368492126,
-0.15873152017593384,
0.2036621868610382,
0.15521925687789917,
-0.3709712624549866,
-0.21208420395851135,
0.026511982083320618,
0.35383957624435425,
0.06770732998847961,
0.23327171802520752,
-0.10532637685537338,
0.08862751722335815,
0.6984668374061584,
-0.18226005136966705,
0.15459458529949188,
-0.03215232864022255,
-0.1045861691236496,
0.3786810338497162,
-0.7781854271888733,
-0.3321959376335144,
0.0024702921509742737,
0.05562979727983475,
0.5051997900009155,
0.33966153860092163,
0.19600810110569,
0.15188391506671906,
0.1788933128118515,
-0.008603803813457489,
0.6398940682411194,
-0.012422424741089344,
-0.2901928126811981,
-0.010755768045783043,
0.054076194763183594,
0.132512629032135,
0.0706377774477005,
-0.12900123000144958,
0.005477530881762505,
-0.20709538459777832,
0.1610240936279297,
-0.1237902119755745,
-0.04935489594936371,
0.08186313509941101,
-0.2596208453178406,
-0.2002827227115631,
-0.3229806125164032,
-0.2975955903530121,
0.13650090992450714,
-0.30767959356307983,
0.09304822981357574,
0.19369637966156006,
-0.2928294539451599,
0.39581841230392456,
-0.0389043353497982,
-0.2813195586204529,
-0.08524785935878754,
-0.048860128968954086,
-0.19901235401630402,
0.2509607672691345,
0.2894781529903412,
-0.2279752492904663,
0.26034578680992126,
0.07239608466625214,
0.26866745948791504,
0.0029826387763023376,
0.38287660479545593,
0.009968776255846024,
0.20873557031154633,
-0.05381252244114876,
-0.0024550631642341614,
-0.24414180219173431,
0.0657510906457901,
0.14693446457386017,
-0.020698241889476776,
-0.07613600045442581,
-0.17188188433647156,
-0.2333378791809082,
-0.04812593758106232,
0.11585889756679535,
-0.6768346428871155,
-0.1360449492931366,
-0.1377597451210022,
0.4196183979511261,
0.10985051095485687,
0.00020026043057441711,
0.13369356095790863,
0.05383273959159851,
0.07176373898983002,
0.055523816496133804,
0.39595794677734375,
0.3329800069332123,
-0.2898479104042053,
-0.07895989716053009,
0.01696557179093361,
0.031925879418849945,
0.19434258341789246,
0.20252743363380432,
-0.31185978651046753,
-0.11314026266336441,
-0.2901151180267334,
-0.37140709161758423,
-0.00535101443529129,
-0.14348649978637695,
-0.2884048521518707,
0.038502003997564316,
-0.049500733613967896,
0.6357329487800598,
0.22383549809455872,
0.03185044974088669,
0.6378974914550781,
-0.17264646291732788,
0.12114627659320831,
0.3014492988586426,
-0.3803785741329193,
-0.40889114141464233,
-0.2522648572921753,
-0.03321428969502449,
-0.06653399765491486,
0.13556717336177826,
0.07188933342695236,
0.07181631773710251,
-0.06558192521333694,
0.39120548963546753,
0.3945560157299042,
0.02902844361960888,
0.2984706163406372,
0.1504419595003128,
0.1148274689912796,
0.15419094264507294,
-0.04404621198773384,
-0.5754544734954834,
-0.18242481350898743,
0.03573013097047806,
0.016837317496538162,
0.06763733923435211,
0.04296698793768883,
-0.031270671635866165,
-0.06376335024833679,
-0.11456098407506943,
-0.3211856782436371,
-0.18504178524017334,
0.0535864382982254,
0.08818401396274567,
0.24043574929237366,
-0.08254733681678772,
-0.261499285697937,
0.2003871649503708,
-0.14835886657238007,
-0.12394940108060837,
-0.3649168014526367,
0.42537814378738403,
0.36914804577827454,
0.05163492262363434,
0.00328759104013443,
0.38105952739715576,
-0.1183464303612709,
-0.5188270211219788,
0.003123148810118437,
0.34990280866622925,
-0.04152657836675644,
-0.11387519538402557,
0.16730940341949463,
0.48310166597366333,
0.3614557087421417,
-0.47386452555656433,
-0.03581387549638748,
-0.11497029662132263,
-0.12969379127025604,
-0.2066514790058136,
0.2792602479457855,
0.5734533667564392,
-0.0793343335390091,
0.39583078026771545,
-0.10107496380805969,
0.03640144318342209,
0.26304662227630615,
0.037621792405843735,
-0.5252797603607178,
-0.456766277551651,
-0.3033704459667206,
-0.04945788159966469,
0.20814628899097443,
-0.07060016691684723,
-0.17133329808712006,
0.07831241190433502,
0.24987761676311493,
0.08170469105243683,
-0.2880946695804596,
-0.051648981869220734,
-0.13068276643753052,
-0.011987177655100822,
0.006470629014074802,
0.02180764451622963,
0.3905605673789978,
0.22022980451583862,
0.4254142642021179,
-0.12475267797708511,
0.0493956059217453,
-0.013258966617286205,
0.35021379590034485,
0.23842452466487885,
0.08616235107183456,
0.15315118432044983,
0.1167868822813034,
-0.14034941792488098,
-0.3414052128791809,
-0.3277100920677185,
0.032584987580776215,
-0.010615019127726555,
0.07959742844104767,
-0.05877482891082764,
-0.4858565032482147,
-0.1715955138206482,
0.0408274307847023,
-0.360262006521225,
-0.17918066680431366,
-0.5262871384620667,
-0.12122659385204315,
0.5758896470069885,
-0.05097859352827072,
0.21860454976558685,
-0.2493358850479126,
0.22563579678535461,
0.029247062280774117,
-0.26010408997535706,
0.17373910546302795,
0.007503379136323929,
0.018747156485915184,
0.10092803835868835,
0.18039004504680634,
-0.6855865716934204,
-0.00021495483815670013,
0.0862014889717102,
-0.23356503248214722,
-0.3024901747703552,
-0.1598348766565323,
0.22435787320137024,
0.03917142003774643,
0.05434960871934891,
0.3384595513343811,
-0.18700011074543,
-0.1507849544286728,
-0.1143917441368103,
0.08263245224952698,
-0.03436586260795593,
0.2240075170993805,
0.06527051329612732,
0.0169390756636858,
0.3498254716396332,
-0.07005880028009415,
-0.0781310573220253,
-0.25002411007881165,
-0.5311596989631653,
-0.03193975239992142,
-0.027887806296348572,
-0.34057414531707764,
0.13549122214317322,
-0.07560957968235016,
-0.0964498519897461,
0.09549646079540253,
-0.2920699119567871,
-0.2903927266597748,
-0.3503485918045044,
0.3411945104598999,
-0.3733065724372864,
0.020387843251228333,
-0.06500569730997086,
-0.2673543095588684,
0.34586888551712036,
0.2518981695175171,
-0.002951696515083313,
0.09414205700159073,
0.06865046173334122,
0.07689091563224792,
-0.14896266162395477,
0.26295697689056396,
-0.1345507651567459,
-0.08753297477960587,
0.05390816181898117,
-0.019291413947939873,
0.29474881291389465,
0.23015719652175903,
0.06652522087097168,
0.2700378894805908,
0.21366649866104126,
0.19032996892929077,
0.151570662856102,
0.6235873699188232,
0.17512938380241394,
0.09156529605388641,
0.591338038444519,
0.20510253310203552,
0.16125456988811493,
-0.216342031955719,
-0.22483432292938232,
-0.06357663124799728,
-0.020259380340576172,
-0.026032743975520134,
0.16287165880203247,
-0.011053159832954407,
-0.2126709669828415,
-0.08780890703201294,
-0.02833838388323784,
0.3647666275501251,
-0.2551399767398834,
0.1165793165564537,
-0.22476094961166382,
0.3270491659641266,
0.030442357063293457,
-0.05548472702503204,
-0.06530851125717163,
-0.016129590570926666,
-0.18551665544509888,
-0.11294649541378021,
0.3292671740055084,
-0.011085416190326214,
-0.09472329914569855,
-0.09674102067947388,
-0.640402615070343,
0.14791882038116455,
-0.016434278339147568,
0.5093227624893188,
0.25743335485458374,
-0.2125006914138794,
-0.06631940603256226,
0.020545214414596558,
0.664801299571991,
-0.24740265309810638,
-0.4775487780570984,
0.10376252233982086,
0.07324864715337753,
-0.07109469175338745,
-0.2869220972061157,
-0.13114047050476074,
0.36908283829689026,
0.26213523745536804,
0.2766018807888031,
-0.15965144336223602,
-0.30085480213165283,
0.5392159223556519,
0.22101643681526184,
0.03611749783158302,
-0.14161622524261475,
-0.10117098689079285,
-0.30098700523376465,
-0.0038672108203172684,
0.11025937646627426,
0.23786534368991852,
0.4052906334400177,
-0.22699494659900665,
-0.04106888547539711,
-0.1836710125207901,
-0.133540540933609,
0.050785958766937256,
0.11802725493907928,
0.1832866072654724,
0.12719295918941498,
0.42996397614479065,
0.11424289643764496,
-0.17654524743556976,
0.2667860686779022,
0.506500244140625,
-0.012804880738258362,
-0.31921276450157166,
0.1699504852294922,
-0.15720298886299133,
0.13690556585788727,
-0.1525992453098297,
0.0753893107175827,
0.2864605486392975,
-0.08433257043361664,
0.0584791898727417,
-0.20226730406284332,
-0.08235327154397964,
0.2678423523902893,
0.10236311703920364,
-0.30829164385795593,
-0.7050920128822327,
0.2462713122367859,
0.20669738948345184,
-0.05461860075592995,
0.46187105774879456,
0.20552974939346313,
-0.3354891240596771,
0.1811949908733368,
0.20757344365119934,
0.5010929107666016,
0.11962314695119858,
-0.0508410818874836,
0.13563120365142822,
0.12963800132274628,
0.19670234620571136,
-0.12079878896474838,
0.279413640499115,
0.30406931042671204,
-0.4989718496799469,
0.0820470005273819,
0.11999188363552094,
0.2180590033531189,
0.4028940200805664,
-0.011053189635276794,
0.36497989296913147,
0.003649666905403137,
-0.1629462093114853,
-0.07278530299663544,
0.030639804899692535,
-0.24435803294181824,
-0.2687385380268097,
-0.1405869573354721,
0.13292764127254486,
0.18391574919223785,
-0.221194326877594,
0.0094137042760849,
-0.07706212252378464,
0.5860863327980042,
0.16444025933742523,
-0.29148513078689575,
-0.04710886999964714,
-0.013756172731518745,
-0.0705733671784401,
-0.22098496556282043,
-0.08316602557897568,
0.4444860816001892,
-0.06414638459682465,
0.37794244289398193,
-0.20041683316230774,
0.058060966432094574,
0.04735521227121353,
0.013097628951072693,
-0.08273174613714218,
-0.2545057535171509,
0.1275332123041153,
0.2340368926525116,
0.12783947587013245,
-0.31684792041778564,
0.05943985655903816,
0.2810773253440857,
-0.3441653847694397,
0.16553574800491333,
0.04485664516687393,
0.01929943636059761,
-0.21014896035194397,
-0.05433673411607742,
0.20958217978477478,
-0.035347554832696915,
-0.28603294491767883,
0.005644730292260647,
0.06942189484834671,
-0.41859006881713867,
0.2450825273990631,
-0.49350258708000183,
-0.10494630038738251,
-0.30074557662010193,
0.4893891215324402,
0.1828320324420929,
-0.11459758132696152,
0.30034559965133667,
-0.01226964220404625,
-0.020626047626137733,
-0.1395706832408905,
-0.05418717488646507,
0.10418955981731415,
0.044403478503227234,
0.28655415773391724,
-0.007339982315897942,
0.14874379336833954,
0.07118593901395798,
0.14550621807575226,
0.12860488891601562,
0.11349967122077942,
-0.09831134229898453,
-0.2527849078178406,
-0.23234879970550537,
0.16234004497528076,
-0.006395943462848663,
0.1770227551460266,
-0.06819108873605728,
-0.12349563837051392,
-0.1057138666510582,
-0.042366378009319305,
-0.24975866079330444,
-0.27106085419654846,
-0.0022822022438049316,
-0.14208237826824188,
-0.013250574469566345,
-0.22170531749725342,
0.21007375419139862,
0.21563871204853058,
0.04537465423345566,
0.22997109591960907,
-0.06331688910722733,
-0.1417820155620575,
-0.1444675177335739,
0.09618568420410156,
-0.03866862505674362,
-0.1824466437101364,
0.02760050818324089,
-0.0346328504383564,
-0.14894740283489227,
-0.33516550064086914,
0.2557225227355957,
-0.044949084520339966,
0.1843642145395279,
0.34433022141456604,
-0.0077369920909404755,
-0.3374364376068115,
-0.0688125416636467,
-0.10028885304927826,
0.3309062123298645,
0.003987528383731842,
0.07942099869251251,
0.35287660360336304,
0.16631054878234863,
-0.1393880546092987,
-0.3492645025253296,
0.3048457205295563,
0.1986166536808014,
-0.2012956738471985,
0.2669609487056732,
0.14089465141296387,
-0.22268664836883545,
0.45866236090660095,
0.27616792917251587,
0.6373780965805054,
0.3198302090167999,
-0.16349811851978302,
0.09156142920255661,
0.16532815992832184,
-0.077059805393219,
-0.11490670591592789,
0.26963043212890625,
0.12473780661821365,
0.47642189264297485,
0.4296891689300537,
0.4760090410709381,
-0.21860167384147644,
0.1679239273071289,
-0.09533374756574631,
0.3425845205783844,
-0.16877730190753937,
0.503261148929596,
0.32082656025886536,
0.27996763586997986,
0.025445152074098587,
0.21868760883808136,
-0.09434930980205536,
0.480822890996933,
0.015928898006677628,
-0.4874308109283447,
0.534805178642273,
0.041670456528663635,
-0.2542116641998291,
0.08264324069023132,
-0.3991651237010956,
-0.1445205956697464,
0.19620834290981293,
-0.01774384081363678,
0.5268101096153259,
0.029291726648807526,
0.3825754225254059,
-0.15879277884960175,
-0.2625945210456848,
-0.11275700479745865,
0.044532112777233124,
0.19440695643424988,
-0.22280475497245789,
-0.05998203158378601,
-0.3130738139152527,
-0.4130704402923584,
-0.028498947620391846,
0.09097903966903687,
-0.1375379115343094,
0.4764527976512909,
-0.23779495060443878,
0.4062083959579468,
-0.35260894894599915,
0.2964533269405365,
0.2323109209537506,
0.24252918362617493,
-0.18276014924049377,
0.14747343957424164,
0.35827410221099854,
-0.1494767814874649,
0.12764078378677368,
0.22279752790927887,
0.1377735137939453,
-0.0846264511346817,
0.11759713292121887,
-0.03350137174129486,
-0.12890638411045074,
-0.13042956590652466,
-0.14472557604312897,
0.1716044545173645,
-0.26766788959503174,
-0.29749494791030884,
0.2645478844642639,
0.07653041183948517,
-0.048632245510816574,
0.17760469019412994,
0.24110201001167297,
-0.020370468497276306,
-0.43993666768074036,
-0.26814404129981995,
0.2385418862104416,
0.03553397208452225,
0.2767585515975952,
-0.13001391291618347,
-0.20106840133666992,
-0.12932364642620087,
0.06524689495563507,
-0.14938724040985107,
-0.08957535773515701,
0.07651297748088837,
0.043573424220085144,
-0.1937098503112793,
0.3913644552230835,
0.28818538784980774,
0.05077178031206131,
-0.11005771905183792,
-0.3517293334007263,
-0.351175457239151,
-0.079857237637043,
-0.12736357748508453,
-0.3102472424507141,
0.20453904569149017,
0.46562814712524414,
-0.04945296794176102,
0.09368228912353516,
0.17411646246910095,
0.0032196203246712685,
-0.008351864293217659,
0.35161831974983215,
-0.3080570697784424,
-0.3352521061897278,
-0.0007150024175643921,
0.38858088850975037,
-0.003643076866865158,
-0.09871295839548111,
-0.25195690989494324,
-0.00024273712188005447,
-0.1046961322426796,
-0.0005049519240856171,
0.006968609988689423,
0.18383954465389252,
-0.23363450169563293,
0.11301320791244507,
0.21673281490802765,
0.2332531362771988,
-0.11622843891382217,
0.08746644854545593,
-0.3445644676685333,
-0.21952016651630402,
-0.3470282256603241,
0.05207119882106781,
-0.10352444648742676,
0.28852227330207825,
-0.2160041630268097,
-0.05839505419135094,
-0.10489093512296677,
0.4040500521659851,
0.16923542320728302,
-0.16306762397289276,
-0.3691819906234741,
0.3158996105194092,
0.03609238564968109,
0.07215891778469086,
0.03783562034368515,
0.524087131023407,
-0.022667743265628815,
0.1833178699016571,
0.039747580885887146,
-0.22094279527664185,
0.0263853520154953,
-0.23716439306735992,
-0.3006233274936676,
-0.2102663815021515,
-0.040000736713409424,
0.16946080327033997,
-0.26246392726898193,
-0.3756300210952759,
0.02981726825237274,
0.2718253433704376,
0.05227385833859444,
0.020848795771598816,
0.47513407468795776,
0.18623091280460358,
-0.0942298099398613,
-0.25323420763015747,
0.08961870521306992,
0.3342975378036499,
-0.08363717794418335,
0.07144413888454437,
-0.24265240132808685
] |
https://github.com/huggingface/datasets/issues/4893 | Oversampling strategy for iterable datasets in `interleave_datasets` | Hi @lhoestq, I've finally made some advances in the matter. I've modified the `IterableDataset` behavior so that it aligns with the `Dataset` behavior as we have discussed. The documentation has been dealt with too.
It works as expected on my examples. However I'm having trouble figuring out how to test `interleave_datasets` on `test_iterable_datasets.py` as I have never worked with pytest. Could you help me on that or give me some indications?
| In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :) | 71 | Oversampling strategy for iterable datasets in `interleave_datasets`
In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :)
Hi @lhoestq, I've finally made some advances in the matter. I've modified the `IterableDataset` behavior so that it aligns with the `Dataset` behavior as we have discussed. The documentation has been dealt with too.
It works as expected on my examples. However I'm having trouble figuring out how to test `interleave_datasets` on `test_iterable_datasets.py` as I have never worked with pytest. Could you help me on that or give me some indications?
| [
-0.4228614270687103,
-0.19995376467704773,
-0.06890371441841125,
-0.19114218652248383,
0.19798752665519714,
0.018049202859401703,
0.23852773010730743,
0.025174468755722046,
-0.017834683880209923,
0.05424167215824127,
-0.3786226511001587,
0.2754654288291931,
-0.1617426872253418,
0.27959734201431274,
0.0845312848687172,
-0.1858823001384735,
0.16869425773620605,
-0.13665933907032013,
-0.30628275871276855,
0.22576172649860382,
-0.3226749300956726,
0.09969581663608551,
-0.2237790822982788,
-0.5156590938568115,
0.11419841647148132,
0.17546822130680084,
-0.23132477700710297,
0.0730714425444603,
-0.013745607808232307,
-0.5280194282531738,
0.36043253540992737,
0.6017293930053711,
0.4299820065498352,
-0.13487517833709717,
-0.00011433787585701793,
-0.10878632962703705,
0.1047595664858818,
-0.16824884712696075,
-0.12814442813396454,
0.2010156512260437,
-0.1965935230255127,
-0.353300005197525,
0.0070067960768938065,
-0.08421355485916138,
-0.18220996856689453,
-0.17284709215164185,
-0.029626337811350822,
-0.40934550762176514,
0.4686136841773987,
-0.11059968173503876,
0.08707734942436218,
0.3693918287754059,
0.2736918330192566,
-0.02633822150528431,
0.03228199481964111,
-0.26285630464553833,
-0.22892500460147858,
0.2955482006072998,
0.6199077367782593,
-0.05853768438100815,
0.06040709838271141,
0.020141471177339554,
-0.1008201539516449,
-0.06992174685001373,
0.09664103388786316,
-0.30881503224372864,
-0.1384871006011963,
-0.10580551624298096,
-0.2865822911262512,
0.21440348029136658,
0.3457825481891632,
-0.0069595761597156525,
-0.2809508442878723,
-0.5274587869644165,
0.15039676427841187,
-0.3430873155593872,
-0.023959383368492126,
-0.15873152017593384,
0.2036621868610382,
0.15521925687789917,
-0.3709712624549866,
-0.21208420395851135,
0.026511982083320618,
0.35383957624435425,
0.06770732998847961,
0.23327171802520752,
-0.10532637685537338,
0.08862751722335815,
0.6984668374061584,
-0.18226005136966705,
0.15459458529949188,
-0.03215232864022255,
-0.1045861691236496,
0.3786810338497162,
-0.7781854271888733,
-0.3321959376335144,
0.0024702921509742737,
0.05562979727983475,
0.5051997900009155,
0.33966153860092163,
0.19600810110569,
0.15188391506671906,
0.1788933128118515,
-0.008603803813457489,
0.6398940682411194,
-0.012422424741089344,
-0.2901928126811981,
-0.010755768045783043,
0.054076194763183594,
0.132512629032135,
0.0706377774477005,
-0.12900123000144958,
0.005477530881762505,
-0.20709538459777832,
0.1610240936279297,
-0.1237902119755745,
-0.04935489594936371,
0.08186313509941101,
-0.2596208453178406,
-0.2002827227115631,
-0.3229806125164032,
-0.2975955903530121,
0.13650090992450714,
-0.30767959356307983,
0.09304822981357574,
0.19369637966156006,
-0.2928294539451599,
0.39581841230392456,
-0.0389043353497982,
-0.2813195586204529,
-0.08524785935878754,
-0.048860128968954086,
-0.19901235401630402,
0.2509607672691345,
0.2894781529903412,
-0.2279752492904663,
0.26034578680992126,
0.07239608466625214,
0.26866745948791504,
0.0029826387763023376,
0.38287660479545593,
0.009968776255846024,
0.20873557031154633,
-0.05381252244114876,
-0.0024550631642341614,
-0.24414180219173431,
0.0657510906457901,
0.14693446457386017,
-0.020698241889476776,
-0.07613600045442581,
-0.17188188433647156,
-0.2333378791809082,
-0.04812593758106232,
0.11585889756679535,
-0.6768346428871155,
-0.1360449492931366,
-0.1377597451210022,
0.4196183979511261,
0.10985051095485687,
0.00020026043057441711,
0.13369356095790863,
0.05383273959159851,
0.07176373898983002,
0.055523816496133804,
0.39595794677734375,
0.3329800069332123,
-0.2898479104042053,
-0.07895989716053009,
0.01696557179093361,
0.031925879418849945,
0.19434258341789246,
0.20252743363380432,
-0.31185978651046753,
-0.11314026266336441,
-0.2901151180267334,
-0.37140709161758423,
-0.00535101443529129,
-0.14348649978637695,
-0.2884048521518707,
0.038502003997564316,
-0.049500733613967896,
0.6357329487800598,
0.22383549809455872,
0.03185044974088669,
0.6378974914550781,
-0.17264646291732788,
0.12114627659320831,
0.3014492988586426,
-0.3803785741329193,
-0.40889114141464233,
-0.2522648572921753,
-0.03321428969502449,
-0.06653399765491486,
0.13556717336177826,
0.07188933342695236,
0.07181631773710251,
-0.06558192521333694,
0.39120548963546753,
0.3945560157299042,
0.02902844361960888,
0.2984706163406372,
0.1504419595003128,
0.1148274689912796,
0.15419094264507294,
-0.04404621198773384,
-0.5754544734954834,
-0.18242481350898743,
0.03573013097047806,
0.016837317496538162,
0.06763733923435211,
0.04296698793768883,
-0.031270671635866165,
-0.06376335024833679,
-0.11456098407506943,
-0.3211856782436371,
-0.18504178524017334,
0.0535864382982254,
0.08818401396274567,
0.24043574929237366,
-0.08254733681678772,
-0.261499285697937,
0.2003871649503708,
-0.14835886657238007,
-0.12394940108060837,
-0.3649168014526367,
0.42537814378738403,
0.36914804577827454,
0.05163492262363434,
0.00328759104013443,
0.38105952739715576,
-0.1183464303612709,
-0.5188270211219788,
0.003123148810118437,
0.34990280866622925,
-0.04152657836675644,
-0.11387519538402557,
0.16730940341949463,
0.48310166597366333,
0.3614557087421417,
-0.47386452555656433,
-0.03581387549638748,
-0.11497029662132263,
-0.12969379127025604,
-0.2066514790058136,
0.2792602479457855,
0.5734533667564392,
-0.0793343335390091,
0.39583078026771545,
-0.10107496380805969,
0.03640144318342209,
0.26304662227630615,
0.037621792405843735,
-0.5252797603607178,
-0.456766277551651,
-0.3033704459667206,
-0.04945788159966469,
0.20814628899097443,
-0.07060016691684723,
-0.17133329808712006,
0.07831241190433502,
0.24987761676311493,
0.08170469105243683,
-0.2880946695804596,
-0.051648981869220734,
-0.13068276643753052,
-0.011987177655100822,
0.006470629014074802,
0.02180764451622963,
0.3905605673789978,
0.22022980451583862,
0.4254142642021179,
-0.12475267797708511,
0.0493956059217453,
-0.013258966617286205,
0.35021379590034485,
0.23842452466487885,
0.08616235107183456,
0.15315118432044983,
0.1167868822813034,
-0.14034941792488098,
-0.3414052128791809,
-0.3277100920677185,
0.032584987580776215,
-0.010615019127726555,
0.07959742844104767,
-0.05877482891082764,
-0.4858565032482147,
-0.1715955138206482,
0.0408274307847023,
-0.360262006521225,
-0.17918066680431366,
-0.5262871384620667,
-0.12122659385204315,
0.5758896470069885,
-0.05097859352827072,
0.21860454976558685,
-0.2493358850479126,
0.22563579678535461,
0.029247062280774117,
-0.26010408997535706,
0.17373910546302795,
0.007503379136323929,
0.018747156485915184,
0.10092803835868835,
0.18039004504680634,
-0.6855865716934204,
-0.00021495483815670013,
0.0862014889717102,
-0.23356503248214722,
-0.3024901747703552,
-0.1598348766565323,
0.22435787320137024,
0.03917142003774643,
0.05434960871934891,
0.3384595513343811,
-0.18700011074543,
-0.1507849544286728,
-0.1143917441368103,
0.08263245224952698,
-0.03436586260795593,
0.2240075170993805,
0.06527051329612732,
0.0169390756636858,
0.3498254716396332,
-0.07005880028009415,
-0.0781310573220253,
-0.25002411007881165,
-0.5311596989631653,
-0.03193975239992142,
-0.027887806296348572,
-0.34057414531707764,
0.13549122214317322,
-0.07560957968235016,
-0.0964498519897461,
0.09549646079540253,
-0.2920699119567871,
-0.2903927266597748,
-0.3503485918045044,
0.3411945104598999,
-0.3733065724372864,
0.020387843251228333,
-0.06500569730997086,
-0.2673543095588684,
0.34586888551712036,
0.2518981695175171,
-0.002951696515083313,
0.09414205700159073,
0.06865046173334122,
0.07689091563224792,
-0.14896266162395477,
0.26295697689056396,
-0.1345507651567459,
-0.08753297477960587,
0.05390816181898117,
-0.019291413947939873,
0.29474881291389465,
0.23015719652175903,
0.06652522087097168,
0.2700378894805908,
0.21366649866104126,
0.19032996892929077,
0.151570662856102,
0.6235873699188232,
0.17512938380241394,
0.09156529605388641,
0.591338038444519,
0.20510253310203552,
0.16125456988811493,
-0.216342031955719,
-0.22483432292938232,
-0.06357663124799728,
-0.020259380340576172,
-0.026032743975520134,
0.16287165880203247,
-0.011053159832954407,
-0.2126709669828415,
-0.08780890703201294,
-0.02833838388323784,
0.3647666275501251,
-0.2551399767398834,
0.1165793165564537,
-0.22476094961166382,
0.3270491659641266,
0.030442357063293457,
-0.05548472702503204,
-0.06530851125717163,
-0.016129590570926666,
-0.18551665544509888,
-0.11294649541378021,
0.3292671740055084,
-0.011085416190326214,
-0.09472329914569855,
-0.09674102067947388,
-0.640402615070343,
0.14791882038116455,
-0.016434278339147568,
0.5093227624893188,
0.25743335485458374,
-0.2125006914138794,
-0.06631940603256226,
0.020545214414596558,
0.664801299571991,
-0.24740265309810638,
-0.4775487780570984,
0.10376252233982086,
0.07324864715337753,
-0.07109469175338745,
-0.2869220972061157,
-0.13114047050476074,
0.36908283829689026,
0.26213523745536804,
0.2766018807888031,
-0.15965144336223602,
-0.30085480213165283,
0.5392159223556519,
0.22101643681526184,
0.03611749783158302,
-0.14161622524261475,
-0.10117098689079285,
-0.30098700523376465,
-0.0038672108203172684,
0.11025937646627426,
0.23786534368991852,
0.4052906334400177,
-0.22699494659900665,
-0.04106888547539711,
-0.1836710125207901,
-0.133540540933609,
0.050785958766937256,
0.11802725493907928,
0.1832866072654724,
0.12719295918941498,
0.42996397614479065,
0.11424289643764496,
-0.17654524743556976,
0.2667860686779022,
0.506500244140625,
-0.012804880738258362,
-0.31921276450157166,
0.1699504852294922,
-0.15720298886299133,
0.13690556585788727,
-0.1525992453098297,
0.0753893107175827,
0.2864605486392975,
-0.08433257043361664,
0.0584791898727417,
-0.20226730406284332,
-0.08235327154397964,
0.2678423523902893,
0.10236311703920364,
-0.30829164385795593,
-0.7050920128822327,
0.2462713122367859,
0.20669738948345184,
-0.05461860075592995,
0.46187105774879456,
0.20552974939346313,
-0.3354891240596771,
0.1811949908733368,
0.20757344365119934,
0.5010929107666016,
0.11962314695119858,
-0.0508410818874836,
0.13563120365142822,
0.12963800132274628,
0.19670234620571136,
-0.12079878896474838,
0.279413640499115,
0.30406931042671204,
-0.4989718496799469,
0.0820470005273819,
0.11999188363552094,
0.2180590033531189,
0.4028940200805664,
-0.011053189635276794,
0.36497989296913147,
0.003649666905403137,
-0.1629462093114853,
-0.07278530299663544,
0.030639804899692535,
-0.24435803294181824,
-0.2687385380268097,
-0.1405869573354721,
0.13292764127254486,
0.18391574919223785,
-0.221194326877594,
0.0094137042760849,
-0.07706212252378464,
0.5860863327980042,
0.16444025933742523,
-0.29148513078689575,
-0.04710886999964714,
-0.013756172731518745,
-0.0705733671784401,
-0.22098496556282043,
-0.08316602557897568,
0.4444860816001892,
-0.06414638459682465,
0.37794244289398193,
-0.20041683316230774,
0.058060966432094574,
0.04735521227121353,
0.013097628951072693,
-0.08273174613714218,
-0.2545057535171509,
0.1275332123041153,
0.2340368926525116,
0.12783947587013245,
-0.31684792041778564,
0.05943985655903816,
0.2810773253440857,
-0.3441653847694397,
0.16553574800491333,
0.04485664516687393,
0.01929943636059761,
-0.21014896035194397,
-0.05433673411607742,
0.20958217978477478,
-0.035347554832696915,
-0.28603294491767883,
0.005644730292260647,
0.06942189484834671,
-0.41859006881713867,
0.2450825273990631,
-0.49350258708000183,
-0.10494630038738251,
-0.30074557662010193,
0.4893891215324402,
0.1828320324420929,
-0.11459758132696152,
0.30034559965133667,
-0.01226964220404625,
-0.020626047626137733,
-0.1395706832408905,
-0.05418717488646507,
0.10418955981731415,
0.044403478503227234,
0.28655415773391724,
-0.007339982315897942,
0.14874379336833954,
0.07118593901395798,
0.14550621807575226,
0.12860488891601562,
0.11349967122077942,
-0.09831134229898453,
-0.2527849078178406,
-0.23234879970550537,
0.16234004497528076,
-0.006395943462848663,
0.1770227551460266,
-0.06819108873605728,
-0.12349563837051392,
-0.1057138666510582,
-0.042366378009319305,
-0.24975866079330444,
-0.27106085419654846,
-0.0022822022438049316,
-0.14208237826824188,
-0.013250574469566345,
-0.22170531749725342,
0.21007375419139862,
0.21563871204853058,
0.04537465423345566,
0.22997109591960907,
-0.06331688910722733,
-0.1417820155620575,
-0.1444675177335739,
0.09618568420410156,
-0.03866862505674362,
-0.1824466437101364,
0.02760050818324089,
-0.0346328504383564,
-0.14894740283489227,
-0.33516550064086914,
0.2557225227355957,
-0.044949084520339966,
0.1843642145395279,
0.34433022141456604,
-0.0077369920909404755,
-0.3374364376068115,
-0.0688125416636467,
-0.10028885304927826,
0.3309062123298645,
0.003987528383731842,
0.07942099869251251,
0.35287660360336304,
0.16631054878234863,
-0.1393880546092987,
-0.3492645025253296,
0.3048457205295563,
0.1986166536808014,
-0.2012956738471985,
0.2669609487056732,
0.14089465141296387,
-0.22268664836883545,
0.45866236090660095,
0.27616792917251587,
0.6373780965805054,
0.3198302090167999,
-0.16349811851978302,
0.09156142920255661,
0.16532815992832184,
-0.077059805393219,
-0.11490670591592789,
0.26963043212890625,
0.12473780661821365,
0.47642189264297485,
0.4296891689300537,
0.4760090410709381,
-0.21860167384147644,
0.1679239273071289,
-0.09533374756574631,
0.3425845205783844,
-0.16877730190753937,
0.503261148929596,
0.32082656025886536,
0.27996763586997986,
0.025445152074098587,
0.21868760883808136,
-0.09434930980205536,
0.480822890996933,
0.015928898006677628,
-0.4874308109283447,
0.534805178642273,
0.041670456528663635,
-0.2542116641998291,
0.08264324069023132,
-0.3991651237010956,
-0.1445205956697464,
0.19620834290981293,
-0.01774384081363678,
0.5268101096153259,
0.029291726648807526,
0.3825754225254059,
-0.15879277884960175,
-0.2625945210456848,
-0.11275700479745865,
0.044532112777233124,
0.19440695643424988,
-0.22280475497245789,
-0.05998203158378601,
-0.3130738139152527,
-0.4130704402923584,
-0.028498947620391846,
0.09097903966903687,
-0.1375379115343094,
0.4764527976512909,
-0.23779495060443878,
0.4062083959579468,
-0.35260894894599915,
0.2964533269405365,
0.2323109209537506,
0.24252918362617493,
-0.18276014924049377,
0.14747343957424164,
0.35827410221099854,
-0.1494767814874649,
0.12764078378677368,
0.22279752790927887,
0.1377735137939453,
-0.0846264511346817,
0.11759713292121887,
-0.03350137174129486,
-0.12890638411045074,
-0.13042956590652466,
-0.14472557604312897,
0.1716044545173645,
-0.26766788959503174,
-0.29749494791030884,
0.2645478844642639,
0.07653041183948517,
-0.048632245510816574,
0.17760469019412994,
0.24110201001167297,
-0.020370468497276306,
-0.43993666768074036,
-0.26814404129981995,
0.2385418862104416,
0.03553397208452225,
0.2767585515975952,
-0.13001391291618347,
-0.20106840133666992,
-0.12932364642620087,
0.06524689495563507,
-0.14938724040985107,
-0.08957535773515701,
0.07651297748088837,
0.043573424220085144,
-0.1937098503112793,
0.3913644552230835,
0.28818538784980774,
0.05077178031206131,
-0.11005771905183792,
-0.3517293334007263,
-0.351175457239151,
-0.079857237637043,
-0.12736357748508453,
-0.3102472424507141,
0.20453904569149017,
0.46562814712524414,
-0.04945296794176102,
0.09368228912353516,
0.17411646246910095,
0.0032196203246712685,
-0.008351864293217659,
0.35161831974983215,
-0.3080570697784424,
-0.3352521061897278,
-0.0007150024175643921,
0.38858088850975037,
-0.003643076866865158,
-0.09871295839548111,
-0.25195690989494324,
-0.00024273712188005447,
-0.1046961322426796,
-0.0005049519240856171,
0.006968609988689423,
0.18383954465389252,
-0.23363450169563293,
0.11301320791244507,
0.21673281490802765,
0.2332531362771988,
-0.11622843891382217,
0.08746644854545593,
-0.3445644676685333,
-0.21952016651630402,
-0.3470282256603241,
0.05207119882106781,
-0.10352444648742676,
0.28852227330207825,
-0.2160041630268097,
-0.05839505419135094,
-0.10489093512296677,
0.4040500521659851,
0.16923542320728302,
-0.16306762397289276,
-0.3691819906234741,
0.3158996105194092,
0.03609238564968109,
0.07215891778469086,
0.03783562034368515,
0.524087131023407,
-0.022667743265628815,
0.1833178699016571,
0.039747580885887146,
-0.22094279527664185,
0.0263853520154953,
-0.23716439306735992,
-0.3006233274936676,
-0.2102663815021515,
-0.040000736713409424,
0.16946080327033997,
-0.26246392726898193,
-0.3756300210952759,
0.02981726825237274,
0.2718253433704376,
0.05227385833859444,
0.020848795771598816,
0.47513407468795776,
0.18623091280460358,
-0.0942298099398613,
-0.25323420763015747,
0.08961870521306992,
0.3342975378036499,
-0.08363717794418335,
0.07144413888454437,
-0.24265240132808685
] |
https://github.com/huggingface/datasets/issues/4893 | Oversampling strategy for iterable datasets in `interleave_datasets` | Thanks @ylacombe :)
Using the `pytest` command, you can run all the functions in a python file that start with "test_*" and make sure they return not errors:
```
pytest tests/test_iterable_dataset.py
```
In our case it can be nice to define a `test_interleave_datasets_with_oversampling` function. This function can contain the code example that we mentioned earlier in this github issue to make sure it works as expected. | In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :) | 66 | Oversampling strategy for iterable datasets in `interleave_datasets`
In https://github.com/huggingface/datasets/pull/4831 @ylacombe added an oversampling strategy for `interleave_datasets`. However right now it doesn't work for datasets loaded using `load_dataset(..., streaming=True)`, which are `IterableDataset` objects.
It would be nice to expand `interleave_datasets` for iterable datasets as well to support this oversampling strategy
```python
>>> from datasets.iterable_dataset import IterableDataset, ExamplesIterable
>>> d1 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [0, 1, 2]], {}))
>>> d2 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [10, 11, 12, 13]], {}))
>>> d3 = IterableDataset(ExamplesIterable(lambda: [(yield i, {"a": i}) for i in [20, 21, 22, 23, 24]], {}))
>>> dataset = interleave_datasets([d1, d2, d3]) # is supported
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22]
>>> dataset = interleave_datasets([d1, d2, d3], stopping_strategy="all_exhausted") # is not supported yet
>>> [x["a"] for x in dataset]
[0, 10, 20, 1, 11, 21, 2, 12, 22, 0, 13, 23, 1, 0, 24]
```
This can be implemented by adding the strategy to both `CyclingMultiSourcesExamplesIterable` and `RandomlyCyclingMultiSourcesExamplesIterable` used in `_interleave_iterable_datasets` in `iterable_dataset.py`
I would be happy to share some guidance if anyone would like to give it a shot :)
Thanks @ylacombe :)
Using the `pytest` command, you can run all the functions in a python file that start with "test_*" and make sure they return not errors:
```
pytest tests/test_iterable_dataset.py
```
In our case it can be nice to define a `test_interleave_datasets_with_oversampling` function. This function can contain the code example that we mentioned earlier in this github issue to make sure it works as expected. | [
-0.4228614270687103,
-0.19995376467704773,
-0.06890371441841125,
-0.19114218652248383,
0.19798752665519714,
0.018049202859401703,
0.23852773010730743,
0.025174468755722046,
-0.017834683880209923,
0.05424167215824127,
-0.3786226511001587,
0.2754654288291931,
-0.1617426872253418,
0.27959734201431274,
0.0845312848687172,
-0.1858823001384735,
0.16869425773620605,
-0.13665933907032013,
-0.30628275871276855,
0.22576172649860382,
-0.3226749300956726,
0.09969581663608551,
-0.2237790822982788,
-0.5156590938568115,
0.11419841647148132,
0.17546822130680084,
-0.23132477700710297,
0.0730714425444603,
-0.013745607808232307,
-0.5280194282531738,
0.36043253540992737,
0.6017293930053711,
0.4299820065498352,
-0.13487517833709717,
-0.00011433787585701793,
-0.10878632962703705,
0.1047595664858818,
-0.16824884712696075,
-0.12814442813396454,
0.2010156512260437,
-0.1965935230255127,
-0.353300005197525,
0.0070067960768938065,
-0.08421355485916138,
-0.18220996856689453,
-0.17284709215164185,
-0.029626337811350822,
-0.40934550762176514,
0.4686136841773987,
-0.11059968173503876,
0.08707734942436218,
0.3693918287754059,
0.2736918330192566,
-0.02633822150528431,
0.03228199481964111,
-0.26285630464553833,
-0.22892500460147858,
0.2955482006072998,
0.6199077367782593,
-0.05853768438100815,
0.06040709838271141,
0.020141471177339554,
-0.1008201539516449,
-0.06992174685001373,
0.09664103388786316,
-0.30881503224372864,
-0.1384871006011963,
-0.10580551624298096,
-0.2865822911262512,
0.21440348029136658,
0.3457825481891632,
-0.0069595761597156525,
-0.2809508442878723,
-0.5274587869644165,
0.15039676427841187,
-0.3430873155593872,
-0.023959383368492126,
-0.15873152017593384,
0.2036621868610382,
0.15521925687789917,
-0.3709712624549866,
-0.21208420395851135,
0.026511982083320618,
0.35383957624435425,
0.06770732998847961,
0.23327171802520752,
-0.10532637685537338,
0.08862751722335815,
0.6984668374061584,
-0.18226005136966705,
0.15459458529949188,
-0.03215232864022255,
-0.1045861691236496,
0.3786810338497162,
-0.7781854271888733,
-0.3321959376335144,
0.0024702921509742737,
0.05562979727983475,
0.5051997900009155,
0.33966153860092163,
0.19600810110569,
0.15188391506671906,
0.1788933128118515,
-0.008603803813457489,
0.6398940682411194,
-0.012422424741089344,
-0.2901928126811981,
-0.010755768045783043,
0.054076194763183594,
0.132512629032135,
0.0706377774477005,
-0.12900123000144958,
0.005477530881762505,
-0.20709538459777832,
0.1610240936279297,
-0.1237902119755745,
-0.04935489594936371,
0.08186313509941101,
-0.2596208453178406,
-0.2002827227115631,
-0.3229806125164032,
-0.2975955903530121,
0.13650090992450714,
-0.30767959356307983,
0.09304822981357574,
0.19369637966156006,
-0.2928294539451599,
0.39581841230392456,
-0.0389043353497982,
-0.2813195586204529,
-0.08524785935878754,
-0.048860128968954086,
-0.19901235401630402,
0.2509607672691345,
0.2894781529903412,
-0.2279752492904663,
0.26034578680992126,
0.07239608466625214,
0.26866745948791504,
0.0029826387763023376,
0.38287660479545593,
0.009968776255846024,
0.20873557031154633,
-0.05381252244114876,
-0.0024550631642341614,
-0.24414180219173431,
0.0657510906457901,
0.14693446457386017,
-0.020698241889476776,
-0.07613600045442581,
-0.17188188433647156,
-0.2333378791809082,
-0.04812593758106232,
0.11585889756679535,
-0.6768346428871155,
-0.1360449492931366,
-0.1377597451210022,
0.4196183979511261,
0.10985051095485687,
0.00020026043057441711,
0.13369356095790863,
0.05383273959159851,
0.07176373898983002,
0.055523816496133804,
0.39595794677734375,
0.3329800069332123,
-0.2898479104042053,
-0.07895989716053009,
0.01696557179093361,
0.031925879418849945,
0.19434258341789246,
0.20252743363380432,
-0.31185978651046753,
-0.11314026266336441,
-0.2901151180267334,
-0.37140709161758423,
-0.00535101443529129,
-0.14348649978637695,
-0.2884048521518707,
0.038502003997564316,
-0.049500733613967896,
0.6357329487800598,
0.22383549809455872,
0.03185044974088669,
0.6378974914550781,
-0.17264646291732788,
0.12114627659320831,
0.3014492988586426,
-0.3803785741329193,
-0.40889114141464233,
-0.2522648572921753,
-0.03321428969502449,
-0.06653399765491486,
0.13556717336177826,
0.07188933342695236,
0.07181631773710251,
-0.06558192521333694,
0.39120548963546753,
0.3945560157299042,
0.02902844361960888,
0.2984706163406372,
0.1504419595003128,
0.1148274689912796,
0.15419094264507294,
-0.04404621198773384,
-0.5754544734954834,
-0.18242481350898743,
0.03573013097047806,
0.016837317496538162,
0.06763733923435211,
0.04296698793768883,
-0.031270671635866165,
-0.06376335024833679,
-0.11456098407506943,
-0.3211856782436371,
-0.18504178524017334,
0.0535864382982254,
0.08818401396274567,
0.24043574929237366,
-0.08254733681678772,
-0.261499285697937,
0.2003871649503708,
-0.14835886657238007,
-0.12394940108060837,
-0.3649168014526367,
0.42537814378738403,
0.36914804577827454,
0.05163492262363434,
0.00328759104013443,
0.38105952739715576,
-0.1183464303612709,
-0.5188270211219788,
0.003123148810118437,
0.34990280866622925,
-0.04152657836675644,
-0.11387519538402557,
0.16730940341949463,
0.48310166597366333,
0.3614557087421417,
-0.47386452555656433,
-0.03581387549638748,
-0.11497029662132263,
-0.12969379127025604,
-0.2066514790058136,
0.2792602479457855,
0.5734533667564392,
-0.0793343335390091,
0.39583078026771545,
-0.10107496380805969,
0.03640144318342209,
0.26304662227630615,
0.037621792405843735,
-0.5252797603607178,
-0.456766277551651,
-0.3033704459667206,
-0.04945788159966469,
0.20814628899097443,
-0.07060016691684723,
-0.17133329808712006,
0.07831241190433502,
0.24987761676311493,
0.08170469105243683,
-0.2880946695804596,
-0.051648981869220734,
-0.13068276643753052,
-0.011987177655100822,
0.006470629014074802,
0.02180764451622963,
0.3905605673789978,
0.22022980451583862,
0.4254142642021179,
-0.12475267797708511,
0.0493956059217453,
-0.013258966617286205,
0.35021379590034485,
0.23842452466487885,
0.08616235107183456,
0.15315118432044983,
0.1167868822813034,
-0.14034941792488098,
-0.3414052128791809,
-0.3277100920677185,
0.032584987580776215,
-0.010615019127726555,
0.07959742844104767,
-0.05877482891082764,
-0.4858565032482147,
-0.1715955138206482,
0.0408274307847023,
-0.360262006521225,
-0.17918066680431366,
-0.5262871384620667,
-0.12122659385204315,
0.5758896470069885,
-0.05097859352827072,
0.21860454976558685,
-0.2493358850479126,
0.22563579678535461,
0.029247062280774117,
-0.26010408997535706,
0.17373910546302795,
0.007503379136323929,
0.018747156485915184,
0.10092803835868835,
0.18039004504680634,
-0.6855865716934204,
-0.00021495483815670013,
0.0862014889717102,
-0.23356503248214722,
-0.3024901747703552,
-0.1598348766565323,
0.22435787320137024,
0.03917142003774643,
0.05434960871934891,
0.3384595513343811,
-0.18700011074543,
-0.1507849544286728,
-0.1143917441368103,
0.08263245224952698,
-0.03436586260795593,
0.2240075170993805,
0.06527051329612732,
0.0169390756636858,
0.3498254716396332,
-0.07005880028009415,
-0.0781310573220253,
-0.25002411007881165,
-0.5311596989631653,
-0.03193975239992142,
-0.027887806296348572,
-0.34057414531707764,
0.13549122214317322,
-0.07560957968235016,
-0.0964498519897461,
0.09549646079540253,
-0.2920699119567871,
-0.2903927266597748,
-0.3503485918045044,
0.3411945104598999,
-0.3733065724372864,
0.020387843251228333,
-0.06500569730997086,
-0.2673543095588684,
0.34586888551712036,
0.2518981695175171,
-0.002951696515083313,
0.09414205700159073,
0.06865046173334122,
0.07689091563224792,
-0.14896266162395477,
0.26295697689056396,
-0.1345507651567459,
-0.08753297477960587,
0.05390816181898117,
-0.019291413947939873,
0.29474881291389465,
0.23015719652175903,
0.06652522087097168,
0.2700378894805908,
0.21366649866104126,
0.19032996892929077,
0.151570662856102,
0.6235873699188232,
0.17512938380241394,
0.09156529605388641,
0.591338038444519,
0.20510253310203552,
0.16125456988811493,
-0.216342031955719,
-0.22483432292938232,
-0.06357663124799728,
-0.020259380340576172,
-0.026032743975520134,
0.16287165880203247,
-0.011053159832954407,
-0.2126709669828415,
-0.08780890703201294,
-0.02833838388323784,
0.3647666275501251,
-0.2551399767398834,
0.1165793165564537,
-0.22476094961166382,
0.3270491659641266,
0.030442357063293457,
-0.05548472702503204,
-0.06530851125717163,
-0.016129590570926666,
-0.18551665544509888,
-0.11294649541378021,
0.3292671740055084,
-0.011085416190326214,
-0.09472329914569855,
-0.09674102067947388,
-0.640402615070343,
0.14791882038116455,
-0.016434278339147568,
0.5093227624893188,
0.25743335485458374,
-0.2125006914138794,
-0.06631940603256226,
0.020545214414596558,
0.664801299571991,
-0.24740265309810638,
-0.4775487780570984,
0.10376252233982086,
0.07324864715337753,
-0.07109469175338745,
-0.2869220972061157,
-0.13114047050476074,
0.36908283829689026,
0.26213523745536804,
0.2766018807888031,
-0.15965144336223602,
-0.30085480213165283,
0.5392159223556519,
0.22101643681526184,
0.03611749783158302,
-0.14161622524261475,
-0.10117098689079285,
-0.30098700523376465,
-0.0038672108203172684,
0.11025937646627426,
0.23786534368991852,
0.4052906334400177,
-0.22699494659900665,
-0.04106888547539711,
-0.1836710125207901,
-0.133540540933609,
0.050785958766937256,
0.11802725493907928,
0.1832866072654724,
0.12719295918941498,
0.42996397614479065,
0.11424289643764496,
-0.17654524743556976,
0.2667860686779022,
0.506500244140625,
-0.012804880738258362,
-0.31921276450157166,
0.1699504852294922,
-0.15720298886299133,
0.13690556585788727,
-0.1525992453098297,
0.0753893107175827,
0.2864605486392975,
-0.08433257043361664,
0.0584791898727417,
-0.20226730406284332,
-0.08235327154397964,
0.2678423523902893,
0.10236311703920364,
-0.30829164385795593,
-0.7050920128822327,
0.2462713122367859,
0.20669738948345184,
-0.05461860075592995,
0.46187105774879456,
0.20552974939346313,
-0.3354891240596771,
0.1811949908733368,
0.20757344365119934,
0.5010929107666016,
0.11962314695119858,
-0.0508410818874836,
0.13563120365142822,
0.12963800132274628,
0.19670234620571136,
-0.12079878896474838,
0.279413640499115,
0.30406931042671204,
-0.4989718496799469,
0.0820470005273819,
0.11999188363552094,
0.2180590033531189,
0.4028940200805664,
-0.011053189635276794,
0.36497989296913147,
0.003649666905403137,
-0.1629462093114853,
-0.07278530299663544,
0.030639804899692535,
-0.24435803294181824,
-0.2687385380268097,
-0.1405869573354721,
0.13292764127254486,
0.18391574919223785,
-0.221194326877594,
0.0094137042760849,
-0.07706212252378464,
0.5860863327980042,
0.16444025933742523,
-0.29148513078689575,
-0.04710886999964714,
-0.013756172731518745,
-0.0705733671784401,
-0.22098496556282043,
-0.08316602557897568,
0.4444860816001892,
-0.06414638459682465,
0.37794244289398193,
-0.20041683316230774,
0.058060966432094574,
0.04735521227121353,
0.013097628951072693,
-0.08273174613714218,
-0.2545057535171509,
0.1275332123041153,
0.2340368926525116,
0.12783947587013245,
-0.31684792041778564,
0.05943985655903816,
0.2810773253440857,
-0.3441653847694397,
0.16553574800491333,
0.04485664516687393,
0.01929943636059761,
-0.21014896035194397,
-0.05433673411607742,
0.20958217978477478,
-0.035347554832696915,
-0.28603294491767883,
0.005644730292260647,
0.06942189484834671,
-0.41859006881713867,
0.2450825273990631,
-0.49350258708000183,
-0.10494630038738251,
-0.30074557662010193,
0.4893891215324402,
0.1828320324420929,
-0.11459758132696152,
0.30034559965133667,
-0.01226964220404625,
-0.020626047626137733,
-0.1395706832408905,
-0.05418717488646507,
0.10418955981731415,
0.044403478503227234,
0.28655415773391724,
-0.007339982315897942,
0.14874379336833954,
0.07118593901395798,
0.14550621807575226,
0.12860488891601562,
0.11349967122077942,
-0.09831134229898453,
-0.2527849078178406,
-0.23234879970550537,
0.16234004497528076,
-0.006395943462848663,
0.1770227551460266,
-0.06819108873605728,
-0.12349563837051392,
-0.1057138666510582,
-0.042366378009319305,
-0.24975866079330444,
-0.27106085419654846,
-0.0022822022438049316,
-0.14208237826824188,
-0.013250574469566345,
-0.22170531749725342,
0.21007375419139862,
0.21563871204853058,
0.04537465423345566,
0.22997109591960907,
-0.06331688910722733,
-0.1417820155620575,
-0.1444675177335739,
0.09618568420410156,
-0.03866862505674362,
-0.1824466437101364,
0.02760050818324089,
-0.0346328504383564,
-0.14894740283489227,
-0.33516550064086914,
0.2557225227355957,
-0.044949084520339966,
0.1843642145395279,
0.34433022141456604,
-0.0077369920909404755,
-0.3374364376068115,
-0.0688125416636467,
-0.10028885304927826,
0.3309062123298645,
0.003987528383731842,
0.07942099869251251,
0.35287660360336304,
0.16631054878234863,
-0.1393880546092987,
-0.3492645025253296,
0.3048457205295563,
0.1986166536808014,
-0.2012956738471985,
0.2669609487056732,
0.14089465141296387,
-0.22268664836883545,
0.45866236090660095,
0.27616792917251587,
0.6373780965805054,
0.3198302090167999,
-0.16349811851978302,
0.09156142920255661,
0.16532815992832184,
-0.077059805393219,
-0.11490670591592789,
0.26963043212890625,
0.12473780661821365,
0.47642189264297485,
0.4296891689300537,
0.4760090410709381,
-0.21860167384147644,
0.1679239273071289,
-0.09533374756574631,
0.3425845205783844,
-0.16877730190753937,
0.503261148929596,
0.32082656025886536,
0.27996763586997986,
0.025445152074098587,
0.21868760883808136,
-0.09434930980205536,
0.480822890996933,
0.015928898006677628,
-0.4874308109283447,
0.534805178642273,
0.041670456528663635,
-0.2542116641998291,
0.08264324069023132,
-0.3991651237010956,
-0.1445205956697464,
0.19620834290981293,
-0.01774384081363678,
0.5268101096153259,
0.029291726648807526,
0.3825754225254059,
-0.15879277884960175,
-0.2625945210456848,
-0.11275700479745865,
0.044532112777233124,
0.19440695643424988,
-0.22280475497245789,
-0.05998203158378601,
-0.3130738139152527,
-0.4130704402923584,
-0.028498947620391846,
0.09097903966903687,
-0.1375379115343094,
0.4764527976512909,
-0.23779495060443878,
0.4062083959579468,
-0.35260894894599915,
0.2964533269405365,
0.2323109209537506,
0.24252918362617493,
-0.18276014924049377,
0.14747343957424164,
0.35827410221099854,
-0.1494767814874649,
0.12764078378677368,
0.22279752790927887,
0.1377735137939453,
-0.0846264511346817,
0.11759713292121887,
-0.03350137174129486,
-0.12890638411045074,
-0.13042956590652466,
-0.14472557604312897,
0.1716044545173645,
-0.26766788959503174,
-0.29749494791030884,
0.2645478844642639,
0.07653041183948517,
-0.048632245510816574,
0.17760469019412994,
0.24110201001167297,
-0.020370468497276306,
-0.43993666768074036,
-0.26814404129981995,
0.2385418862104416,
0.03553397208452225,
0.2767585515975952,
-0.13001391291618347,
-0.20106840133666992,
-0.12932364642620087,
0.06524689495563507,
-0.14938724040985107,
-0.08957535773515701,
0.07651297748088837,
0.043573424220085144,
-0.1937098503112793,
0.3913644552230835,
0.28818538784980774,
0.05077178031206131,
-0.11005771905183792,
-0.3517293334007263,
-0.351175457239151,
-0.079857237637043,
-0.12736357748508453,
-0.3102472424507141,
0.20453904569149017,
0.46562814712524414,
-0.04945296794176102,
0.09368228912353516,
0.17411646246910095,
0.0032196203246712685,
-0.008351864293217659,
0.35161831974983215,
-0.3080570697784424,
-0.3352521061897278,
-0.0007150024175643921,
0.38858088850975037,
-0.003643076866865158,
-0.09871295839548111,
-0.25195690989494324,
-0.00024273712188005447,
-0.1046961322426796,
-0.0005049519240856171,
0.006968609988689423,
0.18383954465389252,
-0.23363450169563293,
0.11301320791244507,
0.21673281490802765,
0.2332531362771988,
-0.11622843891382217,
0.08746644854545593,
-0.3445644676685333,
-0.21952016651630402,
-0.3470282256603241,
0.05207119882106781,
-0.10352444648742676,
0.28852227330207825,
-0.2160041630268097,
-0.05839505419135094,
-0.10489093512296677,
0.4040500521659851,
0.16923542320728302,
-0.16306762397289276,
-0.3691819906234741,
0.3158996105194092,
0.03609238564968109,
0.07215891778469086,
0.03783562034368515,
0.524087131023407,
-0.022667743265628815,
0.1833178699016571,
0.039747580885887146,
-0.22094279527664185,
0.0263853520154953,
-0.23716439306735992,
-0.3006233274936676,
-0.2102663815021515,
-0.040000736713409424,
0.16946080327033997,
-0.26246392726898193,
-0.3756300210952759,
0.02981726825237274,
0.2718253433704376,
0.05227385833859444,
0.020848795771598816,
0.47513407468795776,
0.18623091280460358,
-0.0942298099398613,
-0.25323420763015747,
0.08961870521306992,
0.3342975378036499,
-0.08363717794418335,
0.07144413888454437,
-0.24265240132808685
] |
https://github.com/huggingface/datasets/issues/4889 | torchaudio 11.0 yields different results than torchaudio 12.1 when loading MP3 | Maybe we can just pass this along to torchaudio @lhoestq @albertvillanova ? It be great if you could investigate if the errors lies in datasets or in torchaudio. | ## Describe the bug
When loading Common Voice with torchaudio 0.11.0 the results are different to 0.12.1 which leads to problems in transformers see: https://github.com/huggingface/transformers/pull/18749
## Steps to reproduce the bug
If you run the following code once with `torchaudio==0.11.0+cu102` and `torchaudio==0.12.1+cu102` you can see that the tensors differ. This is a pretty big breaking change and makes some integration tests fail in Transformers.
```python
#!/usr/bin/env python3
from datasets import load_dataset
import datasets
import numpy as np
import torch
import torchaudio
print("torch vesion", torch.__version__)
print("torchaudio vesion", torchaudio.__version__)
save_audio = True
load_audios = False
if save_audio:
ds = load_dataset("common_voice", "en", split="train", streaming=True)
ds = ds.cast_column("audio", datasets.Audio(sampling_rate=16_000))
ds_iter = iter(ds)
sample = next(ds_iter)
np.save(f"audio_sample_{torch.__version__}", sample["audio"]["array"])
print(sample["audio"]["array"])
if load_audios:
array_torch_11 = np.load("/home/patrick/audio_sample_1.11.0+cu102.npy")
print("Array 11 Shape", array_torch_11.shape)
print("Array 11 abs sum", np.sum(np.abs(array_torch_11)))
array_torch_12 = np.load("/home/patrick/audio_sample_1.12.1+cu102.npy")
print("Array 12 Shape", array_torch_12.shape)
print("Array 12 abs sum", np.sum(np.abs(array_torch_12)))
```
Having saved the tensors the print output yields:
```
torch vesion 1.12.1+cu102
torchaudio vesion 0.12.1+cu102
Array 11 Shape (122880,)
Array 11 abs sum 1396.4988
Array 12 Shape (123264,)
Array 12 abs sum 1396.5193
```
## Expected results
torchaudio 11.0 and 12.1 should yield same results.
## Actual results
See above.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.1.1.dev0
- Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.34
- Python version: 3.9.7
- PyArrow version: 6.0.1
- Pandas version: 1.4.2
| 28 | torchaudio 11.0 yields different results than torchaudio 12.1 when loading MP3
## Describe the bug
When loading Common Voice with torchaudio 0.11.0 the results are different to 0.12.1 which leads to problems in transformers see: https://github.com/huggingface/transformers/pull/18749
## Steps to reproduce the bug
If you run the following code once with `torchaudio==0.11.0+cu102` and `torchaudio==0.12.1+cu102` you can see that the tensors differ. This is a pretty big breaking change and makes some integration tests fail in Transformers.
```python
#!/usr/bin/env python3
from datasets import load_dataset
import datasets
import numpy as np
import torch
import torchaudio
print("torch vesion", torch.__version__)
print("torchaudio vesion", torchaudio.__version__)
save_audio = True
load_audios = False
if save_audio:
ds = load_dataset("common_voice", "en", split="train", streaming=True)
ds = ds.cast_column("audio", datasets.Audio(sampling_rate=16_000))
ds_iter = iter(ds)
sample = next(ds_iter)
np.save(f"audio_sample_{torch.__version__}", sample["audio"]["array"])
print(sample["audio"]["array"])
if load_audios:
array_torch_11 = np.load("/home/patrick/audio_sample_1.11.0+cu102.npy")
print("Array 11 Shape", array_torch_11.shape)
print("Array 11 abs sum", np.sum(np.abs(array_torch_11)))
array_torch_12 = np.load("/home/patrick/audio_sample_1.12.1+cu102.npy")
print("Array 12 Shape", array_torch_12.shape)
print("Array 12 abs sum", np.sum(np.abs(array_torch_12)))
```
Having saved the tensors the print output yields:
```
torch vesion 1.12.1+cu102
torchaudio vesion 0.12.1+cu102
Array 11 Shape (122880,)
Array 11 abs sum 1396.4988
Array 12 Shape (123264,)
Array 12 abs sum 1396.5193
```
## Expected results
torchaudio 11.0 and 12.1 should yield same results.
## Actual results
See above.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.1.1.dev0
- Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.34
- Python version: 3.9.7
- PyArrow version: 6.0.1
- Pandas version: 1.4.2
Maybe we can just pass this along to torchaudio @lhoestq @albertvillanova ? It be great if you could investigate if the errors lies in datasets or in torchaudio. | [
-0.31408780813217163,
-0.44944652915000916,
0.013230562210083008,
0.47898048162460327,
0.04047958552837372,
-0.1875728964805603,
0.44027286767959595,
0.22770655155181885,
-0.2552795112133026,
0.5620273947715759,
-0.4986122250556946,
0.42314478754997253,
-0.03476763144135475,
-0.7195457816123962,
-0.24319550395011902,
-0.4605134427547455,
0.11581098288297653,
0.10381703823804855,
-0.12200991809368134,
-0.30478227138519287,
-0.0031377077102661133,
0.3698004484176636,
-0.37640833854675293,
0.10080893337726593,
-0.29410451650619507,
0.23184406757354736,
0.14209334552288055,
-0.009610392153263092,
0.1545620560646057,
0.009273177944123745,
0.18974822759628296,
-0.11882516741752625,
-0.028428763151168823,
0.5626029968261719,
-0.00010504116653464735,
-0.08764331787824631,
0.46375638246536255,
-0.1027531772851944,
-0.11724534630775452,
-0.3664965033531189,
0.11667396873235703,
0.22357887029647827,
-0.14675582945346832,
0.15453878045082092,
-0.048176031559705734,
0.16326992213726044,
-0.2108139991760254,
0.08256442844867706,
0.11513163894414902,
0.1458144187927246,
0.25882089138031006,
0.35149896144866943,
-0.17297908663749695,
-0.06480810046195984,
0.3144245147705078,
0.18137773871421814,
-0.18162843585014343,
-0.08380529284477234,
0.20768889784812927,
0.132052481174469,
0.04204036295413971,
0.18957564234733582,
-0.20560413599014282,
0.025464076548814774,
0.02793358452618122,
-0.007607168518006802,
-0.3728647828102112,
-0.3181957006454468,
0.21889230608940125,
0.37439683079719543,
0.1674322783946991,
0.002296231687068939,
-0.26683804392814636,
-0.03312475234270096,
-0.22533123195171356,
-0.3080569803714752,
0.3639317750930786,
0.2961845099925995,
-0.29668310284614563,
-0.16641013324260712,
-0.16245369613170624,
0.5365220308303833,
0.03446587175130844,
0.18500828742980957,
-0.1198115199804306,
0.24953781068325043,
-0.06785496324300766,
0.03123437613248825,
0.32379817962646484,
-0.12334316968917847,
0.062082257121801376,
-0.027758825570344925,
0.052394799888134,
0.1275031715631485,
-0.16571709513664246,
-0.07202841341495514,
0.09109680354595184,
-0.31247803568840027,
-0.1379479169845581,
-0.12869542837142944,
0.5314401388168335,
0.1807233691215515,
-0.15349477529525757,
0.18988072872161865,
0.005472101271152496,
0.10432979464530945,
-0.2880718410015106,
0.13484221696853638,
0.18989667296409607,
0.022924304008483887,
0.12861284613609314,
-0.038631945848464966,
0.17072507739067078,
-0.1683313399553299,
-0.18071576952934265,
0.1813826858997345,
0.0815136656165123,
-0.3002368211746216,
-0.2164580523967743,
-0.10448002070188522,
-0.20254555344581604,
0.0777878388762474,
0.1856354922056198,
0.04890771210193634,
0.04172416403889656,
0.5658758282661438,
0.08521053940057755,
0.17522267997264862,
-0.20412391424179077,
-0.021788187325000763,
-0.15684862434864044,
-0.2010292261838913,
-0.0329139269888401,
0.04497097060084343,
0.30598509311676025,
-0.03800240159034729,
0.3091096878051758,
0.1127934679389,
0.2846822142601013,
-0.18067426979541779,
-0.07224339246749878,
0.10343444347381592,
0.05411073565483093,
0.005064476281404495,
-0.0699322521686554,
0.27465152740478516,
-0.18996639549732208,
0.5818043351173401,
-0.22129109501838684,
0.266193151473999,
-0.14859825372695923,
-0.10785453021526337,
0.05103519558906555,
0.23090623319149017,
-0.06567114591598511,
0.14271564781665802,
-0.0019581615924835205,
0.07930406928062439,
-0.13901165127754211,
-0.4655027389526367,
0.14615614712238312,
-0.10981377959251404,
-0.3668355941772461,
0.046877387911081314,
0.22234117984771729,
0.10904690623283386,
0.10610945522785187,
-0.2505809962749481,
0.265049010515213,
0.15127231180667877,
0.07923552393913269,
0.18813607096672058,
-0.17644274234771729,
-0.34877729415893555,
-0.0988946482539177,
-0.14779159426689148,
0.4314550459384918,
-0.49330636858940125,
-0.5620378255844116,
-0.003459267783910036,
0.25403714179992676,
0.20009168982505798,
0.11587994545698166,
-0.003323174547404051,
0.07232031971216202,
-0.0811389610171318,
-0.007121101021766663,
0.25039345026016235,
0.12013967335224152,
0.21762913465499878,
-0.2533223330974579,
-0.13786640763282776,
0.06104196235537529,
-0.0510656014084816,
-0.2526775896549225,
0.016872964799404144,
-0.27554070949554443,
0.16201412677764893,
0.27182695269584656,
-0.1891404539346695,
-0.08870120346546173,
0.19294847548007965,
0.06401651352643967,
-0.42835038900375366,
0.025806257501244545,
-0.18754228949546814,
0.09257463365793228,
0.22335410118103027,
-0.22799642384052277,
0.22516515851020813,
0.1093660444021225,
-0.14423170685768127,
0.011323688551783562,
-0.2756234109401703,
-0.16640008985996246,
0.035422779619693756,
0.1275160014629364,
0.2882702648639679,
0.031512923538684845,
-0.15294548869132996,
0.12613597512245178,
0.09652463346719742,
0.45207059383392334,
-0.11878935992717743,
-0.510151207447052,
0.039440594613552094,
-0.004261987283825874,
-0.157014861702919,
0.05907011777162552,
0.32803046703338623,
0.1253664344549179,
0.09186632931232452,
-0.23484918475151062,
0.302431583404541,
-0.305728942155838,
0.6365156769752502,
-0.6432844996452332,
0.11881189048290253,
0.2463490217924118,
-0.18711596727371216,
0.36670467257499695,
0.3702465891838074,
0.13318543136119843,
0.03867294639348984,
-0.04897790402173996,
0.511017382144928,
0.261636346578598,
0.11442875862121582,
0.03827538341283798,
-0.2791581153869629,
-0.005097154527902603,
0.18755386769771576,
-0.21062071621418,
0.08422915637493134,
0.10556189715862274,
0.42413586378097534,
0.4738468527793884,
-0.010077016428112984,
-0.2990916669368744,
-0.1704326868057251,
0.4156826138496399,
-0.1397385448217392,
-0.02592935413122177,
0.08077147603034973,
-0.3349113464355469,
-0.07212351262569427,
0.11416435241699219,
-0.5124304294586182,
0.2800266742706299,
0.17773869633674622,
0.19482514262199402,
-0.006451191380620003,
-0.22269612550735474,
-0.10448391735553741,
0.09608595073223114,
0.402596652507782,
-0.41410836577415466,
0.2049454152584076,
0.3485778570175171,
0.1304144263267517,
-0.370505690574646,
-0.03676522523164749,
-0.2953094244003296,
-0.03572360426187515,
-0.18541516363620758,
0.21530288457870483,
-0.009661408141255379,
0.44932571053504944,
-0.43443962931632996,
-0.46406683325767517,
-0.21663007140159607,
0.024232765659689903,
0.1341024935245514,
0.6542224884033203,
-0.11221781373023987,
0.2764779031276703,
0.3824682831764221,
0.17374858260154724,
0.05397718399763107,
-0.028474217280745506,
-0.2745116055011749,
0.21993529796600342,
-0.4135228097438812,
0.09198997914791107,
0.09665437042713165,
-0.09340856224298477,
0.07634548842906952,
-0.12365949898958206,
-0.06323415040969849,
0.2991078794002533,
-0.07098300009965897,
0.1313956081867218,
0.004177935421466827,
-0.3171188533306122,
-0.07869844138622284,
-0.37832266092300415,
0.01980702206492424,
-0.4045843482017517,
0.17402063310146332,
-0.1715325564146042,
-0.13142038881778717,
0.26949185132980347,
-0.023605290800333023,
0.1618865728378296,
-0.2205859273672104,
-0.6102150082588196,
0.1353807896375656,
-0.3659828305244446,
0.1974717527627945,
-0.23790135979652405,
0.1250636726617813,
0.07138382643461227,
0.24235385656356812,
-0.14764484763145447,
0.3013840615749359,
0.5090997219085693,
-0.25703105330467224,
-0.12574438750743866,
0.23734162747859955,
-0.13229385018348694,
-0.2710220515727997,
-0.19004584848880768,
-0.11584305763244629,
0.33819451928138733,
0.11219174414873123,
-0.03798622637987137,
-0.08151758462190628,
0.000508725643157959,
-0.21079906821250916,
0.0033732764422893524,
0.0803409293293953,
0.34408578276634216,
0.2482091635465622,
-0.033636003732681274,
-0.051625438034534454,
-0.14066199958324432,
-0.28987279534339905,
0.22923311591148376,
0.33568304777145386,
-0.07350245118141174,
0.39130184054374695,
-0.17222562432289124,
0.597529411315918,
0.12093080580234528,
-0.15122337639331818,
-0.03390137106180191,
-0.011499984189867973,
0.049547988921403885,
-0.3455519676208496,
0.07115405797958374,
-0.006221529096364975,
0.05394469201564789,
0.03955034911632538,
0.2060868740081787,
0.19705486297607422,
-0.1944006085395813,
-0.19687193632125854,
-0.0377001017332077,
0.019372805953025818,
-0.2920991778373718,
0.007433111779391766,
-0.04054843634366989,
-0.050001360476017,
-0.1723710298538208,
0.473955363035202,
-0.11452114582061768,
-0.264274924993515,
0.290587455034256,
-0.08254709839820862,
-0.01889023929834366,
-0.13656535744667053,
0.03688199445605278,
0.2741215229034424,
-0.41821691393852234,
0.10888004302978516,
0.11185083538293839,
0.3379713296890259,
0.11433230340480804,
-0.2870500683784485,
-0.06944228708744049,
0.07127882540225983,
0.23691019415855408,
0.0025453660637140274,
0.030728397890925407,
0.14762860536575317,
0.019312482327222824,
-0.356169730424881,
-0.1785341054201126,
-0.4111880958080292,
-0.3518627882003784,
0.12425084412097931,
-0.0018391460180282593,
0.08948073536157608,
-0.11988375335931778,
0.1688266098499298,
0.5179270505905151,
-0.005175769329071045,
0.006350128911435604,
-0.43094971776008606,
0.009303808212280273,
-0.10096205770969391,
-0.08479080349206924,
-0.08557537198066711,
0.2779887616634369,
-0.32044512033462524,
-0.2873091995716095,
0.16766951978206635,
-0.20982033014297485,
0.2528895139694214,
0.10561628639698029,
0.32109883427619934,
-0.07170533388853073,
0.26378241181373596,
0.22452154755592346,
0.26628127694129944,
-0.04136515408754349,
0.28261396288871765,
0.06910352408885956,
-0.22134825587272644,
0.171044260263443,
-0.01951421983540058,
-0.20231923460960388,
0.22439470887184143,
0.20367373526096344,
-0.1875612735748291,
-0.1916888952255249,
-0.13426285982131958,
-0.1848660111427307,
0.1781119555234909,
0.4068969786167145,
0.24182945489883423,
-0.13925430178642273,
0.03395860642194748,
0.409637451171875,
0.13002081215381622,
-0.2039024382829666,
0.3526897430419922,
-0.32402360439300537,
-0.15630397200584412,
0.18220685422420502,
-0.2189125120639801,
0.8006895780563354,
0.30628299713134766,
0.21282535791397095,
0.21126040816307068,
-0.4257897138595581,
-0.22038277983665466,
0.04299996793270111,
0.344723641872406,
-0.06713376194238663,
-0.011794579215347767,
-0.03252946212887764,
0.004994798451662064,
-0.27200332283973694,
0.03772422671318054,
-0.19399110972881317,
0.2447865605354309,
-0.09526468813419342,
0.20516572892665863,
-0.06489548832178116,
-0.009288154542446136,
-0.00026624277234077454,
-0.3399661183357239,
0.10610277950763702,
0.12321010231971741,
0.35832053422927856,
0.46926459670066833,
0.13349395990371704,
-0.06965382397174835,
-0.031193705275654793,
-0.2940915822982788,
-0.15640854835510254,
0.18739885091781616,
-0.09518503397703171,
-0.18445561826229095,
0.2536609470844269,
-0.502857506275177,
0.0336092971265316,
0.2600579559803009,
-0.08475859463214874,
0.05084297060966492,
-0.11036115884780884,
0.07662084698677063,
-0.027175739407539368,
0.32925572991371155,
0.10756280273199081,
-0.008758705109357834,
0.19305939972400665,
0.012440800666809082,
-0.23494932055473328,
0.20094415545463562,
0.05073340982198715,
0.16968996822834015,
-0.11797794699668884,
0.01251017302274704,
0.3157566785812378,
-0.22035080194473267,
0.13132403790950775,
0.029797911643981934,
-0.19050170481204987,
-0.2262001633644104,
0.2263348400592804,
-0.19443200528621674,
-0.3138378858566284,
-0.022114507853984833,
-0.021926146000623703,
-0.20932897925376892,
0.005233798176050186,
0.6899046301841736,
0.1269468069076538,
-0.4744094908237457,
0.24552655220031738,
-0.17249839007854462,
-0.07286390662193298,
-0.11130590736865997,
-0.10784892737865448,
0.24405330419540405,
-0.5570070743560791,
-0.08050301671028137,
-0.1772690713405609,
-0.3950451612472534,
0.07625929266214371,
0.30797436833381653,
-0.05903325229883194,
0.2130034863948822,
-0.2943314015865326,
0.2227238118648529,
-0.5528304576873779,
0.08361030369997025,
0.30965256690979004,
0.32861971855163574,
-0.18396058678627014,
-0.25853678584098816,
0.018054770305752754,
-0.210465669631958,
-0.33776378631591797,
-0.0016467259265482426,
0.22134968638420105,
0.007709763944149017,
-0.21949899196624756,
-0.15397518873214722,
0.07883857935667038,
0.10823903977870941,
0.2224823534488678,
0.2158278375864029,
-0.21493679285049438,
-0.16299793124198914,
-0.19581098854541779,
0.1085689514875412,
-0.00015673041343688965,
-0.27942541241645813,
-0.20052392780780792,
0.12045659124851227,
0.03274054080247879,
-0.4027300179004669,
0.36918485164642334,
0.4316316545009613,
-0.015838421881198883,
0.022989977151155472,
-0.18035539984703064,
0.35156556963920593,
0.0599978044629097,
0.007309192791581154,
-0.07685926556587219,
-0.019832685589790344,
0.13112223148345947,
0.0785946175456047,
0.059117697179317474,
-0.18087586760520935,
-0.23317864537239075,
0.254061758518219,
0.09373024851083755,
-0.05965493619441986,
0.15787819027900696,
0.03331625461578369,
0.12498001754283905,
0.08654897660017014,
0.14987701177597046,
0.045755282044410706,
-0.09185723960399628,
-0.19918738305568695,
-0.0924033373594284,
0.3365595042705536,
-0.03282715007662773,
-0.1585705727338791,
-0.5267448425292969,
-0.044269859790802,
0.20418578386306763,
0.050974391400814056,
0.01533706858754158,
-0.3057875633239746,
0.3635253310203552,
-0.1319524347782135,
0.2624169886112213,
-0.12839576601982117,
0.33661437034606934,
0.27910786867141724,
-0.006277401000261307,
0.11100481450557709,
0.12382647395133972,
-0.39874425530433655,
0.16652008891105652,
0.08761441707611084,
-0.3534071445465088,
0.3929482698440552,
0.11448299139738083,
0.11243721097707748,
0.3610011339187622,
-0.02184012532234192,
-0.46694624423980713,
-0.08319717645645142,
0.08585448563098907,
0.29970771074295044,
0.07927712053060532,
0.1406990885734558,
-0.4218287467956543,
-0.1160842627286911,
-0.3526415228843689,
-0.18621881306171417,
-0.2132408320903778,
-0.34510281682014465,
-0.07365160435438156,
-0.2496056854724884,
-0.11581867188215256,
0.14714817702770233,
-0.0468890406191349,
0.21003367006778717,
0.055234529078006744,
-0.10168866813182831,
-0.201896533370018,
0.30529648065567017,
-0.3002616763114929,
0.04102504998445511,
0.1852189600467682,
-0.012890875339508057,
0.26824265718460083,
0.17545047402381897,
-0.07080444693565369,
0.4388808012008667,
0.11046653240919113,
0.36425602436065674,
0.2204928994178772,
-0.10115744173526764,
0.2775825560092926,
0.0681929886341095,
0.08918099850416183,
0.17135962843894958,
0.10562668740749359,
0.11609625816345215,
0.4089370667934418,
0.06774163246154785,
0.17788836359977722,
-0.23645983636379242,
-0.1180667132139206,
-0.14589151740074158,
0.03303167596459389,
-0.38847875595092773,
0.3115863800048828,
-0.45986518263816833,
-0.07950176298618317,
-0.34214016795158386,
-0.05515465885400772,
-0.17087949812412262,
-0.2934747338294983,
0.12441825866699219,
0.24477356672286987,
0.13426893949508667,
0.25234851241111755,
0.08543265610933304,
-0.1394912749528885,
0.13954071700572968,
0.07460646331310272,
-0.14307013154029846,
-0.024630896747112274,
0.02439771592617035,
-0.14335455000400543,
0.4127543568611145,
0.3275800049304962,
0.15399496257305145,
-0.31141117215156555,
-0.03414599597454071,
0.06203679367899895,
-0.08485016971826553,
-0.17470555007457733,
-0.13849030435085297,
0.07467469573020935,
0.03976798802614212,
-0.2937387526035309,
-0.06033708527684212,
-0.10324883460998535,
0.05118265748023987,
0.13014352321624756,
-0.47364354133605957,
-0.2038383036851883,
0.10534003376960754,
0.1312570571899414,
-0.05759449303150177,
0.028368890285491943,
-0.39893752336502075,
0.5497182607650757,
0.17673315107822418,
0.042298100888729095,
0.3322156071662903,
-0.09931797534227371,
-0.08806305378675461,
-0.25600117444992065,
0.017820270732045174,
0.05968926474452019,
-0.11278427392244339,
-0.1837928593158722,
0.2758311331272125,
0.12248039990663528,
0.15913493931293488,
-0.27343034744262695,
0.32485106587409973,
0.1637834757566452,
-0.13927336037158966,
-0.3282933235168457,
0.14016002416610718,
-0.1697966307401657,
0.2124592363834381,
0.11610563099384308,
0.12626242637634277,
-0.01332712173461914,
-0.09837082028388977,
-0.36018913984298706,
-0.3526258170604706,
0.43978944420814514,
0.09515266865491867,
-0.09498360753059387,
-0.5195400714874268,
0.4163820743560791,
0.12608900666236877,
0.2649640738964081,
-0.8988054990768433,
0.1107027605175972,
0.13365626335144043,
-0.22228887677192688,
-0.0679929107427597,
0.01576356776058674,
0.19386115670204163,
-0.049252454191446304,
-0.1494429111480713,
0.17503920197486877,
0.33789342641830444,
-0.1611880362033844,
0.2350691854953766,
-0.2075396031141281
] |
https://github.com/huggingface/datasets/issues/4889 | torchaudio 11.0 yields different results than torchaudio 12.1 when loading MP3 | torchaudio did a change in [0.12](https://github.com/pytorch/audio/releases/tag/v0.12.0) on MP3 decoding (which affects common voice):
> MP3 decoding is now handled by FFmpeg in sox_io backend. (https://github.com/pytorch/audio/pull/2419, https://github.com/pytorch/audio/pull/2428)
> - FFmpeg is now used as fallback in sox_io backend, and now MP3 decoding is handled by FFmpeg. To load MP3 audio with torchaudio.load, please install a compatible version of FFmpeg (Version 4 when using an official binary distribution).
> - Note that, whereas the previous MP3 decoding scheme pads the output audio, the new scheme does not. As a consequence, the new version returns shorter audio tensors. | ## Describe the bug
When loading Common Voice with torchaudio 0.11.0 the results are different to 0.12.1 which leads to problems in transformers see: https://github.com/huggingface/transformers/pull/18749
## Steps to reproduce the bug
If you run the following code once with `torchaudio==0.11.0+cu102` and `torchaudio==0.12.1+cu102` you can see that the tensors differ. This is a pretty big breaking change and makes some integration tests fail in Transformers.
```python
#!/usr/bin/env python3
from datasets import load_dataset
import datasets
import numpy as np
import torch
import torchaudio
print("torch vesion", torch.__version__)
print("torchaudio vesion", torchaudio.__version__)
save_audio = True
load_audios = False
if save_audio:
ds = load_dataset("common_voice", "en", split="train", streaming=True)
ds = ds.cast_column("audio", datasets.Audio(sampling_rate=16_000))
ds_iter = iter(ds)
sample = next(ds_iter)
np.save(f"audio_sample_{torch.__version__}", sample["audio"]["array"])
print(sample["audio"]["array"])
if load_audios:
array_torch_11 = np.load("/home/patrick/audio_sample_1.11.0+cu102.npy")
print("Array 11 Shape", array_torch_11.shape)
print("Array 11 abs sum", np.sum(np.abs(array_torch_11)))
array_torch_12 = np.load("/home/patrick/audio_sample_1.12.1+cu102.npy")
print("Array 12 Shape", array_torch_12.shape)
print("Array 12 abs sum", np.sum(np.abs(array_torch_12)))
```
Having saved the tensors the print output yields:
```
torch vesion 1.12.1+cu102
torchaudio vesion 0.12.1+cu102
Array 11 Shape (122880,)
Array 11 abs sum 1396.4988
Array 12 Shape (123264,)
Array 12 abs sum 1396.5193
```
## Expected results
torchaudio 11.0 and 12.1 should yield same results.
## Actual results
See above.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.1.1.dev0
- Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.34
- Python version: 3.9.7
- PyArrow version: 6.0.1
- Pandas version: 1.4.2
| 95 | torchaudio 11.0 yields different results than torchaudio 12.1 when loading MP3
## Describe the bug
When loading Common Voice with torchaudio 0.11.0 the results are different to 0.12.1 which leads to problems in transformers see: https://github.com/huggingface/transformers/pull/18749
## Steps to reproduce the bug
If you run the following code once with `torchaudio==0.11.0+cu102` and `torchaudio==0.12.1+cu102` you can see that the tensors differ. This is a pretty big breaking change and makes some integration tests fail in Transformers.
```python
#!/usr/bin/env python3
from datasets import load_dataset
import datasets
import numpy as np
import torch
import torchaudio
print("torch vesion", torch.__version__)
print("torchaudio vesion", torchaudio.__version__)
save_audio = True
load_audios = False
if save_audio:
ds = load_dataset("common_voice", "en", split="train", streaming=True)
ds = ds.cast_column("audio", datasets.Audio(sampling_rate=16_000))
ds_iter = iter(ds)
sample = next(ds_iter)
np.save(f"audio_sample_{torch.__version__}", sample["audio"]["array"])
print(sample["audio"]["array"])
if load_audios:
array_torch_11 = np.load("/home/patrick/audio_sample_1.11.0+cu102.npy")
print("Array 11 Shape", array_torch_11.shape)
print("Array 11 abs sum", np.sum(np.abs(array_torch_11)))
array_torch_12 = np.load("/home/patrick/audio_sample_1.12.1+cu102.npy")
print("Array 12 Shape", array_torch_12.shape)
print("Array 12 abs sum", np.sum(np.abs(array_torch_12)))
```
Having saved the tensors the print output yields:
```
torch vesion 1.12.1+cu102
torchaudio vesion 0.12.1+cu102
Array 11 Shape (122880,)
Array 11 abs sum 1396.4988
Array 12 Shape (123264,)
Array 12 abs sum 1396.5193
```
## Expected results
torchaudio 11.0 and 12.1 should yield same results.
## Actual results
See above.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.1.1.dev0
- Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.34
- Python version: 3.9.7
- PyArrow version: 6.0.1
- Pandas version: 1.4.2
torchaudio did a change in [0.12](https://github.com/pytorch/audio/releases/tag/v0.12.0) on MP3 decoding (which affects common voice):
> MP3 decoding is now handled by FFmpeg in sox_io backend. (https://github.com/pytorch/audio/pull/2419, https://github.com/pytorch/audio/pull/2428)
> - FFmpeg is now used as fallback in sox_io backend, and now MP3 decoding is handled by FFmpeg. To load MP3 audio with torchaudio.load, please install a compatible version of FFmpeg (Version 4 when using an official binary distribution).
> - Note that, whereas the previous MP3 decoding scheme pads the output audio, the new scheme does not. As a consequence, the new version returns shorter audio tensors. | [
-0.31408780813217163,
-0.44944652915000916,
0.013230562210083008,
0.47898048162460327,
0.04047958552837372,
-0.1875728964805603,
0.44027286767959595,
0.22770655155181885,
-0.2552795112133026,
0.5620273947715759,
-0.4986122250556946,
0.42314478754997253,
-0.03476763144135475,
-0.7195457816123962,
-0.24319550395011902,
-0.4605134427547455,
0.11581098288297653,
0.10381703823804855,
-0.12200991809368134,
-0.30478227138519287,
-0.0031377077102661133,
0.3698004484176636,
-0.37640833854675293,
0.10080893337726593,
-0.29410451650619507,
0.23184406757354736,
0.14209334552288055,
-0.009610392153263092,
0.1545620560646057,
0.009273177944123745,
0.18974822759628296,
-0.11882516741752625,
-0.028428763151168823,
0.5626029968261719,
-0.00010504116653464735,
-0.08764331787824631,
0.46375638246536255,
-0.1027531772851944,
-0.11724534630775452,
-0.3664965033531189,
0.11667396873235703,
0.22357887029647827,
-0.14675582945346832,
0.15453878045082092,
-0.048176031559705734,
0.16326992213726044,
-0.2108139991760254,
0.08256442844867706,
0.11513163894414902,
0.1458144187927246,
0.25882089138031006,
0.35149896144866943,
-0.17297908663749695,
-0.06480810046195984,
0.3144245147705078,
0.18137773871421814,
-0.18162843585014343,
-0.08380529284477234,
0.20768889784812927,
0.132052481174469,
0.04204036295413971,
0.18957564234733582,
-0.20560413599014282,
0.025464076548814774,
0.02793358452618122,
-0.007607168518006802,
-0.3728647828102112,
-0.3181957006454468,
0.21889230608940125,
0.37439683079719543,
0.1674322783946991,
0.002296231687068939,
-0.26683804392814636,
-0.03312475234270096,
-0.22533123195171356,
-0.3080569803714752,
0.3639317750930786,
0.2961845099925995,
-0.29668310284614563,
-0.16641013324260712,
-0.16245369613170624,
0.5365220308303833,
0.03446587175130844,
0.18500828742980957,
-0.1198115199804306,
0.24953781068325043,
-0.06785496324300766,
0.03123437613248825,
0.32379817962646484,
-0.12334316968917847,
0.062082257121801376,
-0.027758825570344925,
0.052394799888134,
0.1275031715631485,
-0.16571709513664246,
-0.07202841341495514,
0.09109680354595184,
-0.31247803568840027,
-0.1379479169845581,
-0.12869542837142944,
0.5314401388168335,
0.1807233691215515,
-0.15349477529525757,
0.18988072872161865,
0.005472101271152496,
0.10432979464530945,
-0.2880718410015106,
0.13484221696853638,
0.18989667296409607,
0.022924304008483887,
0.12861284613609314,
-0.038631945848464966,
0.17072507739067078,
-0.1683313399553299,
-0.18071576952934265,
0.1813826858997345,
0.0815136656165123,
-0.3002368211746216,
-0.2164580523967743,
-0.10448002070188522,
-0.20254555344581604,
0.0777878388762474,
0.1856354922056198,
0.04890771210193634,
0.04172416403889656,
0.5658758282661438,
0.08521053940057755,
0.17522267997264862,
-0.20412391424179077,
-0.021788187325000763,
-0.15684862434864044,
-0.2010292261838913,
-0.0329139269888401,
0.04497097060084343,
0.30598509311676025,
-0.03800240159034729,
0.3091096878051758,
0.1127934679389,
0.2846822142601013,
-0.18067426979541779,
-0.07224339246749878,
0.10343444347381592,
0.05411073565483093,
0.005064476281404495,
-0.0699322521686554,
0.27465152740478516,
-0.18996639549732208,
0.5818043351173401,
-0.22129109501838684,
0.266193151473999,
-0.14859825372695923,
-0.10785453021526337,
0.05103519558906555,
0.23090623319149017,
-0.06567114591598511,
0.14271564781665802,
-0.0019581615924835205,
0.07930406928062439,
-0.13901165127754211,
-0.4655027389526367,
0.14615614712238312,
-0.10981377959251404,
-0.3668355941772461,
0.046877387911081314,
0.22234117984771729,
0.10904690623283386,
0.10610945522785187,
-0.2505809962749481,
0.265049010515213,
0.15127231180667877,
0.07923552393913269,
0.18813607096672058,
-0.17644274234771729,
-0.34877729415893555,
-0.0988946482539177,
-0.14779159426689148,
0.4314550459384918,
-0.49330636858940125,
-0.5620378255844116,
-0.003459267783910036,
0.25403714179992676,
0.20009168982505798,
0.11587994545698166,
-0.003323174547404051,
0.07232031971216202,
-0.0811389610171318,
-0.007121101021766663,
0.25039345026016235,
0.12013967335224152,
0.21762913465499878,
-0.2533223330974579,
-0.13786640763282776,
0.06104196235537529,
-0.0510656014084816,
-0.2526775896549225,
0.016872964799404144,
-0.27554070949554443,
0.16201412677764893,
0.27182695269584656,
-0.1891404539346695,
-0.08870120346546173,
0.19294847548007965,
0.06401651352643967,
-0.42835038900375366,
0.025806257501244545,
-0.18754228949546814,
0.09257463365793228,
0.22335410118103027,
-0.22799642384052277,
0.22516515851020813,
0.1093660444021225,
-0.14423170685768127,
0.011323688551783562,
-0.2756234109401703,
-0.16640008985996246,
0.035422779619693756,
0.1275160014629364,
0.2882702648639679,
0.031512923538684845,
-0.15294548869132996,
0.12613597512245178,
0.09652463346719742,
0.45207059383392334,
-0.11878935992717743,
-0.510151207447052,
0.039440594613552094,
-0.004261987283825874,
-0.157014861702919,
0.05907011777162552,
0.32803046703338623,
0.1253664344549179,
0.09186632931232452,
-0.23484918475151062,
0.302431583404541,
-0.305728942155838,
0.6365156769752502,
-0.6432844996452332,
0.11881189048290253,
0.2463490217924118,
-0.18711596727371216,
0.36670467257499695,
0.3702465891838074,
0.13318543136119843,
0.03867294639348984,
-0.04897790402173996,
0.511017382144928,
0.261636346578598,
0.11442875862121582,
0.03827538341283798,
-0.2791581153869629,
-0.005097154527902603,
0.18755386769771576,
-0.21062071621418,
0.08422915637493134,
0.10556189715862274,
0.42413586378097534,
0.4738468527793884,
-0.010077016428112984,
-0.2990916669368744,
-0.1704326868057251,
0.4156826138496399,
-0.1397385448217392,
-0.02592935413122177,
0.08077147603034973,
-0.3349113464355469,
-0.07212351262569427,
0.11416435241699219,
-0.5124304294586182,
0.2800266742706299,
0.17773869633674622,
0.19482514262199402,
-0.006451191380620003,
-0.22269612550735474,
-0.10448391735553741,
0.09608595073223114,
0.402596652507782,
-0.41410836577415466,
0.2049454152584076,
0.3485778570175171,
0.1304144263267517,
-0.370505690574646,
-0.03676522523164749,
-0.2953094244003296,
-0.03572360426187515,
-0.18541516363620758,
0.21530288457870483,
-0.009661408141255379,
0.44932571053504944,
-0.43443962931632996,
-0.46406683325767517,
-0.21663007140159607,
0.024232765659689903,
0.1341024935245514,
0.6542224884033203,
-0.11221781373023987,
0.2764779031276703,
0.3824682831764221,
0.17374858260154724,
0.05397718399763107,
-0.028474217280745506,
-0.2745116055011749,
0.21993529796600342,
-0.4135228097438812,
0.09198997914791107,
0.09665437042713165,
-0.09340856224298477,
0.07634548842906952,
-0.12365949898958206,
-0.06323415040969849,
0.2991078794002533,
-0.07098300009965897,
0.1313956081867218,
0.004177935421466827,
-0.3171188533306122,
-0.07869844138622284,
-0.37832266092300415,
0.01980702206492424,
-0.4045843482017517,
0.17402063310146332,
-0.1715325564146042,
-0.13142038881778717,
0.26949185132980347,
-0.023605290800333023,
0.1618865728378296,
-0.2205859273672104,
-0.6102150082588196,
0.1353807896375656,
-0.3659828305244446,
0.1974717527627945,
-0.23790135979652405,
0.1250636726617813,
0.07138382643461227,
0.24235385656356812,
-0.14764484763145447,
0.3013840615749359,
0.5090997219085693,
-0.25703105330467224,
-0.12574438750743866,
0.23734162747859955,
-0.13229385018348694,
-0.2710220515727997,
-0.19004584848880768,
-0.11584305763244629,
0.33819451928138733,
0.11219174414873123,
-0.03798622637987137,
-0.08151758462190628,
0.000508725643157959,
-0.21079906821250916,
0.0033732764422893524,
0.0803409293293953,
0.34408578276634216,
0.2482091635465622,
-0.033636003732681274,
-0.051625438034534454,
-0.14066199958324432,
-0.28987279534339905,
0.22923311591148376,
0.33568304777145386,
-0.07350245118141174,
0.39130184054374695,
-0.17222562432289124,
0.597529411315918,
0.12093080580234528,
-0.15122337639331818,
-0.03390137106180191,
-0.011499984189867973,
0.049547988921403885,
-0.3455519676208496,
0.07115405797958374,
-0.006221529096364975,
0.05394469201564789,
0.03955034911632538,
0.2060868740081787,
0.19705486297607422,
-0.1944006085395813,
-0.19687193632125854,
-0.0377001017332077,
0.019372805953025818,
-0.2920991778373718,
0.007433111779391766,
-0.04054843634366989,
-0.050001360476017,
-0.1723710298538208,
0.473955363035202,
-0.11452114582061768,
-0.264274924993515,
0.290587455034256,
-0.08254709839820862,
-0.01889023929834366,
-0.13656535744667053,
0.03688199445605278,
0.2741215229034424,
-0.41821691393852234,
0.10888004302978516,
0.11185083538293839,
0.3379713296890259,
0.11433230340480804,
-0.2870500683784485,
-0.06944228708744049,
0.07127882540225983,
0.23691019415855408,
0.0025453660637140274,
0.030728397890925407,
0.14762860536575317,
0.019312482327222824,
-0.356169730424881,
-0.1785341054201126,
-0.4111880958080292,
-0.3518627882003784,
0.12425084412097931,
-0.0018391460180282593,
0.08948073536157608,
-0.11988375335931778,
0.1688266098499298,
0.5179270505905151,
-0.005175769329071045,
0.006350128911435604,
-0.43094971776008606,
0.009303808212280273,
-0.10096205770969391,
-0.08479080349206924,
-0.08557537198066711,
0.2779887616634369,
-0.32044512033462524,
-0.2873091995716095,
0.16766951978206635,
-0.20982033014297485,
0.2528895139694214,
0.10561628639698029,
0.32109883427619934,
-0.07170533388853073,
0.26378241181373596,
0.22452154755592346,
0.26628127694129944,
-0.04136515408754349,
0.28261396288871765,
0.06910352408885956,
-0.22134825587272644,
0.171044260263443,
-0.01951421983540058,
-0.20231923460960388,
0.22439470887184143,
0.20367373526096344,
-0.1875612735748291,
-0.1916888952255249,
-0.13426285982131958,
-0.1848660111427307,
0.1781119555234909,
0.4068969786167145,
0.24182945489883423,
-0.13925430178642273,
0.03395860642194748,
0.409637451171875,
0.13002081215381622,
-0.2039024382829666,
0.3526897430419922,
-0.32402360439300537,
-0.15630397200584412,
0.18220685422420502,
-0.2189125120639801,
0.8006895780563354,
0.30628299713134766,
0.21282535791397095,
0.21126040816307068,
-0.4257897138595581,
-0.22038277983665466,
0.04299996793270111,
0.344723641872406,
-0.06713376194238663,
-0.011794579215347767,
-0.03252946212887764,
0.004994798451662064,
-0.27200332283973694,
0.03772422671318054,
-0.19399110972881317,
0.2447865605354309,
-0.09526468813419342,
0.20516572892665863,
-0.06489548832178116,
-0.009288154542446136,
-0.00026624277234077454,
-0.3399661183357239,
0.10610277950763702,
0.12321010231971741,
0.35832053422927856,
0.46926459670066833,
0.13349395990371704,
-0.06965382397174835,
-0.031193705275654793,
-0.2940915822982788,
-0.15640854835510254,
0.18739885091781616,
-0.09518503397703171,
-0.18445561826229095,
0.2536609470844269,
-0.502857506275177,
0.0336092971265316,
0.2600579559803009,
-0.08475859463214874,
0.05084297060966492,
-0.11036115884780884,
0.07662084698677063,
-0.027175739407539368,
0.32925572991371155,
0.10756280273199081,
-0.008758705109357834,
0.19305939972400665,
0.012440800666809082,
-0.23494932055473328,
0.20094415545463562,
0.05073340982198715,
0.16968996822834015,
-0.11797794699668884,
0.01251017302274704,
0.3157566785812378,
-0.22035080194473267,
0.13132403790950775,
0.029797911643981934,
-0.19050170481204987,
-0.2262001633644104,
0.2263348400592804,
-0.19443200528621674,
-0.3138378858566284,
-0.022114507853984833,
-0.021926146000623703,
-0.20932897925376892,
0.005233798176050186,
0.6899046301841736,
0.1269468069076538,
-0.4744094908237457,
0.24552655220031738,
-0.17249839007854462,
-0.07286390662193298,
-0.11130590736865997,
-0.10784892737865448,
0.24405330419540405,
-0.5570070743560791,
-0.08050301671028137,
-0.1772690713405609,
-0.3950451612472534,
0.07625929266214371,
0.30797436833381653,
-0.05903325229883194,
0.2130034863948822,
-0.2943314015865326,
0.2227238118648529,
-0.5528304576873779,
0.08361030369997025,
0.30965256690979004,
0.32861971855163574,
-0.18396058678627014,
-0.25853678584098816,
0.018054770305752754,
-0.210465669631958,
-0.33776378631591797,
-0.0016467259265482426,
0.22134968638420105,
0.007709763944149017,
-0.21949899196624756,
-0.15397518873214722,
0.07883857935667038,
0.10823903977870941,
0.2224823534488678,
0.2158278375864029,
-0.21493679285049438,
-0.16299793124198914,
-0.19581098854541779,
0.1085689514875412,
-0.00015673041343688965,
-0.27942541241645813,
-0.20052392780780792,
0.12045659124851227,
0.03274054080247879,
-0.4027300179004669,
0.36918485164642334,
0.4316316545009613,
-0.015838421881198883,
0.022989977151155472,
-0.18035539984703064,
0.35156556963920593,
0.0599978044629097,
0.007309192791581154,
-0.07685926556587219,
-0.019832685589790344,
0.13112223148345947,
0.0785946175456047,
0.059117697179317474,
-0.18087586760520935,
-0.23317864537239075,
0.254061758518219,
0.09373024851083755,
-0.05965493619441986,
0.15787819027900696,
0.03331625461578369,
0.12498001754283905,
0.08654897660017014,
0.14987701177597046,
0.045755282044410706,
-0.09185723960399628,
-0.19918738305568695,
-0.0924033373594284,
0.3365595042705536,
-0.03282715007662773,
-0.1585705727338791,
-0.5267448425292969,
-0.044269859790802,
0.20418578386306763,
0.050974391400814056,
0.01533706858754158,
-0.3057875633239746,
0.3635253310203552,
-0.1319524347782135,
0.2624169886112213,
-0.12839576601982117,
0.33661437034606934,
0.27910786867141724,
-0.006277401000261307,
0.11100481450557709,
0.12382647395133972,
-0.39874425530433655,
0.16652008891105652,
0.08761441707611084,
-0.3534071445465088,
0.3929482698440552,
0.11448299139738083,
0.11243721097707748,
0.3610011339187622,
-0.02184012532234192,
-0.46694624423980713,
-0.08319717645645142,
0.08585448563098907,
0.29970771074295044,
0.07927712053060532,
0.1406990885734558,
-0.4218287467956543,
-0.1160842627286911,
-0.3526415228843689,
-0.18621881306171417,
-0.2132408320903778,
-0.34510281682014465,
-0.07365160435438156,
-0.2496056854724884,
-0.11581867188215256,
0.14714817702770233,
-0.0468890406191349,
0.21003367006778717,
0.055234529078006744,
-0.10168866813182831,
-0.201896533370018,
0.30529648065567017,
-0.3002616763114929,
0.04102504998445511,
0.1852189600467682,
-0.012890875339508057,
0.26824265718460083,
0.17545047402381897,
-0.07080444693565369,
0.4388808012008667,
0.11046653240919113,
0.36425602436065674,
0.2204928994178772,
-0.10115744173526764,
0.2775825560092926,
0.0681929886341095,
0.08918099850416183,
0.17135962843894958,
0.10562668740749359,
0.11609625816345215,
0.4089370667934418,
0.06774163246154785,
0.17788836359977722,
-0.23645983636379242,
-0.1180667132139206,
-0.14589151740074158,
0.03303167596459389,
-0.38847875595092773,
0.3115863800048828,
-0.45986518263816833,
-0.07950176298618317,
-0.34214016795158386,
-0.05515465885400772,
-0.17087949812412262,
-0.2934747338294983,
0.12441825866699219,
0.24477356672286987,
0.13426893949508667,
0.25234851241111755,
0.08543265610933304,
-0.1394912749528885,
0.13954071700572968,
0.07460646331310272,
-0.14307013154029846,
-0.024630896747112274,
0.02439771592617035,
-0.14335455000400543,
0.4127543568611145,
0.3275800049304962,
0.15399496257305145,
-0.31141117215156555,
-0.03414599597454071,
0.06203679367899895,
-0.08485016971826553,
-0.17470555007457733,
-0.13849030435085297,
0.07467469573020935,
0.03976798802614212,
-0.2937387526035309,
-0.06033708527684212,
-0.10324883460998535,
0.05118265748023987,
0.13014352321624756,
-0.47364354133605957,
-0.2038383036851883,
0.10534003376960754,
0.1312570571899414,
-0.05759449303150177,
0.028368890285491943,
-0.39893752336502075,
0.5497182607650757,
0.17673315107822418,
0.042298100888729095,
0.3322156071662903,
-0.09931797534227371,
-0.08806305378675461,
-0.25600117444992065,
0.017820270732045174,
0.05968926474452019,
-0.11278427392244339,
-0.1837928593158722,
0.2758311331272125,
0.12248039990663528,
0.15913493931293488,
-0.27343034744262695,
0.32485106587409973,
0.1637834757566452,
-0.13927336037158966,
-0.3282933235168457,
0.14016002416610718,
-0.1697966307401657,
0.2124592363834381,
0.11610563099384308,
0.12626242637634277,
-0.01332712173461914,
-0.09837082028388977,
-0.36018913984298706,
-0.3526258170604706,
0.43978944420814514,
0.09515266865491867,
-0.09498360753059387,
-0.5195400714874268,
0.4163820743560791,
0.12608900666236877,
0.2649640738964081,
-0.8988054990768433,
0.1107027605175972,
0.13365626335144043,
-0.22228887677192688,
-0.0679929107427597,
0.01576356776058674,
0.19386115670204163,
-0.049252454191446304,
-0.1494429111480713,
0.17503920197486877,
0.33789342641830444,
-0.1611880362033844,
0.2350691854953766,
-0.2075396031141281
] |
https://github.com/huggingface/datasets/issues/4889 | torchaudio 11.0 yields different results than torchaudio 12.1 when loading MP3 | Do we have a solution for this now? Should we just upgrade to `torchaudio 0.12.0` then? | ## Describe the bug
When loading Common Voice with torchaudio 0.11.0 the results are different to 0.12.1 which leads to problems in transformers see: https://github.com/huggingface/transformers/pull/18749
## Steps to reproduce the bug
If you run the following code once with `torchaudio==0.11.0+cu102` and `torchaudio==0.12.1+cu102` you can see that the tensors differ. This is a pretty big breaking change and makes some integration tests fail in Transformers.
```python
#!/usr/bin/env python3
from datasets import load_dataset
import datasets
import numpy as np
import torch
import torchaudio
print("torch vesion", torch.__version__)
print("torchaudio vesion", torchaudio.__version__)
save_audio = True
load_audios = False
if save_audio:
ds = load_dataset("common_voice", "en", split="train", streaming=True)
ds = ds.cast_column("audio", datasets.Audio(sampling_rate=16_000))
ds_iter = iter(ds)
sample = next(ds_iter)
np.save(f"audio_sample_{torch.__version__}", sample["audio"]["array"])
print(sample["audio"]["array"])
if load_audios:
array_torch_11 = np.load("/home/patrick/audio_sample_1.11.0+cu102.npy")
print("Array 11 Shape", array_torch_11.shape)
print("Array 11 abs sum", np.sum(np.abs(array_torch_11)))
array_torch_12 = np.load("/home/patrick/audio_sample_1.12.1+cu102.npy")
print("Array 12 Shape", array_torch_12.shape)
print("Array 12 abs sum", np.sum(np.abs(array_torch_12)))
```
Having saved the tensors the print output yields:
```
torch vesion 1.12.1+cu102
torchaudio vesion 0.12.1+cu102
Array 11 Shape (122880,)
Array 11 abs sum 1396.4988
Array 12 Shape (123264,)
Array 12 abs sum 1396.5193
```
## Expected results
torchaudio 11.0 and 12.1 should yield same results.
## Actual results
See above.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.1.1.dev0
- Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.34
- Python version: 3.9.7
- PyArrow version: 6.0.1
- Pandas version: 1.4.2
| 16 | torchaudio 11.0 yields different results than torchaudio 12.1 when loading MP3
## Describe the bug
When loading Common Voice with torchaudio 0.11.0 the results are different to 0.12.1 which leads to problems in transformers see: https://github.com/huggingface/transformers/pull/18749
## Steps to reproduce the bug
If you run the following code once with `torchaudio==0.11.0+cu102` and `torchaudio==0.12.1+cu102` you can see that the tensors differ. This is a pretty big breaking change and makes some integration tests fail in Transformers.
```python
#!/usr/bin/env python3
from datasets import load_dataset
import datasets
import numpy as np
import torch
import torchaudio
print("torch vesion", torch.__version__)
print("torchaudio vesion", torchaudio.__version__)
save_audio = True
load_audios = False
if save_audio:
ds = load_dataset("common_voice", "en", split="train", streaming=True)
ds = ds.cast_column("audio", datasets.Audio(sampling_rate=16_000))
ds_iter = iter(ds)
sample = next(ds_iter)
np.save(f"audio_sample_{torch.__version__}", sample["audio"]["array"])
print(sample["audio"]["array"])
if load_audios:
array_torch_11 = np.load("/home/patrick/audio_sample_1.11.0+cu102.npy")
print("Array 11 Shape", array_torch_11.shape)
print("Array 11 abs sum", np.sum(np.abs(array_torch_11)))
array_torch_12 = np.load("/home/patrick/audio_sample_1.12.1+cu102.npy")
print("Array 12 Shape", array_torch_12.shape)
print("Array 12 abs sum", np.sum(np.abs(array_torch_12)))
```
Having saved the tensors the print output yields:
```
torch vesion 1.12.1+cu102
torchaudio vesion 0.12.1+cu102
Array 11 Shape (122880,)
Array 11 abs sum 1396.4988
Array 12 Shape (123264,)
Array 12 abs sum 1396.5193
```
## Expected results
torchaudio 11.0 and 12.1 should yield same results.
## Actual results
See above.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.1.1.dev0
- Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.34
- Python version: 3.9.7
- PyArrow version: 6.0.1
- Pandas version: 1.4.2
Do we have a solution for this now? Should we just upgrade to `torchaudio 0.12.0` then? | [
-0.31408780813217163,
-0.44944652915000916,
0.013230562210083008,
0.47898048162460327,
0.04047958552837372,
-0.1875728964805603,
0.44027286767959595,
0.22770655155181885,
-0.2552795112133026,
0.5620273947715759,
-0.4986122250556946,
0.42314478754997253,
-0.03476763144135475,
-0.7195457816123962,
-0.24319550395011902,
-0.4605134427547455,
0.11581098288297653,
0.10381703823804855,
-0.12200991809368134,
-0.30478227138519287,
-0.0031377077102661133,
0.3698004484176636,
-0.37640833854675293,
0.10080893337726593,
-0.29410451650619507,
0.23184406757354736,
0.14209334552288055,
-0.009610392153263092,
0.1545620560646057,
0.009273177944123745,
0.18974822759628296,
-0.11882516741752625,
-0.028428763151168823,
0.5626029968261719,
-0.00010504116653464735,
-0.08764331787824631,
0.46375638246536255,
-0.1027531772851944,
-0.11724534630775452,
-0.3664965033531189,
0.11667396873235703,
0.22357887029647827,
-0.14675582945346832,
0.15453878045082092,
-0.048176031559705734,
0.16326992213726044,
-0.2108139991760254,
0.08256442844867706,
0.11513163894414902,
0.1458144187927246,
0.25882089138031006,
0.35149896144866943,
-0.17297908663749695,
-0.06480810046195984,
0.3144245147705078,
0.18137773871421814,
-0.18162843585014343,
-0.08380529284477234,
0.20768889784812927,
0.132052481174469,
0.04204036295413971,
0.18957564234733582,
-0.20560413599014282,
0.025464076548814774,
0.02793358452618122,
-0.007607168518006802,
-0.3728647828102112,
-0.3181957006454468,
0.21889230608940125,
0.37439683079719543,
0.1674322783946991,
0.002296231687068939,
-0.26683804392814636,
-0.03312475234270096,
-0.22533123195171356,
-0.3080569803714752,
0.3639317750930786,
0.2961845099925995,
-0.29668310284614563,
-0.16641013324260712,
-0.16245369613170624,
0.5365220308303833,
0.03446587175130844,
0.18500828742980957,
-0.1198115199804306,
0.24953781068325043,
-0.06785496324300766,
0.03123437613248825,
0.32379817962646484,
-0.12334316968917847,
0.062082257121801376,
-0.027758825570344925,
0.052394799888134,
0.1275031715631485,
-0.16571709513664246,
-0.07202841341495514,
0.09109680354595184,
-0.31247803568840027,
-0.1379479169845581,
-0.12869542837142944,
0.5314401388168335,
0.1807233691215515,
-0.15349477529525757,
0.18988072872161865,
0.005472101271152496,
0.10432979464530945,
-0.2880718410015106,
0.13484221696853638,
0.18989667296409607,
0.022924304008483887,
0.12861284613609314,
-0.038631945848464966,
0.17072507739067078,
-0.1683313399553299,
-0.18071576952934265,
0.1813826858997345,
0.0815136656165123,
-0.3002368211746216,
-0.2164580523967743,
-0.10448002070188522,
-0.20254555344581604,
0.0777878388762474,
0.1856354922056198,
0.04890771210193634,
0.04172416403889656,
0.5658758282661438,
0.08521053940057755,
0.17522267997264862,
-0.20412391424179077,
-0.021788187325000763,
-0.15684862434864044,
-0.2010292261838913,
-0.0329139269888401,
0.04497097060084343,
0.30598509311676025,
-0.03800240159034729,
0.3091096878051758,
0.1127934679389,
0.2846822142601013,
-0.18067426979541779,
-0.07224339246749878,
0.10343444347381592,
0.05411073565483093,
0.005064476281404495,
-0.0699322521686554,
0.27465152740478516,
-0.18996639549732208,
0.5818043351173401,
-0.22129109501838684,
0.266193151473999,
-0.14859825372695923,
-0.10785453021526337,
0.05103519558906555,
0.23090623319149017,
-0.06567114591598511,
0.14271564781665802,
-0.0019581615924835205,
0.07930406928062439,
-0.13901165127754211,
-0.4655027389526367,
0.14615614712238312,
-0.10981377959251404,
-0.3668355941772461,
0.046877387911081314,
0.22234117984771729,
0.10904690623283386,
0.10610945522785187,
-0.2505809962749481,
0.265049010515213,
0.15127231180667877,
0.07923552393913269,
0.18813607096672058,
-0.17644274234771729,
-0.34877729415893555,
-0.0988946482539177,
-0.14779159426689148,
0.4314550459384918,
-0.49330636858940125,
-0.5620378255844116,
-0.003459267783910036,
0.25403714179992676,
0.20009168982505798,
0.11587994545698166,
-0.003323174547404051,
0.07232031971216202,
-0.0811389610171318,
-0.007121101021766663,
0.25039345026016235,
0.12013967335224152,
0.21762913465499878,
-0.2533223330974579,
-0.13786640763282776,
0.06104196235537529,
-0.0510656014084816,
-0.2526775896549225,
0.016872964799404144,
-0.27554070949554443,
0.16201412677764893,
0.27182695269584656,
-0.1891404539346695,
-0.08870120346546173,
0.19294847548007965,
0.06401651352643967,
-0.42835038900375366,
0.025806257501244545,
-0.18754228949546814,
0.09257463365793228,
0.22335410118103027,
-0.22799642384052277,
0.22516515851020813,
0.1093660444021225,
-0.14423170685768127,
0.011323688551783562,
-0.2756234109401703,
-0.16640008985996246,
0.035422779619693756,
0.1275160014629364,
0.2882702648639679,
0.031512923538684845,
-0.15294548869132996,
0.12613597512245178,
0.09652463346719742,
0.45207059383392334,
-0.11878935992717743,
-0.510151207447052,
0.039440594613552094,
-0.004261987283825874,
-0.157014861702919,
0.05907011777162552,
0.32803046703338623,
0.1253664344549179,
0.09186632931232452,
-0.23484918475151062,
0.302431583404541,
-0.305728942155838,
0.6365156769752502,
-0.6432844996452332,
0.11881189048290253,
0.2463490217924118,
-0.18711596727371216,
0.36670467257499695,
0.3702465891838074,
0.13318543136119843,
0.03867294639348984,
-0.04897790402173996,
0.511017382144928,
0.261636346578598,
0.11442875862121582,
0.03827538341283798,
-0.2791581153869629,
-0.005097154527902603,
0.18755386769771576,
-0.21062071621418,
0.08422915637493134,
0.10556189715862274,
0.42413586378097534,
0.4738468527793884,
-0.010077016428112984,
-0.2990916669368744,
-0.1704326868057251,
0.4156826138496399,
-0.1397385448217392,
-0.02592935413122177,
0.08077147603034973,
-0.3349113464355469,
-0.07212351262569427,
0.11416435241699219,
-0.5124304294586182,
0.2800266742706299,
0.17773869633674622,
0.19482514262199402,
-0.006451191380620003,
-0.22269612550735474,
-0.10448391735553741,
0.09608595073223114,
0.402596652507782,
-0.41410836577415466,
0.2049454152584076,
0.3485778570175171,
0.1304144263267517,
-0.370505690574646,
-0.03676522523164749,
-0.2953094244003296,
-0.03572360426187515,
-0.18541516363620758,
0.21530288457870483,
-0.009661408141255379,
0.44932571053504944,
-0.43443962931632996,
-0.46406683325767517,
-0.21663007140159607,
0.024232765659689903,
0.1341024935245514,
0.6542224884033203,
-0.11221781373023987,
0.2764779031276703,
0.3824682831764221,
0.17374858260154724,
0.05397718399763107,
-0.028474217280745506,
-0.2745116055011749,
0.21993529796600342,
-0.4135228097438812,
0.09198997914791107,
0.09665437042713165,
-0.09340856224298477,
0.07634548842906952,
-0.12365949898958206,
-0.06323415040969849,
0.2991078794002533,
-0.07098300009965897,
0.1313956081867218,
0.004177935421466827,
-0.3171188533306122,
-0.07869844138622284,
-0.37832266092300415,
0.01980702206492424,
-0.4045843482017517,
0.17402063310146332,
-0.1715325564146042,
-0.13142038881778717,
0.26949185132980347,
-0.023605290800333023,
0.1618865728378296,
-0.2205859273672104,
-0.6102150082588196,
0.1353807896375656,
-0.3659828305244446,
0.1974717527627945,
-0.23790135979652405,
0.1250636726617813,
0.07138382643461227,
0.24235385656356812,
-0.14764484763145447,
0.3013840615749359,
0.5090997219085693,
-0.25703105330467224,
-0.12574438750743866,
0.23734162747859955,
-0.13229385018348694,
-0.2710220515727997,
-0.19004584848880768,
-0.11584305763244629,
0.33819451928138733,
0.11219174414873123,
-0.03798622637987137,
-0.08151758462190628,
0.000508725643157959,
-0.21079906821250916,
0.0033732764422893524,
0.0803409293293953,
0.34408578276634216,
0.2482091635465622,
-0.033636003732681274,
-0.051625438034534454,
-0.14066199958324432,
-0.28987279534339905,
0.22923311591148376,
0.33568304777145386,
-0.07350245118141174,
0.39130184054374695,
-0.17222562432289124,
0.597529411315918,
0.12093080580234528,
-0.15122337639331818,
-0.03390137106180191,
-0.011499984189867973,
0.049547988921403885,
-0.3455519676208496,
0.07115405797958374,
-0.006221529096364975,
0.05394469201564789,
0.03955034911632538,
0.2060868740081787,
0.19705486297607422,
-0.1944006085395813,
-0.19687193632125854,
-0.0377001017332077,
0.019372805953025818,
-0.2920991778373718,
0.007433111779391766,
-0.04054843634366989,
-0.050001360476017,
-0.1723710298538208,
0.473955363035202,
-0.11452114582061768,
-0.264274924993515,
0.290587455034256,
-0.08254709839820862,
-0.01889023929834366,
-0.13656535744667053,
0.03688199445605278,
0.2741215229034424,
-0.41821691393852234,
0.10888004302978516,
0.11185083538293839,
0.3379713296890259,
0.11433230340480804,
-0.2870500683784485,
-0.06944228708744049,
0.07127882540225983,
0.23691019415855408,
0.0025453660637140274,
0.030728397890925407,
0.14762860536575317,
0.019312482327222824,
-0.356169730424881,
-0.1785341054201126,
-0.4111880958080292,
-0.3518627882003784,
0.12425084412097931,
-0.0018391460180282593,
0.08948073536157608,
-0.11988375335931778,
0.1688266098499298,
0.5179270505905151,
-0.005175769329071045,
0.006350128911435604,
-0.43094971776008606,
0.009303808212280273,
-0.10096205770969391,
-0.08479080349206924,
-0.08557537198066711,
0.2779887616634369,
-0.32044512033462524,
-0.2873091995716095,
0.16766951978206635,
-0.20982033014297485,
0.2528895139694214,
0.10561628639698029,
0.32109883427619934,
-0.07170533388853073,
0.26378241181373596,
0.22452154755592346,
0.26628127694129944,
-0.04136515408754349,
0.28261396288871765,
0.06910352408885956,
-0.22134825587272644,
0.171044260263443,
-0.01951421983540058,
-0.20231923460960388,
0.22439470887184143,
0.20367373526096344,
-0.1875612735748291,
-0.1916888952255249,
-0.13426285982131958,
-0.1848660111427307,
0.1781119555234909,
0.4068969786167145,
0.24182945489883423,
-0.13925430178642273,
0.03395860642194748,
0.409637451171875,
0.13002081215381622,
-0.2039024382829666,
0.3526897430419922,
-0.32402360439300537,
-0.15630397200584412,
0.18220685422420502,
-0.2189125120639801,
0.8006895780563354,
0.30628299713134766,
0.21282535791397095,
0.21126040816307068,
-0.4257897138595581,
-0.22038277983665466,
0.04299996793270111,
0.344723641872406,
-0.06713376194238663,
-0.011794579215347767,
-0.03252946212887764,
0.004994798451662064,
-0.27200332283973694,
0.03772422671318054,
-0.19399110972881317,
0.2447865605354309,
-0.09526468813419342,
0.20516572892665863,
-0.06489548832178116,
-0.009288154542446136,
-0.00026624277234077454,
-0.3399661183357239,
0.10610277950763702,
0.12321010231971741,
0.35832053422927856,
0.46926459670066833,
0.13349395990371704,
-0.06965382397174835,
-0.031193705275654793,
-0.2940915822982788,
-0.15640854835510254,
0.18739885091781616,
-0.09518503397703171,
-0.18445561826229095,
0.2536609470844269,
-0.502857506275177,
0.0336092971265316,
0.2600579559803009,
-0.08475859463214874,
0.05084297060966492,
-0.11036115884780884,
0.07662084698677063,
-0.027175739407539368,
0.32925572991371155,
0.10756280273199081,
-0.008758705109357834,
0.19305939972400665,
0.012440800666809082,
-0.23494932055473328,
0.20094415545463562,
0.05073340982198715,
0.16968996822834015,
-0.11797794699668884,
0.01251017302274704,
0.3157566785812378,
-0.22035080194473267,
0.13132403790950775,
0.029797911643981934,
-0.19050170481204987,
-0.2262001633644104,
0.2263348400592804,
-0.19443200528621674,
-0.3138378858566284,
-0.022114507853984833,
-0.021926146000623703,
-0.20932897925376892,
0.005233798176050186,
0.6899046301841736,
0.1269468069076538,
-0.4744094908237457,
0.24552655220031738,
-0.17249839007854462,
-0.07286390662193298,
-0.11130590736865997,
-0.10784892737865448,
0.24405330419540405,
-0.5570070743560791,
-0.08050301671028137,
-0.1772690713405609,
-0.3950451612472534,
0.07625929266214371,
0.30797436833381653,
-0.05903325229883194,
0.2130034863948822,
-0.2943314015865326,
0.2227238118648529,
-0.5528304576873779,
0.08361030369997025,
0.30965256690979004,
0.32861971855163574,
-0.18396058678627014,
-0.25853678584098816,
0.018054770305752754,
-0.210465669631958,
-0.33776378631591797,
-0.0016467259265482426,
0.22134968638420105,
0.007709763944149017,
-0.21949899196624756,
-0.15397518873214722,
0.07883857935667038,
0.10823903977870941,
0.2224823534488678,
0.2158278375864029,
-0.21493679285049438,
-0.16299793124198914,
-0.19581098854541779,
0.1085689514875412,
-0.00015673041343688965,
-0.27942541241645813,
-0.20052392780780792,
0.12045659124851227,
0.03274054080247879,
-0.4027300179004669,
0.36918485164642334,
0.4316316545009613,
-0.015838421881198883,
0.022989977151155472,
-0.18035539984703064,
0.35156556963920593,
0.0599978044629097,
0.007309192791581154,
-0.07685926556587219,
-0.019832685589790344,
0.13112223148345947,
0.0785946175456047,
0.059117697179317474,
-0.18087586760520935,
-0.23317864537239075,
0.254061758518219,
0.09373024851083755,
-0.05965493619441986,
0.15787819027900696,
0.03331625461578369,
0.12498001754283905,
0.08654897660017014,
0.14987701177597046,
0.045755282044410706,
-0.09185723960399628,
-0.19918738305568695,
-0.0924033373594284,
0.3365595042705536,
-0.03282715007662773,
-0.1585705727338791,
-0.5267448425292969,
-0.044269859790802,
0.20418578386306763,
0.050974391400814056,
0.01533706858754158,
-0.3057875633239746,
0.3635253310203552,
-0.1319524347782135,
0.2624169886112213,
-0.12839576601982117,
0.33661437034606934,
0.27910786867141724,
-0.006277401000261307,
0.11100481450557709,
0.12382647395133972,
-0.39874425530433655,
0.16652008891105652,
0.08761441707611084,
-0.3534071445465088,
0.3929482698440552,
0.11448299139738083,
0.11243721097707748,
0.3610011339187622,
-0.02184012532234192,
-0.46694624423980713,
-0.08319717645645142,
0.08585448563098907,
0.29970771074295044,
0.07927712053060532,
0.1406990885734558,
-0.4218287467956543,
-0.1160842627286911,
-0.3526415228843689,
-0.18621881306171417,
-0.2132408320903778,
-0.34510281682014465,
-0.07365160435438156,
-0.2496056854724884,
-0.11581867188215256,
0.14714817702770233,
-0.0468890406191349,
0.21003367006778717,
0.055234529078006744,
-0.10168866813182831,
-0.201896533370018,
0.30529648065567017,
-0.3002616763114929,
0.04102504998445511,
0.1852189600467682,
-0.012890875339508057,
0.26824265718460083,
0.17545047402381897,
-0.07080444693565369,
0.4388808012008667,
0.11046653240919113,
0.36425602436065674,
0.2204928994178772,
-0.10115744173526764,
0.2775825560092926,
0.0681929886341095,
0.08918099850416183,
0.17135962843894958,
0.10562668740749359,
0.11609625816345215,
0.4089370667934418,
0.06774163246154785,
0.17788836359977722,
-0.23645983636379242,
-0.1180667132139206,
-0.14589151740074158,
0.03303167596459389,
-0.38847875595092773,
0.3115863800048828,
-0.45986518263816833,
-0.07950176298618317,
-0.34214016795158386,
-0.05515465885400772,
-0.17087949812412262,
-0.2934747338294983,
0.12441825866699219,
0.24477356672286987,
0.13426893949508667,
0.25234851241111755,
0.08543265610933304,
-0.1394912749528885,
0.13954071700572968,
0.07460646331310272,
-0.14307013154029846,
-0.024630896747112274,
0.02439771592617035,
-0.14335455000400543,
0.4127543568611145,
0.3275800049304962,
0.15399496257305145,
-0.31141117215156555,
-0.03414599597454071,
0.06203679367899895,
-0.08485016971826553,
-0.17470555007457733,
-0.13849030435085297,
0.07467469573020935,
0.03976798802614212,
-0.2937387526035309,
-0.06033708527684212,
-0.10324883460998535,
0.05118265748023987,
0.13014352321624756,
-0.47364354133605957,
-0.2038383036851883,
0.10534003376960754,
0.1312570571899414,
-0.05759449303150177,
0.028368890285491943,
-0.39893752336502075,
0.5497182607650757,
0.17673315107822418,
0.042298100888729095,
0.3322156071662903,
-0.09931797534227371,
-0.08806305378675461,
-0.25600117444992065,
0.017820270732045174,
0.05968926474452019,
-0.11278427392244339,
-0.1837928593158722,
0.2758311331272125,
0.12248039990663528,
0.15913493931293488,
-0.27343034744262695,
0.32485106587409973,
0.1637834757566452,
-0.13927336037158966,
-0.3282933235168457,
0.14016002416610718,
-0.1697966307401657,
0.2124592363834381,
0.11610563099384308,
0.12626242637634277,
-0.01332712173461914,
-0.09837082028388977,
-0.36018913984298706,
-0.3526258170604706,
0.43978944420814514,
0.09515266865491867,
-0.09498360753059387,
-0.5195400714874268,
0.4163820743560791,
0.12608900666236877,
0.2649640738964081,
-0.8988054990768433,
0.1107027605175972,
0.13365626335144043,
-0.22228887677192688,
-0.0679929107427597,
0.01576356776058674,
0.19386115670204163,
-0.049252454191446304,
-0.1494429111480713,
0.17503920197486877,
0.33789342641830444,
-0.1611880362033844,
0.2350691854953766,
-0.2075396031141281
] |
https://github.com/huggingface/datasets/issues/4889 | torchaudio 11.0 yields different results than torchaudio 12.1 when loading MP3 | `datasets` supports `torchaudio` 0.12 if you have an environment that supports reading MP3 with `torchaudio`, i.e. if you have `ffmpeg>=4` | ## Describe the bug
When loading Common Voice with torchaudio 0.11.0 the results are different to 0.12.1 which leads to problems in transformers see: https://github.com/huggingface/transformers/pull/18749
## Steps to reproduce the bug
If you run the following code once with `torchaudio==0.11.0+cu102` and `torchaudio==0.12.1+cu102` you can see that the tensors differ. This is a pretty big breaking change and makes some integration tests fail in Transformers.
```python
#!/usr/bin/env python3
from datasets import load_dataset
import datasets
import numpy as np
import torch
import torchaudio
print("torch vesion", torch.__version__)
print("torchaudio vesion", torchaudio.__version__)
save_audio = True
load_audios = False
if save_audio:
ds = load_dataset("common_voice", "en", split="train", streaming=True)
ds = ds.cast_column("audio", datasets.Audio(sampling_rate=16_000))
ds_iter = iter(ds)
sample = next(ds_iter)
np.save(f"audio_sample_{torch.__version__}", sample["audio"]["array"])
print(sample["audio"]["array"])
if load_audios:
array_torch_11 = np.load("/home/patrick/audio_sample_1.11.0+cu102.npy")
print("Array 11 Shape", array_torch_11.shape)
print("Array 11 abs sum", np.sum(np.abs(array_torch_11)))
array_torch_12 = np.load("/home/patrick/audio_sample_1.12.1+cu102.npy")
print("Array 12 Shape", array_torch_12.shape)
print("Array 12 abs sum", np.sum(np.abs(array_torch_12)))
```
Having saved the tensors the print output yields:
```
torch vesion 1.12.1+cu102
torchaudio vesion 0.12.1+cu102
Array 11 Shape (122880,)
Array 11 abs sum 1396.4988
Array 12 Shape (123264,)
Array 12 abs sum 1396.5193
```
## Expected results
torchaudio 11.0 and 12.1 should yield same results.
## Actual results
See above.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.1.1.dev0
- Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.34
- Python version: 3.9.7
- PyArrow version: 6.0.1
- Pandas version: 1.4.2
| 20 | torchaudio 11.0 yields different results than torchaudio 12.1 when loading MP3
## Describe the bug
When loading Common Voice with torchaudio 0.11.0 the results are different to 0.12.1 which leads to problems in transformers see: https://github.com/huggingface/transformers/pull/18749
## Steps to reproduce the bug
If you run the following code once with `torchaudio==0.11.0+cu102` and `torchaudio==0.12.1+cu102` you can see that the tensors differ. This is a pretty big breaking change and makes some integration tests fail in Transformers.
```python
#!/usr/bin/env python3
from datasets import load_dataset
import datasets
import numpy as np
import torch
import torchaudio
print("torch vesion", torch.__version__)
print("torchaudio vesion", torchaudio.__version__)
save_audio = True
load_audios = False
if save_audio:
ds = load_dataset("common_voice", "en", split="train", streaming=True)
ds = ds.cast_column("audio", datasets.Audio(sampling_rate=16_000))
ds_iter = iter(ds)
sample = next(ds_iter)
np.save(f"audio_sample_{torch.__version__}", sample["audio"]["array"])
print(sample["audio"]["array"])
if load_audios:
array_torch_11 = np.load("/home/patrick/audio_sample_1.11.0+cu102.npy")
print("Array 11 Shape", array_torch_11.shape)
print("Array 11 abs sum", np.sum(np.abs(array_torch_11)))
array_torch_12 = np.load("/home/patrick/audio_sample_1.12.1+cu102.npy")
print("Array 12 Shape", array_torch_12.shape)
print("Array 12 abs sum", np.sum(np.abs(array_torch_12)))
```
Having saved the tensors the print output yields:
```
torch vesion 1.12.1+cu102
torchaudio vesion 0.12.1+cu102
Array 11 Shape (122880,)
Array 11 abs sum 1396.4988
Array 12 Shape (123264,)
Array 12 abs sum 1396.5193
```
## Expected results
torchaudio 11.0 and 12.1 should yield same results.
## Actual results
See above.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.1.1.dev0
- Platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.34
- Python version: 3.9.7
- PyArrow version: 6.0.1
- Pandas version: 1.4.2
`datasets` supports `torchaudio` 0.12 if you have an environment that supports reading MP3 with `torchaudio`, i.e. if you have `ffmpeg>=4` | [
-0.31408780813217163,
-0.44944652915000916,
0.013230562210083008,
0.47898048162460327,
0.04047958552837372,
-0.1875728964805603,
0.44027286767959595,
0.22770655155181885,
-0.2552795112133026,
0.5620273947715759,
-0.4986122250556946,
0.42314478754997253,
-0.03476763144135475,
-0.7195457816123962,
-0.24319550395011902,
-0.4605134427547455,
0.11581098288297653,
0.10381703823804855,
-0.12200991809368134,
-0.30478227138519287,
-0.0031377077102661133,
0.3698004484176636,
-0.37640833854675293,
0.10080893337726593,
-0.29410451650619507,
0.23184406757354736,
0.14209334552288055,
-0.009610392153263092,
0.1545620560646057,
0.009273177944123745,
0.18974822759628296,
-0.11882516741752625,
-0.028428763151168823,
0.5626029968261719,
-0.00010504116653464735,
-0.08764331787824631,
0.46375638246536255,
-0.1027531772851944,
-0.11724534630775452,
-0.3664965033531189,
0.11667396873235703,
0.22357887029647827,
-0.14675582945346832,
0.15453878045082092,
-0.048176031559705734,
0.16326992213726044,
-0.2108139991760254,
0.08256442844867706,
0.11513163894414902,
0.1458144187927246,
0.25882089138031006,
0.35149896144866943,
-0.17297908663749695,
-0.06480810046195984,
0.3144245147705078,
0.18137773871421814,
-0.18162843585014343,
-0.08380529284477234,
0.20768889784812927,
0.132052481174469,
0.04204036295413971,
0.18957564234733582,
-0.20560413599014282,
0.025464076548814774,
0.02793358452618122,
-0.007607168518006802,
-0.3728647828102112,
-0.3181957006454468,
0.21889230608940125,
0.37439683079719543,
0.1674322783946991,
0.002296231687068939,
-0.26683804392814636,
-0.03312475234270096,
-0.22533123195171356,
-0.3080569803714752,
0.3639317750930786,
0.2961845099925995,
-0.29668310284614563,
-0.16641013324260712,
-0.16245369613170624,
0.5365220308303833,
0.03446587175130844,
0.18500828742980957,
-0.1198115199804306,
0.24953781068325043,
-0.06785496324300766,
0.03123437613248825,
0.32379817962646484,
-0.12334316968917847,
0.062082257121801376,
-0.027758825570344925,
0.052394799888134,
0.1275031715631485,
-0.16571709513664246,
-0.07202841341495514,
0.09109680354595184,
-0.31247803568840027,
-0.1379479169845581,
-0.12869542837142944,
0.5314401388168335,
0.1807233691215515,
-0.15349477529525757,
0.18988072872161865,
0.005472101271152496,
0.10432979464530945,
-0.2880718410015106,
0.13484221696853638,
0.18989667296409607,
0.022924304008483887,
0.12861284613609314,
-0.038631945848464966,
0.17072507739067078,
-0.1683313399553299,
-0.18071576952934265,
0.1813826858997345,
0.0815136656165123,
-0.3002368211746216,
-0.2164580523967743,
-0.10448002070188522,
-0.20254555344581604,
0.0777878388762474,
0.1856354922056198,
0.04890771210193634,
0.04172416403889656,
0.5658758282661438,
0.08521053940057755,
0.17522267997264862,
-0.20412391424179077,
-0.021788187325000763,
-0.15684862434864044,
-0.2010292261838913,
-0.0329139269888401,
0.04497097060084343,
0.30598509311676025,
-0.03800240159034729,
0.3091096878051758,
0.1127934679389,
0.2846822142601013,
-0.18067426979541779,
-0.07224339246749878,
0.10343444347381592,
0.05411073565483093,
0.005064476281404495,
-0.0699322521686554,
0.27465152740478516,
-0.18996639549732208,
0.5818043351173401,
-0.22129109501838684,
0.266193151473999,
-0.14859825372695923,
-0.10785453021526337,
0.05103519558906555,
0.23090623319149017,
-0.06567114591598511,
0.14271564781665802,
-0.0019581615924835205,
0.07930406928062439,
-0.13901165127754211,
-0.4655027389526367,
0.14615614712238312,
-0.10981377959251404,
-0.3668355941772461,
0.046877387911081314,
0.22234117984771729,
0.10904690623283386,
0.10610945522785187,
-0.2505809962749481,
0.265049010515213,
0.15127231180667877,
0.07923552393913269,
0.18813607096672058,
-0.17644274234771729,
-0.34877729415893555,
-0.0988946482539177,
-0.14779159426689148,
0.4314550459384918,
-0.49330636858940125,
-0.5620378255844116,
-0.003459267783910036,
0.25403714179992676,
0.20009168982505798,
0.11587994545698166,
-0.003323174547404051,
0.07232031971216202,
-0.0811389610171318,
-0.007121101021766663,
0.25039345026016235,
0.12013967335224152,
0.21762913465499878,
-0.2533223330974579,
-0.13786640763282776,
0.06104196235537529,
-0.0510656014084816,
-0.2526775896549225,
0.016872964799404144,
-0.27554070949554443,
0.16201412677764893,
0.27182695269584656,
-0.1891404539346695,
-0.08870120346546173,
0.19294847548007965,
0.06401651352643967,
-0.42835038900375366,
0.025806257501244545,
-0.18754228949546814,
0.09257463365793228,
0.22335410118103027,
-0.22799642384052277,
0.22516515851020813,
0.1093660444021225,
-0.14423170685768127,
0.011323688551783562,
-0.2756234109401703,
-0.16640008985996246,
0.035422779619693756,
0.1275160014629364,
0.2882702648639679,
0.031512923538684845,
-0.15294548869132996,
0.12613597512245178,
0.09652463346719742,
0.45207059383392334,
-0.11878935992717743,
-0.510151207447052,
0.039440594613552094,
-0.004261987283825874,
-0.157014861702919,
0.05907011777162552,
0.32803046703338623,
0.1253664344549179,
0.09186632931232452,
-0.23484918475151062,
0.302431583404541,
-0.305728942155838,
0.6365156769752502,
-0.6432844996452332,
0.11881189048290253,
0.2463490217924118,
-0.18711596727371216,
0.36670467257499695,
0.3702465891838074,
0.13318543136119843,
0.03867294639348984,
-0.04897790402173996,
0.511017382144928,
0.261636346578598,
0.11442875862121582,
0.03827538341283798,
-0.2791581153869629,
-0.005097154527902603,
0.18755386769771576,
-0.21062071621418,
0.08422915637493134,
0.10556189715862274,
0.42413586378097534,
0.4738468527793884,
-0.010077016428112984,
-0.2990916669368744,
-0.1704326868057251,
0.4156826138496399,
-0.1397385448217392,
-0.02592935413122177,
0.08077147603034973,
-0.3349113464355469,
-0.07212351262569427,
0.11416435241699219,
-0.5124304294586182,
0.2800266742706299,
0.17773869633674622,
0.19482514262199402,
-0.006451191380620003,
-0.22269612550735474,
-0.10448391735553741,
0.09608595073223114,
0.402596652507782,
-0.41410836577415466,
0.2049454152584076,
0.3485778570175171,
0.1304144263267517,
-0.370505690574646,
-0.03676522523164749,
-0.2953094244003296,
-0.03572360426187515,
-0.18541516363620758,
0.21530288457870483,
-0.009661408141255379,
0.44932571053504944,
-0.43443962931632996,
-0.46406683325767517,
-0.21663007140159607,
0.024232765659689903,
0.1341024935245514,
0.6542224884033203,
-0.11221781373023987,
0.2764779031276703,
0.3824682831764221,
0.17374858260154724,
0.05397718399763107,
-0.028474217280745506,
-0.2745116055011749,
0.21993529796600342,
-0.4135228097438812,
0.09198997914791107,
0.09665437042713165,
-0.09340856224298477,
0.07634548842906952,
-0.12365949898958206,
-0.06323415040969849,
0.2991078794002533,
-0.07098300009965897,
0.1313956081867218,
0.004177935421466827,
-0.3171188533306122,
-0.07869844138622284,
-0.37832266092300415,
0.01980702206492424,
-0.4045843482017517,
0.17402063310146332,
-0.1715325564146042,
-0.13142038881778717,
0.26949185132980347,
-0.023605290800333023,
0.1618865728378296,
-0.2205859273672104,
-0.6102150082588196,
0.1353807896375656,
-0.3659828305244446,
0.1974717527627945,
-0.23790135979652405,
0.1250636726617813,
0.07138382643461227,
0.24235385656356812,
-0.14764484763145447,
0.3013840615749359,
0.5090997219085693,
-0.25703105330467224,
-0.12574438750743866,
0.23734162747859955,
-0.13229385018348694,
-0.2710220515727997,
-0.19004584848880768,
-0.11584305763244629,
0.33819451928138733,
0.11219174414873123,
-0.03798622637987137,
-0.08151758462190628,
0.000508725643157959,
-0.21079906821250916,
0.0033732764422893524,
0.0803409293293953,
0.34408578276634216,
0.2482091635465622,
-0.033636003732681274,
-0.051625438034534454,
-0.14066199958324432,
-0.28987279534339905,
0.22923311591148376,
0.33568304777145386,
-0.07350245118141174,
0.39130184054374695,
-0.17222562432289124,
0.597529411315918,
0.12093080580234528,
-0.15122337639331818,
-0.03390137106180191,
-0.011499984189867973,
0.049547988921403885,
-0.3455519676208496,
0.07115405797958374,
-0.006221529096364975,
0.05394469201564789,
0.03955034911632538,
0.2060868740081787,
0.19705486297607422,
-0.1944006085395813,
-0.19687193632125854,
-0.0377001017332077,
0.019372805953025818,
-0.2920991778373718,
0.007433111779391766,
-0.04054843634366989,
-0.050001360476017,
-0.1723710298538208,
0.473955363035202,
-0.11452114582061768,
-0.264274924993515,
0.290587455034256,
-0.08254709839820862,
-0.01889023929834366,
-0.13656535744667053,
0.03688199445605278,
0.2741215229034424,
-0.41821691393852234,
0.10888004302978516,
0.11185083538293839,
0.3379713296890259,
0.11433230340480804,
-0.2870500683784485,
-0.06944228708744049,
0.07127882540225983,
0.23691019415855408,
0.0025453660637140274,
0.030728397890925407,
0.14762860536575317,
0.019312482327222824,
-0.356169730424881,
-0.1785341054201126,
-0.4111880958080292,
-0.3518627882003784,
0.12425084412097931,
-0.0018391460180282593,
0.08948073536157608,
-0.11988375335931778,
0.1688266098499298,
0.5179270505905151,
-0.005175769329071045,
0.006350128911435604,
-0.43094971776008606,
0.009303808212280273,
-0.10096205770969391,
-0.08479080349206924,
-0.08557537198066711,
0.2779887616634369,
-0.32044512033462524,
-0.2873091995716095,
0.16766951978206635,
-0.20982033014297485,
0.2528895139694214,
0.10561628639698029,
0.32109883427619934,
-0.07170533388853073,
0.26378241181373596,
0.22452154755592346,
0.26628127694129944,
-0.04136515408754349,
0.28261396288871765,
0.06910352408885956,
-0.22134825587272644,
0.171044260263443,
-0.01951421983540058,
-0.20231923460960388,
0.22439470887184143,
0.20367373526096344,
-0.1875612735748291,
-0.1916888952255249,
-0.13426285982131958,
-0.1848660111427307,
0.1781119555234909,
0.4068969786167145,
0.24182945489883423,
-0.13925430178642273,
0.03395860642194748,
0.409637451171875,
0.13002081215381622,
-0.2039024382829666,
0.3526897430419922,
-0.32402360439300537,
-0.15630397200584412,
0.18220685422420502,
-0.2189125120639801,
0.8006895780563354,
0.30628299713134766,
0.21282535791397095,
0.21126040816307068,
-0.4257897138595581,
-0.22038277983665466,
0.04299996793270111,
0.344723641872406,
-0.06713376194238663,
-0.011794579215347767,
-0.03252946212887764,
0.004994798451662064,
-0.27200332283973694,
0.03772422671318054,
-0.19399110972881317,
0.2447865605354309,
-0.09526468813419342,
0.20516572892665863,
-0.06489548832178116,
-0.009288154542446136,
-0.00026624277234077454,
-0.3399661183357239,
0.10610277950763702,
0.12321010231971741,
0.35832053422927856,
0.46926459670066833,
0.13349395990371704,
-0.06965382397174835,
-0.031193705275654793,
-0.2940915822982788,
-0.15640854835510254,
0.18739885091781616,
-0.09518503397703171,
-0.18445561826229095,
0.2536609470844269,
-0.502857506275177,
0.0336092971265316,
0.2600579559803009,
-0.08475859463214874,
0.05084297060966492,
-0.11036115884780884,
0.07662084698677063,
-0.027175739407539368,
0.32925572991371155,
0.10756280273199081,
-0.008758705109357834,
0.19305939972400665,
0.012440800666809082,
-0.23494932055473328,
0.20094415545463562,
0.05073340982198715,
0.16968996822834015,
-0.11797794699668884,
0.01251017302274704,
0.3157566785812378,
-0.22035080194473267,
0.13132403790950775,
0.029797911643981934,
-0.19050170481204987,
-0.2262001633644104,
0.2263348400592804,
-0.19443200528621674,
-0.3138378858566284,
-0.022114507853984833,
-0.021926146000623703,
-0.20932897925376892,
0.005233798176050186,
0.6899046301841736,
0.1269468069076538,
-0.4744094908237457,
0.24552655220031738,
-0.17249839007854462,
-0.07286390662193298,
-0.11130590736865997,
-0.10784892737865448,
0.24405330419540405,
-0.5570070743560791,
-0.08050301671028137,
-0.1772690713405609,
-0.3950451612472534,
0.07625929266214371,
0.30797436833381653,
-0.05903325229883194,
0.2130034863948822,
-0.2943314015865326,
0.2227238118648529,
-0.5528304576873779,
0.08361030369997025,
0.30965256690979004,
0.32861971855163574,
-0.18396058678627014,
-0.25853678584098816,
0.018054770305752754,
-0.210465669631958,
-0.33776378631591797,
-0.0016467259265482426,
0.22134968638420105,
0.007709763944149017,
-0.21949899196624756,
-0.15397518873214722,
0.07883857935667038,
0.10823903977870941,
0.2224823534488678,
0.2158278375864029,
-0.21493679285049438,
-0.16299793124198914,
-0.19581098854541779,
0.1085689514875412,
-0.00015673041343688965,
-0.27942541241645813,
-0.20052392780780792,
0.12045659124851227,
0.03274054080247879,
-0.4027300179004669,
0.36918485164642334,
0.4316316545009613,
-0.015838421881198883,
0.022989977151155472,
-0.18035539984703064,
0.35156556963920593,
0.0599978044629097,
0.007309192791581154,
-0.07685926556587219,
-0.019832685589790344,
0.13112223148345947,
0.0785946175456047,
0.059117697179317474,
-0.18087586760520935,
-0.23317864537239075,
0.254061758518219,
0.09373024851083755,
-0.05965493619441986,
0.15787819027900696,
0.03331625461578369,
0.12498001754283905,
0.08654897660017014,
0.14987701177597046,
0.045755282044410706,
-0.09185723960399628,
-0.19918738305568695,
-0.0924033373594284,
0.3365595042705536,
-0.03282715007662773,
-0.1585705727338791,
-0.5267448425292969,
-0.044269859790802,
0.20418578386306763,
0.050974391400814056,
0.01533706858754158,
-0.3057875633239746,
0.3635253310203552,
-0.1319524347782135,
0.2624169886112213,
-0.12839576601982117,
0.33661437034606934,
0.27910786867141724,
-0.006277401000261307,
0.11100481450557709,
0.12382647395133972,
-0.39874425530433655,
0.16652008891105652,
0.08761441707611084,
-0.3534071445465088,
0.3929482698440552,
0.11448299139738083,
0.11243721097707748,
0.3610011339187622,
-0.02184012532234192,
-0.46694624423980713,
-0.08319717645645142,
0.08585448563098907,
0.29970771074295044,
0.07927712053060532,
0.1406990885734558,
-0.4218287467956543,
-0.1160842627286911,
-0.3526415228843689,
-0.18621881306171417,
-0.2132408320903778,
-0.34510281682014465,
-0.07365160435438156,
-0.2496056854724884,
-0.11581867188215256,
0.14714817702770233,
-0.0468890406191349,
0.21003367006778717,
0.055234529078006744,
-0.10168866813182831,
-0.201896533370018,
0.30529648065567017,
-0.3002616763114929,
0.04102504998445511,
0.1852189600467682,
-0.012890875339508057,
0.26824265718460083,
0.17545047402381897,
-0.07080444693565369,
0.4388808012008667,
0.11046653240919113,
0.36425602436065674,
0.2204928994178772,
-0.10115744173526764,
0.2775825560092926,
0.0681929886341095,
0.08918099850416183,
0.17135962843894958,
0.10562668740749359,
0.11609625816345215,
0.4089370667934418,
0.06774163246154785,
0.17788836359977722,
-0.23645983636379242,
-0.1180667132139206,
-0.14589151740074158,
0.03303167596459389,
-0.38847875595092773,
0.3115863800048828,
-0.45986518263816833,
-0.07950176298618317,
-0.34214016795158386,
-0.05515465885400772,
-0.17087949812412262,
-0.2934747338294983,
0.12441825866699219,
0.24477356672286987,
0.13426893949508667,
0.25234851241111755,
0.08543265610933304,
-0.1394912749528885,
0.13954071700572968,
0.07460646331310272,
-0.14307013154029846,
-0.024630896747112274,
0.02439771592617035,
-0.14335455000400543,
0.4127543568611145,
0.3275800049304962,
0.15399496257305145,
-0.31141117215156555,
-0.03414599597454071,
0.06203679367899895,
-0.08485016971826553,
-0.17470555007457733,
-0.13849030435085297,
0.07467469573020935,
0.03976798802614212,
-0.2937387526035309,
-0.06033708527684212,
-0.10324883460998535,
0.05118265748023987,
0.13014352321624756,
-0.47364354133605957,
-0.2038383036851883,
0.10534003376960754,
0.1312570571899414,
-0.05759449303150177,
0.028368890285491943,
-0.39893752336502075,
0.5497182607650757,
0.17673315107822418,
0.042298100888729095,
0.3322156071662903,
-0.09931797534227371,
-0.08806305378675461,
-0.25600117444992065,
0.017820270732045174,
0.05968926474452019,
-0.11278427392244339,
-0.1837928593158722,
0.2758311331272125,
0.12248039990663528,
0.15913493931293488,
-0.27343034744262695,
0.32485106587409973,
0.1637834757566452,
-0.13927336037158966,
-0.3282933235168457,
0.14016002416610718,
-0.1697966307401657,
0.2124592363834381,
0.11610563099384308,
0.12626242637634277,
-0.01332712173461914,
-0.09837082028388977,
-0.36018913984298706,
-0.3526258170604706,
0.43978944420814514,
0.09515266865491867,
-0.09498360753059387,
-0.5195400714874268,
0.4163820743560791,
0.12608900666236877,
0.2649640738964081,
-0.8988054990768433,
0.1107027605175972,
0.13365626335144043,
-0.22228887677192688,
-0.0679929107427597,
0.01576356776058674,
0.19386115670204163,
-0.049252454191446304,
-0.1494429111480713,
0.17503920197486877,
0.33789342641830444,
-0.1611880362033844,
0.2350691854953766,
-0.2075396031141281
] |
https://github.com/huggingface/datasets/issues/4888 | Dataset Viewer issue for subjqa | It's a bug in the viewer, thanks for reporting it. We're hoping to update to a new version in the next few days which should fix it. | ### Link
https://huggingface.co/datasets/subjqa
### Description
Getting the following error for this dataset:
```
Status code: 500
Exception: Status500Error
Message: 2 or more items returned, instead of 1
```
Not sure what's causing it though 🤔
### Owner
Yes | 27 | Dataset Viewer issue for subjqa
### Link
https://huggingface.co/datasets/subjqa
### Description
Getting the following error for this dataset:
```
Status code: 500
Exception: Status500Error
Message: 2 or more items returned, instead of 1
```
Not sure what's causing it though 🤔
### Owner
Yes
It's a bug in the viewer, thanks for reporting it. We're hoping to update to a new version in the next few days which should fix it. | [
-0.03717955946922302,
-0.11603695899248123,
-0.02288166433572769,
0.5325881242752075,
0.09126636385917664,
0.05853087455034256,
0.22465632855892181,
0.3746073842048645,
-0.10512794554233551,
0.3295249938964844,
-0.012070544995367527,
0.11314792931079865,
0.09658056497573853,
0.3580985367298126,
-0.0835622251033783,
-0.3037315011024475,
0.16947658360004425,
0.18184839189052582,
-0.21715626120567322,
0.09283532202243805,
-0.22770622372627258,
0.29746073484420776,
-0.0957862138748169,
0.10401187092065811,
-0.07408512383699417,
0.0772155225276947,
-0.15466615557670593,
-0.15336555242538452,
-0.34419506788253784,
-0.4747041165828705,
0.0991939902305603,
-0.10357514023780823,
0.14795590937137604,
0.29057255387306213,
-0.00011647665087366477,
0.09625759720802307,
0.24758073687553406,
0.1017644852399826,
-0.36859360337257385,
-0.012121886014938354,
-0.18902325630187988,
-0.25145772099494934,
0.40546268224716187,
0.01126222312450409,
-0.17947500944137573,
-0.4387180507183075,
0.0655563622713089,
-0.04466499388217926,
0.2980932593345642,
0.048470087349414825,
0.20231099426746368,
0.04625587910413742,
0.09066329896450043,
0.039625778794288635,
0.2986280918121338,
-0.06653796136379242,
-0.08478175103664398,
0.20818281173706055,
0.1280459612607956,
0.17822690308094025,
0.07945796847343445,
0.44874924421310425,
0.23686987161636353,
0.23775368928909302,
0.033078789710998535,
0.014322416856884956,
0.03520480543375015,
-0.4180992841720581,
0.24946436285972595,
0.1990503966808319,
0.7682077288627625,
0.08503565192222595,
-0.3389669358730316,
-0.13097986578941345,
0.11927519738674164,
-0.08694307506084442,
0.20701366662979126,
0.22690695524215698,
-0.006816080771386623,
0.06553502380847931,
0.052761510014534,
0.24166537821292877,
-0.19118395447731018,
-0.12056228518486023,
-0.4100937843322754,
-0.017821528017520905,
-0.18261322379112244,
0.22672805190086365,
0.045995503664016724,
-0.0821089968085289,
0.06163271144032478,
-0.07236190885305405,
-0.5924097895622253,
-0.01636645197868347,
-0.44246721267700195,
-0.09441232681274414,
0.2425258457660675,
-0.00019186735153198242,
-0.01539756078273058,
0.15105870366096497,
0.3693637251853943,
0.22431382536888123,
-0.09059984236955643,
0.07928929477930069,
0.6142779588699341,
0.028914503753185272,
0.18497562408447266,
0.025552138686180115,
0.2182733416557312,
-0.16790926456451416,
0.19746029376983643,
-0.1449183225631714,
0.09922799468040466,
-0.2828604280948639,
-0.26955151557922363,
0.0026780199259519577,
0.33716315031051636,
-0.20171797275543213,
-0.29221269488334656,
0.16616509854793549,
-0.3907563090324402,
-0.24713203310966492,
-0.00929910596460104,
0.11531579494476318,
0.09728925675153732,
0.26316165924072266,
0.022101938724517822,
0.09365981817245483,
-0.20387522876262665,
-0.44290226697921753,
-0.03188794106245041,
-0.12858596444129944,
-0.14588333666324615,
-0.43609118461608887,
0.011455189436674118,
-0.35127657651901245,
-0.20464178919792175,
-0.017916284501552582,
0.09902951121330261,
-0.25167495012283325,
0.13536593317985535,
-0.2740027904510498,
-0.1469038724899292,
0.2736855149269104,
0.09868104755878448,
0.12357502430677414,
0.24850255250930786,
-0.2541220784187317,
0.0925469920039177,
0.2664983868598938,
0.14173194766044617,
-0.10753654688596725,
-0.3554888665676117,
0.18497423827648163,
-0.009853947907686234,
0.23385199904441833,
0.03355078399181366,
0.3534994423389435,
0.0860338807106018,
-0.15757505595684052,
-0.20996129512786865,
0.05741732195019722,
-0.3412916660308838,
-0.07179931551218033,
0.011845452710986137,
0.3949437141418457,
-0.725979745388031,
-0.0627099871635437,
-0.16240447759628296,
-0.38842281699180603,
-0.16380620002746582,
0.40567392110824585,
-0.2191406488418579,
0.14011767506599426,
-0.2885713279247284,
-0.11705860495567322,
0.26732707023620605,
0.14077650010585785,
-0.6240832805633545,
0.41467809677124023,
-0.1526137888431549,
-0.053918592631816864,
0.15335609018802643,
0.28377053141593933,
0.2818621098995209,
-0.007683611009269953,
0.1552881896495819,
-0.30445748567581177,
-0.09000682830810547,
0.09770175069570541,
-0.14053626358509064,
-0.15725798904895782,
0.18044023215770721,
-0.02530069462954998,
0.13741615414619446,
0.08027160167694092,
0.19160141050815582,
-0.6332724690437317,
0.5673576593399048,
-0.03401918336749077,
0.0364665761590004,
-0.0141066275537014,
0.16315491497516632,
-0.09836657345294952,
0.1533854454755783,
0.020094532519578934,
0.041752591729164124,
0.19297239184379578,
-0.35709694027900696,
-0.1374242752790451,
0.26498162746429443,
0.07987421751022339,
-0.28530991077423096,
0.16817137598991394,
-0.20851536095142365,
-0.12322603166103363,
0.11784234642982483,
0.11318504810333252,
-0.41275450587272644,
0.010691210627555847,
-0.11838006973266602,
0.17051568627357483,
0.231119766831398,
0.10734709352254868,
-0.1827077865600586,
0.5770917534828186,
-0.05276508629322052,
0.01691482588648796,
0.24780985713005066,
-0.02728116512298584,
0.34370696544647217,
-0.04595547541975975,
-0.0762835294008255,
0.1777132749557495,
0.13706998527050018,
0.05860809236764908,
0.22350764274597168,
-0.31330400705337524,
0.3158954083919525,
-0.1233590692281723,
0.12617668509483337,
0.4591287672519684,
0.23073622584342957,
0.037736184895038605,
-0.5069964528083801,
0.10602464526891708,
0.16043564677238464,
0.19262391328811646,
-0.17509539425373077,
0.46577584743499756,
0.3251410722732544,
0.24377989768981934,
-0.151290163397789,
-0.2941954731941223,
0.1262604296207428,
0.1678609400987625,
-0.12506318092346191,
0.13520260155200958,
-0.29177409410476685,
0.26678505539894104,
0.06167076900601387,
0.07180719077587128,
-0.039054542779922485,
0.2515103220939636,
-0.17077481746673584,
0.04200638830661774,
0.14352455735206604,
0.5290215611457825,
0.3102363049983978,
0.17103798687458038,
-0.034520093351602554,
-0.10915278643369675,
0.09685062617063522,
-0.20580610632896423,
-0.02529134601354599,
0.16229712963104248,
-0.13518857955932617,
0.09543676674365997,
0.19841276109218597,
-0.09211474657058716,
-0.3090716600418091,
0.3353375196456909,
0.14944107830524445,
0.1388569176197052,
-0.2789939045906067,
0.030150821432471275,
-0.03694428503513336,
-0.6406769752502441,
-0.11058894544839859,
-0.17072106897830963,
0.07646097242832184,
-0.38686996698379517,
0.22081643342971802,
0.19010090827941895,
-0.2960512936115265,
0.17718717455863953,
0.11372247338294983,
0.20212817192077637,
-0.018782077357172966,
0.8770316243171692,
0.08015710115432739,
0.0025996423792093992,
-0.2891504168510437,
0.055618491023778915,
0.13228417932987213,
-0.17807221412658691,
0.23547928035259247,
-0.02588203176856041,
-0.07709818333387375,
-0.7115428447723389,
-0.2594781219959259,
0.22107954323291779,
0.18795691430568695,
0.5698782205581665,
0.08278561383485794,
0.08443619310855865,
0.0017516836524009705,
-0.07059025019407272,
0.16941231489181519,
0.4751288890838623,
-0.14353908598423004,
0.22819900512695312,
0.03051534667611122,
0.12055812776088715,
0.036591652780771255,
-0.14264973998069763,
0.06197209656238556,
-0.22948138415813446,
0.029748182743787766,
-0.009591564536094666,
0.34147101640701294,
-0.03982599824666977,
0.020521026104688644,
-0.16312526166439056,
0.16749322414398193,
-0.317051500082016,
-0.2022676020860672,
-0.45935216546058655,
0.23478397727012634,
-0.23746775090694427,
-0.5668550133705139,
0.22262391448020935,
0.13158051669597626,
0.18982866406440735,
-0.28605568408966064,
-0.33311784267425537,
-0.06124266982078552,
-0.14508846402168274,
-0.2774408459663391,
0.1934112310409546,
-0.20331622660160065,
0.2772994041442871,
-0.011266620829701424,
-0.047313764691352844,
0.054241254925727844,
-0.3717961013317108,
0.1806616187095642,
0.04459850862622261,
0.3553074896335602,
-0.26146167516708374,
0.5184188485145569,
0.160795196890831,
0.18214724957942963,
0.6193891763687134,
0.32910963892936707,
0.2902334928512573,
0.09128633886575699,
0.3170704245567322,
-0.05532819777727127,
-0.41208913922309875,
0.3137913942337036,
-0.3991282284259796,
-0.06364969164133072,
0.5311254262924194,
0.10807696729898453,
-0.3325112462043762,
-0.13421177864074707,
-0.18051797151565552,
-0.41096797585487366,
-0.29425138235092163,
-0.21372689306735992,
-0.5159541964530945,
-0.10133076459169388,
0.07119683921337128,
0.1693853735923767,
-0.03219585865736008,
0.10730496793985367,
-0.3920484483242035,
0.08925623446702957,
0.30264943838119507,
-0.04668460786342621,
-0.2636202871799469,
-0.18839088082313538,
-0.31587907671928406,
0.30525490641593933,
-0.025182923302054405,
0.20856928825378418,
0.04719497635960579,
0.05045925825834274,
0.25189894437789917,
-0.0969039723277092,
0.7554460763931274,
0.12641768157482147,
0.07821393758058548,
0.020894411951303482,
0.00451996922492981,
-0.3469046950340271,
-0.26689255237579346,
0.0528501532971859,
0.3328084647655487,
-0.14764706790447235,
-0.31773829460144043,
-0.09418419748544693,
0.15895283222198486,
0.4032202959060669,
-0.33709773421287537,
-0.32170045375823975,
-0.27154675126075745,
-0.4041346311569214,
0.10035183280706406,
-0.18629242479801178,
-0.06351471692323685,
-0.28564339876174927,
0.05556991323828697,
0.05437754839658737,
-0.4213724434375763,
-0.1232052594423294,
-0.5387206077575684,
-0.04547505080699921,
0.09598436951637268,
0.29770219326019287,
0.07711751759052277,
0.4228564500808716,
0.2676185965538025,
0.28839564323425293,
0.08841409534215927,
0.3856072425842285,
0.05640790984034538,
-0.39089229702949524,
0.24516016244888306,
-0.2835775911808014,
0.029853783547878265,
0.2381708323955536,
-0.24130426347255707,
0.11450158059597015,
0.21955405175685883,
0.28795596957206726,
-0.19576458632946014,
-0.10863257199525833,
0.46677979826927185,
0.09942629933357239,
-0.3288014829158783,
-0.12134065479040146,
0.4272037148475647,
-0.22479301691055298,
-0.17609837651252747,
0.14292296767234802,
0.1791447103023529,
0.008385158143937588,
0.008025029674172401,
0.10865813493728638,
0.7923884987831116,
-0.03116011619567871,
-0.13027864694595337,
0.21550670266151428,
-0.8165321350097656,
0.2943534851074219,
-0.10634119063615799,
0.264957994222641,
-0.5084807276725769,
-0.47774919867515564,
-0.09502390772104263,
0.09721122682094574,
0.28632789850234985,
-0.04920592159032822,
-0.26627060770988464,
0.024108504876494408,
-0.07757832109928131,
0.1427430510520935,
0.05128828436136246,
-0.06183302402496338,
-0.20432868599891663,
0.029051102697849274,
-0.1671668440103531,
0.12204912304878235,
-0.22370626032352448,
0.051918867975473404,
-0.27106159925460815,
0.02678055502474308,
0.140633225440979,
-0.2697795033454895,
-0.3829919695854187,
-0.01707068458199501,
0.1463254988193512,
-0.019012201577425003,
0.27193865180015564,
-0.6223546862602234,
0.033424846827983856,
0.30259260535240173,
0.23805701732635498,
0.031230278313159943,
-0.17076854407787323,
0.18507325649261475,
-0.31658968329429626,
0.22455275058746338,
-0.14266656339168549,
-0.040677376091480255,
0.0324731208384037,
-0.008368588984012604,
-0.4067095220088959,
0.048248566687107086,
0.17822568118572235,
0.13000376522541046,
-0.1031501442193985,
0.3995366096496582,
0.016128811985254288,
-0.37107911705970764,
0.2112695574760437,
-0.2527048885822296,
-0.06658157706260681,
-0.3010362386703491,
0.09273916482925415,
0.2028348594903946,
-0.34858810901641846,
0.1353810727596283,
-0.13383570313453674,
-0.04296483099460602,
-0.08414655923843384,
0.4279334843158722,
0.0807734802365303,
0.2411063015460968,
0.24603664875030518,
0.43586283922195435,
-0.04271559417247772,
-0.08469633758068085,
0.3482997417449951,
0.22212211787700653,
-0.1593792587518692,
0.2536197900772095,
-0.059491731226444244,
0.07841895520687103,
-0.09255421906709671,
0.20256517827510834,
-0.007525939494371414,
0.055948443710803986,
-0.07857201993465424,
-0.3691541254520416,
-0.15194590389728546,
0.11745050549507141,
-0.3713625371456146,
0.16561658680438995,
0.006431449204683304,
0.17709369957447052,
0.46483731269836426,
0.2035883069038391,
-0.2291337251663208,
-0.0689058005809784,
-0.3312683701515198,
0.18892677128314972,
0.11951573938131332,
-0.13913801312446594,
-0.1620335727930069,
0.006143844686448574,
0.03770028054714203,
0.09649553149938583,
-0.2552064061164856,
-0.08644074946641922,
0.1041865199804306,
0.08322402834892273,
0.026775481179356575,
-0.12655411660671234,
0.09544637054204941,
0.08535198122262955,
-0.1424580067396164,
-0.014237960800528526,
0.033928800374269485,
-0.04923953115940094,
-0.03912505507469177,
0.12021222710609436,
0.09485448896884918,
-0.3465817868709564,
-0.04749223589897156,
0.14615467190742493,
-0.028932012617588043,
0.20351719856262207,
0.08902989327907562,
0.08836938440799713,
-0.07496656477451324,
-0.15795783698558807,
-0.012379417195916176,
0.22710758447647095,
-0.05247420072555542,
-0.008039455860853195,
0.45434102416038513,
-0.4148334860801697,
0.32279518246650696,
0.17294177412986755,
0.3973989486694336,
0.08006457984447479,
-0.04796384274959564,
0.03368788957595825,
0.01422828808426857,
0.1326332539319992,
-0.3875952661037445,
-0.41391420364379883,
0.09769095480442047,
-0.0650285929441452,
-0.002457067370414734,
0.03945025056600571,
-0.14772853255271912,
-0.05158751457929611,
0.23714274168014526,
0.13241317868232727,
0.24941924214363098,
-0.16366970539093018,
0.2382820099592209,
0.4458564519882202,
-0.19830761849880219,
-0.09739908576011658,
0.0020209066569805145,
-0.03633293882012367,
0.07320532202720642,
0.7933954000473022,
-0.16817334294319153,
-0.028981508687138557,
0.03287916257977486,
0.21887537837028503,
0.18192026019096375,
-0.27689728140830994,
0.252328097820282,
0.5413032174110413,
-0.30046629905700684,
-0.27872633934020996,
0.22410821914672852,
-0.010089218616485596,
0.1341180056333542,
0.10058749467134476,
-0.3514694571495056,
0.041519857943058014,
0.06618548929691315,
0.07809768617153168,
-0.4391689598560333,
-0.17521816492080688,
-0.07502980530261993,
0.11270268261432648,
-0.16668598353862762,
0.013265002518892288,
-0.054608315229415894,
-0.08731648325920105,
-0.17213492095470428,
-0.46253716945648193,
-0.17393836379051208,
0.28187617659568787,
-0.07754459232091904,
-0.2888294756412506,
0.23255477845668793,
0.3044159412384033,
0.049230486154556274,
0.3558894097805023,
0.4460581839084625,
0.2126084715127945,
0.18367861211299896,
0.042647670954465866,
0.11336864531040192,
-0.12718091905117035,
-0.1277594417333603,
-0.10478533059358597,
-0.1855362355709076,
-0.052761346101760864,
0.2573235332965851,
0.25186145305633545,
0.11294128000736237,
-0.04191311448812485,
0.3884895443916321,
0.07235242426395416,
0.2115226686000824,
-0.7956126928329468,
-0.11943726986646652,
-0.36747175455093384,
-0.1356341540813446,
-0.14990940690040588,
-0.3012164831161499,
-0.45362380146980286,
0.01513100229203701,
-0.034129511564970016,
0.009219848550856113,
0.0589870810508728,
-0.059661269187927246,
0.05547814071178436,
0.04054398834705353,
0.47252318263053894,
0.011916451156139374,
0.15844428539276123,
-0.20333293080329895,
-0.30286264419555664,
-0.550024151802063,
0.004716336727142334,
0.10615240782499313,
0.295381635427475,
0.08453407138586044,
0.06855366379022598,
-0.07028219848871231,
0.20672941207885742,
0.48727160692214966,
0.5325348377227783,
-0.15763738751411438,
0.07087104022502899,
-0.20187048614025116,
-0.2998327314853668,
0.19636988639831543,
0.06285892426967621,
-0.20330576598644257,
0.008064903318881989,
0.5189879536628723,
0.18905338644981384,
0.032291412353515625,
0.16427314281463623,
-0.11150454729795456,
-0.39382246136665344,
-0.45487144589424133,
0.20067453384399414,
0.5829250812530518,
-0.022038862109184265,
0.14839991927146912,
0.18719668686389923,
-0.1330505907535553,
-0.1885048896074295,
-0.42659327387809753,
0.16834135353565216,
0.3097950518131256,
0.7211065292358398,
-0.1488141119480133,
0.06528706103563309,
-0.031006058678030968,
-0.04597911238670349,
0.04661310464143753,
0.35000109672546387,
-0.39260396361351013,
0.13386249542236328,
0.1368505358695984,
0.03795831650495529,
0.008290979079902172,
-0.010023877024650574,
0.26257598400115967,
0.03399307280778885,
-0.33741408586502075,
-0.24506714940071106,
0.2210477739572525,
-0.1885460615158081,
-0.06588312983512878,
-0.08732544630765915,
0.24301810562610626,
-0.04533606022596359,
-0.2907494902610779,
-0.16881847381591797,
-0.19350707530975342,
0.30941271781921387,
-0.0913367047905922,
-0.07962853461503983,
-0.021491877734661102,
0.23343999683856964,
-0.28095051646232605,
-0.19989359378814697,
-0.011242739856243134,
0.45492023229599,
0.010944453999400139,
0.3489196300506592,
-0.1905003935098648
] |
https://github.com/huggingface/datasets/issues/4886 | Loading huggan/CelebA-HQ throws pyarrow.lib.ArrowInvalid | Hi! IIRC one of the files in this dataset is corrupted due to https://github.com/huggingface/datasets/pull/4081 (fixed now).
@NielsRogge Could you please re-generate and re-push this dataset (or I can do it if you share the generation script)? | ## Describe the bug
Loading huggan/CelebA-HQ throws pyarrow.lib.ArrowInvalid
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('huggan/CelebA-HQ')
```
## Expected results
See https://colab.research.google.com/drive/141LJCcM2XyqprPY83nIQ-Zk3BbxWeahq?usp=sharing#scrollTo=N3ml_7f8kzDd
## Actual results
```
File "/home/jean/projects/cold_diffusion/celebA.py", line 4, in <module>
dataset = load_dataset('huggan/CelebA-HQ')
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/load.py", line 1793, in load_dataset
builder_instance.download_and_prepare(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 1274, in _prepare_split
for key, table in logging.tqdm(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 67, in _generate_tables
parquet_file = pq.ParquetFile(f)
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/pyarrow/parquet/__init__.py", line 286, in __init__
self.reader.open(
File "pyarrow/_parquet.pyx", line 1227, in pyarrow._parquet.ParquetReader.open
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-2.4.1.dev0
- Platform: Ubuntu 18.04
- Python version: 3.10
- PyArrow version: pyarrow 9.0.0
| 36 | Loading huggan/CelebA-HQ throws pyarrow.lib.ArrowInvalid
## Describe the bug
Loading huggan/CelebA-HQ throws pyarrow.lib.ArrowInvalid
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('huggan/CelebA-HQ')
```
## Expected results
See https://colab.research.google.com/drive/141LJCcM2XyqprPY83nIQ-Zk3BbxWeahq?usp=sharing#scrollTo=N3ml_7f8kzDd
## Actual results
```
File "/home/jean/projects/cold_diffusion/celebA.py", line 4, in <module>
dataset = load_dataset('huggan/CelebA-HQ')
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/load.py", line 1793, in load_dataset
builder_instance.download_and_prepare(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 1274, in _prepare_split
for key, table in logging.tqdm(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 67, in _generate_tables
parquet_file = pq.ParquetFile(f)
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/pyarrow/parquet/__init__.py", line 286, in __init__
self.reader.open(
File "pyarrow/_parquet.pyx", line 1227, in pyarrow._parquet.ParquetReader.open
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-2.4.1.dev0
- Platform: Ubuntu 18.04
- Python version: 3.10
- PyArrow version: pyarrow 9.0.0
Hi! IIRC one of the files in this dataset is corrupted due to https://github.com/huggingface/datasets/pull/4081 (fixed now).
@NielsRogge Could you please re-generate and re-push this dataset (or I can do it if you share the generation script)? | [
-0.10748839378356934,
-0.1885012537240982,
-0.039607081562280655,
0.3444852828979492,
0.2344798892736435,
-0.11021281033754349,
0.1118069738149643,
0.4497286379337311,
-0.2684803009033203,
0.24177247285842896,
-0.07293921709060669,
0.6089426875114441,
-0.11537941545248032,
0.008785126730799675,
0.03488309308886528,
-0.09028325974941254,
0.02580239623785019,
0.265392541885376,
-0.1842283010482788,
-0.16713887453079224,
-0.2156127542257309,
0.2056240439414978,
-0.14517414569854736,
0.25857192277908325,
-0.18717889487743378,
-0.17537745833396912,
0.15090030431747437,
0.3169099986553192,
-0.1669863611459732,
-0.5641142129898071,
0.06953195482492447,
-0.4406297504901886,
-0.009539557620882988,
0.21754202246665955,
-0.00011246625217609107,
0.09142899513244629,
0.2636585235595703,
0.12802520394325256,
-0.4505494236946106,
0.02621278166770935,
0.2705087959766388,
-0.05691078305244446,
0.357198029756546,
-0.23182350397109985,
0.031193062663078308,
-0.4247996211051941,
-0.232913538813591,
-0.19052201509475708,
0.1584758162498474,
0.32912784814834595,
0.26560381054878235,
0.4538978040218353,
0.027856696397066116,
-0.15299494564533234,
0.4694999158382416,
-0.3367290496826172,
-0.13754743337631226,
0.363706111907959,
0.3707738518714905,
0.11696168780326843,
-0.2145717442035675,
0.33120766282081604,
0.16945607960224152,
0.02326696738600731,
0.12916091084480286,
-0.0488412044942379,
0.18199202418327332,
-0.019721005111932755,
0.08669908344745636,
0.11334803700447083,
-0.04384579509496689,
-0.48476096987724304,
-0.16336262226104736,
-0.14186762273311615,
0.17688965797424316,
-0.11275998502969742,
0.010731279850006104,
0.23011429607868195,
-0.09222128987312317,
0.06814213842153549,
0.09195017069578171,
0.056492242962121964,
-0.21361689269542694,
0.046131208539009094,
0.0806749016046524,
0.20466630160808563,
-0.02135200798511505,
0.2481473684310913,
-0.010836798697710037,
0.06090480089187622,
0.029023736715316772,
0.029757874086499214,
-0.30506664514541626,
-0.09973835945129395,
-0.31227031350135803,
0.011802062392234802,
0.04223182797431946,
0.5587058663368225,
0.09281661361455917,
0.2464214414358139,
0.1935282051563263,
-0.03214513510465622,
0.34767410159111023,
0.08058677613735199,
0.024830957874655724,
0.01093168742954731,
-0.15402328968048096,
0.07398780435323715,
0.09930988401174545,
-0.02202613092958927,
0.0110747329890728,
0.012558303773403168,
0.023365993052721024,
-0.4031587243080139,
0.2705616056919098,
0.11113099008798599,
0.31227344274520874,
-0.01260385662317276,
-0.40673699975013733,
0.01290939375758171,
-0.32481124997138977,
0.1529281735420227,
0.11015406996011734,
0.61969393491745,
-0.0428122952580452,
0.09415152668952942,
0.12931784987449646,
0.13134436309337616,
-0.12847492098808289,
-0.45256295800209045,
-0.26397010684013367,
0.16876628994941711,
-0.2951579988002777,
-0.04224938154220581,
0.09276072680950165,
-0.2506549656391144,
0.2794182300567627,
0.010273330844938755,
0.27001625299453735,
-0.08952321112155914,
0.17389710247516632,
-0.04540194571018219,
0.2808358669281006,
0.11037969589233398,
-0.18330393731594086,
-0.0695023164153099,
0.14158283174037933,
-0.008752107620239258,
-0.13021475076675415,
0.03260437771677971,
0.14879301190376282,
-0.3261031210422516,
-0.4216526746749878,
0.2681581676006317,
0.1954733282327652,
0.02183610200881958,
-0.02877817302942276,
-0.21327443420886993,
0.07487654685974121,
-0.0807386189699173,
0.25594061613082886,
-0.049769602715969086,
0.3936745822429657,
-0.3061105012893677,
0.23624145984649658,
0.2297571301460266,
-0.3250580430030823,
-0.03768026828765869,
0.14466509222984314,
0.03584027662873268,
0.126897931098938,
0.045001886785030365,
-0.37695905566215515,
0.375905841588974,
-0.18345265090465546,
0.25907373428344727,
0.2834043800830841,
-0.504550576210022,
-0.5419784188270569,
-0.054826658219099045,
-0.13616269826889038,
-0.17920057475566864,
0.2578945755958557,
0.0495479591190815,
-0.11534364521503448,
0.155422642827034,
-0.030421286821365356,
0.18841300904750824,
0.13343416154384613,
0.221907377243042,
-0.3404250144958496,
-0.2589506506919861,
-0.08645236492156982,
0.07330234348773956,
0.00579819455742836,
-0.19894087314605713,
0.3456466794013977,
-0.4673076868057251,
0.3143870532512665,
-0.1769474744796753,
0.07528519630432129,
0.09847848862409592,
0.143170565366745,
-0.11214116215705872,
0.2995159924030304,
-0.02115299552679062,
-0.4582633376121521,
0.1543768346309662,
-0.38473084568977356,
-0.07252912223339081,
-0.4710249900817871,
-0.25559401512145996,
-0.37796539068222046,
0.25052839517593384,
-0.315766304731369,
-0.11584228277206421,
0.27593564987182617,
0.22766803205013275,
0.12977933883666992,
-0.018004581332206726,
-0.13444706797599792,
0.0713604986667633,
0.12239328026771545,
0.11742226034402847,
-0.48877400159835815,
0.36023762822151184,
-0.17579182982444763,
-0.35388875007629395,
0.015423260629177094,
0.1760024130344391,
0.19066649675369263,
-0.03244447335600853,
-0.09752008318901062,
0.45665425062179565,
-0.18939422070980072,
0.26543664932250977,
0.08011388033628464,
-0.39642012119293213,
0.061079420149326324,
-0.3302195370197296,
-0.06380774825811386,
0.2981465458869934,
0.22077220678329468,
0.18189650774002075,
0.2990553677082062,
0.19056886434555054,
0.2643085718154907,
0.22377696633338928,
0.05226124823093414,
-0.08837581425905228,
-0.14190243184566498,
-0.04353012889623642,
-0.03803332895040512,
-0.04539325833320618,
0.09670160710811615,
0.20192380249500275,
0.5854367017745972,
-0.020517734810709953,
-0.30830371379852295,
0.07163883745670319,
0.43524444103240967,
-0.02472640573978424,
0.1415395438671112,
-0.1824856996536255,
-0.3682880103588104,
0.039779871702194214,
0.35731005668640137,
0.008844833821058273,
0.195283442735672,
0.24926389753818512,
-0.0956771969795227,
0.10371743887662888,
0.031523872166872025,
-0.1620597541332245,
0.22123803198337555,
0.16157813370227814,
0.24358625710010529,
0.3168194890022278,
0.23857171833515167,
-0.02805706113576889,
-0.3850769102573395,
-0.18192169070243835,
-0.16201156377792358,
0.12385975569486618,
-0.4145388603210449,
0.23218940198421478,
-0.2466736137866974,
0.16089078783988953,
-0.09909705072641373,
-0.43107256293296814,
0.10641540586948395,
-0.20238640904426575,
0.05089856684207916,
0.1285467892885208,
-0.266264945268631,
0.213572695851326,
-0.17912092804908752,
0.13677842915058136,
0.17043431103229523,
-0.0646020770072937,
-0.4000000059604645,
-0.12450671195983887,
-0.34890708327293396,
0.05392437055706978,
0.05745779722929001,
0.013798089697957039,
0.4109605550765991,
-0.06702368706464767,
0.11626707017421722,
-0.37670135498046875,
-0.2856374680995941,
0.22144289314746857,
-0.016845431178808212,
0.17149445414543152,
0.3334007263183594,
0.030541494488716125,
-0.17409777641296387,
-0.14501993358135223,
0.21661731600761414,
-0.0618167445063591,
-0.21339520812034607,
0.2096804976463318,
-0.26742076873779297,
-0.05226904898881912,
-0.10813185572624207,
-0.4422415792942047,
-0.22172369062900543,
-0.49552804231643677,
0.133184552192688,
-0.20881929993629456,
-0.006859451532363892,
0.08237557858228683,
0.20007087290287018,
0.35542288422584534,
-0.2249690145254135,
0.26022908091545105,
0.04489700868725777,
-0.023538805544376373,
0.17463846504688263,
-0.22286777198314667,
-0.3581567108631134,
-0.18378005921840668,
-0.24201883375644684,
0.1580258011817932,
0.07350611686706543,
-0.2459399253129959,
0.05445555970072746,
-0.20578259229660034,
0.3649553954601288,
-0.26541563868522644,
0.03212384507060051,
0.28594839572906494,
0.22818773984909058,
-0.20047597587108612,
-0.12866610288619995,
0.08587561547756195,
0.030400492250919342,
-0.3350173830986023,
-0.028078310191631317,
-0.11422944813966751,
0.05245257914066315,
-0.07133828103542328,
0.41052377223968506,
-0.09081786870956421,
-0.22381152212619781,
0.39313462376594543,
-0.13934920728206635,
0.24914099276065826,
-0.21567949652671814,
-0.09649363905191422,
-0.09323997050523758,
-0.1015062928199768,
-0.04515857249498367,
0.3470205068588257,
-0.10020891577005386,
0.08453314751386642,
0.027368485927581787,
-0.08085441589355469,
-0.3408827781677246,
-0.16341878473758698,
-0.15154875814914703,
-0.0929211974143982,
-0.08460957556962967,
-0.003313615918159485,
0.11614381521940231,
0.10860878229141235,
0.14024591445922852,
0.2285650223493576,
-0.05771099030971527,
-0.08635813742876053,
-0.07879015803337097,
-0.003093935549259186,
-0.3032219707965851,
-0.25415781140327454,
0.3458186089992523,
0.17925071716308594,
0.028643887490034103,
0.15337702631950378,
-0.3699283301830292,
0.32258427143096924,
-0.19224852323532104,
0.376289963722229,
0.09424436837434769,
0.1974533051252365,
-0.07770712673664093,
0.20536735653877258,
-0.42177215218544006,
-0.11725598573684692,
-0.13756147027015686,
0.2648455798625946,
0.36194175481796265,
0.37495988607406616,
-0.34681349992752075,
-0.09446903318166733,
0.1706714928150177,
0.2044469565153122,
0.02151552215218544,
-0.09190788120031357,
-0.36524730920791626,
-0.33170974254608154,
-0.39390021562576294,
0.09989859163761139,
0.06259844452142715,
0.20154640078544617,
-0.04455340653657913,
-0.2082485854625702,
-0.03542262315750122,
-0.09718803316354752,
-0.19378553330898285,
0.17780597507953644,
0.48522624373435974,
-0.368069052696228,
0.1410735696554184,
-0.0943840742111206,
0.5650392770767212,
0.32289183139801025,
0.5315793752670288,
-0.10687346756458282,
-0.5665453672409058,
0.006240377202630043,
-0.023616764694452286,
0.034119896590709686,
0.26703542470932007,
-0.2847447097301483,
0.17399024963378906,
-0.057965055108070374,
0.19819578528404236,
0.3403076231479645,
-0.028922168537974358,
0.2188243865966797,
-0.2184726446866989,
-0.04154422506690025,
0.2722305655479431,
0.5072298049926758,
-0.0872487872838974,
-0.08929172903299332,
0.4707913398742676,
0.3874203562736511,
-0.1586260348558426,
0.2597511410713196,
0.19282777607440948,
0.9411708116531372,
0.2209058552980423,
0.22408939898014069,
0.7878849506378174,
-0.32241183519363403,
0.017417211085557938,
0.22612299025058746,
-0.03757194057106972,
-0.6340823173522949,
0.18935200572013855,
0.13722099363803864,
-0.21117332577705383,
-0.04156780242919922,
-0.07400882244110107,
-0.20736801624298096,
0.06059658154845238,
-0.3587375283241272,
0.035103149712085724,
0.059385739266872406,
0.05715525150299072,
-0.2110937535762787,
0.018324339762330055,
-0.2043129801750183,
0.10955940186977386,
0.022148381918668747,
0.0074349381029605865,
-0.20105800032615662,
-0.19493156671524048,
-0.3201714754104614,
-0.31220054626464844,
0.10316388309001923,
0.2575989067554474,
-0.42254438996315,
0.14180102944374084,
0.25781112909317017,
-0.5343570709228516,
-0.13492268323898315,
0.010664846748113632,
0.06404027342796326,
-0.1561785638332367,
-0.16682110726833344,
0.32168301939964294,
0.23715835809707642,
-0.08847395330667496,
-0.12540164589881897,
0.01599859818816185,
0.12259885668754578,
-0.08441080152988434,
-0.3612026572227478,
0.13558009266853333,
-0.25498437881469727,
-0.322196900844574,
0.13721728324890137,
0.2903364896774292,
0.14899155497550964,
-0.04830215126276016,
0.12094765901565552,
-0.21802839636802673,
-0.07683995366096497,
-0.2711695730686188,
0.16424205899238586,
0.01049833744764328,
-0.18370693922042847,
-0.07384442538022995,
0.12024058401584625,
-0.43808940052986145,
-0.013689454644918442,
0.027637101709842682,
-0.039882175624370575,
0.40815430879592896,
0.5793538093566895,
0.07662363350391388,
-0.26807701587677,
-0.27879002690315247,
-0.13304302096366882,
0.5148392915725708,
-0.7541999816894531,
0.1413881778717041,
-0.0022655681241303682,
0.11999081075191498,
0.015080119483172894,
0.4382966160774231,
0.11410412937402725,
-0.0717340037226677,
-0.19506573677062988,
-0.161291241645813,
-0.21506346762180328,
0.23524440824985504,
-0.15222488343715668,
0.19178025424480438,
0.4123157560825348,
0.11525572836399078,
-0.049071017652750015,
-0.08210745453834534,
-0.35506659746170044,
0.1413423866033554,
-0.12409493327140808,
0.1738678365945816,
-0.08931311219930649,
0.0018248148262500763,
0.09607522189617157,
0.1701379418373108,
0.18277111649513245,
0.23146912455558777,
-0.14475345611572266,
-0.3036349415779114,
-0.010730601847171783,
0.07594273239374161,
-0.06661949306726456,
0.05612621456384659,
-0.23909075558185577,
0.00021916627883911133,
0.06387601792812347,
-0.03504582867026329,
0.19314338266849518,
-0.034619834274053574,
0.0769694596529007,
0.06800343841314316,
0.1662590354681015,
-0.019121281802654266,
-0.27031245827674866,
0.13891232013702393,
-0.05253365635871887,
0.05866299569606781,
-0.08385781943798065,
0.2512609362602234,
-0.2546367645263672,
-0.030792467296123505,
-0.04183424636721611,
0.03575465828180313,
0.23311400413513184,
0.28465503454208374,
0.22522354125976562,
-0.3857330083847046,
-0.24345222115516663,
-0.1613740772008896,
0.20693448185920715,
0.19337770342826843,
-0.3331478238105774,
-0.21357300877571106,
0.07403005659580231,
0.30652862787246704,
-0.28557488322257996,
0.05747056379914284,
-0.23891767859458923,
-0.0030127158388495445,
0.17756590247154236,
0.07084454596042633,
0.054368820041418076,
-0.27189183235168457,
0.06181870400905609,
0.07354194670915604,
0.06007932126522064,
0.21180525422096252,
-0.18011519312858582,
0.39727887511253357,
-0.06435701251029968,
0.0017220266163349152,
0.3099309206008911,
0.18573683500289917,
0.2805640697479248,
0.15382120013237,
-0.2804415822029114,
0.3908642828464508,
-0.2971196472644806,
-0.02063959464430809,
-0.0291198268532753,
-0.12685605883598328,
0.2282567322254181,
0.14106927812099457,
0.08755029737949371,
-0.3761870265007019,
0.25555408000946045,
0.8097866773605347,
0.33203911781311035,
-0.26958465576171875,
-0.0033525843173265457,
0.03771844506263733,
-0.09570973366498947,
0.07274734973907471,
-0.3337646722793579,
-0.11040687561035156,
-0.17478495836257935,
-0.020437628030776978,
-0.10313384234905243,
0.1973128765821457,
0.26754364371299744,
0.2759822905063629,
-0.015888750553131104,
-0.4320770800113678,
0.04805739223957062,
0.2796841561794281,
0.15432649850845337,
-0.19201689958572388,
0.27514955401420593,
0.3218145966529846,
-0.03911326080560684,
-0.09124709665775299,
0.2164674699306488,
0.4719657897949219,
0.29174184799194336,
-0.23341909050941467,
-0.2240089774131775,
-0.0727008581161499,
-0.029598776251077652,
-0.14877761900424957,
0.020006811246275902,
0.2796165347099304,
0.025163259357213974,
0.39014604687690735,
0.20168177783489227,
-0.2572603225708008,
0.047496188431978226,
0.1768357902765274,
0.252702921628952,
-0.12589964270591736,
0.024085089564323425,
-0.29359170794487,
-0.39420974254608154,
-0.2039681226015091,
-0.19433701038360596,
-0.5072590112686157,
0.22248432040214539,
0.15139548480510712,
0.09781862050294876,
-0.03212885558605194,
-0.32170650362968445,
0.10700541734695435,
0.1645437479019165,
0.45737695693969727,
0.30732452869415283,
0.47316673398017883,
-0.19593459367752075,
-0.35408443212509155,
-0.35362541675567627,
0.5443439483642578,
-0.1232028603553772,
0.020998531952500343,
0.043512437492609024,
0.15615780651569366,
-0.07839278131723404,
0.08711675554513931,
0.5092489719390869,
0.07454084604978561,
-0.009376104921102524,
0.2513121962547302,
-0.21136519312858582,
-0.07722219824790955,
0.22786657512187958,
-0.19613006711006165,
0.07282572239637375,
-0.5231708884239197,
-0.055117715150117874,
0.00827470887452364,
0.17449814081192017,
-0.24910329282283783,
-0.32227128744125366,
0.1201167106628418,
-0.1020095944404602,
0.6574708223342896,
0.029733547940850258,
0.18933868408203125,
-0.2218904197216034,
-0.2690495550632477,
-0.11032478511333466,
-0.1288624256849289,
-0.02605665847659111,
0.06169058382511139,
0.14437100291252136,
0.15375009179115295,
0.07654682546854019,
-0.14762990176677704,
-0.2160317748785019,
0.33321771025657654,
0.07903947681188583,
-0.04566214606165886,
-0.10756879299879074,
0.07785846292972565,
-0.1416066586971283,
-0.007097393274307251,
-0.20645256340503693,
0.09822146594524384,
0.08112640678882599,
0.16831476986408234,
-0.45950835943222046,
-0.4744967222213745,
0.6093436479568481,
-0.3155555725097656,
-0.35023611783981323,
0.17330172657966614,
0.41239216923713684,
0.22828787565231323,
-0.1331000179052353,
-0.42789730429649353,
0.09031500667333603,
0.254008948802948,
0.046824730932712555,
-0.0060317013412714005,
0.1035209447145462,
0.0478534922003746,
0.160699725151062,
0.020578261464834213,
0.4143768548965454,
0.19071140885353088,
0.07478152960538864,
-0.02269769087433815,
-0.41435450315475464
] |
https://github.com/huggingface/datasets/issues/4886 | Loading huggan/CelebA-HQ throws pyarrow.lib.ArrowInvalid | Could you put something in place to catch these problems? I'm seeing this on another dataset consistently too and I guess I can't fix it in code? | ## Describe the bug
Loading huggan/CelebA-HQ throws pyarrow.lib.ArrowInvalid
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('huggan/CelebA-HQ')
```
## Expected results
See https://colab.research.google.com/drive/141LJCcM2XyqprPY83nIQ-Zk3BbxWeahq?usp=sharing#scrollTo=N3ml_7f8kzDd
## Actual results
```
File "/home/jean/projects/cold_diffusion/celebA.py", line 4, in <module>
dataset = load_dataset('huggan/CelebA-HQ')
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/load.py", line 1793, in load_dataset
builder_instance.download_and_prepare(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 1274, in _prepare_split
for key, table in logging.tqdm(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 67, in _generate_tables
parquet_file = pq.ParquetFile(f)
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/pyarrow/parquet/__init__.py", line 286, in __init__
self.reader.open(
File "pyarrow/_parquet.pyx", line 1227, in pyarrow._parquet.ParquetReader.open
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-2.4.1.dev0
- Platform: Ubuntu 18.04
- Python version: 3.10
- PyArrow version: pyarrow 9.0.0
| 27 | Loading huggan/CelebA-HQ throws pyarrow.lib.ArrowInvalid
## Describe the bug
Loading huggan/CelebA-HQ throws pyarrow.lib.ArrowInvalid
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('huggan/CelebA-HQ')
```
## Expected results
See https://colab.research.google.com/drive/141LJCcM2XyqprPY83nIQ-Zk3BbxWeahq?usp=sharing#scrollTo=N3ml_7f8kzDd
## Actual results
```
File "/home/jean/projects/cold_diffusion/celebA.py", line 4, in <module>
dataset = load_dataset('huggan/CelebA-HQ')
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/load.py", line 1793, in load_dataset
builder_instance.download_and_prepare(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/builder.py", line 1274, in _prepare_split
for key, table in logging.tqdm(
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/datasets/packaged_modules/parquet/parquet.py", line 67, in _generate_tables
parquet_file = pq.ParquetFile(f)
File "/home/jean/miniconda3/envs/seq/lib/python3.10/site-packages/pyarrow/parquet/__init__.py", line 286, in __init__
self.reader.open(
File "pyarrow/_parquet.pyx", line 1227, in pyarrow._parquet.ParquetReader.open
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Parquet magic bytes not found in footer. Either the file is corrupted or this is not a parquet file.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-2.4.1.dev0
- Platform: Ubuntu 18.04
- Python version: 3.10
- PyArrow version: pyarrow 9.0.0
Could you put something in place to catch these problems? I'm seeing this on another dataset consistently too and I guess I can't fix it in code? | [
-0.10748839378356934,
-0.1885012537240982,
-0.039607081562280655,
0.3444852828979492,
0.2344798892736435,
-0.11021281033754349,
0.1118069738149643,
0.4497286379337311,
-0.2684803009033203,
0.24177247285842896,
-0.07293921709060669,
0.6089426875114441,
-0.11537941545248032,
0.008785126730799675,
0.03488309308886528,
-0.09028325974941254,
0.02580239623785019,
0.265392541885376,
-0.1842283010482788,
-0.16713887453079224,
-0.2156127542257309,
0.2056240439414978,
-0.14517414569854736,
0.25857192277908325,
-0.18717889487743378,
-0.17537745833396912,
0.15090030431747437,
0.3169099986553192,
-0.1669863611459732,
-0.5641142129898071,
0.06953195482492447,
-0.4406297504901886,
-0.009539557620882988,
0.21754202246665955,
-0.00011246625217609107,
0.09142899513244629,
0.2636585235595703,
0.12802520394325256,
-0.4505494236946106,
0.02621278166770935,
0.2705087959766388,
-0.05691078305244446,
0.357198029756546,
-0.23182350397109985,
0.031193062663078308,
-0.4247996211051941,
-0.232913538813591,
-0.19052201509475708,
0.1584758162498474,
0.32912784814834595,
0.26560381054878235,
0.4538978040218353,
0.027856696397066116,
-0.15299494564533234,
0.4694999158382416,
-0.3367290496826172,
-0.13754743337631226,
0.363706111907959,
0.3707738518714905,
0.11696168780326843,
-0.2145717442035675,
0.33120766282081604,
0.16945607960224152,
0.02326696738600731,
0.12916091084480286,
-0.0488412044942379,
0.18199202418327332,
-0.019721005111932755,
0.08669908344745636,
0.11334803700447083,
-0.04384579509496689,
-0.48476096987724304,
-0.16336262226104736,
-0.14186762273311615,
0.17688965797424316,
-0.11275998502969742,
0.010731279850006104,
0.23011429607868195,
-0.09222128987312317,
0.06814213842153549,
0.09195017069578171,
0.056492242962121964,
-0.21361689269542694,
0.046131208539009094,
0.0806749016046524,
0.20466630160808563,
-0.02135200798511505,
0.2481473684310913,
-0.010836798697710037,
0.06090480089187622,
0.029023736715316772,
0.029757874086499214,
-0.30506664514541626,
-0.09973835945129395,
-0.31227031350135803,
0.011802062392234802,
0.04223182797431946,
0.5587058663368225,
0.09281661361455917,
0.2464214414358139,
0.1935282051563263,
-0.03214513510465622,
0.34767410159111023,
0.08058677613735199,
0.024830957874655724,
0.01093168742954731,
-0.15402328968048096,
0.07398780435323715,
0.09930988401174545,
-0.02202613092958927,
0.0110747329890728,
0.012558303773403168,
0.023365993052721024,
-0.4031587243080139,
0.2705616056919098,
0.11113099008798599,
0.31227344274520874,
-0.01260385662317276,
-0.40673699975013733,
0.01290939375758171,
-0.32481124997138977,
0.1529281735420227,
0.11015406996011734,
0.61969393491745,
-0.0428122952580452,
0.09415152668952942,
0.12931784987449646,
0.13134436309337616,
-0.12847492098808289,
-0.45256295800209045,
-0.26397010684013367,
0.16876628994941711,
-0.2951579988002777,
-0.04224938154220581,
0.09276072680950165,
-0.2506549656391144,
0.2794182300567627,
0.010273330844938755,
0.27001625299453735,
-0.08952321112155914,
0.17389710247516632,
-0.04540194571018219,
0.2808358669281006,
0.11037969589233398,
-0.18330393731594086,
-0.0695023164153099,
0.14158283174037933,
-0.008752107620239258,
-0.13021475076675415,
0.03260437771677971,
0.14879301190376282,
-0.3261031210422516,
-0.4216526746749878,
0.2681581676006317,
0.1954733282327652,
0.02183610200881958,
-0.02877817302942276,
-0.21327443420886993,
0.07487654685974121,
-0.0807386189699173,
0.25594061613082886,
-0.049769602715969086,
0.3936745822429657,
-0.3061105012893677,
0.23624145984649658,
0.2297571301460266,
-0.3250580430030823,
-0.03768026828765869,
0.14466509222984314,
0.03584027662873268,
0.126897931098938,
0.045001886785030365,
-0.37695905566215515,
0.375905841588974,
-0.18345265090465546,
0.25907373428344727,
0.2834043800830841,
-0.504550576210022,
-0.5419784188270569,
-0.054826658219099045,
-0.13616269826889038,
-0.17920057475566864,
0.2578945755958557,
0.0495479591190815,
-0.11534364521503448,
0.155422642827034,
-0.030421286821365356,
0.18841300904750824,
0.13343416154384613,
0.221907377243042,
-0.3404250144958496,
-0.2589506506919861,
-0.08645236492156982,
0.07330234348773956,
0.00579819455742836,
-0.19894087314605713,
0.3456466794013977,
-0.4673076868057251,
0.3143870532512665,
-0.1769474744796753,
0.07528519630432129,
0.09847848862409592,
0.143170565366745,
-0.11214116215705872,
0.2995159924030304,
-0.02115299552679062,
-0.4582633376121521,
0.1543768346309662,
-0.38473084568977356,
-0.07252912223339081,
-0.4710249900817871,
-0.25559401512145996,
-0.37796539068222046,
0.25052839517593384,
-0.315766304731369,
-0.11584228277206421,
0.27593564987182617,
0.22766803205013275,
0.12977933883666992,
-0.018004581332206726,
-0.13444706797599792,
0.0713604986667633,
0.12239328026771545,
0.11742226034402847,
-0.48877400159835815,
0.36023762822151184,
-0.17579182982444763,
-0.35388875007629395,
0.015423260629177094,
0.1760024130344391,
0.19066649675369263,
-0.03244447335600853,
-0.09752008318901062,
0.45665425062179565,
-0.18939422070980072,
0.26543664932250977,
0.08011388033628464,
-0.39642012119293213,
0.061079420149326324,
-0.3302195370197296,
-0.06380774825811386,
0.2981465458869934,
0.22077220678329468,
0.18189650774002075,
0.2990553677082062,
0.19056886434555054,
0.2643085718154907,
0.22377696633338928,
0.05226124823093414,
-0.08837581425905228,
-0.14190243184566498,
-0.04353012889623642,
-0.03803332895040512,
-0.04539325833320618,
0.09670160710811615,
0.20192380249500275,
0.5854367017745972,
-0.020517734810709953,
-0.30830371379852295,
0.07163883745670319,
0.43524444103240967,
-0.02472640573978424,
0.1415395438671112,
-0.1824856996536255,
-0.3682880103588104,
0.039779871702194214,
0.35731005668640137,
0.008844833821058273,
0.195283442735672,
0.24926389753818512,
-0.0956771969795227,
0.10371743887662888,
0.031523872166872025,
-0.1620597541332245,
0.22123803198337555,
0.16157813370227814,
0.24358625710010529,
0.3168194890022278,
0.23857171833515167,
-0.02805706113576889,
-0.3850769102573395,
-0.18192169070243835,
-0.16201156377792358,
0.12385975569486618,
-0.4145388603210449,
0.23218940198421478,
-0.2466736137866974,
0.16089078783988953,
-0.09909705072641373,
-0.43107256293296814,
0.10641540586948395,
-0.20238640904426575,
0.05089856684207916,
0.1285467892885208,
-0.266264945268631,
0.213572695851326,
-0.17912092804908752,
0.13677842915058136,
0.17043431103229523,
-0.0646020770072937,
-0.4000000059604645,
-0.12450671195983887,
-0.34890708327293396,
0.05392437055706978,
0.05745779722929001,
0.013798089697957039,
0.4109605550765991,
-0.06702368706464767,
0.11626707017421722,
-0.37670135498046875,
-0.2856374680995941,
0.22144289314746857,
-0.016845431178808212,
0.17149445414543152,
0.3334007263183594,
0.030541494488716125,
-0.17409777641296387,
-0.14501993358135223,
0.21661731600761414,
-0.0618167445063591,
-0.21339520812034607,
0.2096804976463318,
-0.26742076873779297,
-0.05226904898881912,
-0.10813185572624207,
-0.4422415792942047,
-0.22172369062900543,
-0.49552804231643677,
0.133184552192688,
-0.20881929993629456,
-0.006859451532363892,
0.08237557858228683,
0.20007087290287018,
0.35542288422584534,
-0.2249690145254135,
0.26022908091545105,
0.04489700868725777,
-0.023538805544376373,
0.17463846504688263,
-0.22286777198314667,
-0.3581567108631134,
-0.18378005921840668,
-0.24201883375644684,
0.1580258011817932,
0.07350611686706543,
-0.2459399253129959,
0.05445555970072746,
-0.20578259229660034,
0.3649553954601288,
-0.26541563868522644,
0.03212384507060051,
0.28594839572906494,
0.22818773984909058,
-0.20047597587108612,
-0.12866610288619995,
0.08587561547756195,
0.030400492250919342,
-0.3350173830986023,
-0.028078310191631317,
-0.11422944813966751,
0.05245257914066315,
-0.07133828103542328,
0.41052377223968506,
-0.09081786870956421,
-0.22381152212619781,
0.39313462376594543,
-0.13934920728206635,
0.24914099276065826,
-0.21567949652671814,
-0.09649363905191422,
-0.09323997050523758,
-0.1015062928199768,
-0.04515857249498367,
0.3470205068588257,
-0.10020891577005386,
0.08453314751386642,
0.027368485927581787,
-0.08085441589355469,
-0.3408827781677246,
-0.16341878473758698,
-0.15154875814914703,
-0.0929211974143982,
-0.08460957556962967,
-0.003313615918159485,
0.11614381521940231,
0.10860878229141235,
0.14024591445922852,
0.2285650223493576,
-0.05771099030971527,
-0.08635813742876053,
-0.07879015803337097,
-0.003093935549259186,
-0.3032219707965851,
-0.25415781140327454,
0.3458186089992523,
0.17925071716308594,
0.028643887490034103,
0.15337702631950378,
-0.3699283301830292,
0.32258427143096924,
-0.19224852323532104,
0.376289963722229,
0.09424436837434769,
0.1974533051252365,
-0.07770712673664093,
0.20536735653877258,
-0.42177215218544006,
-0.11725598573684692,
-0.13756147027015686,
0.2648455798625946,
0.36194175481796265,
0.37495988607406616,
-0.34681349992752075,
-0.09446903318166733,
0.1706714928150177,
0.2044469565153122,
0.02151552215218544,
-0.09190788120031357,
-0.36524730920791626,
-0.33170974254608154,
-0.39390021562576294,
0.09989859163761139,
0.06259844452142715,
0.20154640078544617,
-0.04455340653657913,
-0.2082485854625702,
-0.03542262315750122,
-0.09718803316354752,
-0.19378553330898285,
0.17780597507953644,
0.48522624373435974,
-0.368069052696228,
0.1410735696554184,
-0.0943840742111206,
0.5650392770767212,
0.32289183139801025,
0.5315793752670288,
-0.10687346756458282,
-0.5665453672409058,
0.006240377202630043,
-0.023616764694452286,
0.034119896590709686,
0.26703542470932007,
-0.2847447097301483,
0.17399024963378906,
-0.057965055108070374,
0.19819578528404236,
0.3403076231479645,
-0.028922168537974358,
0.2188243865966797,
-0.2184726446866989,
-0.04154422506690025,
0.2722305655479431,
0.5072298049926758,
-0.0872487872838974,
-0.08929172903299332,
0.4707913398742676,
0.3874203562736511,
-0.1586260348558426,
0.2597511410713196,
0.19282777607440948,
0.9411708116531372,
0.2209058552980423,
0.22408939898014069,
0.7878849506378174,
-0.32241183519363403,
0.017417211085557938,
0.22612299025058746,
-0.03757194057106972,
-0.6340823173522949,
0.18935200572013855,
0.13722099363803864,
-0.21117332577705383,
-0.04156780242919922,
-0.07400882244110107,
-0.20736801624298096,
0.06059658154845238,
-0.3587375283241272,
0.035103149712085724,
0.059385739266872406,
0.05715525150299072,
-0.2110937535762787,
0.018324339762330055,
-0.2043129801750183,
0.10955940186977386,
0.022148381918668747,
0.0074349381029605865,
-0.20105800032615662,
-0.19493156671524048,
-0.3201714754104614,
-0.31220054626464844,
0.10316388309001923,
0.2575989067554474,
-0.42254438996315,
0.14180102944374084,
0.25781112909317017,
-0.5343570709228516,
-0.13492268323898315,
0.010664846748113632,
0.06404027342796326,
-0.1561785638332367,
-0.16682110726833344,
0.32168301939964294,
0.23715835809707642,
-0.08847395330667496,
-0.12540164589881897,
0.01599859818816185,
0.12259885668754578,
-0.08441080152988434,
-0.3612026572227478,
0.13558009266853333,
-0.25498437881469727,
-0.322196900844574,
0.13721728324890137,
0.2903364896774292,
0.14899155497550964,
-0.04830215126276016,
0.12094765901565552,
-0.21802839636802673,
-0.07683995366096497,
-0.2711695730686188,
0.16424205899238586,
0.01049833744764328,
-0.18370693922042847,
-0.07384442538022995,
0.12024058401584625,
-0.43808940052986145,
-0.013689454644918442,
0.027637101709842682,
-0.039882175624370575,
0.40815430879592896,
0.5793538093566895,
0.07662363350391388,
-0.26807701587677,
-0.27879002690315247,
-0.13304302096366882,
0.5148392915725708,
-0.7541999816894531,
0.1413881778717041,
-0.0022655681241303682,
0.11999081075191498,
0.015080119483172894,
0.4382966160774231,
0.11410412937402725,
-0.0717340037226677,
-0.19506573677062988,
-0.161291241645813,
-0.21506346762180328,
0.23524440824985504,
-0.15222488343715668,
0.19178025424480438,
0.4123157560825348,
0.11525572836399078,
-0.049071017652750015,
-0.08210745453834534,
-0.35506659746170044,
0.1413423866033554,
-0.12409493327140808,
0.1738678365945816,
-0.08931311219930649,
0.0018248148262500763,
0.09607522189617157,
0.1701379418373108,
0.18277111649513245,
0.23146912455558777,
-0.14475345611572266,
-0.3036349415779114,
-0.010730601847171783,
0.07594273239374161,
-0.06661949306726456,
0.05612621456384659,
-0.23909075558185577,
0.00021916627883911133,
0.06387601792812347,
-0.03504582867026329,
0.19314338266849518,
-0.034619834274053574,
0.0769694596529007,
0.06800343841314316,
0.1662590354681015,
-0.019121281802654266,
-0.27031245827674866,
0.13891232013702393,
-0.05253365635871887,
0.05866299569606781,
-0.08385781943798065,
0.2512609362602234,
-0.2546367645263672,
-0.030792467296123505,
-0.04183424636721611,
0.03575465828180313,
0.23311400413513184,
0.28465503454208374,
0.22522354125976562,
-0.3857330083847046,
-0.24345222115516663,
-0.1613740772008896,
0.20693448185920715,
0.19337770342826843,
-0.3331478238105774,
-0.21357300877571106,
0.07403005659580231,
0.30652862787246704,
-0.28557488322257996,
0.05747056379914284,
-0.23891767859458923,
-0.0030127158388495445,
0.17756590247154236,
0.07084454596042633,
0.054368820041418076,
-0.27189183235168457,
0.06181870400905609,
0.07354194670915604,
0.06007932126522064,
0.21180525422096252,
-0.18011519312858582,
0.39727887511253357,
-0.06435701251029968,
0.0017220266163349152,
0.3099309206008911,
0.18573683500289917,
0.2805640697479248,
0.15382120013237,
-0.2804415822029114,
0.3908642828464508,
-0.2971196472644806,
-0.02063959464430809,
-0.0291198268532753,
-0.12685605883598328,
0.2282567322254181,
0.14106927812099457,
0.08755029737949371,
-0.3761870265007019,
0.25555408000946045,
0.8097866773605347,
0.33203911781311035,
-0.26958465576171875,
-0.0033525843173265457,
0.03771844506263733,
-0.09570973366498947,
0.07274734973907471,
-0.3337646722793579,
-0.11040687561035156,
-0.17478495836257935,
-0.020437628030776978,
-0.10313384234905243,
0.1973128765821457,
0.26754364371299744,
0.2759822905063629,
-0.015888750553131104,
-0.4320770800113678,
0.04805739223957062,
0.2796841561794281,
0.15432649850845337,
-0.19201689958572388,
0.27514955401420593,
0.3218145966529846,
-0.03911326080560684,
-0.09124709665775299,
0.2164674699306488,
0.4719657897949219,
0.29174184799194336,
-0.23341909050941467,
-0.2240089774131775,
-0.0727008581161499,
-0.029598776251077652,
-0.14877761900424957,
0.020006811246275902,
0.2796165347099304,
0.025163259357213974,
0.39014604687690735,
0.20168177783489227,
-0.2572603225708008,
0.047496188431978226,
0.1768357902765274,
0.252702921628952,
-0.12589964270591736,
0.024085089564323425,
-0.29359170794487,
-0.39420974254608154,
-0.2039681226015091,
-0.19433701038360596,
-0.5072590112686157,
0.22248432040214539,
0.15139548480510712,
0.09781862050294876,
-0.03212885558605194,
-0.32170650362968445,
0.10700541734695435,
0.1645437479019165,
0.45737695693969727,
0.30732452869415283,
0.47316673398017883,
-0.19593459367752075,
-0.35408443212509155,
-0.35362541675567627,
0.5443439483642578,
-0.1232028603553772,
0.020998531952500343,
0.043512437492609024,
0.15615780651569366,
-0.07839278131723404,
0.08711675554513931,
0.5092489719390869,
0.07454084604978561,
-0.009376104921102524,
0.2513121962547302,
-0.21136519312858582,
-0.07722219824790955,
0.22786657512187958,
-0.19613006711006165,
0.07282572239637375,
-0.5231708884239197,
-0.055117715150117874,
0.00827470887452364,
0.17449814081192017,
-0.24910329282283783,
-0.32227128744125366,
0.1201167106628418,
-0.1020095944404602,
0.6574708223342896,
0.029733547940850258,
0.18933868408203125,
-0.2218904197216034,
-0.2690495550632477,
-0.11032478511333466,
-0.1288624256849289,
-0.02605665847659111,
0.06169058382511139,
0.14437100291252136,
0.15375009179115295,
0.07654682546854019,
-0.14762990176677704,
-0.2160317748785019,
0.33321771025657654,
0.07903947681188583,
-0.04566214606165886,
-0.10756879299879074,
0.07785846292972565,
-0.1416066586971283,
-0.007097393274307251,
-0.20645256340503693,
0.09822146594524384,
0.08112640678882599,
0.16831476986408234,
-0.45950835943222046,
-0.4744967222213745,
0.6093436479568481,
-0.3155555725097656,
-0.35023611783981323,
0.17330172657966614,
0.41239216923713684,
0.22828787565231323,
-0.1331000179052353,
-0.42789730429649353,
0.09031500667333603,
0.254008948802948,
0.046824730932712555,
-0.0060317013412714005,
0.1035209447145462,
0.0478534922003746,
0.160699725151062,
0.020578261464834213,
0.4143768548965454,
0.19071140885353088,
0.07478152960538864,
-0.02269769087433815,
-0.41435450315475464
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.